@storyblok/react
Advanced tools
Comparing version 2.2.1 to 2.3.0
export * from "../common"; | ||
export { default as StoryblokStory } from "../story"; | ||
export { default as BridgeLoader } from "../bridge-loader"; |
{ | ||
"name": "@storyblok/react", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "SDK to integrate Storyblok into your project using React.", | ||
"main": "./dist/storyblok-react.js", | ||
"module": "./dist/storyblok-react.mjs", | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/types/index.d.ts", | ||
@@ -14,19 +14,19 @@ "files": [ | ||
"types": "./dist/types/index.d.ts", | ||
"import": "./dist/storyblok-react.mjs", | ||
"require": "./dist/storyblok-react.js" | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.js" | ||
}, | ||
"./rsc": { | ||
"types": "./dist/types/rsc/index.d.ts", | ||
"import": "./dist/storyblok-react2.mjs", | ||
"require": "./dist/storyblok-react2.js" | ||
"import": "./dist/rsc.mjs", | ||
"require": "./dist/rsc.js" | ||
}, | ||
"./bridge-loader": { | ||
"types": "./dist/types/bridge-loader.d.ts", | ||
"import": "./dist/storyblok-react3.mjs", | ||
"require": "./dist/storyblok-react3.js" | ||
"import": "./dist/bridge-loader.mjs", | ||
"require": "./dist/bridge-loader.js" | ||
}, | ||
"./story": { | ||
"types": "./dist/types/story.d.ts", | ||
"import": "./dist/storyblok-react4.mjs", | ||
"require": "./dist/storyblok-react4.js" | ||
"import": "./dist/story.mjs", | ||
"require": "./dist/story.js" | ||
} | ||
@@ -56,14 +56,14 @@ }, | ||
"@tsconfig/recommended": "^1.0.2", | ||
"@types/react": "18.2.16", | ||
"@vitejs/plugin-react": "^4.0.3", | ||
"babel-jest": "^29.6.1", | ||
"@types/react": "18.2.18", | ||
"@vitejs/plugin-react": "^4.0.4", | ||
"babel-jest": "^29.6.2", | ||
"cypress": "^9.7.0", | ||
"eslint-plugin-cypress": "^2.13.3", | ||
"eslint-plugin-jest": "^27.2.3", | ||
"jest": "^29.6.1", | ||
"jest": "^29.6.2", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"rollup-plugin-preserve-directives": "^0.2.0", | ||
"start-server-and-test": "^2.0.0", | ||
"terser": "^5.19.2", | ||
"vite": "^4.1.4" | ||
"vite": "^4.4.7" | ||
}, | ||
@@ -70,0 +70,0 @@ "peerDependencies": { |
@@ -256,4 +256,3 @@ <div align="center"> | ||
```js | ||
import { getStoryblokApi } from "@storyblok/react/rsc"; | ||
import StoryblokStory from "@storyblok/react/story"; | ||
import { getStoryblokApi, StoryblokStory } from "@storyblok/react/rsc"; | ||
@@ -276,5 +275,6 @@ export default async function Home() { | ||
`StoryblokStory` keeps the state for thet story behind the scenes and uses `StoryblokComponent` to render the route components dynamically, using the list of components loaded during the initialization inside the `storyblokInit` function. You can use the `StoryblokComponent` inside the components to render the nested components dynamically. You can also pass bridge options to `StoryblokStory` using the prop `bridgeOptions`. | ||
`StoryblokStory` keeps the state for thet story behind the scenes and uses `StoryblokComponent` to render the route components dynamically, using the list of components loaded during the initialization inside the `storyblokInit` function. You can use the `StoryblokComponent` inside the components to render the nested components dynamically. You can also pass bridge options to `StoryblokStory` using the prop `bridgeOptions`. | ||
```js | ||
<StoryblokStory story={data.story} bridgeOptions={bridgeOptions} /> | ||
<StoryblokStory story={data.story} bridgeOptions={bridgeOptions} /> | ||
``` | ||
@@ -300,4 +300,3 @@ | ||
```js | ||
import { storyblokInit, apiPlugin } from "@storyblok/react/rsc"; | ||
import StoryblokBridgeLoader from "@storyblok/react/bridge-loader"; | ||
import { storyblokInit, apiPlugin, StoryblokBridgeLoader } from "@storyblok/react/rsc"; | ||
@@ -487,3 +486,3 @@ import Page from "../components/Page"; | ||
+ }) | ||
const story = useStoryblokState(initialStory); | ||
@@ -490,0 +489,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 3 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 4 instances in 1 package
89496
26
1204
618