@builder.io/sdk-react 4.0.0 → 4.0.1

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 (66) hide show
  1. package/lib/browser/blocks-exports.cjs +8 -8
  2. package/lib/browser/blocks-exports.mjs +343 -340
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/server-entry-0e0758cb.cjs +2 -0
  6. package/lib/browser/{server-entry-422fad84.js → server-entry-403d3877.js} +8 -1
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{accordion-2f83fc75.cjs → accordion-02a74a7b.cjs} +1 -1
  10. package/lib/edge/{accordion-e1b77652.js → accordion-46e5b47a.js} +1 -1
  11. package/lib/edge/{blocks-0885e182.js → blocks-27f4c960.js} +2 -2
  12. package/lib/edge/{blocks-5165c164.cjs → blocks-43b7cd64.cjs} +1 -1
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-d7197e96.cjs → button-b1f2e20e.cjs} +1 -1
  16. package/lib/edge/{button-d878f35c.js → button-c26a8cc8.js} +2 -2
  17. package/lib/edge/{columns-46729516.cjs → columns-5a3e9ac8.cjs} +1 -1
  18. package/lib/edge/{columns-b365c86a.js → columns-9a6cd1b4.js} +3 -3
  19. package/lib/edge/{content-variants-1594c868.js → content-variants-3085ec74.js} +26 -23
  20. package/lib/edge/{content-variants-c6cab1c3.cjs → content-variants-eff73ca9.cjs} +5 -5
  21. package/lib/edge/{form-9844766c.cjs → form-bf3ca65d.cjs} +1 -1
  22. package/lib/edge/{form-b66c20a3.js → form-f2aa1c12.js} +3 -3
  23. package/lib/edge/{get-class-prop-name-0b992cfb.cjs → get-class-prop-name-7cdcaf94.cjs} +1 -1
  24. package/lib/edge/{get-class-prop-name-dac81472.js → get-class-prop-name-e41a3976.js} +1 -1
  25. package/lib/edge/{img-c4a772a8.js → img-2a060e61.js} +1 -1
  26. package/lib/edge/{img-fb35350a.cjs → img-2c718c5f.cjs} +1 -1
  27. package/lib/edge/index.cjs +1 -1
  28. package/lib/edge/index.mjs +1 -1
  29. package/lib/edge/{input-122768ac.cjs → input-213f973c.cjs} +1 -1
  30. package/lib/edge/{input-57c5b097.js → input-f270ae3b.js} +1 -1
  31. package/lib/edge/{personalization-container-a17ae615.cjs → personalization-container-b03bc073.cjs} +1 -1
  32. package/lib/edge/{personalization-container-7e63edce.js → personalization-container-b85b14c3.js} +4 -4
  33. package/lib/edge/{select-7f750b70.cjs → select-d6ff55b2.cjs} +1 -1
  34. package/lib/edge/{select-3d4324ef.js → select-e12e1a87.js} +1 -1
  35. package/lib/edge/{server-entry-c1673af2.js → server-entry-b94c45af.js} +8 -1
  36. package/lib/edge/server-entry-d0313f00.cjs +2 -0
  37. package/lib/edge/server-entry.cjs +1 -1
  38. package/lib/edge/server-entry.mjs +1 -1
  39. package/lib/edge/{slot-05ef18a0.js → slot-2670ac48.js} +3 -3
  40. package/lib/edge/{slot-123c0993.cjs → slot-5ee0ac5d.cjs} +1 -1
  41. package/lib/edge/{symbol-ee314d5a.cjs → symbol-7e58faf5.cjs} +1 -1
  42. package/lib/edge/{symbol-f488bea0.js → symbol-a0b2e083.js} +2 -2
  43. package/lib/edge/{tabs-edb82022.cjs → tabs-1f475bd4.cjs} +1 -1
  44. package/lib/edge/{tabs-244d53fa.js → tabs-931291c4.js} +3 -3
  45. package/lib/node/blocks-exports.cjs +8 -8
  46. package/lib/node/blocks-exports.mjs +123 -120
  47. package/lib/node/index.cjs +1 -1
  48. package/lib/node/index.mjs +3 -3
  49. package/lib/node/init.cjs +1 -1
  50. package/lib/node/init.mjs +3 -3
  51. package/lib/node/server-entry-24943b12.cjs +2 -0
  52. package/lib/node/{server-entry-4df60fc5.js → server-entry-a017e97a.js} +8 -1
  53. package/lib/node/server-entry.cjs +1 -1
  54. package/lib/node/server-entry.mjs +1 -1
  55. package/lib/node/{setIvm-0edfc727.js → setIvm-0a7e7bf0.js} +1 -1
  56. package/lib/node/{setIvm-6405aa63.cjs → setIvm-dcd69a69.cjs} +1 -1
  57. package/lib/node/setIvm.cjs +1 -1
  58. package/lib/node/setIvm.mjs +2 -2
  59. package/lib/node/{should-force-browser-runtime-in-node-6d4dbff9.cjs → should-force-browser-runtime-in-node-0ca8d8b1.cjs} +1 -1
  60. package/lib/node/{should-force-browser-runtime-in-node-7a39b073.js → should-force-browser-runtime-in-node-c51ac820.js} +1 -1
  61. package/package.json +1 -1
  62. package/types/constants/sdk-version.d.ts +1 -1
  63. package/types/helpers/subscribe-to-editor.d.ts +2 -0
  64. package/lib/browser/server-entry-916191b4.cjs +0 -2
  65. package/lib/edge/server-entry-77166102.cjs +0 -2
  66. package/lib/node/server-entry-8ab8c78b.cjs +0 -2
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { TARGET as F, isBrowser as L, logger as re, checkIsDefined as ae, isPreviewing as G, isEditing as W, userAttributesService as fe, getDefaultCanTrack as H, logFetch as Ie, registerInsertMenu as ze, setupBrowserForEditing as Ke, createRegisterComponentMessage as Je, _track as he, fetchOneEntry as Ee, createEditorListener as Ge, serializeIncludingFunctions as ge, handleABTestingSync as Qe } from "./server-entry-4df60fc5.js";
3
- import { setClientUserAttributes as Ci } from "./server-entry-4df60fc5.js";
2
+ import { TARGET as F, isBrowser as L, logger as re, checkIsDefined as ae, isPreviewing as G, isEditing as W, userAttributesService as fe, getDefaultCanTrack as H, logFetch as Ie, registerInsertMenu as ze, setupBrowserForEditing as Ke, createRegisterComponentMessage as Je, _track as he, fetchOneEntry as Ee, createEditorListener as Ge, serializeIncludingFunctions as ge, handleABTestingSync as Qe } from "./server-entry-a017e97a.js";
3
+ import { setClientUserAttributes as Ci } from "./server-entry-a017e97a.js";
4
4
  import { jsx as s, Fragment as R, jsxs as N } from "react/jsx-runtime";
5
5
  import * as Ye from "react";
6
6
  import { createContext as Re, useEffect as B, useState as E, useRef as D, useContext as be, createElement as Ve } from "react";
7
- import { getFunctionArguments as Xe, flattenState as Ze, runInNode as et, parseCode as tt, getBuilderGlobals as nt, set as Pe, fastClone as le } from "./setIvm-0edfc727.js";
8
- import { shouldForceBrowserRuntimeInNode as it } from "./should-force-browser-runtime-in-node-7a39b073.js";
7
+ import { getFunctionArguments as Xe, flattenState as Ze, runInNode as et, parseCode as tt, getBuilderGlobals as nt, set as Pe, fastClone as le } from "./setIvm-0a7e7bf0.js";
8
+ import { shouldForceBrowserRuntimeInNode as it } from "./should-force-browser-runtime-in-node-c51ac820.js";
9
9
  const at = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), ot = (e) => typeof e == "string" && at.has(e.toLowerCase());
10
10
  function se(e) {
11
11
  return /* @__PURE__ */ s(R, { children: ot(e.TagName) ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ s(R, { children: typeof e.TagName == "string" ? /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
@@ -562,7 +562,7 @@ function $t(e) {
562
562
  return ae(i.hide) ? !i.hide : ae(i.show) ? i.show : !0;
563
563
  }
564
564
  function n() {
565
- var C, V, w, k, m;
565
+ var C, V, w, x, m;
566
566
  const i = e.block, a = i.responsiveStyles, r = e.context.content, o = _e(
567
567
  ((C = r == null ? void 0 : r.meta) == null ? void 0 : C.breakpoints) || {}
568
568
  ), l = !!((w = (V = r == null ? void 0 : r.meta) == null ? void 0 : V.breakpoints) != null && w.xsmall), d = a == null ? void 0 : a.large, c = a == null ? void 0 : a.medium, h = a == null ? void 0 : a.small, y = a == null ? void 0 : a.xsmall, u = i.id;
@@ -585,7 +585,7 @@ function $t(e) {
585
585
  "small",
586
586
  o
587
587
  )
588
- }) : "", x = y && l ? _({
588
+ }) : "", S = y && l ? _({
589
589
  className: u,
590
590
  styles: y,
591
591
  mediaQuery: X(
@@ -593,10 +593,10 @@ function $t(e) {
593
593
  o
594
594
  )
595
595
  }) : "", b = i.animations && i.animations.find((p) => p.trigger === "hover");
596
- let S = "";
596
+ let k = "";
597
597
  if (b) {
598
- const p = ((m = (k = b.steps) == null ? void 0 : k[1]) == null ? void 0 : m.styles) || {};
599
- S = _({
598
+ const p = ((m = (x = b.steps) == null ? void 0 : x[1]) == null ? void 0 : m.styles) || {};
599
+ k = _({
600
600
  className: `${u}:hover`,
601
601
  styles: {
602
602
  ...p,
@@ -611,8 +611,8 @@ function $t(e) {
611
611
  v,
612
612
  f,
613
613
  g,
614
- x,
615
- S
614
+ S,
615
+ k
616
616
  ].join(" ");
617
617
  }
618
618
  return /* @__PURE__ */ s(R, { children: n() && t() ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
@@ -848,18 +848,18 @@ function Y(e) {
848
848
  return e.block.tagName === "a" || ((g = a().properties) == null ? void 0 : g.href) || a().href ? e.linkComponent || "a" : e.block.tagName || "div";
849
849
  }
850
850
  function l() {
851
- var x, b;
852
- if ((x = e.block.repeat) != null && x.collection)
851
+ var S, b;
852
+ if ((S = e.block.repeat) != null && S.collection)
853
853
  return !!((b = t == null ? void 0 : t()) != null && b.length);
854
854
  const f = "hide" in a() ? a().hide : !1;
855
855
  return ("show" in a() ? a().show : !0) && !f;
856
856
  }
857
857
  function d() {
858
- var g, x;
859
- return !((g = r == null ? void 0 : r()) != null && g.component) && !t() ? (x = a().children) != null ? x : [] : [];
858
+ var g, S;
859
+ return !((g = r == null ? void 0 : r()) != null && g.component) && !t() ? (S = a().children) != null ? S : [] : [];
860
860
  }
861
861
  function c() {
862
- var f, g, x, b;
862
+ var f, g, S, b;
863
863
  return {
864
864
  blockChildren: (f = a().children) != null ? f : [],
865
865
  componentRef: (g = r == null ? void 0 : r()) == null ? void 0 : g.component,
@@ -878,15 +878,15 @@ function Y(e) {
878
878
  linkComponent: e.linkComponent,
879
879
  registeredComponents: e.registeredComponents,
880
880
  builderBlock: a(),
881
- includeBlockProps: ((x = r == null ? void 0 : r()) == null ? void 0 : x.noWrap) === !0,
881
+ includeBlockProps: ((S = r == null ? void 0 : r()) == null ? void 0 : S.noWrap) === !0,
882
882
  isInteractive: !((b = r == null ? void 0 : r()) != null && b.isRSC && F === "rsc")
883
883
  };
884
884
  }
885
885
  return B(() => {
886
886
  const f = a().id, g = a().animations;
887
887
  g && f && Ct(
888
- g.map((x) => ({
889
- ...x,
888
+ g.map((S) => ({
889
+ ...S,
890
890
  elementId: f
891
891
  }))
892
892
  );
@@ -1055,7 +1055,7 @@ function $(e) {
1055
1055
  }
1056
1056
  const zt = (e) => `builder-columns ${e}-breakpoints`;
1057
1057
  function Kt(e) {
1058
- var g, x;
1058
+ var g, S;
1059
1059
  function t() {
1060
1060
  return typeof e.space == "number" ? e.space || 0 : 20;
1061
1061
  }
@@ -1069,24 +1069,24 @@ function Kt(e) {
1069
1069
  return b.link ? e.builderLinkComponent || "a" : "div";
1070
1070
  }
1071
1071
  function r(b) {
1072
- var S;
1073
- return ((S = n()[b]) == null ? void 0 : S.width) || 100 / n().length;
1072
+ var k;
1073
+ return ((k = n()[b]) == null ? void 0 : k.width) || 100 / n().length;
1074
1074
  }
1075
1075
  function o(b) {
1076
- const S = r(b), C = t() * (n().length - 1) * (S / 100);
1077
- return `calc(${S}% - ${C}px)`;
1076
+ const k = r(b), C = t() * (n().length - 1) * (k / 100);
1077
+ return `calc(${k}% - ${C}px)`;
1078
1078
  }
1079
1079
  function l({
1080
1080
  stackedStyle: b,
1081
- desktopStyle: S
1081
+ desktopStyle: k
1082
1082
  }) {
1083
- return i() === "tablet" ? b : S;
1083
+ return i() === "tablet" ? b : k;
1084
1084
  }
1085
1085
  function d({
1086
1086
  stackedStyle: b,
1087
- desktopStyle: S
1087
+ desktopStyle: k
1088
1088
  }) {
1089
- return i() === "never" ? S : b;
1089
+ return i() === "never" ? k : b;
1090
1090
  }
1091
1091
  function c() {
1092
1092
  return e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column";
@@ -1101,7 +1101,7 @@ function Kt(e) {
1101
1101
  };
1102
1102
  }
1103
1103
  function y(b) {
1104
- const S = b === 0 ? 0 : t(), C = o(b), V = `${S}px`, w = "100%", k = 0;
1104
+ const k = b === 0 ? 0 : t(), C = o(b), V = `${k}px`, w = "100%", x = 0;
1105
1105
  return {
1106
1106
  ...{
1107
1107
  display: "flex",
@@ -1115,7 +1115,7 @@ function Kt(e) {
1115
1115
  desktopStyle: C
1116
1116
  }),
1117
1117
  "--column-margin-left-mobile": d({
1118
- stackedStyle: k,
1118
+ stackedStyle: x,
1119
1119
  desktopStyle: V
1120
1120
  }),
1121
1121
  "--column-width-tablet": l({
@@ -1123,7 +1123,7 @@ function Kt(e) {
1123
1123
  desktopStyle: C
1124
1124
  }),
1125
1125
  "--column-margin-left-tablet": l({
1126
- stackedStyle: k,
1126
+ stackedStyle: x,
1127
1127
  desktopStyle: V
1128
1128
  })
1129
1129
  };
@@ -1162,13 +1162,13 @@ function Kt(e) {
1162
1162
  },
1163
1163
  `;
1164
1164
  }
1165
- function f(b, S) {
1165
+ function f(b, k) {
1166
1166
  return {
1167
1167
  ...b.link ? {
1168
1168
  href: b.link
1169
1169
  } : {},
1170
1170
  [M()]: "builder-column",
1171
- style: Le(y(S))
1171
+ style: Le(y(k))
1172
1172
  };
1173
1173
  }
1174
1174
  return /* @__PURE__ */ N(R, { children: [
@@ -1186,16 +1186,16 @@ function Kt(e) {
1186
1186
  nonce: e.builderContext.nonce
1187
1187
  }
1188
1188
  ),
1189
- (x = e.columns) == null ? void 0 : x.map((b, S) => /* @__PURE__ */ s(
1189
+ (S = e.columns) == null ? void 0 : S.map((b, k) => /* @__PURE__ */ s(
1190
1190
  se,
1191
1191
  {
1192
1192
  TagName: a(b),
1193
1193
  actionAttributes: {},
1194
- attributes: f(b, S),
1194
+ attributes: f(b, k),
1195
1195
  children: /* @__PURE__ */ s(
1196
1196
  $,
1197
1197
  {
1198
- path: `columns.${S}.blocks`,
1198
+ path: `columns.${k}.blocks`,
1199
1199
  parent: e.builderBlock.id,
1200
1200
  context: e.builderContext,
1201
1201
  registeredComponents: e.builderComponents,
@@ -1207,7 +1207,7 @@ function Kt(e) {
1207
1207
  }
1208
1208
  )
1209
1209
  },
1210
- S
1210
+ k
1211
1211
  ))
1212
1212
  ]
1213
1213
  }
@@ -1524,22 +1524,22 @@ function en(e) {
1524
1524
  let u = null;
1525
1525
  if (e.grid && t.length && document) {
1526
1526
  const f = t[0];
1527
- let x = document.querySelector(
1527
+ let S = document.querySelector(
1528
1528
  `.builder-accordion-title[data-index="${f}"]`
1529
1529
  );
1530
- if (u = f, x) {
1531
- let b = x.getBoundingClientRect();
1532
- for (; x = x && x.nextElementSibling; )
1533
- if (x) {
1534
- if (x.classList.contains("builder-accordion-detail"))
1530
+ if (u = f, S) {
1531
+ let b = S.getBoundingClientRect();
1532
+ for (; S = S && S.nextElementSibling; )
1533
+ if (S) {
1534
+ if (S.classList.contains("builder-accordion-detail"))
1535
1535
  continue;
1536
- const S = x.getBoundingClientRect();
1537
- if (S.left > b.left) {
1536
+ const k = S.getBoundingClientRect();
1537
+ if (k.left > b.left) {
1538
1538
  const C = parseInt(
1539
- x.getAttribute("data-index") || "",
1539
+ S.getAttribute("data-index") || "",
1540
1540
  10
1541
1541
  );
1542
- isNaN(C) || (b = S, u = C);
1542
+ isNaN(C) || (b = k, u = C);
1543
1543
  } else
1544
1544
  break;
1545
1545
  }
@@ -2025,14 +2025,14 @@ function sn(e, t, n, i) {
2025
2025
  if (h && h.property === "urlPath" && h.value && typeof h.value == "string" && h.value !== "/" && h.value.endsWith("/") && (f = h.value.slice(0, -1)), !(u && v))
2026
2026
  return !0;
2027
2027
  if (Array.isArray(f))
2028
- return v === "isNot" ? f.every((x) => o(c, {
2028
+ return v === "isNot" ? f.every((S) => o(c, {
2029
2029
  property: u,
2030
2030
  operator: v,
2031
- value: x
2032
- })) : !!f.find((x) => o(c, {
2031
+ value: S
2032
+ })) : !!f.find((S) => o(c, {
2033
2033
  property: u,
2034
2034
  operator: v,
2035
- value: x
2035
+ value: S
2036
2036
  }));
2037
2037
  const g = c[u];
2038
2038
  if (Array.isArray(g))
@@ -2238,29 +2238,29 @@ const fn = (e, t, n) => `
2238
2238
  })();
2239
2239
  `;
2240
2240
  function hn(e) {
2241
- var g, x, b, S, C, V, w;
2241
+ var g, S, b, k, C, V, w;
2242
2242
  const t = D(null), [n, i] = E(
2243
2243
  () => fe.getUserAttributes()
2244
2244
  ), [a, r] = E(
2245
2245
  () => {
2246
- var k, m, p;
2246
+ var x, m, p;
2247
2247
  return fn(
2248
2248
  e.variants,
2249
- ((k = e.builderBlock) == null ? void 0 : k.id) || "none",
2249
+ ((x = e.builderBlock) == null ? void 0 : x.id) || "none",
2250
2250
  (p = (m = e.builderContext) == null ? void 0 : m.rootState) == null ? void 0 : p.locale
2251
2251
  );
2252
2252
  }
2253
2253
  ), [o, l] = E(() => []), [d, c] = E(
2254
2254
  () => {
2255
- var k;
2255
+ var x;
2256
2256
  return dn(
2257
2257
  e.variants,
2258
- H((k = e.builderContext) == null ? void 0 : k.canTrack)
2258
+ H((x = e.builderContext) == null ? void 0 : x.canTrack)
2259
2259
  );
2260
2260
  }
2261
2261
  ), [h, y] = E(() => !1);
2262
2262
  function u() {
2263
- return (e.variants || []).filter((k) => {
2263
+ return (e.variants || []).filter((x) => {
2264
2264
  var m, p, I, T;
2265
2265
  return sn(
2266
2266
  {
@@ -2269,17 +2269,17 @@ function hn(e) {
2269
2269
  } : {},
2270
2270
  ...n
2271
2271
  },
2272
- k.query,
2273
- k.startDate,
2274
- k.endDate
2272
+ x.query,
2273
+ x.startDate,
2274
+ x.endDate
2275
2275
  );
2276
2276
  });
2277
2277
  }
2278
2278
  function v() {
2279
- var k;
2279
+ var x;
2280
2280
  return mn({
2281
2281
  variants: e.variants,
2282
- fallbackBlocks: (k = e.builderBlock) == null ? void 0 : k.children,
2282
+ fallbackBlocks: (x = e.builderBlock) == null ? void 0 : x.children,
2283
2283
  isHydrated: h,
2284
2284
  filteredVariants: u(),
2285
2285
  previewingIndex: e.previewingIndex
@@ -2287,7 +2287,7 @@ function hn(e) {
2287
2287
  }
2288
2288
  function f() {
2289
2289
  return (e.variants || []).map(
2290
- (k, m) => {
2290
+ (x, m) => {
2291
2291
  var p;
2292
2292
  return `[data-variant-id="${(p = e.builderBlock) == null ? void 0 : p.id}-${m}"] { display: none; } `;
2293
2293
  }
@@ -2296,7 +2296,7 @@ function hn(e) {
2296
2296
  return B(() => {
2297
2297
  var m;
2298
2298
  y(!0);
2299
- const k = fe.subscribeOnUserAttributesChange(
2299
+ const x = fe.subscribeOnUserAttributesChange(
2300
2300
  (p) => {
2301
2301
  i(p);
2302
2302
  }
@@ -2326,9 +2326,9 @@ function hn(e) {
2326
2326
  });
2327
2327
  }).observe(t.current));
2328
2328
  }
2329
- o.push(k);
2329
+ o.push(x);
2330
2330
  }, []), B(() => () => {
2331
- o.forEach((k) => k());
2331
+ o.forEach((x) => x());
2332
2332
  }, []), /* @__PURE__ */ N(
2333
2333
  "div",
2334
2334
  {
@@ -2337,7 +2337,7 @@ function hn(e) {
2337
2337
  className: `builder-personalization-container ${((g = e.attributes) == null ? void 0 : g.className) || ""}`,
2338
2338
  children: [
2339
2339
  d ? /* @__PURE__ */ N(R, { children: [
2340
- (x = e.variants) == null ? void 0 : x.map((k, m) => {
2340
+ (S = e.variants) == null ? void 0 : S.map((x, m) => {
2341
2341
  var p, I;
2342
2342
  return /* @__PURE__ */ s(
2343
2343
  "template",
@@ -2346,7 +2346,7 @@ function hn(e) {
2346
2346
  children: /* @__PURE__ */ s(
2347
2347
  $,
2348
2348
  {
2349
- blocks: k.blocks,
2349
+ blocks: x.blocks,
2350
2350
  parent: (I = e.builderBlock) == null ? void 0 : I.id,
2351
2351
  path: `component.options.variants.${m}.blocks`
2352
2352
  }
@@ -2360,7 +2360,7 @@ function hn(e) {
2360
2360
  {
2361
2361
  nonce: ((b = e.builderContext) == null ? void 0 : b.nonce) || "",
2362
2362
  styles: f(),
2363
- id: `variants-styles-${(S = e.builderBlock) == null ? void 0 : S.id}`
2363
+ id: `variants-styles-${(k = e.builderBlock) == null ? void 0 : k.id}`
2364
2364
  }
2365
2365
  ),
2366
2366
  /* @__PURE__ */ s(
@@ -3115,8 +3115,8 @@ function An(e) {
3115
3115
  }
3116
3116
  y.preventDefault();
3117
3117
  const f = y.currentTarget || y.target, g = e.customHeaders || {};
3118
- let x;
3119
- const b = new FormData(f), S = Array.from(f.querySelectorAll("input,select,textarea")).filter((m) => !!m.name).map((m) => {
3118
+ let S;
3119
+ const b = new FormData(f), k = Array.from(f.querySelectorAll("input,select,textarea")).filter((m) => !!m.name).map((m) => {
3120
3120
  let p;
3121
3121
  const I = m.name;
3122
3122
  if (m instanceof HTMLInputElement)
@@ -3141,25 +3141,25 @@ function An(e) {
3141
3141
  };
3142
3142
  });
3143
3143
  let C = e.contentType;
3144
- if (e.sendSubmissionsTo === "email" && (C = "multipart/form-data"), Array.from(S).forEach(({ value: m }) => {
3144
+ if (e.sendSubmissionsTo === "email" && (C = "multipart/form-data"), Array.from(k).forEach(({ value: m }) => {
3145
3145
  (m instanceof File || Array.isArray(m) && m[0] instanceof File || m instanceof FileList) && (C = "multipart/form-data");
3146
3146
  }), C !== "application/json")
3147
- x = b;
3147
+ S = b;
3148
3148
  else {
3149
3149
  const m = {};
3150
- Array.from(S).forEach(({ value: p, key: I }) => {
3150
+ Array.from(k).forEach(({ value: p, key: I }) => {
3151
3151
  Pe(m, I, p);
3152
- }), x = JSON.stringify(m);
3152
+ }), S = JSON.stringify(m);
3153
3153
  }
3154
3154
  C && C !== "multipart/form-data" && (u && ((v = e.action) != null && v.includes("zapier.com")) || (g["content-type"] = C));
3155
- const V = new CustomEvent("presubmit", { detail: { body: x } });
3155
+ const V = new CustomEvent("presubmit", { detail: { body: S } });
3156
3156
  if (t.current && (t.current.dispatchEvent(V), V.defaultPrevented))
3157
3157
  return;
3158
3158
  i("sending");
3159
3159
  const w = `${Bn() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
3160
3160
  e.sendSubmissionsToEmail || ""
3161
- )}&name=${encodeURIComponent(e.name || "")}`, k = e.sendSubmissionsTo === "email" ? w : e.action;
3162
- Ie(k), fetch(k, { body: x, headers: g, method: e.method || "post" }).then(
3161
+ )}&name=${encodeURIComponent(e.name || "")}`, x = e.sendSubmissionsTo === "email" ? w : e.action;
3162
+ Ie(x), fetch(x, { body: S, headers: g, method: e.method || "post" }).then(
3163
3163
  async (m) => {
3164
3164
  let p;
3165
3165
  const I = m.headers.get("content-type");
@@ -3596,14 +3596,14 @@ function Mn(e) {
3596
3596
  f.forEach(function(g) {
3597
3597
  if (!g.isIntersecting)
3598
3598
  return;
3599
- const x = g.target;
3599
+ const S = g.target;
3600
3600
  try {
3601
- Array.from(x.children).filter(
3601
+ Array.from(S.children).filter(
3602
3602
  (b) => b instanceof HTMLElement && b.tagName === "SOURCE"
3603
3603
  ).forEach((b) => {
3604
- const S = b.dataset.src;
3605
- S && (b.src = S);
3606
- }), x.load(), v.unobserve(x);
3604
+ const k = b.dataset.src;
3605
+ k && (b.src = k);
3606
+ }), S.load(), v.unobserve(S);
3607
3607
  } catch (b) {
3608
3608
  console.error("Error loading lazy video:", b);
3609
3609
  }
@@ -3961,22 +3961,22 @@ font-weight: ${l};
3961
3961
  }
3962
3962
  `, li = (e) => e ? "" : ri, si = (e) => `variant-${e}`;
3963
3963
  function ci(e) {
3964
- var S, C, V;
3964
+ var k, C, V;
3965
3965
  const t = D(null);
3966
3966
  function n(w) {
3967
3967
  var m, p;
3968
- const k = {
3968
+ const x = {
3969
3969
  ...e.builderContextSignal.rootState,
3970
3970
  ...w
3971
3971
  };
3972
- e.builderContextSignal.rootSetState ? (p = (m = e.builderContextSignal).rootSetState) == null || p.call(m, k) : e.setBuilderContextSignal((I) => ({
3972
+ e.builderContextSignal.rootSetState ? (p = (m = e.builderContextSignal).rootSetState) == null || p.call(m, x) : e.setBuilderContextSignal((I) => ({
3973
3973
  ...I,
3974
- rootState: k
3974
+ rootState: x
3975
3975
  }));
3976
3976
  }
3977
3977
  function i(w) {
3978
3978
  var m, p, I, T, P;
3979
- const k = {
3979
+ const x = {
3980
3980
  ...e.builderContextSignal.content,
3981
3981
  ...w,
3982
3982
  data: {
@@ -3991,7 +3991,7 @@ function ci(e) {
3991
3991
  };
3992
3992
  e.setBuilderContextSignal((A) => ({
3993
3993
  ...A,
3994
- content: k
3994
+ content: x
3995
3995
  }));
3996
3996
  }
3997
3997
  function a() {
@@ -4008,29 +4008,32 @@ function ci(e) {
4008
4008
  model: e.model,
4009
4009
  trustedHosts: e.trustedHosts,
4010
4010
  callbacks: {
4011
- configureSdk: (k) => {
4011
+ configureSdk: (x) => {
4012
4012
  var I;
4013
- const { breakpoints: m, contentId: p } = k;
4013
+ const { breakpoints: m, contentId: p } = x;
4014
4014
  !p || p !== ((I = e.builderContextSignal.content) == null ? void 0 : I.id) || m && i({
4015
4015
  meta: {
4016
4016
  breakpoints: m
4017
4017
  }
4018
4018
  });
4019
4019
  },
4020
- animation: (k) => {
4021
- De(k);
4020
+ animation: (x) => {
4021
+ De(x);
4022
4022
  },
4023
- contentUpdate: (k) => {
4024
- i(k);
4023
+ contentUpdate: (x) => {
4024
+ i(x);
4025
+ },
4026
+ stateUpdate: (x) => {
4027
+ n(x);
4025
4028
  }
4026
4029
  }
4027
4030
  })(w);
4028
4031
  }
4029
4032
  const [d, c] = E(() => ({})), [h, y] = E(() => ({})), [u, v] = E(() => !1);
4030
4033
  function f(w) {
4031
- var k, m;
4034
+ var x, m;
4032
4035
  if (e.builderContextSignal.content) {
4033
- const p = (k = e.builderContextSignal.content) == null ? void 0 : k.testVariationId, I = (m = e.builderContextSignal.content) == null ? void 0 : m.id;
4036
+ const p = (x = e.builderContextSignal.content) == null ? void 0 : x.testVariationId, I = (m = e.builderContextSignal.content) == null ? void 0 : m.id;
4034
4037
  he({
4035
4038
  apiHost: e.apiHost,
4036
4039
  type: "click",
@@ -4045,8 +4048,8 @@ function ci(e) {
4045
4048
  u || v(!0);
4046
4049
  }
4047
4050
  function g() {
4048
- var k, m, p;
4049
- const w = (p = (m = (k = e.builderContextSignal.content) == null ? void 0 : k.data) == null ? void 0 : m.httpRequests) != null ? p : {};
4051
+ var x, m, p;
4052
+ const w = (p = (m = (x = e.builderContextSignal.content) == null ? void 0 : x.data) == null ? void 0 : m.httpRequests) != null ? p : {};
4050
4053
  Object.entries(w).forEach(([I, T]) => {
4051
4054
  if (!T || h[I] || d[I] && !W())
4052
4055
  return;
@@ -4074,7 +4077,7 @@ function ci(e) {
4074
4077
  });
4075
4078
  });
4076
4079
  }
4077
- function x() {
4080
+ function S() {
4078
4081
  W() && window.dispatchEvent(
4079
4082
  new CustomEvent(
4080
4083
  "builder:component:stateChange",
@@ -4090,8 +4093,8 @@ function ci(e) {
4090
4093
  );
4091
4094
  }
4092
4095
  const b = D(!1);
4093
- return b.current || (g(), x(), b.current = !0), B(() => {
4094
- var w, k, m, p;
4096
+ return b.current || (g(), S(), b.current = !0), B(() => {
4097
+ var w, x, m, p;
4095
4098
  if (L()) {
4096
4099
  if (W() && !e.isNestedRender && (window.addEventListener("message", l), ze(), Ke({
4097
4100
  ...e.locale ? {
@@ -4115,9 +4118,9 @@ function ci(e) {
4115
4118
  }
4116
4119
  }), window.addEventListener(
4117
4120
  "builder:component:stateChangeListenerActivated",
4118
- x
4121
+ S
4119
4122
  )), e.builderContextSignal.content && H(e.canTrack)) {
4120
- const T = (k = e.builderContextSignal.content) == null ? void 0 : k.testVariationId, P = (m = e.builderContextSignal.content) == null ? void 0 : m.id, A = e.apiKey;
4123
+ const T = (x = e.builderContextSignal.content) == null ? void 0 : x.testVariationId, P = (m = e.builderContextSignal.content) == null ? void 0 : m.id, A = e.apiKey;
4121
4124
  he({
4122
4125
  apiHost: e.apiHost,
4123
4126
  type: "impression",
@@ -4148,7 +4151,7 @@ function ci(e) {
4148
4151
  }, []), B(() => {
4149
4152
  e.content && i(e.content);
4150
4153
  }, [e.content]), B(() => {
4151
- x();
4154
+ S();
4152
4155
  }, [e.builderContextSignal.rootState]), B(() => {
4153
4156
  e.data && n(e.data);
4154
4157
  }, [e.data]), B(() => {
@@ -4158,14 +4161,14 @@ function ci(e) {
4158
4161
  }, [e.locale]), B(() => () => {
4159
4162
  L() && (window.removeEventListener("message", l), window.removeEventListener(
4160
4163
  "builder:component:stateChangeListenerActivated",
4161
- x
4164
+ S
4162
4165
  ));
4163
4166
  }, []), /* @__PURE__ */ s(ce.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || Te() ? /* @__PURE__ */ s(
4164
4167
  r,
4165
4168
  {
4166
4169
  ref: t,
4167
4170
  onClick: (w) => f(w),
4168
- "builder-content-id": (S = e.builderContextSignal.content) == null ? void 0 : S.id,
4171
+ "builder-content-id": (k = e.builderContextSignal.content) == null ? void 0 : k.id,
4169
4172
  "builder-model": e.model,
4170
4173
  className: si(
4171
4174
  ((C = e.content) == null ? void 0 : C.testVariationId) || ((V = e.content) == null ? void 0 : V.id)
@@ -4230,22 +4233,22 @@ const di = ({
4230
4233
  meta: e == null ? void 0 : e.meta
4231
4234
  } : void 0;
4232
4235
  function we(e) {
4233
- var c, h, y, u, v, f, g, x, b;
4236
+ var c, h, y, u, v, f, g, S, b;
4234
4237
  const [t, n] = E(
4235
4238
  () => {
4236
- var S, C;
4239
+ var k, C;
4237
4240
  return Xn({
4238
4241
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
4239
- variationId: (S = e.content) == null ? void 0 : S.testVariationId,
4242
+ variationId: (k = e.content) == null ? void 0 : k.testVariationId,
4240
4243
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
4241
4244
  contentId: (C = e.content) == null ? void 0 : C.id
4242
4245
  });
4243
4246
  }
4244
4247
  );
4245
- function i(S) {
4248
+ function i(k) {
4246
4249
  l((C) => ({
4247
4250
  ...C,
4248
- rootState: S
4251
+ rootState: k
4249
4252
  }));
4250
4253
  }
4251
4254
  const [a, r] = E(
@@ -4253,8 +4256,8 @@ function we(e) {
4253
4256
  ...Se(),
4254
4257
  ...e.customComponents || []
4255
4258
  ].reduce(
4256
- (S, { component: C, ...V }) => ({
4257
- ...S,
4259
+ (k, { component: C, ...V }) => ({
4260
+ ...k,
4258
4261
  [V.name]: {
4259
4262
  component: C,
4260
4263
  ...ge(V)
@@ -4282,8 +4285,8 @@ function we(e) {
4282
4285
  ...Se(),
4283
4286
  ...e.customComponents || []
4284
4287
  ].reduce(
4285
- (S, { component: C, ...V }) => ({
4286
- ...S,
4288
+ (k, { component: C, ...V }) => ({
4289
+ ...k,
4287
4290
  [V.name]: ge(V)
4288
4291
  }),
4289
4292
  {}
@@ -4298,9 +4301,9 @@ function we(e) {
4298
4301
  e.apiKey || re.error(
4299
4302
  "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
4300
4303
  );
4301
- const S = (h = (c = o.content) == null ? void 0 : c.data) == null ? void 0 : h.jsCode;
4302
- S && O({
4303
- code: S,
4304
+ const k = (h = (c = o.content) == null ? void 0 : c.data) == null ? void 0 : h.jsCode;
4305
+ k && O({
4306
+ code: k,
4304
4307
  context: e.context || {},
4305
4308
  localState: void 0,
4306
4309
  rootState: o.rootState,
@@ -4358,7 +4361,7 @@ function we(e) {
4358
4361
  /* @__PURE__ */ s(
4359
4362
  $,
4360
4363
  {
4361
- blocks: (b = (x = o.content) == null ? void 0 : x.data) == null ? void 0 : b.blocks,
4364
+ blocks: (b = (S = o.content) == null ? void 0 : S.data) == null ? void 0 : b.blocks,
4362
4365
  context: o,
4363
4366
  registeredComponents: a,
4364
4367
  linkComponent: e.linkComponent
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-8ab8c78b.cjs");require("react/jsx-runtime");require("react");require("./setIvm-6405aa63.cjs");require("./should-force-browser-runtime-in-node-6d4dbff9.cjs");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.setClientUserAttributes=e.setClientUserAttributes;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-24943b12.cjs");require("react/jsx-runtime");require("react");require("./setIvm-dcd69a69.cjs");require("./should-force-browser-runtime-in-node-0ca8d8b1.cjs");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.setClientUserAttributes=e.setClientUserAttributes;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
@@ -1,9 +1,9 @@
1
1
  import { Blocks as n, BuilderContext as m, Button as c, Columns as g, Content as p, Fragment as a, Image as l, Section as u, Symbol as d, Text as C, Video as f } from "./blocks-exports.mjs";
2
- import { _processContentResult as E, createRegisterComponentMessage as b, fetchBuilderProps as h, fetchEntries as x, fetchOneEntry as S, getBuilderSearchParams as P, isEditing as k, isPreviewing as y, register as R, setClientUserAttributes as T, setEditorSettings as v, subscribeToEditor as w, track as A } from "./server-entry-4df60fc5.js";
2
+ import { _processContentResult as E, createRegisterComponentMessage as b, fetchBuilderProps as h, fetchEntries as x, fetchOneEntry as S, getBuilderSearchParams as P, isEditing as k, isPreviewing as y, register as R, setClientUserAttributes as T, setEditorSettings as v, subscribeToEditor as w, track as A } from "./server-entry-a017e97a.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
- import "./setIvm-0edfc727.js";
6
- import "./should-force-browser-runtime-in-node-7a39b073.js";
5
+ import "./setIvm-0a7e7bf0.js";
6
+ import "./should-force-browser-runtime-in-node-c51ac820.js";
7
7
  export {
8
8
  n as Blocks,
9
9
  m as BuilderContext,