@builder.io/sdk-react 2.0.19 → 2.0.22

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 (68) hide show
  1. package/lib/browser/blocks-exports.cjs +31 -31
  2. package/lib/browser/blocks-exports.mjs +833 -833
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-c8020f19.cjs → server-entry-5770bca9.cjs} +2 -2
  6. package/lib/browser/{server-entry-12189812.js → server-entry-b83ba684.js} +1 -2
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{accordion-634b0466.js → accordion-78c3d81b.js} +1 -1
  10. package/lib/edge/{accordion-eaf2e50a.cjs → accordion-80133dd8.cjs} +1 -1
  11. package/lib/edge/blocks-5084bbec.cjs +12 -0
  12. package/lib/edge/{blocks-51761337.js → blocks-852d317b.js} +240 -233
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-6d2144c3.js → button-0a729557.js} +2 -2
  16. package/lib/edge/{button-a0aad19e.cjs → button-a97c0d05.cjs} +1 -1
  17. package/lib/edge/{columns-030a6892.js → columns-1149d23a.js} +6 -6
  18. package/lib/edge/{columns-44d76a14.cjs → columns-2bd50130.cjs} +4 -4
  19. package/lib/edge/{content-variants-46a433c2.js → content-variants-86962b96.js} +306 -308
  20. package/lib/edge/content-variants-cbd84920.cjs +134 -0
  21. package/lib/edge/{evaluate-6febb3ef.js → evaluate-46f56681.js} +671 -659
  22. package/lib/edge/{evaluate-29260bf8.cjs → evaluate-617e3bee.cjs} +11 -13
  23. package/lib/edge/{form-855a28fc.js → form-1811c08f.js} +6 -6
  24. package/lib/edge/form-c42561fb.cjs +1 -0
  25. package/lib/edge/{get-class-prop-name-a6353748.js → get-class-prop-name-6e4205e7.js} +1 -1
  26. package/lib/edge/{get-class-prop-name-6320e936.cjs → get-class-prop-name-dc89023a.cjs} +1 -1
  27. package/lib/edge/{image-eebfcbac.cjs → image-54d2f755.cjs} +3 -3
  28. package/lib/edge/{image-6a074aab.js → image-6970c193.js} +24 -24
  29. package/lib/edge/{img-56b4a196.js → img-0bc990ef.js} +1 -1
  30. package/lib/edge/{img-1f88586f.cjs → img-70b9d719.cjs} +1 -1
  31. package/lib/edge/index.cjs +1 -1
  32. package/lib/edge/index.mjs +1 -1
  33. package/lib/edge/{input-35f6fbdd.cjs → input-21071030.cjs} +1 -1
  34. package/lib/edge/{input-7873f170.js → input-3689c63d.js} +1 -1
  35. package/lib/edge/{select-eb16d7cc.js → select-65ebd3fd.js} +1 -1
  36. package/lib/edge/{select-f03c5ba6.cjs → select-cb7c2f44.cjs} +1 -1
  37. package/lib/edge/{server-entry-dbe27fb2.cjs → server-entry-8ce6f347.cjs} +2 -2
  38. package/lib/edge/{server-entry-77a5a1a0.js → server-entry-9d83b8e5.js} +1 -2
  39. package/lib/edge/server-entry.cjs +1 -1
  40. package/lib/edge/server-entry.mjs +1 -1
  41. package/lib/edge/{slot-93865012.cjs → slot-21cc91d8.cjs} +1 -1
  42. package/lib/edge/{slot-c9a7a451.js → slot-e5f3b92d.js} +4 -4
  43. package/lib/edge/{symbol-b6b36212.cjs → symbol-0cc07e41.cjs} +1 -1
  44. package/lib/edge/{symbol-6657c638.js → symbol-56e5b927.js} +2 -2
  45. package/lib/edge/{tabs-44484f49.js → tabs-0e6f6b5b.js} +4 -4
  46. package/lib/edge/{tabs-020fedaa.cjs → tabs-9390d611.cjs} +1 -1
  47. package/lib/edge/{text-e00e3cdc.js → text-b68c0d5a.js} +2 -2
  48. package/lib/edge/{text-562c8568.cjs → text-baaedac7.cjs} +1 -1
  49. package/lib/node/blocks-exports.cjs +31 -31
  50. package/lib/node/blocks-exports.mjs +817 -844
  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/{server-entry-82ab17f2.cjs → server-entry-52b8f10a.cjs} +2 -2
  56. package/lib/node/{server-entry-902ea0c4.js → server-entry-5b32494d.js} +1 -2
  57. package/lib/node/server-entry.cjs +1 -1
  58. package/lib/node/server-entry.mjs +1 -1
  59. package/lib/node/{should-force-browser-runtime-in-node-f20178fa.cjs → should-force-browser-runtime-in-node-253f1726.cjs} +4 -4
  60. package/lib/node/{should-force-browser-runtime-in-node-0b0cefdf.js → should-force-browser-runtime-in-node-68bc74aa.js} +56 -29
  61. package/package.json +1 -1
  62. package/types/constants/sdk-version.d.ts +1 -1
  63. package/types/functions/evaluate/browser-runtime/browser.d.ts +0 -6
  64. package/types/functions/evaluate/helpers.d.ts +5 -0
  65. package/types/types/input.d.ts +1 -1
  66. package/lib/edge/blocks-b8c9a72a.cjs +0 -12
  67. package/lib/edge/content-variants-3eef022e.cjs +0 -134
  68. package/lib/edge/form-59059e97.cjs +0 -1
@@ -1,58 +1,63 @@
1
- import { jsx as i, Fragment as h, jsxs as w } from "react/jsx-runtime";
2
- import { createContext as V, useState as A, useEffect as R, useRef as Z, useContext as N } from "react";
3
- import { BuilderContext as L } from "./blocks-exports.mjs";
4
- import { TARGET as b, checkIsDefined as I, isPreviewing as q, isEditing as T } from "./server-entry-77a5a1a0.js";
5
- import { evaluate as O, set as J } from "./evaluate-6febb3ef.js";
6
- import { getClassPropName as Q } from "./get-class-prop-name-a6353748.js";
7
- import { DynamicRenderer as G } from "./dynamic-renderer-8b343325.js";
8
- const X = V({ registeredComponents: {} });
9
- function Y(e) {
10
- var n;
1
+ import { jsx as i, Fragment as h, jsxs as R } from "react/jsx-runtime";
2
+ import { createContext as V, useEffect as b, useState as O, useRef as Z, useContext as N } from "react";
3
+ import { BuilderContext as _ } from "./blocks-exports.mjs";
4
+ import { TARGET as v, checkIsDefined as A, isPreviewing as q, isEditing as T } from "./server-entry-9d83b8e5.js";
5
+ import { evaluate as W } from "./evaluate-46f56681.js";
6
+ import { getClassPropName as J } from "./get-class-prop-name-6e4205e7.js";
7
+ import { DynamicRenderer as Q } from "./dynamic-renderer-8b343325.js";
8
+ const G = V({ registeredComponents: {} });
9
+ function X(e) {
10
+ var t;
11
11
  return {
12
- ...(n = e.component) == null ? void 0 : n.options,
12
+ ...(t = e.component) == null ? void 0 : t.options,
13
13
  ...e.options
14
14
  };
15
15
  }
16
- function ee(e, ...n) {
17
- const t = Object.assign({}, e);
18
- for (const r of n)
19
- delete t[r];
20
- return t;
16
+ function Y(e, ...t) {
17
+ const n = Object.assign({}, e);
18
+ for (const r of t)
19
+ delete n[r];
20
+ return n;
21
21
  }
22
- const j = (e) => JSON.parse(JSON.stringify(e));
23
- function W(e) {
22
+ const H = (e) => JSON.parse(JSON.stringify(e)), ee = (e, t, n) => {
23
+ if (Object(e) !== e)
24
+ return e;
25
+ const r = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
26
+ return r.slice(0, -1).reduce((o, s, l) => Object(o[s]) === o[s] ? o[s] : o[s] = Math.abs(Number(r[l + 1])) >> 0 === +r[l + 1] ? [] : {}, e)[r[r.length - 1]] = n, e;
27
+ };
28
+ function I(e) {
24
29
  if (e === null || typeof e != "object")
25
30
  return e;
26
31
  if (Array.isArray(e))
27
- return e.map((t) => W(t));
32
+ return e.map((n) => I(n));
28
33
  if (e["@type"] === "@builder.io/sdk:Element")
29
34
  return e;
30
- const n = {};
31
- for (const t in e)
32
- t !== "meta" && Object.prototype.hasOwnProperty.call(e, t) && (n[t] = W(e[t]));
33
- return n;
35
+ const t = {};
36
+ for (const n in e)
37
+ n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = I(e[n]));
38
+ return t;
34
39
  }
35
- const te = ["svelte", "vue", "angular", "qwik", "solid"].includes(b), ne = (e) => {
40
+ const te = ["svelte", "vue", "angular", "qwik", "solid"].includes(v), ne = (e) => {
36
41
  if (te) {
37
- const n = j(e);
42
+ const t = H(e);
38
43
  return {
39
- ...n,
44
+ ...t,
40
45
  properties: {
41
- ...n.properties
46
+ ...t.properties
42
47
  },
43
48
  actions: {
44
- ...n.actions
49
+ ...t.actions
45
50
  }
46
51
  };
47
52
  } else {
48
- const n = W(ee(e, "children", "meta"));
53
+ const t = I(Y(e, "children", "meta"));
49
54
  return {
50
- ...n,
55
+ ...t,
51
56
  properties: {
52
- ...n.properties
57
+ ...t.properties
53
58
  },
54
59
  actions: {
55
- ...n.actions
60
+ ...t.actions
56
61
  },
57
62
  children: e.children,
58
63
  meta: e.meta
@@ -60,8 +65,8 @@ const te = ["svelte", "vue", "angular", "qwik", "solid"].includes(b), ne = (e) =
60
65
  }
61
66
  }, oe = ({
62
67
  block: e,
63
- context: n,
64
- localState: t,
68
+ context: t,
69
+ localState: n,
65
70
  rootState: r,
66
71
  rootSetState: o
67
72
  }) => {
@@ -69,114 +74,114 @@ const te = ["svelte", "vue", "angular", "qwik", "solid"].includes(b), ne = (e) =
69
74
  return e;
70
75
  const s = ne(e);
71
76
  for (const l in e.bindings) {
72
- const d = e.bindings[l], f = O({
77
+ const d = e.bindings[l], f = W({
73
78
  code: d,
74
- localState: t,
79
+ localState: n,
75
80
  rootState: r,
76
81
  rootSetState: o,
77
- context: n,
82
+ context: t,
78
83
  enableCache: !0
79
84
  });
80
- J(s, l, f);
85
+ ee(s, l, f);
81
86
  }
82
87
  return s;
83
88
  };
84
89
  function re({
85
90
  block: e,
86
- context: n,
87
- shouldEvaluateBindings: t,
91
+ context: t,
92
+ shouldEvaluateBindings: n,
88
93
  localState: r,
89
94
  rootState: o,
90
95
  rootSetState: s
91
96
  }) {
92
97
  const l = e;
93
- return t ? oe({
98
+ return n ? oe({
94
99
  block: l,
95
100
  localState: r,
96
101
  rootState: o,
97
102
  rootSetState: s,
98
- context: n
103
+ context: t
99
104
  }) : l;
100
105
  }
101
- const v = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
102
- function se(e, n, t = {}) {
106
+ const B = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
107
+ function se(e, t, n = {}) {
103
108
  let r, o, s, l = null, d = 0;
104
109
  const f = function() {
105
- d = t.leading === !1 ? 0 : Date.now(), l = null, s = e.apply(r, o), l || (r = o = null);
110
+ d = n.leading === !1 ? 0 : Date.now(), l = null, s = e.apply(r, o), l || (r = o = null);
106
111
  };
107
112
  return function() {
108
113
  const a = Date.now();
109
- !d && t.leading === !1 && (d = a);
110
- const m = n - (a - d);
111
- return r = this, o = arguments, m <= 0 || m > n ? (l && (clearTimeout(l), l = null), d = a, s = e.apply(r, o), l || (r = o = null)) : !l && t.trailing !== !1 && (l = setTimeout(f, m)), s;
114
+ !d && n.leading === !1 && (d = a);
115
+ const m = t - (a - d);
116
+ return r = this, o = arguments, m <= 0 || m > t ? (l && (clearTimeout(l), l = null), d = a, s = e.apply(r, o), l || (r = o = null)) : !l && n.trailing !== !1 && (l = setTimeout(f, m)), s;
112
117
  };
113
118
  }
114
- function S(e, ...n) {
115
- const t = Object(e);
119
+ function S(e, ...t) {
120
+ const n = Object(e);
116
121
  for (let r = 1; r < arguments.length; r++) {
117
122
  const o = arguments[r];
118
123
  if (o != null)
119
124
  for (const s in o)
120
- Object.prototype.hasOwnProperty.call(o, s) && (t[s] = o[s]);
125
+ Object.prototype.hasOwnProperty.call(o, s) && (n[s] = o[s]);
121
126
  }
122
- return t;
127
+ return n;
123
128
  }
124
129
  function le(e) {
125
- for (const n of e)
126
- switch (n.trigger) {
130
+ for (const t of e)
131
+ switch (t.trigger) {
127
132
  case "pageLoad":
128
- ie(n);
133
+ ie(t);
129
134
  break;
130
135
  case "scrollInView":
131
- ae(n);
136
+ ae(t);
132
137
  break;
133
138
  }
134
139
  }
135
- function H(e) {
140
+ function U(e) {
136
141
  console.warn(`Cannot animate element: element with ID ${e} not found!`);
137
142
  }
138
- function U(e, n) {
139
- const t = ce(e), r = getComputedStyle(n), o = e.steps[0].styles, s = e.steps[e.steps.length - 1].styles, l = [o, s];
143
+ function j(e, t) {
144
+ const n = ce(e), r = getComputedStyle(t), o = e.steps[0].styles, s = e.steps[e.steps.length - 1].styles, l = [o, s];
140
145
  for (const d of l)
141
- for (const f of t)
146
+ for (const f of n)
142
147
  f in d || (d[f] = r[f]);
143
148
  }
144
149
  function ce(e) {
145
- const n = [];
146
- for (const t of e.steps)
147
- for (const r in t.styles)
148
- n.indexOf(r) === -1 && n.push(r);
149
- return n;
150
+ const t = [];
151
+ for (const n of e.steps)
152
+ for (const r in n.styles)
153
+ t.indexOf(r) === -1 && t.push(r);
154
+ return t;
150
155
  }
151
156
  function ie(e) {
152
- const n = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
153
- if (!n.length) {
154
- H(e.elementId || e.id || "");
157
+ const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
158
+ if (!t.length) {
159
+ U(e.elementId || e.id || "");
155
160
  return;
156
161
  }
157
- Array.from(n).forEach((t) => {
158
- U(e, t), t.style.transition = "none", t.style.transitionDelay = "0", S(t.style, e.steps[0].styles), setTimeout(() => {
159
- t.style.transition = `all ${e.duration}s ${v(e.easing)}`, e.delay && (t.style.transitionDelay = e.delay + "s"), S(t.style, e.steps[1].styles), setTimeout(() => {
160
- t.style.transition = "", t.style.transitionDelay = "";
162
+ Array.from(t).forEach((n) => {
163
+ j(e, n), n.style.transition = "none", n.style.transitionDelay = "0", S(n.style, e.steps[0].styles), setTimeout(() => {
164
+ n.style.transition = `all ${e.duration}s ${B(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), S(n.style, e.steps[1].styles), setTimeout(() => {
165
+ n.style.transition = "", n.style.transitionDelay = "";
161
166
  }, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
162
167
  });
163
168
  });
164
169
  }
165
170
  function ae(e) {
166
- const n = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
167
- if (!n.length) {
168
- H(e.elementId || e.id || "");
171
+ const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
172
+ if (!t.length) {
173
+ U(e.elementId || e.id || "");
169
174
  return;
170
175
  }
171
- Array.from(n).forEach((t) => {
172
- U(e, t);
176
+ Array.from(t).forEach((n) => {
177
+ j(e, n);
173
178
  let r = !1, o = !1;
174
179
  function s() {
175
- !r && d(t) ? (r = !0, o = !0, setTimeout(() => {
176
- S(t.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", l), setTimeout(() => {
177
- o = !1, e.repeat || (t.style.transition = "", t.style.transitionDelay = "");
180
+ !r && d(n) ? (r = !0, o = !0, setTimeout(() => {
181
+ S(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", l), setTimeout(() => {
182
+ o = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
178
183
  }, (e.duration + (e.delay || 0)) * 1e3 + 100);
179
- })) : e.repeat && r && !o && !d(t) && (r = !1, S(t.style, e.steps[0].styles));
184
+ })) : e.repeat && r && !o && !d(n) && (r = !1, S(n.style, e.steps[0].styles));
180
185
  }
181
186
  const l = se(s, 200, {
182
187
  leading: !1
@@ -187,27 +192,27 @@ function ae(e) {
187
192
  }
188
193
  const f = e.steps[0].styles;
189
194
  function a() {
190
- S(t.style, f);
195
+ S(n.style, f);
191
196
  }
192
197
  a(), setTimeout(() => {
193
- t.style.transition = `all ${e.duration}s ${v(e.easing)}`, e.delay && (t.style.transitionDelay = e.delay + "s");
198
+ n.style.transition = `all ${e.duration}s ${B(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
194
199
  }), document.addEventListener("scroll", l, {
195
200
  capture: !0,
196
201
  passive: !0
197
202
  }), s();
198
203
  });
199
204
  }
200
- const z = (e) => Object.entries(e).map(([t, r]) => {
205
+ const z = (e) => Object.entries(e).map(([n, r]) => {
201
206
  if (typeof r == "string")
202
- return `${v(t)}: ${r};`;
203
- }).filter(I), ue = (e) => z(e).join(`
207
+ return `${B(n)}: ${r};`;
208
+ }).filter(A), ue = (e) => z(e).join(`
204
209
  `), x = ({
205
210
  mediaQuery: e,
206
- className: n,
207
- styles: t
211
+ className: t,
212
+ styles: n
208
213
  }) => {
209
- const r = `.${n} {
210
- ${ue(t)}
214
+ const r = `.${t} {
215
+ ${ue(n)}
211
216
  }`;
212
217
  return e ? `${e} {
213
218
  ${r}
@@ -220,14 +225,14 @@ function de({
220
225
  }
221
226
  const fe = ({
222
227
  block: e,
223
- context: n
228
+ context: t
224
229
  }) => me(de({
225
230
  style: e.style || {},
226
- context: n,
231
+ context: t,
227
232
  block: e
228
233
  }));
229
234
  function me(e) {
230
- switch (b) {
235
+ switch (v) {
231
236
  case "svelte":
232
237
  case "vue":
233
238
  case "solid":
@@ -242,44 +247,44 @@ function me(e) {
242
247
  }
243
248
  const he = ({
244
249
  block: e,
245
- registeredComponents: n
250
+ registeredComponents: t
246
251
  }) => {
247
252
  var o;
248
- const t = (o = e.component) == null ? void 0 : o.name;
249
- if (!t)
253
+ const n = (o = e.component) == null ? void 0 : o.name;
254
+ if (!n)
250
255
  return null;
251
- const r = n[t];
256
+ const r = t[n];
252
257
  if (r)
253
258
  return r;
254
259
  console.warn(`
255
- Could not find a registered component named "${t}".
260
+ Could not find a registered component named "${n}".
256
261
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
257
262
  }, pe = ({
258
263
  block: e,
259
- context: n
264
+ context: t
260
265
  }) => {
261
266
  const {
262
- repeat: t,
267
+ repeat: n,
263
268
  ...r
264
269
  } = e;
265
- if (!(t != null && t.collection))
270
+ if (!(n != null && n.collection))
266
271
  return;
267
- const o = O({
268
- code: t.collection,
269
- localState: n.localState,
270
- rootState: n.rootState,
271
- rootSetState: n.rootSetState,
272
- context: n.context,
272
+ const o = W({
273
+ code: n.collection,
274
+ localState: t.localState,
275
+ rootState: t.rootState,
276
+ rootSetState: t.rootSetState,
277
+ context: t.context,
273
278
  enableCache: !0
274
279
  });
275
280
  if (!Array.isArray(o))
276
281
  return;
277
- const s = t.collection.split(".").pop(), l = t.itemName || (s ? s + "Item" : "item");
282
+ const s = n.collection.split(".").pop(), l = n.itemName || (s ? s + "Item" : "item");
278
283
  return o.map((f, a) => ({
279
284
  context: {
280
- ...n,
285
+ ...t,
281
286
  localState: {
282
- ...n.localState,
287
+ ...t.localState,
283
288
  $index: a,
284
289
  $item: f,
285
290
  [l]: f,
@@ -288,25 +293,25 @@ const he = ({
288
293
  },
289
294
  block: r
290
295
  }));
291
- }, ye = (e, n) => {
292
- var t;
293
- return (t = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && t.builderLinkComponent ? {
294
- builderLinkComponent: n
296
+ }, ye = (e, t) => {
297
+ var n;
298
+ return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderLinkComponent ? {
299
+ builderLinkComponent: t
295
300
  } : {};
296
- }, ge = (e, n) => {
297
- var t;
298
- return (t = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && t.builderComponents ? {
299
- builderComponents: n
301
+ }, ge = (e, t) => {
302
+ var n;
303
+ return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderComponents ? {
304
+ builderComponents: t
300
305
  } : {};
301
- }, ke = (e, n) => {
302
- var t;
303
- return (t = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && t.builderBlock ? {
304
- builderBlock: n
306
+ }, ke = (e, t) => {
307
+ var n;
308
+ return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderBlock ? {
309
+ builderBlock: t
305
310
  } : {};
306
- }, Ce = (e, n) => {
307
- var t;
308
- return (t = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && t.builderContext ? {
309
- builderContext: n
311
+ }, Ce = (e, t) => {
312
+ var n;
313
+ return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderContext ? {
314
+ builderContext: t
310
315
  } : {};
311
316
  }, K = {
312
317
  small: {
@@ -324,32 +329,32 @@ const he = ({
324
329
  default: 991,
325
330
  max: 1200
326
331
  }
327
- }, D = (e, n = K) => `@media (max-width: ${n[e].max}px)`, Se = ({
332
+ }, D = (e, t = K) => `@media (max-width: ${t[e].max}px)`, Se = ({
328
333
  small: e,
329
- medium: n
334
+ medium: t
330
335
  }) => {
331
- const t = j(K);
332
- if (!e || !n)
333
- return t;
336
+ const n = H(K);
337
+ if (!e || !t)
338
+ return n;
334
339
  const r = Math.floor(e / 2);
335
- t.small = {
340
+ n.small = {
336
341
  max: e,
337
342
  min: r,
338
343
  default: r + 1
339
344
  };
340
- const o = t.small.max + 1;
341
- t.medium = {
342
- max: n,
345
+ const o = n.small.max + 1;
346
+ n.medium = {
347
+ max: t,
343
348
  min: o,
344
349
  default: o + 1
345
350
  };
346
- const s = t.medium.max + 1;
347
- return t.large = {
351
+ const s = n.medium.max + 1;
352
+ return n.large = {
348
353
  max: 2e3,
349
354
  // TODO: decide upper limit
350
355
  min: s,
351
356
  default: s + 1
352
- }, t;
357
+ }, n;
353
358
  };
354
359
  function xe(e) {
355
360
  return /* @__PURE__ */ i(
@@ -362,11 +367,11 @@ function xe(e) {
362
367
  );
363
368
  }
364
369
  function be(e) {
365
- function n() {
370
+ function t() {
366
371
  const r = e.block;
367
- return I(r.hide) ? !r.hide : I(r.show) ? r.show : !0;
372
+ return A(r.hide) ? !r.hide : A(r.show) ? r.show : !0;
368
373
  }
369
- function t() {
374
+ function n() {
370
375
  var p, y, $;
371
376
  const r = e.block, o = r.responsiveStyles, s = e.context.content, l = Se(
372
377
  ((p = s == null ? void 0 : s.meta) == null ? void 0 : p.breakpoints) || {}
@@ -390,15 +395,15 @@ function be(e) {
390
395
  "small",
391
396
  l
392
397
  )
393
- }) : "", c = r.animations && r.animations.find((P) => P.trigger === "hover");
398
+ }) : "", c = r.animations && r.animations.find((w) => w.trigger === "hover");
394
399
  let u = "";
395
400
  if (c) {
396
- const P = (($ = (y = c.steps) == null ? void 0 : y[1]) == null ? void 0 : $.styles) || {};
401
+ const w = (($ = (y = c.steps) == null ? void 0 : y[1]) == null ? void 0 : $.styles) || {};
397
402
  u = x({
398
403
  className: `${m}:hover`,
399
404
  styles: {
400
- ...P,
401
- transition: `all ${c.duration}s ${v(
405
+ ...w,
406
+ transition: `all ${c.duration}s ${B(
402
407
  c.easing
403
408
  )}`,
404
409
  transitionDelay: c.delay ? `${c.delay}s` : "0s"
@@ -412,11 +417,11 @@ function be(e) {
412
417
  u
413
418
  ].join(" ");
414
419
  }
415
- return /* @__PURE__ */ i(h, { children: t() && n() ? /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(
420
+ return /* @__PURE__ */ i(h, { children: n() && t() ? /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(
416
421
  xe,
417
422
  {
418
423
  id: "builderio-block",
419
- styles: t(),
424
+ styles: n(),
420
425
  nonce: e.context.nonce
421
426
  }
422
427
  ) }) : null });
@@ -424,26 +429,26 @@ function be(e) {
424
429
  function ve(e) {
425
430
  return e.charAt(0).toUpperCase() + e.slice(1);
426
431
  }
427
- const Be = (e) => `on${ve(e)}`, Pe = (e, n) => (t) => O({
432
+ const Be = (e) => `on${ve(e)}`, Pe = (e, t) => (n) => W({
428
433
  code: e,
429
- context: n.context,
430
- localState: n.localState,
431
- rootState: n.rootState,
432
- rootSetState: n.rootSetState,
433
- event: t,
434
+ context: t.context,
435
+ localState: t.localState,
436
+ rootState: t.rootState,
437
+ rootSetState: t.rootSetState,
438
+ event: n,
434
439
  isExpression: !1,
435
440
  enableCache: !0
436
441
  });
437
442
  function F(e) {
438
443
  var r;
439
- const n = {}, t = (r = e.block.actions) != null ? r : {};
440
- for (const o in t) {
441
- if (!t.hasOwnProperty(o))
444
+ const t = {}, n = (r = e.block.actions) != null ? r : {};
445
+ for (const o in n) {
446
+ if (!n.hasOwnProperty(o))
442
447
  continue;
443
- const s = t[o];
448
+ const s = n[o];
444
449
  let l = Be(o);
445
450
  if (e.stripPrefix)
446
- switch (b) {
451
+ switch (v) {
447
452
  case "vue":
448
453
  l = l.replace("v-on:", "");
449
454
  break;
@@ -451,9 +456,9 @@ function F(e) {
451
456
  l = l.replace("on:", "");
452
457
  break;
453
458
  }
454
- n[l] = Pe(s, e);
459
+ t[l] = Pe(s, e);
455
460
  }
456
- return n;
461
+ return t;
457
462
  }
458
463
  function we({
459
464
  properties: e
@@ -465,28 +470,28 @@ const Re = (e) => ({
465
470
  });
466
471
  function E({
467
472
  block: e,
468
- context: n
473
+ context: t
469
474
  }) {
470
475
  var r;
471
- const t = {
476
+ const n = {
472
477
  ...Re(e),
473
478
  ...e.properties,
474
479
  "builder-id": e.id,
475
480
  style: fe({
476
481
  block: e,
477
- context: n
482
+ context: t
478
483
  }),
479
- [Q()]: [e.id, "builder-block", e.class, (r = e.properties) == null ? void 0 : r.class].filter(Boolean).join(" ")
484
+ [J()]: [e.id, "builder-block", e.class, (r = e.properties) == null ? void 0 : r.class].filter(Boolean).join(" ")
480
485
  };
481
486
  return we({
482
- properties: t,
483
- context: n,
487
+ properties: n,
488
+ context: t,
484
489
  block: e
485
490
  });
486
491
  }
487
- function Ie(e) {
492
+ function Ae(e) {
488
493
  return /* @__PURE__ */ i(
489
- G,
494
+ Q,
490
495
  {
491
496
  TagName: e.Wrapper,
492
497
  attributes: E({
@@ -505,11 +510,12 @@ function Ie(e) {
505
510
  }
506
511
  );
507
512
  }
508
- function We(e) {
509
- return /* @__PURE__ */ i(h, { children: e.children });
513
+ function Ie(e) {
514
+ return b(() => {
515
+ }, []), /* @__PURE__ */ i(h, { children: e.children });
510
516
  }
511
- function Ae(e) {
512
- function n() {
517
+ function Oe(e) {
518
+ function t() {
513
519
  return e.includeBlockProps ? {
514
520
  ...E({
515
521
  block: e.block,
@@ -525,20 +531,20 @@ function Ae(e) {
525
531
  } : {};
526
532
  }
527
533
  return /* @__PURE__ */ i(h, { children: e.Wrapper.load ? /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(
528
- We,
534
+ Ie,
529
535
  {
530
536
  load: e.Wrapper.load,
531
537
  fallback: e.Wrapper.fallback,
532
538
  props: e.wrapperProps,
533
- attributes: n(),
539
+ attributes: t(),
534
540
  children: e.children
535
541
  }
536
- ) }) : /* @__PURE__ */ i(e.Wrapper, { ...e.wrapperProps, attributes: n(), children: e.children }) });
542
+ ) }) : /* @__PURE__ */ i(e.Wrapper, { ...e.wrapperProps, attributes: t(), children: e.children }) });
537
543
  }
538
- const Oe = ({
544
+ const We = ({
539
545
  componentOptions: e,
540
- builderBlock: n,
541
- context: t,
546
+ builderBlock: t,
547
+ context: n,
542
548
  componentRef: r,
543
549
  includeBlockProps: o,
544
550
  isInteractive: s,
@@ -552,28 +558,28 @@ const Oe = ({
552
558
  */
553
559
  ...o ? {
554
560
  attributes: E({
555
- block: n,
561
+ block: t,
556
562
  context: l
557
563
  })
558
564
  } : {}
559
565
  };
560
566
  return s ? {
561
567
  Wrapper: r,
562
- block: n,
563
- context: t,
568
+ block: t,
569
+ context: n,
564
570
  wrapperProps: e,
565
571
  includeBlockProps: o
566
572
  } : d;
567
573
  };
568
- function _(e) {
574
+ function M(e) {
569
575
  var r;
570
- const [n, t] = A(
571
- () => e.isInteractive ? Ae : e.componentRef
576
+ const [t, n] = O(
577
+ () => e.isInteractive ? Oe : e.componentRef
572
578
  );
573
579
  return /* @__PURE__ */ i(h, { children: e.componentRef ? /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(
574
- n,
580
+ t,
575
581
  {
576
- ...Oe({
582
+ ...We({
577
583
  componentOptions: e.componentOptions,
578
584
  builderBlock: e.builderBlock,
579
585
  context: e.context,
@@ -584,7 +590,7 @@ function _(e) {
584
590
  contextValue: e.context
585
591
  }),
586
592
  children: (r = e.blockChildren) == null ? void 0 : r.map((o) => /* @__PURE__ */ i(
587
- B,
593
+ P,
588
594
  {
589
595
  block: o,
590
596
  context: e.context,
@@ -596,34 +602,34 @@ function _(e) {
596
602
  }
597
603
  ) }) : null });
598
604
  }
599
- function M(e) {
600
- const [n, t] = A(() => e.repeatContext);
601
- return /* @__PURE__ */ i(L.Provider, { value: n, children: /* @__PURE__ */ i(
602
- B,
605
+ function L(e) {
606
+ const [t, n] = O(() => e.repeatContext);
607
+ return /* @__PURE__ */ i(_.Provider, { value: t, children: /* @__PURE__ */ i(
608
+ P,
603
609
  {
604
610
  block: e.block,
605
- context: n,
611
+ context: t,
606
612
  registeredComponents: e.registeredComponents,
607
613
  linkComponent: e.linkComponent
608
614
  }
609
615
  ) });
610
616
  }
611
- function B(e) {
617
+ function P(e) {
612
618
  var m, g, k, C;
613
- function n() {
619
+ function t() {
614
620
  return pe({
615
621
  block: e.block,
616
622
  context: e.context
617
623
  });
618
624
  }
619
- const [t, r] = A(() => ({
625
+ const [n, r] = O(() => ({
620
626
  value: null,
621
627
  update: !1
622
628
  }));
623
629
  function o() {
624
630
  var u;
625
- if (t.value && !t.update && !q())
626
- return t.value;
631
+ if (n.value && !n.update && !q())
632
+ return n.value;
627
633
  const c = (u = e.block.repeat) != null && u.collection ? e.block : re({
628
634
  block: e.block,
629
635
  localState: e.context.localState,
@@ -632,7 +638,7 @@ function B(e) {
632
638
  context: e.context.context,
633
639
  shouldEvaluateBindings: !0
634
640
  });
635
- return t.value = c, t.update = !1, c;
641
+ return n.value = c, n.update = !1, c;
636
642
  }
637
643
  function s() {
638
644
  return he({
@@ -647,13 +653,13 @@ function B(e) {
647
653
  function d() {
648
654
  var p, y;
649
655
  if ((p = e.block.repeat) != null && p.collection)
650
- return !!((y = n == null ? void 0 : n()) != null && y.length);
656
+ return !!((y = t == null ? void 0 : t()) != null && y.length);
651
657
  const c = "hide" in o() ? o().hide : !1;
652
658
  return ("show" in o() ? o().show : !0) && !c;
653
659
  }
654
660
  function f() {
655
661
  var u, p;
656
- return !((u = s == null ? void 0 : s()) != null && u.component) && !n() ? (p = o().children) != null ? p : [] : [];
662
+ return !((u = s == null ? void 0 : s()) != null && u.component) && !t() ? (p = o().children) != null ? p : [] : [];
657
663
  }
658
664
  function a() {
659
665
  var c, u, p, y;
@@ -661,7 +667,7 @@ function B(e) {
661
667
  blockChildren: (c = o().children) != null ? c : [],
662
668
  componentRef: (u = s == null ? void 0 : s()) == null ? void 0 : u.component,
663
669
  componentOptions: {
664
- ...Y(o()),
670
+ ...X(o()),
665
671
  ...ke(s(), o()),
666
672
  ...Ce(s(), e.context),
667
673
  ...ye(s(), e.linkComponent),
@@ -675,10 +681,10 @@ function B(e) {
675
681
  registeredComponents: e.registeredComponents,
676
682
  builderBlock: o(),
677
683
  includeBlockProps: ((p = s == null ? void 0 : s()) == null ? void 0 : p.noWrap) === !0,
678
- isInteractive: !((y = s == null ? void 0 : s()) != null && y.isRSC && b === "rsc")
684
+ isInteractive: !((y = s == null ? void 0 : s()) != null && y.isRSC && v === "rsc")
679
685
  };
680
686
  }
681
- return R(() => {
687
+ return b(() => {
682
688
  const c = o().id, u = o().animations;
683
689
  u && c && le(
684
690
  u.map((p) => ({
@@ -686,12 +692,12 @@ function B(e) {
686
692
  elementId: c
687
693
  }))
688
694
  );
689
- }, []), R(() => {
690
- t.update = !0;
691
- }), /* @__PURE__ */ i(h, { children: d() ? /* @__PURE__ */ w(h, { children: [
695
+ }, []), b(() => {
696
+ n.update = !0;
697
+ }), /* @__PURE__ */ i(h, { children: d() ? /* @__PURE__ */ R(h, { children: [
692
698
  /* @__PURE__ */ i(be, { block: o(), context: e.context }),
693
- (m = s == null ? void 0 : s()) != null && m.noWrap ? n() ? /* @__PURE__ */ i(h, { children: (C = n()) == null ? void 0 : C.map((c, u) => /* @__PURE__ */ i(
694
- M,
699
+ (m = s == null ? void 0 : s()) != null && m.noWrap ? t() ? /* @__PURE__ */ i(h, { children: (C = t()) == null ? void 0 : C.map((c, u) => /* @__PURE__ */ i(
700
+ L,
695
701
  {
696
702
  repeatContext: c.context,
697
703
  block: c.block,
@@ -700,7 +706,7 @@ function B(e) {
700
706
  },
701
707
  u
702
708
  )) }) : /* @__PURE__ */ i(
703
- _,
709
+ M,
704
710
  {
705
711
  componentRef: a().componentRef,
706
712
  componentOptions: a().componentOptions,
@@ -712,8 +718,8 @@ function B(e) {
712
718
  includeBlockProps: a().includeBlockProps,
713
719
  isInteractive: a().isInteractive
714
720
  }
715
- ) : /* @__PURE__ */ i(h, { children: n() ? /* @__PURE__ */ i(h, { children: (k = n()) == null ? void 0 : k.map((c, u) => /* @__PURE__ */ i(
716
- M,
721
+ ) : /* @__PURE__ */ i(h, { children: t() ? /* @__PURE__ */ i(h, { children: (k = t()) == null ? void 0 : k.map((c, u) => /* @__PURE__ */ i(
722
+ L,
717
723
  {
718
724
  repeatContext: c.context,
719
725
  block: c.block,
@@ -721,15 +727,15 @@ function B(e) {
721
727
  linkComponent: e.linkComponent
722
728
  },
723
729
  u
724
- )) }) : /* @__PURE__ */ w(
725
- Ie,
730
+ )) }) : /* @__PURE__ */ R(
731
+ Ae,
726
732
  {
727
733
  Wrapper: l(),
728
734
  block: o(),
729
735
  context: e.context,
730
736
  children: [
731
737
  /* @__PURE__ */ i(
732
- _,
738
+ M,
733
739
  {
734
740
  componentRef: a().componentRef,
735
741
  componentOptions: a().componentOptions,
@@ -743,7 +749,7 @@ function B(e) {
743
749
  }
744
750
  ),
745
751
  (g = f()) == null ? void 0 : g.map((c) => /* @__PURE__ */ i(
746
- B,
752
+ P,
747
753
  {
748
754
  block: c,
749
755
  registeredComponents: e.registeredComponents,
@@ -758,8 +764,8 @@ function B(e) {
758
764
  ] }) : null });
759
765
  }
760
766
  function Ee(e) {
761
- const n = Z(null);
762
- function t() {
767
+ const t = Z(null);
768
+ function n() {
763
769
  var s;
764
770
  return "builder-blocks" + ((s = e.blocks) != null && s.length ? "" : " no-blocks");
765
771
  }
@@ -789,13 +795,13 @@ function Ee(e) {
789
795
  "*"
790
796
  ));
791
797
  }
792
- return R(() => {
793
- }, []), /* @__PURE__ */ w(h, { children: [
798
+ return b(() => {
799
+ }, []), /* @__PURE__ */ R(h, { children: [
794
800
  /* @__PURE__ */ i(
795
801
  e.BlocksWrapper,
796
802
  {
797
- ref: n,
798
- className: t() + " props-blocks-wrapper-51ef31b4",
803
+ ref: t,
804
+ className: n() + " props-blocks-wrapper-77bdc7c6",
799
805
  "builder-path": e.path,
800
806
  "builder-parent-id": e.parent,
801
807
  style: e.styleProp,
@@ -806,7 +812,7 @@ function Ee(e) {
806
812
  children: e.children
807
813
  }
808
814
  ),
809
- /* @__PURE__ */ i("style", { children: `.props-blocks-wrapper-51ef31b4 {
815
+ /* @__PURE__ */ i("style", { children: `.props-blocks-wrapper-77bdc7c6 {
810
816
  display: flex;
811
817
  flex-direction: column;
812
818
  align-items: stretch;
@@ -815,7 +821,7 @@ function Ee(e) {
815
821
  }
816
822
  function $e(e) {
817
823
  var r, o, s;
818
- const n = N(L), t = N(X);
824
+ const t = N(_), n = N(G);
819
825
  return /* @__PURE__ */ i(
820
826
  Ee,
821
827
  {
@@ -823,33 +829,34 @@ function $e(e) {
823
829
  parent: e.parent,
824
830
  path: e.path,
825
831
  styleProp: e.styleProp,
826
- BlocksWrapper: ((r = e.context) == null ? void 0 : r.BlocksWrapper) || n.BlocksWrapper,
827
- BlocksWrapperProps: ((o = e.context) == null ? void 0 : o.BlocksWrapperProps) || n.BlocksWrapperProps,
832
+ BlocksWrapper: ((r = e.context) == null ? void 0 : r.BlocksWrapper) || t.BlocksWrapper,
833
+ BlocksWrapperProps: ((o = e.context) == null ? void 0 : o.BlocksWrapperProps) || t.BlocksWrapperProps,
828
834
  children: e.blocks ? /* @__PURE__ */ i(h, { children: (s = e.blocks) == null ? void 0 : s.map((l) => /* @__PURE__ */ i(
829
- B,
835
+ P,
830
836
  {
831
837
  block: l,
832
838
  linkComponent: e.linkComponent,
833
- context: e.context || n,
834
- registeredComponents: e.registeredComponents || t.registeredComponents
839
+ context: e.context || t,
840
+ registeredComponents: e.registeredComponents || n.registeredComponents
835
841
  },
836
842
  l.id
837
843
  )) }) : null
838
844
  }
839
845
  );
840
846
  }
841
- const He = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
847
+ const Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
842
848
  __proto__: null,
843
849
  default: $e
844
850
  }, Symbol.toStringTag, { value: "Module" }));
845
851
  export {
846
- B as Block,
852
+ P as Block,
847
853
  $e as Blocks,
848
- X as ComponentsContext,
854
+ G as ComponentsContext,
849
855
  xe as InlinedStyles,
850
- He as blocks,
851
- j as fastClone,
856
+ Ue as blocks,
857
+ H as fastClone,
852
858
  Se as getSizesForBreakpoints,
853
859
  me as mapStyleObjToStrIfNeeded,
860
+ ee as set,
854
861
  ie as triggerAnimation
855
862
  };