@builder.io/sdk-vue 0.1.2 → 0.1.4
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.
- package/package.json +1 -1
- package/packages/_vue2/dist/{block-styles.e9ae5c99.js → block-styles.062b71eb.js} +6 -4
- package/packages/_vue2/dist/block-styles.c799c71a.cjs +1 -0
- package/packages/{_vue3/dist/get-processed-block.1220ffe6.js → _vue2/dist/get-processed-block.44306844.js} +1 -1
- package/packages/_vue2/dist/{get-processed-block.ac23eb44.cjs → get-processed-block.837e0313.cjs} +1 -1
- package/packages/_vue2/dist/index.59a0624f.cjs +30 -0
- package/packages/_vue2/dist/{index.71913926.js → index.b2edb9b2.js} +531 -435
- package/packages/_vue2/dist/render-block.74bfd4ea.js +249 -0
- package/packages/_vue2/dist/render-block.b97311ac.cjs +3 -0
- package/packages/_vue2/dist/{render-component.e0a952b3.js → render-component.b325feac.js} +3 -3
- package/packages/_vue2/dist/{render-component.4e09cdef.cjs → render-component.e59489c1.cjs} +1 -1
- package/packages/_vue2/dist/render-inlined-styles.14b606a5.cjs +1 -0
- package/packages/_vue2/dist/{render-inlined-styles.58be9e46.js → render-inlined-styles.734fe2c9.js} +7 -5
- package/packages/_vue2/dist/render-repeated-block.bbbfafcc.cjs +1 -0
- package/packages/_vue2/dist/render-repeated-block.e1d94c10.js +41 -0
- package/packages/_vue2/dist/{render-styles.b0b466c2.js → render-styles.0b296b86.js} +2 -2
- package/packages/_vue2/dist/{render-styles.5381508b.cjs → render-styles.6732290e.cjs} +1 -1
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +3 -3
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +35 -175
- package/packages/_vue2/dist/src/blocks/custom-code/custom-code.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/embed/embed.vue.d.ts +5 -2
- package/packages/_vue2/dist/src/blocks/img/img.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +65 -192
- package/packages/_vue2/dist/src/components/render-block/block-styles.vue.d.ts +2 -2
- package/packages/_vue2/dist/src/components/render-block/render-block.helpers.d.ts +11 -0
- package/packages/_vue2/dist/src/components/render-block/render-block.vue.d.ts +30 -170
- package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +7 -57
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +28 -168
- package/packages/_vue2/dist/src/components/render-blocks.vue.d.ts +33 -173
- package/packages/_vue2/dist/src/components/render-content/components/render-styles.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +59 -189
- package/packages/_vue2/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/context/builder.context.d.ts +11 -1
- package/packages/_vue2/dist/src/functions/track/helpers.d.ts +5 -0
- package/packages/{_vue3/dist/src/functions/track.d.ts → _vue2/dist/src/functions/track/index.d.ts} +5 -10
- package/packages/_vue2/dist/src/functions/track/interaction.d.ts +13 -0
- package/packages/_vue2/dist/src/index.d.ts +1 -1
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/{block-styles.ab09f721.js → block-styles.413a68e9.js} +19 -17
- package/packages/_vue3/dist/block-styles.6e935df7.cjs +1 -0
- package/packages/{_vue2/dist/get-processed-block.985f56a5.js → _vue3/dist/get-processed-block.ab2d823c.js} +1 -1
- package/packages/_vue3/dist/{get-processed-block.c0ffa71e.cjs → get-processed-block.b0588cd8.cjs} +1 -1
- package/packages/_vue3/dist/index.218c45a5.cjs +30 -0
- package/packages/_vue3/dist/{index.e0d3400f.js → index.7db5ef7e.js} +469 -374
- package/packages/_vue3/dist/render-block.a53e9af1.js +258 -0
- package/packages/_vue3/dist/render-block.a9195cb6.cjs +3 -0
- package/packages/_vue3/dist/{render-component.7a972660.js → render-component.41330655.js} +3 -3
- package/packages/_vue3/dist/{render-component.af4b9326.cjs → render-component.adae07fa.cjs} +1 -1
- package/packages/_vue3/dist/render-inlined-styles.47114c43.js +32 -0
- package/packages/_vue3/dist/render-inlined-styles.c80dee1c.cjs +1 -0
- package/packages/_vue3/dist/render-repeated-block.5b77dd2a.cjs +1 -0
- package/packages/_vue3/dist/render-repeated-block.648adc14.js +36 -0
- package/packages/_vue3/dist/{render-styles.c8214c85.js → render-styles.8780951f.js} +2 -2
- package/packages/_vue3/dist/{render-styles.1e95e77c.cjs → render-styles.9f30e56b.cjs} +1 -1
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +6 -6
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +5 -5
- package/packages/_vue3/dist/src/blocks/custom-code/custom-code.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/embed/embed.vue.d.ts +5 -2
- package/packages/_vue3/dist/src/blocks/img/img.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +35 -22
- package/packages/_vue3/dist/src/components/render-block/block-styles.vue.d.ts +2 -2
- package/packages/_vue3/dist/src/components/render-block/render-block.helpers.d.ts +11 -0
- package/packages/_vue3/dist/src/components/render-block/render-component.vue.d.ts +1 -31
- package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +8 -1
- package/packages/_vue3/dist/src/components/render-blocks.vue.d.ts +3 -3
- package/packages/_vue3/dist/src/components/render-content/components/render-styles.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +29 -19
- package/packages/_vue3/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/context/builder.context.d.ts +11 -1
- package/packages/_vue3/dist/src/functions/track/helpers.d.ts +5 -0
- package/packages/{_vue2/dist/src/functions/track.d.ts → _vue3/dist/src/functions/track/index.d.ts} +5 -10
- package/packages/_vue3/dist/src/functions/track/interaction.d.ts +13 -0
- package/packages/_vue3/dist/src/index.d.ts +1 -1
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.b9cb70e5.cjs +0 -1
- package/packages/_vue2/dist/index.50198d49.cjs +0 -30
- package/packages/_vue2/dist/render-block.2c42b2ea.cjs +0 -3
- package/packages/_vue2/dist/render-block.6f078e8d.js +0 -251
- package/packages/_vue2/dist/render-component-with-context.795868f2.js +0 -53
- package/packages/_vue2/dist/render-component-with-context.88c14993.cjs +0 -1
- package/packages/_vue2/dist/render-inlined-styles.171750b7.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.2ef95a2e.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.58051104.js +0 -53
- package/packages/_vue2/dist/src/components/render-block/render-component-with-context.vue.d.ts +0 -114
- package/packages/_vue3/dist/block-styles.4a2a7b8d.cjs +0 -1
- package/packages/_vue3/dist/index.ac143767.cjs +0 -30
- package/packages/_vue3/dist/render-block.489f5bb0.cjs +0 -3
- package/packages/_vue3/dist/render-block.f4974fcf.js +0 -262
- package/packages/_vue3/dist/render-component-with-context.49bb17cb.cjs +0 -1
- package/packages/_vue3/dist/render-component-with-context.b7aac17f.js +0 -50
- package/packages/_vue3/dist/render-inlined-styles.37596a05.js +0 -30
- package/packages/_vue3/dist/render-inlined-styles.ffa23fbe.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.704b65cb.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.7b85cf89.js +0 -48
- package/packages/_vue3/dist/src/components/render-block/render-component-with-context.vue.d.ts +0 -48
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { e as l, T as m, b as u, n as d } from "./index.b2edb9b2.js";
|
|
2
|
+
import { g as p } from "./get-processed-block.44306844.js";
|
|
3
|
+
const h = (t) => `v-on:${t.toLowerCase()}`, k = (t, e) => (n) => l({
|
|
4
|
+
code: t,
|
|
5
|
+
context: e.context,
|
|
6
|
+
state: e.state,
|
|
7
|
+
event: n,
|
|
8
|
+
isExpression: !1
|
|
9
|
+
});
|
|
10
|
+
function f(t) {
|
|
11
|
+
var r;
|
|
12
|
+
const e = {}, n = (r = t.block.actions) != null ? r : {};
|
|
13
|
+
for (const o in n) {
|
|
14
|
+
if (!n.hasOwnProperty(o))
|
|
15
|
+
continue;
|
|
16
|
+
const s = n[o];
|
|
17
|
+
e[h(o)] = k(s, t);
|
|
18
|
+
}
|
|
19
|
+
return e;
|
|
20
|
+
}
|
|
21
|
+
function b(t) {
|
|
22
|
+
var e;
|
|
23
|
+
return {
|
|
24
|
+
...(e = t.component) == null ? void 0 : e.options,
|
|
25
|
+
...t.options,
|
|
26
|
+
builderBlock: t
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function x(t) {
|
|
30
|
+
const e = {};
|
|
31
|
+
if (typeof t != "string")
|
|
32
|
+
return e;
|
|
33
|
+
const n = t.trim().split(/\\s+/);
|
|
34
|
+
for (const r of n)
|
|
35
|
+
e[r] = !0;
|
|
36
|
+
return e;
|
|
37
|
+
}
|
|
38
|
+
function y(t) {
|
|
39
|
+
return t.class = x(t.class), t;
|
|
40
|
+
}
|
|
41
|
+
function g(t) {
|
|
42
|
+
var n;
|
|
43
|
+
const e = {
|
|
44
|
+
...t.properties,
|
|
45
|
+
"builder-id": t.id,
|
|
46
|
+
style: C(t.style),
|
|
47
|
+
class: [t.id, "builder-block", t.class, (n = t.properties) == null ? void 0 : n.class].filter(Boolean).join(" ")
|
|
48
|
+
};
|
|
49
|
+
return y(e);
|
|
50
|
+
}
|
|
51
|
+
function C(t) {
|
|
52
|
+
if (!!t)
|
|
53
|
+
switch (m) {
|
|
54
|
+
case "svelte":
|
|
55
|
+
case "vue2":
|
|
56
|
+
case "vue3":
|
|
57
|
+
case "solid":
|
|
58
|
+
return u(t).join(" ");
|
|
59
|
+
case "qwik":
|
|
60
|
+
case "reactNative":
|
|
61
|
+
case "react":
|
|
62
|
+
return t;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function v(t) {
|
|
66
|
+
return t.tagName || "div";
|
|
67
|
+
}
|
|
68
|
+
const B = [
|
|
69
|
+
"area",
|
|
70
|
+
"base",
|
|
71
|
+
"br",
|
|
72
|
+
"col",
|
|
73
|
+
"embed",
|
|
74
|
+
"hr",
|
|
75
|
+
"img",
|
|
76
|
+
"input",
|
|
77
|
+
"keygen",
|
|
78
|
+
"link",
|
|
79
|
+
"meta",
|
|
80
|
+
"param",
|
|
81
|
+
"source",
|
|
82
|
+
"track",
|
|
83
|
+
"wbr"
|
|
84
|
+
], _ = (t) => typeof t == "string" && B.includes(t.toLowerCase()), E = ({
|
|
85
|
+
block: t,
|
|
86
|
+
context: e
|
|
87
|
+
}) => {
|
|
88
|
+
var o;
|
|
89
|
+
const n = (o = p({
|
|
90
|
+
block: t,
|
|
91
|
+
state: e.state,
|
|
92
|
+
context: e.context,
|
|
93
|
+
shouldEvaluateBindings: !1
|
|
94
|
+
}).component) == null ? void 0 : o.name;
|
|
95
|
+
if (!n)
|
|
96
|
+
return null;
|
|
97
|
+
const r = e.registeredComponents[n];
|
|
98
|
+
if (r)
|
|
99
|
+
return r;
|
|
100
|
+
console.warn(`
|
|
101
|
+
Could not find a registered component named "${n}".
|
|
102
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
103
|
+
}, R = ({
|
|
104
|
+
block: t,
|
|
105
|
+
context: e
|
|
106
|
+
}) => {
|
|
107
|
+
const { repeat: n, ...r } = t;
|
|
108
|
+
if (!(n != null && n.collection))
|
|
109
|
+
return;
|
|
110
|
+
const o = l({
|
|
111
|
+
code: n.collection,
|
|
112
|
+
state: e.state,
|
|
113
|
+
context: e.context
|
|
114
|
+
});
|
|
115
|
+
if (!Array.isArray(o))
|
|
116
|
+
return;
|
|
117
|
+
const s = n.collection.split(".").pop(), c = n.itemName || (s ? s + "Item" : "item");
|
|
118
|
+
return o.map((i, a) => ({
|
|
119
|
+
context: {
|
|
120
|
+
...e,
|
|
121
|
+
state: {
|
|
122
|
+
...e.state,
|
|
123
|
+
$index: a,
|
|
124
|
+
$item: i,
|
|
125
|
+
[c]: i,
|
|
126
|
+
[`$${c}Index`]: a
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
block: r
|
|
130
|
+
}));
|
|
131
|
+
}, w = () => import("./block-styles.062b71eb.js").then((t) => t.default).catch((t) => {
|
|
132
|
+
throw console.error(
|
|
133
|
+
"Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",
|
|
134
|
+
t
|
|
135
|
+
), t;
|
|
136
|
+
}), P = () => import("./render-repeated-block.e1d94c10.js").then((t) => t.default).catch((t) => {
|
|
137
|
+
throw console.error(
|
|
138
|
+
"Error while attempting to dynamically import component RenderRepeatedBlock at ./render-repeated-block.vue",
|
|
139
|
+
t
|
|
140
|
+
), t;
|
|
141
|
+
}), T = () => import("./render-component.b325feac.js").then((t) => t.default).catch((t) => {
|
|
142
|
+
throw console.error(
|
|
143
|
+
"Error while attempting to dynamically import component RenderComponent at ./render-component.vue",
|
|
144
|
+
t
|
|
145
|
+
), t;
|
|
146
|
+
}), A = {
|
|
147
|
+
name: "render-block",
|
|
148
|
+
components: {
|
|
149
|
+
RenderComponent: T,
|
|
150
|
+
RenderRepeatedBlock: P,
|
|
151
|
+
BlockStyles: w
|
|
152
|
+
},
|
|
153
|
+
props: ["block", "context"],
|
|
154
|
+
data() {
|
|
155
|
+
return {
|
|
156
|
+
component: E({
|
|
157
|
+
block: this.block,
|
|
158
|
+
context: this.context
|
|
159
|
+
}),
|
|
160
|
+
repeatItemData: R({
|
|
161
|
+
block: this.block,
|
|
162
|
+
context: this.context
|
|
163
|
+
}),
|
|
164
|
+
isEmptyHtmlElement: _
|
|
165
|
+
};
|
|
166
|
+
},
|
|
167
|
+
computed: {
|
|
168
|
+
tag() {
|
|
169
|
+
return v(this.useBlock);
|
|
170
|
+
},
|
|
171
|
+
useBlock() {
|
|
172
|
+
return this.repeatItemData ? this.block : p({
|
|
173
|
+
block: this.block,
|
|
174
|
+
state: this.context.state,
|
|
175
|
+
context: this.context.context,
|
|
176
|
+
shouldEvaluateBindings: !0
|
|
177
|
+
});
|
|
178
|
+
},
|
|
179
|
+
actions() {
|
|
180
|
+
return f({
|
|
181
|
+
block: this.useBlock,
|
|
182
|
+
state: this.context.state,
|
|
183
|
+
context: this.context.context
|
|
184
|
+
});
|
|
185
|
+
},
|
|
186
|
+
attributes() {
|
|
187
|
+
return {
|
|
188
|
+
...g(this.useBlock)
|
|
189
|
+
};
|
|
190
|
+
},
|
|
191
|
+
renderComponentProps() {
|
|
192
|
+
var t, e, n, r, o, s;
|
|
193
|
+
return {
|
|
194
|
+
blockChildren: (t = this.useBlock.children) != null ? t : [],
|
|
195
|
+
componentRef: (e = this.component) == null ? void 0 : e.component,
|
|
196
|
+
componentOptions: {
|
|
197
|
+
...b(this.useBlock),
|
|
198
|
+
...(n = this.component) != null && n.noWrap ? {
|
|
199
|
+
attributes: {
|
|
200
|
+
...this.attributes,
|
|
201
|
+
...this.actions
|
|
202
|
+
}
|
|
203
|
+
} : {},
|
|
204
|
+
customBreakpoints: (s = (o = (r = this.childrenContext) == null ? void 0 : r.content) == null ? void 0 : o.meta) == null ? void 0 : s.breakpoints
|
|
205
|
+
},
|
|
206
|
+
context: this.childrenContext
|
|
207
|
+
};
|
|
208
|
+
},
|
|
209
|
+
childrenWithoutParentComponent() {
|
|
210
|
+
var e, n;
|
|
211
|
+
return !((e = this.component) != null && e.component) && !this.repeatItemData ? (n = this.useBlock.children) != null ? n : [] : [];
|
|
212
|
+
},
|
|
213
|
+
childrenContext() {
|
|
214
|
+
const t = () => ({});
|
|
215
|
+
return {
|
|
216
|
+
apiKey: this.context.apiKey,
|
|
217
|
+
state: this.context.state,
|
|
218
|
+
content: this.context.content,
|
|
219
|
+
context: this.context.context,
|
|
220
|
+
registeredComponents: this.context.registeredComponents,
|
|
221
|
+
inheritedStyles: t()
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
var I = function() {
|
|
227
|
+
var r;
|
|
228
|
+
var e = this, n = e._self._c;
|
|
229
|
+
return Boolean(!((r = e.component) != null && r.noWrap)) ? e.isEmptyHtmlElement(e.tag) ? n(e.tag, e._b({ tag: "component" }, "component", { ...e.attributes, ...e.actions }, !1)) : !e.isEmptyHtmlElement(e.tag) && e.repeatItemData ? n("div", { staticClass: "vue2-root-element-workaround" }, e._l(e.repeatItemData, function(o, s) {
|
|
230
|
+
return n("render-repeated-block", { key: s, attrs: { repeatContext: o.context, block: o.block } });
|
|
231
|
+
}), 1) : n(e.tag, e._b({ tag: "component" }, "component", { ...e.attributes, ...e.actions }, !1), [n("render-component", e._b({}, "render-component", e.renderComponentProps, !1)), e._l(e.childrenWithoutParentComponent, function(o, s) {
|
|
232
|
+
return n("render-block", { key: "render-block-" + o.id, attrs: { block: o, context: e.childrenContext } });
|
|
233
|
+
}), e._l(e.childrenWithoutParentComponent, function(o, s) {
|
|
234
|
+
return n("block-styles", { key: "block-style-" + o.id, attrs: { block: o, context: e.childrenContext } });
|
|
235
|
+
})], 2) : n("render-component", e._b({}, "render-component", e.renderComponentProps, !1));
|
|
236
|
+
}, S = [], N = /* @__PURE__ */ d(
|
|
237
|
+
A,
|
|
238
|
+
I,
|
|
239
|
+
S,
|
|
240
|
+
!1,
|
|
241
|
+
null,
|
|
242
|
+
null,
|
|
243
|
+
null,
|
|
244
|
+
null
|
|
245
|
+
);
|
|
246
|
+
const W = N.exports;
|
|
247
|
+
export {
|
|
248
|
+
W as default
|
|
249
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.59a0624f.cjs"),u=require("./get-processed-block.837e0313.cjs"),d=e=>`v-on:${e.toLowerCase()}`,p=(e,t)=>n=>s.evaluate({code:e,context:t.context,state:t.state,event:n,isExpression:!1});function m(e){var r;const t={},n=(r=e.block.actions)!=null?r:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const c=n[o];t[d(o)]=p(c,e)}return t}function h(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}function k(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\\s+/);for(const r of n)t[r]=!0;return t}function f(e){return e.class=k(e.class),e}function b(e){var n;const t={...e.properties,"builder-id":e.id,style:x(e.style),class:[e.id,"builder-block",e.class,(n=e.properties)==null?void 0:n.class].filter(Boolean).join(" ")};return f(t)}function x(e){if(!!e)switch(s.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return s.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":return e}}function g(e){return e.tagName||"div"}const y=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],v=e=>typeof e=="string"&&y.includes(e.toLowerCase()),C=({block:e,context:t})=>{var o;const n=(o=u.getProcessedBlock({block:e,state:t.state,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:o.name;if(!n)return null;const r=t.registeredComponents[n];if(r)return r;console.warn(`
|
|
2
|
+
Could not find a registered component named "${n}".
|
|
3
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`)},B=({block:e,context:t})=>{const{repeat:n,...r}=e;if(!(n!=null&&n.collection))return;const o=s.evaluate({code:n.collection,state:t.state,context:t.context});if(!Array.isArray(o))return;const c=n.collection.split(".").pop(),i=n.itemName||(c?c+"Item":"item");return o.map((a,l)=>({context:{...t,state:{...t.state,$index:l,$item:a,[i]:a,[`$${i}Index`]:l}},block:r}))},_=()=>Promise.resolve().then(()=>require("./block-styles.c799c71a.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",e),e}),E=()=>Promise.resolve().then(()=>require("./render-repeated-block.bbbfafcc.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderRepeatedBlock at ./render-repeated-block.vue",e),e}),P=()=>Promise.resolve().then(()=>require("./render-component.e59489c1.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderComponent at ./render-component.vue",e),e}),R={name:"render-block",components:{RenderComponent:P,RenderRepeatedBlock:E,BlockStyles:_},props:["block","context"],data(){return{component:C({block:this.block,context:this.context}),repeatItemData:B({block:this.block,context:this.context}),isEmptyHtmlElement:v}},computed:{tag(){return g(this.useBlock)},useBlock(){return this.repeatItemData?this.block:u.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!0})},actions(){return m({block:this.useBlock,state:this.context.state,context:this.context.context})},attributes(){return{...b(this.useBlock)}},renderComponentProps(){var e,t,n,r,o,c;return{blockChildren:(e=this.useBlock.children)!=null?e:[],componentRef:(t=this.component)==null?void 0:t.component,componentOptions:{...h(this.useBlock),...(n=this.component)!=null&&n.noWrap?{attributes:{...this.attributes,...this.actions}}:{},customBreakpoints:(c=(o=(r=this.childrenContext)==null?void 0:r.content)==null?void 0:o.meta)==null?void 0:c.breakpoints},context:this.childrenContext}},childrenWithoutParentComponent(){var t,n;return!((t=this.component)!=null&&t.component)&&!this.repeatItemData?(n=this.useBlock.children)!=null?n:[]:[]},childrenContext(){const e=()=>({});return{apiKey:this.context.apiKey,state:this.context.state,content:this.context.content,context:this.context.context,registeredComponents:this.context.registeredComponents,inheritedStyles:e()}}}};var w=function(){var r;var t=this,n=t._self._c;return Boolean(!((r=t.component)!=null&&r.noWrap))?t.isEmptyHtmlElement(t.tag)?n(t.tag,t._b({tag:"component"},"component",{...t.attributes,...t.actions},!1)):!t.isEmptyHtmlElement(t.tag)&&t.repeatItemData?n("div",{staticClass:"vue2-root-element-workaround"},t._l(t.repeatItemData,function(o,c){return n("render-repeated-block",{key:c,attrs:{repeatContext:o.context,block:o.block}})}),1):n(t.tag,t._b({tag:"component"},"component",{...t.attributes,...t.actions},!1),[n("render-component",t._b({},"render-component",t.renderComponentProps,!1)),t._l(t.childrenWithoutParentComponent,function(o,c){return n("render-block",{key:"render-block-"+o.id,attrs:{block:o,context:t.childrenContext}})}),t._l(t.childrenWithoutParentComponent,function(o,c){return n("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:t.childrenContext}})})],2):n("render-component",t._b({},"render-component",t.renderComponentProps,!1))},S=[],j=s.normalizeComponent(R,w,S,!1,null,null,null,null);const T=j.exports;exports.default=T;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as c } from "./index.
|
|
2
|
-
const l = () => import("./block-styles.
|
|
1
|
+
import { n as c } from "./index.b2edb9b2.js";
|
|
2
|
+
const l = () => import("./block-styles.062b71eb.js").then((o) => o.default).catch((o) => {
|
|
3
3
|
throw console.error(
|
|
4
4
|
"Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",
|
|
5
5
|
o
|
|
6
6
|
), o;
|
|
7
|
-
}), s = () => import("./render-block.
|
|
7
|
+
}), s = () => import("./render-block.74bfd4ea.js").then((o) => o.default).catch((o) => {
|
|
8
8
|
throw console.error(
|
|
9
9
|
"Error while attempting to dynamically import component RenderBlock at ./render-block.vue",
|
|
10
10
|
o
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index.59a0624f.cjs"),l=()=>Promise.resolve().then(()=>require("./block-styles.c799c71a.cjs")).then(n=>n.default).catch(n=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",n),n}),s=()=>Promise.resolve().then(()=>require("./render-block.b97311ac.cjs")).then(n=>n.default).catch(n=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block.vue",n),n}),i={name:"render-component",components:{RenderBlock:s,BlockStyles:l},props:["componentRef","componentOptions","blockChildren","context"]};var a=function(){var e=this,t=e._self._c;return e.componentRef?t(e.componentRef,e._b({tag:"component"},"component",e.componentOptions,!1),[e._l(e.blockChildren,function(o,r){return t("render-block",{key:"render-block-"+o.id,attrs:{block:o,context:e.context}})}),e._l(e.blockChildren,function(o,r){return t("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:e.context}})})],2):e._e()},m=[],d=c.normalizeComponent(i,a,m,!1,null,null,null,null);const p=d.exports;exports.default=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index.59a0624f.cjs"),s={name:"render-inlined-styles",props:["styles"],data(){return{TARGET:n.TARGET}},computed:{injectedStyleScript(){return`<${this.tag}>${this.styles}</${this.tag}>`},tag(){return"style"}}};var r=function(){var e=this,t=e._self._c;return e.TARGET==="svelte"||e.TARGET==="qwik"?t(e.tag,{tag:"component",domProps:{innerHTML:e._s(e.styles)}}):t(e.tag,{tag:"component"},[e._v(e._s(e.styles))])},l=[],a=n.normalizeComponent(s,r,l,!1,null,null,null,null);const o=a.exports;exports.default=o;
|
package/packages/_vue2/dist/{render-inlined-styles.58be9e46.js → render-inlined-styles.734fe2c9.js}
RENAMED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { T as n, n as s } from "./index.
|
|
1
|
+
import { T as n, n as s } from "./index.b2edb9b2.js";
|
|
2
2
|
const r = {
|
|
3
3
|
name: "render-inlined-styles",
|
|
4
4
|
props: ["styles"],
|
|
5
|
-
data
|
|
5
|
+
data() {
|
|
6
|
+
return { TARGET: n };
|
|
7
|
+
},
|
|
6
8
|
computed: {
|
|
7
9
|
injectedStyleScript() {
|
|
8
10
|
return `<${this.tag}>${this.styles}</${this.tag}>`;
|
|
@@ -14,8 +16,8 @@ const r = {
|
|
|
14
16
|
};
|
|
15
17
|
var l = function() {
|
|
16
18
|
var e = this, t = e._self._c;
|
|
17
|
-
return e.TARGET === "svelte" ? t("
|
|
18
|
-
}, a = [],
|
|
19
|
+
return e.TARGET === "svelte" || e.TARGET === "qwik" ? t(e.tag, { tag: "component", domProps: { innerHTML: e._s(e.styles) } }) : t(e.tag, { tag: "component" }, [e._v(e._s(e.styles))]);
|
|
20
|
+
}, a = [], o = /* @__PURE__ */ s(
|
|
19
21
|
r,
|
|
20
22
|
l,
|
|
21
23
|
a,
|
|
@@ -25,7 +27,7 @@ var l = function() {
|
|
|
25
27
|
null,
|
|
26
28
|
null
|
|
27
29
|
);
|
|
28
|
-
const c =
|
|
30
|
+
const c = o.exports;
|
|
29
31
|
export {
|
|
30
32
|
c as default
|
|
31
33
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index.59a0624f.cjs"),o=()=>Promise.resolve().then(()=>require("./render-block.b97311ac.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block.vue",e),e}),c={name:"render-repeated-block",components:{RenderBlock:o},props:["block","repeatContext"],provide(){const e=this;return{[n.BuilderContext.key]:{content:e.repeatContext.content,state:e.repeatContext.state,context:e.repeatContext.context,apiKey:e.repeatContext.apiKey,registeredComponents:e.repeatContext.registeredComponents,inheritedStyles:e.repeatContext.inheritedStyles}}}};var a=function(){var t=this,r=t._self._c;return r("render-block",{attrs:{block:t.block,context:t.repeatContext}})},l=[],s=n.normalizeComponent(c,a,l,!1,null,null,null,null);const i=s.exports;exports.default=i;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { B as o, n as r } from "./index.b2edb9b2.js";
|
|
2
|
+
const a = () => import("./render-block.74bfd4ea.js").then((e) => e.default).catch((e) => {
|
|
3
|
+
throw console.error(
|
|
4
|
+
"Error while attempting to dynamically import component RenderBlock at ./render-block.vue",
|
|
5
|
+
e
|
|
6
|
+
), e;
|
|
7
|
+
}), c = {
|
|
8
|
+
name: "render-repeated-block",
|
|
9
|
+
components: { RenderBlock: a },
|
|
10
|
+
props: ["block", "repeatContext"],
|
|
11
|
+
provide() {
|
|
12
|
+
const e = this;
|
|
13
|
+
return {
|
|
14
|
+
[o.key]: {
|
|
15
|
+
content: e.repeatContext.content,
|
|
16
|
+
state: e.repeatContext.state,
|
|
17
|
+
context: e.repeatContext.context,
|
|
18
|
+
apiKey: e.repeatContext.apiKey,
|
|
19
|
+
registeredComponents: e.repeatContext.registeredComponents,
|
|
20
|
+
inheritedStyles: e.repeatContext.inheritedStyles
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
var s = function() {
|
|
26
|
+
var t = this, n = t._self._c;
|
|
27
|
+
return n("render-block", { attrs: { block: t.block, context: t.repeatContext } });
|
|
28
|
+
}, l = [], p = /* @__PURE__ */ r(
|
|
29
|
+
c,
|
|
30
|
+
s,
|
|
31
|
+
l,
|
|
32
|
+
!1,
|
|
33
|
+
null,
|
|
34
|
+
null,
|
|
35
|
+
null,
|
|
36
|
+
null
|
|
37
|
+
);
|
|
38
|
+
const d = p.exports;
|
|
39
|
+
export {
|
|
40
|
+
d as default
|
|
41
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as c } from "./index.
|
|
2
|
-
const m = () => import("./render-inlined-styles.
|
|
1
|
+
import { n as c } from "./index.b2edb9b2.js";
|
|
2
|
+
const m = () => import("./render-inlined-styles.734fe2c9.js").then((e) => e.default).catch((e) => {
|
|
3
3
|
throw console.error(
|
|
4
4
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../../render-inlined-styles.vue",
|
|
5
5
|
e
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index.59a0624f.cjs"),d=()=>Promise.resolve().then(()=>require("./render-inlined-styles.14b606a5.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../../render-inlined-styles.vue",e),e}),f={name:"render-content-styles",components:{RenderInlinedStyles:d},props:["cssCode","customFonts"],computed:{injectedStyles(){return`
|
|
2
2
|
${this.cssCode||""}
|
|
3
3
|
${this.getFontCss({customFonts:this.customFonts})}`}},methods:{getCssFromFont(e){var o,c;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],r=(c=e.fileUrl)!=null?c:(o=e==null?void 0:e.files)==null?void 0:o.regular;let i="";if(r&&t&&n&&(i+=`
|
|
4
4
|
@font-face {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.59a0624f.cjs");exports.Button=e.Button;exports.Columns=e.Columns;exports.Fragment=e.Fragment;exports.Image=e.Image;exports.RenderBlocks=e.renderBlocks;exports.RenderContent=e.renderContent;exports.Section=e.Section;exports.Symbol=e.Symbol;exports.Text=e.Text;exports.Video=e.Video;exports.components=e.components;exports.convertSearchParamsToQueryObject=e.convertSearchParamsToQueryObject;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getBuilderSearchParamsFromWindow=e.getBuilderSearchParamsFromWindow;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.normalizeSearchParams=e.normalizeSearchParams;exports.register=e.register;exports.registerComponent=e.registerComponent;exports.setEditorSettings=e.setEditorSettings;exports.track=e.track;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as s, C as t, F as r, I as n, j as o, r as i, i as m, S as g, d as c, V as d, m as l, w as S, p as C, v as u, x as h, y as p, u as P, k as B, l as k, z as v, q as w, o as x, s as y, t as F } from "./index.b2edb9b2.js";
|
|
2
2
|
export {
|
|
3
3
|
s as Button,
|
|
4
4
|
t as Columns,
|
|
@@ -16,8 +16,8 @@ export {
|
|
|
16
16
|
u as getAllContent,
|
|
17
17
|
h as getBuilderSearchParams,
|
|
18
18
|
p as getBuilderSearchParamsFromWindow,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
P as getContent,
|
|
20
|
+
B as isEditing,
|
|
21
21
|
k as isPreviewing,
|
|
22
22
|
v as normalizeSearchParams,
|
|
23
23
|
w as register,
|