@builder.io/sdk-react-nextjs 0.13.4 → 0.14.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 (41) hide show
  1. package/lib/browser/{USE_CLIENT_BUNDLE-288752d8.js → USE_CLIENT_BUNDLE-51815064.js} +3 -6
  2. package/lib/{node/USE_CLIENT_BUNDLE-5990191b.cjs → browser/USE_CLIENT_BUNDLE-83c9a885.cjs} +2 -2
  3. package/lib/{edge/USE_SERVER_BUNDLE-6e48e5ed.js → browser/USE_SERVER_BUNDLE-60b2536b.js} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-70e7e90b.cjs → browser/USE_SERVER_BUNDLE-fb3ef1bb.cjs} +1 -1
  5. package/lib/browser/bundle-9c5f5cde.cjs +168 -0
  6. package/lib/browser/{bundle-10ada443.js → bundle-cc12d1bc.js} +478 -503
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +26 -30
  9. package/lib/{browser/USE_CLIENT_BUNDLE-94cce7fa.cjs → edge/USE_CLIENT_BUNDLE-366693e9.cjs} +2 -2
  10. package/lib/{node/USE_CLIENT_BUNDLE-d7ccf4f8.js → edge/USE_CLIENT_BUNDLE-c1fb11f0.js} +3 -6
  11. package/lib/{node/USE_SERVER_BUNDLE-7a98295a.js → edge/USE_SERVER_BUNDLE-7191faac.js} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-b7c27ec7.cjs → edge/USE_SERVER_BUNDLE-f0e5fdef.cjs} +1 -1
  13. package/lib/edge/bundle-a08cccde.cjs +188 -0
  14. package/lib/edge/{bundle-66600134.js → bundle-cc82bd60.js} +1067 -1092
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +26 -30
  17. package/lib/{edge/USE_CLIENT_BUNDLE-4859795b.cjs → node/USE_CLIENT_BUNDLE-62a178e1.cjs} +2 -2
  18. package/lib/{edge/USE_CLIENT_BUNDLE-6fd05768.js → node/USE_CLIENT_BUNDLE-d012a153.js} +3 -6
  19. package/lib/{browser/USE_SERVER_BUNDLE-20569132.cjs → node/USE_SERVER_BUNDLE-95968708.cjs} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-02c2385b.js → node/USE_SERVER_BUNDLE-a4460138.js} +1 -1
  21. package/lib/node/{bundle-2d5f1c0c.js → bundle-72550faf.js} +189 -211
  22. package/lib/node/{bundle-9b818d40.cjs → bundle-b5a3f37b.cjs} +12 -12
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +26 -30
  25. package/package.json +1 -1
  26. package/types/cjs/components/content-variants/content-variants.types.d.ts +0 -2
  27. package/types/cjs/constants/sdk-version.d.ts +1 -1
  28. package/types/cjs/functions/get-content/index.d.ts +0 -10
  29. package/types/cjs/functions/get-content/types.d.ts +0 -11
  30. package/types/cjs/functions/register-component.d.ts +0 -9
  31. package/types/cjs/index-helpers/blocks-exports.d.ts +0 -8
  32. package/types/cjs/server-index.d.ts +1 -1
  33. package/types/esm/components/content-variants/content-variants.types.d.ts +0 -2
  34. package/types/esm/constants/sdk-version.d.ts +1 -1
  35. package/types/esm/functions/get-content/index.d.ts +0 -10
  36. package/types/esm/functions/get-content/types.d.ts +0 -11
  37. package/types/esm/functions/register-component.d.ts +0 -9
  38. package/types/esm/index-helpers/blocks-exports.d.ts +0 -8
  39. package/types/esm/server-index.d.ts +1 -1
  40. package/lib/browser/bundle-44e64ae0.cjs +0 -168
  41. package/lib/edge/bundle-aa7b9a16.cjs +0 -188
@@ -1,7 +1,7 @@
1
- import { LRUCache } from "lru-cache";
2
1
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
3
- import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, D as DynamicRenderer, C as CustomCode, E as Embed, b as ImgComponent, V as Video, c as Button, F as FragmentComponent, d as Image, S as SectionComponent, e as EnableEditor } from "./USE_CLIENT_BUNDLE-d7ccf4f8.js";
4
2
  import "react";
3
+ import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, D as DynamicRenderer, C as CustomCode, E as Embed, b as ImgComponent, V as Video, c as Button, F as FragmentComponent, d as Image, S as SectionComponent, e as EnableEditor } from "./USE_CLIENT_BUNDLE-d012a153.js";
4
+ import { LRUCache } from "lru-cache";
5
5
  import "next/navigation";
6
6
  const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), isEmptyElement = (e) => typeof e == "string" && EMPTY_HTML_ELEMENTS.has(e.toLowerCase()), TARGET = "rsc", getClassPropName = () => {
7
7
  switch (TARGET) {
@@ -151,7 +151,7 @@ try {
151
151
  safeDynamicRequire = eval("require");
152
152
  } catch (e) {
153
153
  }
154
- const ivm = safeDynamicRequire("isolated-vm"), getSyncValName = (e) => `bldr_${e}_sync`, BUILDER_SET_STATE_NAME = "BUILDER_SET_STATE", INJECTED_IVM_GLOBAL = "BUILDER_IVM", REF_TO_PROXY_FN = `
154
+ const getSyncValName = (e) => `bldr_${e}_sync`, BUILDER_SET_STATE_NAME = "BUILDER_SET_STATE", INJECTED_IVM_GLOBAL = "BUILDER_IVM", REF_TO_PROXY_FN = `
155
155
  var refToProxy = (obj) => {
156
156
  if (typeof obj !== 'object' || obj === null) {
157
157
  return obj;
@@ -197,9 +197,12 @@ if (typeof output === 'object' && output !== null) {
197
197
 
198
198
  output;
199
199
  `;
200
- }, getIsolateContext = () => new ivm.Isolate({
201
- memoryLimit: 128
202
- }).createContextSync(), runInNode = ({
200
+ }, getIsolateContext = () => {
201
+ const e = safeDynamicRequire("isolated-vm");
202
+ return new e.Isolate({
203
+ memoryLimit: 128
204
+ }).createContextSync();
205
+ }, runInNode = ({
203
206
  code: e,
204
207
  builder: t,
205
208
  context: n,
@@ -208,33 +211,33 @@ output;
208
211
  rootSetState: i,
209
212
  rootState: a
210
213
  }) => {
211
- const s = fastClone({
214
+ const s = safeDynamicRequire("isolated-vm"), c = fastClone({
212
215
  ...a,
213
216
  ...r
214
- }), c = getFunctionArguments({
217
+ }), u = getFunctionArguments({
215
218
  builder: t,
216
219
  context: n,
217
220
  event: o,
218
- state: s
219
- }), m = getIsolateContext(), f = m.global;
220
- f.setSync("global", f.derefInto()), f.setSync("log", function(...d) {
221
- console.log(...d);
222
- }), f.setSync(BUILDER_SET_STATE_NAME, function(d, l) {
223
- set(a, d, l), i == null || i(a);
224
- }), c.forEach(([d, l]) => {
225
- const u = typeof l == "object" ? new ivm.Reference(
221
+ state: c
222
+ }), h = getIsolateContext(), m = h.global;
223
+ m.setSync("global", m.derefInto()), m.setSync("log", function(...l) {
224
+ console.log(...l);
225
+ }), m.setSync(BUILDER_SET_STATE_NAME, function(l, d) {
226
+ set(a, l, d), i == null || i(a);
227
+ }), u.forEach(([l, d]) => {
228
+ const b = typeof d == "object" ? new s.Reference(
226
229
  // workaround: methods with default values for arguments is not being cloned over
227
- d === "builder" ? {
228
- ...l,
229
- getUserAttributes: () => l.getUserAttributes()
230
- } : l
230
+ l === "builder" ? {
231
+ ...d,
232
+ getUserAttributes: () => d.getUserAttributes()
233
+ } : d
231
234
  ) : null;
232
- f.setSync(getSyncValName(d), u);
233
- }), f.setSync(INJECTED_IVM_GLOBAL, ivm);
234
- const p = processCode({
235
+ m.setSync(getSyncValName(l), b);
236
+ }), m.setSync(INJECTED_IVM_GLOBAL, s);
237
+ const f = processCode({
235
238
  code: e,
236
- args: c
237
- }), g = m.evalSync(p);
239
+ args: u
240
+ }), g = h.evalSync(f);
238
241
  try {
239
242
  return JSON.parse(g);
240
243
  } catch {
@@ -307,14 +310,14 @@ const evaluateBindings = ({
307
310
  }
308
311
  };
309
312
  for (const s in e.bindings) {
310
- const c = e.bindings[s], m = evaluate({
313
+ const c = e.bindings[s], u = evaluate({
311
314
  code: c,
312
315
  localState: n,
313
316
  rootState: o,
314
317
  rootSetState: r,
315
318
  context: t
316
319
  });
317
- set(a, s, m);
320
+ set(a, s, u);
318
321
  }
319
322
  return a;
320
323
  };
@@ -377,15 +380,15 @@ const getComponent = ({
377
380
  if (!Array.isArray(r))
378
381
  return;
379
382
  const i = n.collection.split(".").pop(), a = n.itemName || (i ? i + "Item" : "item");
380
- return r.map((c, m) => ({
383
+ return r.map((c, u) => ({
381
384
  context: {
382
385
  ...t,
383
386
  localState: {
384
387
  ...t.localState,
385
- $index: m,
388
+ $index: u,
386
389
  $item: c,
387
390
  [a]: c,
388
- [`$${a}Index`]: m
391
+ [`$${a}Index`]: u
389
392
  }
390
393
  },
391
394
  block: o
@@ -463,7 +466,7 @@ function BlockStyles(e) {
463
466
  });
464
467
  return checkIsDefined(r.hide) ? !r.hide : checkIsDefined(r.show) ? r.show : !0;
465
468
  }, n = function() {
466
- var u;
469
+ var d;
467
470
  const r = getProcessedBlock({
468
471
  block: e.block,
469
472
  localState: e.context.localState,
@@ -472,29 +475,29 @@ function BlockStyles(e) {
472
475
  context: e.context.context,
473
476
  shouldEvaluateBindings: !0
474
477
  }), i = r.responsiveStyles, a = e.context.content, s = getSizesForBreakpoints(
475
- ((u = a == null ? void 0 : a.meta) == null ? void 0 : u.breakpoints) || {}
476
- ), c = i == null ? void 0 : i.large, m = i == null ? void 0 : i.medium, f = i == null ? void 0 : i.small, p = r.id;
477
- if (!p)
478
+ ((d = a == null ? void 0 : a.meta) == null ? void 0 : d.breakpoints) || {}
479
+ ), c = i == null ? void 0 : i.large, u = i == null ? void 0 : i.medium, h = i == null ? void 0 : i.small, m = r.id;
480
+ if (!m)
478
481
  return "";
479
- const g = c ? createCssClass({
480
- className: p,
482
+ const f = c ? createCssClass({
483
+ className: m,
481
484
  styles: c
482
- }) : "", d = m ? createCssClass({
483
- className: p,
484
- styles: m,
485
+ }) : "", g = u ? createCssClass({
486
+ className: m,
487
+ styles: u,
485
488
  mediaQuery: getMaxWidthQueryForSize(
486
489
  "medium",
487
490
  s
488
491
  )
489
- }) : "", l = f ? createCssClass({
490
- className: p,
491
- styles: f,
492
+ }) : "", l = h ? createCssClass({
493
+ className: m,
494
+ styles: h,
492
495
  mediaQuery: getMaxWidthQueryForSize(
493
496
  "small",
494
497
  s
495
498
  )
496
499
  }) : "";
497
- return [g, d, l].join(" ");
500
+ return [f, g, l].join(" ");
498
501
  };
499
502
  return /* @__PURE__ */ jsx(Fragment, { children: n() && t() ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { styles: n() }) }) : null });
500
503
  }
@@ -657,7 +660,7 @@ function RepeatedBlock(e) {
657
660
  );
658
661
  }
659
662
  function Block(e) {
660
- var m, f, p;
663
+ var u, h, m;
661
664
  const t = function() {
662
665
  return getComponent({
663
666
  block: e.block,
@@ -670,8 +673,8 @@ function Block(e) {
670
673
  context: e.context
671
674
  });
672
675
  }, o = function() {
673
- var d;
674
- return (d = e.block.repeat) != null && d.collection ? e.block : getProcessedBlock({
676
+ var g;
677
+ return (g = e.block.repeat) != null && g.collection ? e.block : getProcessedBlock({
675
678
  block: e.block,
676
679
  localState: e.context.localState,
677
680
  rootState: e.context.rootState,
@@ -683,26 +686,26 @@ function Block(e) {
683
686
  var l;
684
687
  return e.block.tagName === "a" || ((l = o().properties) == null ? void 0 : l.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
685
688
  }, i = function() {
686
- var u, b;
687
- if ((u = e.block.repeat) != null && u.collection)
689
+ var d, b;
690
+ if ((d = e.block.repeat) != null && d.collection)
688
691
  return !!((b = n()) != null && b.length);
689
- const d = "hide" in o() ? o().hide : !1;
690
- return ("show" in o() ? o().show : !0) && !d;
692
+ const g = "hide" in o() ? o().hide : !1;
693
+ return ("show" in o() ? o().show : !0) && !g;
691
694
  }, a = function() {
692
695
  var l;
693
696
  return !((l = t()) != null && l.component) && !n() ? o().children ?? [] : [];
694
697
  }, s = function() {
695
- var d, l, u, b, y, h, x, k, S, C;
698
+ var g, l, d, b, p, S, k, y, C, x;
696
699
  return {
697
700
  blockChildren: o().children ?? [],
698
- componentRef: (d = t()) == null ? void 0 : d.component,
701
+ componentRef: (g = t()) == null ? void 0 : g.component,
699
702
  componentOptions: {
700
703
  ...getBlockComponentOptions(o()),
701
704
  builderContext: e.context,
702
- ...((l = t()) == null ? void 0 : l.name) === "Core:Button" || ((u = t()) == null ? void 0 : u.name) === "Symbol" || ((b = t()) == null ? void 0 : b.name) === "Columns" || ((y = t()) == null ? void 0 : y.name) === "Form:Form" ? {
705
+ ...((l = t()) == null ? void 0 : l.name) === "Core:Button" || ((d = t()) == null ? void 0 : d.name) === "Symbol" || ((b = t()) == null ? void 0 : b.name) === "Columns" || ((p = t()) == null ? void 0 : p.name) === "Form:Form" ? {
703
706
  builderLinkComponent: e.linkComponent
704
707
  } : {},
705
- ...((h = t()) == null ? void 0 : h.name) === "Symbol" || ((x = t()) == null ? void 0 : x.name) === "Columns" || ((k = t()) == null ? void 0 : k.name) === "Form:Form" ? {
708
+ ...((S = t()) == null ? void 0 : S.name) === "Symbol" || ((k = t()) == null ? void 0 : k.name) === "Columns" || ((y = t()) == null ? void 0 : y.name) === "Form:Form" ? {
706
709
  builderComponents: e.registeredComponents
707
710
  } : {}
708
711
  },
@@ -710,13 +713,13 @@ function Block(e) {
710
713
  linkComponent: e.linkComponent,
711
714
  registeredComponents: e.registeredComponents,
712
715
  builderBlock: o(),
713
- includeBlockProps: ((S = t()) == null ? void 0 : S.noWrap) === !0,
714
- isInteractive: !((C = t()) != null && C.isRSC)
716
+ includeBlockProps: ((C = t()) == null ? void 0 : C.noWrap) === !0,
717
+ isInteractive: !((x = t()) != null && x.isRSC)
715
718
  };
716
719
  }, c = e.context;
717
720
  return /* @__PURE__ */ jsx(Fragment, { children: i() ? /* @__PURE__ */ jsxs(Fragment, { children: [
718
721
  /* @__PURE__ */ jsx(BlockStyles, { block: e.block, context: e.context }),
719
- (m = t()) != null && m.noWrap ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
722
+ (u = t()) != null && u.noWrap ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
720
723
  ComponentRef,
721
724
  {
722
725
  componentRef: s().componentRef,
@@ -729,15 +732,15 @@ function Block(e) {
729
732
  includeBlockProps: s().includeBlockProps,
730
733
  isInteractive: s().isInteractive
731
734
  }
732
- ) }) : /* @__PURE__ */ jsx(Fragment, { children: n() ? /* @__PURE__ */ jsx(Fragment, { children: (p = n()) == null ? void 0 : p.map((g, d) => /* @__PURE__ */ jsx(
735
+ ) }) : /* @__PURE__ */ jsx(Fragment, { children: n() ? /* @__PURE__ */ jsx(Fragment, { children: (m = n()) == null ? void 0 : m.map((f, g) => /* @__PURE__ */ jsx(
733
736
  RepeatedBlock,
734
737
  {
735
- repeatContext: g.context,
736
- block: g.block,
738
+ repeatContext: f.context,
739
+ block: f.block,
737
740
  registeredComponents: e.registeredComponents,
738
741
  linkComponent: e.linkComponent
739
742
  },
740
- d
743
+ g
741
744
  )) }) : /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
742
745
  BlockWrapper,
743
746
  {
@@ -760,15 +763,15 @@ function Block(e) {
760
763
  isInteractive: s().isInteractive
761
764
  }
762
765
  ),
763
- (f = a()) == null ? void 0 : f.map((g) => /* @__PURE__ */ jsx(
766
+ (h = a()) == null ? void 0 : h.map((f) => /* @__PURE__ */ jsx(
764
767
  Block,
765
768
  {
766
- block: g,
769
+ block: f,
767
770
  context: c,
768
771
  registeredComponents: e.registeredComponents,
769
772
  linkComponent: e.linkComponent
770
773
  },
771
- g.id
774
+ f.id
772
775
  ))
773
776
  ]
774
777
  }
@@ -800,24 +803,24 @@ function Blocks(e) {
800
803
  );
801
804
  }
802
805
  function Columns(e) {
803
- var d;
804
- const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", r = function(u) {
806
+ var g;
807
+ const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", r = function(d) {
805
808
  var b;
806
- return ((b = n[u]) == null ? void 0 : b.width) || 100 / n.length;
807
- }, i = function(u) {
809
+ return ((b = n[d]) == null ? void 0 : b.width) || 100 / n.length;
810
+ }, i = function(d) {
808
811
  const b = t * (n.length - 1) / n.length;
809
- return `calc(${r(u)}% - ${b}px)`;
812
+ return `calc(${r(d)}% - ${b}px)`;
810
813
  }, a = function({
811
- stackedStyle: u,
814
+ stackedStyle: d,
812
815
  desktopStyle: b
813
816
  }) {
814
- return o === "tablet" ? u : b;
817
+ return o === "tablet" ? d : b;
815
818
  }, s = function({
816
- stackedStyle: u,
819
+ stackedStyle: d,
817
820
  desktopStyle: b
818
821
  }) {
819
- return o === "never" ? b : u;
820
- }, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", m = function() {
822
+ return o === "never" ? b : d;
823
+ }, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", u = function() {
821
824
  return {
822
825
  "--flex-dir": c,
823
826
  "--flex-dir-tablet": a({
@@ -825,41 +828,41 @@ function Columns(e) {
825
828
  desktopStyle: "row"
826
829
  })
827
830
  };
828
- }, f = function(u) {
829
- const b = u === 0 ? 0 : t, y = i(u), h = `${b}px`, x = "100%", k = 0;
831
+ }, h = function(d) {
832
+ const b = d === 0 ? 0 : t, p = i(d), S = `${b}px`, k = "100%", y = 0;
830
833
  return {
831
834
  ...{
832
835
  display: "flex",
833
836
  flexDirection: "column",
834
837
  alignItems: "stretch"
835
838
  },
836
- width: y,
837
- ["marginLeft"]: h,
839
+ width: p,
840
+ ["marginLeft"]: S,
838
841
  "--column-width-mobile": s({
839
- stackedStyle: x,
840
- desktopStyle: y
842
+ stackedStyle: k,
843
+ desktopStyle: p
841
844
  }),
842
845
  "--column-margin-left-mobile": s({
843
- stackedStyle: k,
844
- desktopStyle: h
846
+ stackedStyle: y,
847
+ desktopStyle: S
845
848
  }),
846
849
  "--column-width-tablet": a({
847
- stackedStyle: x,
848
- desktopStyle: y
850
+ stackedStyle: k,
851
+ desktopStyle: p
849
852
  }),
850
853
  "--column-margin-left-tablet": a({
851
- stackedStyle: k,
852
- desktopStyle: h
854
+ stackedStyle: y,
855
+ desktopStyle: S
853
856
  })
854
857
  };
855
- }, p = function(u) {
856
- var y, h;
858
+ }, m = function(d) {
859
+ var p, S;
857
860
  return getSizesForBreakpoints(
858
- ((h = (y = e.builderContext.content) == null ? void 0 : y.meta) == null ? void 0 : h.breakpoints) || {}
859
- )[u].max;
860
- }, g = function() {
861
+ ((S = (p = e.builderContext.content) == null ? void 0 : p.meta) == null ? void 0 : S.breakpoints) || {}
862
+ )[d].max;
863
+ }, f = function() {
861
864
  return `
862
- @media (max-width: ${p("medium")}px) {
865
+ @media (max-width: ${m("medium")}px) {
863
866
  .${e.builderBlock.id}-breakpoints {
864
867
  flex-direction: var(--flex-dir-tablet);
865
868
  align-items: stretch;
@@ -871,7 +874,7 @@ function Columns(e) {
871
874
  }
872
875
  }
873
876
 
874
- @media (max-width: ${p("small")}px) {
877
+ @media (max-width: ${m("small")}px) {
875
878
  .${e.builderBlock.id}-breakpoints {
876
879
  flex-direction: var(--flex-dir);
877
880
  align-items: stretch;
@@ -888,11 +891,11 @@ function Columns(e) {
888
891
  /* @__PURE__ */ jsxs(
889
892
  "div",
890
893
  {
891
- className: `builder-columns ${e.builderBlock.id}-breakpoints div-65bb9135`,
892
- style: m(),
894
+ className: `builder-columns ${e.builderBlock.id}-breakpoints div-1f78b21c`,
895
+ style: u(),
893
896
  children: [
894
- /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { styles: g() }) }),
895
- (d = e.columns) == null ? void 0 : d.map((l, u) => /* @__PURE__ */ jsx(
897
+ /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { styles: f() }) }),
898
+ (g = e.columns) == null ? void 0 : g.map((l, d) => /* @__PURE__ */ jsx(
896
899
  DynamicRenderer,
897
900
  {
898
901
  TagName: l.link ? e.builderLinkComponent || "a" : "div",
@@ -902,12 +905,12 @@ function Columns(e) {
902
905
  href: l.link
903
906
  } : {},
904
907
  [getClassPropName()]: "builder-column",
905
- style: mapStyleObjToStrIfNeeded(f(u))
908
+ style: mapStyleObjToStrIfNeeded(h(d))
906
909
  },
907
910
  children: /* @__PURE__ */ jsx(
908
911
  Blocks,
909
912
  {
910
- path: `component.options.columns.${u}.blocks`,
913
+ path: `component.options.columns.${d}.blocks`,
911
914
  parent: e.builderBlock.id,
912
915
  styleProp: {
913
916
  flexGrow: "1"
@@ -919,12 +922,12 @@ function Columns(e) {
919
922
  }
920
923
  )
921
924
  },
922
- u
925
+ d
923
926
  ))
924
927
  ]
925
928
  }
926
929
  ),
927
- /* @__PURE__ */ jsx("style", { children: `.div-65bb9135 {
930
+ /* @__PURE__ */ jsx("style", { children: `.div-1f78b21c {
928
931
  display: flex;
929
932
  line-height: normal;
930
933
  }` })
@@ -1356,15 +1359,15 @@ const getTopLevelDomain = (e) => {
1356
1359
  onChange: (e) => {
1357
1360
  e.delete("srcset"), e.delete("noWebp");
1358
1361
  function n(a, s = 6e4) {
1359
- return new Promise((c, m) => {
1360
- const f = document.createElement("img");
1361
- let p = !1;
1362
- f.onload = () => {
1363
- p = !0, c(f);
1364
- }, f.addEventListener("error", (g) => {
1365
- console.warn("Image load failed", g.error), m(g.error);
1366
- }), f.src = a, setTimeout(() => {
1367
- p || m(new Error("Image load timed out"));
1362
+ return new Promise((c, u) => {
1363
+ const h = document.createElement("img");
1364
+ let m = !1;
1365
+ h.onload = () => {
1366
+ m = !0, c(h);
1367
+ }, h.addEventListener("error", (f) => {
1368
+ console.warn("Image load failed", f.error), u(f.error);
1369
+ }), h.src = a, setTimeout(() => {
1370
+ m || u(new Error("Image load timed out"));
1368
1371
  }, s);
1369
1372
  });
1370
1373
  }
@@ -1754,7 +1757,7 @@ const componentInfo$3 = {
1754
1757
  }, {
1755
1758
  component: Text,
1756
1759
  ...componentInfo$4
1757
- }, ...getExtraComponents()], components = [], createRegisterComponentMessage = (e) => ({
1760
+ }, ...getExtraComponents()], createRegisterComponentMessage = (e) => ({
1758
1761
  type: "builder.registerComponent",
1759
1762
  data: serializeComponentInfo(e)
1760
1763
  }), serializeFn = (e) => {
@@ -1947,54 +1950,49 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
1947
1950
  const e = new URLSearchParams(window.location.search);
1948
1951
  return getBuilderSearchParams(e);
1949
1952
  }, normalizeSearchParams = (e) => e instanceof URLSearchParams ? convertSearchParamsToQueryObject(e) : e, isPositiveNumber = (e) => typeof e == "number" && !isNaN(e) && e >= 0, generateContentUrl = (e) => {
1950
- let {
1951
- noTraverse: t = !1
1952
- } = e;
1953
1953
  const {
1954
- limit: n = 30,
1955
- userAttributes: o,
1956
- query: r,
1957
- model: i,
1958
- apiKey: a,
1959
- includeRefs: s = !0,
1960
- enrich: c,
1961
- locale: m,
1962
- apiVersion: f = DEFAULT_API_VERSION,
1963
- fields: p,
1964
- omit: g,
1965
- offset: d,
1966
- cacheSeconds: l,
1967
- staleCacheSeconds: u,
1968
- sort: b,
1969
- includeUnpublished: y
1954
+ limit: t = 30,
1955
+ userAttributes: n,
1956
+ query: o,
1957
+ model: r,
1958
+ apiKey: i,
1959
+ enrich: a,
1960
+ locale: s,
1961
+ apiVersion: c = DEFAULT_API_VERSION,
1962
+ fields: u,
1963
+ omit: h,
1964
+ offset: m,
1965
+ cacheSeconds: f,
1966
+ staleCacheSeconds: g,
1967
+ sort: l,
1968
+ includeUnpublished: d
1970
1969
  } = e;
1971
- if (!a)
1970
+ if (!i)
1972
1971
  throw new Error("Missing API key");
1973
- if (!["v3"].includes(f))
1974
- throw new Error(`Invalid apiVersion: expected 'v3', received '${f}'`);
1975
- (e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
1976
- const h = new URL(`https://cdn.builder.io/api/${f}/content/${i}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m ? `&locale=${m}` : ""}${c ? `&enrich=${c}` : ""}`);
1977
- if (h.searchParams.set("omit", g || "meta.componentsUsed"), p && h.searchParams.set("fields", p), Number.isFinite(d) && d > -1 && h.searchParams.set("offset", String(Math.floor(d))), typeof y == "boolean" && h.searchParams.set("includeUnpublished", String(y)), l && isPositiveNumber(l) && h.searchParams.set("cacheSeconds", String(l)), u && isPositiveNumber(u) && h.searchParams.set("staleCacheSeconds", String(u)), b) {
1978
- const S = flatten({
1979
- sort: b
1972
+ if (!["v3"].includes(c))
1973
+ throw new Error(`Invalid apiVersion: expected 'v3', received '${c}'`);
1974
+ const b = t !== 1, p = new URL(`https://cdn.builder.io/api/${c}/content/${r}`);
1975
+ if (p.searchParams.set("apiKey", i), p.searchParams.set("limit", String(t)), p.searchParams.set("noTraverse", String(b)), p.searchParams.set("includeRefs", String(!0)), s && p.searchParams.set("locale", s), a && p.searchParams.set("enrich", String(a)), p.searchParams.set("omit", h || "meta.componentsUsed"), u && p.searchParams.set("fields", u), Number.isFinite(m) && m > -1 && p.searchParams.set("offset", String(Math.floor(m))), typeof d == "boolean" && p.searchParams.set("includeUnpublished", String(d)), f && isPositiveNumber(f) && p.searchParams.set("cacheSeconds", String(f)), g && isPositiveNumber(g) && p.searchParams.set("staleCacheSeconds", String(g)), l) {
1976
+ const y = flatten({
1977
+ sort: l
1980
1978
  });
1981
- for (const C in S)
1982
- h.searchParams.set(C, JSON.stringify(S[C]));
1979
+ for (const C in y)
1980
+ p.searchParams.set(C, JSON.stringify(y[C]));
1983
1981
  }
1984
- const x = {
1982
+ const S = {
1985
1983
  ...getBuilderSearchParamsFromWindow(),
1986
1984
  ...normalizeSearchParams(e.options || {})
1987
- }, k = flatten(x);
1988
- for (const S in k)
1989
- h.searchParams.set(S, String(k[S]));
1990
- if (o && h.searchParams.set("userAttributes", JSON.stringify(o)), r) {
1991
- const S = flatten({
1992
- query: r
1985
+ }, k = flatten(S);
1986
+ for (const y in k)
1987
+ p.searchParams.set(y, String(k[y]));
1988
+ if (n && p.searchParams.set("userAttributes", JSON.stringify(n)), o) {
1989
+ const y = flatten({
1990
+ query: o
1993
1991
  });
1994
- for (const C in S)
1995
- h.searchParams.set(C, JSON.stringify(S[C]));
1992
+ for (const C in y)
1993
+ p.searchParams.set(C, JSON.stringify(y[C]));
1996
1994
  }
1997
- return h;
1995
+ return p;
1998
1996
  }, checkContentHasResults = (e) => "results" in e;
1999
1997
  async function fetchOneEntry(e) {
2000
1998
  const t = await fetchEntries({
@@ -2003,7 +2001,7 @@ async function fetchOneEntry(e) {
2003
2001
  });
2004
2002
  return t && t[0] || null;
2005
2003
  }
2006
- const getContent = fetchOneEntry, _fetchContent = async (e) => {
2004
+ const _fetchContent = async (e) => {
2007
2005
  const t = generateContentUrl(e);
2008
2006
  return await (await fetch$1(t.href)).json();
2009
2007
  }, _processContentResult = async (e, t, n = generateContentUrl(e)) => {
@@ -2043,7 +2041,6 @@ async function fetchEntries(e) {
2043
2041
  return logger.error("Error fetching data. ", t), null;
2044
2042
  }
2045
2043
  }
2046
- const getAllContent = fetchEntries;
2047
2044
  function isPreviewing() {
2048
2045
  return !isBrowser() || isEditing() ? !1 : location.search.indexOf("builder.preview=") !== -1;
2049
2046
  }
@@ -2236,7 +2233,7 @@ function isFromTrustedHost(e, t) {
2236
2233
  const n = new URL(t.origin), o = n.hostname;
2237
2234
  return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
2238
2235
  }
2239
- const SDK_VERSION = "0.13.4", registry = {};
2236
+ const SDK_VERSION = "0.14.1", registry = {};
2240
2237
  function register(e, t) {
2241
2238
  let n = registry[e];
2242
2239
  if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
@@ -2306,33 +2303,33 @@ const setupBrowserForEditing = (e = {}) => {
2306
2303
  if (r != null && r.type)
2307
2304
  switch (r.type) {
2308
2305
  case "builder.evaluate": {
2309
- const s = r.data.text, c = r.data.arguments || [], m = r.data.id, f = new Function(s);
2310
- let p, g = null;
2306
+ const s = r.data.text, c = r.data.arguments || [], u = r.data.id, h = new Function(s);
2307
+ let m, f = null;
2311
2308
  try {
2312
- p = f.apply(null, c);
2313
- } catch (d) {
2314
- g = d;
2309
+ m = h.apply(null, c);
2310
+ } catch (g) {
2311
+ f = g;
2315
2312
  }
2316
- g ? (i = window.parent) == null || i.postMessage({
2313
+ f ? (i = window.parent) == null || i.postMessage({
2317
2314
  type: "builder.evaluateError",
2318
2315
  data: {
2319
- id: m,
2320
- error: g.message
2316
+ id: u,
2317
+ error: f.message
2321
2318
  }
2322
- }, "*") : p && typeof p.then == "function" ? p.then((d) => {
2319
+ }, "*") : m && typeof m.then == "function" ? m.then((g) => {
2323
2320
  var l;
2324
2321
  (l = window.parent) == null || l.postMessage({
2325
2322
  type: "builder.evaluateResult",
2326
2323
  data: {
2327
- id: m,
2328
- result: d
2324
+ id: u,
2325
+ result: g
2329
2326
  }
2330
2327
  }, "*");
2331
2328
  }).catch(console.error) : (a = window.parent) == null || a.postMessage({
2332
2329
  type: "builder.evaluateResult",
2333
2330
  data: {
2334
- result: p,
2335
- id: m
2331
+ result: m,
2332
+ id: u
2336
2333
  }
2337
2334
  }, "*");
2338
2335
  break;
@@ -2519,7 +2516,7 @@ const getRootStateInitialValue = ({
2519
2516
  meta: e == null ? void 0 : e.meta
2520
2517
  } : void 0;
2521
2518
  function ContentComponent(e) {
2522
- var r, i, a, s, c, m, f, p, g;
2519
+ var r, i, a, s, c, u, h, m, f;
2523
2520
  const t = getUpdateVariantVisibilityScript({
2524
2521
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2525
2522
  variationId: (r = e.content) == null ? void 0 : r.testVariationId,
@@ -2527,19 +2524,13 @@ function ContentComponent(e) {
2527
2524
  contentId: (i = e.content) == null ? void 0 : i.id
2528
2525
  }), n = [
2529
2526
  ...getDefaultRegisteredComponents(),
2530
- // While this `components` object is deprecated, we must maintain support for it.
2531
- // Since users are able to override our default components, we need to make sure that we do not break such
2532
- // existing usage.
2533
- // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2534
- // which is the new standard way of providing custom components, and must therefore take precedence.
2535
- ...components,
2536
2527
  ...e.customComponents || []
2537
2528
  ].reduce(
2538
- (d, { component: l, ...u }) => ({
2539
- ...d,
2540
- [u.name]: {
2529
+ (g, { component: l, ...d }) => ({
2530
+ ...g,
2531
+ [d.name]: {
2541
2532
  component: l,
2542
- ...serializeComponentInfo(u)
2533
+ ...serializeComponentInfo(d)
2543
2534
  }
2544
2535
  }),
2545
2536
  {}
@@ -2560,17 +2551,11 @@ function ContentComponent(e) {
2560
2551
  apiVersion: e.apiVersion,
2561
2552
  componentInfos: [
2562
2553
  ...getDefaultRegisteredComponents(),
2563
- // While this `components` object is deprecated, we must maintain support for it.
2564
- // Since users are able to override our default components, we need to make sure that we do not break such
2565
- // existing usage.
2566
- // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2567
- // which is the new standard way of providing custom components, and must therefore take precedence.
2568
- ...components,
2569
2554
  ...e.customComponents || []
2570
2555
  ].reduce(
2571
- (d, { component: l, ...u }) => ({
2572
- ...d,
2573
- [u.name]: serializeComponentInfo(u)
2556
+ (g, { component: l, ...d }) => ({
2557
+ ...g,
2558
+ [d.name]: serializeComponentInfo(d)
2574
2559
  }),
2575
2560
  {}
2576
2561
  ),
@@ -2588,7 +2573,6 @@ function ContentComponent(e) {
2588
2573
  apiKey: e.apiKey,
2589
2574
  canTrack: e.canTrack,
2590
2575
  locale: e.locale,
2591
- includeRefs: e.includeRefs,
2592
2576
  enrich: e.enrich,
2593
2577
  showContent: e.showContent,
2594
2578
  builderContextSignal: o,
@@ -2603,13 +2587,13 @@ function ContentComponent(e) {
2603
2587
  {
2604
2588
  contentId: (a = o.content) == null ? void 0 : a.id,
2605
2589
  cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
2606
- customFonts: (f = (m = o.content) == null ? void 0 : m.data) == null ? void 0 : f.customFonts
2590
+ customFonts: (h = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : h.customFonts
2607
2591
  }
2608
2592
  ) }),
2609
2593
  /* @__PURE__ */ jsx(
2610
2594
  Blocks,
2611
2595
  {
2612
- blocks: (g = (p = o.content) == null ? void 0 : p.data) == null ? void 0 : g.blocks,
2596
+ blocks: (f = (m = o.content) == null ? void 0 : m.data) == null ? void 0 : f.blocks,
2613
2597
  context: o,
2614
2598
  registeredComponents: n,
2615
2599
  linkComponent: e.linkComponent
@@ -2627,9 +2611,9 @@ function ContentVariants(e) {
2627
2611
  }), n = function() {
2628
2612
  var c;
2629
2613
  return getUpdateCookieAndStylesScript(
2630
- getVariants(e.content).map((m) => ({
2631
- id: m.testVariationId,
2632
- testRatio: m.testRatio
2614
+ getVariants(e.content).map((u) => ({
2615
+ id: u.testVariationId,
2616
+ testRatio: u.testRatio
2633
2617
  })),
2634
2618
  ((c = e.content) == null ? void 0 : c.id) || ""
2635
2619
  );
@@ -2670,7 +2654,6 @@ function ContentVariants(e) {
2670
2654
  linkComponent: e.linkComponent,
2671
2655
  canTrack: e.canTrack,
2672
2656
  locale: e.locale,
2673
- includeRefs: e.includeRefs,
2674
2657
  enrich: e.enrich,
2675
2658
  isSsrAbTest: t,
2676
2659
  blocksWrapper: e.blocksWrapper,
@@ -2696,7 +2679,6 @@ function ContentVariants(e) {
2696
2679
  linkComponent: e.linkComponent,
2697
2680
  canTrack: e.canTrack,
2698
2681
  locale: e.locale,
2699
- includeRefs: e.includeRefs,
2700
2682
  enrich: e.enrich,
2701
2683
  isSsrAbTest: t,
2702
2684
  blocksWrapper: e.blocksWrapper,
@@ -2730,12 +2712,12 @@ const fetchSymbolContent = async ({
2730
2712
  async function Symbol$1(e) {
2731
2713
  var o, r, i, a, s;
2732
2714
  const t = function() {
2733
- var m, f;
2715
+ var u, h;
2734
2716
  return [
2735
2717
  e.attributes[getClassPropName()],
2736
2718
  "builder-symbol",
2737
- (m = e.symbol) != null && m.inline ? "builder-inline-symbol" : void 0,
2738
- (f = e.symbol) != null && f.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2719
+ (u = e.symbol) != null && u.inline ? "builder-inline-symbol" : void 0,
2720
+ (h = e.symbol) != null && h.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2739
2721
  ].filter(Boolean).join(" ");
2740
2722
  }, n = ((o = e.symbol) == null ? void 0 : o.content) || await fetchSymbolContent({
2741
2723
  symbol: e.symbol,
@@ -2763,7 +2745,7 @@ async function Symbol$1(e) {
2763
2745
  }
2764
2746
  ) });
2765
2747
  }
2766
- const RenderBlocks = Blocks, RenderContent = ContentVariants, settings = {};
2748
+ const settings = {};
2767
2749
  function setEditorSettings(e) {
2768
2750
  if (isBrowser()) {
2769
2751
  Object.assign(settings, e);
@@ -2795,17 +2777,13 @@ const fetchBuilderProps = async (e) => {
2795
2777
  };
2796
2778
  };
2797
2779
  export {
2798
- getBuilderSearchParams as A,
2780
+ track as A,
2799
2781
  Blocks as B,
2800
2782
  ContentVariants as C,
2801
- track as D,
2802
- subscribeToEditor as E,
2803
- fetchBuilderProps as F,
2804
- _processContentResult as G,
2805
- fetchEntries as H,
2806
- getAllContent as I,
2807
- getContent as J,
2808
- RenderBlocks as R,
2783
+ subscribeToEditor as D,
2784
+ fetchBuilderProps as E,
2785
+ _processContentResult as F,
2786
+ fetchEntries as G,
2809
2787
  Symbol$1 as S,
2810
2788
  Text as T,
2811
2789
  _track as _,
@@ -2831,8 +2809,8 @@ export {
2831
2809
  triggerAnimation as t,
2832
2810
  fetch$1 as u,
2833
2811
  init as v,
2834
- RenderContent as w,
2835
- Columns as x,
2836
- register as y,
2837
- setEditorSettings as z
2812
+ Columns as w,
2813
+ register as x,
2814
+ setEditorSettings as y,
2815
+ getBuilderSearchParams as z
2838
2816
  };