@builder.io/sdk-vue 0.5.6-0 → 0.5.6

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 (137) hide show
  1. package/package.json +9 -20
  2. package/packages/_vue2/dist/block-styles.ac28ad89.js +78 -0
  3. package/packages/_vue2/dist/block-styles.d7a0bd18.cjs +1 -0
  4. package/packages/_vue2/dist/block-wrapper.4020c35e.cjs +1 -0
  5. package/packages/_vue2/dist/{block-wrapper-f852f3a4.js → block-wrapper.877d598e.js} +16 -19
  6. package/packages/_vue2/dist/block.03f6b1f1.cjs +3 -0
  7. package/packages/_vue2/dist/block.4db8867b.js +179 -0
  8. package/packages/_vue2/dist/{blocks-wrapper-87a5ef9b.cjs → blocks-wrapper.69dad1d3.cjs} +1 -1
  9. package/packages/_vue2/dist/{blocks-wrapper-98241c68.js → blocks-wrapper.88129f1c.js} +6 -6
  10. package/packages/_vue2/dist/component-ref.5beb6576.cjs +1 -0
  11. package/packages/_vue2/dist/{component-ref-47d34951.js → component-ref.ae6b00e2.js} +21 -29
  12. package/packages/_vue2/dist/content.4429d811.cjs +1 -0
  13. package/packages/_vue2/dist/{content-ab735937.js → content.d83d212f.js} +19 -36
  14. package/packages/_vue2/dist/{css-8b11bb6e.js → css.e33adaf0.js} +1 -1
  15. package/packages/_vue2/dist/{css-03a9ebe6.cjs → css.ec4684cd.cjs} +1 -1
  16. package/packages/_vue2/dist/{enable-editor-2d8d86f8.js → enable-editor.2a84c36c.js} +29 -35
  17. package/packages/_vue2/dist/enable-editor.7bbb8293.cjs +1 -0
  18. package/packages/_vue2/dist/evaluate.15b2ed56.js +79 -0
  19. package/packages/_vue2/dist/evaluate.eba0e0f9.cjs +4 -0
  20. package/packages/_vue2/dist/get-block-actions.1973b4d5.cjs +1 -0
  21. package/packages/_vue2/dist/get-block-actions.db2ac618.js +36 -0
  22. package/packages/_vue2/dist/{get-block-properties-f778ef2a.js → get-block-properties.322d544d.js} +2 -2
  23. package/packages/_vue2/dist/get-block-properties.ef1464fb.cjs +1 -0
  24. package/packages/_vue2/dist/get-processed-block.9d4edbee.cjs +1 -0
  25. package/packages/_vue2/dist/get-processed-block.c9980195.js +53 -0
  26. package/packages/_vue2/dist/index.0c5f9582.cjs +32 -0
  27. package/packages/_vue2/dist/{index-a089abc3.js → index.fc359faf.js} +173 -201
  28. package/packages/_vue2/dist/{inlined-script-5ac8fff7.js → inlined-script.1b247526.js} +1 -1
  29. package/packages/_vue2/dist/{inlined-script-73ce088c.cjs → inlined-script.3e92a79e.cjs} +1 -1
  30. package/packages/_vue2/dist/{inlined-styles-3a327fbd.js → inlined-styles.32485f82.js} +1 -1
  31. package/packages/_vue2/dist/inlined-styles.f9ade1ef.cjs +1 -0
  32. package/packages/_vue2/dist/interactive-element.21050a26.cjs +1 -0
  33. package/packages/_vue2/dist/{interactive-element-2aec4d6f.js → interactive-element.c8119384.js} +10 -12
  34. package/packages/{_vue3/dist/non-node-runtime.45773de4.js → _vue2/dist/non-node-runtime.84ddb11a.js} +64 -62
  35. package/packages/_vue2/dist/non-node-runtime.ddd24d83.cjs +21 -0
  36. package/packages/_vue2/dist/{repeated-block-a0f25ac2.js → repeated-block.4fbd3217.js} +6 -6
  37. package/packages/_vue2/dist/repeated-block.f4f2b4be.cjs +1 -0
  38. package/packages/_vue2/dist/sdk.cjs +1 -0
  39. package/packages/_vue2/dist/sdk.js +29 -0
  40. package/packages/_vue2/dist/set.87eb0329.cjs +1 -0
  41. package/packages/_vue2/dist/set.b219ab0e.js +9 -0
  42. package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +2 -2
  43. package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +2 -2
  44. package/packages/_vue2/dist/src/components/block/block.helpers.d.ts +2 -5
  45. package/packages/_vue2/dist/src/components/block/block.vue.d.ts +4 -2
  46. package/packages/_vue2/dist/src/components/block/components/block-styles.vue.d.ts +0 -5
  47. package/packages/_vue2/dist/src/components/block/components/block-wrapper.vue.d.ts +0 -3
  48. package/packages/_vue2/dist/src/components/block/components/component-ref/component-ref.helpers.d.ts +2 -3
  49. package/packages/_vue2/dist/src/components/block/components/interactive-element.vue.d.ts +0 -5
  50. package/packages/_vue2/dist/src/components/block/components/repeated-block.vue.d.ts +1 -1
  51. package/packages/_vue2/dist/src/components/blocks/blocks.vue.d.ts +8 -9
  52. package/packages/_vue2/dist/src/components/content/content.vue.d.ts +0 -1
  53. package/packages/_vue2/dist/src/components/content-variants/content-variants.types.d.ts +0 -2
  54. package/packages/_vue2/dist/src/components/content-variants/content-variants.vue.d.ts +0 -3
  55. package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
  56. package/packages/_vue2/dist/src/constants/target.d.ts +1 -1
  57. package/packages/_vue2/dist/src/functions/evaluate/evaluate.d.ts +7 -6
  58. package/packages/{_vue3/dist/src/functions/evaluate/node-runtime → _vue2/dist/src/functions/evaluate/non-node-runtime}/index.d.ts +2 -2
  59. package/packages/_vue2/dist/src/functions/evaluate/non-node-runtime/non-node-runtime.d.ts +2 -0
  60. package/packages/_vue2/dist/src/functions/evaluate/types.d.ts +11 -0
  61. package/packages/_vue2/dist/src/functions/fetch-builder-props.d.ts +3 -3
  62. package/packages/_vue2/dist/src/functions/get-block-actions-handler.d.ts +5 -2
  63. package/packages/_vue2/dist/src/functions/get-block-actions.d.ts +3 -3
  64. package/packages/_vue2/dist/src/functions/get-processed-block.d.ts +3 -5
  65. package/packages/_vue2/dist/src/helpers/preview-lru-cache/get.d.ts +1 -1
  66. package/packages/_vue2/dist/src/helpers/preview-lru-cache/set.d.ts +1 -1
  67. package/packages/_vue2/dist/src/index-helpers/blocks-exports.d.ts +3 -9
  68. package/packages/_vue2/dist/src/index.d.ts +2 -2
  69. package/packages/_vue2/dist/src/types/builder-props.d.ts +3 -15
  70. package/packages/_vue2/dist/style.css +1 -1
  71. package/packages/_vue2/dist/{styles-183aeb6b.js → styles.29f558ce.js} +18 -18
  72. package/packages/_vue2/dist/{styles-6e2cbe10.cjs → styles.b060113b.cjs} +5 -5
  73. package/packages/_vue3/dist/{block-wrapper.5ca35adf.js → block-wrapper.0604faad.js} +2 -2
  74. package/packages/_vue3/dist/{block-wrapper.500b81ef.cjs → block-wrapper.759209a2.cjs} +1 -1
  75. package/packages/_vue3/dist/{component-ref.5764cdf2.js → component-ref.72a8476f.js} +2 -2
  76. package/packages/_vue3/dist/{component-ref.67d028bc.cjs → component-ref.cc553de5.cjs} +1 -1
  77. package/packages/_vue3/dist/{get-block-actions.0f635805.js → get-block-actions.0fc3b0b7.js} +1 -1
  78. package/packages/_vue3/dist/{get-block-actions.20d51d99.cjs → get-block-actions.b8fe4107.cjs} +1 -1
  79. package/packages/_vue3/dist/index.1bb7374b.cjs +72 -0
  80. package/packages/_vue3/dist/{index.f5a3101b.js → index.ebaa8c07.js} +521 -549
  81. package/packages/_vue3/dist/non-node-runtime.b16cf7b9.js +2476 -0
  82. package/packages/_vue3/dist/{non-node-runtime.c8fc465e.cjs → non-node-runtime.d7d010c9.cjs} +9 -9
  83. package/packages/_vue3/dist/{repeated-block.8ca9be30.cjs → repeated-block.115e1f66.cjs} +1 -1
  84. package/packages/_vue3/dist/{repeated-block.238616b4.js → repeated-block.ee20f5f0.js} +2 -2
  85. package/packages/_vue3/dist/sdk.cjs +1 -1
  86. package/packages/_vue3/dist/sdk.js +1 -1
  87. package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
  88. package/packages/_vue3/dist/src/constants/target.d.ts +1 -1
  89. package/packages/_vue3/dist/src/functions/evaluate/acorn-interpreter.d.ts +2 -0
  90. package/packages/_vue3/dist/src/functions/evaluate/evaluate.d.ts +5 -1
  91. package/packages/_vue3/dist/src/functions/evaluate/non-node-runtime/non-node-runtime.d.ts +2 -2
  92. package/packages/_vue3/dist/src/functions/evaluate/types.d.ts +11 -0
  93. package/packages/_vue3/dist/src/functions/fetch-builder-props.d.ts +3 -3
  94. package/packages/_vue3/dist/src/helpers/preview-lru-cache/get.d.ts +1 -1
  95. package/packages/_vue3/dist/src/helpers/preview-lru-cache/set.d.ts +1 -1
  96. package/packages/_vue3/dist/src/index.d.ts +2 -2
  97. package/packages/_vue2/dist/block-12099f71.js +0 -189
  98. package/packages/_vue2/dist/block-246063be.cjs +0 -3
  99. package/packages/_vue2/dist/block-styles-9360f05a.cjs +0 -1
  100. package/packages/_vue2/dist/block-styles-cfdd1b51.js +0 -79
  101. package/packages/_vue2/dist/block-wrapper-857a5d4f.cjs +0 -1
  102. package/packages/_vue2/dist/component-ref-b891d36b.cjs +0 -1
  103. package/packages/_vue2/dist/content-043dd197.cjs +0 -1
  104. package/packages/_vue2/dist/enable-editor-04399d8f.cjs +0 -1
  105. package/packages/_vue2/dist/evaluate-6a213bca.cjs +0 -1
  106. package/packages/_vue2/dist/evaluate-c9d68bff.js +0 -76
  107. package/packages/_vue2/dist/get-block-actions-2b1bc20b.cjs +0 -1
  108. package/packages/_vue2/dist/get-block-actions-75e52f20.js +0 -36
  109. package/packages/_vue2/dist/get-block-properties-0e241c2c.cjs +0 -1
  110. package/packages/_vue2/dist/get-processed-block-41399170.cjs +0 -1
  111. package/packages/_vue2/dist/get-processed-block-940605b2.js +0 -46
  112. package/packages/_vue2/dist/helpers-327ed263.js +0 -16
  113. package/packages/_vue2/dist/helpers-4efe31ac.cjs +0 -1
  114. package/packages/_vue2/dist/index-537704ba.cjs +0 -1
  115. package/packages/_vue2/dist/index-c1c356f8.cjs +0 -32
  116. package/packages/_vue2/dist/index-cc904f8c.js +0 -10
  117. package/packages/_vue2/dist/inlined-styles-1d50f193.cjs +0 -1
  118. package/packages/_vue2/dist/interactive-element-67792031.cjs +0 -1
  119. package/packages/_vue2/dist/main.cjs +0 -1
  120. package/packages/_vue2/dist/main.js +0 -29
  121. package/packages/_vue2/dist/node-runtime-25e8d976.js +0 -93
  122. package/packages/_vue2/dist/node-runtime-5a567c42.cjs +0 -39
  123. package/packages/_vue2/dist/repeated-block-5eb2f7c6.cjs +0 -1
  124. package/packages/_vue2/dist/src/functions/evaluate/browser-runtime/browser.d.ts +0 -4
  125. package/packages/_vue2/dist/src/functions/evaluate/browser-runtime/index.d.ts +0 -1
  126. package/packages/_vue2/dist/src/functions/evaluate/helpers.d.ts +0 -18
  127. package/packages/_vue2/dist/src/functions/evaluate/node-runtime/index.d.ts +0 -1
  128. package/packages/_vue2/dist/src/functions/evaluate/node-runtime/node-runtime.d.ts +0 -2
  129. package/packages/_vue3/dist/index.0db0f592.cjs +0 -69
  130. package/packages/_vue3/dist/node-runtime.ba895a23.cjs +0 -39
  131. package/packages/_vue3/dist/node-runtime.dc2f1f18.js +0 -93
  132. package/packages/_vue3/dist/src/functions/evaluate/browser-runtime/browser.d.ts +0 -4
  133. package/packages/_vue3/dist/src/functions/evaluate/browser-runtime/index.d.ts +0 -1
  134. package/packages/_vue3/dist/src/functions/evaluate/helpers.d.ts +0 -18
  135. package/packages/_vue3/dist/src/functions/evaluate/node-runtime/node-runtime.d.ts +0 -2
  136. /package/packages/_vue2/dist/{index.d.ts → sdk.d.ts} +0 -0
  137. /package/packages/{_vue3/dist/src/functions/evaluate/non-node-runtime → _vue2/dist/src/functions/evaluate}/acorn-interpreter.d.ts +0 -0
@@ -1,10 +1,9 @@
1
1
  import { defineComponent as p } from "vue";
2
- import { n as u, d as y, e as x, B as v, C as S, F as _, I as T, S as I, h as C, j as w, V as k, k as F, m, s as g, T as R, o as E } from "./index-a089abc3.js";
2
+ import { n as u, b as y, d as x, B as v, C as S, F as _, I as T, S as I, e as C, h as w, V as k, j as F, k as f, s as g, T as R, m as E } from "./index.fc359faf.js";
3
3
  const V = {
4
4
  name: "Core:Button",
5
5
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
6
6
  defaultStyles: {
7
- // TODO: make min width more intuitive and set one
8
7
  appearance: "none",
9
8
  paddingTop: "15px",
10
9
  paddingBottom: "15px",
@@ -34,7 +33,6 @@ const V = {
34
33
  static: !0,
35
34
  noWrap: !0
36
35
  }, A = {
37
- // TODO: ways to statically preprocess JSON for references, functions, etc
38
36
  name: "Columns",
39
37
  isRSC: !0,
40
38
  inputs: [{
@@ -212,7 +210,7 @@ const V = {
212
210
  });
213
211
  }
214
212
  const n = e.get("columns");
215
- Array.isArray(n) && n.find((i) => i.get("width")) && (n.find((l) => !l.get("width")) || n.reduce((r, s) => r + s.get("width"), 0) !== 100) && t();
213
+ Array.isArray(n) && !!n.find((i) => i.get("width")) && (!!n.find((l) => !l.get("width")) || n.reduce((r, s) => r + s.get("width"), 0) !== 100) && t();
216
214
  }
217
215
  }, {
218
216
  name: "space",
@@ -263,13 +261,13 @@ const V = {
263
261
  function n(o, r = 6e4) {
264
262
  return new Promise((s, c) => {
265
263
  const d = document.createElement("img");
266
- let h = !1;
264
+ let m = !1;
267
265
  d.onload = () => {
268
- h = !0, s(d);
269
- }, d.addEventListener("error", (f) => {
270
- console.warn("Image load failed", f.error), c(f.error);
266
+ m = !0, s(d);
267
+ }, d.addEventListener("error", (h) => {
268
+ console.warn("Image load failed", h.error), c(h.error);
271
269
  }), d.src = o, setTimeout(() => {
272
- h || c(new Error("Image load timed out"));
270
+ m || c(new Error("Image load timed out"));
273
271
  }, r);
274
272
  });
275
273
  }
@@ -579,20 +577,20 @@ const V = {
579
577
  }
580
578
  }
581
579
  });
582
- var M = function() {
580
+ var q = function() {
583
581
  var t = this, n = t._self._c;
584
582
  return t._self._setupProxy, n("div", { ref: "elem", staticClass: "builder-embed", domProps: { innerHTML: t._s(t.content) } });
585
- }, q = [], B = /* @__PURE__ */ u(
583
+ }, B = [], M = /* @__PURE__ */ u(
586
584
  N,
587
- M,
588
585
  q,
586
+ B,
589
587
  !1,
590
588
  null,
591
589
  null,
592
590
  null,
593
591
  null
594
592
  );
595
- const K = B.exports, O = p({
593
+ const K = M.exports, O = p({
596
594
  name: "builder-img-component",
597
595
  props: [
598
596
  "backgroundSize",
@@ -623,7 +621,6 @@ var J = function() {
623
621
  null
624
622
  );
625
623
  const X = G.exports, Q = {
626
- // friendlyName?
627
624
  name: "Raw:Img",
628
625
  hideFromInsertMenu: !0,
629
626
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
@@ -763,7 +760,7 @@ const ae = ne.exports, oe = {
763
760
  const a = {};
764
761
  (o = (l = e == null ? void 0 : e.data) == null ? void 0 : l.inputs) == null || o.forEach((s) => {
765
762
  var c;
766
- s.name && s.defaultValue !== void 0 && ((c = e == null ? void 0 : e.data) != null && c.state) && e.data.state[s.name] === void 0 && (a[s.name] = s.defaultValue);
763
+ s.name && s.defaultValue !== void 0 && ((c = e == null ? void 0 : e.data) == null ? void 0 : c.state) && e.data.state[s.name] === void 0 && (a[s.name] = s.defaultValue);
767
764
  });
768
765
  const i = {
769
766
  ...(r = e == null ? void 0 : e.data) == null ? void 0 : r.state,
@@ -786,22 +783,22 @@ const ae = ne.exports, oe = {
786
783
  ...t
787
784
  },
788
785
  meta: e == null ? void 0 : e.meta
789
- } : void 0, se = () => import("./index-a089abc3.js").then((e) => e.M).then((e) => e.default).catch((e) => {
786
+ } : void 0, se = () => import("./index.fc359faf.js").then((e) => e.K).then((e) => e.default).catch((e) => {
790
787
  throw console.error(
791
788
  "Error while attempting to dynamically import component Blocks at ../blocks/blocks.vue",
792
789
  e
793
790
  ), e;
794
- }), le = () => import("./styles-183aeb6b.js").then((e) => e.default).catch((e) => {
791
+ }), le = () => import("./styles.29f558ce.js").then((e) => e.default).catch((e) => {
795
792
  throw console.error(
796
793
  "Error while attempting to dynamically import component ContentStyles at ./components/styles.vue",
797
794
  e
798
795
  ), e;
799
- }), ce = () => import("./enable-editor-2d8d86f8.js").then((e) => e.default).catch((e) => {
796
+ }), ce = () => import("./enable-editor.2a84c36c.js").then((e) => e.default).catch((e) => {
800
797
  throw console.error(
801
798
  "Error while attempting to dynamically import component EnableEditor at ./components/enable-editor.vue",
802
799
  e
803
800
  ), e;
804
- }), de = () => import("./inlined-script-5ac8fff7.js").then((e) => e.default).catch((e) => {
801
+ }), de = () => import("./inlined-script.1b247526.js").then((e) => e.default).catch((e) => {
805
802
  throw console.error(
806
803
  "Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",
807
804
  e
@@ -828,26 +825,18 @@ const ae = ne.exports, oe = {
828
825
  "enrich",
829
826
  "classNameProp",
830
827
  "showContent",
831
- "serverExecutor",
832
828
  "isSsrAbTest"
833
829
  ],
834
830
  data() {
835
831
  var e, t;
836
832
  return {
837
833
  scriptStr: F({
838
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
839
834
  variationId: (e = this.content) == null ? void 0 : e.testVariationId,
840
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
841
835
  contentId: (t = this.content) == null ? void 0 : t.id
842
836
  }),
843
837
  registeredComponents: [
844
838
  ...b(),
845
- // While this `components` object is deprecated, we must maintain support for it.
846
- // Since users are able to override our default components, we need to make sure that we do not break such
847
- // existing usage.
848
- // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
849
- // which is the new standard way of providing custom components, and must therefore take precedence.
850
- ...m,
839
+ ...f,
851
840
  ...this.customComponents || []
852
841
  ].reduce(
853
842
  (n, { component: a, ...i }) => ({
@@ -876,12 +865,7 @@ const ae = ne.exports, oe = {
876
865
  apiVersion: this.apiVersion,
877
866
  componentInfos: [
878
867
  ...b(),
879
- // While this `components` object is deprecated, we must maintain support for it.
880
- // Since users are able to override our default components, we need to make sure that we do not break such
881
- // existing usage.
882
- // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
883
- // which is the new standard way of providing custom components, and must therefore take precedence.
884
- ...m,
868
+ ...f,
885
869
  ...this.customComponents || []
886
870
  ].reduce(
887
871
  (n, { component: a, ...i }) => ({
@@ -892,7 +876,6 @@ const ae = ne.exports, oe = {
892
876
  ),
893
877
  inheritedStyles: {}
894
878
  },
895
- components: m,
896
879
  TARGET: R
897
880
  };
898
881
  },
@@ -913,7 +896,7 @@ const ae = ne.exports, oe = {
913
896
  var ue = function() {
914
897
  var a, i, l, o, r, s, c;
915
898
  var t = this, n = t._self._c;
916
- return t._self._setupProxy, n("enable-editor", t._b({ attrs: { content: t.content, model: t.model, context: t.context, apiKey: t.apiKey, canTrack: t.canTrack, locale: t.locale, includeRefs: t.includeRefs, enrich: t.enrich, classNameProp: t.classNameProp, showContent: t.showContent, builderContextSignal: t.builderContextSignal, serverExecutor: t.serverExecutor } }, "enable-editor", {}, !1), [t.isSsrAbTest ? [n("inlined-script", { attrs: { scriptStr: t.scriptStr } })] : t._e(), t.TARGET !== "reactNative" ? [n("content-styles", { attrs: { contentId: (a = t.builderContextSignal.content) == null ? void 0 : a.id, cssCode: (l = (i = t.builderContextSignal.content) == null ? void 0 : i.data) == null ? void 0 : l.cssCode, customFonts: (r = (o = t.builderContextSignal.content) == null ? void 0 : o.data) == null ? void 0 : r.customFonts } })] : t._e(), n("blocks", { attrs: { blocks: (c = (s = t.builderContextSignal.content) == null ? void 0 : s.data) == null ? void 0 : c.blocks, context: t.builderContextSignal, components: t.registeredComponents, serverExecutor: t.serverExecutor } })], 2);
899
+ return t._self._setupProxy, n("enable-editor", t._b({ attrs: { content: t.content, model: t.model, context: t.context, apiKey: t.apiKey, canTrack: t.canTrack, locale: t.locale, includeRefs: t.includeRefs, enrich: t.enrich, classNameProp: t.classNameProp, showContent: t.showContent, builderContextSignal: t.builderContextSignal } }, "enable-editor", {}, !1), [t.isSsrAbTest ? [n("inlined-script", { attrs: { scriptStr: t.scriptStr } })] : t._e(), t.TARGET !== "reactNative" ? [n("content-styles", { attrs: { contentId: (a = t.builderContextSignal.content) == null ? void 0 : a.id, cssCode: (l = (i = t.builderContextSignal.content) == null ? void 0 : i.data) == null ? void 0 : l.cssCode, customFonts: (r = (o = t.builderContextSignal.content) == null ? void 0 : o.data) == null ? void 0 : r.customFonts } })] : t._e(), n("blocks", { attrs: { blocks: (c = (s = t.builderContextSignal.content) == null ? void 0 : s.data) == null ? void 0 : c.blocks, context: t.builderContextSignal, registeredComponents: t.registeredComponents } })], 2);
917
900
  }, me = [], he = /* @__PURE__ */ u(
918
901
  pe,
919
902
  ue,
@@ -1,4 +1,4 @@
1
- import { c as o } from "./index-a089abc3.js";
1
+ import { c as o } from "./index.fc359faf.js";
2
2
  const c = (s) => s.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), n = (s) => Object.entries(s).map(([r, e]) => {
3
3
  if (typeof e == "string")
4
4
  return `${c(r)}: ${e};`;
@@ -1,4 +1,4 @@
1
- "use strict";const n=require("./index-c1c356f8.cjs"),o=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),c=e=>Object.entries(e).map(([r,s])=>{if(typeof s=="string")return`${o(r)}: ${s};`}).filter(n.checkIsDefined),a=e=>c(e).join(`
1
+ "use strict";const n=require("./index.0c5f9582.cjs"),o=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),c=e=>Object.entries(e).map(([r,s])=>{if(typeof s=="string")return`${o(r)}: ${s};`}).filter(n.checkIsDefined),a=e=>c(e).join(`
2
2
  `),i=({mediaQuery:e,className:t,styles:r})=>{const s=`.${t} {
3
3
  ${a(r)}
4
4
  }`;return e?`${e} {
@@ -1,9 +1,8 @@
1
- import { defineComponent as R } from "vue";
2
- import { e as m } from "./evaluate-c9d68bff.js";
3
- import { r as k, i as h, T as y, c as w, p as f, l as E, d as u, _ as g, q as _, t as U, u as I, v as T, n as P } from "./index-a089abc3.js";
4
- import "./helpers-327ed263.js";
5
- const N = "UNKNOWN_VERSION", M = () => {
6
- k("insertMenu", {
1
+ import { defineComponent as k } from "vue";
2
+ import { e as m } from "./evaluate.15b2ed56.js";
3
+ import { r as R, i as h, T as y, c as w, o as f, l as _, b as u, _ as g, p as E, q as U, t as I, u as T, n as P } from "./index.fc359faf.js";
4
+ const M = "0.5.6", H = () => {
5
+ R("insertMenu", {
7
6
  name: "_default",
8
7
  default: !0,
9
8
  items: [{
@@ -26,16 +25,14 @@ const N = "UNKNOWN_VERSION", M = () => {
26
25
  });
27
26
  };
28
27
  let b = !1;
29
- const O = (n = {}) => {
28
+ const q = (n = {}) => {
30
29
  var e, t;
31
30
  b || (b = !0, h() && ((e = window.parent) == null || e.postMessage({
32
31
  type: "builder.sdkInfo",
33
32
  data: {
34
33
  target: y,
35
- version: N,
34
+ version: M,
36
35
  supportsPatchUpdates: !1,
37
- // Supports builder-model="..." attribute which is needed to
38
- // scope our '+ add block' button styling
39
36
  supportsAddBlockScoping: !0,
40
37
  supportsCustomBreakpoints: !0
41
38
  }
@@ -48,7 +45,7 @@ const O = (n = {}) => {
48
45
  data: i
49
46
  }) => {
50
47
  var o, s;
51
- if (i != null && i.type)
48
+ if (!!(i != null && i.type))
52
49
  switch (i.type) {
53
50
  case "builder.evaluate": {
54
51
  const a = i.data.text, x = i.data.arguments || [], d = i.data.id, v = new Function(a);
@@ -88,7 +85,7 @@ const O = (n = {}) => {
88
85
  function S(n) {
89
86
  return Math.round(n * 1e3) / 1e3;
90
87
  }
91
- const H = (n, e, t = !0) => {
88
+ const K = (n, e, t = !0) => {
92
89
  if (!(n instanceof HTMLElement))
93
90
  return null;
94
91
  let i = t ? n : n.parentElement;
@@ -99,9 +96,9 @@ const H = (n, e, t = !0) => {
99
96
  return i;
100
97
  } while (i = i.parentElement);
101
98
  return null;
102
- }, K = (n) => H(n, (e) => {
99
+ }, O = (n) => K(n, (e) => {
103
100
  const t = e.getAttribute("builder-id") || e.id;
104
- return (t == null ? void 0 : t.indexOf("builder-")) === 0;
101
+ return Boolean((t == null ? void 0 : t.indexOf("builder-")) === 0);
105
102
  }), C = ({
106
103
  event: n,
107
104
  target: e
@@ -111,8 +108,8 @@ const H = (n, e, t = !0) => {
111
108
  x: s,
112
109
  y: a
113
110
  };
114
- }, q = (n) => {
115
- const e = n.target, t = e && K(e), i = (t == null ? void 0 : t.getAttribute("builder-id")) || (t == null ? void 0 : t.id);
111
+ }, N = (n) => {
112
+ const e = n.target, t = e && O(e), i = (t == null ? void 0 : t.getAttribute("builder-id")) || (t == null ? void 0 : t.id);
116
113
  return {
117
114
  targetBuilderElement: i || void 0,
118
115
  metadata: {
@@ -127,14 +124,13 @@ const H = (n, e, t = !0) => {
127
124
  builderElementIndex: t && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(t) : void 0
128
125
  }
129
126
  };
130
- }, j = R({
127
+ }, j = k({
131
128
  name: "enable-editor",
132
129
  props: [
133
130
  "canTrack",
134
131
  "builderContextSignal",
135
132
  "model",
136
133
  "context",
137
- "serverExecutor",
138
134
  "apiKey",
139
135
  "showContent",
140
136
  "classNameProp",
@@ -162,10 +158,10 @@ const H = (n, e, t = !0) => {
162
158
  },
163
159
  mounted() {
164
160
  var n, e;
165
- if (this.apiKey || E.error(
161
+ if (this.apiKey || _.error(
166
162
  "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
167
163
  ), h()) {
168
- if (u() && (this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage), M(), O({
164
+ if (u() && (this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage), H(), q({
169
165
  ...this.locale ? {
170
166
  locale: this.locale
171
167
  } : {},
@@ -194,7 +190,7 @@ const H = (n, e, t = !0) => {
194
190
  variationId: t !== i ? t : void 0
195
191
  });
196
192
  }
197
- if (_()) {
193
+ if (E()) {
198
194
  const t = new URL(location.href).searchParams, i = t.get("builder.preview"), o = t.get(
199
195
  `builder.preview.${i}`
200
196
  ), s = t.get("apiKey") || t.get("builder.space");
@@ -322,8 +318,7 @@ const H = (n, e, t = !0) => {
322
318
  context: this.context || {},
323
319
  localState: void 0,
324
320
  rootState: this.builderContextSignal.rootState,
325
- rootSetState: this.builderContextSignal.rootSetState,
326
- serverExecutor: this.serverExecutor
321
+ rootSetState: this.builderContextSignal.rootSetState
327
322
  });
328
323
  },
329
324
  onClick(n) {
@@ -336,7 +331,7 @@ const H = (n, e, t = !0) => {
336
331
  contentId: o,
337
332
  apiKey: this.apiKey,
338
333
  variationId: i !== o ? i : void 0,
339
- ...q(n),
334
+ ...N(n),
340
335
  unique: !this.clicked
341
336
  });
342
337
  }
@@ -350,8 +345,7 @@ const H = (n, e, t = !0) => {
350
345
  context: this.context || {},
351
346
  localState: void 0,
352
347
  rootState: this.builderContextSignal.rootState,
353
- rootSetState: this.builderContextSignal.rootSetState,
354
- serverExecutor: this.serverExecutor
348
+ rootSetState: this.builderContextSignal.rootSetState
355
349
  })
356
350
  );
357
351
  },
@@ -368,14 +362,14 @@ const H = (n, e, t = !0) => {
368
362
  });
369
363
  },
370
364
  runHttpRequests() {
371
- var e, t;
372
- const n = ((t = (e = this.builderContextSignal.content) == null ? void 0 : e.data) == null ? void 0 : t.httpRequests) ?? {};
373
- Object.entries(n).forEach(([i, o]) => {
374
- if (o && (!this.httpReqsData[i] || u())) {
375
- const s = this.evalExpression(o);
365
+ var e, t, i;
366
+ const n = (i = (t = (e = this.builderContextSignal.content) == null ? void 0 : e.data) == null ? void 0 : t.httpRequests) != null ? i : {};
367
+ Object.entries(n).forEach(([o, s]) => {
368
+ if (s && (!this.httpReqsData[o] || u())) {
369
+ const a = this.evalExpression(s);
376
370
  this.handleRequest({
377
- url: s,
378
- key: i
371
+ url: a,
372
+ key: o
379
373
  });
380
374
  }
381
375
  });
@@ -427,7 +421,7 @@ var A = function() {
427
421
  null,
428
422
  null
429
423
  );
430
- const z = B.exports;
424
+ const J = B.exports;
431
425
  export {
432
- z as default
426
+ J as default
433
427
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("vue"),p=require("./evaluate.eba0e0f9.cjs"),a=require("./index.0c5f9582.cjs"),v="0.5.6",x=()=>{a.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let m=!1;const k=(n={})=>{var e,t;m||(m=!0,a.isBrowser()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:a.TARGET,version:v,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(t=window.parent)==null||t.postMessage({type:"builder.updateContent",data:{options:n}},"*"),window.addEventListener("message",({data:i})=>{var o,s;if(!!(i!=null&&i.type))switch(i.type){case"builder.evaluate":{const r=i.data.text,b=i.data.arguments||[],c=i.data.id,S=new Function(r);let d,l=null;try{d=S.apply(null,b)}catch(u){l=u}l?(o=window.parent)==null||o.postMessage({type:"builder.evaluateError",data:{id:c,error:l.message}},"*"):d&&typeof d.then=="function"?d.then(u=>{var h;(h=window.parent)==null||h.postMessage({type:"builder.evaluateResult",data:{id:c,result:u}},"*")}).catch(console.error):(s=window.parent)==null||s.postMessage({type:"builder.evaluateResult",data:{result:d,id:c}},"*");break}}})))};function f(n){return Math.round(n*1e3)/1e3}const R=(n,e,t=!0)=>{if(!(n instanceof HTMLElement))return null;let i=t?n:n.parentElement;do{if(!i)return null;if(e(i))return i}while(i=i.parentElement);return null},y=n=>R(n,e=>{const t=e.getAttribute("builder-id")||e.id;return Boolean((t==null?void 0:t.indexOf("builder-"))===0)}),g=({event:n,target:e})=>{const t=e.getBoundingClientRect(),i=n.clientX-t.left,o=n.clientY-t.top,s=f(i/t.width),r=f(o/t.height);return{x:s,y:r}},w=n=>{const e=n.target,t=e&&y(e),i=(t==null?void 0:t.getAttribute("builder-id"))||(t==null?void 0:t.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:e?g({event:n,target:e}):void 0,builderTargetOffset:t?g({event:n,target:t}):void 0,builderElementIndex:t&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(t):void 0}}},E=C.defineComponent({name:"enable-editor",props:["canTrack","builderContextSignal","model","context","apiKey","showContent","classNameProp","content","locale","includeRefs","enrich"],data(){return{canTrackToUse:a.checkIsDefined(this.canTrack)?this.canTrack:!0,forceReRenderCount:0,lastUpdated:0,shouldSendResetCookie:!1,httpReqsData:{},clicked:!1,builderContext:a.builderContext}},provide(){const n=this;return{[a.builderContext.key]:n.builderContextSignal}},mounted(){var n,e;if(this.apiKey||a.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),a.isBrowser()){if(a.isEditing()&&(this.forceReRenderCount=this.forceReRenderCount+1,window.addEventListener("message",this.processMessage),x(),k({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{},...this.enrich?{enrich:this.enrich}:{}}),Object.values(this.builderContextSignal.componentInfos).forEach(t=>{var o;const i=a.createRegisterComponentMessage(t);(o=window.parent)==null||o.postMessage(i,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.builderContextSignal.content){const t=(n=this.builderContextSignal.content)==null?void 0:n.testVariationId,i=(e=this.builderContextSignal.content)==null?void 0:e.id;a._track({type:"impression",canTrack:this.canTrackToUse,contentId:i,apiKey:this.apiKey,variationId:t!==i?t:void 0})}if(a.isPreviewing()){const t=new URL(location.href).searchParams,i=t.get("builder.preview"),o=t.get(`builder.preview.${i}`),s=t.get("apiKey")||t.get("builder.space");i===this.model&&s===this.apiKey&&(!this.content||o===this.content.id)&&a.fetchOneEntry({model:this.model,apiKey:this.apiKey,apiVersion:this.builderContextSignal.apiVersion}).then(r=>{r&&this.mergeNewContent(r)})}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0:{handler(){this.content&&this.mergeNewContent(this.content)},immediate:!0},onUpdateHook1:{handler(){},immediate:!0},onUpdateHook2:{handler(){this.evaluateJsCode()},immediate:!0},onUpdateHook3:{handler(){this.runHttpRequests()},immediate:!0},onUpdateHook4:{handler(){this.emitStateUpdate()},immediate:!0}},unmounted(){a.isBrowser()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{onUpdateHook0(){return{0:this.content}},onUpdateHook1(){return{0:this.shouldSendResetCookie}},onUpdateHook2(){var n,e;return{0:(e=(n=this.builderContextSignal.content)==null?void 0:n.data)==null?void 0:e.jsCode,1:this.builderContextSignal.rootState}},onUpdateHook3(){var n,e;return{0:(e=(n=this.builderContextSignal.content)==null?void 0:n.data)==null?void 0:e.httpRequests}},onUpdateHook4(){return{0:this.builderContextSignal.rootState}}},methods:{mergeNewContent(n){var t,i,o,s,r;const e={...this.builderContextSignal.content,...n,data:{...(t=this.builderContextSignal.content)==null?void 0:t.data,...n==null?void 0:n.data},meta:{...(i=this.builderContextSignal.content)==null?void 0:i.meta,...n==null?void 0:n.meta,breakpoints:((o=n==null?void 0:n.meta)==null?void 0:o.breakpoints)||((r=(s=this.builderContextSignal.content)==null?void 0:s.meta)==null?void 0:r.breakpoints)}};this.builderContextSignal.content=e},processMessage(n){var t;const{data:e}=n;if(e)switch(e.type){case"builder.configureSdk":{const i=e.data,{breakpoints:o,contentId:s}=i;if(!s||s!==((t=this.builderContextSignal.content)==null?void 0:t.id))return;o&&this.mergeNewContent({meta:{breakpoints:o}}),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const i=e.data,o=i.key||i.alias||i.entry||i.modelName,s=i.data;o===this.model&&(this.mergeNewContent(s),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var e,t;const n=(t=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:t.jsCode;n&&p.evaluate({code:n,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.builderContextSignal.rootSetState})},onClick(n){var e,t;if(this.builderContextSignal.content){const i=(e=this.builderContextSignal.content)==null?void 0:e.testVariationId,o=(t=this.builderContextSignal.content)==null?void 0:t.id;a._track({type:"click",canTrack:this.canTrackToUse,contentId:o,apiKey:this.apiKey,variationId:i!==o?i:void 0,...w(n),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(n){return n.replace(/{{([^}]+)}}/g,(e,t)=>p.evaluate({code:t,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.builderContextSignal.rootSetState}))},handleRequest({url:n,key:e}){a.fetch(n).then(t=>t.json()).then(t=>{var o,s;const i={...this.builderContextSignal.rootState,[e]:t};(s=(o=this.builderContextSignal).rootSetState)==null||s.call(o,i),this.httpReqsData[e]=!0}).catch(t=>{console.error("error fetching dynamic data",n,t)})},runHttpRequests(){var e,t,i;const n=(i=(t=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:t.httpRequests)!=null?i:{};Object.entries(n).forEach(([o,s])=>{if(s&&(!this.httpReqsData[o]||a.isEditing())){const r=this.evalExpression(s);this.handleRequest({url:r,key:o})}})},emitStateUpdate(){a.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.builderContextSignal.rootState,ref:{name:this.model}}}))},_classStringToObject(n){const e={};if(typeof n!="string")return e;const t=n.trim().split(/\s+/);for(const i of t)e[i]=!0;return e}}});var _=function(){var i;var e=this,t=e._self._c;return e._self._setupProxy,e.builderContextSignal.content?t("div",e._b({key:e.forceReRenderCount,ref:"elementRef",class:e._classStringToObject(e.classNameProp),attrs:{"builder-content-id":(i=e.builderContextSignal.content)==null?void 0:i.id,"builder-model":e.model},on:{click:function(o){return e.onClick(o)}}},"div",{...e.showContent?{}:{hidden:!0,"aria-hidden":!0}},!1),[e._t("default")],2):e._e()},U=[],I=a.normalizeComponent(E,_,U,!1,null,null,null,null);const T=I.exports;exports.default=T;
@@ -0,0 +1,79 @@
1
+ import { i as u, l as o, b as w } from "./index.fc359faf.js";
2
+ function g() {
3
+ const r = () => {
4
+ var e;
5
+ return typeof process < "u" && ((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
6
+ };
7
+ return !u() && !r();
8
+ }
9
+ let f;
10
+ g() && import("./non-node-runtime.84ddb11a.js").then((r) => {
11
+ f = r.runInNonNode;
12
+ }).catch((r) => {
13
+ const e = "Error importing JS interpreter for non-Node.js runtimes. Make sure `js-interpreter` is installed.\n Read more here: https://github.com/BuilderIO/builder/tree/main/packages/sdks/README.md#non-nodejs-runtimes-edge-serverless\n ";
14
+ o.error(e, r), f = (...s) => {
15
+ o.error(e);
16
+ };
17
+ });
18
+ function p({
19
+ code: r,
20
+ context: e,
21
+ localState: s,
22
+ rootState: i,
23
+ rootSetState: n,
24
+ event: t,
25
+ isExpression: d = !0
26
+ }) {
27
+ if (r === "") {
28
+ o.warn("Skipping evaluation of empty code block.");
29
+ return;
30
+ }
31
+ const c = {
32
+ isEditing: w(),
33
+ isBrowser: u(),
34
+ isServer: !u()
35
+ }, a = {
36
+ useCode: d && !(r.includes(";") || r.includes(" return ") || r.trim().startsWith("return ")) ? `return (${r});` : r,
37
+ builder: c,
38
+ context: e,
39
+ event: t,
40
+ rootSetState: n,
41
+ rootState: i,
42
+ localState: s
43
+ };
44
+ return u() ? m(a) : g() ? f(a) : h(a);
45
+ }
46
+ const m = ({
47
+ useCode: r,
48
+ builder: e,
49
+ context: s,
50
+ event: i,
51
+ localState: n,
52
+ rootSetState: t,
53
+ rootState: d
54
+ }) => {
55
+ const c = E(d, n, t);
56
+ try {
57
+ return new Function("builder", "Builder", "state", "context", "event", r)(e, e, c, s, i);
58
+ } catch (l) {
59
+ o.warn(`Builder custom code error:
60
+ While Evaluating:
61
+ `, r, `
62
+ `, l);
63
+ }
64
+ }, h = (r) => m(r);
65
+ function E(r, e, s) {
66
+ if (r === e)
67
+ throw new Error("rootState === localState");
68
+ return new Proxy(r, {
69
+ get: (i, n) => e && n in e ? e[n] : r[n],
70
+ set: (i, n, t) => {
71
+ if (e && n in e)
72
+ throw new Error("Writing to local state is not allowed as it is read-only.");
73
+ return r[n] = t, s == null || s(r), !0;
74
+ }
75
+ });
76
+ }
77
+ export {
78
+ p as e
79
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";const s=require("./index.0c5f9582.cjs");function a(){const r=()=>{var e;return typeof process<"u"&&((e=process==null?void 0:process.versions)==null?void 0:e.node)};return!s.isBrowser()&&!r()}let g;a()&&Promise.resolve().then(()=>require("./non-node-runtime.ddd24d83.cjs")).then(r=>{g=r.runInNonNode}).catch(r=>{const e="Error importing JS interpreter for non-Node.js runtimes. Make sure `js-interpreter` is installed.\n Read more here: https://github.com/BuilderIO/builder/tree/main/packages/sdks/README.md#non-nodejs-runtimes-edge-serverless\n ";s.logger.error(e,r),g=(...i)=>{s.logger.error(e)}});function w({code:r,context:e,localState:i,rootState:t,rootSetState:n,event:u,isExpression:o=!0}){if(r===""){s.logger.warn("Skipping evaluation of empty code block.");return}const d={isEditing:s.isEditing(),isBrowser:s.isBrowser(),isServer:!s.isBrowser()},c={useCode:o&&!(r.includes(";")||r.includes(" return ")||r.trim().startsWith("return "))?`return (${r});`:r,builder:d,context:e,event:u,rootSetState:n,rootState:t,localState:i};return s.isBrowser()?f(c):a()?g(c):h(c)}const f=({useCode:r,builder:e,context:i,event:t,localState:n,rootSetState:u,rootState:o})=>{const d=m(o,n,u);try{return new Function("builder","Builder","state","context","event",r)(e,e,d,i,t)}catch(l){s.logger.warn(`Builder custom code error:
2
+ While Evaluating:
3
+ `,r,`
4
+ `,l)}},h=r=>f(r);function m(r,e,i){if(r===e)throw new Error("rootState === localState");return new Proxy(r,{get:(t,n)=>e&&n in e?e[n]:r[n],set:(t,n,u)=>{if(e&&n in e)throw new Error("Writing to local state is not allowed as it is read-only.");return r[n]=u,i==null||i(r),!0}})}exports.evaluate=w;
@@ -0,0 +1 @@
1
+ "use strict";const s=require("./index.0c5f9582.cjs"),l=require("./evaluate.eba0e0f9.cjs"),i=e=>`v-on:${e.toLowerCase()}`,u=(e,t)=>a=>l.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:a,isExpression:!1});function v(e){var n;const t={},a=(n=e.block.actions)!=null?n:{};for(const o in a){if(!a.hasOwnProperty(o))continue;const r=a[o];let c=i(o);if(e.stripPrefix)switch(s.TARGET){case"vue2":case"vue3":c=c.replace("v-on:","");break;case"svelte":c=c.replace("on:","");break}t[c]=u(r,e)}return t}exports.getBlockActions=v;
@@ -0,0 +1,36 @@
1
+ import { T as s } from "./index.fc359faf.js";
2
+ import { e as l } from "./evaluate.15b2ed56.js";
3
+ const i = (e) => `v-on:${e.toLowerCase()}`, v = (e, t) => (o) => l({
4
+ code: e,
5
+ context: t.context,
6
+ localState: t.localState,
7
+ rootState: t.rootState,
8
+ rootSetState: t.rootSetState,
9
+ event: o,
10
+ isExpression: !1
11
+ });
12
+ function u(e) {
13
+ var c;
14
+ const t = {}, o = (c = e.block.actions) != null ? c : {};
15
+ for (const r in o) {
16
+ if (!o.hasOwnProperty(r))
17
+ continue;
18
+ const n = o[r];
19
+ let a = i(r);
20
+ if (e.stripPrefix)
21
+ switch (s) {
22
+ case "vue2":
23
+ case "vue3":
24
+ a = a.replace("v-on:", "");
25
+ break;
26
+ case "svelte":
27
+ a = a.replace("on:", "");
28
+ break;
29
+ }
30
+ t[a] = v(n, e);
31
+ }
32
+ return t;
33
+ }
34
+ export {
35
+ u as g
36
+ };
@@ -1,5 +1,5 @@
1
- import { T as o } from "./index-a089abc3.js";
2
- import { a } from "./css-8b11bb6e.js";
1
+ import { T as o } from "./index.fc359faf.js";
2
+ import { a } from "./css.e33adaf0.js";
3
3
  function n(e) {
4
4
  const t = {};
5
5
  if (typeof e != "string")
@@ -0,0 +1 @@
1
+ "use strict";const c=require("./index.0c5f9582.cjs"),n=require("./css.ec4684cd.cjs");function i(e){const t={};if(typeof e!="string")return t;const r=e.trim().split(/\\s+/);for(const s of r)t[s]=!0;return t}function o(e){return e.class=i(e.class),e}const a=e=>({href:e.href});function u({block:e,context:t}){var s;const r={...a(e),...e.properties,"builder-id":e.id,style:e.style?l(e.style):void 0,class:[e.id,"builder-block",e.class,(s=e.properties)==null?void 0:s.class].filter(Boolean).join(" ")};return o(r)}function l(e){switch(c.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return n.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}exports.getBlockProperties=u;
@@ -0,0 +1 @@
1
+ "use strict";const d=require("./evaluate.eba0e0f9.cjs"),f=require("./index.0c5f9582.cjs"),l=require("./set.87eb0329.cjs");const g=({block:e,context:t,localState:r,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const n=f.fastClone(e),s={...n,properties:{...n.properties},actions:{...n.actions}};for(const c in e.bindings){const u=e.bindings[c],a=d.evaluate({code:u,localState:r,rootState:i,rootSetState:o,context:t});l.set(s,c,a)}return s};function p({block:e,context:t,shouldEvaluateBindings:r,localState:i,rootState:o,rootSetState:n}){const s=e;return r?g({block:s,localState:i,rootState:o,rootSetState:n,context:t}):s}exports.getProcessedBlock=p;
@@ -0,0 +1,53 @@
1
+ import { e as p } from "./evaluate.15b2ed56.js";
2
+ import { f as u } from "./index.fc359faf.js";
3
+ import { s as d } from "./set.b219ab0e.js";
4
+ const m = ({
5
+ block: n,
6
+ context: t,
7
+ localState: e,
8
+ rootState: r,
9
+ rootSetState: i
10
+ }) => {
11
+ if (!n.bindings)
12
+ return n;
13
+ const o = u(n), s = {
14
+ ...o,
15
+ properties: {
16
+ ...o.properties
17
+ },
18
+ actions: {
19
+ ...o.actions
20
+ }
21
+ };
22
+ for (const c in n.bindings) {
23
+ const a = n.bindings[c], f = p({
24
+ code: a,
25
+ localState: e,
26
+ rootState: r,
27
+ rootSetState: i,
28
+ context: t
29
+ });
30
+ d(s, c, f);
31
+ }
32
+ return s;
33
+ };
34
+ function v({
35
+ block: n,
36
+ context: t,
37
+ shouldEvaluateBindings: e,
38
+ localState: r,
39
+ rootState: i,
40
+ rootSetState: o
41
+ }) {
42
+ const s = n;
43
+ return e ? m({
44
+ block: s,
45
+ localState: r,
46
+ rootState: i,
47
+ rootSetState: o,
48
+ context: t
49
+ }) : s;
50
+ }
51
+ export {
52
+ v as g
53
+ };