@builder.io/sdk-vue 5.1.0 → 5.2.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 (121) hide show
  1. package/lib/browser/{awaiter-GjRYxPnU.cjs → awaiter-Xj7xgU8A.cjs} +1 -1
  2. package/lib/browser/{awaiter-5WjT5CVy.js → awaiter-fiHMd9OX.js} +1 -1
  3. package/lib/browser/block-wrapper-2d_iPFQQ.js +51 -0
  4. package/lib/browser/block-wrapper-lKLgKxgH.cjs +1 -0
  5. package/lib/browser/blocks/form/form/form.vue.d.ts +3 -3
  6. package/lib/browser/blocks/form/input/input.vue.d.ts +3 -3
  7. package/lib/browser/blocks/symbol/symbol.helpers.d.ts +2 -0
  8. package/lib/browser/blocks/symbol/symbol.types.d.ts +2 -0
  9. package/lib/browser/component-ref-Bo_fwbYK.cjs +1 -0
  10. package/lib/browser/component-ref-YEfZKvMy.js +185 -0
  11. package/lib/browser/components/content/components/enable-editor.vue.d.ts +9 -9
  12. package/lib/browser/components/content/components/styles.vue.d.ts +3 -3
  13. package/lib/browser/components/content/content.vue.d.ts +9 -9
  14. package/lib/browser/components/content-variants/content-variants.vue.d.ts +9 -9
  15. package/lib/browser/components/inlined-script.vue.d.ts +3 -3
  16. package/lib/browser/components/inlined-styles.vue.d.ts +3 -3
  17. package/lib/browser/constants/sdk-version.d.ts +1 -1
  18. package/lib/browser/functions/evaluate/evaluate.d.ts +1 -1
  19. package/lib/browser/functions/evaluate/helpers.d.ts +9 -1
  20. package/lib/browser/functions/get-block-actions-handler.d.ts +2 -0
  21. package/lib/browser/functions/get-block-actions.d.ts +2 -0
  22. package/lib/{edge/get-block-properties--YFzBEV7.js → browser/get-block-properties-5nuoWf39.js} +9 -7
  23. package/lib/browser/get-block-properties-d-Ruoi4f.cjs +1 -0
  24. package/lib/browser/index-1GET5eOz.cjs +334 -0
  25. package/lib/browser/{index-EQdaCBDB.js → index-eVqO7_Qb.js} +475 -459
  26. package/lib/browser/index.cjs +1 -1
  27. package/lib/browser/index.mjs +1 -1
  28. package/lib/browser/{live-edit-tO-V6Sv7.js → live-edit-9paJdIsz.js} +1 -1
  29. package/lib/browser/{live-edit-Jion_iv8.cjs → live-edit-ETOoXz63.cjs} +1 -1
  30. package/lib/browser/{repeated-block-kNj6mfjr.js → repeated-block-A24n6o-E.js} +2 -2
  31. package/lib/browser/{repeated-block-uNYlrd8d.cjs → repeated-block-RfWox6Ev.cjs} +1 -1
  32. package/lib/browser/{style-wrapper-jthdwC6f.cjs → style-wrapper-GTejPbe6.cjs} +1 -1
  33. package/lib/browser/{style-wrapper-CSSH3Epu.js → style-wrapper-tibcUSpL.js} +1 -1
  34. package/lib/edge/{awaiter-0PdAd6k-.cjs → awaiter-SdqgCFCT.cjs} +1 -1
  35. package/lib/edge/{awaiter-OJqvwrja.js → awaiter-rbgcBB2Y.js} +1 -1
  36. package/lib/edge/block-wrapper-DYh1gucy.js +50 -0
  37. package/lib/edge/block-wrapper-WT0fK9OQ.cjs +1 -0
  38. package/lib/edge/blocks/form/form/form.vue.d.ts +3 -3
  39. package/lib/edge/blocks/form/input/input.vue.d.ts +3 -3
  40. package/lib/edge/blocks/symbol/symbol.helpers.d.ts +2 -0
  41. package/lib/edge/blocks/symbol/symbol.types.d.ts +2 -0
  42. package/lib/edge/component-ref-14bWdw0y.js +184 -0
  43. package/lib/edge/component-ref-Ari_o8qM.cjs +1 -0
  44. package/lib/edge/components/content/components/enable-editor.vue.d.ts +9 -9
  45. package/lib/edge/components/content/components/styles.vue.d.ts +3 -3
  46. package/lib/edge/components/content/content.vue.d.ts +9 -9
  47. package/lib/edge/components/content-variants/content-variants.vue.d.ts +9 -9
  48. package/lib/edge/components/inlined-script.vue.d.ts +3 -3
  49. package/lib/edge/components/inlined-styles.vue.d.ts +3 -3
  50. package/lib/edge/constants/sdk-version.d.ts +1 -1
  51. package/lib/edge/functions/evaluate/evaluate.d.ts +1 -1
  52. package/lib/edge/functions/evaluate/helpers.d.ts +9 -1
  53. package/lib/edge/functions/get-block-actions-handler.d.ts +2 -0
  54. package/lib/edge/functions/get-block-actions.d.ts +2 -0
  55. package/lib/{browser/get-block-properties-dmm_DIxo.js → edge/get-block-properties-6j21Yx4_.js} +17 -17
  56. package/lib/edge/get-block-properties-kMAb8z5D.cjs +1 -0
  57. package/lib/edge/{index-ljVeDS39.cjs → index-2Armmtcs.cjs} +17 -17
  58. package/lib/edge/{index-Agn-gjHJ.js → index-unVH2XRb.js} +848 -832
  59. package/lib/edge/index.cjs +1 -1
  60. package/lib/edge/index.mjs +1 -1
  61. package/lib/{node/live-edit-jWT4dXgM.cjs → edge/live-edit-gMqK1-U2.cjs} +1 -1
  62. package/lib/{node/live-edit-E90Rueqo.js → edge/live-edit-yXkE9pDV.js} +1 -1
  63. package/lib/{node/repeated-block-gCLdrEyt.js → edge/repeated-block-F4oPiI78.js} +2 -2
  64. package/lib/edge/{repeated-block-GaabRNMP.cjs → repeated-block-Y0Z3ldLT.cjs} +1 -1
  65. package/lib/edge/{style-wrapper-I1DS5PUP.js → style-wrapper-Ad7ABy2Z.js} +1 -1
  66. package/lib/edge/{style-wrapper-MIBe_b13.cjs → style-wrapper-sL972lDH.cjs} +1 -1
  67. package/lib/node/{awaiter-qP3UIYQS.js → awaiter-_ZqW9w8N.js} +1 -1
  68. package/lib/node/{awaiter-ZX8mvzyL.cjs → awaiter-i0lAEAYI.cjs} +1 -1
  69. package/lib/node/block-wrapper-Bv_s1rr1.cjs +1 -0
  70. package/lib/node/block-wrapper-CnMu7UjK.js +50 -0
  71. package/lib/node/blocks/form/form/form.vue.d.ts +3 -3
  72. package/lib/node/blocks/form/input/input.vue.d.ts +3 -3
  73. package/lib/node/blocks/symbol/symbol.helpers.d.ts +2 -0
  74. package/lib/node/blocks/symbol/symbol.types.d.ts +2 -0
  75. package/lib/node/component-ref-LWytt0tD.cjs +1 -0
  76. package/lib/node/component-ref-lU9WFg32.js +185 -0
  77. package/lib/node/components/content/components/enable-editor.vue.d.ts +9 -9
  78. package/lib/node/components/content/components/styles.vue.d.ts +3 -3
  79. package/lib/node/components/content/content.vue.d.ts +9 -9
  80. package/lib/node/components/content-variants/content-variants.vue.d.ts +9 -9
  81. package/lib/node/components/inlined-script.vue.d.ts +3 -3
  82. package/lib/node/components/inlined-styles.vue.d.ts +3 -3
  83. package/lib/node/constants/sdk-version.d.ts +1 -1
  84. package/lib/node/functions/evaluate/evaluate.d.ts +1 -1
  85. package/lib/node/functions/evaluate/helpers.d.ts +9 -1
  86. package/lib/node/functions/get-block-actions-handler.d.ts +2 -0
  87. package/lib/node/functions/get-block-actions.d.ts +2 -0
  88. package/lib/node/{get-block-properties-o5VoFlz_.js → get-block-properties-oSP4WCJG.js} +18 -17
  89. package/lib/node/get-block-properties-sdbm535D.cjs +1 -0
  90. package/lib/node/{index-SH8gdiHf.js → index-9Wxomhx_.js} +702 -900
  91. package/lib/node/{index-AumTeVyL.cjs → index-z7Ed9MEJ.cjs} +30 -30
  92. package/lib/node/index.cjs +1 -1
  93. package/lib/node/index.mjs +11 -11
  94. package/lib/node/init.cjs +1 -1
  95. package/lib/node/init.mjs +1 -1
  96. package/lib/{edge/live-edit-TWpZ33A7.js → node/live-edit-ZjrPT1e_.js} +1 -1
  97. package/lib/{edge/live-edit-nHq1I7ij.cjs → node/live-edit-nQPgUSEF.cjs} +1 -1
  98. package/lib/node/{repeated-block-4pHYUEBM.cjs → repeated-block-G-7Wr2Ub.cjs} +1 -1
  99. package/lib/{edge/repeated-block-_wYfLmVg.js → node/repeated-block-zGwBOU59.js} +2 -2
  100. package/lib/node/{should-force-browser-runtime-in-node-5h08TaCf.js → should-force-browser-runtime-in-node-0jTQ7bdA.js} +261 -41
  101. package/lib/node/should-force-browser-runtime-in-node-kkE7IeZS.cjs +48 -0
  102. package/lib/node/{style-wrapper-7nh-8JLA.cjs → style-wrapper-QZvOi8Ur.cjs} +1 -1
  103. package/lib/node/{style-wrapper-1rHE_XSt.js → style-wrapper-QtIk1dHP.js} +10 -10
  104. package/package.json +1 -1
  105. package/lib/browser/block-wrapper-8v7I2JSB.cjs +0 -1
  106. package/lib/browser/block-wrapper-s3-0mqGr.js +0 -44
  107. package/lib/browser/component-ref-8g4g9kyF.js +0 -178
  108. package/lib/browser/component-ref-r7lSDLc0.cjs +0 -1
  109. package/lib/browser/get-block-properties-GPPIll7t.cjs +0 -1
  110. package/lib/browser/index-Treb985Y.cjs +0 -334
  111. package/lib/edge/block-wrapper-DfG53TBm.cjs +0 -1
  112. package/lib/edge/block-wrapper-LzMR5J5q.js +0 -43
  113. package/lib/edge/component-ref-30u-bbmm.js +0 -177
  114. package/lib/edge/component-ref-VTMpfeME.cjs +0 -1
  115. package/lib/edge/get-block-properties-yv9bFXVp.cjs +0 -1
  116. package/lib/node/block-wrapper-3FbaAWv9.js +0 -43
  117. package/lib/node/block-wrapper-mEOIfHOk.cjs +0 -1
  118. package/lib/node/component-ref-DHpSqIaD.cjs +0 -1
  119. package/lib/node/component-ref-MKSj3oym.js +0 -178
  120. package/lib/node/get-block-properties-b4xkM8mc.cjs +0 -1
  121. package/lib/node/should-force-browser-runtime-in-node-IsToRTN-.cjs +0 -48
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as E, resolveComponent as x, openBlock as y, createBlock as $, createCommentVNode as Q, createElementBlock as z, Fragment as G } from "vue";
2
- import { T as w, e as C } from "./should-force-browser-runtime-in-node-5h08TaCf.js";
3
- import { c as A, d as N, f as l, h as u, i as j, _ as I, j as H, b as R } from "./index-SH8gdiHf.js";
2
+ import { T as w, h as C } from "./should-force-browser-runtime-in-node-0jTQ7bdA.js";
3
+ import { c as A, d as N, f as l, h as u, i as j, _ as I, j as H, b as R } from "./index-9Wxomhx_.js";
4
4
  import { f as U } from "./find-block-3Ig0kVVe.js";
5
5
  const W = E({
6
6
  name: "block-styles",
@@ -15,9 +15,9 @@ const W = E({
15
15
  return C(e.hide) ? !e.hide : C(e.show) ? e.show : !0;
16
16
  },
17
17
  css() {
18
- var h, B, f, v, b;
18
+ var S, B, f, v, b;
19
19
  const e = this.block, s = e.responsiveStyles, t = this.context.content, o = N(
20
- ((h = t == null ? void 0 : t.meta) == null ? void 0 : h.breakpoints) || {}
20
+ ((S = t == null ? void 0 : t.meta) == null ? void 0 : S.breakpoints) || {}
21
21
  ), p = !!((f = (B = t == null ? void 0 : t.meta) == null ? void 0 : B.breakpoints) != null && f.xsmall), i = s == null ? void 0 : s.large, n = s == null ? void 0 : s.medium, a = s == null ? void 0 : s.small, r = s == null ? void 0 : s.xsmall, d = e.id;
22
22
  if (!d)
23
23
  return "";
@@ -46,10 +46,10 @@ const W = E({
46
46
  o
47
47
  )
48
48
  }) : "", c = e.animations && e.animations.find((k) => k.trigger === "hover");
49
- let S = "";
49
+ let h = "";
50
50
  if (c) {
51
51
  const k = ((b = (v = c.steps) == null ? void 0 : v[1]) == null ? void 0 : b.styles) || {};
52
- S = l({
52
+ h = l({
53
53
  className: `${d}:hover`,
54
54
  styles: {
55
55
  ...k,
@@ -65,7 +65,7 @@ const W = E({
65
65
  P,
66
66
  T,
67
67
  m,
68
- S
68
+ h
69
69
  ].join(" ");
70
70
  }
71
71
  }
@@ -106,9 +106,9 @@ const F = /* @__PURE__ */ I(W, [["render", D]]), L = E({
106
106
  return C((e = this.processedBlock) == null ? void 0 : e.hide) ? !((s = this.processedBlock) != null && s.hide) : C((t = this.processedBlock) == null ? void 0 : t.show) ? (o = this.processedBlock) == null ? void 0 : o.show : !0;
107
107
  },
108
108
  css() {
109
- var S, h, B, f, v, b, k;
110
- const e = (S = this.processedBlock) == null ? void 0 : S.responsiveStyles, s = this.contextProvider.content, t = N(
111
- ((h = s == null ? void 0 : s.meta) == null ? void 0 : h.breakpoints) || {}
109
+ var h, S, B, f, v, b, k;
110
+ const e = (h = this.processedBlock) == null ? void 0 : h.responsiveStyles, s = this.contextProvider.content, t = N(
111
+ ((S = s == null ? void 0 : s.meta) == null ? void 0 : S.breakpoints) || {}
112
112
  ), o = !!((f = (B = s == null ? void 0 : s.meta) == null ? void 0 : B.breakpoints) != null && f.xsmall), p = e == null ? void 0 : e.large, i = e == null ? void 0 : e.medium, n = e == null ? void 0 : e.small, a = e == null ? void 0 : e.xsmall, r = (v = this.processedBlock) == null ? void 0 : v.id;
113
113
  if (!r)
114
114
  return "";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-vue",
3
3
  "description": "Builder.io SDK for Vue",
4
- "version": "5.1.0",
4
+ "version": "5.2.0",
5
5
  "main": "./lib/node/index.cjs",
6
6
  "module": "./lib/node/index.mjs",
7
7
  "type": "module",
@@ -1 +0,0 @@
1
- var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-GPPIll7t.cjs"),n=require("./index-Treb985Y.cjs"),c=()=>Promise.resolve().then(()=>require("./index-Treb985Y.cjs")).then(e=>e.dynamicRenderer).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",e),e}),a=t.defineComponent({name:"block-wrapper",components:{DynamicRenderer:t.defineAsyncComponent(c)},props:["Wrapper","block","context"],data(){return{getBlockActions:o.getBlockActions,getBlockProperties:o.getBlockProperties}}});function i(e,l,p,d,m,u){const r=t.resolveComponent("DynamicRenderer");return t.openBlock(),t.createBlock(r,{TagName:e.Wrapper,attributes:e.getBlockProperties({block:e.block,context:e.context}),actionAttributes:e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["TagName","attributes","actionAttributes"])}const s=n._export_sfc(a,[["render",i]]);exports.default=s;
@@ -1,44 +0,0 @@
1
- import "./style.css";
2
- import { defineComponent as o, defineAsyncComponent as r, resolveComponent as n, openBlock as a, createBlock as c, withCtx as i, renderSlot as p } from "vue";
3
- import { g as s, a as l } from "./get-block-properties-dmm_DIxo.js";
4
- import { _ as m } from "./index-EQdaCBDB.js";
5
- const d = () => import("./index-EQdaCBDB.js").then((e) => e.J).then((e) => e.default).catch((e) => {
6
- throw console.error(
7
- "Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",
8
- e
9
- ), e;
10
- }), f = o({
11
- name: "block-wrapper",
12
- components: { DynamicRenderer: r(d) },
13
- props: ["Wrapper", "block", "context"],
14
- data() {
15
- return { getBlockActions: s, getBlockProperties: l };
16
- }
17
- });
18
- function u(e, k, b, y, S, g) {
19
- const t = n("DynamicRenderer");
20
- return a(), c(t, {
21
- TagName: e.Wrapper,
22
- attributes: e.getBlockProperties({
23
- block: e.block,
24
- context: e.context
25
- }),
26
- actionAttributes: e.getBlockActions({
27
- block: e.block,
28
- rootState: e.context.rootState,
29
- rootSetState: e.context.rootSetState,
30
- localState: e.context.localState,
31
- context: e.context.context,
32
- stripPrefix: !0
33
- })
34
- }, {
35
- default: i(() => [
36
- p(e.$slots, "default")
37
- ]),
38
- _: 3
39
- }, 8, ["TagName", "attributes", "actionAttributes"]);
40
- }
41
- const R = /* @__PURE__ */ m(f, [["render", u]]);
42
- export {
43
- R as default
44
- };
@@ -1,178 +0,0 @@
1
- import "./style.css";
2
- import { defineComponent as b, defineAsyncComponent as u, resolveComponent as d, openBlock as o, createBlock as p, withCtx as i, renderSlot as m, createElementBlock as h, Fragment as w, resolveDynamicComponent as C, mergeProps as P, normalizeProps as B, renderList as E, createCommentVNode as k } from "vue";
3
- import { T as y, i as $, _ as g, B as R, w as A } from "./index-EQdaCBDB.js";
4
- import { a as v, g as S } from "./get-block-properties-dmm_DIxo.js";
5
- const L = () => import("./awaiter-5WjT5CVy.js").then((e) => e.default).catch((e) => {
6
- throw console.error(
7
- "Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",
8
- e
9
- ), e;
10
- }), I = () => import("./live-edit-tO-V6Sv7.js").then((e) => e.default).catch((e) => {
11
- throw console.error(
12
- "Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",
13
- e
14
- ), e;
15
- }), T = b({
16
- name: "interactive-element",
17
- components: {
18
- LiveEdit: u(I),
19
- Awaiter: u(L)
20
- },
21
- props: ["wrapperProps", "block", "includeBlockProps", "context", "Wrapper"],
22
- data() {
23
- return { forceRenderCount: 0, TARGET: y, isEditing: $ };
24
- },
25
- watch: {
26
- onUpdateHook0: { handler() {
27
- }, immediate: !0 }
28
- },
29
- computed: {
30
- attributes() {
31
- return this.includeBlockProps ? {
32
- ...v({
33
- block: this.block,
34
- context: this.context
35
- }),
36
- ...S({
37
- block: this.block,
38
- rootState: this.context.rootState,
39
- rootSetState: this.context.rootSetState,
40
- localState: this.context.localState,
41
- context: this.context.context
42
- })
43
- } : {};
44
- },
45
- targetWrapperProps() {
46
- return {
47
- ...this.wrapperProps,
48
- ...Object.keys(this.attributes).length > 0 ? {
49
- attributes: this.attributes
50
- } : {}
51
- };
52
- },
53
- onUpdateHook0() {
54
- var e, t;
55
- return {
56
- 0: this.wrapperProps,
57
- 1: (t = (e = this.block) == null ? void 0 : e.component) == null ? void 0 : t.options
58
- };
59
- }
60
- }
61
- });
62
- function O(e, t, s, l, a, c) {
63
- const n = d("Awaiter"), r = d("LiveEdit");
64
- return e.Wrapper.load ? (o(), p(n, {
65
- key: 0,
66
- load: e.Wrapper.load,
67
- fallback: e.Wrapper.fallback,
68
- props: e.wrapperProps,
69
- attributes: e.attributes
70
- }, {
71
- default: i(() => [
72
- m(e.$slots, "default")
73
- ]),
74
- _: 3
75
- }, 8, ["load", "fallback", "props", "attributes"])) : (o(), h(w, { key: 1 }, [
76
- e.TARGET === "rsc" && e.isEditing() ? (o(), p(r, {
77
- key: 0,
78
- Wrapper: e.Wrapper,
79
- id: e.block.id || "",
80
- attributes: e.attributes
81
- }, {
82
- default: i(() => [
83
- m(e.$slots, "default")
84
- ]),
85
- _: 3
86
- }, 8, ["Wrapper", "id", "attributes"])) : (o(), p(C(e.Wrapper), P({
87
- key: 1,
88
- attributes: e.attributes
89
- }, e.targetWrapperProps), {
90
- default: i(() => [
91
- m(e.$slots, "default")
92
- ]),
93
- _: 3
94
- }, 16, ["attributes"]))
95
- ], 64));
96
- }
97
- const f = /* @__PURE__ */ g(T, [["render", O]]), U = ({
98
- componentOptions: e,
99
- builderBlock: t,
100
- context: s,
101
- componentRef: l,
102
- includeBlockProps: a,
103
- isInteractive: c,
104
- contextValue: n
105
- }) => {
106
- const r = {
107
- ...e,
108
- /**
109
- * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
110
- * component itself directly. Otherwise, they are provided to the wrapper element.
111
- */
112
- ...a ? {
113
- attributes: v({
114
- block: t,
115
- context: n
116
- })
117
- } : {}
118
- };
119
- return c ? {
120
- Wrapper: l,
121
- block: t,
122
- context: s,
123
- wrapperProps: e,
124
- includeBlockProps: a
125
- } : r;
126
- }, G = b({
127
- name: "component-ref",
128
- components: { Block: R, InteractiveElement: f },
129
- props: [
130
- "isInteractive",
131
- "componentRef",
132
- "componentOptions",
133
- "builderBlock",
134
- "context",
135
- "linkComponent",
136
- "includeBlockProps",
137
- "blockChildren",
138
- "registeredComponents"
139
- ],
140
- data() {
141
- return {
142
- shouldUpdate: !1,
143
- Wrapper: this.isInteractive ? A(f) : this.componentRef,
144
- getWrapperProps: U
145
- };
146
- }
147
- });
148
- function H(e, t, s, l, a, c) {
149
- const n = d("Block");
150
- return e.componentRef ? (o(), p(C(e.Wrapper), B(P(
151
- { key: 0 },
152
- e.getWrapperProps({
153
- componentOptions: e.componentOptions,
154
- builderBlock: e.builderBlock,
155
- context: e.context,
156
- componentRef: e.componentRef,
157
- linkComponent: e.linkComponent,
158
- includeBlockProps: e.includeBlockProps,
159
- isInteractive: e.isInteractive,
160
- contextValue: e.context
161
- })
162
- )), {
163
- default: i(() => [
164
- e.componentRef ? (o(!0), h(w, { key: 0 }, E(e.blockChildren, (r, W) => (o(), p(n, {
165
- key: r.id,
166
- block: r,
167
- context: e.context,
168
- registeredComponents: e.registeredComponents,
169
- linkComponent: e.linkComponent
170
- }, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : k("", !0)
171
- ]),
172
- _: 1
173
- }, 16)) : k("", !0);
174
- }
175
- const F = /* @__PURE__ */ g(G, [["render", H]]);
176
- export {
177
- F as default
178
- };
@@ -1 +0,0 @@
1
- var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=require("./index-Treb985Y.cjs"),l=require("./get-block-properties-GPPIll7t.cjs"),u=()=>Promise.resolve().then(()=>require("./awaiter-GjRYxPnU.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",e),e}),k=()=>Promise.resolve().then(()=>require("./live-edit-Jion_iv8.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",e),e}),f=t.defineComponent({name:"interactive-element",components:{LiveEdit:t.defineAsyncComponent(k),Awaiter:t.defineAsyncComponent(u)},props:["wrapperProps","block","includeBlockProps","context","Wrapper"],data(){return{forceRenderCount:0,TARGET:n.TARGET,isEditing:n.isEditing}},watch:{onUpdateHook0:{handler(){},immediate:!0}},computed:{attributes(){return this.includeBlockProps?{...l.getBlockProperties({block:this.block,context:this.context}),...l.getBlockActions({block:this.block,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context})}:{}},targetWrapperProps(){return{...this.wrapperProps,...Object.keys(this.attributes).length>0?{attributes:this.attributes}:{}}},onUpdateHook0(){var e,o;return{0:this.wrapperProps,1:(o=(e=this.block)==null?void 0:e.component)==null?void 0:o.options}}}});function h(e,o,s,a,p,c){const i=t.resolveComponent("Awaiter"),r=t.resolveComponent("LiveEdit");return e.Wrapper.load?(t.openBlock(),t.createBlock(i,{key:0,load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["load","fallback","props","attributes"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.TARGET==="rsc"&&e.isEditing()?(t.openBlock(),t.createBlock(r,{key:0,Wrapper:e.Wrapper,id:e.block.id||"",attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["Wrapper","id","attributes"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({key:1,attributes:e.attributes},e.targetWrapperProps),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"]))],64))}const m=n._export_sfc(f,[["render",h]]),b=({componentOptions:e,builderBlock:o,context:s,componentRef:a,includeBlockProps:p,isInteractive:c,contextValue:i})=>{const r={...e,...p?{attributes:l.getBlockProperties({block:o,context:i})}:{}};return c?{Wrapper:a,block:o,context:s,wrapperProps:e,includeBlockProps:p}:r},C=t.defineComponent({name:"component-ref",components:{Block:n.Block,InteractiveElement:m},props:["isInteractive","componentRef","componentOptions","builderBlock","context","linkComponent","includeBlockProps","blockChildren","registeredComponents"],data(){return{shouldUpdate:!1,Wrapper:this.isInteractive?n.wrapComponentRef(m):this.componentRef,getWrapperProps:b}}});function B(e,o,s,a,p,c){const i=t.resolveComponent("Block");return e.componentRef?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.normalizeProps(t.mergeProps({key:0},e.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}))),{default:t.withCtx(()=>[e.componentRef?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.blockChildren,(r,d)=>(t.openBlock(),t.createBlock(i,{key:r.id,block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128)):t.createCommentVNode("",!0)]),_:1},16)):t.createCommentVNode("",!0)}const v=n._export_sfc(C,[["render",B]]);exports.default=v;
@@ -1 +0,0 @@
1
- var d=require("./style.css");const s=require("./index-Treb985Y.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>r=>s.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1});function l(e){const t={},r=e.block.actions??{};for(const o in r){if(!r.hasOwnProperty(o))continue;const a=r[o];let n=c(o);if(e.stripPrefix)switch(s.TARGET){case"vue":n=n.replace("v-on:","");break;case"svelte":n=n.replace("on:","");break}t[n]=i(a,e)}return t}function u({properties:e}){return e}const p=e=>({href:e.href});function f({block:e,context:t}){var o;const r={...p(e),...e.properties,"builder-id":e.id,style:s.getStyle({block:e,context:t}),[s.getClassPropName()]:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return u({properties:r,context:t,block:e})}exports.getBlockActions=l;exports.getBlockProperties=f;