@storyblok/js 1.6.2 → 1.6.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types.d.ts +6 -4
- package/package.json +5 -5
package/dist/types/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SbSDKOptions, StoryblokBridgeConfigV2, StoryData, SbInitResult } from "./types";
|
2
|
-
export declare const useStoryblokBridge: (id: Number, cb: (newStory: StoryData) => void, options?: StoryblokBridgeConfigV2) => void;
|
2
|
+
export declare const useStoryblokBridge: <T = void>(id: Number, cb: (newStory: StoryData<T>) => void, options?: StoryblokBridgeConfigV2) => void;
|
3
3
|
export { default as apiPlugin } from "./modules/api";
|
4
4
|
export { default as storyblokEditable } from "./modules/editable";
|
5
5
|
export declare const storyblokInit: (pluginOptions?: SbSDKOptions) => SbInitResult;
|
package/dist/types/types.d.ts
CHANGED
@@ -3,25 +3,27 @@ export declare type StoryblokClient = StoryblokJSClient;
|
|
3
3
|
declare global {
|
4
4
|
interface Window {
|
5
5
|
storyblokRegisterEvent: (cb: Function) => void;
|
6
|
-
StoryblokBridge:
|
6
|
+
StoryblokBridge: {
|
7
|
+
new (options?: StoryblokBridgeConfigV2): StoryblokBridgeV2;
|
8
|
+
};
|
7
9
|
}
|
8
10
|
}
|
9
11
|
export interface SbInitResult {
|
10
12
|
storyblokApi?: StoryblokClient;
|
11
13
|
}
|
12
14
|
export declare type SbPluginFactory = (options: SbSDKOptions) => any;
|
13
|
-
export declare type SbBlokKeyDataTypes = string | number | object;
|
15
|
+
export declare type SbBlokKeyDataTypes = string | number | object | boolean;
|
14
16
|
export interface SbBlokData extends StoryblokComponent<string> {
|
15
17
|
[index: string]: SbBlokKeyDataTypes;
|
16
18
|
}
|
17
19
|
export interface SbSDKOptions {
|
18
20
|
bridge?: boolean;
|
19
21
|
accessToken?: string;
|
20
|
-
use?: [
|
22
|
+
use?: any[];
|
21
23
|
apiOptions?: StoryblokConfig;
|
22
24
|
}
|
23
25
|
export interface StoryblokBridgeConfigV2 {
|
24
|
-
resolveRelations?: [
|
26
|
+
resolveRelations?: string[];
|
25
27
|
customParent?: string;
|
26
28
|
preventClicks?: boolean;
|
27
29
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storyblok/js",
|
3
|
-
"version": "1.6.
|
3
|
+
"version": "1.6.5",
|
4
4
|
"description": "SDK to integrate Storyblok into your project using JavaScript.",
|
5
5
|
"main": "./dist/storyblok-js.js",
|
6
6
|
"module": "./dist/storyblok-js.mjs",
|
@@ -30,14 +30,14 @@
|
|
30
30
|
"storyblok-js-client": "^4.5.6"
|
31
31
|
},
|
32
32
|
"devDependencies": {
|
33
|
-
"@babel/core": "^7.18.
|
34
|
-
"@babel/preset-env": "^7.18.
|
33
|
+
"@babel/core": "^7.18.9",
|
34
|
+
"@babel/preset-env": "^7.18.9",
|
35
35
|
"@tsconfig/recommended": "^1.0.1",
|
36
36
|
"babel-jest": "^28.1.0",
|
37
37
|
"cypress": "^9.6.1",
|
38
38
|
"eslint-plugin-cypress": "^2.12.1",
|
39
|
-
"eslint-plugin-jest": "^26.
|
40
|
-
"jest": "^28.1.
|
39
|
+
"eslint-plugin-jest": "^26.6.0",
|
40
|
+
"jest": "^28.1.3",
|
41
41
|
"jest-console": "^0.1.0",
|
42
42
|
"start-server-and-test": "^1.14.0",
|
43
43
|
"vite": "^2.9.13"
|