@storyblok/js 1.6.3 → 1.6.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
- import { SbSDKOptions, StoryblokBridgeConfigV2, StoryData, SbInitResult } from "./types";
2
- export declare const useStoryblokBridge: (id: Number, cb: (newStory: StoryData) => void, options?: StoryblokBridgeConfigV2) => void;
1
+ import { SbSDKOptions, StoryblokBridgeConfigV2, StoryData, SbInitResult, StoryblokComponentType } from "./types";
2
+ export declare const useStoryblokBridge: <T extends StoryblokComponentType<string> = any>(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;
@@ -3,7 +3,9 @@ export declare type StoryblokClient = StoryblokJSClient;
3
3
  declare global {
4
4
  interface Window {
5
5
  storyblokRegisterEvent: (cb: Function) => void;
6
- StoryblokBridge: (options?: StoryblokBridgeConfigV2) => void;
6
+ StoryblokBridge: {
7
+ new (options?: StoryblokBridgeConfigV2): StoryblokBridgeV2;
8
+ };
7
9
  }
8
10
  }
9
11
  export interface SbInitResult {
@@ -17,11 +19,11 @@ export interface SbBlokData extends StoryblokComponent<string> {
17
19
  export interface SbSDKOptions {
18
20
  bridge?: boolean;
19
21
  accessToken?: string;
20
- use?: [any];
22
+ use?: any[];
21
23
  apiOptions?: StoryblokConfig;
22
24
  }
23
25
  export interface StoryblokBridgeConfigV2 {
24
- resolveRelations?: [string];
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",
3
+ "version": "1.6.6",
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,8 +30,8 @@
30
30
  "storyblok-js-client": "^4.5.6"
31
31
  },
32
32
  "devDependencies": {
33
- "@babel/core": "^7.18.6",
34
- "@babel/preset-env": "^7.18.6",
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",