@builder.io/sdk-vue 5.4.0 → 5.4.2

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 (71) hide show
  1. package/lib/browser/{awaiter-XLoIdAw3.js → awaiter-Y7PQyi6v.js} +1 -1
  2. package/lib/browser/{awaiter-qNFJfpSz.cjs → awaiter-dHA6AJCX.cjs} +1 -1
  3. package/lib/browser/{block-wrapper-reas9rmo.cjs → block-wrapper-qLLDWPpH.cjs} +1 -1
  4. package/lib/browser/{block-wrapper-f3zEx8S_.js → block-wrapper-tanzST5K.js} +3 -3
  5. package/lib/browser/{component-ref-4ay3OV1k.cjs → component-ref--8Xo0eru.cjs} +1 -1
  6. package/lib/browser/{component-ref-4lLMyE43.js → component-ref-aA9EUnWU.js} +4 -4
  7. package/lib/browser/components/content/content.helpers.d.ts +7 -1
  8. package/lib/browser/components/content/content.vue.d.ts +4 -0
  9. package/lib/browser/components/content-variants/inlined-fns.d.ts +1 -1
  10. package/lib/browser/constants/sdk-version.d.ts +1 -1
  11. package/lib/browser/{get-block-properties-CK4qnoHd.cjs → get-block-properties--kuQ2jHl.cjs} +1 -1
  12. package/lib/browser/{get-block-properties-nqV8scES.js → get-block-properties-Slh1yFIO.js} +1 -1
  13. package/lib/browser/{index-pJnoXY0A.js → index-94HnK8k2.js} +72 -64
  14. package/lib/browser/{index-lRIGot7h.cjs → index-lIMMbjkW.cjs} +9 -9
  15. package/lib/browser/index.cjs +1 -1
  16. package/lib/browser/index.mjs +1 -1
  17. package/lib/browser/{live-edit-hoV0ghuj.cjs → live-edit-IiNcdkxk.cjs} +1 -1
  18. package/lib/browser/{live-edit-5mCChUV2.js → live-edit-xzOoYzhl.js} +1 -1
  19. package/lib/browser/{repeated-block-F5n8q4pA.js → repeated-block-2K9I8Wm-.js} +2 -2
  20. package/lib/browser/{repeated-block-FDJw__8i.cjs → repeated-block-7wMvv6Dw.cjs} +1 -1
  21. package/lib/browser/{style-wrapper-e5wqPuhd.js → style-wrapper-C7yRsoDq.js} +1 -1
  22. package/lib/browser/{style-wrapper-6XW31DT6.cjs → style-wrapper-OlwFiSMB.cjs} +1 -1
  23. package/lib/edge/{awaiter-TPWZATcH.js → awaiter-74eowwGt.js} +1 -1
  24. package/lib/edge/{awaiter-g1cucmgb.cjs → awaiter-fRxc54AZ.cjs} +1 -1
  25. package/lib/edge/{block-wrapper-oEdWkUs5.cjs → block-wrapper-B5BJISjx.cjs} +1 -1
  26. package/lib/{node/block-wrapper-S-D5WDpF.js → edge/block-wrapper-DLiZnpc5.js} +3 -3
  27. package/lib/edge/{component-ref-XsyNNMUg.cjs → component-ref-Kok-pAOt.cjs} +1 -1
  28. package/lib/edge/{component-ref-PjrRqoNv.js → component-ref-Po30Jz7c.js} +4 -4
  29. package/lib/edge/components/content/content.helpers.d.ts +7 -1
  30. package/lib/edge/components/content/content.vue.d.ts +4 -0
  31. package/lib/edge/components/content-variants/inlined-fns.d.ts +1 -1
  32. package/lib/edge/constants/sdk-version.d.ts +1 -1
  33. package/lib/edge/{get-block-properties-LZfO1d9V.cjs → get-block-properties-s0HfaFAz.cjs} +1 -1
  34. package/lib/edge/{get-block-properties-OQKbXkPB.js → get-block-properties-uEWmkpXU.js} +1 -1
  35. package/lib/edge/{index-fWAfFgEy.cjs → index-Nd4Mq5NZ.cjs} +13 -13
  36. package/lib/edge/{index-RgTaKnZ2.js → index-oUrb-PAc.js} +27 -19
  37. package/lib/edge/index.cjs +1 -1
  38. package/lib/edge/index.mjs +1 -1
  39. package/lib/edge/{live-edit-f7U2Azcm.js → live-edit-fVd_ug7o.js} +1 -1
  40. package/lib/{node/live-edit-YCZ5pmAP.cjs → edge/live-edit-s44cI_k-.cjs} +1 -1
  41. package/lib/edge/{repeated-block-bXYXfKP_.js → repeated-block-Ejv18P9i.js} +2 -2
  42. package/lib/edge/{repeated-block-N0cYhpaS.cjs → repeated-block-kYllzesL.cjs} +1 -1
  43. package/lib/edge/{style-wrapper-x1xM4jrn.cjs → style-wrapper-1RJACAmT.cjs} +1 -1
  44. package/lib/edge/{style-wrapper-XXgvForl.js → style-wrapper-7J29CqBV.js} +1 -1
  45. package/lib/node/{awaiter-6GuArcPZ.cjs → awaiter-HlIEMqL2.cjs} +1 -1
  46. package/lib/node/{awaiter-U9ghjah_.js → awaiter-SBbqkqGS.js} +1 -1
  47. package/lib/node/{block-wrapper-BjCwxGrk.cjs → block-wrapper-CxABGooQ.cjs} +1 -1
  48. package/lib/{edge/block-wrapper-pWTeul3q.js → node/block-wrapper-RbIX1_FJ.js} +3 -3
  49. package/lib/node/{component-ref-JIXZgEPq.js → component-ref-36nEcDJg.js} +5 -5
  50. package/lib/node/{component-ref-2T_SzZr_.cjs → component-ref-gZgBfl3C.cjs} +1 -1
  51. package/lib/node/components/content/content.helpers.d.ts +7 -1
  52. package/lib/node/components/content/content.vue.d.ts +4 -0
  53. package/lib/node/components/content-variants/inlined-fns.d.ts +1 -1
  54. package/lib/node/constants/sdk-version.d.ts +1 -1
  55. package/lib/node/{get-block-properties-VdcyrKHl.cjs → get-block-properties--P_kIEc4.cjs} +1 -1
  56. package/lib/node/{get-block-properties-6ZEBsSGZ.js → get-block-properties-_gI9Xz9P.js} +2 -2
  57. package/lib/node/{index-C8cK6fMj.cjs → index-jza5cPNQ.cjs} +13 -13
  58. package/lib/node/{index-BFBRlmya.js → index-zO0b5of_.js} +27 -19
  59. package/lib/node/index.cjs +1 -1
  60. package/lib/node/index.mjs +2 -2
  61. package/lib/node/init.cjs +1 -1
  62. package/lib/node/init.mjs +1 -1
  63. package/lib/node/{live-edit-Gaqi2aam.js → live-edit-5hkdZt2p.js} +1 -1
  64. package/lib/{edge/live-edit-JjbauDaL.cjs → node/live-edit-Csjy-Smn.cjs} +1 -1
  65. package/lib/node/{repeated-block-crOq_RyN.cjs → repeated-block-BzgNegIW.cjs} +1 -1
  66. package/lib/node/{repeated-block-xa9PS91L.js → repeated-block-s2MfIPGD.js} +2 -2
  67. package/lib/node/{should-force-browser-runtime-in-node-ljCjC7PN.cjs → should-force-browser-runtime-in-node-iaCUWBcy.cjs} +2 -2
  68. package/lib/node/{should-force-browser-runtime-in-node-dSSMAIhU.js → should-force-browser-runtime-in-node-vgbSWZcY.js} +1 -1
  69. package/lib/node/{style-wrapper-8sWObtTj.js → style-wrapper-cn8kiAX7.js} +2 -2
  70. package/lib/node/{style-wrapper-ol70p_wf.cjs → style-wrapper-wvi8GKDA.cjs} +1 -1
  71. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import "./style.css";
2
2
  import { defineComponent as t, renderSlot as o } from "vue";
3
- import { _ as r } from "./index-pJnoXY0A.js";
3
+ import { _ as r } from "./index-94HnK8k2.js";
4
4
  const n = t({
5
5
  name: "awaiter",
6
6
  props: [],
@@ -1 +1 @@
1
- var p=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-lRIGot7h.cjs"),n=e.defineComponent({name:"awaiter",props:[],mounted(){}});function o(t,a,i,c,u,d){return e.renderSlot(t.$slots,"default")}const s=r._export_sfc(n,[["render",o]]);exports.default=s;
1
+ var p=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-lIMMbjkW.cjs"),n=e.defineComponent({name:"awaiter",props:[],mounted(){}});function o(t,a,i,c,u,d){return e.renderSlot(t.$slots,"default")}const s=r._export_sfc(n,[["render",o]]);exports.default=s;
@@ -1 +1 @@
1
- var b=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./get-block-properties-CK4qnoHd.cjs"),a=require("./index-lRIGot7h.cjs"),i=()=>Promise.resolve().then(()=>require("./index-lRIGot7h.cjs")).then(e=>e.dynamicRenderer).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",e),e}),s=t.defineComponent({name:"block-wrapper",components:{DynamicRenderer:t.defineAsyncComponent(i)},props:["Wrapper","block","context"],data(){return{getBlockActions:r.getBlockActions,getBlockProperties:r.getBlockProperties}}});function l(e,d,m,u,k,y){var o,n;const c=t.resolveComponent("DynamicRenderer");return t.openBlock(),t.createBlock(c,{TagName:e.Wrapper,attributes:e.getBlockProperties({block:e.block,context:e.context}),actionAttributes:e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0,trackingContext:{apiKey:e.context.apiKey,canTrack:e.context.canTrack??!0,contentId:(o=e.context.content)==null?void 0:o.id,variationId:(n=e.context.content)==null?void 0:n.testVariationId}})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["TagName","attributes","actionAttributes"])}const p=a._export_sfc(s,[["render",l]]);exports.default=p;
1
+ var b=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./get-block-properties--kuQ2jHl.cjs"),a=require("./index-lIMMbjkW.cjs"),i=()=>Promise.resolve().then(()=>require("./index-lIMMbjkW.cjs")).then(e=>e.dynamicRenderer).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",e),e}),s=t.defineComponent({name:"block-wrapper",components:{DynamicRenderer:t.defineAsyncComponent(i)},props:["Wrapper","block","context"],data(){return{getBlockActions:r.getBlockActions,getBlockProperties:r.getBlockProperties}}});function l(e,d,m,u,k,y){var o,n;const c=t.resolveComponent("DynamicRenderer");return t.openBlock(),t.createBlock(c,{TagName:e.Wrapper,attributes:e.getBlockProperties({block:e.block,context:e.context}),actionAttributes:e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0,trackingContext:{apiKey:e.context.apiKey,canTrack:e.context.canTrack??!0,contentId:(o=e.context.content)==null?void 0:o.id,variationId:(n=e.context.content)==null?void 0:n.testVariationId}})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["TagName","attributes","actionAttributes"])}const p=a._export_sfc(s,[["render",l]]);exports.default=p;
@@ -1,8 +1,8 @@
1
1
  import "./style.css";
2
2
  import { defineComponent as r, defineAsyncComponent as a, resolveComponent as c, openBlock as i, createBlock as p, withCtx as s, renderSlot as l } from "vue";
3
- import { g as m, a as d } from "./get-block-properties-nqV8scES.js";
4
- import { _ as k } from "./index-pJnoXY0A.js";
5
- const u = () => import("./index-pJnoXY0A.js").then((t) => t.L).then((t) => t.default).catch((t) => {
3
+ import { g as m, a as d } from "./get-block-properties-Slh1yFIO.js";
4
+ import { _ as k } from "./index-94HnK8k2.js";
5
+ const u = () => import("./index-94HnK8k2.js").then((t) => t.L).then((t) => t.default).catch((t) => {
6
6
  throw console.error(
7
7
  "Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",
8
8
  t
@@ -1 +1 @@
1
- var g=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./index-lRIGot7h.cjs"),l=require("./get-block-properties-CK4qnoHd.cjs"),u=()=>Promise.resolve().then(()=>require("./awaiter-qNFJfpSz.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",e),e}),k=()=>Promise.resolve().then(()=>require("./live-edit-hoV0ghuj.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",e),e}),h=t.defineComponent({name:"interactive-element",components:{LiveEdit:t.defineAsyncComponent(k),Awaiter:t.defineAsyncComponent(u)},props:["wrapperProps","block","includeBlockProps","context","Wrapper"],data(){return{forceRenderCount:0,TARGET:r.TARGET,isEditing:r.isEditing}},watch:{onUpdateHook0:{handler(){},immediate:!0}},computed:{attributes(){var e,o;return this.includeBlockProps?{...l.getBlockProperties({block:this.block,context:this.context}),...l.getBlockActions({block:this.block,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context,trackingContext:{apiKey:this.context.apiKey,canTrack:this.context.canTrack??!0,contentId:(e=this.context.content)==null?void 0:e.id,variationId:(o=this.context.content)==null?void 0:o.testVariationId}})}:{}},targetWrapperProps(){return{...this.wrapperProps,...Object.keys(this.attributes).length>0?{attributes:this.attributes}:{}}},onUpdateHook0(){var e,o;return{0:this.wrapperProps,1:(o=(e=this.block)==null?void 0:e.component)==null?void 0:o.options}}}});function b(e,o,a,s,p,c){const i=t.resolveComponent("Awaiter"),n=t.resolveComponent("LiveEdit");return e.Wrapper.load?(t.openBlock(),t.createBlock(i,{key:0,load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["load","fallback","props","attributes"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.TARGET==="rsc"&&e.isEditing()?(t.openBlock(),t.createBlock(n,{key:0,Wrapper:e.Wrapper,id:e.block.id||"",attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["Wrapper","id","attributes"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({key:1,attributes:e.attributes},e.targetWrapperProps),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"]))],64))}const d=r._export_sfc(h,[["render",b]]),f=({componentOptions:e,builderBlock:o,context:a,componentRef:s,includeBlockProps:p,isInteractive:c,contextValue:i})=>{const n={...e,...p?{attributes:l.getBlockProperties({block:o,context:i})}:{}};return c?{Wrapper:s,block:o,context:a,wrapperProps:e,includeBlockProps:p}:n},C=t.defineComponent({name:"component-ref",components:{Block:r.Block,InteractiveElement:d},props:["isInteractive","componentRef","blockChildren","componentOptions","builderBlock","context","linkComponent","includeBlockProps","registeredComponents"],data(){return{shouldUpdate:!1,Wrapper:this.isInteractive?r.wrapComponentRef(d):this.componentRef,getWrapperProps:f}},computed:{blockChildrenToRender(){return this.componentRef?this.blockChildren:[]}}});function B(e,o,a,s,p,c){const i=t.resolveComponent("Block");return e.componentRef?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.normalizeProps(t.mergeProps({key:0},e.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}))),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.blockChildrenToRender,(n,m)=>(t.openBlock(),t.createBlock(i,{key:n.id,block:n,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128))]),_:1},16)):t.createCommentVNode("",!0)}const v=r._export_sfc(C,[["render",B]]);exports.default=v;
1
+ var g=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./index-lIMMbjkW.cjs"),l=require("./get-block-properties--kuQ2jHl.cjs"),u=()=>Promise.resolve().then(()=>require("./awaiter-dHA6AJCX.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",e),e}),k=()=>Promise.resolve().then(()=>require("./live-edit-IiNcdkxk.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",e),e}),h=t.defineComponent({name:"interactive-element",components:{LiveEdit:t.defineAsyncComponent(k),Awaiter:t.defineAsyncComponent(u)},props:["wrapperProps","block","includeBlockProps","context","Wrapper"],data(){return{forceRenderCount:0,TARGET:r.TARGET,isEditing:r.isEditing}},watch:{onUpdateHook0:{handler(){},immediate:!0}},computed:{attributes(){var e,o;return this.includeBlockProps?{...l.getBlockProperties({block:this.block,context:this.context}),...l.getBlockActions({block:this.block,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context,trackingContext:{apiKey:this.context.apiKey,canTrack:this.context.canTrack??!0,contentId:(e=this.context.content)==null?void 0:e.id,variationId:(o=this.context.content)==null?void 0:o.testVariationId}})}:{}},targetWrapperProps(){return{...this.wrapperProps,...Object.keys(this.attributes).length>0?{attributes:this.attributes}:{}}},onUpdateHook0(){var e,o;return{0:this.wrapperProps,1:(o=(e=this.block)==null?void 0:e.component)==null?void 0:o.options}}}});function b(e,o,a,s,p,c){const i=t.resolveComponent("Awaiter"),n=t.resolveComponent("LiveEdit");return e.Wrapper.load?(t.openBlock(),t.createBlock(i,{key:0,load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["load","fallback","props","attributes"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.TARGET==="rsc"&&e.isEditing()?(t.openBlock(),t.createBlock(n,{key:0,Wrapper:e.Wrapper,id:e.block.id||"",attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["Wrapper","id","attributes"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({key:1,attributes:e.attributes},e.targetWrapperProps),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"]))],64))}const d=r._export_sfc(h,[["render",b]]),f=({componentOptions:e,builderBlock:o,context:a,componentRef:s,includeBlockProps:p,isInteractive:c,contextValue:i})=>{const n={...e,...p?{attributes:l.getBlockProperties({block:o,context:i})}:{}};return c?{Wrapper:s,block:o,context:a,wrapperProps:e,includeBlockProps:p}:n},C=t.defineComponent({name:"component-ref",components:{Block:r.Block,InteractiveElement:d},props:["isInteractive","componentRef","blockChildren","componentOptions","builderBlock","context","linkComponent","includeBlockProps","registeredComponents"],data(){return{shouldUpdate:!1,Wrapper:this.isInteractive?r.wrapComponentRef(d):this.componentRef,getWrapperProps:f}},computed:{blockChildrenToRender(){return this.componentRef?this.blockChildren:[]}}});function B(e,o,a,s,p,c){const i=t.resolveComponent("Block");return e.componentRef?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.normalizeProps(t.mergeProps({key:0},e.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}))),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.blockChildrenToRender,(n,m)=>(t.openBlock(),t.createBlock(i,{key:n.id,block:n,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128))]),_:1},16)):t.createCommentVNode("",!0)}const v=r._export_sfc(C,[["render",B]]);exports.default=v;
@@ -1,13 +1,13 @@
1
1
  import "./style.css";
2
2
  import { defineComponent as h, defineAsyncComponent as u, resolveComponent as m, openBlock as o, createBlock as i, withCtx as p, renderSlot as d, createElementBlock as b, Fragment as f, resolveDynamicComponent as C, mergeProps as w, normalizeProps as W, renderList as y, createCommentVNode as B } from "vue";
3
- import { T as E, i as R, _ as g, B as $, w as A } from "./index-pJnoXY0A.js";
4
- import { a as v, g as S } from "./get-block-properties-nqV8scES.js";
5
- const T = () => import("./awaiter-XLoIdAw3.js").then((t) => t.default).catch((t) => {
3
+ import { T as E, i as R, _ as g, B as $, w as A } from "./index-94HnK8k2.js";
4
+ import { a as v, g as S } from "./get-block-properties-Slh1yFIO.js";
5
+ const T = () => import("./awaiter-Y7PQyi6v.js").then((t) => t.default).catch((t) => {
6
6
  throw console.error(
7
7
  "Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",
8
8
  t
9
9
  ), t;
10
- }), I = () => import("./live-edit-5mCChUV2.js").then((t) => t.default).catch((t) => {
10
+ }), I = () => import("./live-edit-xzOoYzhl.js").then((t) => t.default).catch((t) => {
11
11
  throw console.error(
12
12
  "Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",
13
13
  t
@@ -1,4 +1,4 @@
1
- import type { RegisteredComponent, RegisteredComponents } from '../../context/types';
1
+ import type { BuilderRenderState, RegisteredComponent, RegisteredComponents } from '../../context/types';
2
2
  import type { BuilderContent } from '../../types/builder-content';
3
3
  import type { ComponentInfo } from '../../types/components';
4
4
  import type { Dictionary, Nullable } from '../../types/typescript';
@@ -9,3 +9,9 @@ export declare const getRootStateInitialValue: ({ content, data, locale }: Pick<
9
9
  locale?: string | undefined;
10
10
  };
11
11
  export declare const getContentInitialValue: ({ content, data }: Pick<ContentProps, 'content' | 'data'>) => Nullable<BuilderContent>;
12
+ /**
13
+ * A state object whose reads and writes go to whatever `getRootState` returns
14
+ * when they happen, for jsCode functions that outlive the root state object
15
+ * they were defined against.
16
+ */
17
+ export declare const getLiveRootState: (getRootState: () => BuilderRenderState) => BuilderRenderState;
@@ -24,6 +24,10 @@ declare const _default: import("vue").DefineComponent<Readonly<{
24
24
  isNestedRender?: any;
25
25
  }>, unknown, {
26
26
  scriptStr: string;
27
+ jsCodeRun: {
28
+ done: boolean;
29
+ rootState: BuilderRenderState | null;
30
+ };
27
31
  registeredComponents: import("../../context/types").RegisteredComponents;
28
32
  builderContextSignal: {
29
33
  content: import("../../types/typescript").Nullable<import("../..").BuilderContent>;
@@ -10,5 +10,5 @@
10
10
  * For more information on how this works,
11
11
  * see our [SSR A/B Test Docs](https://github.com/BuilderIO/builder/tree/main/packages/sdks/docs/SSR_AB_TEST.md)
12
12
  */
13
- export declare const UPDATE_COOKIES_AND_STYLES_SCRIPT = "function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {\n function getAndSetVariantId() {\n function setCookie(name, value, days) {\n let expires = '';\n if (days) {\n const date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n expires = '; expires=' + date.toUTCString();\n }\n document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${contentId}`;\n const variantInCookie = getCookie(cookieName);\n const availableIDs = variants.map(vr => vr.id).concat(contentId);\n if (variantInCookie && availableIDs.includes(variantInCookie)) {\n return variantInCookie;\n }\n let n = 0;\n const random = Math.random();\n for (let i = 0; i < variants.length; i++) {\n const variant = variants[i];\n const testRatio = variant.testRatio;\n n += testRatio;\n if (random < n) {\n setCookie(cookieName, variant.id);\n return variant.id;\n }\n }\n setCookie(cookieName, contentId);\n return contentId;\n }\n const winningVariantId = getAndSetVariantId();\n let styleEl = document.currentScript?.previousElementSibling;\n if (isAngularSDK) {\n styleEl = document.currentScript?.parentElement?.previousElementSibling?.querySelector('style');\n }\n if (isHydrationTarget) {\n styleEl.remove();\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n } else {\n const newStyleStr = variants.concat({\n id: contentId\n }).filter(variant => variant.id !== winningVariantId).map(value => {\n return `.variant-${value.id} { display: none; }\n `;\n }).join('');\n styleEl.innerHTML = newStyleStr;\n }\n}";
13
+ export declare const UPDATE_COOKIES_AND_STYLES_SCRIPT = "function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {\n function getAndSetVariantId() {\n function setCookie(name, value, days) {\n let expires = '';\n if (days) {\n const date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n expires = '; expires=' + date.toUTCString();\n }\n document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${contentId}`;\n const variantInCookie = getCookie(cookieName);\n const availableIDs = variants.map(vr => vr.id).concat(contentId);\n if (variantInCookie && availableIDs.includes(variantInCookie)) {\n return variantInCookie;\n }\n let n = 0;\n const random = Math.random();\n for (let i = 0; i < variants.length; i++) {\n const variant = variants[i];\n const testRatio = variant.testRatio;\n n += testRatio;\n if (random < n) {\n setCookie(cookieName, variant.id, 30);\n return variant.id;\n }\n }\n setCookie(cookieName, contentId, 30);\n return contentId;\n }\n const winningVariantId = getAndSetVariantId();\n let styleEl = document.currentScript?.previousElementSibling;\n if (isAngularSDK) {\n styleEl = document.currentScript?.parentElement?.previousElementSibling?.querySelector('style');\n }\n if (isHydrationTarget) {\n styleEl.remove();\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n } else {\n const newStyleStr = variants.concat({\n id: contentId\n }).filter(variant => variant.id !== winningVariantId).map(value => {\n return `.variant-${value.id} { display: none; }\n `;\n }).join('');\n styleEl.innerHTML = newStyleStr;\n }\n}";
14
14
  export declare const UPDATE_VARIANT_VISIBILITY_SCRIPT = "function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {\n if (!navigator.cookieEnabled) {\n return;\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${defaultContentId}`;\n const winningVariant = getCookie(cookieName);\n const parentDiv = document.currentScript?.parentElement;\n const isDefaultContent = variantContentId === defaultContentId;\n const isWinningVariant = winningVariant === variantContentId;\n if (isWinningVariant && !isDefaultContent) {\n parentDiv?.removeAttribute('hidden');\n parentDiv?.removeAttribute('aria-hidden');\n } else if (!isWinningVariant && isDefaultContent) {\n parentDiv?.setAttribute('hidden', 'true');\n parentDiv?.setAttribute('aria-hidden', 'true');\n }\n if (isHydrationTarget) {\n if (!isWinningVariant) {\n parentDiv?.remove();\n }\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n }\n return;\n}";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.4.0";
1
+ export declare const SDK_VERSION = "5.4.2";
@@ -1 +1 @@
1
- var d=require("./style.css");const a=require("./index-lRIGot7h.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>o=>a.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:o,isExpression:!1,trackingContext:t.trackingContext});function l(e){const t={},o=e.block.actions??{};for(const n in o){if(!o.hasOwnProperty(n))continue;const s=o[n];let r=c(n);if(e.stripPrefix)switch(a.TARGET){case"vue":r=r.replace("v-on:","");break;case"svelte":r=r.replace("on:","");break}t[r]=i(s,e)}return t}function u({properties:e}){return e}const p=e=>({href:e.href});function f({block:e,context:t}){var r;const{_newProperty:o,...n}=e.properties||{},s={...p(e),...n,"builder-id":e.id,style:a.getStyle({block:e,context:t}),[a.getClassPropName()]:[e.id,"builder-block",e.class,(r=e.properties)==null?void 0:r.class].filter(Boolean).join(" ")};return u({properties:s,context:t,block:e})}exports.getBlockActions=l;exports.getBlockProperties=f;
1
+ var d=require("./style.css");const a=require("./index-lIMMbjkW.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>o=>a.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:o,isExpression:!1,trackingContext:t.trackingContext});function l(e){const t={},o=e.block.actions??{};for(const n in o){if(!o.hasOwnProperty(n))continue;const s=o[n];let r=c(n);if(e.stripPrefix)switch(a.TARGET){case"vue":r=r.replace("v-on:","");break;case"svelte":r=r.replace("on:","");break}t[r]=i(s,e)}return t}function u({properties:e}){return e}const p=e=>({href:e.href});function f({block:e,context:t}){var r;const{_newProperty:o,...n}=e.properties||{},s={...p(e),...n,"builder-id":e.id,style:a.getStyle({block:e,context:t}),[a.getClassPropName()]:[e.id,"builder-block",e.class,(r=e.properties)==null?void 0:r.class].filter(Boolean).join(" ")};return u({properties:s,context:t,block:e})}exports.getBlockActions=l;exports.getBlockProperties=f;
@@ -1,5 +1,5 @@
1
1
  import "./style.css";
2
- import { e as s, T as c, g as i, a as l } from "./index-pJnoXY0A.js";
2
+ import { e as s, T as c, g as i, a as l } from "./index-94HnK8k2.js";
3
3
  const p = (e) => `v-on:${e.toLowerCase()}`, f = (e, t) => (o) => s({
4
4
  code: e,
5
5
  context: t.context,
@@ -41,7 +41,7 @@ function an(e, t, n, o, r, i) {
41
41
  const Ve = /* @__PURE__ */ k(sn, [["render", an]]), sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42
42
  __proto__: null,
43
43
  default: Ve
44
- }, Symbol.toStringTag, { value: "Module" })), E = "vue", H = () => {
44
+ }, Symbol.toStringTag, { value: "Module" })), E = "vue", j = () => {
45
45
  switch (E) {
46
46
  case "react":
47
47
  case "reactNative":
@@ -71,7 +71,7 @@ const Ve = /* @__PURE__ */ k(sn, [["render", an]]), sa = /* @__PURE__ */ Object.
71
71
  attrs() {
72
72
  return {
73
73
  ...N(this.attributes, "v-on:", !1),
74
- [H()]: `${this.link ? "" : "builder-button"} ${this.attributes[H()] || ""}`,
74
+ [j()]: `${this.link ? "" : "builder-button"} ${this.attributes[j()] || ""}`,
75
75
  ...this.link ? {
76
76
  href: this.link,
77
77
  target: this.openLinkInNewTab ? "_blank" : void 0,
@@ -182,11 +182,11 @@ const fn = () => {
182
182
  host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
183
183
  device: n ? "tablet" : t.any() ? "mobile" : "desktop"
184
184
  };
185
- }, kt = "5.4.0", Ct = () => ({
185
+ }, kt = "5.4.2", Ct = () => ({
186
186
  "X-Builder-SDK": E,
187
187
  "X-Builder-SDK-GEN": "2",
188
188
  "X-Builder-SDK-Version": kt
189
- }), j = (e) => e != null, gn = (e) => {
189
+ }), H = (e) => e != null, gn = (e) => {
190
190
  if (e === "localhost" || e === "127.0.0.1")
191
191
  return e;
192
192
  const t = e.split(".");
@@ -202,7 +202,7 @@ const fn = () => {
202
202
  V.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
203
203
  return;
204
204
  }
205
- }, Tt = async (e) => fe(e), yn = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(j).join("; "), Sn = [["secure", ""], ["SameSite", "None"]], vn = ({
205
+ }, Tt = async (e) => fe(e), yn = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(H).join("; "), Sn = [["secure", ""], ["SameSite", "None"]], vn = ({
206
206
  name: e,
207
207
  value: t,
208
208
  expires: n
@@ -246,7 +246,7 @@ const wt = "builderSessionId", Cn = async ({
246
246
  name: wt,
247
247
  canTrack: e
248
248
  });
249
- if (j(t))
249
+ if (H(t))
250
250
  return t;
251
251
  {
252
252
  const n = Tn();
@@ -293,7 +293,7 @@ const wt = "builderSessionId", Cn = async ({
293
293
  key: Rt,
294
294
  canTrack: e
295
295
  });
296
- if (j(t))
296
+ if (H(t))
297
297
  return t;
298
298
  {
299
299
  const n = $n();
@@ -466,7 +466,7 @@ const Wn = 5e3, Ke = bt(Wn), Dn = (e, t) => {
466
466
  };
467
467
  function Un() {
468
468
  var e;
469
- return typeof process < "u" && j((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
469
+ return typeof process < "u" && H((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
470
470
  }
471
471
  let qe = !1;
472
472
  const xn = ({
@@ -479,12 +479,12 @@ const xn = ({
479
479
  return t && n && !o ? (e && !qe && (qe = !0, V.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n ")), !0) : !1;
480
480
  }, Ln = (e) => (I() || xn({
481
481
  shouldLogWarning: !0
482
- }), ze(e)), Fn = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, Mn = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, Hn = (e) => {
482
+ }), ze(e)), Fn = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, Mn = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, jn = (e) => {
483
483
  var t, n, o, r, i, s;
484
484
  return ((o = (n = (t = Fn.exec(e.trim())) == null ? void 0 : t.groups) == null ? void 0 : n.getPath) == null ? void 0 : o.slice(1)) || ((s = (i = (r = Mn.exec(e.trim())) == null ? void 0 : r.groups) == null ? void 0 : i.getPath) == null ? void 0 : s.slice(1));
485
- }, jn = 5e3, Ge = bt(jn), Kn = (e) => {
485
+ }, Hn = 5e3, Ge = bt(Hn), Kn = (e) => {
486
486
  let t = Ge.get(e);
487
- return t === void 0 && (t = Hn(e) || null, Ge.set(e, t)), t;
487
+ return t === void 0 && (t = jn(e) || null, Ge.set(e, t)), t;
488
488
  }, zn = (e, t, n) => {
489
489
  const o = n.split(".")[0], r = t && Object.prototype.hasOwnProperty.call(t, o) ? t : e;
490
490
  return gt(r, n);
@@ -651,7 +651,7 @@ const Xn = ({
651
651
  rootSetState: r,
652
652
  context: t
653
653
  });
654
- Yn(s, l, d, i);
654
+ Yn(s, l === "id" ? "properties.id" : l, d, i);
655
655
  }
656
656
  return s;
657
657
  }, _e = /* @__PURE__ */ new WeakMap(), Zn = (e) => {
@@ -900,11 +900,15 @@ const Ut = (e) => {
900
900
  }), co = ({
901
901
  contentId: e,
902
902
  value: t
903
- }) => Oe({
904
- name: De(e),
905
- value: t,
906
- canTrack: !0
907
- }), Lt = (e) => j(e.id) && j(e.variations) && Object.keys(e.variations).length > 0, uo = ({
903
+ }) => {
904
+ const n = /* @__PURE__ */ new Date();
905
+ return n.setDate(n.getDate() + 30), Oe({
906
+ name: De(e),
907
+ value: t,
908
+ expires: n,
909
+ canTrack: !0
910
+ });
911
+ }, Lt = (e) => H(e.id) && H(e.variations) && Object.keys(e.variations).length > 0, uo = ({
908
912
  id: e,
909
913
  variations: t
910
914
  }) => {
@@ -1044,7 +1048,7 @@ I() && E === "qwik" ? (window.__BUILDER_USER_ATTRIBUTES_SERVICE__ || (window.__B
1044
1048
  const pe = Ie, pa = (e) => {
1045
1049
  pe.setUserAttributes(e);
1046
1050
  }, _ = (e) => {
1047
- const t = j(e) ? e : !0;
1051
+ const t = H(e) ? e : !0;
1048
1052
  return pe.setCanTrack(t), t;
1049
1053
  };
1050
1054
  function go() {
@@ -1070,10 +1074,10 @@ function we(e, t = null, n = ".") {
1070
1074
  };
1071
1075
  }, {});
1072
1076
  }
1073
- function Ht(e, t, n = {}) {
1077
+ function jt(e, t, n = {}) {
1074
1078
  for (const o in e) {
1075
1079
  const r = e[o], i = t ? t + "." + o : o;
1076
- r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((s) => s.startsWith("$")) ? Ht(r, i, n) : n[i] = r;
1080
+ r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((s) => s.startsWith("$")) ? jt(r, i, n) : n[i] = r;
1077
1081
  }
1078
1082
  return n;
1079
1083
  }
@@ -1135,7 +1139,7 @@ const ko = "v3", ot = (e) => typeof e == "number" && !isNaN(e) && e >= 0, Ue = (
1135
1139
  for (const W in Q)
1136
1140
  W !== "apiKey" && T.searchParams.set(W, String(Q[W]));
1137
1141
  if (Object.keys(K).length > 0 && T.searchParams.set("userAttributes", JSON.stringify(K)), o) {
1138
- const W = Ht({
1142
+ const W = jt({
1139
1143
  query: o
1140
1144
  });
1141
1145
  for (const F in W)
@@ -1260,7 +1264,7 @@ function Ao(e) {
1260
1264
  break;
1261
1265
  }
1262
1266
  }
1263
- function jt(e) {
1267
+ function Ht(e) {
1264
1268
  console.warn(`Cannot animate element: element with ID ${e} not found!`);
1265
1269
  }
1266
1270
  function Kt(e, t) {
@@ -1279,7 +1283,7 @@ function Bo(e) {
1279
1283
  function zt(e) {
1280
1284
  const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
1281
1285
  if (!t.length) {
1282
- jt(e.elementId || e.id || "");
1286
+ Ht(e.elementId || e.id || "");
1283
1287
  return;
1284
1288
  }
1285
1289
  Array.from(t).forEach((n) => {
@@ -1293,7 +1297,7 @@ function zt(e) {
1293
1297
  function Vo(e) {
1294
1298
  const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
1295
1299
  if (!t.length) {
1296
- jt(e.elementId || e.id || "");
1300
+ Ht(e.elementId || e.id || "");
1297
1301
  return;
1298
1302
  }
1299
1303
  Array.from(t).forEach((n) => {
@@ -1340,7 +1344,7 @@ const ie = (e, t) => {
1340
1344
  } : e, qt = (e) => Object.entries(e).map(([n, o]) => {
1341
1345
  if (typeof o == "string")
1342
1346
  return `${Le(n)}: ${o};`;
1343
- }).filter(j), Oo = (e) => qt(e).join(`
1347
+ }).filter(H), Oo = (e) => qt(e).join(`
1344
1348
  `), fa = ({
1345
1349
  mediaQuery: e,
1346
1350
  className: t,
@@ -1472,27 +1476,27 @@ const _t = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
1472
1476
  return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderContext ? {
1473
1477
  builderContext: t
1474
1478
  } : {};
1475
- }, Ho = (e) => e.toString(), jo = () => Promise.resolve().then(() => or).then((e) => e.default).catch((e) => {
1479
+ }, jo = (e) => e.toString(), Ho = () => Promise.resolve().then(() => or).then((e) => e.default).catch((e) => {
1476
1480
  throw console.error(
1477
1481
  "Error while attempting to dynamically import component DynamicDiv at ../dynamic-div.vue",
1478
1482
  e
1479
1483
  ), e;
1480
- }), Ko = () => import("./block-wrapper-f3zEx8S_.js").then((e) => e.default).catch((e) => {
1484
+ }), Ko = () => import("./block-wrapper-tanzST5K.js").then((e) => e.default).catch((e) => {
1481
1485
  throw console.error(
1482
1486
  "Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
1483
1487
  e
1484
1488
  ), e;
1485
- }), zo = () => import("./component-ref-4lLMyE43.js").then((e) => e.default).catch((e) => {
1489
+ }), zo = () => import("./component-ref-aA9EUnWU.js").then((e) => e.default).catch((e) => {
1486
1490
  throw console.error(
1487
1491
  "Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
1488
1492
  e
1489
1493
  ), e;
1490
- }), qo = () => import("./repeated-block-F5n8q4pA.js").then((e) => e.default).catch((e) => {
1494
+ }), qo = () => import("./repeated-block-2K9I8Wm-.js").then((e) => e.default).catch((e) => {
1491
1495
  throw console.error(
1492
1496
  "Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
1493
1497
  e
1494
1498
  ), e;
1495
- }), Go = () => import("./style-wrapper-e5wqPuhd.js").then((e) => e.default).catch((e) => {
1499
+ }), Go = () => import("./style-wrapper-C7yRsoDq.js").then((e) => e.default).catch((e) => {
1496
1500
  throw console.error(
1497
1501
  "Error while attempting to dynamically import component StyleWrapper at ./components/style-wrapper.vue",
1498
1502
  e
@@ -1504,7 +1508,7 @@ const _t = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
1504
1508
  RepeatedBlock: Y(qo),
1505
1509
  ComponentRef: Y(zo),
1506
1510
  BlockWrapper: Y(Ko),
1507
- DynamicDiv: Y(jo)
1511
+ DynamicDiv: Y(Ho)
1508
1512
  },
1509
1513
  props: ["block", "context", "registeredComponents", "linkComponent"],
1510
1514
  data() {
@@ -1517,7 +1521,7 @@ const _t = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
1517
1521
  value: null,
1518
1522
  deps: []
1519
1523
  },
1520
- generateKey: Ho
1524
+ generateKey: jo
1521
1525
  };
1522
1526
  },
1523
1527
  mounted() {
@@ -2028,7 +2032,7 @@ const oe = /* @__PURE__ */ k(tr, [["render", nr]]), or = /* @__PURE__ */ Object.
2028
2032
  ...e.link ? {
2029
2033
  href: e.link
2030
2034
  } : {},
2031
- [H()]: "builder-column",
2035
+ [j()]: "builder-column",
2032
2036
  style: Gt(this.columnCssVars(t))
2033
2037
  };
2034
2038
  }
@@ -2832,7 +2836,7 @@ const Fr = /* @__PURE__ */ k(Ur, [["render", Lr]]), Mr = {
2832
2836
  shouldReceiveBuilderProps: {
2833
2837
  builderLinkComponent: !0
2834
2838
  }
2835
- }, Hr = {
2839
+ }, jr = {
2836
2840
  // TODO: ways to statically preprocess JSON for references, functions, etc
2837
2841
  name: "Columns",
2838
2842
  isRSC: !0,
@@ -3039,7 +3043,7 @@ const Fr = /* @__PURE__ */ k(Ur, [["render", Lr]]), Mr = {
3039
3043
  builderComponents: !0,
3040
3044
  builderLinkComponent: !0
3041
3045
  }
3042
- }, jr = {
3046
+ }, Hr = {
3043
3047
  name: "Fragment",
3044
3048
  static: !0,
3045
3049
  hidden: !0,
@@ -3290,7 +3294,7 @@ const Fr = /* @__PURE__ */ k(Ur, [["render", Lr]]), Mr = {
3290
3294
  return {
3291
3295
  ...N(this.attributes, "v-on:", !1),
3292
3296
  ...N(this.attributes, "v-on:", !0),
3293
- [H()]: `builder-personalization-container ${this.attributes[H()] || ""}`
3297
+ [j()]: `builder-personalization-container ${this.attributes[j()] || ""}`
3294
3298
  };
3295
3299
  },
3296
3300
  filteredVariants() {
@@ -3374,12 +3378,12 @@ function _r(e, t, n, o, r, i) {
3374
3378
  registeredComponents: e.builderComponents
3375
3379
  }, {
3376
3380
  default: D(() => {
3377
- var F, je;
3381
+ var F, He;
3378
3382
  return [
3379
3383
  $(a, {
3380
3384
  nonce: ((F = e.builderContext) == null ? void 0 : F.nonce) || "",
3381
3385
  scriptStr: e.scriptStr,
3382
- id: `variants-script-${(je = e.builderBlock) == null ? void 0 : je.id}-${T}`
3386
+ id: `variants-script-${(He = e.builderBlock) == null ? void 0 : He.id}-${T}`
3383
3387
  }, null, 8, ["nonce", "scriptStr", "id"])
3384
3388
  ];
3385
3389
  }),
@@ -4509,7 +4513,7 @@ const Ui = /* @__PURE__ */ k(Ni, [["render", Di]]), xi = {
4509
4513
  return { isEditing: P, filterAttrs: N };
4510
4514
  }
4511
4515
  }), Fi = ["value", "defaultValue", "name", "required"], Mi = ["value"];
4512
- function Hi(e, t, n, o, r, i) {
4516
+ function ji(e, t, n, o, r, i) {
4513
4517
  return u(), h("select", R({
4514
4518
  value: e.value,
4515
4519
  key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
@@ -4523,7 +4527,7 @@ function Hi(e, t, n, o, r, i) {
4523
4527
  }, he(s.name || s.value), 9, Mi))), 128))
4524
4528
  ], 16, Fi);
4525
4529
  }
4526
- const ji = /* @__PURE__ */ k(Li, [["render", Hi]]), Ki = {
4530
+ const Hi = /* @__PURE__ */ k(Li, [["render", ji]]), Ki = {
4527
4531
  name: "Form:SubmitButton",
4528
4532
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
4529
4533
  defaultStyles: {
@@ -4686,7 +4690,7 @@ const Xi = /* @__PURE__ */ k(Ji, [["render", Yi]]), Zi = {
4686
4690
  const e = {
4687
4691
  ...N(this.attributes, "v-on:", !1),
4688
4692
  ...N(this.attributes, "v-on:", !0),
4689
- [H()]: `builder-raw-img ${this.attributes[H()] || ""}`
4693
+ [j()]: `builder-raw-img ${this.attributes[j()] || ""}`
4690
4694
  };
4691
4695
  return delete e.style, e;
4692
4696
  }
@@ -4952,7 +4956,7 @@ const us = /* @__PURE__ */ k(is, [["render", ds]]), ps = () => [{
4952
4956
  component: Gi,
4953
4957
  ...Ki
4954
4958
  }, {
4955
- component: ji,
4959
+ component: Hi,
4956
4960
  ...xi
4957
4961
  }, {
4958
4962
  component: Xi,
@@ -4970,10 +4974,10 @@ const ct = () => se || (se = [{
4970
4974
  ...Mr
4971
4975
  }, {
4972
4976
  component: lr,
4973
- ...Hr
4977
+ ...jr
4974
4978
  }, {
4975
4979
  component: ur,
4976
- ...jr
4980
+ ...Hr
4977
4981
  }, {
4978
4982
  component: Sr,
4979
4983
  ...zr
@@ -5032,11 +5036,11 @@ const ct = () => se || (se = [{
5032
5036
  const testRatio = variant.testRatio;
5033
5037
  n += testRatio;
5034
5038
  if (random < n) {
5035
- setCookie(cookieName, variant.id);
5039
+ setCookie(cookieName, variant.id, 30);
5036
5040
  return variant.id;
5037
5041
  }
5038
5042
  }
5039
- setCookie(cookieName, contentId);
5043
+ setCookie(cookieName, contentId, 30);
5040
5044
  return contentId;
5041
5045
  }
5042
5046
  const winningVariantId = getAndSetVariantId();
@@ -5098,25 +5102,25 @@ const ct = () => se || (se = [{
5098
5102
  })), bs = ({
5099
5103
  canTrack: e,
5100
5104
  content: t
5101
- }) => !(!(de(t).length > 0) || !e), gs = (e) => e === "react" || e === "reactNative", ys = E === "angular", He = gs(E), Zt = () => `
5105
+ }) => !(!(de(t).length > 0) || !e), gs = (e) => e === "react" || e === "reactNative", ys = E === "angular", je = gs(E), Zt = () => `
5102
5106
  (function() {
5103
5107
  if (!window.${Ae}) {
5104
5108
  window.${Ae} = ${ms};
5105
5109
  }
5106
5110
  if (!window.${Be}) {
5107
5111
  window.${Be} = ${hs};
5108
- }${He ? `
5112
+ }${je ? `
5109
5113
  var thisScriptEl = document.currentScript;
5110
5114
  if (thisScriptEl) { thisScriptEl.remove(); }` : ""}
5111
5115
  })();
5112
5116
  `, Ss = (e, t) => `
5113
5117
  window.${Ae}(
5114
- "${t}",${JSON.stringify(e)}, ${He}, ${ys}
5118
+ "${t}",${JSON.stringify(e)}, ${je}, ${ys}
5115
5119
  )`, vs = ({
5116
5120
  contentId: e,
5117
5121
  variationId: t
5118
5122
  }) => `window.${Be}(
5119
- "${t}", "${e}", ${He}
5123
+ "${t}", "${e}", ${je}
5120
5124
  )`, ks = (e) => JSON.parse(JSON.stringify(e));
5121
5125
  function dt(e) {
5122
5126
  return Math.round(e * 1e3) / 1e3;
@@ -5439,7 +5443,7 @@ font-weight: ${s};
5439
5443
  (p, b) => String(
5440
5444
  ne({
5441
5445
  code: b,
5442
- context: this.context || {},
5446
+ context: this.builderContextSignal.context,
5443
5447
  localState: void 0,
5444
5448
  rootState: this.builderContextSignal.rootState,
5445
5449
  rootSetState: this.builderContextSignal.rootSetState
@@ -5656,7 +5660,7 @@ const xs = /* @__PURE__ */ k(Ds, [["render", Us]]), me = (e, t = /* @__PURE__ */
5656
5660
  locale: n
5657
5661
  } : {}
5658
5662
  };
5659
- }, Hs = ({
5663
+ }, js = ({
5660
5664
  content: e,
5661
5665
  data: t
5662
5666
  }) => e ? {
@@ -5666,7 +5670,7 @@ const xs = /* @__PURE__ */ k(Ds, [["render", Us]]), me = (e, t = /* @__PURE__ */
5666
5670
  ...t
5667
5671
  },
5668
5672
  meta: e == null ? void 0 : e.meta
5669
- } : void 0, js = nn, Ks = y({
5673
+ } : void 0, Hs = nn, Ks = y({
5670
5674
  name: "content-component",
5671
5675
  components: {
5672
5676
  EnableEditor: Ws,
@@ -5680,8 +5684,8 @@ const xs = /* @__PURE__ */ k(Ds, [["render", Us]]), me = (e, t = /* @__PURE__ */
5680
5684
  "data",
5681
5685
  "locale",
5682
5686
  "apiKey",
5683
- "context",
5684
5687
  "customComponents",
5688
+ "context",
5685
5689
  "canTrack",
5686
5690
  "apiVersion",
5687
5691
  "blocksWrapper",
@@ -5708,12 +5712,16 @@ const xs = /* @__PURE__ */ k(Ds, [["render", Us]]), me = (e, t = /* @__PURE__ */
5708
5712
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
5709
5713
  contentId: (t = this.content) == null ? void 0 : t.id
5710
5714
  }),
5715
+ jsCodeRun: {
5716
+ done: !1,
5717
+ rootState: null
5718
+ },
5711
5719
  registeredComponents: Ls(
5712
5720
  [...ct(), ...this.customComponents || []],
5713
- (n) => js(n)
5721
+ (n) => Hs(n)
5714
5722
  ),
5715
5723
  builderContextSignal: {
5716
- content: Hs({
5724
+ content: js({
5717
5725
  content: this.content,
5718
5726
  data: this.data
5719
5727
  }),
@@ -5755,16 +5763,16 @@ const xs = /* @__PURE__ */ k(Ds, [["render", Us]]), me = (e, t = /* @__PURE__ */
5755
5763
  "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
5756
5764
  );
5757
5765
  const e = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
5758
- e && ne({
5766
+ e && (this.jsCodeRun.rootState = this.builderContextSignal.rootState, ne({
5759
5767
  code: e,
5760
- context: this.context || {},
5768
+ context: this.builderContextSignal.context,
5761
5769
  localState: void 0,
5762
5770
  rootState: this.builderContextSignal.rootState,
5763
5771
  rootSetState: (o) => {
5764
5772
  this.builderContextSignal.rootState = o;
5765
5773
  },
5766
5774
  isExpression: !1
5767
- });
5775
+ }), this.jsCodeRun.done = !0);
5768
5776
  },
5769
5777
  watch: {
5770
5778
  onUpdateHook0: {
@@ -5784,7 +5792,7 @@ const xs = /* @__PURE__ */ k(Ds, [["render", Us]]), me = (e, t = /* @__PURE__ */
5784
5792
  },
5785
5793
  methods: {
5786
5794
  contentSetState(e) {
5787
- this.builderContextSignal.rootState = e;
5795
+ this.jsCodeRun.rootState = e, this.builderContextSignal.rootState = e;
5788
5796
  }
5789
5797
  }
5790
5798
  });
@@ -6061,7 +6069,7 @@ const Js = /* @__PURE__ */ k(Gs, [["render", _s]]), Qs = (e) => {
6061
6069
  className() {
6062
6070
  var e, t;
6063
6071
  return [
6064
- this.attributes[H()],
6072
+ this.attributes[j()],
6065
6073
  "builder-symbol",
6066
6074
  (e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
6067
6075
  (t = this.symbol) != null && t.dynamic || this.dynamic ? "builder-dynamic-symbol" : void 0
@@ -6179,10 +6187,10 @@ export {
6179
6187
  E as T,
6180
6188
  us as V,
6181
6189
  k as _,
6182
- H as a,
6190
+ j as a,
6183
6191
  Te as b,
6184
6192
  ge as c,
6185
- j as d,
6193
+ H as d,
6186
6194
  ne as e,
6187
6195
  ha as f,
6188
6196
  ba as g,
@@ -6201,7 +6209,7 @@ export {
6201
6209
  pa as t,
6202
6210
  be as u,
6203
6211
  to as v,
6204
- js as w,
6212
+ Hs as w,
6205
6213
  la as x,
6206
6214
  ca as y,
6207
6215
  da as z