@storyblok/react 4.0.0 → 4.2.0
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/LICENSE +21 -0
- package/README.md +26 -2
- package/dist/client.js +1 -1
- package/dist/common/client.d.ts +3 -0
- package/dist/common/client.d.ts.map +1 -0
- package/dist/{types/common → common}/index.d.ts +2 -1
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/storyblok-component.d.ts +7 -0
- package/dist/common/storyblok-component.d.ts.map +1 -0
- package/dist/common.mjs +2 -2
- package/dist/{types/index.d.ts → index.d.ts} +2 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +4 -4
- package/dist/jsx-runtime.js +2 -0
- package/dist/jsx-runtime.mjs +9 -0
- package/dist/jsx-runtime2.js +1 -0
- package/dist/jsx-runtime2.mjs +4 -0
- package/dist/live-editing.js +1 -1
- package/dist/react-jsx-runtime.development.js +23 -0
- package/dist/react-jsx-runtime.development.mjs +609 -0
- package/dist/react-jsx-runtime.development2.js +1 -0
- package/dist/react-jsx-runtime.development2.mjs +4 -0
- package/dist/react-jsx-runtime.production.min.js +10 -0
- package/dist/react-jsx-runtime.production.min.mjs +29 -0
- package/dist/react-jsx-runtime.production.min2.js +1 -0
- package/dist/react-jsx-runtime.production.min2.mjs +4 -0
- package/dist/{types/rsc → rsc}/common.d.ts +2 -1
- package/dist/rsc/common.d.ts.map +1 -0
- package/dist/{types/rsc → rsc}/index.d.ts +1 -0
- package/dist/rsc/index.d.ts.map +1 -0
- package/dist/{types/rsc → rsc}/live-edit-update-action.d.ts +1 -0
- package/dist/rsc/live-edit-update-action.d.ts.map +1 -0
- package/dist/{types/rsc → rsc}/live-editing.d.ts +1 -0
- package/dist/rsc/live-editing.d.ts.map +1 -0
- package/dist/rsc/server-component.d.ts +7 -0
- package/dist/rsc/server-component.d.ts.map +1 -0
- package/dist/rsc/story.d.ts +8 -0
- package/dist/rsc/story.d.ts.map +1 -0
- package/dist/server-component.js +1 -1
- package/dist/server-component.mjs +21 -15
- package/dist/story.js +1 -1
- package/dist/story.mjs +17 -13
- package/dist/storyblok-component.js +1 -1
- package/dist/storyblok-component.mjs +20 -14
- package/dist/storyblok-js.js +24 -24
- package/dist/storyblok-js.mjs +373 -354
- package/dist/{types/types.d.ts → types.d.ts} +2 -1
- package/dist/types.d.ts.map +1 -0
- package/package.json +52 -45
- package/dist/types/common/client.d.ts +0 -2
- package/dist/types/common/storyblok-component.d.ts +0 -8
- package/dist/types/rsc/server-component.d.ts +0 -8
- package/dist/types/rsc/story.d.ts +0 -9
|
@@ -9,4 +9,5 @@ export interface SbReactSDKOptions extends SbSDKOptions {
|
|
|
9
9
|
customFallbackComponent?: React.ElementType;
|
|
10
10
|
}
|
|
11
11
|
export type TUseStoryblokState = <T = void>(initialStory: ISbStoryData<T> | null, bridgeOptions?: StoryblokBridgeConfigV2) => ISbStoryData<T> | null;
|
|
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,
|
|
12
|
+
export type { ArrayFn, AsyncFn, ISbAlternateObject, ISbCache, ISbConfig, ISbContentMangmntAPI, ISbDimensions, ISbError, ISbManagmentApiResult, ISbNode, ISbResponse, ISbResult, ISbRichtext, ISbSchema, ISbStories, ISbStoriesParams, ISbStory, ISbStoryData, ISbStoryParams, ISbThrottle, SbBlokData, SbBlokKeyDataTypes, SbRichTextOptions, SbSDKOptions, StoryblokBridgeConfigV2, StoryblokBridgeV2, StoryblokClient, StoryblokComponentType, useStoryblokBridge, } from '@storyblok/js';
|
|
13
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAEzF,MAAM,WAAW,oBAAoB;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC;CAClC;AAED,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,uBAAuB,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CAC7C;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,GAAG,IAAI,EACxC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,EACpC,aAAa,CAAC,EAAE,uBAAuB,KACpC,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAE5B,YAAY,EACV,OAAO,EACP,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,SAAS,EACT,oBAAoB,EACpB,aAAa,EACb,QAAQ,EACR,qBAAqB,EACrB,OAAO,EACP,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storyblok/react",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "4.2.0",
|
|
5
|
+
"private": false,
|
|
6
|
+
"packageManager": "pnpm@9.13.2",
|
|
4
7
|
"description": "SDK to integrate Storyblok into your project using React.",
|
|
5
8
|
"author": "Storyblok",
|
|
6
|
-
"
|
|
9
|
+
"license": "MIT",
|
|
7
10
|
"repository": {
|
|
8
11
|
"type": "git",
|
|
9
12
|
"url": "https://github.com/storyblok/storyblok-react"
|
|
@@ -13,71 +16,75 @@
|
|
|
13
16
|
},
|
|
14
17
|
"exports": {
|
|
15
18
|
".": {
|
|
16
|
-
"types": "./dist/
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
17
20
|
"import": "./dist/index.mjs",
|
|
18
21
|
"require": "./dist/index.js"
|
|
19
22
|
},
|
|
20
23
|
"./rsc": {
|
|
21
|
-
"types": "./dist/
|
|
24
|
+
"types": "./dist/rsc/index.d.ts",
|
|
22
25
|
"import": "./dist/rsc.mjs",
|
|
23
26
|
"require": "./dist/rsc.js"
|
|
24
|
-
},
|
|
25
|
-
"./bridge-loader": {
|
|
26
|
-
"types": "./dist/types/bridge-loader.d.ts",
|
|
27
|
-
"import": "./dist/bridge-loader.mjs",
|
|
28
|
-
"require": "./dist/bridge-loader.js"
|
|
29
|
-
},
|
|
30
|
-
"./story": {
|
|
31
|
-
"types": "./dist/types/story.d.ts",
|
|
32
|
-
"import": "./dist/story.mjs",
|
|
33
|
-
"require": "./dist/story.js"
|
|
34
27
|
}
|
|
35
28
|
},
|
|
36
29
|
"main": "./dist/index.js",
|
|
37
30
|
"module": "./dist/index.mjs",
|
|
38
|
-
"types": "./dist/
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
39
32
|
"files": [
|
|
40
33
|
"dist"
|
|
41
34
|
],
|
|
42
35
|
"scripts": {
|
|
43
36
|
"dev": "vite build --watch",
|
|
44
37
|
"build": "vite build && tsc --project tsconfig.json",
|
|
45
|
-
"test": "
|
|
46
|
-
"test:unit": "
|
|
47
|
-
"test:
|
|
48
|
-
"test:
|
|
49
|
-
"
|
|
38
|
+
"test": "pnpm run test:unit:ci && pnpm run test:e2e",
|
|
39
|
+
"test:unit": "vitest",
|
|
40
|
+
"test:unit:ci": "vitest run",
|
|
41
|
+
"test:unit:ui": "vitest --ui",
|
|
42
|
+
"test:e2e": "start-server-and-test playground:next13-app-router http://localhost:3000/ cy:run",
|
|
43
|
+
"test:e2e-watch": "start-server-and-test playground:next13-app-router http-get://localhost:3000/ cy:open",
|
|
50
44
|
"cy:run": "cypress run",
|
|
51
45
|
"cy:open": "cypress open",
|
|
52
46
|
"test:comp": "cypress run-ct",
|
|
53
|
-
"
|
|
47
|
+
"playground": "pnpm run --filter ./playground/react dev",
|
|
48
|
+
"playground:next": "pnpm run --filter ./playground/next15 dev",
|
|
49
|
+
"playground:next13": "pnpm run --filter ./playground/next13 dev",
|
|
50
|
+
"playground:next13-app-router": "pnpm run --filter ./playground/next13-app-router dev",
|
|
51
|
+
"lint": "eslint .",
|
|
52
|
+
"lint:fix": "eslint . --fix",
|
|
53
|
+
"prepublishOnly": "pnpm build"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"
|
|
57
|
-
"react
|
|
56
|
+
"next": "^13 || ^14 || ^15",
|
|
57
|
+
"react": "^17 || ^18 || ^19",
|
|
58
|
+
"react-dom": "^17 || ^18 || ^19"
|
|
58
59
|
},
|
|
59
60
|
"dependencies": {
|
|
60
|
-
"@storyblok/js": "
|
|
61
|
-
"next": "14.2.14"
|
|
61
|
+
"@storyblok/js": "3.1.9"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@babel/core": "^7.
|
|
65
|
-
"@babel/preset-env": "^7.
|
|
64
|
+
"@babel/core": "^7.26.0",
|
|
65
|
+
"@babel/preset-env": "^7.26.0",
|
|
66
|
+
"@commitlint/cli": "^19.6.0",
|
|
67
|
+
"@commitlint/config-conventional": "^19.6.0",
|
|
66
68
|
"@cypress/react": "^8.0.2",
|
|
67
|
-
"@cypress/vite-dev-server": "^5.2.
|
|
68
|
-
"@
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
69
|
+
"@cypress/vite-dev-server": "^5.2.1",
|
|
70
|
+
"@storyblok/eslint-config": "^0.3.0",
|
|
71
|
+
"@tsconfig/recommended": "^1.0.8",
|
|
72
|
+
"@types/node": "^22.10.1",
|
|
73
|
+
"@types/react": "18.3.12",
|
|
74
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
71
75
|
"babel-jest": "^29.7.0",
|
|
72
|
-
"cypress": "^13.
|
|
73
|
-
"eslint
|
|
74
|
-
"eslint-plugin-
|
|
75
|
-
"jest": "^
|
|
76
|
+
"cypress": "^13.16.1",
|
|
77
|
+
"eslint": "^9.16.0",
|
|
78
|
+
"eslint-plugin-cypress": "^4.1.0",
|
|
79
|
+
"eslint-plugin-jest": "^28.9.0",
|
|
76
80
|
"react": "^18.3.1",
|
|
77
81
|
"react-dom": "^18.3.1",
|
|
78
82
|
"rollup-plugin-preserve-directives": "^0.4.0",
|
|
79
|
-
"
|
|
80
|
-
"
|
|
83
|
+
"simple-git-hooks": "^2.11.1",
|
|
84
|
+
"start-server-and-test": "^2.0.8",
|
|
85
|
+
"typescript": "5.6.3",
|
|
86
|
+
"vite": "^5.4.11",
|
|
87
|
+
"vitest": "^2.1.8"
|
|
81
88
|
},
|
|
82
89
|
"babel": {
|
|
83
90
|
"presets": [
|
|
@@ -91,14 +98,10 @@
|
|
|
91
98
|
]
|
|
92
99
|
]
|
|
93
100
|
},
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
],
|
|
99
|
-
"transform": {
|
|
100
|
-
"^.+\\.js$": "babel-jest"
|
|
101
|
-
}
|
|
101
|
+
"commitlint": {
|
|
102
|
+
"extends": [
|
|
103
|
+
"@commitlint/config-conventional"
|
|
104
|
+
]
|
|
102
105
|
},
|
|
103
106
|
"release": {
|
|
104
107
|
"branches": [
|
|
@@ -107,5 +110,9 @@
|
|
|
107
110
|
},
|
|
108
111
|
"publishConfig": {
|
|
109
112
|
"access": "public"
|
|
113
|
+
},
|
|
114
|
+
"simple-git-hooks": {
|
|
115
|
+
"pre-commit": "pnpm lint",
|
|
116
|
+
"pre-push": "pnpm commitlint --last --verbose"
|
|
110
117
|
}
|
|
111
118
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { SbBlokData } from '../types';
|
|
3
|
-
interface StoryblokComponentProps {
|
|
4
|
-
blok: SbBlokData;
|
|
5
|
-
[key: string]: unknown;
|
|
6
|
-
}
|
|
7
|
-
declare const StoryblokComponent: React.ForwardRefExoticComponent<Omit<StoryblokComponentProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
8
|
-
export default StoryblokComponent;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { SbBlokData } from '../types';
|
|
3
|
-
interface SbServerComponentProps {
|
|
4
|
-
blok: SbBlokData;
|
|
5
|
-
[key: string]: unknown;
|
|
6
|
-
}
|
|
7
|
-
declare const StoryblokServerComponent: React.ForwardRefExoticComponent<Omit<SbServerComponentProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
8
|
-
export default StoryblokServerComponent;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ISbStoryData, StoryblokBridgeConfigV2 } from '../types';
|
|
3
|
-
interface StoryblokStoryProps {
|
|
4
|
-
story: ISbStoryData;
|
|
5
|
-
bridgeOptions: StoryblokBridgeConfigV2;
|
|
6
|
-
[key: string]: unknown;
|
|
7
|
-
}
|
|
8
|
-
declare const StoryblokStory: React.ForwardRefExoticComponent<Omit<StoryblokStoryProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
9
|
-
export default StoryblokStory;
|