@storyblok/react
Advanced tools
Comparing version 2.1.5 to 2.1.6
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),o=require("./storyblok-js-1cafaa66.js"),t=require("./index-c2e3dd49.js"),r=require("./client-85627252.js");exports.RichTextResolver=o.y,exports.RichTextSchema=o.ie,exports.apiPlugin=o.ce,exports.loadStoryblokBridge=o.ge,exports.registerStoryblokBridge=o.ue,exports.renderRichText=o.de,exports.storyblokEditable=o.he,exports.useStoryblokBridge=o.ue,exports.StoryblokComponent=t.StoryblokComponent,exports.getComponent=t.getComponent,exports.getStoryblokApi=t.useStoryblokApi,exports.storyblokInit=t.storyblokInit,exports.useStoryblokApi=t.useStoryblokApi,exports.useStoryblokState=r.useStoryblokState,exports.useStoryblok=(r,s={},i={})=>{const n=t.useStoryblokApi();if(!n)return console.error("You can't use useStoryblok if you're not loading apiPlugin."),null;let[l,u]=e.useState({});const p="undefined"!=typeof window&&void 0!==window.storyblokRegisterEvent;return e.useEffect((()=>{(async()=>{const{data:e}=await n.get(`cdn/stories/${r}`,s);u(e.story)})()}),[r,s]),e.useEffect((()=>{p&&l.id&&o.ue(l.id,(e=>u(e)),i)}),[l]),l}; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),o=require("./storyblok-js-1cafaa66.js"),t=require("./index-c2e3dd49.js"),r=require("./client-c97d457f.js");exports.RichTextResolver=o.y,exports.RichTextSchema=o.ie,exports.apiPlugin=o.ce,exports.loadStoryblokBridge=o.ge,exports.registerStoryblokBridge=o.ue,exports.renderRichText=o.de,exports.storyblokEditable=o.he,exports.useStoryblokBridge=o.ue,exports.StoryblokComponent=t.StoryblokComponent,exports.getComponent=t.getComponent,exports.getStoryblokApi=t.useStoryblokApi,exports.storyblokInit=t.storyblokInit,exports.useStoryblokApi=t.useStoryblokApi,exports.useStoryblokState=r.useStoryblokState,exports.useStoryblok=(r,s={},i={})=>{const n=t.useStoryblokApi();if(!n)return console.error("You can't use useStoryblok if you're not loading apiPlugin."),null;let[l,u]=e.useState({});const p="undefined"!=typeof window&&void 0!==window.storyblokRegisterEvent;return e.useEffect((()=>{!async function(){const{data:e}=await n.get(`cdn/stories/${r}`,s);u(e.story),p&&e.story.id&&o.ue(e.story.id,(e=>u(e)),i)}()}),[r,JSON.stringify(s)]),l}; |
@@ -1,1 +0,1 @@ | ||
"use strict";"use client";const e=require("react"),t=require("./client-85627252.js"),r=require("./index-c2e3dd49.js");require("./storyblok-js-1cafaa66.js");module.exports=({story:o})=>(o=t.useStoryblokState(o),e.createElement(r.StoryblokComponent,{blok:o.content})); | ||
"use strict";"use client";const e=require("react"),r=require("./client-c97d457f.js"),t=require("./index-c2e3dd49.js");require("./storyblok-js-1cafaa66.js");const o=e.forwardRef((({story:o,...s},n)=>(o=r.useStoryblokState(o),e.createElement(t.StoryblokComponent,{ref:n,blok:o.content,...s}))));module.exports=o; |
@@ -7,3 +7,3 @@ import React from "react"; | ||
} | ||
declare const StoryblokStory: ({ story }: StoryblokStoryProps) => React.JSX.Element; | ||
declare const StoryblokStory: React.ForwardRefExoticComponent<Omit<StoryblokStoryProps, "ref"> & React.RefAttributes<HTMLElement>>; | ||
export default StoryblokStory; |
{ | ||
"name": "@storyblok/react", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"description": "SDK to integrate Storyblok into your project using React.", | ||
@@ -55,8 +55,8 @@ "main": "./dist/storyblok-react.js", | ||
"@tsconfig/recommended": "^1.0.2", | ||
"@types/react": "18.2.12", | ||
"@vitejs/plugin-react": "^4.0.0", | ||
"@types/react": "18.2.13", | ||
"@vitejs/plugin-react": "^4.0.1", | ||
"babel-jest": "^29.5.0", | ||
"cypress": "^9.7.0", | ||
"eslint-plugin-cypress": "^2.13.3", | ||
"eslint-plugin-jest": "^27.2.1", | ||
"eslint-plugin-jest": "^27.2.2", | ||
"jest": "^29.5.0", | ||
@@ -66,3 +66,3 @@ "react": "^18.2.0", | ||
"start-server-and-test": "^2.0.0", | ||
"terser": "^5.18.0", | ||
"terser": "^5.18.1", | ||
"vite": "^4.1.4" | ||
@@ -69,0 +69,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
85229
1177
2
5