@builder.io/sdk-react-nextjs 0.8.0 → 0.9.0

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.
Files changed (48) hide show
  1. package/lib/browser/USE_CLIENT_BUNDLE-bf9c49b7.cjs +23 -0
  2. package/lib/browser/{USE_CLIENT_BUNDLE-0f9e7207.js → USE_CLIENT_BUNDLE-dfea4654.js} +195 -189
  3. package/lib/{edge/USE_SERVER_BUNDLE-7c98af22.cjs → browser/USE_SERVER_BUNDLE-ad40cda1.cjs} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-f3c12c2d.js → browser/USE_SERVER_BUNDLE-b7c58bed.js} +1 -1
  5. package/lib/browser/{bundle-de4401ae.js → bundle-a454b553.js} +285 -265
  6. package/lib/browser/{bundle-241e4107.cjs → bundle-dc5a8b6f.cjs} +10 -10
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +3 -3
  9. package/lib/{node/USE_CLIENT_BUNDLE-d4e4bc2c.js → edge/USE_CLIENT_BUNDLE-ab37324a.js} +195 -189
  10. package/lib/edge/USE_CLIENT_BUNDLE-e6667575.cjs +23 -0
  11. package/lib/{node/USE_SERVER_BUNDLE-86ff2695.js → edge/USE_SERVER_BUNDLE-839ea6b2.js} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-872f0336.cjs → edge/USE_SERVER_BUNDLE-fce92ad5.cjs} +1 -1
  13. package/lib/edge/{bundle-a2f7cfad.cjs → bundle-af3f93cf.cjs} +30 -30
  14. package/lib/edge/{bundle-5c41e798.js → bundle-c0cd3b98.js} +1034 -1014
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +3 -3
  17. package/lib/node/USE_CLIENT_BUNDLE-ed964e93.cjs +23 -0
  18. package/lib/{edge/USE_CLIENT_BUNDLE-d5efb340.js → node/USE_CLIENT_BUNDLE-f9aeb249.js} +195 -189
  19. package/lib/{browser/USE_SERVER_BUNDLE-ec740144.js → node/USE_SERVER_BUNDLE-4a85453c.js} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-88edae72.cjs → node/USE_SERVER_BUNDLE-8da077cb.cjs} +1 -1
  21. package/lib/node/{bundle-5c833e3a.cjs → bundle-0a83b0be.cjs} +9 -9
  22. package/lib/node/{bundle-698e83e7.js → bundle-1b559f4d.js} +187 -166
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +3 -3
  25. package/package.json +1 -1
  26. package/types/cjs/components/blocks/blocks-wrapper.d.ts +8 -0
  27. package/types/cjs/components/blocks/blocks.d.ts +1 -1
  28. package/types/cjs/components/content/components/enable-editor.d.ts +1 -1
  29. package/types/cjs/components/content-variants/content-variants.types.d.ts +16 -0
  30. package/types/cjs/constants/sdk-version.d.ts +1 -1
  31. package/types/cjs/context/types.d.ts +2 -1
  32. package/types/cjs/functions/transform-block-properties.d.ts +5 -1
  33. package/types/cjs/types/enforced-partials.d.ts +7 -2
  34. package/types/esm/components/blocks/blocks-wrapper.d.ts +8 -0
  35. package/types/esm/components/blocks/blocks.d.ts +1 -1
  36. package/types/esm/components/content/components/enable-editor.d.ts +1 -1
  37. package/types/esm/components/content-variants/content-variants.types.d.ts +16 -0
  38. package/types/esm/constants/sdk-version.d.ts +1 -1
  39. package/types/esm/context/types.d.ts +2 -1
  40. package/types/esm/functions/transform-block-properties.d.ts +5 -1
  41. package/types/esm/types/enforced-partials.d.ts +7 -2
  42. package/lib/browser/USE_CLIENT_BUNDLE-57361dc5.cjs +0 -23
  43. package/lib/edge/USE_CLIENT_BUNDLE-d32d9614.cjs +0 -23
  44. package/lib/node/USE_CLIENT_BUNDLE-38107a6a.cjs +0 -23
  45. package/types/cjs/functions/get-react-native-block-styles.d.ts +0 -7
  46. package/types/cjs/functions/sanitize-react-native-block-styles.d.ts +0 -3
  47. package/types/esm/functions/get-react-native-block-styles.d.ts +0 -7
  48. package/types/esm/functions/sanitize-react-native-block-styles.d.ts +0 -3
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-a2f7cfad.cjs"),t=require("./USE_CLIENT_BUNDLE-d32d9614.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-7c98af22.cjs");exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.RenderBlocks=e.RenderBlocks;exports.RenderContent=e.RenderContent;exports.Symbol=e.Symbol;exports.Text=e.Text;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.track=e.track;exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-af3f93cf.cjs"),t=require("./USE_CLIENT_BUNDLE-e6667575.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-fce92ad5.cjs");exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.RenderBlocks=e.RenderBlocks;exports.RenderContent=e.RenderContent;exports.Symbol=e.Symbol;exports.Text=e.Text;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.track=e.track;exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;
@@ -1,10 +1,10 @@
1
- import { B as i, t as m, C as c, R as g, q as p, S as l, T as C, w as d, m as f, E as u, x as B, n as S, y as E, A as R, z as h, i as x, f as k, u as y, v as P, D as b } from "./bundle-5c41e798.js";
2
- import { b as w, F as A, c as F, S as T, V } from "./USE_CLIENT_BUNDLE-d5efb340.js";
1
+ import { B as i, t as m, C as c, R as g, q as p, S as l, T as C, w as d, m as f, E as u, x as B, n as S, y as E, A as R, z as h, i as x, f as k, u as y, v as P, D as b } from "./bundle-c0cd3b98.js";
2
+ import { b as w, F as A, c as F, S as T, V } from "./USE_CLIENT_BUNDLE-ab37324a.js";
3
3
  import "lru-cache";
4
4
  import "react/jsx-runtime";
5
5
  import "react";
6
6
  import "next/navigation";
7
- import "./USE_SERVER_BUNDLE-f3c12c2d.js";
7
+ import "./USE_SERVER_BUNDLE-839ea6b2.js";
8
8
  export {
9
9
  i as Blocks,
10
10
  w as Button,
@@ -0,0 +1,23 @@
1
+ "use client";"use strict";const t=require("react/jsx-runtime"),c=require("./bundle-0a83b0be.cjs"),l=require("react"),V=require("./USE_SERVER_BUNDLE-8da077cb.cjs"),A=require("next/navigation");function D(e){return t.jsxs(t.Fragment,{children:[e.link?t.jsx(t.Fragment,{children:t.jsx("a",{...e.attributes,href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"button",children:e.text})}):t.jsx(t.Fragment,{children:t.jsx("button",{...e.attributes,style:e.attributes.style,className:e.attributes.className+" button-5294b10c",children:e.text})}),t.jsx("style",{children:`.button-5294b10c {
2
+ all: unset;
3
+ }`})]})}function U(e){return t.jsxs(t.Fragment,{children:[" ",e.hasChildren?t.jsx(t.Fragment,{children:t.jsxs(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.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," "]})}):t.jsx(t.Fragment,{children:t.jsx(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})})})," "]})}function H(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:{...c.getBlockProperties({block:e.block,context:e.context}),...c.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 a(){var s;return"builder-blocks"+((s=e.blocks)!=null&&s.length?"":" no-blocks")}function g(){var s,f;c.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((f=window.parent)==null||f.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function x(){var s,f;c.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((f=window.parent)==null||f.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx(e.BlocksWrapper,{className:a()+" props-blocks-wrapper-4f2c12d8","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:s=>g(),onMouseEnter:s=>x(),onKeyPress:s=>g(),...e.BlocksWrapperProps,children:e.children}),t.jsx("style",{children:`.props-blocks-wrapper-4f2c12d8 {
4
+ display: flex;
5
+ flex-direction: column;
6
+ align-items: stretch;
7
+ }`})]})}function J(e){return t.jsx("span",{children:e.children})}function $(e){var s,f,S,v;function a(){var h;const r=e.image||e.src;if(!r||!(r.match(/builder\.io/)||r.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((h=e.image)!=null&&h.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),c.getSrcSet(r)}else if(e.image&&!e.srcset)return c.getSrcSet(r);return c.getSrcSet(r)}function g(){var b;return(b=a==null?void 0:a())!=null&&b.match(/builder\.io/)&&!e.noWebp?a().replace(/\?/g,"?format=webp&"):""}function x(){const b={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?b: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",...x()},className:"builder-image"+(e.className?" "+e.className:"")+" img-dbab4030",src:e.image,srcSet:a(),sizes:e.sizes})]}),e.aspectRatio&&!((f=(s=e.builderBlock)==null?void 0:s.children)!=null&&f.length&&e.fitContent)?t.jsx(t.Fragment,{children:t.jsx("div",{className:"builder-image-sizer div-dbab4030",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(v=(S=e.builderBlock)==null?void 0:S.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-dbab4030-2",children:e.children})}):null]}),t.jsx("style",{children:`.img-dbab4030 {
8
+ opacity: 1;
9
+ transition: opacity 0.2s ease-in-out;
10
+ }.div-dbab4030 {
11
+ width: 100%;
12
+ pointer-events: none;
13
+ font-size: 0;
14
+ }.div-dbab4030-2 {
15
+ display: flex;
16
+ flex-direction: column;
17
+ align-items: stretch;
18
+ position: absolute;
19
+ top: 0;
20
+ left: 0;
21
+ width: 100%;
22
+ height: 100%;
23
+ }`})]})}function G(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 Q(e){const a=l.useRef(null),[g,x]=l.useState(()=>[]),[s,f]=l.useState(()=>[]);return l.useEffect(()=>{var v;if(!((v=a.current)!=null&&v.getElementsByTagName)||typeof window>"u")return;const S=a.current.getElementsByTagName("script");for(let b=0;b<S.length;b++){const r=S[b];if(r.src){if(g.includes(r.src))continue;g.push(r.src);const h=document.createElement("script");h.async=!0,h.src=r.src,document.head.appendChild(h)}else if(!r.type||["text/javascript","application/javascript","application/ecmascript"].includes(r.type)){if(s.includes(r.innerText))continue;try{s.push(r.innerText),new Function(r.innerText)()}catch(h){console.warn("`CustomCode`: Error running script:",h)}}}},[]),t.jsx("div",{ref:a,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}function X(e){const a=l.useRef(null),[g,x]=l.useState(()=>[]),[s,f]=l.useState(()=>[]),[S,v]=l.useState(()=>!1);function b(){if(!a.current||!a.current.getElementsByTagName)return;const r=a.current.getElementsByTagName("script");for(let h=0;h<r.length;h++){const k=r[h];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(c.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 l.useEffect(()=>{a.current&&!S&&(v(!0),b())},[a.current,S]),t.jsx("div",{className:"builder-embed",ref:a,dangerouslySetInnerHTML:{__html:e.content}})}function Y(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},c.isEditing()&&e.imgSrc||"default-key")}function Z(e){var x,s,f,S,v,b,r;function a(){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{...a()}}return t.jsxs("div",{style:{position:"relative"},children:[t.jsx("video",{className:"builder-video",...g(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(x=e.attributes)==null?void 0:x.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&&((f=(s=e.builderBlock)==null?void 0:s.children)!=null&&f.length))?t.jsx(t.Fragment,{children:t.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(v=(S=e.builderBlock)==null?void 0:S.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,(r=(b=e.builderBlock)==null?void 0:b.children)!=null&&r.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 p=l.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}});function ee(e){var I,P,B,F,T,N,L;const a=l.useRef(null),[g,x]=l.useState(()=>0);function s(n){var o,d,u,m,W;const i={...e.builderContextSignal.content,...n,data:{...(o=e.builderContextSignal.content)==null?void 0:o.data,...n==null?void 0:n.data},meta:{...(d=e.builderContextSignal.content)==null?void 0:d.meta,...n==null?void 0:n.meta,breakpoints:((u=n==null?void 0:n.meta)==null?void 0:u.breakpoints)||((W=(m=e.builderContextSignal.content)==null?void 0:m.meta)==null?void 0:W.breakpoints)}};V.postPreviewContent({value:i,key:i.id}).then(()=>{M.refresh()})}l.useState(()=>0);const[f,S]=l.useState(()=>!1),[v,b]=l.useState(()=>e.contentWrapper||"div");function r(n){var o;const{data:i}=n;if(i)switch(i.type){case"builder.configureSdk":{const d=i.data,{breakpoints:u,contentId:m}=d;if(!m||m!==((o=e.builderContextSignal.content)==null?void 0:o.id))return;u&&s({meta:{breakpoints:u}}),x(g+1);break}case"builder.contentUpdate":{const d=i.data,u=d.key||d.alias||d.entry||d.modelName,m=d.data;u===e.model&&(s(m),x(g+1));break}}}function h(){var i,o;const n=(o=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:o.jsCode;n&&c.evaluate({code:n,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[k,y]=l.useState(()=>({})),[E,K]=l.useState(()=>!1);function q(n){var i,o;if(e.builderContextSignal.content){const d=(i=e.builderContextSignal.content)==null?void 0:i.testVariationId,u=(o=e.builderContextSignal.content)==null?void 0:o.id;c._track({type:"click",canTrack:c.getDefaultCanTrack(e.canTrack),contentId:u,apiKey:e.apiKey,variationId:d!==u?d:void 0,...c.getInteractionPropertiesForEvent(n),unique:!E})}E||K(!0)}function _(n){return n.replace(/{{([^}]+)}}/g,(i,o)=>c.evaluate({code:o,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function z({url:n,key:i}){c.fetch(n).then(o=>o.json()).then(o=>{var u,m;const d={...e.builderContextSignal.rootState,[i]:o};(m=(u=e.builderContextSignal).rootSetState)==null||m.call(u,d),k[i]=!0}).catch(o=>{console.error("error fetching dynamic data",n,o)})}function j(){var i,o;const n=((o=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:o.httpRequests)??{};Object.entries(n).forEach(([d,u])=>{if(u&&(!k[d]||c.isEditing())){const m=_(u);z({url:m,key:d})}})}function C(){c.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:c.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function w(n){x(g+1),window.addEventListener("message",r),c.registerInsertMenu(),c.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(i=>{var d;const o=c.createRegisterComponentMessage(i);(d=window.parent)==null||d.postMessage(o,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",C)}function R(n){const i=new URL(location.href).searchParams,o=i.get("builder.preview"),d=i.get(`builder.preview.${o}`),u=i.get("apiKey")||i.get("builder.space");o===e.model&&u===e.apiKey&&(!e.content||d===e.content.id)&&c.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(m=>{m&&s(m)})}const M=A.useRouter();return l.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initeditingbldr",w),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initeditingbldr",w)}},[]),l.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initpreviewingbldr",R),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initpreviewingbldr",R)}},[]),l.useEffect(()=>{var n,i;if(c.isBrowser()){if(c.isEditing()&&a.current&&a.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&c.getDefaultCanTrack(e.canTrack)){const d=(n=e.builderContextSignal.content)==null?void 0:n.testVariationId,u=(i=e.builderContextSignal.content)==null?void 0:i.id,m=e.apiKey;c._track({type:"impression",canTrack:!0,contentId:u,apiKey:m,variationId:d!==u?d:void 0})}c.isPreviewing()&&a.current}},[]),l.useEffect(()=>{e.apiKey||c.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),h(),j(),C()},[]),l.useEffect(()=>{},[e.content]),l.useEffect(()=>{c.isBrowser()&&(window.removeEventListener("message",r),window.addEventListener("message",r))},[f]),l.useEffect(()=>{h()},[(P=(I=e.builderContextSignal.content)==null?void 0:I.data)==null?void 0:P.jsCode,e.builderContextSignal.rootState]),l.useEffect(()=>{j()},[(F=(B=e.builderContextSignal.content)==null?void 0:B.data)==null?void 0:F.httpRequests]),l.useEffect(()=>{C()},[e.builderContextSignal.rootState]),l.useEffect(()=>()=>{c.isBrowser()&&(window.removeEventListener("message",r),window.removeEventListener("builder:component:stateChangeListenerActivated",C))},[]),t.jsx(p.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?t.jsx(t.Fragment,{children:l.createElement(v,{key:g,ref:a,onClick:n=>q(n),"builder-content-id":(T=e.builderContextSignal.content)==null?void 0:T.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((N=e.content)==null?void 0:N.testVariationId)||((L=e.content)==null?void 0:L.id)}`},e.children)}):null})}exports.BlockWrapper=U;exports.BlocksWrapper=O;exports.Button=D;exports.CustomCode=Q;exports.Embed=X;exports.EnableEditor=ee;exports.FragmentComponent=J;exports.Image=$;exports.ImgComponent=Y;exports.InteractiveElement=H;exports.SectionComponent=G;exports.Video=Z;