@builder.io/sdk-vue 0.0.2 → 0.0.3-0

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 (95) hide show
  1. package/package.json +3 -1
  2. package/packages/_vue2/dist/block-styles.69994573.cjs +6 -0
  3. package/packages/_vue2/dist/block-styles.f1cd7e30.js +86 -0
  4. package/packages/_vue2/dist/get-processed-block.53da1bfe.js +40 -0
  5. package/packages/_vue2/dist/get-processed-block.b71c1bb2.cjs +1 -0
  6. package/packages/_vue2/dist/{index.93374a52.js → index.a5e0b693.js} +158 -138
  7. package/packages/_vue2/dist/index.a63c466e.cjs +4 -0
  8. package/packages/_vue2/dist/{render-block.f95552ec.js → render-block.7c0c9395.js} +68 -62
  9. package/packages/_vue2/dist/render-block.8c8b9fed.cjs +3 -0
  10. package/packages/_vue2/dist/render-component-with-context.884e23d0.js +53 -0
  11. package/packages/_vue2/dist/render-component-with-context.eb721952.cjs +1 -0
  12. package/packages/_vue2/dist/{render-component.10d6d66e.js → render-component.7e81a5e0.js} +14 -14
  13. package/packages/_vue2/dist/render-component.92306f84.cjs +1 -0
  14. package/packages/_vue2/dist/{render-inlined-styles.3826da36.cjs → render-inlined-styles.0458e786.cjs} +1 -1
  15. package/packages/_vue2/dist/{render-inlined-styles.0fed22b4.js → render-inlined-styles.64527ebc.js} +1 -1
  16. package/packages/_vue2/dist/render-repeated-block.2192d332.cjs +1 -0
  17. package/packages/_vue2/dist/{render-repeated-block.f29194a7.js → render-repeated-block.bd19b766.js} +11 -8
  18. package/packages/_vue2/dist/{render-styles.cd30abd1.js → render-styles.67a8bb35.js} +8 -8
  19. package/packages/_vue2/dist/{render-styles.9ff97301.cjs → render-styles.7ab6335e.cjs} +1 -1
  20. package/packages/_vue2/dist/sdk.cjs +1 -1
  21. package/packages/_vue2/dist/sdk.js +4 -4
  22. package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +172 -40
  23. package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +177 -45
  24. package/packages/_vue2/dist/src/blocks/video/video.vue.d.ts +1 -0
  25. package/packages/_vue2/dist/src/components/render-block/block-styles.vue.d.ts +1 -1
  26. package/packages/_vue2/dist/src/components/render-block/render-block.vue.d.ts +168 -36
  27. package/packages/_vue2/dist/src/components/render-block/render-component-with-context.vue.d.ts +116 -0
  28. package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +47 -14
  29. package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +162 -30
  30. package/packages/_vue2/dist/src/components/render-blocks.vue.d.ts +172 -39
  31. package/packages/_vue2/dist/src/components/render-content/components/render-styles.vue.d.ts +1 -1
  32. package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +174 -42
  33. package/packages/_vue2/dist/src/context/types.d.ts +1 -0
  34. package/packages/_vue2/dist/src/functions/extract-text-styles.d.ts +4 -0
  35. package/packages/_vue2/dist/src/functions/fast-clone.d.ts +4 -0
  36. package/packages/_vue2/dist/src/functions/get-react-native-block-styles.d.ts +6 -0
  37. package/packages/_vue2/dist/src/functions/sanitize-react-native-block-styles.d.ts +3 -0
  38. package/packages/_vue2/dist/src/helpers/css.d.ts +5 -1
  39. package/packages/_vue2/dist/style.css +1 -1
  40. package/packages/_vue3/dist/block-styles.a49e972d.cjs +6 -0
  41. package/packages/_vue3/dist/block-styles.a91eeb93.js +83 -0
  42. package/packages/_vue3/dist/get-processed-block.0d08be3e.js +40 -0
  43. package/packages/_vue3/dist/get-processed-block.f32aca5e.cjs +1 -0
  44. package/packages/_vue3/dist/{index.7b49e825.js → index.06c0f5c8.js} +253 -230
  45. package/packages/_vue3/dist/index.4ab36c30.cjs +4 -0
  46. package/packages/_vue3/dist/render-block.425938f2.js +241 -0
  47. package/packages/_vue3/dist/render-block.5db91f52.cjs +3 -0
  48. package/packages/_vue3/dist/render-component-with-context.9805829c.js +50 -0
  49. package/packages/_vue3/dist/render-component-with-context.d09cfab0.cjs +1 -0
  50. package/packages/_vue3/dist/render-component.863aa9a1.cjs +1 -0
  51. package/packages/_vue3/dist/{render-component.7ca6729a.js → render-component.87cc6d83.js} +9 -9
  52. package/packages/_vue3/dist/{render-inlined-styles.56082955.cjs → render-inlined-styles.5b918790.cjs} +1 -1
  53. package/packages/_vue3/dist/{render-inlined-styles.0b1e087d.js → render-inlined-styles.9ac8320c.js} +1 -1
  54. package/packages/_vue3/dist/{render-repeated-block.0b974ccc.js → render-repeated-block.3d799bba.js} +12 -9
  55. package/packages/_vue3/dist/render-repeated-block.9dc8238b.cjs +1 -0
  56. package/packages/_vue3/dist/{render-styles.65bace65.js → render-styles.9c635f29.js} +3 -3
  57. package/packages/_vue3/dist/{render-styles.d4412af2.cjs → render-styles.cb10c812.cjs} +1 -1
  58. package/packages/_vue3/dist/sdk.cjs +1 -1
  59. package/packages/_vue3/dist/sdk.js +7 -7
  60. package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +4 -4
  61. package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +9 -9
  62. package/packages/_vue3/dist/src/blocks/video/video.vue.d.ts +1 -0
  63. package/packages/_vue3/dist/src/components/render-block/block-styles.vue.d.ts +1 -1
  64. package/packages/_vue3/dist/src/components/render-block/render-component-with-context.vue.d.ts +51 -0
  65. package/packages/_vue3/dist/src/components/render-block/render-component.vue.d.ts +35 -1
  66. package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +1 -16
  67. package/packages/_vue3/dist/src/components/render-blocks.vue.d.ts +4 -3
  68. package/packages/_vue3/dist/src/components/render-content/components/render-styles.vue.d.ts +1 -1
  69. package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +6 -6
  70. package/packages/_vue3/dist/src/context/types.d.ts +1 -0
  71. package/packages/_vue3/dist/src/functions/extract-text-styles.d.ts +4 -0
  72. package/packages/_vue3/dist/src/functions/fast-clone.d.ts +4 -0
  73. package/packages/_vue3/dist/src/functions/get-react-native-block-styles.d.ts +6 -0
  74. package/packages/_vue3/dist/src/functions/sanitize-react-native-block-styles.d.ts +3 -0
  75. package/packages/_vue3/dist/src/helpers/css.d.ts +5 -1
  76. package/packages/_vue3/dist/style.css +1 -1
  77. package/packages/_vue2/dist/block-styles.a3384cd8.js +0 -72
  78. package/packages/_vue2/dist/block-styles.b8f018af.cjs +0 -10
  79. package/packages/_vue2/dist/get-processed-block.53761199.js +0 -40
  80. package/packages/_vue2/dist/get-processed-block.5b7d0290.cjs +0 -1
  81. package/packages/_vue2/dist/index.3fb2f85b.cjs +0 -4
  82. package/packages/_vue2/dist/render-block.31ab55d9.cjs +0 -3
  83. package/packages/_vue2/dist/render-component.4714b27b.cjs +0 -1
  84. package/packages/_vue2/dist/render-repeated-block.d8e1f3e2.cjs +0 -1
  85. package/packages/_vue2/dist/src/functions/get-block-styles.d.ts +0 -1
  86. package/packages/_vue3/dist/block-styles.867fd8f0.js +0 -69
  87. package/packages/_vue3/dist/block-styles.b9355d79.cjs +0 -10
  88. package/packages/_vue3/dist/get-processed-block.4d9c7a48.cjs +0 -1
  89. package/packages/_vue3/dist/get-processed-block.77923ee6.js +0 -40
  90. package/packages/_vue3/dist/index.bbfd8c89.cjs +0 -4
  91. package/packages/_vue3/dist/render-block.1e996e4e.cjs +0 -3
  92. package/packages/_vue3/dist/render-block.3110fec0.js +0 -243
  93. package/packages/_vue3/dist/render-component.470525d5.cjs +0 -1
  94. package/packages/_vue3/dist/render-repeated-block.10c41242.cjs +0 -1
  95. package/packages/_vue3/dist/src/functions/get-block-styles.d.ts +0 -1
@@ -1,11 +1,11 @@
1
1
  const _ = "vue2";
2
- function d() {
2
+ function u() {
3
3
  return typeof window < "u" && typeof document < "u";
4
4
  }
5
5
  const w = {};
6
6
  function z(t, e) {
7
7
  let n = w[t];
8
- if (n || (n = w[t] = []), n.push(e), d()) {
8
+ if (n || (n = w[t] = []), n.push(e), u()) {
9
9
  const o = {
10
10
  type: "builder.register",
11
11
  data: {
@@ -37,26 +37,27 @@ const q = () => {
37
37
  });
38
38
  }, D = () => {
39
39
  var t;
40
- d() && ((t = window.parent) == null || t.postMessage(
40
+ u() && ((t = window.parent) == null || t.postMessage(
41
41
  {
42
42
  type: "builder.sdkInfo",
43
43
  data: {
44
44
  target: _,
45
- supportsPatchUpdates: !1
45
+ supportsPatchUpdates: !1,
46
+ supportsAddBlockScoping: !0
46
47
  }
47
48
  },
48
49
  "*"
49
50
  ), window.addEventListener("message", ({ data: e }) => {
50
51
  var n, o;
51
- if (e)
52
+ if (!!(e != null && e.type))
52
53
  switch (e.type) {
53
54
  case "builder.evaluate": {
54
55
  const s = e.data.text, r = e.data.arguments || [], a = e.data.id, c = new Function(s);
55
56
  let i, l = null;
56
57
  try {
57
58
  i = c.apply(null, r);
58
- } catch (u) {
59
- l = u;
59
+ } catch (d) {
60
+ l = d;
60
61
  }
61
62
  l ? (n = window.parent) == null || n.postMessage(
62
63
  {
@@ -64,12 +65,12 @@ const q = () => {
64
65
  data: { id: a, error: l.message }
65
66
  },
66
67
  "*"
67
- ) : i && typeof i.then == "function" ? i.then((u) => {
68
- var f;
69
- (f = window.parent) == null || f.postMessage(
68
+ ) : i && typeof i.then == "function" ? i.then((d) => {
69
+ var h;
70
+ (h = window.parent) == null || h.postMessage(
70
71
  {
71
72
  type: "builder.evaluateResult",
72
- data: { id: a, result: u }
73
+ data: { id: a, result: d }
73
74
  },
74
75
  "*"
75
76
  );
@@ -96,9 +97,9 @@ const K = () => Promise.resolve().then(() => N).then((t) => t.default).catch((t)
96
97
  "Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
97
98
  t
98
99
  ), t;
99
- }), J = {
100
+ }), G = {
100
101
  name: "builder-columns",
101
- components: { "render-blocks": K },
102
+ components: { RenderBlocks: K },
102
103
  props: [
103
104
  "space",
104
105
  "columns",
@@ -160,35 +161,37 @@ function p(t, e, n, o, s, r, a, c) {
160
161
  } : s), l)
161
162
  if (i.functional) {
162
163
  i._injectStyles = l;
163
- var u = i.render;
164
+ var d = i.render;
164
165
  i.render = function(H, C) {
165
- return l.call(C), u(H, C);
166
+ return l.call(C), d(H, C);
166
167
  };
167
168
  } else {
168
- var f = i.beforeCreate;
169
- i.beforeCreate = f ? [].concat(f, l) : [l];
169
+ var h = i.beforeCreate;
170
+ i.beforeCreate = h ? [].concat(h, l) : [l];
170
171
  }
171
172
  return {
172
173
  exports: t,
173
174
  options: i
174
175
  };
175
176
  }
176
- var G = function() {
177
+ var J = function() {
177
178
  var e = this, n = e._self._c;
178
- return n("div", { staticClass: "builder-columns div-20351ewpue7", style: e.columnsCssVars }, e._l(e.columns, function(o, s) {
179
- return n("div", { key: s, staticClass: "builder-column div-20351ewpue7-2", style: {
179
+ return n("div", { staticClass: "builder-columns div-29wpyomtntv", style: e.columnsCssVars }, e._l(e.columns, function(o, s) {
180
+ return n("div", { key: s, staticClass: "builder-column div-29wpyomtntv-2", style: {
180
181
  width: e.getColumnCssWidth(s),
181
182
  marginLeft: `${s === 0 ? 0 : e.getGutterSize()}px`,
182
183
  ...e.columnCssVars
183
- } }, [n("render-blocks", { attrs: { blocks: e.markMutable(o.blocks), path: `component.options.columns.${s}.blocks`, parent: e.builderBlock.id } })], 1);
184
+ } }, [n("render-blocks", { attrs: { blocks: e.markMutable(o.blocks), path: `component.options.columns.${s}.blocks`, parent: e.builderBlock.id, styleProp: {
185
+ flexGrow: "1"
186
+ } } })], 1);
184
187
  }), 0);
185
188
  }, X = [], Y = /* @__PURE__ */ p(
186
- J,
187
189
  G,
190
+ J,
188
191
  X,
189
192
  !1,
190
193
  null,
191
- "074f8045",
194
+ "28f66c93",
192
195
  null,
193
196
  null
194
197
  );
@@ -237,8 +240,8 @@ const te = {
237
240
  "className",
238
241
  "sizes",
239
242
  "aspectRatio",
240
- "fitContent",
241
- "builderBlock"
243
+ "builderBlock",
244
+ "fitContent"
242
245
  ],
243
246
  computed: {
244
247
  srcSetToUse() {
@@ -273,21 +276,21 @@ const te = {
273
276
  var ne = function() {
274
277
  var o, s, r, a;
275
278
  var e = this, n = e._self._c;
276
- return n("div", { staticClass: "div-1ifnufbde19" }, [n("picture", [e.webpSrcSet ? [n("source", { attrs: { type: "image/webp", srcset: e.webpSrcSet } })] : e._e(), n("img", { class: e._classStringToObject(
277
- "builder-image" + (e.className ? " " + e.className : "") + " img-1ifnufbde19"
279
+ return n("div", [n("picture", [e.webpSrcSet ? [n("source", { attrs: { type: "image/webp", srcset: e.webpSrcSet } })] : e._e(), n("img", { class: e._classStringToObject(
280
+ "builder-image" + (e.className ? " " + e.className : "") + " img-1j57pcfa436"
278
281
  ), style: {
279
282
  objectPosition: e.backgroundSize || "center",
280
283
  objectFit: e.backgroundSize || "cover"
281
- }, attrs: { loading: "lazy", alt: e.altText, role: e.altText ? "presentation" : void 0, src: e.image, srcset: e.srcSetToUse, sizes: e.sizes } }), n("source", { attrs: { srcset: e.srcSetToUse } })], 2), e.aspectRatio && !(e.fitContent && ((s = (o = e.builderBlock) == null ? void 0 : o.children) == null ? void 0 : s.length)) ? [n("div", { staticClass: "builder-image-sizer div-1ifnufbde19-2", style: {
284
+ }, attrs: { loading: "lazy", alt: e.altText, role: e.altText ? "presentation" : void 0, src: e.image, srcset: e.srcSetToUse, sizes: e.sizes } }), n("source", { attrs: { srcset: e.srcSetToUse } })], 2), e.aspectRatio && !(((s = (o = e.builderBlock) == null ? void 0 : o.children) == null ? void 0 : s.length) && e.fitContent) ? [n("div", { staticClass: "builder-image-sizer div-1j57pcfa436", style: {
282
285
  paddingTop: e.aspectRatio * 100 + "%"
283
- } })] : e._e(), ((a = (r = e.builderBlock) == null ? void 0 : r.children) == null ? void 0 : a.length) && e.fitContent ? [e._t("default")] : e._e(), e.fitContent ? e._e() : [n("div", { staticClass: "div-1ifnufbde19-3" }, [e._t("default")], 2)]], 2);
286
+ } })] : e._e(), ((a = (r = e.builderBlock) == null ? void 0 : r.children) == null ? void 0 : a.length) && e.fitContent ? [e._t("default")] : e._e(), !e.fitContent && e.children ? [n("div", { staticClass: "div-1j57pcfa436-2" }, [e._t("default")], 2)] : e._e()], 2);
284
287
  }, oe = [], se = /* @__PURE__ */ p(
285
288
  te,
286
289
  ne,
287
290
  oe,
288
291
  !1,
289
292
  null,
290
- "9208289b",
293
+ "c75d9535",
291
294
  null,
292
295
  null
293
296
  );
@@ -308,7 +311,7 @@ var ie = function() {
308
311
  null,
309
312
  null
310
313
  );
311
- const ue = le.exports, de = {
314
+ const de = le.exports, ue = {
312
315
  name: "builder-video",
313
316
  props: [
314
317
  "autoPlay",
@@ -341,6 +344,12 @@ const ue = le.exports, de = {
341
344
  playsInline: !0
342
345
  } : {}
343
346
  };
347
+ },
348
+ spreadProps() {
349
+ return {
350
+ ...this.attributes,
351
+ ...this.videoProps
352
+ };
344
353
  }
345
354
  }
346
355
  };
@@ -354,9 +363,9 @@ var pe = function() {
354
363
  objectFit: e.fit,
355
364
  objectPosition: e.position,
356
365
  borderRadius: 1
357
- }, attrs: { src: e.video || "no-src", poster: e.posterImage } }, "video", e.videoProps, !1));
358
- }, me = [], fe = /* @__PURE__ */ p(
359
- de,
366
+ }, attrs: { src: e.video || "no-src", poster: e.posterImage } }, "video", e.spreadProps, !1));
367
+ }, me = [], he = /* @__PURE__ */ p(
368
+ ue,
360
369
  pe,
361
370
  me,
362
371
  !1,
@@ -365,7 +374,7 @@ var pe = function() {
365
374
  null,
366
375
  null
367
376
  );
368
- const he = fe.exports;
377
+ const fe = he.exports;
369
378
  function v(t, e = null, n = ".") {
370
379
  return Object.keys(t).reduce((o, s) => {
371
380
  const r = t[s], a = [e, s].filter(Boolean).join(n);
@@ -392,7 +401,7 @@ const S = "builder.", ge = (t) => {
392
401
  }
393
402
  }), n;
394
403
  }, ve = () => {
395
- if (!d())
404
+ if (!u())
396
405
  return {};
397
406
  const t = new URLSearchParams(window.location.search);
398
407
  return be(t);
@@ -429,7 +438,7 @@ const ye = (t) => {
429
438
  value: e,
430
439
  expires: n
431
440
  }) => {
432
- const s = (d() ? location.protocol === "https:" : !0) ? Ce : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [
441
+ const s = (u() ? location.protocol === "https:" : !0) ? Ce : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [
433
442
  [t, e],
434
443
  ...r,
435
444
  ["path", "/"],
@@ -451,14 +460,14 @@ const ye = (t) => {
451
460
  } catch (s) {
452
461
  console.warn("[COOKIE] SET error: ", s);
453
462
  }
454
- }, ke = "builderio.variations", V = (t) => `${ke}.${t}`, Se = ({
463
+ }, ke = "builderio.variations", A = (t) => `${ke}.${t}`, Se = ({
455
464
  contentId: t,
456
465
  canTrack: e
457
- }) => j({ name: V(t), canTrack: e }), Ie = ({
466
+ }) => j({ name: A(t), canTrack: e }), Ie = ({
458
467
  contentId: t,
459
468
  canTrack: e,
460
469
  value: n
461
- }) => U({ name: V(t), value: n, canTrack: e }), g = (t) => t != null, Te = (t) => g(t.id) && g(t.variations) && Object.keys(t.variations).length > 0, Re = ({
470
+ }) => U({ name: A(t), value: n, canTrack: e }), g = (t) => t != null, Te = (t) => g(t.id) && g(t.variations) && Object.keys(t.variations).length > 0, Re = ({
462
471
  id: t,
463
472
  variations: e
464
473
  }) => {
@@ -514,7 +523,7 @@ const ye = (t) => {
514
523
  const n = await $e({ item: t, canTrack: e });
515
524
  Object.assign(t, n);
516
525
  };
517
- async function A(t) {
526
+ async function V(t) {
518
527
  return (await je({ ...t, limit: 1 })).results[0] || null;
519
528
  }
520
529
  const Fe = (t) => {
@@ -531,12 +540,12 @@ const Fe = (t) => {
531
540
  ...ve(),
532
541
  ...E(t.options || {})
533
542
  }, l = v(i);
534
- for (const u in l)
535
- c.searchParams.set(u, String(l[u]));
543
+ for (const d in l)
544
+ c.searchParams.set(d, String(l[d]));
536
545
  if (n && c.searchParams.set("userAttributes", JSON.stringify(n)), o) {
537
- const u = v({ query: o });
538
- for (const f in u)
539
- c.searchParams.set(f, JSON.stringify(u[f]));
546
+ const d = v({ query: o });
547
+ for (const h in d)
548
+ c.searchParams.set(h, JSON.stringify(d[h]));
540
549
  }
541
550
  return c;
542
551
  };
@@ -554,37 +563,41 @@ const Ue = () => Promise.resolve().then(() => Zt).then((t) => t.default).catch((
554
563
  "Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
555
564
  t
556
565
  ), t;
557
- }), Ve = {
566
+ }), Ae = {
558
567
  name: "builder-symbol",
559
- components: { "render-content": Ue },
568
+ components: { RenderContent: Ue },
560
569
  props: ["symbol", "attributes"],
561
- data: () => ({ className: "builder-symbol", content: null, markMutable: y }),
570
+ data: () => ({
571
+ className: "builder-symbol",
572
+ fetchedContent: null,
573
+ markMutable: y
574
+ }),
562
575
  inject: {
563
576
  builderContext: "BuilderContext"
564
577
  },
565
- mounted() {
566
- var t;
567
- this.content = (t = this.symbol) == null ? void 0 : t.content;
568
- },
569
578
  watch: {
570
579
  onUpdateHook0() {
571
580
  const t = this.symbol;
572
- t && !t.content && !this.content && t.model && A({
581
+ t && !t.content && !this.fetchedContent && t.model && V({
573
582
  model: t.model,
574
583
  apiKey: this.builderContext.apiKey,
575
584
  query: {
576
585
  id: t.entry
577
586
  }
578
587
  }).then((e) => {
579
- this.content = e;
588
+ this.fetchedContent = e;
580
589
  });
581
590
  }
582
591
  },
583
592
  computed: {
593
+ contentToUse() {
594
+ var t;
595
+ return ((t = this.symbol) == null ? void 0 : t.content) || this.fetchedContent;
596
+ },
584
597
  onUpdateHook0() {
585
598
  return {
586
599
  0: this.symbol,
587
- 1: this.content
600
+ 1: this.fetchedContent
588
601
  };
589
602
  }
590
603
  },
@@ -600,7 +613,7 @@ const Ue = () => Promise.resolve().then(() => Zt).then((t) => t.default).catch((
600
613
  }
601
614
  }
602
615
  };
603
- var Ae = function() {
616
+ var Ve = function() {
604
617
  var o, s, r, a, c;
605
618
  var e = this, n = e._self._c;
606
619
  return n("div", e._b({ class: e._classStringToObject(e.className), attrs: { dataSet: {
@@ -609,10 +622,10 @@ var Ae = function() {
609
622
  ...(o = e.symbol) == null ? void 0 : o.data,
610
623
  ...e.builderContext.state,
611
624
  ...(a = (r = (s = e.symbol) == null ? void 0 : s.content) == null ? void 0 : r.data) == null ? void 0 : a.state
612
- }), model: (c = e.symbol) == null ? void 0 : c.model, content: e.markMutable(e.content) } })], 1);
625
+ }), model: (c = e.symbol) == null ? void 0 : c.model, content: e.markMutable(e.contentToUse) } })], 1);
613
626
  }, Oe = [], Pe = /* @__PURE__ */ p(
614
- Ve,
615
627
  Ae,
628
+ Ve,
616
629
  Oe,
617
630
  !1,
618
631
  null,
@@ -626,14 +639,14 @@ const We = Pe.exports, Be = {
626
639
  };
627
640
  var Le = function() {
628
641
  var e = this, n = e._self._c;
629
- return e.link ? n("a", e._b({ attrs: { role: "button", href: e.link, target: e.openLinkInNewTab ? "_blank" : void 0 } }, "a", e.attributes, !1), [e._v(" " + e._s(e.text) + " ")]) : n("button", e._b({ staticClass: "button-4wbls88y960" }, "button", e.attributes, !1), [e._v(" " + e._s(e.text) + " ")]);
642
+ return e.link ? n("a", e._b({ attrs: { role: "button", href: e.link, target: e.openLinkInNewTab ? "_blank" : void 0 } }, "a", e.attributes, !1), [e._v(" " + e._s(e.text) + " ")]) : n("button", e._b({ staticClass: "button-1pl23ac79ld" }, "button", e.attributes, !1), [e._v(" " + e._s(e.text) + " ")]);
630
643
  }, Me = [], Ne = /* @__PURE__ */ p(
631
644
  Be,
632
645
  Le,
633
646
  Me,
634
647
  !1,
635
648
  null,
636
- "e55cf307",
649
+ "3eed583a",
637
650
  null,
638
651
  null
639
652
  );
@@ -656,7 +669,7 @@ var qe = function() {
656
669
  null,
657
670
  null
658
671
  );
659
- const Je = Ke.exports, Ge = {
672
+ const Ge = Ke.exports, Je = {
660
673
  name: "builder-fragment-component",
661
674
  props: []
662
675
  };
@@ -664,7 +677,7 @@ var Xe = function() {
664
677
  var e = this, n = e._self._c;
665
678
  return n("span", [e._t("default")], 2);
666
679
  }, Ye = [], Qe = /* @__PURE__ */ p(
667
- Ge,
680
+ Je,
668
681
  Xe,
669
682
  Ye,
670
683
  !1,
@@ -970,14 +983,14 @@ const tt = {
970
983
  t.delete("srcset"), t.delete("noWebp");
971
984
  function n(a, c = 6e4) {
972
985
  return new Promise((i, l) => {
973
- const u = document.createElement("img");
974
- let f = !1;
975
- u.onload = () => {
976
- f = !0, i(u);
977
- }, u.addEventListener("error", (m) => {
986
+ const d = document.createElement("img");
987
+ let h = !1;
988
+ d.onload = () => {
989
+ h = !0, i(d);
990
+ }, d.addEventListener("error", (m) => {
978
991
  console.warn("Image load failed", m.error), l(m.error);
979
- }), u.src = a, setTimeout(() => {
980
- f || l(new Error("Image load timed out"));
992
+ }), d.src = a, setTimeout(() => {
993
+ h || l(new Error("Image load timed out"));
981
994
  }, c);
982
995
  });
983
996
  }
@@ -1316,7 +1329,7 @@ const tt = {
1316
1329
  "text/javascript",
1317
1330
  "application/javascript",
1318
1331
  "application/ecmascript"
1319
- ], ut = (t) => lt.includes(t.type), dt = {
1332
+ ], dt = (t) => lt.includes(t.type), ut = {
1320
1333
  name: "builder-embed",
1321
1334
  props: ["content"],
1322
1335
  data: () => ({ scriptsInserted: [], scriptsRun: [], ranInitFn: !1 }),
@@ -1344,7 +1357,7 @@ const tt = {
1344
1357
  this.scriptsInserted.push(n.src);
1345
1358
  const o = document.createElement("script");
1346
1359
  o.async = !0, o.src = n.src, document.head.appendChild(o);
1347
- } else if (ut(n) && !this.scriptsRun.includes(n.innerText))
1360
+ } else if (dt(n) && !this.scriptsRun.includes(n.innerText))
1348
1361
  try {
1349
1362
  this.scriptsRun.push(n.innerText), new Function(n.innerText)();
1350
1363
  } catch (o) {
@@ -1357,8 +1370,8 @@ const tt = {
1357
1370
  var pt = function() {
1358
1371
  var e = this, n = e._self._c;
1359
1372
  return n("div", { ref: "elem", staticClass: "builder-embed", domProps: { innerHTML: e._s(e.content) } });
1360
- }, mt = [], ft = /* @__PURE__ */ p(
1361
- dt,
1373
+ }, mt = [], ht = /* @__PURE__ */ p(
1374
+ ut,
1362
1375
  pt,
1363
1376
  mt,
1364
1377
  !1,
@@ -1367,11 +1380,11 @@ var pt = function() {
1367
1380
  null,
1368
1381
  null
1369
1382
  );
1370
- const ht = ft.exports;
1383
+ const ft = ht.exports;
1371
1384
  function gt() {
1372
- return d() && window.self !== window.top;
1385
+ return u() && window.self !== window.top;
1373
1386
  }
1374
- function h() {
1387
+ function f() {
1375
1388
  return gt() && window.location.search.indexOf("builder.frameEditing=") !== -1;
1376
1389
  }
1377
1390
  const bt = {
@@ -1384,7 +1397,7 @@ const bt = {
1384
1397
  "image",
1385
1398
  "attributes"
1386
1399
  ],
1387
- data: () => ({ isEditing: h })
1400
+ data: () => ({ isEditing: f })
1388
1401
  };
1389
1402
  var vt = function() {
1390
1403
  var e = this, n = e._self._c;
@@ -1510,13 +1523,13 @@ const Tt = It.exports, Rt = {
1510
1523
  { component: Q, ...tt },
1511
1524
  { component: re, ...ot },
1512
1525
  { component: xt, ...Ct },
1513
- { component: ue, ...at },
1514
- { component: he, ...it },
1526
+ { component: de, ...at },
1527
+ { component: fe, ...it },
1515
1528
  { component: We, ...rt },
1516
1529
  { component: He, ...et },
1517
- { component: Je, ...st },
1530
+ { component: Ge, ...st },
1518
1531
  { component: Ze, ...nt },
1519
- { component: ht, ...ct },
1532
+ { component: ft, ...ct },
1520
1533
  { component: Tt, ...Rt }
1521
1534
  ];
1522
1535
  function T({
@@ -1530,9 +1543,9 @@ function T({
1530
1543
  return;
1531
1544
  }
1532
1545
  const s = {
1533
- isEditing: h(),
1534
- isBrowser: d(),
1535
- isServer: !d()
1546
+ isEditing: f(),
1547
+ isBrowser: u(),
1548
+ isServer: !u()
1536
1549
  }, a = !(t.includes(";") || t.includes(" return ") || t.trim().startsWith("return ")) ? `return (${t});` : t;
1537
1550
  try {
1538
1551
  return new Function(
@@ -1556,11 +1569,11 @@ function T({
1556
1569
  }
1557
1570
  }
1558
1571
  function Et() {
1559
- return !d() || h() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
1572
+ return !u() || f() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
1560
1573
  }
1561
- const O = [];
1574
+ const O = (t) => JSON.parse(JSON.stringify(t)), P = [];
1562
1575
  function ln(t, e) {
1563
- return O.push({ component: t, ...e }), console.warn(
1576
+ return P.push({ component: t, ...e }), console.warn(
1564
1577
  "registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
1565
1578
  ), t;
1566
1579
  }
@@ -1569,15 +1582,15 @@ const Ft = ({
1569
1582
  ...e
1570
1583
  }) => ({
1571
1584
  type: "builder.registerComponent",
1572
- data: Vt(e)
1573
- }), P = (t) => JSON.parse(JSON.stringify(t)), jt = (t) => typeof t == "function" ? Ut(t) : P(t), Ut = (t) => {
1585
+ data: At(e)
1586
+ }), jt = (t) => typeof t == "function" ? Ut(t) : O(t), Ut = (t) => {
1574
1587
  const e = t.toString().trim();
1575
1588
  return `return (${!e.startsWith("function") && !e.startsWith("(") ? "function " : ""}${e}).apply(this, arguments)`;
1576
- }, Vt = ({
1589
+ }, At = ({
1577
1590
  inputs: t,
1578
1591
  ...e
1579
1592
  }) => ({
1580
- ...P(e),
1593
+ ...O(e),
1581
1594
  inputs: t == null ? void 0 : t.map(
1582
1595
  (n) => Object.entries(n).reduce(
1583
1596
  (o, [s, r]) => ({
@@ -1588,14 +1601,14 @@ const Ft = ({
1588
1601
  )
1589
1602
  )
1590
1603
  });
1591
- function At() {
1604
+ function Vt() {
1592
1605
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
1593
1606
  const e = Math.random() * 16 | 0;
1594
1607
  return (t == "x" ? e : e & 3 | 8).toString(16);
1595
1608
  });
1596
1609
  }
1597
1610
  function W() {
1598
- return At().replace(/-/g, "");
1611
+ return Vt().replace(/-/g, "");
1599
1612
  }
1600
1613
  const B = "builderSessionId", Ot = async ({ canTrack: t }) => {
1601
1614
  if (!t)
@@ -1613,7 +1626,7 @@ const B = "builderSessionId", Ot = async ({ canTrack: t }) => {
1613
1626
  }, Pt = () => W(), Wt = ({
1614
1627
  id: t,
1615
1628
  canTrack: e
1616
- }) => U({ name: B, value: t, canTrack: e }), L = () => d() && typeof localStorage < "u" ? localStorage : void 0, Bt = ({
1629
+ }) => U({ name: B, value: t, canTrack: e }), L = () => u() && typeof localStorage < "u" ? localStorage : void 0, Bt = ({
1617
1630
  key: t,
1618
1631
  canTrack: e
1619
1632
  }) => {
@@ -1680,7 +1693,7 @@ const B = "builderSessionId", Ot = async ({ canTrack: t }) => {
1680
1693
  }
1681
1694
  });
1682
1695
  async function R(t) {
1683
- if (!!t.canTrack && !h() && !!(d() || _ === "reactNative"))
1696
+ if (!!t.canTrack && !f() && !!(u() || _ === "reactNative"))
1684
1697
  return fetch("https://builder.io/api/v1/track", {
1685
1698
  method: "POST",
1686
1699
  body: JSON.stringify({
@@ -1699,16 +1712,16 @@ const Dt = () => Promise.resolve().then(() => N).then((t) => t.default).catch((t
1699
1712
  "Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
1700
1713
  t
1701
1714
  ), t;
1702
- }), Kt = () => import("./render-styles.cd30abd1.js").then((t) => t.default).catch((t) => {
1715
+ }), Kt = () => import("./render-styles.67a8bb35.js").then((t) => t.default).catch((t) => {
1703
1716
  throw console.error(
1704
1717
  "Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
1705
1718
  t
1706
1719
  ), t;
1707
- }), Jt = {
1720
+ }), Gt = {
1708
1721
  name: "render-content",
1709
1722
  components: {
1710
- "render-content-styles": Kt,
1711
- "render-blocks": Dt
1723
+ RenderContentStyles: Kt,
1724
+ RenderBlocks: Dt
1712
1725
  },
1713
1726
  props: [
1714
1727
  "content",
@@ -1750,8 +1763,8 @@ const Dt = () => Promise.resolve().then(() => N).then((t) => t.default).catch((t
1750
1763
  },
1751
1764
  mounted() {
1752
1765
  var t;
1753
- if (d()) {
1754
- if (h() && (this.forceReRenderCount = this.forceReRenderCount + 1, q(), D(), Object.values(this.allRegisteredComponents).forEach(
1766
+ if (u()) {
1767
+ if (f() && (this.forceReRenderCount = this.forceReRenderCount + 1, q(), D(), Object.values(this.allRegisteredComponents).forEach(
1755
1768
  (e) => {
1756
1769
  var o;
1757
1770
  const n = Ft(e);
@@ -1769,7 +1782,7 @@ const Dt = () => Promise.resolve().then(() => N).then((t) => t.default).catch((t
1769
1782
  const e = new URL(location.href).searchParams;
1770
1783
  if (this.model && e.get("builder.preview") === this.model) {
1771
1784
  const n = e.get("apiKey") || e.get("builder.space");
1772
- n && A({
1785
+ n && V({
1773
1786
  model: this.model,
1774
1787
  apiKey: n
1775
1788
  }).then((o) => {
@@ -1792,7 +1805,7 @@ const Dt = () => Promise.resolve().then(() => N).then((t) => t.default).catch((t
1792
1805
  }
1793
1806
  },
1794
1807
  unmounted() {
1795
- d() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
1808
+ u() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
1796
1809
  "builder:component:stateChangeListenerActivated",
1797
1810
  this.emitStateUpdate
1798
1811
  ));
@@ -1827,10 +1840,13 @@ const Dt = () => Promise.resolve().then(() => N).then((t) => t.default).catch((t
1827
1840
  allRegisteredComponents() {
1828
1841
  return [
1829
1842
  ...$t(),
1830
- ...O,
1843
+ ...P,
1831
1844
  ...this.customComponents || []
1832
1845
  ].reduce(
1833
- (n, o) => ({ ...n, [o.name]: o }),
1846
+ (n, o) => ({
1847
+ ...n,
1848
+ [o.name]: o
1849
+ }),
1834
1850
  {}
1835
1851
  );
1836
1852
  },
@@ -1903,7 +1919,10 @@ const Dt = () => Promise.resolve().then(() => N).then((t) => t.default).catch((t
1903
1919
  },
1904
1920
  handleRequest({ url: t, key: e }) {
1905
1921
  F().then((n) => n(t)).then((n) => n.json()).then((n) => {
1906
- const o = { ...this.overrideState, [e]: n };
1922
+ const o = {
1923
+ ...this.overrideState,
1924
+ [e]: n
1925
+ };
1907
1926
  this.overrideState = o;
1908
1927
  }).catch((n) => {
1909
1928
  console.log("error fetching dynamic data", t, n);
@@ -1913,7 +1932,7 @@ const Dt = () => Promise.resolve().then(() => N).then((t) => t.default).catch((t
1913
1932
  var e, n, o;
1914
1933
  const t = (o = (n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.httpRequests) != null ? o : {};
1915
1934
  Object.entries(t).forEach(([s, r]) => {
1916
- if (r && (!this.httpReqsData[s] || h())) {
1935
+ if (r && (!this.httpReqsData[s] || f())) {
1917
1936
  const a = this.evalExpression(r);
1918
1937
  this.handleRequest({
1919
1938
  url: a,
@@ -1923,7 +1942,7 @@ const Dt = () => Promise.resolve().then(() => N).then((t) => t.default).catch((t
1923
1942
  });
1924
1943
  },
1925
1944
  emitStateUpdate() {
1926
- h() && window.dispatchEvent(
1945
+ f() && window.dispatchEvent(
1927
1946
  new CustomEvent("builder:component:stateChange", {
1928
1947
  detail: {
1929
1948
  state: this.contentState,
@@ -1936,15 +1955,15 @@ const Dt = () => Promise.resolve().then(() => N).then((t) => t.default).catch((t
1936
1955
  }
1937
1956
  }
1938
1957
  };
1939
- var Gt = function() {
1958
+ var Jt = function() {
1940
1959
  var o, s, r, a, c, i, l;
1941
1960
  var e = this, n = e._self._c;
1942
- return e.useContent ? n("div", { ref: "elementRef", attrs: { "builder-content-id": (o = e.useContent) == null ? void 0 : o.id }, on: { click: function(u) {
1943
- return e.onClick(u);
1961
+ return e.useContent ? n("div", { ref: "elementRef", attrs: { "builder-content-id": (o = e.useContent) == null ? void 0 : o.id, "builder-model": e.model }, on: { click: function(d) {
1962
+ return e.onClick(d);
1944
1963
  } } }, [e.shouldRenderContentStyles ? [n("render-content-styles", { attrs: { cssCode: (r = (s = e.useContent) == null ? void 0 : s.data) == null ? void 0 : r.cssCode, customFonts: (c = (a = e.useContent) == null ? void 0 : a.data) == null ? void 0 : c.customFonts } })] : e._e(), n("render-blocks", { key: e.forceReRenderCount, attrs: { blocks: e.markMutable((l = (i = e.useContent) == null ? void 0 : i.data) == null ? void 0 : l.blocks) } })], 2) : e._e();
1945
1964
  }, Xt = [], Yt = /* @__PURE__ */ p(
1946
- Jt,
1947
1965
  Gt,
1966
+ Jt,
1948
1967
  Xt,
1949
1968
  !1,
1950
1969
  null,
@@ -1955,20 +1974,20 @@ var Gt = function() {
1955
1974
  const Qt = Yt.exports, Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1956
1975
  __proto__: null,
1957
1976
  default: Qt
1958
- }, Symbol.toStringTag, { value: "Module" })), en = () => import("./block-styles.a3384cd8.js").then((t) => t.default).catch((t) => {
1977
+ }, Symbol.toStringTag, { value: "Module" })), en = () => import("./block-styles.f1cd7e30.js").then((t) => t.default).catch((t) => {
1959
1978
  throw console.error(
1960
1979
  "Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
1961
1980
  t
1962
1981
  ), t;
1963
- }), tn = () => import("./render-block.f95552ec.js").then((t) => t.default).catch((t) => {
1982
+ }), tn = () => import("./render-block.7c0c9395.js").then((t) => t.default).catch((t) => {
1964
1983
  throw console.error(
1965
1984
  "Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
1966
1985
  t
1967
1986
  ), t;
1968
1987
  }), nn = {
1969
1988
  name: "render-blocks",
1970
- components: { "render-block": tn, "block-styles": en },
1971
- props: ["blocks", "parent", "path"],
1989
+ components: { RenderBlock: tn, BlockStyles: en },
1990
+ props: ["blocks", "parent", "path", "styleProp"],
1972
1991
  inject: {
1973
1992
  builderContext: "BuilderContext"
1974
1993
  },
@@ -1981,7 +2000,7 @@ const Qt = Yt.exports, Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
1981
2000
  methods: {
1982
2001
  onClick() {
1983
2002
  var t, e;
1984
- h() && !((t = this.blocks) != null && t.length) && ((e = window.parent) == null || e.postMessage(
2003
+ f() && !((t = this.blocks) != null && t.length) && ((e = window.parent) == null || e.postMessage(
1985
2004
  {
1986
2005
  type: "builder.clickEmptyBlocks",
1987
2006
  data: {
@@ -1994,7 +2013,7 @@ const Qt = Yt.exports, Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
1994
2013
  },
1995
2014
  onMouseEnter() {
1996
2015
  var t, e;
1997
- h() && !((t = this.blocks) != null && t.length) && ((e = window.parent) == null || e.postMessage(
2016
+ f() && !((t = this.blocks) != null && t.length) && ((e = window.parent) == null || e.postMessage(
1998
2017
  {
1999
2018
  type: "builder.hoverEmptyBlocks",
2000
2019
  data: {
@@ -2018,7 +2037,7 @@ const Qt = Yt.exports, Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
2018
2037
  };
2019
2038
  var on = function() {
2020
2039
  var e = this, n = e._self._c;
2021
- return n("div", { class: e._classStringToObject(e.className + " div-23e8fqt91nf"), attrs: { "builder-path": e.path, "builder-parent-id": e.parent, dataSet: {
2040
+ return n("div", { class: e._classStringToObject(e.className + " div-23e8fqt91nf"), style: e.styleProp, attrs: { "builder-path": e.path, "builder-parent-id": e.parent, dataSet: {
2022
2041
  class: e.className
2023
2042
  } }, on: { click: function(o) {
2024
2043
  return e.onClick();
@@ -2035,7 +2054,7 @@ var on = function() {
2035
2054
  sn,
2036
2055
  !1,
2037
2056
  null,
2038
- "69abb8b2",
2057
+ "713efc9e",
2039
2058
  null,
2040
2059
  null
2041
2060
  );
@@ -2043,8 +2062,8 @@ const an = rn.exports, N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
2043
2062
  __proto__: null,
2044
2063
  default: an
2045
2064
  }, Symbol.toStringTag, { value: "Module" })), $ = {};
2046
- function un(t) {
2047
- if (d()) {
2065
+ function dn(t) {
2066
+ if (u()) {
2048
2067
  Object.assign($, t);
2049
2068
  const e = {
2050
2069
  type: "builder.settingsChange",
@@ -2060,26 +2079,27 @@ export {
2060
2079
  re as I,
2061
2080
  We as S,
2062
2081
  _ as T,
2063
- he as V,
2064
- ue as a,
2065
- Je as b,
2082
+ fe as V,
2083
+ de as a,
2084
+ Ge as b,
2066
2085
  an as c,
2067
2086
  Et as d,
2068
2087
  T as e,
2069
2088
  O as f,
2070
- ln as g,
2071
- Ft as h,
2072
- h as i,
2073
- z as j,
2074
- A as k,
2075
- Fe as l,
2089
+ P as g,
2090
+ ln as h,
2091
+ f as i,
2092
+ Ft as j,
2093
+ z as k,
2094
+ V as l,
2076
2095
  cn as m,
2077
2096
  p as n,
2078
- je as o,
2079
- ge as p,
2080
- be as q,
2097
+ Fe as o,
2098
+ je as p,
2099
+ ge as q,
2081
2100
  Qt as r,
2082
- un as s,
2083
- ve as t,
2084
- E as u
2101
+ dn as s,
2102
+ be as t,
2103
+ ve as u,
2104
+ E as v
2085
2105
  };