diff --git a/lib/components/SbRichText.vue b/lib/components/SbRichText.vue
index 68bd04b..810a1ca 100644
--- a/lib/components/SbRichText.vue
+++ b/lib/components/SbRichText.vue
@@ -1,4 +1,6 @@
diff --git a/lib/composables/useRichText.ts b/lib/composables/useRichText.ts
index 1ef34b2..9448090 100644
--- a/lib/composables/useRichText.ts
+++ b/lib/composables/useRichText.ts
@@ -3,9 +3,9 @@ import { createTextVNode, h } from "vue";
import type {
SbRichTextNode,
SbRichTextNodeResolver,
- SbRichTextOptions,
-} from "@storyblok/richtext";
-import { BlockTypes, richTextResolver } from "@storyblok/richtext";
+ newSbRichTextOptions,
+} from "@storyblok/js";
+import { BlockTypes, richTextResolver } from "@storyblok/js";
import StoryblokComponent from "../StoryblokComponent.vue";
const componentResolver: SbRichTextNodeResolver = (
@@ -21,8 +21,8 @@ const componentResolver: SbRichTextNodeResolver = (
);
};
-export function useSbRichText(options: SbRichTextOptions) {
- const mergedOptions: SbRichTextOptions = {
+export function useSbRichText(options: newSbRichTextOptions) {
+ const mergedOptions: newSbRichTextOptions = {
renderFn: h,
textFn: createTextVNode,
resolvers: {
diff --git a/lib/index.ts b/lib/index.ts
index 27601e3..109fa07 100644
--- a/lib/index.ts
+++ b/lib/index.ts
@@ -16,24 +16,22 @@ import type {
} from "./types";
export {
+ useStoryblokBridge,
+ apiPlugin,
+ renderRichText,
+ RichTextSchema,
+ RichTextResolver,
BlockTypes,
MarkTypes,
richTextResolver,
TextTypes,
+ type SbRichTextDocumentNode,
type SbRichTextNodeTypes,
type SbRichTextNode,
type SbRichTextOptions,
type SbRichTextResolvers,
type SbRichTextNodeResolver,
type SbRichTextImageOptimizationOptions,
-} from "@storyblok/richtext";
-
-export {
- useStoryblokBridge,
- apiPlugin,
- renderRichText,
- RichTextSchema,
- RichTextResolver,
} from "@storyblok/js";
import StoryblokComponent from "./StoryblokComponent.vue";
diff --git a/lib/package.json b/lib/package.json
index 4fb93d3..c340e8a 100644
--- a/lib/package.json
+++ b/lib/package.json
@@ -25,8 +25,7 @@
"prepublishOnly": "npm run build && cp ../README.md ./"
},
"dependencies": {
- "@storyblok/js": "^3.0.8",
- "@storyblok/richtext": "^0.3.0"
+ "@storyblok/js": "^3.1.0-next.2"
},
"devDependencies": {
"@babel/core": "^7.24.7",
diff --git a/lib/types.ts b/lib/types.ts
index d2f2cc7..5271ef5 100644
--- a/lib/types.ts
+++ b/lib/types.ts
@@ -1,6 +1,9 @@
import type { SbBlokData, SbSDKOptions } from "@storyblok/js";
import type StoryblokComponent from "./StoryblokComponent.vue";
-import type { SbRichTextNode, SbRichTextResolvers } from "@storyblok/richtext";
+import type {
+ SbRichTextDocumentNode,
+ SbRichTextResolvers,
+} from "@storyblok/richtext";
import type { VNode } from "vue";
declare module "@vue/runtime-core" {
@@ -55,6 +58,6 @@ export interface SbComponentProps {
}
export interface SbRichTextProps {
- doc: SbRichTextNode;
+ doc: SbRichTextDocumentNode;
resolvers?: SbRichTextResolvers;
}
diff --git a/package-lock.json b/package-lock.json
index b79bdfa..d9f1d78 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -28,8 +28,7 @@
"name": "@storyblok/vue",
"version": "0.0.1",
"dependencies": {
- "@storyblok/js": "^3.0.8",
- "@storyblok/richtext": "^0.3.0"
+ "@storyblok/js": "^3.1.0-next.2"
},
"devDependencies": {
"@babel/core": "^7.24.7",
@@ -4211,17 +4210,18 @@
}
},
"node_modules/@storyblok/js": {
- "version": "3.0.8",
- "resolved": "https://registry.npmjs.org/@storyblok/js/-/js-3.0.8.tgz",
- "integrity": "sha512-JY+abbswBId84Ubr0yRwNpq5Klf9546Ia2Qs1pn6en5Trz8o6EcBJIwxvR6evjJ0Vp2cLKT7MV1yfGLAtnzycA==",
+ "version": "3.1.0-next.2",
+ "resolved": "https://registry.npmjs.org/@storyblok/js/-/js-3.1.0-next.2.tgz",
+ "integrity": "sha512-NwJR1FBmaJRWjfVUvJ5Tod1iA3+EpUHpxw+s+TGSWMksDg0OcHACc77VPgJO0WIDXWMbLhw5hKuc58hIh44OZA==",
"dependencies": {
- "storyblok-js-client": "^6.7.2"
+ "@storyblok/richtext": "^1.0.0",
+ "storyblok-js-client": "^6.9.0-next.1"
}
},
- "node_modules/@storyblok/richtext": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/@storyblok/richtext/-/richtext-0.3.0.tgz",
- "integrity": "sha512-Kr1CreLMhOPg5QFRq0gJ6ap1J7njyEQb+K3Q+rqBKiaTYJVTEympugOadNkDughO7VJppadR92N7iqV6vOePYw==",
+ "node_modules/@storyblok/js/node_modules/@storyblok/richtext": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@storyblok/richtext/-/richtext-1.0.0.tgz",
+ "integrity": "sha512-zzdgyJuoOTw9jldtj1/0+S1952NnherH7M5iXQRq7ehg7RDz01RGZEBSwcwrDmkXjfa6i7yaZrBdqD3BLUb34A==",
"dependencies": {
"consola": "^3.2.3"
}
@@ -10854,9 +10854,9 @@
}
},
"node_modules/storyblok-js-client": {
- "version": "6.7.2",
- "resolved": "https://registry.npmjs.org/storyblok-js-client/-/storyblok-js-client-6.7.2.tgz",
- "integrity": "sha512-5+cCZQhvIPSP5fin7jMUyyiAfV3FSbhH2q0YmDpb8NqxsY0pog6r+igHshVXNHed5yB5AZcVn0Mduao0X1MdBA=="
+ "version": "6.9.0-next.1",
+ "resolved": "https://registry.npmjs.org/storyblok-js-client/-/storyblok-js-client-6.9.0-next.1.tgz",
+ "integrity": "sha512-70O9TtuRN0O3V4ZmJrQ5qKCT4nGTIQLEEWvJRLfhv84AbMiLGyKJy9rglvhS0Ijjx4WdlYAqTG/b2ujuABhBlg=="
},
"node_modules/string-argv": {
"version": "0.3.2",
@@ -14548,19 +14548,22 @@
}
},
"@storyblok/js": {
- "version": "3.0.8",
- "resolved": "https://registry.npmjs.org/@storyblok/js/-/js-3.0.8.tgz",
- "integrity": "sha512-JY+abbswBId84Ubr0yRwNpq5Klf9546Ia2Qs1pn6en5Trz8o6EcBJIwxvR6evjJ0Vp2cLKT7MV1yfGLAtnzycA==",
- "requires": {
- "storyblok-js-client": "^6.7.2"
- }
- },
- "@storyblok/richtext": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/@storyblok/richtext/-/richtext-0.3.0.tgz",
- "integrity": "sha512-Kr1CreLMhOPg5QFRq0gJ6ap1J7njyEQb+K3Q+rqBKiaTYJVTEympugOadNkDughO7VJppadR92N7iqV6vOePYw==",
+ "version": "3.1.0-next.2",
+ "resolved": "https://registry.npmjs.org/@storyblok/js/-/js-3.1.0-next.2.tgz",
+ "integrity": "sha512-NwJR1FBmaJRWjfVUvJ5Tod1iA3+EpUHpxw+s+TGSWMksDg0OcHACc77VPgJO0WIDXWMbLhw5hKuc58hIh44OZA==",
"requires": {
- "consola": "^3.2.3"
+ "@storyblok/richtext": "^1.0.0",
+ "storyblok-js-client": "^6.9.0-next.1"
+ },
+ "dependencies": {
+ "@storyblok/richtext": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@storyblok/richtext/-/richtext-1.0.0.tgz",
+ "integrity": "sha512-zzdgyJuoOTw9jldtj1/0+S1952NnherH7M5iXQRq7ehg7RDz01RGZEBSwcwrDmkXjfa6i7yaZrBdqD3BLUb34A==",
+ "requires": {
+ "consola": "^3.2.3"
+ }
+ }
}
},
"@storyblok/vue": {
@@ -14569,8 +14572,7 @@
"@babel/core": "^7.24.7",
"@cypress/vite-dev-server": "^5.1.0",
"@cypress/vue": "^6.0.0",
- "@storyblok/js": "^3.0.8",
- "@storyblok/richtext": "^0.3.0",
+ "@storyblok/js": "^3.1.0-next.2",
"@vitejs/plugin-vue": "^5.0.5",
"@vue/babel-preset-app": "^5.0.8",
"@vue/test-utils": "2.4.6",
@@ -19507,9 +19509,9 @@
}
},
"storyblok-js-client": {
- "version": "6.7.2",
- "resolved": "https://registry.npmjs.org/storyblok-js-client/-/storyblok-js-client-6.7.2.tgz",
- "integrity": "sha512-5+cCZQhvIPSP5fin7jMUyyiAfV3FSbhH2q0YmDpb8NqxsY0pog6r+igHshVXNHed5yB5AZcVn0Mduao0X1MdBA=="
+ "version": "6.9.0-next.1",
+ "resolved": "https://registry.npmjs.org/storyblok-js-client/-/storyblok-js-client-6.9.0-next.1.tgz",
+ "integrity": "sha512-70O9TtuRN0O3V4ZmJrQ5qKCT4nGTIQLEEWvJRLfhv84AbMiLGyKJy9rglvhS0Ijjx4WdlYAqTG/b2ujuABhBlg=="
},
"string-argv": {
"version": "0.3.2",
diff --git a/playground/pages/Home.vue b/playground/pages/Home.vue
index c56559c..820fae9 100644
--- a/playground/pages/Home.vue
+++ b/playground/pages/Home.vue
@@ -1,10 +1,10 @@