@builder.io/sdk-react-nextjs 0.15.1 → 0.15.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 (35) hide show
  1. package/lib/browser/blocks-exports.cjs +10 -10
  2. package/lib/browser/blocks-exports.mjs +94 -107
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/init.cjs +1 -1
  6. package/lib/browser/init.mjs +1 -1
  7. package/lib/browser/{server-entry-34aed7a8.js → server-entry-7f981733.js} +1 -1
  8. package/lib/browser/{server-entry-3ae58f1b.cjs → server-entry-f64a4c2d.cjs} +1 -1
  9. package/lib/browser/server-entry.cjs +1 -1
  10. package/lib/browser/server-entry.mjs +1 -1
  11. package/lib/edge/blocks-exports.cjs +25 -25
  12. package/lib/edge/blocks-exports.mjs +243 -256
  13. package/lib/edge/index.cjs +1 -1
  14. package/lib/edge/index.mjs +1 -1
  15. package/lib/edge/init.cjs +1 -1
  16. package/lib/edge/init.mjs +1 -1
  17. package/lib/edge/{server-entry-34aed7a8.js → server-entry-7f981733.js} +1 -1
  18. package/lib/edge/{server-entry-3ae58f1b.cjs → server-entry-f64a4c2d.cjs} +1 -1
  19. package/lib/edge/server-entry.cjs +1 -1
  20. package/lib/edge/server-entry.mjs +1 -1
  21. package/lib/node/blocks-exports.cjs +13 -13
  22. package/lib/node/blocks-exports.mjs +41 -54
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +2 -2
  25. package/lib/node/init.cjs +1 -1
  26. package/lib/node/init.mjs +2 -2
  27. package/lib/node/{node-runtime-ca94f96b.js → node-runtime-3f0a39c5.js} +1 -1
  28. package/lib/node/{node-runtime-54f0fc0a.cjs → node-runtime-6f522a33.cjs} +1 -1
  29. package/lib/node/{server-entry-4f9f76d3.js → server-entry-46bde4f0.js} +1 -1
  30. package/lib/node/{server-entry-d0dda572.cjs → server-entry-68c26de0.cjs} +1 -1
  31. package/lib/node/server-entry.cjs +1 -1
  32. package/lib/node/server-entry.mjs +1 -1
  33. package/package.json +1 -1
  34. package/types/cjs/constants/sdk-version.d.ts +1 -1
  35. package/types/esm/constants/sdk-version.d.ts +1 -1
@@ -3,8 +3,8 @@ var Ve = Object.defineProperty;
3
3
  var $e = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
4
  var te = (e, t, n) => ($e(e, typeof t != "symbol" ? t + "" : t, n), n);
5
5
  import { jsx as c, Fragment as C, jsxs as P } from "react/jsx-runtime";
6
- import { TARGET as H, isEditing as V, isBrowser as F, getUserAttributes as Le, checkIsDefined as z, logger as J, fastClone as oe, init as Fe, getDefaultCanTrack as q, _track as me, isPreviewing as Oe, createEditorListener as De, fetch as je, registerInsertMenu as Ue, setupBrowserForEditing as He, createRegisterComponentMessage as Me, fetchOneEntry as Ce, serializeComponentInfo as fe, handleABTestingSync as _e } from "./server-entry-34aed7a8.js";
7
- import { useRef as ae, useState as A, useEffect as T, createContext as Ke } from "react";
6
+ import { TARGET as M, isEditing as V, isBrowser as F, getUserAttributes as Le, checkIsDefined as z, logger as J, fastClone as oe, init as Fe, getDefaultCanTrack as q, _track as me, isPreviewing as Oe, createEditorListener as De, fetch as je, registerInsertMenu as He, setupBrowserForEditing as Me, createRegisterComponentMessage as Ue, fetchOneEntry as Ce, serializeComponentInfo as fe, handleABTestingSync as _e } from "./server-entry-7f981733.js";
7
+ import { useRef as ae, useState as N, useEffect as T, createContext as Ke } from "react";
8
8
  import { useRouter as ze } from "next/navigation";
9
9
  import "lru-cache";
10
10
  const qe = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Ye = (e) => typeof e == "string" && qe.has(e.toLowerCase());
@@ -12,7 +12,7 @@ function re(e) {
12
12
  return /* @__PURE__ */ c(C, { children: Ye(e.TagName) ? /* @__PURE__ */ c(C, { children: /* @__PURE__ */ c(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ c(C, { children: typeof e.TagName == "string" ? /* @__PURE__ */ c(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ c(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
13
13
  }
14
14
  const j = () => {
15
- switch (H) {
15
+ switch (M) {
16
16
  case "react":
17
17
  case "reactNative":
18
18
  case "rsc":
@@ -151,7 +151,7 @@ const tt = () => {
151
151
  };
152
152
  te(W, "cacheLimit", 20), te(W, "cache", /* @__PURE__ */ new Map());
153
153
  let L = W;
154
- function U({
154
+ function H({
155
155
  code: e,
156
156
  context: t,
157
157
  localState: n,
@@ -218,7 +218,7 @@ const ot = ({
218
218
  }
219
219
  };
220
220
  for (const l in e.bindings) {
221
- const s = e.bindings[l], d = U({
221
+ const s = e.bindings[l], d = H({
222
222
  code: s,
223
223
  localState: n,
224
224
  rootState: i,
@@ -277,7 +277,7 @@ const lt = ({
277
277
  block: e
278
278
  }));
279
279
  function Te(e) {
280
- switch (H) {
280
+ switch (M) {
281
281
  case "svelte":
282
282
  case "vue":
283
283
  case "solid":
@@ -322,7 +322,7 @@ const ct = ({
322
322
  } = e;
323
323
  if (!(n != null && n.collection))
324
324
  return;
325
- const o = U({
325
+ const o = H({
326
326
  code: n.collection,
327
327
  localState: t.localState,
328
328
  rootState: t.rootState,
@@ -456,18 +456,18 @@ function ht(e) {
456
456
  "small",
457
457
  l
458
458
  )
459
- }) : "", y = o.animations && o.animations.find((R) => R.trigger === "hover");
460
- let N = "";
461
- if (y) {
462
- const R = ((I = (g = y.steps) == null ? void 0 : g[1]) == null ? void 0 : I.styles) || {};
463
- N = _({
459
+ }) : "", p = o.animations && o.animations.find((R) => R.trigger === "hover");
460
+ let A = "";
461
+ if (p) {
462
+ const R = ((I = (g = p.steps) == null ? void 0 : g[1]) == null ? void 0 : I.styles) || {};
463
+ A = _({
464
464
  className: `${u}:hover`,
465
465
  styles: {
466
466
  ...R,
467
- transition: `all ${y.duration}s ${le(
468
- y.easing
467
+ transition: `all ${p.duration}s ${le(
468
+ p.easing
469
469
  )}`,
470
- transitionDelay: y.delay ? `${y.delay}s` : "0s"
470
+ transitionDelay: p.delay ? `${p.delay}s` : "0s"
471
471
  }
472
472
  }) || "";
473
473
  }
@@ -475,7 +475,7 @@ function ht(e) {
475
475
  h,
476
476
  k,
477
477
  w,
478
- N
478
+ A
479
479
  ].join(" ");
480
480
  };
481
481
  return /* @__PURE__ */ c(C, { children: n() && t() ? /* @__PURE__ */ c(C, { children: /* @__PURE__ */ c(G, { id: "builderio-block", styles: n() }) }) : null });
@@ -483,7 +483,7 @@ function ht(e) {
483
483
  function bt(e) {
484
484
  return e.charAt(0).toUpperCase() + e.slice(1);
485
485
  }
486
- const gt = (e) => `on${bt(e)}`, yt = (e, t) => (n) => U({
486
+ const gt = (e) => `on${bt(e)}`, pt = (e, t) => (n) => H({
487
487
  code: e,
488
488
  context: t.context,
489
489
  localState: t.localState,
@@ -502,7 +502,7 @@ function Be(e) {
502
502
  const a = n[o];
503
503
  let r = gt(o);
504
504
  if (e.stripPrefix)
505
- switch (H) {
505
+ switch (M) {
506
506
  case "vue":
507
507
  r = r.replace("v-on:", "");
508
508
  break;
@@ -510,11 +510,11 @@ function Be(e) {
510
510
  r = r.replace("on:", "");
511
511
  break;
512
512
  }
513
- t[r] = yt(a, e);
513
+ t[r] = pt(a, e);
514
514
  }
515
515
  return t;
516
516
  }
517
- function pt({
517
+ function yt({
518
518
  properties: e
519
519
  }) {
520
520
  return e;
@@ -537,7 +537,7 @@ function ce({
537
537
  }),
538
538
  [j()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
539
539
  };
540
- return pt({
540
+ return yt({
541
541
  properties: n,
542
542
  context: t,
543
543
  block: e
@@ -680,16 +680,16 @@ function X(e) {
680
680
  var k;
681
681
  return e.block.tagName === "a" || ((k = i().properties) == null ? void 0 : k.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
682
682
  }, a = function() {
683
- var w, y;
683
+ var w, p;
684
684
  if ((w = e.block.repeat) != null && w.collection)
685
- return !!((y = n()) != null && y.length);
685
+ return !!((p = n()) != null && p.length);
686
686
  const h = "hide" in i() ? i().hide : !1;
687
687
  return ("show" in i() ? i().show : !0) && !h;
688
688
  }, r = function() {
689
689
  var k, w;
690
690
  return !((k = t()) != null && k.component) && !n() ? (w = i().children) != null ? w : [] : [];
691
691
  }, l = function() {
692
- var h, k, w, y;
692
+ var h, k, w, p;
693
693
  return {
694
694
  blockChildren: (h = i().children) != null ? h : [],
695
695
  componentRef: (k = t()) == null ? void 0 : k.component,
@@ -708,7 +708,7 @@ function X(e) {
708
708
  registeredComponents: e.registeredComponents,
709
709
  builderBlock: i(),
710
710
  includeBlockProps: ((w = t()) == null ? void 0 : w.noWrap) === !0,
711
- isInteractive: !((y = t()) != null && y.isRSC)
711
+ isInteractive: !((p = t()) != null && p.isRSC)
712
712
  };
713
713
  };
714
714
  return /* @__PURE__ */ c(C, { children: a() ? /* @__PURE__ */ P(C, { children: [
@@ -850,7 +850,7 @@ function se(e) {
850
850
  }
851
851
  const wt = (e) => `builder-columns ${e}-breakpoints`;
852
852
  function Tt(e) {
853
- var y, N;
853
+ var p, A;
854
854
  const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], i = e.stackColumnsAt || "tablet", o = function(g) {
855
855
  return g.link ? e.builderLinkComponent || "a" : "div";
856
856
  }, a = function(g) {
@@ -948,11 +948,11 @@ function Tt(e) {
948
948
  /* @__PURE__ */ P(
949
949
  "div",
950
950
  {
951
- className: wt((y = e.builderBlock) == null ? void 0 : y.id) + " div-eeca3604",
951
+ className: wt((p = e.builderBlock) == null ? void 0 : p.id) + " div-eeca3604",
952
952
  style: m(),
953
953
  children: [
954
954
  /* @__PURE__ */ c(G, { id: "builderio-columns", styles: k() }),
955
- (N = e.columns) == null ? void 0 : N.map((x, g) => /* @__PURE__ */ c(
955
+ (A = e.columns) == null ? void 0 : A.map((x, g) => /* @__PURE__ */ c(
956
956
  re,
957
957
  {
958
958
  TagName: o(x),
@@ -987,7 +987,7 @@ function Tt(e) {
987
987
  function Rt(e) {
988
988
  return /* @__PURE__ */ c("span", { children: e.children });
989
989
  }
990
- function ye(e) {
990
+ function pe(e) {
991
991
  return e.replace(/http(s)?:/, "");
992
992
  }
993
993
  function Pt(e = "", t, n) {
@@ -998,11 +998,11 @@ function Bt(e, t) {
998
998
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
999
999
  return e;
1000
1000
  if (t === "master")
1001
- return ye(e);
1001
+ return pe(e);
1002
1002
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
1003
1003
  if (n) {
1004
1004
  const i = e.split(n[0]), o = n[3], a = t.match("x") ? t : `${t}x`;
1005
- return ye(`${i[0]}_${a}${o}`);
1005
+ return pe(`${i[0]}_${a}${o}`);
1006
1006
  }
1007
1007
  return null;
1008
1008
  }
@@ -1122,7 +1122,7 @@ function Wt(e) {
1122
1122
  }
1123
1123
  );
1124
1124
  }
1125
- const At = {
1125
+ const Nt = {
1126
1126
  name: "Core:Button",
1127
1127
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
1128
1128
  defaultStyles: {
@@ -1161,7 +1161,7 @@ const At = {
1161
1161
  builderComponents: !1,
1162
1162
  builderLinkComponent: !0
1163
1163
  }
1164
- }, Nt = {
1164
+ }, At = {
1165
1165
  // TODO: ways to statically preprocess JSON for references, functions, etc
1166
1166
  name: "Columns",
1167
1167
  isRSC: !0,
@@ -1643,7 +1643,7 @@ const Dt = {
1643
1643
  textAlign: "center"
1644
1644
  }
1645
1645
  };
1646
- function Ut(e) {
1646
+ function Ht(e) {
1647
1647
  var t;
1648
1648
  return /* @__PURE__ */ c(
1649
1649
  "div",
@@ -1656,7 +1656,7 @@ function Ut(e) {
1656
1656
  }
1657
1657
  );
1658
1658
  }
1659
- const Ht = {
1659
+ const Mt = {
1660
1660
  shouldReceiveBuilderProps: {
1661
1661
  builderBlock: !1,
1662
1662
  builderContext: !1,
@@ -1685,8 +1685,8 @@ const Ht = {
1685
1685
  advanced: !0
1686
1686
  }]
1687
1687
  };
1688
- function Mt(e) {
1689
- const t = ae(null), [n, i] = A(() => []), [o, a] = A(() => []);
1688
+ function Ut(e) {
1689
+ const t = ae(null), [n, i] = N(() => []), [o, a] = N(() => []);
1690
1690
  return T(() => {
1691
1691
  var l;
1692
1692
  if (!((l = t.current) != null && l.getElementsByTagName) || typeof window == "undefined")
@@ -1737,20 +1737,7 @@ const _t = {
1737
1737
  type: "url",
1738
1738
  required: !0,
1739
1739
  defaultValue: "",
1740
- helperText: "e.g. enter a youtube url, google map, etc",
1741
- onChange: (e) => {
1742
- const t = e.get("url");
1743
- if (t) {
1744
- e.set("content", "Loading...");
1745
- const n = _iframelyApiKey;
1746
- return fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=${n}`).then((i) => i.json()).then((i) => {
1747
- e.get("url") === t && (i.html ? e.set("content", i.html) : e.set("content", "Invalid url, please try another"));
1748
- }).catch((i) => {
1749
- e.set("content", "There was an error embedding this URL, please try again or another URL");
1750
- });
1751
- } else
1752
- e.delete("content");
1753
- }
1740
+ helperText: "e.g. enter a youtube url, google map, etc"
1754
1741
  }, {
1755
1742
  name: "content",
1756
1743
  type: "html",
@@ -1759,7 +1746,7 @@ const _t = {
1759
1746
  }]
1760
1747
  }, Kt = ["text/javascript", "application/javascript", "application/ecmascript"], zt = (e) => Kt.includes(e.type);
1761
1748
  function qt(e) {
1762
- const t = ae(null), [n, i] = A(() => []), [o, a] = A(() => []), [r, l] = A(() => !1);
1749
+ const t = ae(null), [n, i] = N(() => []), [o, a] = N(() => []), [r, l] = N(() => !1);
1763
1750
  function s() {
1764
1751
  if (!t.current || !t.current.getElementsByTagName)
1765
1752
  return;
@@ -2015,8 +2002,8 @@ function Gt(e) {
2015
2002
  );
2016
2003
  }
2017
2004
  const Xt = () => [{
2018
- component: Mt,
2019
- ...Ht
2005
+ component: Ut,
2006
+ ...Mt
2020
2007
  }, {
2021
2008
  component: qt,
2022
2009
  ..._t
@@ -2026,12 +2013,12 @@ const Xt = () => [{
2026
2013
  }, {
2027
2014
  component: Gt,
2028
2015
  ...Qt
2029
- }], pe = () => [{
2016
+ }], ye = () => [{
2030
2017
  component: Je,
2031
- ...At
2018
+ ...Nt
2032
2019
  }, {
2033
2020
  component: Tt,
2034
- ...Nt
2021
+ ...At
2035
2022
  }, {
2036
2023
  component: Rt,
2037
2024
  ...Vt
@@ -2048,7 +2035,7 @@ const Xt = () => [{
2048
2035
  component: Pn,
2049
2036
  ...Dt
2050
2037
  }, {
2051
- component: Ut,
2038
+ component: Ht,
2052
2039
  ...jt
2053
2040
  }, ...Xt()], Zt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
2054
2041
  function getAndSetVariantId() {
@@ -2147,17 +2134,17 @@ const Xt = () => [{
2147
2134
  })), tn = ({
2148
2135
  canTrack: e,
2149
2136
  content: t
2150
- }) => !(!(K(t).length > 0) || !e || F()), nn = (e) => e === "react" || e === "reactNative", Ae = nn(H), on = () => `
2137
+ }) => !(!(K(t).length > 0) || !e || F()), nn = (e) => e === "react" || e === "reactNative", Ne = nn(M), on = () => `
2151
2138
  window.${Ee} = ${Zt}
2152
2139
  window.${We} = ${en}
2153
2140
  `, an = (e, t) => `
2154
2141
  window.${Ee}(
2155
- "${t}",${JSON.stringify(e)}, ${Ae}
2142
+ "${t}",${JSON.stringify(e)}, ${Ne}
2156
2143
  )`, rn = ({
2157
2144
  contentId: e,
2158
2145
  variationId: t
2159
2146
  }) => `window.${We}(
2160
- "${t}", "${e}", ${Ae}
2147
+ "${t}", "${e}", ${Ne}
2161
2148
  )`;
2162
2149
  function ie(e) {
2163
2150
  return /* @__PURE__ */ c(
@@ -2297,12 +2284,12 @@ font-weight: ${l};
2297
2284
  `.trim());
2298
2285
  }
2299
2286
  return o;
2300
- }, yn = ({
2287
+ }, pn = ({
2301
2288
  customFonts: e
2302
2289
  }) => {
2303
2290
  var t;
2304
2291
  return ((t = e == null ? void 0 : e.map((n) => gn(n))) == null ? void 0 : t.join(" ")) || "";
2305
- }, pn = ({
2292
+ }, yn = ({
2306
2293
  cssCode: e,
2307
2294
  contentId: t
2308
2295
  }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", vn = `
@@ -2327,26 +2314,26 @@ function Sn(e) {
2327
2314
  var E, O, D, Z, ee, de, ue;
2328
2315
  const t = ae(null);
2329
2316
  function n(b) {
2330
- var p, v;
2317
+ var y, v;
2331
2318
  const f = {
2332
2319
  ...e.builderContextSignal.rootState,
2333
2320
  ...b
2334
2321
  };
2335
- e.builderContextSignal.rootSetState ? (v = (p = e.builderContextSignal).rootSetState) == null || v.call(p, f) : e.builderContextSignal.rootState = f;
2322
+ e.builderContextSignal.rootSetState ? (v = (y = e.builderContextSignal).rootSetState) == null || v.call(y, f) : e.builderContextSignal.rootState = f;
2336
2323
  }
2337
2324
  function i(b) {
2338
- var p, v, S, B, M;
2325
+ var y, v, S, B, U;
2339
2326
  const f = {
2340
2327
  ...e.builderContextSignal.content,
2341
2328
  ...b,
2342
2329
  data: {
2343
- ...(p = e.builderContextSignal.content) == null ? void 0 : p.data,
2330
+ ...(y = e.builderContextSignal.content) == null ? void 0 : y.data,
2344
2331
  ...b == null ? void 0 : b.data
2345
2332
  },
2346
2333
  meta: {
2347
2334
  ...(v = e.builderContextSignal.content) == null ? void 0 : v.meta,
2348
2335
  ...b == null ? void 0 : b.meta,
2349
- breakpoints: ((S = b == null ? void 0 : b.meta) == null ? void 0 : S.breakpoints) || ((M = (B = e.builderContextSignal.content) == null ? void 0 : B.meta) == null ? void 0 : M.breakpoints)
2336
+ breakpoints: ((S = b == null ? void 0 : b.meta) == null ? void 0 : S.breakpoints) || ((U = (B = e.builderContextSignal.content) == null ? void 0 : B.meta) == null ? void 0 : U.breakpoints)
2350
2337
  }
2351
2338
  };
2352
2339
  un({
@@ -2362,7 +2349,7 @@ function Sn(e) {
2362
2349
  "aria-hidden": !0
2363
2350
  };
2364
2351
  }
2365
- const [a, r] = A(
2352
+ const [a, r] = N(
2366
2353
  () => e.contentWrapper || "div"
2367
2354
  );
2368
2355
  function l(b) {
@@ -2372,10 +2359,10 @@ function Sn(e) {
2372
2359
  callbacks: {
2373
2360
  configureSdk: (f) => {
2374
2361
  var S;
2375
- const { breakpoints: p, contentId: v } = f;
2376
- !v || v !== ((S = e.builderContextSignal.content) == null ? void 0 : S.id) || p && i({
2362
+ const { breakpoints: y, contentId: v } = f;
2363
+ !v || v !== ((S = e.builderContextSignal.content) == null ? void 0 : S.id) || y && i({
2377
2364
  meta: {
2378
- breakpoints: p
2365
+ breakpoints: y
2379
2366
  }
2380
2367
  });
2381
2368
  },
@@ -2389,9 +2376,9 @@ function Sn(e) {
2389
2376
  })(b);
2390
2377
  }
2391
2378
  function s() {
2392
- var f, p;
2393
- const b = (p = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : p.jsCode;
2394
- b && U({
2379
+ var f, y;
2380
+ const b = (y = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : y.jsCode;
2381
+ b && H({
2395
2382
  code: b,
2396
2383
  context: e.context || {},
2397
2384
  localState: void 0,
@@ -2403,11 +2390,11 @@ function Sn(e) {
2403
2390
  enableCache: !1
2404
2391
  });
2405
2392
  }
2406
- const [d, m] = A(() => ({})), [u, h] = A(() => ({})), [k, w] = A(() => !1);
2407
- function y(b) {
2408
- var f, p;
2393
+ const [d, m] = N(() => ({})), [u, h] = N(() => ({})), [k, w] = N(() => !1);
2394
+ function p(b) {
2395
+ var f, y;
2409
2396
  if (e.builderContextSignal.content) {
2410
- const v = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId, S = (p = e.builderContextSignal.content) == null ? void 0 : p.id;
2397
+ const v = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId, S = (y = e.builderContextSignal.content) == null ? void 0 : y.id;
2411
2398
  me({
2412
2399
  type: "click",
2413
2400
  canTrack: q(e.canTrack),
@@ -2420,18 +2407,18 @@ function Sn(e) {
2420
2407
  }
2421
2408
  k || w(!0);
2422
2409
  }
2423
- function N() {
2424
- var f, p, v;
2425
- const b = (v = (p = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : p.httpRequests) != null ? v : {};
2410
+ function A() {
2411
+ var f, y, v;
2412
+ const b = (v = (y = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : y.httpRequests) != null ? v : {};
2426
2413
  Object.entries(b).forEach(([S, B]) => {
2427
2414
  if (!B || u[S] || d[S] && !V())
2428
2415
  return;
2429
2416
  u[S] = !0;
2430
- const M = B.replace(
2417
+ const U = B.replace(
2431
2418
  /{{([^}]+)}}/g,
2432
- ($, Ne) => String(
2433
- U({
2434
- code: Ne,
2419
+ ($, Ae) => String(
2420
+ H({
2421
+ code: Ae,
2435
2422
  context: e.context || {},
2436
2423
  localState: void 0,
2437
2424
  rootState: e.builderContextSignal.rootState,
@@ -2440,7 +2427,7 @@ function Sn(e) {
2440
2427
  })
2441
2428
  )
2442
2429
  );
2443
- je(M).then(($) => $.json()).then(($) => {
2430
+ je(U).then(($) => $.json()).then(($) => {
2444
2431
  n({
2445
2432
  [S]: $
2446
2433
  }), d[S] = !0;
@@ -2467,7 +2454,7 @@ function Sn(e) {
2467
2454
  );
2468
2455
  }
2469
2456
  function g(b) {
2470
- window.addEventListener("message", l), Ue(), He({
2457
+ window.addEventListener("message", l), He(), Me({
2471
2458
  ...e.locale ? {
2472
2459
  locale: e.locale
2473
2460
  } : {},
@@ -2481,18 +2468,18 @@ function Sn(e) {
2481
2468
  e.builderContextSignal.componentInfos
2482
2469
  ).forEach((f) => {
2483
2470
  var v;
2484
- const p = Me(f);
2485
- (v = window.parent) == null || v.postMessage(p, "*");
2471
+ const y = Ue(f);
2472
+ (v = window.parent) == null || v.postMessage(y, "*");
2486
2473
  }), window.addEventListener(
2487
2474
  "builder:component:stateChangeListenerActivated",
2488
2475
  x
2489
2476
  );
2490
2477
  }
2491
2478
  function I(b) {
2492
- const f = new URL(location.href).searchParams, p = f.get("builder.preview"), v = f.get(
2493
- `builder.overrides.${p}`
2479
+ const f = new URL(location.href).searchParams, y = f.get("builder.preview"), v = f.get(
2480
+ `builder.overrides.${y}`
2494
2481
  ), S = f.get("apiKey") || f.get("builder.space");
2495
- p === e.model && S === e.apiKey && (!e.content || v === e.content.id) && Ce({
2482
+ y === e.model && S === e.apiKey && (!e.content || v === e.content.id) && Ce({
2496
2483
  model: e.model,
2497
2484
  apiKey: e.apiKey,
2498
2485
  apiVersion: e.builderContextSignal.apiVersion
@@ -2543,12 +2530,12 @@ function Sn(e) {
2543
2530
  }, []), T(() => {
2544
2531
  e.apiKey || J.error(
2545
2532
  "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2546
- ), s(), N(), x();
2533
+ ), s(), A(), x();
2547
2534
  }, []), T(() => {
2548
2535
  }, [e.content]), T(() => {
2549
2536
  s();
2550
2537
  }, [(O = (E = e.builderContextSignal.content) == null ? void 0 : E.data) == null ? void 0 : O.jsCode]), T(() => {
2551
- N();
2538
+ A();
2552
2539
  }, [(Z = (D = e.builderContextSignal.content) == null ? void 0 : D.data) == null ? void 0 : Z.httpRequests]), T(() => {
2553
2540
  x();
2554
2541
  }, [e.builderContextSignal.rootState]), T(() => {
@@ -2566,7 +2553,7 @@ function Sn(e) {
2566
2553
  a,
2567
2554
  {
2568
2555
  ref: t,
2569
- onClick: (b) => y(b),
2556
+ onClick: (b) => p(b),
2570
2557
  "builder-content-id": (ee = e.builderContextSignal.content) == null ? void 0 : ee.id,
2571
2558
  "builder-model": e.model,
2572
2559
  ...o(),
@@ -2580,11 +2567,11 @@ function Sn(e) {
2580
2567
  }
2581
2568
  function Cn(e) {
2582
2569
  const t = `
2583
- ${pn({
2570
+ ${yn({
2584
2571
  cssCode: e.cssCode,
2585
2572
  contentId: e.contentId
2586
2573
  })}
2587
- ${yn({
2574
+ ${pn({
2588
2575
  customFonts: e.customFonts
2589
2576
  })}
2590
2577
  ${xn(e.isNestedRender)}
@@ -2627,14 +2614,14 @@ function Se(e) {
2627
2614
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2628
2615
  contentId: (a = e.content) == null ? void 0 : a.id
2629
2616
  }), n = [
2630
- ...pe(),
2617
+ ...ye(),
2631
2618
  ...e.customComponents || []
2632
2619
  ].reduce(
2633
- (k, { component: w, ...y }) => ({
2620
+ (k, { component: w, ...p }) => ({
2634
2621
  ...k,
2635
- [y.name]: {
2622
+ [p.name]: {
2636
2623
  component: w,
2637
- ...fe(y)
2624
+ ...fe(p)
2638
2625
  }
2639
2626
  }),
2640
2627
  {}
@@ -2655,12 +2642,12 @@ function Se(e) {
2655
2642
  apiKey: e.apiKey,
2656
2643
  apiVersion: e.apiVersion,
2657
2644
  componentInfos: [
2658
- ...pe(),
2645
+ ...ye(),
2659
2646
  ...e.customComponents || []
2660
2647
  ].reduce(
2661
- (k, { component: w, ...y }) => ({
2648
+ (k, { component: w, ...p }) => ({
2662
2649
  ...k,
2663
- [y.name]: fe(y)
2650
+ [p.name]: fe(p)
2664
2651
  }),
2665
2652
  {}
2666
2653
  ),
@@ -2741,7 +2728,7 @@ function Tn(e) {
2741
2728
  });
2742
2729
  };
2743
2730
  return /* @__PURE__ */ P(C, { children: [
2744
- !e.isNestedRender && H !== "reactNative" ? /* @__PURE__ */ c(
2731
+ !e.isNestedRender && M !== "reactNative" ? /* @__PURE__ */ c(
2745
2732
  ie,
2746
2733
  {
2747
2734
  id: "builderio-init-variants-fns",
@@ -2887,6 +2874,6 @@ export {
2887
2874
  Et as Image,
2888
2875
  Wt as Section,
2889
2876
  Pn as Symbol,
2890
- Ut as Text,
2877
+ Ht as Text,
2891
2878
  Gt as Video
2892
2879
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-3ae58f1b.cjs");require("react/jsx-runtime");require("react");require("next/navigation");require("lru-cache");exports.Blocks=t.Blocks;exports.BuilderContext=t.BuilderContext;exports.Button=t.Button;exports.Columns=t.Columns;exports.Content=t.Content;exports.Fragment=t.Fragment;exports.Image=t.Image;exports.Section=t.Section;exports.Symbol=t.Symbol;exports.Text=t.Text;exports.Video=t.Video;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-f64a4c2d.cjs");require("react/jsx-runtime");require("react");require("next/navigation");require("lru-cache");exports.Blocks=t.Blocks;exports.BuilderContext=t.BuilderContext;exports.Button=t.Button;exports.Columns=t.Columns;exports.Content=t.Content;exports.Fragment=t.Fragment;exports.Image=t.Image;exports.Section=t.Section;exports.Symbol=t.Symbol;exports.Text=t.Text;exports.Video=t.Video;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
@@ -1,5 +1,5 @@
1
1
  import { Blocks as n, BuilderContext as m, Button as c, Columns as g, Content as p, Fragment as a, Image as d, Section as l, Symbol as u, Text as f, Video as B } from "./blocks-exports.mjs";
2
- import { _processContentResult as E, createRegisterComponentMessage as h, fetchBuilderProps as x, fetchEntries as S, fetchOneEntry as b, getBuilderSearchParams as P, isEditing as k, isPreviewing as y, register as R, setEditorSettings as T, subscribeToEditor as v, track as w } from "./server-entry-34aed7a8.js";
2
+ import { _processContentResult as E, createRegisterComponentMessage as h, fetchBuilderProps as x, fetchEntries as S, fetchOneEntry as b, getBuilderSearchParams as P, isEditing as k, isPreviewing as y, register as R, setEditorSettings as T, subscribeToEditor as v, track as w } from "./server-entry-7f981733.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "next/navigation";
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ivm=require("isolated-vm"),serverEntry=require("./server-entry-3ae58f1b.cjs");require("lru-cache");const SDK_NAME_FOR_TARGET=(()=>{switch(serverEntry.TARGET){case"rsc":return"react-nextjs";case"reactNative":return"react-native";default:return serverEntry.TARGET}})(),SDK_NAME=`@builder.io/sdk-${SDK_NAME_FOR_TARGET}`,noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(t){}const INJECTED_IVM_GLOBAL="BUILDER_IVM";let IVM_INSTANCE=null;const setIvm=(t,e={})=>{IVM_INSTANCE=t,setIsolateContext(e)},SHOULD_MENTION_INITIALIZE_SCRIPT=SDK_NAME==="@builder.io/sdk-react-nextjs"||SDK_NAME==="@builder.io/sdk-react",getIvm=()=>{try{if(IVM_INSTANCE)return IVM_INSTANCE;const e=safeDynamicRequire("isolated-vm");if(e)return e}catch(e){serverEntry.logger.error("isolated-vm import error.",e)}const t=`${serverEntry.MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ivm=require("isolated-vm"),serverEntry=require("./server-entry-f64a4c2d.cjs");require("lru-cache");const SDK_NAME_FOR_TARGET=(()=>{switch(serverEntry.TARGET){case"rsc":return"react-nextjs";case"reactNative":return"react-native";default:return serverEntry.TARGET}})(),SDK_NAME=`@builder.io/sdk-${SDK_NAME_FOR_TARGET}`,noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(t){}const INJECTED_IVM_GLOBAL="BUILDER_IVM";let IVM_INSTANCE=null;const setIvm=(t,e={})=>{IVM_INSTANCE=t,setIsolateContext(e)},SHOULD_MENTION_INITIALIZE_SCRIPT=SDK_NAME==="@builder.io/sdk-react-nextjs"||SDK_NAME==="@builder.io/sdk-react",getIvm=()=>{try{if(IVM_INSTANCE)return IVM_INSTANCE;const e=safeDynamicRequire("isolated-vm");if(e)return e}catch(e){serverEntry.logger.error("isolated-vm import error.",e)}const t=`${serverEntry.MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
2
2
 
3
3
  SOLUTION: In a server-only execution path within your application, do one of the following:
4
4
 
@@ -1,5 +1,5 @@
1
1
  import ivm from "isolated-vm";
2
- import { TARGET, logger, MSG_PREFIX } from "./server-entry-34aed7a8.js";
2
+ import { TARGET, logger, MSG_PREFIX } from "./server-entry-7f981733.js";
3
3
  import "lru-cache";
4
4
  const SDK_NAME_FOR_TARGET = (() => {
5
5
  switch (TARGET) {
@@ -509,7 +509,7 @@ function J(e, t) {
509
509
  const n = new URL(t.origin), r = n.hostname;
510
510
  return (e || $e).findIndex((o) => o.startsWith("*.") ? r.endsWith(o.slice(1)) : o === r) > -1;
511
511
  }
512
- const Ge = "0.15.1", A = {};
512
+ const Ge = "0.15.2", A = {};
513
513
  function He(e, t) {
514
514
  let n = A[e];
515
515
  if (n || (n = A[e] = []), n.push(t), c()) {