@builder.io/sdk-react 2.0.1 → 2.0.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 (63) hide show
  1. package/lib/browser/blocks-exports.cjs +14 -14
  2. package/lib/browser/blocks-exports.mjs +224 -217
  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-29c5c31c.cjs → server-entry-419c051e.cjs} +1 -1
  8. package/lib/browser/{server-entry-f9067095.js → server-entry-825b4408.js} +1 -1
  9. package/lib/browser/server-entry.cjs +1 -1
  10. package/lib/browser/server-entry.mjs +1 -1
  11. package/lib/edge/{accordion-6ad2cec7.cjs → accordion-4f96554c.cjs} +1 -1
  12. package/lib/edge/{accordion-4a70912d.js → accordion-ca081054.js} +1 -1
  13. package/lib/edge/{blocks-0bd38a83.cjs → blocks-078044bc.cjs} +1 -1
  14. package/lib/edge/blocks-exports.cjs +1 -1
  15. package/lib/edge/blocks-exports.mjs +2 -2
  16. package/lib/edge/{blocks-fedde8d2.js → blocks-f55c7d3e.js} +2 -2
  17. package/lib/edge/{button-af35e8de.js → button-41169061.js} +2 -2
  18. package/lib/edge/{button-f6426eff.cjs → button-5d140f8e.cjs} +1 -1
  19. package/lib/edge/{columns-f607250b.cjs → columns-354bf349.cjs} +1 -1
  20. package/lib/edge/{columns-1065c0ae.js → columns-f8916a18.js} +3 -3
  21. package/lib/edge/{content-variants-3d57a82f.js → content-variants-71ee0c76.js} +230 -225
  22. package/lib/edge/{content-variants-773afb9f.cjs → content-variants-89a9389a.cjs} +8 -8
  23. package/lib/edge/{form-0a58d0e4.js → form-ac2f2a0e.js} +3 -3
  24. package/lib/edge/{form-5762c22a.cjs → form-f2d2c2bf.cjs} +1 -1
  25. package/lib/edge/{get-class-prop-name-268b0f61.js → get-class-prop-name-a677d7a5.js} +1 -1
  26. package/lib/edge/{get-class-prop-name-3061c329.cjs → get-class-prop-name-a9b4959e.cjs} +1 -1
  27. package/lib/edge/image-344ddbb0.cjs +17 -0
  28. package/lib/edge/{image-68451fc8.js → image-e3fcd611.js} +24 -22
  29. package/lib/edge/{img-252c9967.js → img-8fc26395.js} +1 -1
  30. package/lib/edge/{img-59bb70c7.cjs → img-b91cb4fd.cjs} +1 -1
  31. package/lib/edge/index.cjs +1 -1
  32. package/lib/edge/index.mjs +1 -1
  33. package/lib/edge/init.cjs +1 -1
  34. package/lib/edge/init.mjs +1 -1
  35. package/lib/edge/{input-7ae243e2.js → input-549f090e.js} +1 -1
  36. package/lib/edge/{input-2163d4dc.cjs → input-ec7c695a.cjs} +1 -1
  37. package/lib/edge/{select-39231177.cjs → select-3ffa9294.cjs} +1 -1
  38. package/lib/edge/{select-cfa0eb8e.js → select-6a5a28ac.js} +1 -1
  39. package/lib/edge/{server-entry-4750de9c.cjs → server-entry-966ac144.cjs} +1 -1
  40. package/lib/edge/{server-entry-681e8e79.js → server-entry-d2020acf.js} +1 -1
  41. package/lib/edge/server-entry.cjs +1 -1
  42. package/lib/edge/server-entry.mjs +1 -1
  43. package/lib/edge/{slot-7c61542f.js → slot-40de071b.js} +3 -3
  44. package/lib/edge/{slot-69da8c56.cjs → slot-8b27e15e.cjs} +1 -1
  45. package/lib/edge/{symbol-bd999a19.cjs → symbol-76e76298.cjs} +1 -1
  46. package/lib/edge/{symbol-4a8a6cda.js → symbol-e6515a5f.js} +2 -2
  47. package/lib/edge/{tabs-3d0e242e.cjs → tabs-9c5af0ec.cjs} +1 -1
  48. package/lib/edge/{tabs-c3ff0c70.js → tabs-b75be82d.js} +3 -3
  49. package/lib/node/blocks-exports.cjs +12 -12
  50. package/lib/node/blocks-exports.mjs +225 -218
  51. package/lib/node/index.cjs +1 -1
  52. package/lib/node/index.mjs +2 -2
  53. package/lib/node/init.cjs +1 -1
  54. package/lib/node/init.mjs +2 -2
  55. package/lib/node/{node-runtime-3bfd8465.cjs → node-runtime-0e37d6f7.cjs} +1 -1
  56. package/lib/node/{node-runtime-78262e65.js → node-runtime-0f3a5df1.js} +1 -1
  57. package/lib/node/{server-entry-5f9f100f.js → server-entry-5ebd1c9b.js} +1 -1
  58. package/lib/node/{server-entry-63058f3f.cjs → server-entry-8002325b.cjs} +1 -1
  59. package/lib/node/server-entry.cjs +1 -1
  60. package/lib/node/server-entry.mjs +1 -1
  61. package/package.json +1 -1
  62. package/types/constants/sdk-version.d.ts +1 -1
  63. package/lib/edge/image-ea37781b.cjs +0 -17
@@ -1,11 +1,11 @@
1
- import { jsx as f, jsxs as L, Fragment as z } from "react/jsx-runtime";
2
- import { lazy as y, useRef as le, useState as C, useEffect as x } from "react";
3
- import { isBrowser as H, TARGET as te, isEditing as F, registerInsertMenu as se, setupBrowserForEditing as de, createRegisterComponentMessage as ce, getDefaultCanTrack as W, _track as J, isPreviewing as ue, fetchOneEntry as me, logger as pe, createEditorListener as ge, fetch as fe, fastClone as he, serializeComponentInfo as Y, handleABTestingSync as be } from "./server-entry-681e8e79.js";
1
+ import { jsx as h, jsxs as H, Fragment as z } from "react/jsx-runtime";
2
+ import { lazy as v, useRef as le, useState as k, useEffect as S } from "react";
3
+ import { isBrowser as $, TARGET as te, isEditing as P, registerInsertMenu as se, setupBrowserForEditing as de, createRegisterComponentMessage as ue, getDefaultCanTrack as A, _track as J, isPreviewing as ce, fetchOneEntry as me, logger as pe, createEditorListener as ge, fetch as fe, fastClone as he, serializeComponentInfo as Y, handleABTestingSync as be } from "./server-entry-d2020acf.js";
4
4
  import { Video as xe, Button as ye, Columns as ve, Fragment as Se, Image as Te, Section as ke, Symbol as Ce, Text as Ie, BuilderContext as we } from "./blocks-exports.mjs";
5
- import { triggerAnimation as Ve, evaluate as Q, InlinedStyles as ne, ComponentsContext as Re, Blocks as Ee } from "./blocks-fedde8d2.js";
6
- import "./get-class-prop-name-268b0f61.js";
5
+ import { triggerAnimation as Ve, evaluate as Q, InlinedStyles as ne, ComponentsContext as Re, Blocks as Ee } from "./blocks-f55c7d3e.js";
6
+ import "./get-class-prop-name-a677d7a5.js";
7
7
  import "./dynamic-renderer-8b343325.js";
8
- const A = {
8
+ const B = {
9
9
  "@type": "@builder.io/sdk:Element",
10
10
  layerName: "Accordion item title",
11
11
  responsiveStyles: {
@@ -34,7 +34,7 @@ const A = {
34
34
  }
35
35
  }
36
36
  }]
37
- }, B = {
37
+ }, D = {
38
38
  "@type": "@builder.io/sdk:Element",
39
39
  layerName: "Accordion item detail",
40
40
  responsiveStyles: {
@@ -82,19 +82,19 @@ const A = {
82
82
  name: "title",
83
83
  type: "uiBlocks",
84
84
  hideFromUI: !0,
85
- defaultValue: [A]
85
+ defaultValue: [B]
86
86
  }, {
87
87
  name: "detail",
88
88
  type: "uiBlocks",
89
89
  hideFromUI: !0,
90
- defaultValue: [B]
90
+ defaultValue: [D]
91
91
  }],
92
92
  defaultValue: [{
93
- title: [A],
94
- detail: [B]
93
+ title: [B],
94
+ detail: [D]
95
95
  }, {
96
- title: [A],
97
- detail: [B]
96
+ title: [B],
97
+ detail: [D]
98
98
  }],
99
99
  showIf: (e) => !e.get("useChildrenForItems")
100
100
  }, {
@@ -129,7 +129,7 @@ const A = {
129
129
  builderComponents: !0,
130
130
  builderLinkComponent: !0
131
131
  }
132
- }, Pe = y(() => import("./accordion-4a70912d.js")), We = {
132
+ }, Pe = v(() => import("./accordion-ca081054.js")), We = {
133
133
  name: "Core:Button",
134
134
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
135
135
  defaultStyles: {
@@ -344,7 +344,7 @@ const A = {
344
344
  });
345
345
  }
346
346
  const n = e.get("columns");
347
- Array.isArray(n) && n.find((d) => d.get("width")) && (n.find((u) => !u.get("width")) || n.reduce((o, m) => o + m.get("width"), 0) !== 100) && t();
347
+ Array.isArray(n) && n.find((d) => d.get("width")) && (n.find((m) => !m.get("width")) || n.reduce((o, p) => o + p.get("width"), 0) !== 100) && t();
348
348
  }
349
349
  }, {
350
350
  name: "space",
@@ -399,25 +399,25 @@ const A = {
399
399
  onChange: (e) => {
400
400
  e.delete("srcset"), e.delete("noWebp");
401
401
  function n(a, o = 6e4) {
402
- return new Promise((m, h) => {
403
- const I = document.createElement("img");
404
- let k = !1;
405
- I.onload = () => {
406
- k = !0, m(I);
407
- }, I.addEventListener("error", (w) => {
408
- console.warn("Image load failed", w.error), h(w.error);
409
- }), I.src = a, setTimeout(() => {
410
- k || h(new Error("Image load timed out"));
402
+ return new Promise((p, b) => {
403
+ const C = document.createElement("img");
404
+ let T = !1;
405
+ C.onload = () => {
406
+ T = !0, p(C);
407
+ }, C.addEventListener("error", (V) => {
408
+ console.warn("Image load failed", V.error), b(V.error);
409
+ }), C.src = a, setTimeout(() => {
410
+ T || b(new Error("Image load timed out"));
411
411
  }, o);
412
412
  });
413
413
  }
414
414
  function i(a) {
415
415
  return Math.round(a * 1e3) / 1e3;
416
416
  }
417
- const d = e.get("image"), u = e.get("aspectRatio");
417
+ const d = e.get("image"), m = e.get("aspectRatio");
418
418
  if (fetch(d).then((a) => a.blob()).then((a) => {
419
419
  a.type.includes("svg") && e.set("noWebp", !0);
420
- }), d && (!u || u === 0.7041))
420
+ }), d && (!m || m === 0.7041))
421
421
  return n(d).then((a) => {
422
422
  const o = e.get("aspectRatio");
423
423
  e.get("image") === d && (!o || o === 0.7041) && a.width && a.height && (e.set("aspectRatio", i(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
@@ -541,7 +541,7 @@ const A = {
541
541
  shouldReceiveBuilderProps: {
542
542
  builderContext: !0
543
543
  }
544
- }, He = y(() => import("./slot-7c61542f.js")), $e = {
544
+ }, He = v(() => import("./slot-40de071b.js")), $e = {
545
545
  name: "Symbol",
546
546
  noWrap: !0,
547
547
  static: !0,
@@ -580,7 +580,7 @@ const A = {
580
580
  builderComponents: !0,
581
581
  builderLinkComponent: !0
582
582
  }
583
- }, D = {
583
+ }, U = {
584
584
  "@type": "@builder.io/sdk:Element",
585
585
  responsiveStyles: {
586
586
  large: {
@@ -602,7 +602,7 @@ const A = {
602
602
  text: "New tab"
603
603
  }
604
604
  }
605
- }, U = {
605
+ }, L = {
606
606
  "@type": "@builder.io/sdk:Element",
607
607
  responsiveStyles: {
608
608
  large: {
@@ -628,16 +628,16 @@ const A = {
628
628
  name: "label",
629
629
  type: "uiBlocks",
630
630
  hideFromUI: !0,
631
- defaultValue: [D]
631
+ defaultValue: [U]
632
632
  }, {
633
633
  name: "content",
634
634
  type: "uiBlocks",
635
635
  hideFromUI: !0,
636
- defaultValue: [U]
636
+ defaultValue: [L]
637
637
  }],
638
638
  defaultValue: [{
639
639
  label: [{
640
- ...D,
640
+ ...U,
641
641
  component: {
642
642
  name: "Text",
643
643
  options: {
@@ -646,7 +646,7 @@ const A = {
646
646
  }
647
647
  }],
648
648
  content: [{
649
- ...U,
649
+ ...L,
650
650
  component: {
651
651
  name: "Text",
652
652
  options: {
@@ -656,7 +656,7 @@ const A = {
656
656
  }]
657
657
  }, {
658
658
  label: [{
659
- ...D,
659
+ ...U,
660
660
  component: {
661
661
  name: "Text",
662
662
  options: {
@@ -665,7 +665,7 @@ const A = {
665
665
  }
666
666
  }],
667
667
  content: [{
668
- ...U,
668
+ ...L,
669
669
  component: {
670
670
  name: "Text",
671
671
  options: {
@@ -721,7 +721,7 @@ const A = {
721
721
  builderComponents: !0,
722
722
  builderLinkComponent: !0
723
723
  }
724
- }, qe = y(() => import("./tabs-c3ff0c70.js")), je = {
724
+ }, qe = v(() => import("./tabs-b75be82d.js")), je = {
725
725
  shouldReceiveBuilderProps: {
726
726
  builderBlock: !1
727
727
  },
@@ -764,7 +764,7 @@ const A = {
764
764
  helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
765
765
  advanced: !0
766
766
  }]
767
- }, Me = y(() => import("./custom-code-7786788e.js")), Oe = {
767
+ }, Me = v(() => import("./custom-code-7786788e.js")), Oe = {
768
768
  name: "Embed",
769
769
  static: !0,
770
770
  inputs: [{
@@ -779,7 +779,7 @@ const A = {
779
779
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
780
780
  hideFromUI: !0
781
781
  }]
782
- }, _e = y(() => import("./embed-5c1bbe12.js")), ze = {
782
+ }, _e = v(() => import("./embed-5c1bbe12.js")), ze = {
783
783
  name: "Form:Form",
784
784
  // editableTags: ['builder-form-error']
785
785
  defaults: {
@@ -1016,7 +1016,7 @@ const A = {
1016
1016
  builderComponents: !0,
1017
1017
  builderLinkComponent: !0
1018
1018
  }
1019
- }, Je = y(() => import("./form-0a58d0e4.js")), Ye = {
1019
+ }, Je = v(() => import("./form-ac2f2a0e.js")), Ye = {
1020
1020
  name: "Form:Input",
1021
1021
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
1022
1022
  inputs: [
@@ -1067,7 +1067,7 @@ const A = {
1067
1067
  borderStyle: "solid",
1068
1068
  borderColor: "#ccc"
1069
1069
  }
1070
- }, Qe = y(() => import("./input-7ae243e2.js")), Ge = {
1070
+ }, Qe = v(() => import("./input-549f090e.js")), Ge = {
1071
1071
  name: "Form:Select",
1072
1072
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
1073
1073
  defaultStyles: {
@@ -1109,7 +1109,7 @@ const A = {
1109
1109
  }],
1110
1110
  static: !0,
1111
1111
  noWrap: !0
1112
- }, Xe = y(() => import("./select-cfa0eb8e.js")), Ze = {
1112
+ }, Xe = v(() => import("./select-6a5a28ac.js")), Ze = {
1113
1113
  name: "Form:SubmitButton",
1114
1114
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
1115
1115
  defaultStyles: {
@@ -1134,7 +1134,7 @@ const A = {
1134
1134
  // that only shows if advanced setting is flipped
1135
1135
  // TODO: defaultChildren
1136
1136
  // canHaveChildren: true,
1137
- }, et = y(() => import("./submit-button-b48361a7.js")), tt = {
1137
+ }, et = v(() => import("./submit-button-b48361a7.js")), tt = {
1138
1138
  name: "Form:TextArea",
1139
1139
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
1140
1140
  inputs: [{
@@ -1170,7 +1170,7 @@ const A = {
1170
1170
  },
1171
1171
  static: !0,
1172
1172
  noWrap: !0
1173
- }, nt = y(() => import("./textarea-d29025e9.js")), at = {
1173
+ }, nt = v(() => import("./textarea-d29025e9.js")), at = {
1174
1174
  // friendlyName?
1175
1175
  name: "Raw:Img",
1176
1176
  hideFromInsertMenu: !0,
@@ -1184,7 +1184,7 @@ const A = {
1184
1184
  }],
1185
1185
  noWrap: !0,
1186
1186
  static: !0
1187
- }, it = y(() => import("./img-252c9967.js")), ot = {
1187
+ }, it = v(() => import("./img-8fc26395.js")), ot = {
1188
1188
  name: "Video",
1189
1189
  canHaveChildren: !0,
1190
1190
  defaultStyles: {
@@ -1415,14 +1415,14 @@ const A = {
1415
1415
  thisScriptEl?.remove();
1416
1416
  }
1417
1417
  return;
1418
- }`, ae = "builderIoAbTest", ie = "builderIoRenderContent", P = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1418
+ }`, ae = "builderIoAbTest", ie = "builderIoRenderContent", W = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1419
1419
  ...t,
1420
1420
  testVariationId: t.id,
1421
1421
  id: e == null ? void 0 : e.id
1422
1422
  })), dt = ({
1423
1423
  canTrack: e,
1424
1424
  content: t
1425
- }) => !(!(P(t).length > 0) || !e || H()), ct = (e) => e === "react" || e === "reactNative", oe = ct(te), ut = () => `
1425
+ }) => !(!(W(t).length > 0) || !e || $()), ut = (e) => e === "react" || e === "reactNative", oe = ut(te), ct = () => `
1426
1426
  window.${ae} = ${lt}
1427
1427
  window.${ie} = ${st}
1428
1428
  `, mt = (e, t) => `
@@ -1434,8 +1434,8 @@ const A = {
1434
1434
  }) => `window.${ie}(
1435
1435
  "${t}", "${e}", ${oe}
1436
1436
  )`;
1437
- function $(e) {
1438
- return /* @__PURE__ */ f(
1437
+ function N(e) {
1438
+ return /* @__PURE__ */ h(
1439
1439
  "script",
1440
1440
  {
1441
1441
  dangerouslySetInnerHTML: { __html: e.scriptStr },
@@ -1465,9 +1465,9 @@ const gt = (e, t, n = !0) => {
1465
1465
  event: e,
1466
1466
  target: t
1467
1467
  }) => {
1468
- const n = t.getBoundingClientRect(), i = e.clientX - n.left, d = e.clientY - n.top, u = X(i / n.width), a = X(d / n.height);
1468
+ const n = t.getBoundingClientRect(), i = e.clientX - n.left, d = e.clientY - n.top, m = X(i / n.width), a = X(d / n.height);
1469
1469
  return {
1470
- x: u,
1470
+ x: m,
1471
1471
  y: a
1472
1472
  };
1473
1473
  }, ht = (e) => {
@@ -1487,8 +1487,8 @@ const gt = (e, t, n = !0) => {
1487
1487
  }
1488
1488
  };
1489
1489
  }, bt = (e) => {
1490
- var u, a;
1491
- const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (u = e == null ? void 0 : e.files) == null ? void 0 : u.regular;
1490
+ var m, a;
1491
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (m = e == null ? void 0 : e.files) == null ? void 0 : m.regular;
1492
1492
  let d = "";
1493
1493
  if (i && t && n && (d += `
1494
1494
  @font-face {
@@ -1501,11 +1501,11 @@ font-weight: 400;
1501
1501
  for (const o in e.files) {
1502
1502
  if (!(String(Number(o)) === o))
1503
1503
  continue;
1504
- const h = e.files[o];
1505
- h && h !== i && (d += `
1504
+ const b = e.files[o];
1505
+ b && b !== i && (d += `
1506
1506
  @font-face {
1507
1507
  font-family: "${t}";
1508
- src: url('${h}') format('woff2');
1508
+ src: url('${b}') format('woff2');
1509
1509
  font-display: fallback;
1510
1510
  font-weight: ${o};
1511
1511
  }
@@ -1539,37 +1539,37 @@ font-weight: ${o};
1539
1539
  }
1540
1540
  `, St = (e) => e ? "" : vt, Tt = (e) => `variant-${e}`;
1541
1541
  function kt(e) {
1542
- var N, q, j, K, M, O, _;
1542
+ var I, q, j, K, M, O, _;
1543
1543
  const t = le(null);
1544
1544
  function n(r) {
1545
- var p, s;
1546
- const c = {
1545
+ var g, s;
1546
+ const u = {
1547
1547
  ...e.builderContextSignal.rootState,
1548
1548
  ...r
1549
1549
  };
1550
- e.builderContextSignal.rootSetState ? (s = (p = e.builderContextSignal).rootSetState) == null || s.call(p, c) : e.setBuilderContextSignal((l) => ({
1550
+ e.builderContextSignal.rootSetState ? (s = (g = e.builderContextSignal).rootSetState) == null || s.call(g, u) : e.setBuilderContextSignal((l) => ({
1551
1551
  ...l,
1552
- rootState: c
1552
+ rootState: u
1553
1553
  }));
1554
1554
  }
1555
1555
  function i(r) {
1556
- var p, s, l, g, V;
1557
- const c = {
1556
+ var g, s, l, f, R;
1557
+ const u = {
1558
1558
  ...e.builderContextSignal.content,
1559
1559
  ...r,
1560
1560
  data: {
1561
- ...(p = e.builderContextSignal.content) == null ? void 0 : p.data,
1561
+ ...(g = e.builderContextSignal.content) == null ? void 0 : g.data,
1562
1562
  ...r == null ? void 0 : r.data
1563
1563
  },
1564
1564
  meta: {
1565
1565
  ...(s = e.builderContextSignal.content) == null ? void 0 : s.meta,
1566
1566
  ...r == null ? void 0 : r.meta,
1567
- breakpoints: ((l = r == null ? void 0 : r.meta) == null ? void 0 : l.breakpoints) || ((V = (g = e.builderContextSignal.content) == null ? void 0 : g.meta) == null ? void 0 : V.breakpoints)
1567
+ breakpoints: ((l = r == null ? void 0 : r.meta) == null ? void 0 : l.breakpoints) || ((R = (f = e.builderContextSignal.content) == null ? void 0 : f.meta) == null ? void 0 : R.breakpoints)
1568
1568
  }
1569
1569
  };
1570
- e.setBuilderContextSignal((b) => ({
1571
- ...b,
1572
- content: c
1570
+ e.setBuilderContextSignal((y) => ({
1571
+ ...y,
1572
+ content: u
1573
1573
  }));
1574
1574
  }
1575
1575
  function d() {
@@ -1578,7 +1578,7 @@ function kt(e) {
1578
1578
  "aria-hidden": !0
1579
1579
  };
1580
1580
  }
1581
- const [u, a] = C(
1581
+ const [m, a] = k(
1582
1582
  () => e.contentWrapper || "div"
1583
1583
  );
1584
1584
  function o(r) {
@@ -1586,27 +1586,27 @@ function kt(e) {
1586
1586
  model: e.model,
1587
1587
  trustedHosts: e.trustedHosts,
1588
1588
  callbacks: {
1589
- configureSdk: (c) => {
1589
+ configureSdk: (u) => {
1590
1590
  var l;
1591
- const { breakpoints: p, contentId: s } = c;
1592
- !s || s !== ((l = e.builderContextSignal.content) == null ? void 0 : l.id) || p && i({
1591
+ const { breakpoints: g, contentId: s } = u;
1592
+ !s || s !== ((l = e.builderContextSignal.content) == null ? void 0 : l.id) || g && i({
1593
1593
  meta: {
1594
- breakpoints: p
1594
+ breakpoints: g
1595
1595
  }
1596
1596
  });
1597
1597
  },
1598
- animation: (c) => {
1599
- Ve(c);
1598
+ animation: (u) => {
1599
+ Ve(u);
1600
1600
  },
1601
- contentUpdate: (c) => {
1602
- i(c);
1601
+ contentUpdate: (u) => {
1602
+ i(u);
1603
1603
  }
1604
1604
  }
1605
1605
  })(r);
1606
1606
  }
1607
- function m() {
1608
- var c, p;
1609
- const r = (p = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : p.jsCode;
1607
+ function p() {
1608
+ var u, g;
1609
+ const r = (g = (u = e.builderContextSignal.content) == null ? void 0 : u.data) == null ? void 0 : g.jsCode;
1610
1610
  r && Q({
1611
1611
  code: r,
1612
1612
  context: e.context || {},
@@ -1619,33 +1619,33 @@ function kt(e) {
1619
1619
  enableCache: !1
1620
1620
  });
1621
1621
  }
1622
- const [h, I] = C(() => ({})), [k, w] = C(() => ({})), [R, E] = C(() => !1);
1623
- function v(r) {
1624
- var c, p;
1622
+ const [b, C] = k(() => ({})), [T, V] = k(() => ({})), [E, F] = k(() => !1);
1623
+ function x(r) {
1624
+ var u, g;
1625
1625
  if (e.builderContextSignal.content) {
1626
- const s = (c = e.builderContextSignal.content) == null ? void 0 : c.testVariationId, l = (p = e.builderContextSignal.content) == null ? void 0 : p.id;
1626
+ const s = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, l = (g = e.builderContextSignal.content) == null ? void 0 : g.id;
1627
1627
  J({
1628
1628
  type: "click",
1629
- canTrack: W(e.canTrack),
1629
+ canTrack: A(e.canTrack),
1630
1630
  contentId: l,
1631
1631
  apiKey: e.apiKey,
1632
1632
  variationId: s !== l ? s : void 0,
1633
1633
  ...ht(r),
1634
- unique: !R
1634
+ unique: !E
1635
1635
  });
1636
1636
  }
1637
- R || E(!0);
1637
+ E || F(!0);
1638
1638
  }
1639
- function S() {
1640
- var c, p, s;
1641
- const r = (s = (p = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : p.httpRequests) != null ? s : {};
1642
- Object.entries(r).forEach(([l, g]) => {
1643
- if (!g || k[l] || h[l] && !F())
1639
+ function c() {
1640
+ var u, g, s;
1641
+ const r = (s = (g = (u = e.builderContextSignal.content) == null ? void 0 : u.data) == null ? void 0 : g.httpRequests) != null ? s : {};
1642
+ Object.entries(r).forEach(([l, f]) => {
1643
+ if (!f || T[l] || b[l] && !P())
1644
1644
  return;
1645
- k[l] = !0;
1646
- const V = g.replace(
1645
+ T[l] = !0;
1646
+ const R = f.replace(
1647
1647
  /{{([^}]+)}}/g,
1648
- (b, re) => String(
1648
+ (y, re) => String(
1649
1649
  Q({
1650
1650
  code: re,
1651
1651
  context: e.context || {},
@@ -1656,19 +1656,19 @@ function kt(e) {
1656
1656
  })
1657
1657
  )
1658
1658
  );
1659
- fe(V).then((b) => b.json()).then((b) => {
1659
+ fe(R).then((y) => y.json()).then((y) => {
1660
1660
  n({
1661
- [l]: b
1662
- }), h[l] = !0;
1663
- }).catch((b) => {
1664
- console.error("error fetching dynamic data", g, b);
1661
+ [l]: y
1662
+ }), b[l] = !0;
1663
+ }).catch((y) => {
1664
+ console.error("error fetching dynamic data", f, y);
1665
1665
  }).finally(() => {
1666
- k[l] = !1;
1666
+ T[l] = !1;
1667
1667
  });
1668
1668
  });
1669
1669
  }
1670
- function T() {
1671
- F() && window.dispatchEvent(
1670
+ function w() {
1671
+ P() && window.dispatchEvent(
1672
1672
  new CustomEvent(
1673
1673
  "builder:component:stateChange",
1674
1674
  {
@@ -1682,10 +1682,10 @@ function kt(e) {
1682
1682
  )
1683
1683
  );
1684
1684
  }
1685
- return x(() => {
1686
- var r, c;
1687
- if (H()) {
1688
- if (F() && (window.addEventListener("message", o), se(), de({
1685
+ return S(() => {
1686
+ var r, u;
1687
+ if ($()) {
1688
+ if (P() && (window.addEventListener("message", o), se(), de({
1689
1689
  ...e.locale ? {
1690
1690
  locale: e.locale
1691
1691
  } : {},
@@ -1698,63 +1698,63 @@ function kt(e) {
1698
1698
  }), Object.values(
1699
1699
  e.builderContextSignal.componentInfos
1700
1700
  ).forEach((s) => {
1701
- var g;
1702
- const l = ce(s);
1703
- (g = window.parent) == null || g.postMessage(l, "*");
1701
+ var f;
1702
+ const l = ue(s);
1703
+ (f = window.parent) == null || f.postMessage(l, "*");
1704
1704
  }), window.addEventListener(
1705
1705
  "builder:component:stateChangeListenerActivated",
1706
- T
1707
- )), e.builderContextSignal.content && W(e.canTrack)) {
1708
- const s = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, l = (c = e.builderContextSignal.content) == null ? void 0 : c.id, g = e.apiKey;
1706
+ w
1707
+ )), e.builderContextSignal.content && A(e.canTrack)) {
1708
+ const s = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, l = (u = e.builderContextSignal.content) == null ? void 0 : u.id, f = e.apiKey;
1709
1709
  J({
1710
1710
  type: "impression",
1711
1711
  canTrack: !0,
1712
1712
  contentId: l,
1713
- apiKey: g,
1713
+ apiKey: f,
1714
1714
  variationId: s !== l ? s : void 0
1715
1715
  });
1716
1716
  }
1717
- if (ue() && !F()) {
1718
- const s = new URL(location.href).searchParams, l = s.get("builder.preview"), g = s.get(
1717
+ if (ce() && !P()) {
1718
+ const s = new URL(location.href).searchParams, l = s.get("builder.preview"), f = s.get(
1719
1719
  `builder.overrides.${l}`
1720
- ), V = s.get("apiKey") || s.get("builder.space");
1721
- l === e.model && V === e.apiKey && (!e.content || g === e.content.id) && me({
1720
+ ), R = s.get("apiKey") || s.get("builder.space");
1721
+ l === e.model && R === e.apiKey && (!e.content || f === e.content.id) && me({
1722
1722
  model: e.model,
1723
1723
  apiKey: e.apiKey,
1724
1724
  apiVersion: e.builderContextSignal.apiVersion
1725
- }).then((b) => {
1726
- b && i(b);
1725
+ }).then((y) => {
1726
+ y && i(y);
1727
1727
  });
1728
1728
  }
1729
1729
  }
1730
- }, []), x(() => {
1730
+ }, []), S(() => {
1731
1731
  e.apiKey || pe.error(
1732
1732
  "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
1733
- ), m(), S(), T();
1734
- }, []), x(() => {
1733
+ ), p(), c(), w();
1734
+ }, []), S(() => {
1735
1735
  e.content && i(e.content);
1736
- }, [e.content]), x(() => {
1737
- m();
1738
- }, [(q = (N = e.builderContextSignal.content) == null ? void 0 : N.data) == null ? void 0 : q.jsCode]), x(() => {
1739
- S();
1740
- }, [(K = (j = e.builderContextSignal.content) == null ? void 0 : j.data) == null ? void 0 : K.httpRequests]), x(() => {
1741
- T();
1742
- }, [e.builderContextSignal.rootState]), x(() => {
1736
+ }, [e.content]), S(() => {
1737
+ p();
1738
+ }, [(q = (I = e.builderContextSignal.content) == null ? void 0 : I.data) == null ? void 0 : q.jsCode]), S(() => {
1739
+ c();
1740
+ }, [(K = (j = e.builderContextSignal.content) == null ? void 0 : j.data) == null ? void 0 : K.httpRequests]), S(() => {
1741
+ w();
1742
+ }, [e.builderContextSignal.rootState]), S(() => {
1743
1743
  e.data && n(e.data);
1744
- }, [e.data]), x(() => {
1744
+ }, [e.data]), S(() => {
1745
1745
  e.locale && n({
1746
1746
  locale: e.locale
1747
1747
  });
1748
- }, [e.locale]), x(() => () => {
1749
- H() && (window.removeEventListener("message", o), window.removeEventListener(
1748
+ }, [e.locale]), S(() => () => {
1749
+ $() && (window.removeEventListener("message", o), window.removeEventListener(
1750
1750
  "builder:component:stateChangeListenerActivated",
1751
- T
1751
+ w
1752
1752
  ));
1753
- }, []), /* @__PURE__ */ f(we.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ f(
1754
- u,
1753
+ }, []), /* @__PURE__ */ h(we.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ h(
1754
+ m,
1755
1755
  {
1756
1756
  ref: t,
1757
- onClick: (r) => v(r),
1757
+ onClick: (r) => x(r),
1758
1758
  "builder-content-id": (M = e.builderContextSignal.content) == null ? void 0 : M.id,
1759
1759
  "builder-model": e.model,
1760
1760
  ...d(),
@@ -1767,7 +1767,7 @@ function kt(e) {
1767
1767
  ) : null });
1768
1768
  }
1769
1769
  function Ct(e) {
1770
- const [t, n] = C(
1770
+ const [t, n] = k(
1771
1771
  () => `
1772
1772
  ${yt({
1773
1773
  cssCode: e.cssCode,
@@ -1779,7 +1779,7 @@ ${xt({
1779
1779
  ${St(e.isNestedRender)}
1780
1780
  `.trim()
1781
1781
  );
1782
- return /* @__PURE__ */ f(
1782
+ return /* @__PURE__ */ h(
1783
1783
  ne,
1784
1784
  {
1785
1785
  id: "builderio-content",
@@ -1793,10 +1793,10 @@ const It = ({
1793
1793
  data: t,
1794
1794
  locale: n
1795
1795
  }) => {
1796
- var u, a, o;
1797
- const i = {}, d = ((u = e == null ? void 0 : e.data) == null ? void 0 : u.state) || {};
1798
- return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((m) => {
1799
- m.name && m.defaultValue !== void 0 && (i[m.name] = m.defaultValue);
1796
+ var m, a, o;
1797
+ const i = {}, d = ((m = e == null ? void 0 : e.data) == null ? void 0 : m.state) || {};
1798
+ return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((p) => {
1799
+ p.name && p.defaultValue !== void 0 && (i[p.name] = p.defaultValue);
1800
1800
  }), {
1801
1801
  ...i,
1802
1802
  ...d,
@@ -1817,76 +1817,82 @@ const It = ({
1817
1817
  meta: e == null ? void 0 : e.meta
1818
1818
  } : void 0;
1819
1819
  function ee(e) {
1820
- var m, h, I, k, w, R, E;
1821
- const [t, n] = C(
1820
+ var p, b, C, T, V, E, F;
1821
+ const [t, n] = k(
1822
1822
  () => {
1823
- var v, S;
1823
+ var x, c;
1824
1824
  return pt({
1825
1825
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
1826
- variationId: (v = e.content) == null ? void 0 : v.testVariationId,
1826
+ variationId: (x = e.content) == null ? void 0 : x.testVariationId,
1827
1827
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
1828
- contentId: (S = e.content) == null ? void 0 : S.id
1828
+ contentId: (c = e.content) == null ? void 0 : c.id
1829
1829
  });
1830
1830
  }
1831
1831
  );
1832
- function i(v) {
1833
- o((S) => ({
1834
- ...S,
1835
- rootState: v
1832
+ function i(x) {
1833
+ o((c) => ({
1834
+ ...c,
1835
+ rootState: x
1836
1836
  }));
1837
1837
  }
1838
- const [d, u] = C(
1839
- () => [
1840
- ...G(),
1841
- ...e.customComponents || []
1842
- ].reduce(
1843
- (v, { component: S, ...T }) => ({
1844
- ...v,
1845
- [T.name]: {
1846
- component: S,
1847
- ...Y(T)
1848
- }
1838
+ const [d, m] = k(
1839
+ () => {
1840
+ var x;
1841
+ return [
1842
+ ...G(),
1843
+ ...((x = e.customComponents) == null ? void 0 : x.filter(({ models: c }) => !(c != null && c.length) || !e.model ? !0 : c.includes(e.model))) || []
1844
+ ].reduce(
1845
+ (c, { component: w, ...I }) => ({
1846
+ ...c,
1847
+ [I.name]: {
1848
+ component: w,
1849
+ ...Y(I)
1850
+ }
1851
+ }),
1852
+ {}
1853
+ );
1854
+ }
1855
+ ), [a, o] = k(() => {
1856
+ var x;
1857
+ return {
1858
+ content: wt({
1859
+ content: e.content,
1860
+ data: e.data
1849
1861
  }),
1850
- {}
1851
- )
1852
- ), [a, o] = C(() => ({
1853
- content: wt({
1854
- content: e.content,
1855
- data: e.data
1856
- }),
1857
- localState: void 0,
1858
- rootState: It({
1859
- content: e.content,
1860
- data: e.data,
1861
- locale: e.locale
1862
- }),
1863
- rootSetState: i,
1864
- context: e.context || {},
1865
- canTrack: e.canTrack,
1866
- apiKey: e.apiKey,
1867
- apiVersion: e.apiVersion,
1868
- componentInfos: [
1869
- ...G(),
1870
- ...e.customComponents || []
1871
- ].reduce(
1872
- (v, { component: S, ...T }) => ({
1873
- ...v,
1874
- [T.name]: Y(T)
1862
+ localState: void 0,
1863
+ rootState: It({
1864
+ content: e.content,
1865
+ data: e.data,
1866
+ locale: e.locale
1875
1867
  }),
1876
- {}
1877
- ),
1878
- inheritedStyles: {},
1879
- BlocksWrapper: e.blocksWrapper || "div",
1880
- BlocksWrapperProps: e.blocksWrapperProps || {},
1881
- nonce: e.nonce || ""
1882
- }));
1883
- return /* @__PURE__ */ f(
1868
+ rootSetState: i,
1869
+ context: e.context || {},
1870
+ canTrack: e.canTrack,
1871
+ apiKey: e.apiKey,
1872
+ apiVersion: e.apiVersion,
1873
+ componentInfos: [
1874
+ ...G(),
1875
+ ...((x = e.customComponents) == null ? void 0 : x.filter(({ models: c }) => !(c != null && c.length) || !e.model ? !0 : c.includes(e.model))) || []
1876
+ ].reduce(
1877
+ (c, { component: w, ...I }) => ({
1878
+ ...c,
1879
+ [I.name]: Y(I)
1880
+ }),
1881
+ {}
1882
+ ),
1883
+ inheritedStyles: {},
1884
+ BlocksWrapper: e.blocksWrapper || "div",
1885
+ BlocksWrapperProps: e.blocksWrapperProps || {},
1886
+ nonce: e.nonce || ""
1887
+ };
1888
+ });
1889
+ return /* @__PURE__ */ h(
1884
1890
  Re.Provider,
1885
1891
  {
1886
1892
  value: {
1887
1893
  registeredComponents: d
1888
1894
  },
1889
- children: /* @__PURE__ */ L(
1895
+ children: /* @__PURE__ */ H(
1890
1896
  kt,
1891
1897
  {
1892
1898
  nonce: e.nonce,
@@ -1905,28 +1911,28 @@ function ee(e) {
1905
1911
  trustedHosts: e.trustedHosts,
1906
1912
  setBuilderContextSignal: o,
1907
1913
  children: [
1908
- e.isSsrAbTest ? /* @__PURE__ */ f(
1909
- $,
1914
+ e.isSsrAbTest ? /* @__PURE__ */ h(
1915
+ N,
1910
1916
  {
1911
1917
  id: "builderio-variant-visibility",
1912
1918
  scriptStr: t,
1913
1919
  nonce: e.nonce || ""
1914
1920
  }
1915
1921
  ) : null,
1916
- /* @__PURE__ */ f(
1922
+ /* @__PURE__ */ h(
1917
1923
  Ct,
1918
1924
  {
1919
1925
  nonce: e.nonce || "",
1920
1926
  isNestedRender: e.isNestedRender,
1921
- contentId: (m = a.content) == null ? void 0 : m.id,
1922
- cssCode: (I = (h = a.content) == null ? void 0 : h.data) == null ? void 0 : I.cssCode,
1923
- customFonts: (w = (k = a.content) == null ? void 0 : k.data) == null ? void 0 : w.customFonts
1927
+ contentId: (p = a.content) == null ? void 0 : p.id,
1928
+ cssCode: (C = (b = a.content) == null ? void 0 : b.data) == null ? void 0 : C.cssCode,
1929
+ customFonts: (V = (T = a.content) == null ? void 0 : T.data) == null ? void 0 : V.customFonts
1924
1930
  }
1925
1931
  ),
1926
- /* @__PURE__ */ f(
1932
+ /* @__PURE__ */ h(
1927
1933
  Ee,
1928
1934
  {
1929
- blocks: (E = (R = a.content) == null ? void 0 : R.data) == null ? void 0 : E.blocks,
1935
+ blocks: (F = (E = a.content) == null ? void 0 : E.data) == null ? void 0 : F.blocks,
1930
1936
  context: a,
1931
1937
  registeredComponents: d,
1932
1938
  linkComponent: e.linkComponent
@@ -1940,48 +1946,47 @@ function ee(e) {
1940
1946
  }
1941
1947
  function Bt(e) {
1942
1948
  var a;
1943
- const [t, n] = C(
1949
+ const [t, n] = k(
1944
1950
  () => dt({
1945
- canTrack: W(e.canTrack),
1951
+ canTrack: A(e.canTrack),
1946
1952
  content: e.content
1947
1953
  })
1948
1954
  );
1949
1955
  function i() {
1950
1956
  var o;
1951
1957
  return mt(
1952
- P(e.content).map((m) => ({
1953
- id: m.testVariationId,
1954
- testRatio: m.testRatio
1958
+ W(e.content).map((p) => ({
1959
+ id: p.testVariationId,
1960
+ testRatio: p.testRatio
1955
1961
  })),
1956
1962
  ((o = e.content) == null ? void 0 : o.id) || ""
1957
1963
  );
1958
1964
  }
1959
1965
  function d() {
1960
- return P(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
1966
+ return W(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
1961
1967
  }
1962
- function u() {
1968
+ function m() {
1963
1969
  var o;
1964
1970
  return t ? {
1965
1971
  ...e.content,
1966
1972
  testVariationId: (o = e.content) == null ? void 0 : o.id
1967
1973
  } : be({
1968
1974
  item: e.content,
1969
- canTrack: W(e.canTrack)
1975
+ canTrack: A(e.canTrack)
1970
1976
  });
1971
1977
  }
1972
- return x(() => {
1973
- }, []), x(() => {
1974
- }), /* @__PURE__ */ L(z, { children: [
1975
- !e.isNestedRender && te !== "reactNative" ? /* @__PURE__ */ f(
1976
- $,
1978
+ return S(() => {
1979
+ }, []), /* @__PURE__ */ H(z, { children: [
1980
+ !e.isNestedRender && te !== "reactNative" ? /* @__PURE__ */ h(
1981
+ N,
1977
1982
  {
1978
1983
  id: "builderio-init-variants-fns",
1979
- scriptStr: ut(),
1984
+ scriptStr: ct(),
1980
1985
  nonce: e.nonce || ""
1981
1986
  }
1982
1987
  ) : null,
1983
- t ? /* @__PURE__ */ L(z, { children: [
1984
- /* @__PURE__ */ f(
1988
+ t ? /* @__PURE__ */ H(z, { children: [
1989
+ /* @__PURE__ */ h(
1985
1990
  ne,
1986
1991
  {
1987
1992
  id: "builderio-variants",
@@ -1989,15 +1994,15 @@ function Bt(e) {
1989
1994
  nonce: e.nonce || ""
1990
1995
  }
1991
1996
  ),
1992
- /* @__PURE__ */ f(
1993
- $,
1997
+ /* @__PURE__ */ h(
1998
+ N,
1994
1999
  {
1995
2000
  id: "builderio-variants-visibility",
1996
2001
  scriptStr: i(),
1997
2002
  nonce: e.nonce || ""
1998
2003
  }
1999
2004
  ),
2000
- (a = P(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */ f(
2005
+ (a = W(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */ h(
2001
2006
  ee,
2002
2007
  {
2003
2008
  isNestedRender: e.isNestedRender,
@@ -2024,12 +2029,12 @@ function Bt(e) {
2024
2029
  o.testVariationId
2025
2030
  ))
2026
2031
  ] }) : null,
2027
- /* @__PURE__ */ f(
2032
+ /* @__PURE__ */ h(
2028
2033
  ee,
2029
2034
  {
2030
2035
  nonce: e.nonce,
2031
2036
  isNestedRender: e.isNestedRender,
2032
- content: u(),
2037
+ content: m(),
2033
2038
  showContent: !0,
2034
2039
  model: e.model,
2035
2040
  data: e.data,