@storyblok/react 3.0.13 → 3.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -111
- package/dist/index.js +1 -1
- package/dist/index.mjs +5 -6
- package/dist/rsc.js +1 -1
- package/dist/rsc.mjs +13 -13
- package/dist/storyblok-js.js +2 -2
- package/dist/storyblok-js.mjs +146 -146
- package/dist/types/bridge-loader.d.ts +2 -2
- package/dist/types/common/client.d.ts +1 -1
- package/dist/types/common/index.d.ts +4 -4
- package/dist/types/common/storyblok-component.d.ts +2 -2
- package/dist/types/index.d.ts +3 -3
- package/dist/types/rsc/index.d.ts +4 -4
- package/dist/types/story.d.ts +2 -2
- package/dist/types/types.d.ts +3 -4
- package/package.json +25 -25
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { SbReactComponentsMap, SbReactSDKOptions, StoryblokClient } from
|
|
1
|
+
import type { SbReactComponentsMap, SbReactSDKOptions, StoryblokClient } from '../types';
|
|
2
2
|
export declare const useStoryblokApi: () => StoryblokClient;
|
|
3
3
|
export declare const setComponents: (newComponentsMap: SbReactComponentsMap) => SbReactComponentsMap;
|
|
4
4
|
export declare const getComponent: (componentKey: string) => false | import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>;
|
|
5
5
|
export declare const getEnableFallbackComponent: () => boolean;
|
|
6
6
|
export declare const getCustomFallbackComponent: () => import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>;
|
|
7
7
|
export declare const storyblokInit: (pluginOptions?: SbReactSDKOptions) => void;
|
|
8
|
-
export
|
|
8
|
+
export * from '../types';
|
|
9
9
|
export { useStoryblokApi as getStoryblokApi };
|
|
10
|
-
export {
|
|
11
|
-
export
|
|
10
|
+
export { default as StoryblokComponent } from './storyblok-component';
|
|
11
|
+
export { apiPlugin, loadStoryblokBridge, registerStoryblokBridge, renderRichText, RichTextResolver, RichTextSchema, storyblokEditable, useStoryblokBridge, } from '@storyblok/js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ISbStoriesParams,
|
|
1
|
+
import type { ISbStoriesParams, ISbStoryData, StoryblokBridgeConfigV2 } from './types';
|
|
2
2
|
export declare const useStoryblok: (slug: string, apiOptions?: ISbStoriesParams, bridgeOptions?: StoryblokBridgeConfigV2) => ISbStoryData<import("@storyblok/js").StoryblokComponentType<string> & {
|
|
3
3
|
[index: string]: any;
|
|
4
4
|
}>;
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
5
|
+
export * from './common';
|
|
6
|
+
export * from './common/client';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { default as
|
|
3
|
-
export
|
|
4
|
-
export { default as
|
|
1
|
+
export { default as BridgeLoader } from '../bridge-loader';
|
|
2
|
+
export { default as StoryblokBridgeLoader } from '../bridge-loader';
|
|
3
|
+
export * from '../common';
|
|
4
|
+
export { default as StoryblokStory } from '../story';
|
package/dist/types/story.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ISbStoryData, StoryblokBridgeConfigV2 } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ISbStoryData, StoryblokBridgeConfigV2 } from './types';
|
|
3
3
|
interface StoryblokStoryProps {
|
|
4
4
|
story: ISbStoryData;
|
|
5
5
|
bridgeOptions: StoryblokBridgeConfigV2;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { SbSDKOptions } from
|
|
3
|
-
import type { ISbStoryData, StoryblokBridgeConfigV2 } from "@storyblok/js";
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ISbStoryData, SbSDKOptions, StoryblokBridgeConfigV2 } from '@storyblok/js';
|
|
4
3
|
export interface SbReactComponentsMap {
|
|
5
4
|
[key: string]: React.ElementType;
|
|
6
5
|
}
|
|
@@ -10,4 +9,4 @@ export interface SbReactSDKOptions extends SbSDKOptions {
|
|
|
10
9
|
customFallbackComponent?: React.ElementType;
|
|
11
10
|
}
|
|
12
11
|
export type TUseStoryblokState = <T = void>(initialStory: ISbStoryData<T> | null, bridgeOptions?: StoryblokBridgeConfigV2) => ISbStoryData<T> | null;
|
|
13
|
-
export type {
|
|
12
|
+
export type { ArrayFn, AsyncFn, ISbAlternateObject, ISbCache, ISbConfig, ISbContentMangmntAPI, ISbDimensions, ISbError, ISbManagmentApiResult, ISbNode, ISbResponse, ISbResult, ISbRichtext, ISbSchema, ISbStories, ISbStoriesParams, ISbStory, ISbStoryData, ISbStoryParams, SbBlokData, SbBlokKeyDataTypes, SbRichTextOptions, SbSDKOptions, StoryblokBridgeConfigV2, StoryblokBridgeV2, StoryblokClient, StoryblokComponentType, ThrottleFn, useStoryblokBridge, } from '@storyblok/js';
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storyblok/react",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.15",
|
|
4
4
|
"description": "SDK to integrate Storyblok into your project using React.",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
5
|
+
"author": "Storyblok",
|
|
6
|
+
"homepage": "https://github.com/storyblok/storyblok-react",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/storyblok/storyblok-react"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/storyblok/storyblok-react/issues"
|
|
13
|
+
},
|
|
11
14
|
"exports": {
|
|
12
15
|
".": {
|
|
13
16
|
"types": "./dist/types/index.d.ts",
|
|
@@ -30,6 +33,12 @@
|
|
|
30
33
|
"require": "./dist/story.js"
|
|
31
34
|
}
|
|
32
35
|
},
|
|
36
|
+
"main": "./dist/index.js",
|
|
37
|
+
"module": "./dist/index.mjs",
|
|
38
|
+
"types": "./dist/types/index.d.ts",
|
|
39
|
+
"files": [
|
|
40
|
+
"dist"
|
|
41
|
+
],
|
|
33
42
|
"scripts": {
|
|
34
43
|
"dev": "vite build --watch",
|
|
35
44
|
"build": "vite build && tsc --project tsconfig.json",
|
|
@@ -43,31 +52,31 @@
|
|
|
43
52
|
"test:comp": "cypress run-ct",
|
|
44
53
|
"prepublishOnly": "npm run build && cp ../README.md ./"
|
|
45
54
|
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"react": "^17.0.0 || ^18.0.0",
|
|
57
|
+
"react-dom": "^17.0.0 || ^18.0.0"
|
|
58
|
+
},
|
|
46
59
|
"dependencies": {
|
|
47
|
-
"@storyblok/js": "^3.
|
|
60
|
+
"@storyblok/js": "^3.1.1"
|
|
48
61
|
},
|
|
49
62
|
"devDependencies": {
|
|
50
63
|
"@babel/core": "^7.25.2",
|
|
51
64
|
"@babel/preset-env": "^7.25.4",
|
|
52
65
|
"@cypress/react": "^8.0.2",
|
|
53
|
-
"@cypress/vite-dev-server": "^5.
|
|
66
|
+
"@cypress/vite-dev-server": "^5.2.0",
|
|
54
67
|
"@tsconfig/recommended": "^1.0.7",
|
|
55
68
|
"@types/react": "18.3.4",
|
|
56
69
|
"@vitejs/plugin-react": "^4.3.1",
|
|
57
70
|
"babel-jest": "^29.7.0",
|
|
58
|
-
"cypress": "^13.
|
|
71
|
+
"cypress": "^13.14.2",
|
|
59
72
|
"eslint-plugin-cypress": "^3.5.0",
|
|
60
|
-
"eslint-plugin-jest": "^28.8.
|
|
73
|
+
"eslint-plugin-jest": "^28.8.3",
|
|
61
74
|
"jest": "^29.7.0",
|
|
62
75
|
"react": "^18.3.1",
|
|
63
76
|
"react-dom": "^18.3.1",
|
|
64
77
|
"rollup-plugin-preserve-directives": "^0.4.0",
|
|
65
78
|
"start-server-and-test": "^2.0.5",
|
|
66
|
-
"vite": "^5.4.
|
|
67
|
-
},
|
|
68
|
-
"peerDependencies": {
|
|
69
|
-
"react": "^17.0.0 || ^18.0.0",
|
|
70
|
-
"react-dom": "^17.0.0 || ^18.0.0"
|
|
79
|
+
"vite": "^5.4.3"
|
|
71
80
|
},
|
|
72
81
|
"babel": {
|
|
73
82
|
"presets": [
|
|
@@ -95,15 +104,6 @@
|
|
|
95
104
|
"main"
|
|
96
105
|
]
|
|
97
106
|
},
|
|
98
|
-
"repository": {
|
|
99
|
-
"type": "git",
|
|
100
|
-
"url": "https://github.com/storyblok/storyblok-react"
|
|
101
|
-
},
|
|
102
|
-
"author": "Storyblok",
|
|
103
|
-
"bugs": {
|
|
104
|
-
"url": "https://github.com/storyblok/storyblok-react/issues"
|
|
105
|
-
},
|
|
106
|
-
"homepage": "https://github.com/storyblok/storyblok-react",
|
|
107
107
|
"publishConfig": {
|
|
108
108
|
"access": "public"
|
|
109
109
|
}
|