@builder.io/sdk-react-nextjs 0.12.2 → 0.12.4
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.
- package/lib/{node/USE_CLIENT_BUNDLE-d30db795.js → browser/USE_CLIENT_BUNDLE-e6d429be.js} +212 -215
- package/lib/browser/{USE_CLIENT_BUNDLE-4b1b3c99.cjs → USE_CLIENT_BUNDLE-e9e1ee85.cjs} +3 -5
- package/lib/{edge/USE_SERVER_BUNDLE-70c27ea1.js → browser/USE_SERVER_BUNDLE-44c49b1e.js} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-f0eeb33e.cjs → browser/USE_SERVER_BUNDLE-9bcc0ad4.cjs} +1 -1
- package/lib/browser/bundle-0e5cec1c.cjs +168 -0
- package/lib/browser/{bundle-d905bf70.js → bundle-bab67847.js} +577 -516
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +14 -14
- package/lib/{browser/USE_CLIENT_BUNDLE-550679f9.js → edge/USE_CLIENT_BUNDLE-8d251b8b.js} +212 -215
- package/lib/{node/USE_CLIENT_BUNDLE-def5165a.cjs → edge/USE_CLIENT_BUNDLE-d87c391a.cjs} +3 -5
- package/lib/{node/USE_SERVER_BUNDLE-a5db98bc.cjs → edge/USE_SERVER_BUNDLE-816ab6e4.cjs} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-610c83b3.js → edge/USE_SERVER_BUNDLE-c0911af0.js} +1 -1
- package/lib/edge/{bundle-834dbf29.js → bundle-28d9d04c.js} +1022 -961
- package/lib/edge/{bundle-25fa71b1.cjs → bundle-e64fe0fd.cjs} +37 -37
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +14 -14
- package/lib/{edge/USE_CLIENT_BUNDLE-aa38a343.js → node/USE_CLIENT_BUNDLE-75f921e2.js} +212 -215
- package/lib/{edge/USE_CLIENT_BUNDLE-edb18eb8.cjs → node/USE_CLIENT_BUNDLE-ee5a9d6f.cjs} +3 -5
- package/lib/{browser/USE_SERVER_BUNDLE-6234c5ea.cjs → node/USE_SERVER_BUNDLE-793c12c9.cjs} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-464dccd7.js → node/USE_SERVER_BUNDLE-86d90afe.js} +1 -1
- package/lib/node/{bundle-1f73ead0.js → bundle-031e3608.js} +352 -291
- package/lib/node/{bundle-4efd9623.cjs → bundle-72df28b3.cjs} +10 -10
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +14 -14
- package/package.json +1 -1
- package/types/cjs/blocks/button/button.types.d.ts +2 -1
- package/types/cjs/blocks/columns/columns.types.d.ts +3 -3
- package/types/cjs/blocks/symbol/symbol.types.d.ts +2 -2
- package/types/cjs/components/block/block.d.ts +1 -0
- package/types/cjs/components/block/components/block-wrapper.d.ts +1 -0
- package/types/cjs/components/block/components/component-ref/component-ref.helpers.d.ts +8 -1
- package/types/cjs/components/block/components/repeated-block.d.ts +3 -5
- package/types/cjs/components/blocks/blocks.types.d.ts +1 -0
- package/types/cjs/components/content-variants/content-variants.types.d.ts +6 -2
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/get-block-properties.d.ts +5 -1
- package/types/cjs/functions/get-class-prop-name.d.ts +1 -0
- package/types/cjs/functions/get-style.d.ts +12 -0
- package/types/cjs/functions/transform-block-properties.d.ts +7 -5
- package/types/cjs/functions/transform-style-property.d.ts +7 -0
- package/types/cjs/types/builder-block.d.ts +1 -0
- package/types/cjs/types/builder-props.d.ts +3 -0
- package/types/esm/blocks/button/button.types.d.ts +2 -1
- package/types/esm/blocks/columns/columns.types.d.ts +3 -3
- package/types/esm/blocks/symbol/symbol.types.d.ts +2 -2
- package/types/esm/components/block/block.d.ts +1 -0
- package/types/esm/components/block/components/block-wrapper.d.ts +1 -0
- package/types/esm/components/block/components/component-ref/component-ref.helpers.d.ts +8 -1
- package/types/esm/components/block/components/repeated-block.d.ts +3 -5
- package/types/esm/components/blocks/blocks.types.d.ts +1 -0
- package/types/esm/components/content-variants/content-variants.types.d.ts +6 -2
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/get-block-properties.d.ts +5 -1
- package/types/esm/functions/get-class-prop-name.d.ts +1 -0
- package/types/esm/functions/get-style.d.ts +12 -0
- package/types/esm/functions/transform-block-properties.d.ts +7 -5
- package/types/esm/functions/transform-style-property.d.ts +7 -0
- package/types/esm/types/builder-block.d.ts +1 -0
- package/types/esm/types/builder-props.d.ts +3 -0
- package/lib/browser/bundle-1d763be7.cjs +0 -168
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
"use client";"use strict";const t=require("react/jsx-runtime"),a=require("./bundle-
|
|
2
|
-
all: unset;
|
|
3
|
-
}`})]})}function H(e){return t.jsx(t.Fragment,{children:a.isEmptyElement(e.TagName)?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):t.jsx(t.Fragment,{children:typeof e.TagName=="string"?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}function U(e){return t.jsx(H,{TagName:e.Wrapper,attributes:a.getBlockProperties({block:e.block,context:e.context}),actionAttributes:a.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function O(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...a.getBlockProperties({block:e.block,context:e.context}),...a.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}function J(e){function l(){var s;return"builder-blocks"+((s=e.blocks)!=null&&s.length?"":" no-blocks")}function g(){var s,m;a.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((m=window.parent)==null||m.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function S(){var s,m;a.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((m=window.parent)==null||m.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx(e.BlocksWrapper,{className:l()+" props-blocks-wrapper-4f2c12d8","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:s=>g(),onMouseEnter:s=>S(),onKeyPress:s=>g(),...e.BlocksWrapperProps,children:e.children}),t.jsx("style",{children:`.props-blocks-wrapper-4f2c12d8 {
|
|
1
|
+
"use client";"use strict";const t=require("react/jsx-runtime"),a=require("./bundle-72df28b3.cjs"),r=require("react"),M=require("./USE_SERVER_BUNDLE-793c12c9.cjs"),V=require("next/navigation");function E(e){return t.jsx(t.Fragment,{children:a.isEmptyElement(e.TagName)?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):t.jsx(t.Fragment,{children:typeof e.TagName=="string"?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}function H(e){return t.jsx(E,{TagName:e.link?e.builderLinkComponent||"a":"button",attributes:{...e.attributes,[a.getClassPropName()]:`${e.link?"":"builder-button"} ${e.attributes[a.getClassPropName()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},actionAttributes:{},children:e.text})}function U(e){return t.jsx(E,{TagName:e.Wrapper,attributes:a.getBlockProperties({block:e.block,context:e.context}),actionAttributes:a.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function $(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...a.getBlockProperties({block:e.block,context:e.context}),...a.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}function O(e){function l(){var s;return"builder-blocks"+((s=e.blocks)!=null&&s.length?"":" no-blocks")}function g(){var s,m;a.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((m=window.parent)==null||m.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function S(){var s,m;a.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((m=window.parent)==null||m.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx(e.BlocksWrapper,{className:l()+" props-blocks-wrapper-4f2c12d8","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:s=>g(),onMouseEnter:s=>S(),onKeyPress:s=>g(),...e.BlocksWrapperProps,children:e.children}),t.jsx("style",{children:`.props-blocks-wrapper-4f2c12d8 {
|
|
4
2
|
display: flex;
|
|
5
3
|
flex-direction: column;
|
|
6
4
|
align-items: stretch;
|
|
7
|
-
}`})]})}function
|
|
5
|
+
}`})]})}function J(e){return t.jsx("span",{children:e.children})}function G(e){var s,m,x,v;function l(){var f;const d=e.image||e.src;if(!d||!(d.match(/builder\.io/)||d.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((f=e.image)!=null&&f.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),a.getSrcSet(d)}else if(e.image&&!e.srcset)return a.getSrcSet(d);return a.getSrcSet(d)}function g(){var h;return(h=l==null?void 0:l())!=null&&h.match(/builder\.io/)&&!e.noWebp?l().replace(/\?/g,"?format=webp&"):""}function S(){const h={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?h:void 0}return t.jsxs(t.Fragment,{children:[t.jsxs(t.Fragment,{children:[t.jsxs("picture",{children:[g()?t.jsx(t.Fragment,{children:t.jsx("source",{type:"image/webp",srcSet:g()})}):null,t.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...S()},className:"builder-image"+(e.className?" "+e.className:"")+" img-40c70c9b",src:e.image,srcSet:l(),sizes:e.sizes})]}),e.aspectRatio&&!((m=(s=e.builderBlock)==null?void 0:s.children)!=null&&m.length&&e.fitContent)?t.jsx(t.Fragment,{children:t.jsx("div",{className:"builder-image-sizer div-40c70c9b",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(v=(x=e.builderBlock)==null?void 0:x.children)!=null&&v.length&&e.fitContent?t.jsx(t.Fragment,{children:e.children}):null,!e.fitContent&&e.children?t.jsx(t.Fragment,{children:t.jsx("div",{className:"div-40c70c9b-2",children:e.children})}):null]}),t.jsx("style",{children:`.img-40c70c9b {
|
|
8
6
|
opacity: 1;
|
|
9
7
|
transition: opacity 0.2s ease-in-out;
|
|
10
8
|
}.div-40c70c9b {
|
|
@@ -20,4 +18,4 @@
|
|
|
20
18
|
left: 0;
|
|
21
19
|
width: 100%;
|
|
22
20
|
height: 100%;
|
|
23
|
-
}`})]})}function Q(e){return t.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}function X(e){const l=r.useRef(null),[g,S]=r.useState(()=>[]),[s,m]=r.useState(()=>[]);return r.useEffect(()=>{var v;if(!((v=l.current)!=null&&v.getElementsByTagName)||typeof window>"u")return;const x=l.current.getElementsByTagName("script");for(let
|
|
21
|
+
}`})]})}function Q(e){return t.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}function X(e){const l=r.useRef(null),[g,S]=r.useState(()=>[]),[s,m]=r.useState(()=>[]);return r.useEffect(()=>{var v;if(!((v=l.current)!=null&&v.getElementsByTagName)||typeof window>"u")return;const x=l.current.getElementsByTagName("script");for(let h=0;h<x.length;h++){const d=x[h];if(d.src){if(g.includes(d.src))continue;g.push(d.src);const f=document.createElement("script");f.async=!0,f.src=d.src,document.head.appendChild(f)}else if(!d.type||["text/javascript","application/javascript","application/ecmascript"].includes(d.type)){if(s.includes(d.innerText))continue;try{s.push(d.innerText),new Function(d.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),t.jsx("div",{ref:l,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}function Y(e){const l=r.useRef(null),[g,S]=r.useState(()=>[]),[s,m]=r.useState(()=>[]),[x,v]=r.useState(()=>!1);function h(){if(!l.current||!l.current.getElementsByTagName)return;const d=l.current.getElementsByTagName("script");for(let f=0;f<d.length;f++){const k=d[f];if(k.src&&!g.includes(k.src)){g.push(k.src);const y=document.createElement("script");y.async=!0,y.src=k.src,document.head.appendChild(y)}else if(a.isJsScript(k)&&!s.includes(k.innerText))try{s.push(k.innerText),new Function(k.innerText)()}catch(y){console.warn("`Embed`: Error running script:",y)}}}return r.useEffect(()=>{l.current&&!x&&(v(!0),h())},[l.current,x]),t.jsx("div",{className:"builder-embed",ref:l,dangerouslySetInnerHTML:{__html:e.content}})}function Z(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},a.isEditing()&&e.imgSrc||"default-key")}function p(e){var S,s,m,x,v,h,d;function l(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function g(){return{...l()}}return t.jsxs("div",{style:{position:"relative"},children:[t.jsx("video",{className:"builder-video",...g(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(S=e.attributes)==null?void 0:S.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:t.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((m=(s=e.builderBlock)==null?void 0:s.children)!=null&&m.length))?t.jsx(t.Fragment,{children:t.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(v=(x=e.builderBlock)==null?void 0:x.children)!=null&&v.length&&e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children})}):null,(d=(h=e.builderBlock)==null?void 0:h.children)!=null&&d.length&&!e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children})}):null]})}const ee=r.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}});function te(e){var P,T,B,N,F,L,W;const l=r.useRef(null),[g,S]=r.useState(()=>0);r.useState(()=>!0);function s(n){var c,o;const i={...e.builderContextSignal.rootState,...n};e.builderContextSignal.rootSetState?(o=(c=e.builderContextSignal).rootSetState)==null||o.call(c,i):e.builderContextSignal.rootState=i}function m(n){var c,o,u,b,K;const i={...e.builderContextSignal.content,...n,data:{...(c=e.builderContextSignal.content)==null?void 0:c.data,...n==null?void 0:n.data},meta:{...(o=e.builderContextSignal.content)==null?void 0:o.meta,...n==null?void 0:n.meta,breakpoints:((u=n==null?void 0:n.meta)==null?void 0:u.breakpoints)||((K=(b=e.builderContextSignal.content)==null?void 0:b.meta)==null?void 0:K.breakpoints)}};M.postPreviewContent({value:i,key:i.id}).then(()=>{D.refresh()})}r.useState(()=>0);const[x,v]=r.useState(()=>!1),[h,d]=r.useState(()=>e.contentWrapper||"div");function f(n){var c;if(!a.isFromTrustedHost(e.trustedHosts,n))return;const{data:i}=n;if(i)switch(i.type){case"builder.configureSdk":{const o=i.data,{breakpoints:u,contentId:b}=o;if(!b||b!==((c=e.builderContextSignal.content)==null?void 0:c.id))return;u&&m({meta:{breakpoints:u}}),S(g+1);break}case"builder.contentUpdate":{const o=i.data,u=o.key||o.alias||o.entry||o.modelName,b=o.data;u===e.model&&(m(b),S(g+1));break}}}function k(){var i,c;const n=(c=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:c.jsCode;n&&a.evaluate({code:n,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[y,ne]=r.useState(()=>({})),[j,q]=r.useState(()=>!1);function A(n){var i,c;if(e.builderContextSignal.content){const o=(i=e.builderContextSignal.content)==null?void 0:i.testVariationId,u=(c=e.builderContextSignal.content)==null?void 0:c.id;a._track({type:"click",canTrack:a.getDefaultCanTrack(e.canTrack),contentId:u,apiKey:e.apiKey,variationId:o!==u?o:void 0,...a.getInteractionPropertiesForEvent(n),unique:!j})}j||q(!0)}function _(n){return n.replace(/{{([^}]+)}}/g,(i,c)=>a.evaluate({code:c,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function z({url:n,key:i}){a.fetch(n).then(c=>c.json()).then(c=>{var u,b;const o={...e.builderContextSignal.rootState,[i]:c};(b=(u=e.builderContextSignal).rootSetState)==null||b.call(u,o),y[i]=!0}).catch(c=>{console.error("error fetching dynamic data",n,c)})}function w(){var i,c;const n=((c=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:c.httpRequests)??{};Object.entries(n).forEach(([o,u])=>{if(u&&(!y[o]||a.isEditing())){const b=_(u);z({url:b,key:o})}})}function C(){a.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:a.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function R(n){S(g+1),window.addEventListener("message",f),a.registerInsertMenu(),a.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(i=>{var o;const c=a.createRegisterComponentMessage(i);(o=window.parent)==null||o.postMessage(c,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",C)}function I(n){const i=new URL(location.href).searchParams,c=i.get("builder.preview"),o=i.get(`builder.preview.${c}`),u=i.get("apiKey")||i.get("builder.space");c===e.model&&u===e.apiKey&&(!e.content||o===e.content.id)&&a.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(b=>{b&&m(b)})}const D=V.useRouter();return r.useEffect(()=>{var n;return(n=l.current)==null||n.addEventListener("initeditingbldr",R),()=>{var i;return(i=l.current)==null?void 0:i.removeEventListener("initeditingbldr",R)}},[]),r.useEffect(()=>{var n;return(n=l.current)==null||n.addEventListener("initpreviewingbldr",I),()=>{var i;return(i=l.current)==null?void 0:i.removeEventListener("initpreviewingbldr",I)}},[]),r.useEffect(()=>{var n,i;if(a.isBrowser()){if(a.isEditing()&&l.current&&l.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&a.getDefaultCanTrack(e.canTrack)){const o=(n=e.builderContextSignal.content)==null?void 0:n.testVariationId,u=(i=e.builderContextSignal.content)==null?void 0:i.id,b=e.apiKey;a._track({type:"impression",canTrack:!0,contentId:u,apiKey:b,variationId:o!==u?o:void 0})}a.isPreviewing()&&l.current}},[]),r.useEffect(()=>{e.apiKey||a.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),k(),w(),C()},[]),r.useEffect(()=>{},[e.content]),r.useEffect(()=>{a.isBrowser()&&(window.removeEventListener("message",f),window.addEventListener("message",f))},[x]),r.useEffect(()=>{k()},[(T=(P=e.builderContextSignal.content)==null?void 0:P.data)==null?void 0:T.jsCode,e.builderContextSignal.rootState]),r.useEffect(()=>{w()},[(N=(B=e.builderContextSignal.content)==null?void 0:B.data)==null?void 0:N.httpRequests]),r.useEffect(()=>{C()},[e.builderContextSignal.rootState]),r.useEffect(()=>{e.data&&s(e.data)},[e.data]),r.useEffect(()=>{e.locale&&s({locale:e.locale})},[e.locale]),r.useEffect(()=>()=>{a.isBrowser()&&(window.removeEventListener("message",f),window.removeEventListener("builder:component:stateChangeListenerActivated",C))},[]),t.jsx(ee.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?t.jsx(t.Fragment,{children:r.createElement(h,{key:g,ref:l,onClick:n=>A(n),"builder-content-id":(F=e.builderContextSignal.content)==null?void 0:F.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((L=e.content)==null?void 0:L.testVariationId)||((W=e.content)==null?void 0:W.id)}`},e.children)}):null})}exports.BlockWrapper=U;exports.BlocksWrapper=O;exports.Button=H;exports.CustomCode=X;exports.DynamicRenderer=E;exports.Embed=Y;exports.EnableEditor=te;exports.FragmentComponent=J;exports.Image=G;exports.ImgComponent=Z;exports.InteractiveElement=$;exports.SectionComponent=Q;exports.Video=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";"use strict";const n=require("./bundle-
|
|
1
|
+
"use server";"use strict";const n=require("./bundle-72df28b3.cjs");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
|