@storyblok/js 3.0.8 → 3.1.0-next.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,7 @@
1
+ import { type SbRichTextOptions as stdSbRichTextOptions } from "@storyblok/richtext";
1
2
  import { SbSDKOptions, StoryblokBridgeConfigV2, ISbStoryData, SbInitResult, ISbRichtext, StoryblokComponentType, SbRichTextOptions } from "./types";
2
3
  import { RichtextResolver } from "storyblok-js-client";
3
- export declare const useStoryblokBridge: <T extends StoryblokComponentType<string> = any>(id: Number, cb: (newStory: ISbStoryData<T>) => void, options?: StoryblokBridgeConfigV2) => void;
4
+ export declare const useStoryblokBridge: <T extends StoryblokComponentType<string> = any>(id: number, cb: (newStory: ISbStoryData<T>) => void, options?: StoryblokBridgeConfigV2) => void;
4
5
  export declare const storyblokInit: (pluginOptions?: SbSDKOptions) => SbInitResult;
5
6
  export declare const isRichTextEmpty: (data?: ISbRichtext) => boolean;
6
7
  export declare const renderRichText: (data?: ISbRichtext, options?: SbRichTextOptions, resolverInstance?: RichtextResolver) => string;
@@ -10,3 +11,9 @@ export { default as apiPlugin } from "./modules/api";
10
11
  export { default as storyblokEditable } from "./modules/editable";
11
12
  export { RichtextResolver as RichTextResolver, RichtextSchema as RichTextSchema, } from "storyblok-js-client";
12
13
  export * from "./types";
14
+ /**
15
+ * This is a temporaly class to avoid type collision with the legacy richtext resolver.
16
+ * It will become ~~`newSbRichTextOptions`~~ -> `SbRichTextOptions` on v4.x
17
+ */
18
+ export type newSbRichTextOptions<T = string, S = (tag: string, attrs: Record<string, any>, text: string) => T> = stdSbRichTextOptions<T, S>;
19
+ export { BlockTypes, MarkTypes, richTextResolver, TextTypes, type SbRichTextDocumentNode, type SbRichTextNodeTypes, type SbRichTextNode, type SbRichTextResolvers, type SbRichTextNodeResolver, type SbRichTextImageOptimizationOptions, } from "@storyblok/richtext";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyblok/js",
3
- "version": "3.0.8",
3
+ "version": "3.1.0-next.2",
4
4
  "description": "SDK to integrate Storyblok into your project using JavaScript.",
5
5
  "main": "./dist/storyblok-js.js",
6
6
  "module": "./dist/storyblok-js.mjs",
@@ -28,7 +28,8 @@
28
28
  "prepublishOnly": "npm run build && cp ../README.md ./"
29
29
  },
30
30
  "dependencies": {
31
- "storyblok-js-client": "^6.7.2"
31
+ "@storyblok/richtext": "^1.0.0",
32
+ "storyblok-js-client": "^6.9.0-next.1"
32
33
  },
33
34
  "devDependencies": {
34
35
  "@tsconfig/recommended": "^1.0.6",
@@ -37,7 +38,7 @@
37
38
  "eslint-plugin-jest": "^28.2.0",
38
39
  "isomorphic-fetch": "^3.0.0",
39
40
  "start-server-and-test": "^2.0.3",
40
- "vite": "^5.2.8",
41
+ "vite": "^5.3.5",
41
42
  "vitest": "^1.5.0"
42
43
  },
43
44
  "babel": {
@@ -63,7 +64,15 @@
63
64
  },
64
65
  "release": {
65
66
  "branches": [
66
- "main"
67
+ "main",
68
+ {
69
+ "name": "next",
70
+ "prerelease": true
71
+ },
72
+ {
73
+ "name": "beta",
74
+ "prerelease": true
75
+ }
67
76
  ]
68
77
  },
69
78
  "repository": {