@storyblok/react 3.0.13 → 3.0.15

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,11 +1,11 @@
1
- import { SbReactComponentsMap, SbReactSDKOptions, StoryblokClient } from "../types";
1
+ import type { SbReactComponentsMap, SbReactSDKOptions, StoryblokClient } from '../types';
2
2
  export declare const useStoryblokApi: () => StoryblokClient;
3
3
  export declare const setComponents: (newComponentsMap: SbReactComponentsMap) => SbReactComponentsMap;
4
4
  export declare const getComponent: (componentKey: string) => false | import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>;
5
5
  export declare const getEnableFallbackComponent: () => boolean;
6
6
  export declare const getCustomFallbackComponent: () => import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>;
7
7
  export declare const storyblokInit: (pluginOptions?: SbReactSDKOptions) => void;
8
- export { default as StoryblokComponent } from "./storyblok-component";
8
+ export * from '../types';
9
9
  export { useStoryblokApi as getStoryblokApi };
10
- export { storyblokEditable, apiPlugin, loadStoryblokBridge, useStoryblokBridge, registerStoryblokBridge, renderRichText, RichTextResolver, RichTextSchema, } from "@storyblok/js";
11
- export * from "../types";
10
+ export { default as StoryblokComponent } from './storyblok-component';
11
+ export { apiPlugin, loadStoryblokBridge, registerStoryblokBridge, renderRichText, RichTextResolver, RichTextSchema, storyblokEditable, useStoryblokBridge, } from '@storyblok/js';
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import type { SbBlokData } from "../types";
1
+ import React from 'react';
2
+ import type { SbBlokData } from '../types';
3
3
  interface StoryblokComponentProps {
4
4
  blok: SbBlokData;
5
5
  [key: string]: unknown;
@@ -1,6 +1,6 @@
1
- import { ISbStoriesParams, StoryblokBridgeConfigV2, ISbStoryData } from "./types";
1
+ import type { ISbStoriesParams, ISbStoryData, StoryblokBridgeConfigV2 } from './types';
2
2
  export declare const useStoryblok: (slug: string, apiOptions?: ISbStoriesParams, bridgeOptions?: StoryblokBridgeConfigV2) => ISbStoryData<import("@storyblok/js").StoryblokComponentType<string> & {
3
3
  [index: string]: any;
4
4
  }>;
5
- export * from "./common";
6
- export * from "./common/client";
5
+ export * from './common';
6
+ export * from './common/client';
@@ -1,4 +1,4 @@
1
- export * from "../common";
2
- export { default as StoryblokStory } from "../story";
3
- export { default as BridgeLoader } from "../bridge-loader";
4
- export { default as StoryblokBridgeLoader } from "../bridge-loader";
1
+ export { default as BridgeLoader } from '../bridge-loader';
2
+ export { default as StoryblokBridgeLoader } from '../bridge-loader';
3
+ export * from '../common';
4
+ export { default as StoryblokStory } from '../story';
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { ISbStoryData, StoryblokBridgeConfigV2 } from "./types";
1
+ import React from 'react';
2
+ import type { ISbStoryData, StoryblokBridgeConfigV2 } from './types';
3
3
  interface StoryblokStoryProps {
4
4
  story: ISbStoryData;
5
5
  bridgeOptions: StoryblokBridgeConfigV2;
@@ -1,6 +1,5 @@
1
- import React from "react";
2
- import { SbSDKOptions } from "@storyblok/js";
3
- import type { ISbStoryData, StoryblokBridgeConfigV2 } from "@storyblok/js";
1
+ import type React from 'react';
2
+ import type { ISbStoryData, SbSDKOptions, StoryblokBridgeConfigV2 } from '@storyblok/js';
4
3
  export interface SbReactComponentsMap {
5
4
  [key: string]: React.ElementType;
6
5
  }
@@ -10,4 +9,4 @@ export interface SbReactSDKOptions extends SbSDKOptions {
10
9
  customFallbackComponent?: React.ElementType;
11
10
  }
12
11
  export type TUseStoryblokState = <T = void>(initialStory: ISbStoryData<T> | null, bridgeOptions?: StoryblokBridgeConfigV2) => ISbStoryData<T> | null;
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";
12
+ export type { ArrayFn, AsyncFn, ISbAlternateObject, ISbCache, ISbConfig, ISbContentMangmntAPI, ISbDimensions, ISbError, ISbManagmentApiResult, ISbNode, ISbResponse, ISbResult, ISbRichtext, ISbSchema, ISbStories, ISbStoriesParams, ISbStory, ISbStoryData, ISbStoryParams, SbBlokData, SbBlokKeyDataTypes, SbRichTextOptions, SbSDKOptions, StoryblokBridgeConfigV2, StoryblokBridgeV2, StoryblokClient, StoryblokComponentType, ThrottleFn, useStoryblokBridge, } from '@storyblok/js';
package/package.json CHANGED
@@ -1,13 +1,16 @@
1
1
  {
2
2
  "name": "@storyblok/react",
3
- "version": "3.0.13",
3
+ "version": "3.0.15",
4
4
  "description": "SDK to integrate Storyblok into your project using React.",
5
- "main": "./dist/index.js",
6
- "module": "./dist/index.mjs",
7
- "types": "./dist/types/index.d.ts",
8
- "files": [
9
- "dist"
10
- ],
5
+ "author": "Storyblok",
6
+ "homepage": "https://github.com/storyblok/storyblok-react",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/storyblok/storyblok-react"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/storyblok/storyblok-react/issues"
13
+ },
11
14
  "exports": {
12
15
  ".": {
13
16
  "types": "./dist/types/index.d.ts",
@@ -30,6 +33,12 @@
30
33
  "require": "./dist/story.js"
31
34
  }
32
35
  },
36
+ "main": "./dist/index.js",
37
+ "module": "./dist/index.mjs",
38
+ "types": "./dist/types/index.d.ts",
39
+ "files": [
40
+ "dist"
41
+ ],
33
42
  "scripts": {
34
43
  "dev": "vite build --watch",
35
44
  "build": "vite build && tsc --project tsconfig.json",
@@ -43,31 +52,31 @@
43
52
  "test:comp": "cypress run-ct",
44
53
  "prepublishOnly": "npm run build && cp ../README.md ./"
45
54
  },
55
+ "peerDependencies": {
56
+ "react": "^17.0.0 || ^18.0.0",
57
+ "react-dom": "^17.0.0 || ^18.0.0"
58
+ },
46
59
  "dependencies": {
47
- "@storyblok/js": "^3.0.12"
60
+ "@storyblok/js": "^3.1.1"
48
61
  },
49
62
  "devDependencies": {
50
63
  "@babel/core": "^7.25.2",
51
64
  "@babel/preset-env": "^7.25.4",
52
65
  "@cypress/react": "^8.0.2",
53
- "@cypress/vite-dev-server": "^5.1.1",
66
+ "@cypress/vite-dev-server": "^5.2.0",
54
67
  "@tsconfig/recommended": "^1.0.7",
55
68
  "@types/react": "18.3.4",
56
69
  "@vitejs/plugin-react": "^4.3.1",
57
70
  "babel-jest": "^29.7.0",
58
- "cypress": "^13.13.3",
71
+ "cypress": "^13.14.2",
59
72
  "eslint-plugin-cypress": "^3.5.0",
60
- "eslint-plugin-jest": "^28.8.0",
73
+ "eslint-plugin-jest": "^28.8.3",
61
74
  "jest": "^29.7.0",
62
75
  "react": "^18.3.1",
63
76
  "react-dom": "^18.3.1",
64
77
  "rollup-plugin-preserve-directives": "^0.4.0",
65
78
  "start-server-and-test": "^2.0.5",
66
- "vite": "^5.4.2"
67
- },
68
- "peerDependencies": {
69
- "react": "^17.0.0 || ^18.0.0",
70
- "react-dom": "^17.0.0 || ^18.0.0"
79
+ "vite": "^5.4.3"
71
80
  },
72
81
  "babel": {
73
82
  "presets": [
@@ -95,15 +104,6 @@
95
104
  "main"
96
105
  ]
97
106
  },
98
- "repository": {
99
- "type": "git",
100
- "url": "https://github.com/storyblok/storyblok-react"
101
- },
102
- "author": "Storyblok",
103
- "bugs": {
104
- "url": "https://github.com/storyblok/storyblok-react/issues"
105
- },
106
- "homepage": "https://github.com/storyblok/storyblok-react",
107
107
  "publishConfig": {
108
108
  "access": "public"
109
109
  }