@storyblok/react 2.3.4 → 2.4.1

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.
@@ -3,6 +3,8 @@ import { SbReactComponentsMap, SbReactSDKOptions, StoryblokClient } from "../typ
3
3
  export declare const useStoryblokApi: () => StoryblokClient;
4
4
  export declare const setComponents: (newComponentsMap: SbReactComponentsMap) => SbReactComponentsMap;
5
5
  export declare const getComponent: (componentKey: string) => false | import("react").ElementType<any>;
6
+ export declare const getEnableFallbackComponent: () => boolean;
7
+ export declare const getCustomFallbackComponent: () => import("react").ElementType<any>;
6
8
  export declare const storyblokInit: (pluginOptions?: SbReactSDKOptions) => void;
7
9
  export { default as StoryblokComponent } from "./storyblok-component";
8
10
  export { useStoryblokApi as getStoryblokApi };
@@ -6,6 +6,8 @@ export interface SbReactComponentsMap {
6
6
  }
7
7
  export interface SbReactSDKOptions extends SbSDKOptions {
8
8
  components?: SbReactComponentsMap;
9
+ enableFallbackComponent?: boolean;
10
+ customFallbackComponent?: React.ElementType;
9
11
  }
10
12
  export type TUseStoryblokState = <T = void>(initialStory: ISbStoryData<T> | null, bridgeOptions?: StoryblokBridgeConfigV2) => ISbStoryData<T> | null;
11
13
  export type { ISbConfig, ISbCache, ISbResult, ISbResponse, ISbError, ISbNode, ISbSchema, ThrottleFn, AsyncFn, ArrayFn, ISbContentMangmntAPI, ISbManagmentApiResult, ISbStories, ISbStory, ISbDimensions, ISbStoryData, ISbAlternateObject, ISbStoriesParams, ISbStoryParams, ISbRichtext, SbBlokData, SbBlokKeyDataTypes, SbRichTextOptions, SbSDKOptions, StoryblokBridgeConfigV2, StoryblokBridgeV2, StoryblokClient, StoryblokComponentType, useStoryblokBridge, } from "@storyblok/js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyblok/react",
3
- "version": "2.3.4",
3
+ "version": "2.4.1",
4
4
  "description": "SDK to integrate Storyblok into your project using React.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -44,26 +44,26 @@
44
44
  "prepublishOnly": "npm run build && cp ../README.md ./"
45
45
  },
46
46
  "dependencies": {
47
- "@storyblok/js": "^2.2.7"
47
+ "@storyblok/js": "^2.2.8"
48
48
  },
49
49
  "devDependencies": {
50
- "@babel/core": "^7.22.9",
51
- "@babel/preset-env": "^7.22.9",
50
+ "@babel/core": "^7.22.10",
51
+ "@babel/preset-env": "^7.22.10",
52
52
  "@cypress/react": "^5.12.5",
53
53
  "@cypress/vite-dev-server": "^2.2.3",
54
54
  "@tsconfig/recommended": "^1.0.2",
55
- "@types/react": "18.2.18",
55
+ "@types/react": "18.2.19",
56
56
  "@vitejs/plugin-react": "^4.0.4",
57
57
  "babel-jest": "^29.6.2",
58
58
  "cypress": "^9.7.0",
59
- "eslint-plugin-cypress": "^2.13.3",
59
+ "eslint-plugin-cypress": "^2.14.0",
60
60
  "eslint-plugin-jest": "^27.2.3",
61
61
  "jest": "^29.6.2",
62
62
  "react": "^18.2.0",
63
63
  "react-dom": "^18.2.0",
64
64
  "rollup-plugin-preserve-directives": "^0.2.0",
65
65
  "start-server-and-test": "^2.0.0",
66
- "vite": "^4.4.8"
66
+ "vite": "^4.4.9"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "react": "^17.0.0 || ^18.0.0",