diff --git a/README.md b/README.md index d49205a..c5902ca 100644 --- a/README.md +++ b/README.md @@ -144,11 +144,11 @@ You can render rich-text fields by using the `StoryblokRichtext` component: #### Overriding the default resolvers -You can override the default resolvers by passing a `resolver` prop to the `StoryblokRichtext` component, for example, to use vue-router links or add a custom codeblok component: : +You can override the default resolvers by passing a `resolver` prop to the `StoryblokRichText` component, for example, to use vue-router links or add a custom codeblok component: : ```html ``` -Or you can have more control by using the `useRichText` composable: +Or you can have more control by using the `useStoryblokRichText` composable: ```html + diff --git a/lib/cypress/testing-components/RichText.vue b/lib/cypress/testing-components/RichText.vue new file mode 100644 index 0000000..2c541c4 --- /dev/null +++ b/lib/cypress/testing-components/RichText.vue @@ -0,0 +1,10 @@ + + diff --git a/lib/cypress/testing-components/RichTextChild.vue b/lib/cypress/testing-components/RichTextChild.vue new file mode 100644 index 0000000..f203346 --- /dev/null +++ b/lib/cypress/testing-components/RichTextChild.vue @@ -0,0 +1,10 @@ + + + diff --git a/lib/types.ts b/lib/types.ts index 8dfd818..a6b1a7e 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -33,7 +33,6 @@ export type { ISbAlternateObject, ISbStoriesParams, ISbStoryParams, - IStoryblokRichtext, SbBlokData, SbBlokKeyDataTypes, SbSDKOptions, diff --git a/package-lock.json b/package-lock.json index 560e55f..7b97e01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -681,7 +681,6 @@ }, "node_modules/@babel/parser": { "version": "7.24.7", - "dev": true, "license": "MIT", "bin": { "parser": "bin/babel-parser.js" @@ -3666,7 +3665,6 @@ }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", - "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { @@ -4648,7 +4646,6 @@ }, "node_modules/@vue/compiler-core": { "version": "3.4.27", - "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.24.4", @@ -4660,7 +4657,6 @@ }, "node_modules/@vue/compiler-core/node_modules/entities": { "version": "4.5.0", - "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=0.12" @@ -4671,7 +4667,6 @@ }, "node_modules/@vue/compiler-dom": { "version": "3.4.27", - "dev": true, "license": "MIT", "dependencies": { "@vue/compiler-core": "3.4.27", @@ -4680,7 +4675,6 @@ }, "node_modules/@vue/compiler-sfc": { "version": "3.4.27", - "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.24.4", @@ -4696,16 +4690,19 @@ }, "node_modules/@vue/compiler-ssr": { "version": "3.4.27", - "dev": true, "license": "MIT", "dependencies": { "@vue/compiler-dom": "3.4.27", "@vue/shared": "3.4.27" } }, + "node_modules/@vue/devtools-api": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.3.tgz", + "integrity": "sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw==" + }, "node_modules/@vue/reactivity": { "version": "3.4.27", - "dev": true, "license": "MIT", "dependencies": { "@vue/shared": "3.4.27" @@ -4713,7 +4710,6 @@ }, "node_modules/@vue/runtime-core": { "version": "3.4.27", - "dev": true, "license": "MIT", "dependencies": { "@vue/reactivity": "3.4.27", @@ -4722,7 +4718,6 @@ }, "node_modules/@vue/runtime-dom": { "version": "3.4.27", - "dev": true, "license": "MIT", "dependencies": { "@vue/runtime-core": "3.4.27", @@ -4732,7 +4727,6 @@ }, "node_modules/@vue/server-renderer": { "version": "3.4.27", - "dev": true, "license": "MIT", "dependencies": { "@vue/compiler-ssr": "3.4.27", @@ -4744,7 +4738,6 @@ }, "node_modules/@vue/shared": { "version": "3.4.27", - "dev": true, "license": "MIT" }, "node_modules/@vue/test-utils": { @@ -5879,7 +5872,6 @@ }, "node_modules/csstype": { "version": "3.1.3", - "dev": true, "license": "MIT" }, "node_modules/cypress": { @@ -6724,7 +6716,6 @@ }, "node_modules/estree-walker": { "version": "2.0.2", - "dev": true, "license": "MIT" }, "node_modules/esutils": { @@ -8928,7 +8919,6 @@ }, "node_modules/magic-string": { "version": "0.30.10", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" @@ -10451,7 +10441,7 @@ }, "node_modules/typescript": { "version": "4.9.5", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -10685,7 +10675,6 @@ }, "node_modules/vue": { "version": "3.4.27", - "dev": true, "license": "MIT", "dependencies": { "@vue/compiler-dom": "3.4.27", @@ -10731,6 +10720,20 @@ "eslint": ">=6.0.0" } }, + "node_modules/vue-router": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.4.3.tgz", + "integrity": "sha512-sv6wmNKx2j3aqJQDMxLFzs/u/mjA9Z5LCgy6BE0f7yFWMjrPLnS/sPNn8ARY/FXw6byV18EFutn5lTO6+UsV5A==", + "dependencies": { + "@vue/devtools-api": "^6.6.3" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, "node_modules/vue-template-compiler": { "version": "2.7.16", "dev": true, @@ -10938,7 +10941,8 @@ "name": "@storyblok/vue-playground", "version": "0.0.0", "dependencies": { - "@vitejs/plugin-basic-ssl": "^1.1.0" + "@vitejs/plugin-basic-ssl": "^1.1.0", + "vue-router": "^4.4.3" }, "devDependencies": { "@storyblok/vue": "^0.0.1", diff --git a/playground/App.vue b/playground/App.vue index 62cd764..c911de5 100644 --- a/playground/App.vue +++ b/playground/App.vue @@ -1,11 +1,22 @@ -