@storyblok/react 1.3.4 → 2.0.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.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import type { SbBlokData } from "../types";
|
|
3
3
|
interface StoryblokComponentProps {
|
|
4
4
|
blok: SbBlokData;
|
|
5
5
|
[key: string]: unknown;
|
|
6
6
|
}
|
|
7
|
-
declare const StoryblokComponent:
|
|
7
|
+
declare const StoryblokComponent: React.ForwardRefExoticComponent<Pick<StoryblokComponentProps, keyof StoryblokComponentProps> & React.RefAttributes<HTMLElement>>;
|
|
8
8
|
export default StoryblokComponent;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SbReactSDKOptions,
|
|
2
|
+
import { SbReactSDKOptions, ISbStoriesParams, StoryblokBridgeConfigV2, StoryblokClient, ISbStoryData } from "./types";
|
|
3
3
|
export { default as StoryblokComponent } from "./components/storyblok-component";
|
|
4
|
-
export { storyblokEditable, apiPlugin, useStoryblokBridge, registerStoryblokBridge, renderRichText, RichTextSchema, } from "@storyblok/js";
|
|
5
|
-
export declare const useStoryblok: (slug: string, apiOptions?:
|
|
4
|
+
export { storyblokEditable, apiPlugin, useStoryblokBridge, registerStoryblokBridge, renderRichText, RichTextResolver, RichTextSchema, } from "@storyblok/js";
|
|
5
|
+
export declare const useStoryblok: (slug: string, apiOptions?: ISbStoriesParams, bridgeOptions?: StoryblokBridgeConfigV2) => ISbStoryData<import("@storyblok/js").StoryblokComponentType<string> & {
|
|
6
6
|
[index: string]: any;
|
|
7
7
|
}>;
|
|
8
|
-
export declare const useStoryblokState: <T = void>(initialStory?:
|
|
8
|
+
export declare const useStoryblokState: <T = void>(initialStory?: ISbStoryData<T>, bridgeOptions?: StoryblokBridgeConfigV2) => ISbStoryData<T>;
|
|
9
9
|
export declare const useStoryblokApi: () => StoryblokClient;
|
|
10
10
|
export { useStoryblokApi as getStoryblokApi };
|
|
11
11
|
export declare const getComponent: (componentKey: string) => false | import("react").ElementType<any>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export interface SbReactComponentsMap {
|
|
|
6
6
|
export interface SbReactSDKOptions extends SbSDKOptions {
|
|
7
7
|
components?: SbReactComponentsMap;
|
|
8
8
|
}
|
|
9
|
-
export type {
|
|
9
|
+
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": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "SDK to integrate Storyblok into your project using React.",
|
|
5
5
|
"main": "./dist/storyblok-react.js",
|
|
6
6
|
"module": "./dist/storyblok-react.mjs",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"prepublishOnly": "npm run build && cp ../README.md ./"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@storyblok/js": "^
|
|
27
|
+
"@storyblok/js": "^2.0.5"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@babel/core": "^7.20.5",
|