@maildeno/editor 0.4.4 → 0.4.5

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.
@@ -0,0 +1,402 @@
1
+ import { H as G, L as o, S as V, T as q, _ as J, f as b, g as c, h as O, v, vt as a, y as r, yt as x, z as S } from "./vue.runtime.esm-bundler-CsdyQceJ.js";
2
+ var K = ["innerHTML"], Q = ["src", "alt"], U = ["src", "alt"], X = {
3
+ style: {
4
+ width: "30%",
5
+ height: "30%",
6
+ color: "#9ca3af"
7
+ },
8
+ fill: "currentColor",
9
+ viewBox: "0 0 20 20"
10
+ }, Y = ["src", "alt"], Z = ["src", "alt"], _ = ["innerHTML"], tt = { key: 8 }, et = { key: 0 }, nt = ["src", "alt"], it = {
11
+ key: 1,
12
+ style: {
13
+ "font-size": "7px",
14
+ color: "#9ca3af",
15
+ "font-style": "italic"
16
+ }
17
+ }, ot = {
18
+ key: 11,
19
+ class: "rounded truncate",
20
+ style: {
21
+ "font-size": "7px",
22
+ color: "#9ca3af",
23
+ background: "#f3f4f6",
24
+ padding: "1px 3px"
25
+ }
26
+ }, at = /* @__PURE__ */ q({
27
+ __name: "RowPreviewLegacyComponent",
28
+ props: {
29
+ comp: {},
30
+ scale: {}
31
+ },
32
+ setup(e) {
33
+ const y = e, l = O(() => y.comp.componentType ?? y.comp.type);
34
+ function u(t) {
35
+ return t ? t.replace(/<span[^>]*\bdata-merge="([^"]+)"(?:[^>]*\bdata-merge-default="([^"]*)")?[^>]*>.*?<\/span>/gs, (n, i, g) => {
36
+ const d = i.trim(), f = g?.trim();
37
+ return f ? `{{ ${d}|'${f}' }}` : `{{ ${d} }}`;
38
+ }) : "";
39
+ }
40
+ function s(t) {
41
+ const n = t?.backgroundGradient;
42
+ if (n?.useGradient === !0 && Array.isArray(n?.gradient?.colors) && n.gradient.colors.length >= 2) {
43
+ const { type: i, direction: g, colors: d } = n.gradient, f = d.map((p) => `${p.color} ${p.position}%`).join(", ");
44
+ return i === "radial" ? `radial-gradient(circle at center, ${f})` : `linear-gradient(${g}, ${f})`;
45
+ }
46
+ return t?.backgroundColor || "transparent";
47
+ }
48
+ function m(t) {
49
+ if (t && (t.includes(" ") || [
50
+ "Roboto",
51
+ "Open Sans",
52
+ "Lato",
53
+ "Montserrat",
54
+ "Poppins",
55
+ "Nunito",
56
+ "Raleway",
57
+ "Plus Jakarta Sans"
58
+ ].some((n) => t.includes(n))) && typeof document < "u") {
59
+ const n = `https://fonts.googleapis.com/css2?family=${t.replace(/ /g, "+")}:wght@300;400;500;600;700;800&display=swap`;
60
+ if (!document.querySelector(`link[href="${n}"]`)) {
61
+ const i = document.createElement("link");
62
+ i.href = n, i.rel = "stylesheet", document.head.appendChild(i);
63
+ }
64
+ }
65
+ }
66
+ function k(t) {
67
+ return t?.fontFamily && m(t.fontFamily), {
68
+ fontSize: Math.max(7, t?.fontSize || 24) + "px",
69
+ color: t?.color || "#111111",
70
+ fontWeight: t?.fontWeight || "bold",
71
+ fontFamily: t?.fontFamily || "Arial, sans-serif",
72
+ textAlign: t?.align || "left",
73
+ lineHeight: String(t?.lineHeight ?? 1.2),
74
+ letterSpacing: `${t?.letterSpacing ?? 0}px`,
75
+ textTransform: t?.textTransform || "none",
76
+ textDecoration: t?.textDecoration || "none",
77
+ background: s(t),
78
+ margin: `${t?.margin?.top ?? 0}px ${t?.margin?.right ?? 0}px ${t?.margin?.bottom ?? 4}px ${t?.margin?.left ?? 0}px`,
79
+ padding: `${t?.padding?.top ?? 0}px ${t?.padding?.right ?? 0}px ${t?.padding?.bottom ?? 0}px ${t?.padding?.left ?? 0}px`
80
+ };
81
+ }
82
+ function w(t) {
83
+ return t?.fontFamily && m(t.fontFamily), {
84
+ fontSize: Math.max(6, t?.fontSize || 16) + "px",
85
+ color: t?.color || "#111111",
86
+ fontFamily: t?.fontFamily || "Arial, sans-serif",
87
+ fontWeight: t?.fontWeight || "normal",
88
+ fontStyle: t?.fontStyle || "normal",
89
+ textAlign: t?.align || "left",
90
+ lineHeight: String(t?.lineHeight ?? 1.5),
91
+ letterSpacing: `${t?.letterSpacing ?? 0}px`,
92
+ textTransform: t?.textTransform || "none",
93
+ textDecoration: t?.textDecoration || "none",
94
+ background: s(t),
95
+ margin: `${t?.margin?.top ?? 0}px ${t?.margin?.right ?? 0}px ${t?.margin?.bottom ?? 4}px ${t?.margin?.left ?? 0}px`,
96
+ padding: `${t?.padding?.top ?? 0}px ${t?.padding?.right ?? 0}px ${t?.padding?.bottom ?? 0}px ${t?.padding?.left ?? 0}px`
97
+ };
98
+ }
99
+ function F(t) {
100
+ return {
101
+ margin: `${t?.margin?.top ?? 0}px ${t?.margin?.right ?? 0}px ${t?.margin?.bottom ?? 0}px ${t?.margin?.left ?? 0}px`,
102
+ padding: `${t?.padding?.top ?? 0}px ${t?.padding?.right ?? 0}px ${t?.padding?.bottom ?? 0}px ${t?.padding?.left ?? 0}px`,
103
+ textAlign: t?.align || "left"
104
+ };
105
+ }
106
+ function z(t) {
107
+ const n = t?.align || "left";
108
+ return {
109
+ width: (t?.width || 100) + "%",
110
+ height: t?.height || "auto",
111
+ borderRadius: (t?.borderRadius || 0) + "px",
112
+ border: `${t?.border?.width || 0}px ${t?.border?.style || "solid"} ${t?.border?.color || "#000000"}`,
113
+ display: "block",
114
+ margin: n === "center" ? "0 auto" : n === "right" ? "0 0 0 auto" : "0"
115
+ };
116
+ }
117
+ function A(t) {
118
+ return {
119
+ margin: `${t?.margin?.top ?? 0}px ${t?.margin?.right ?? 0}px ${t?.margin?.bottom ?? 0}px ${t?.margin?.left ?? 0}px`,
120
+ padding: `${t?.padding?.top ?? 0}px ${t?.padding?.right ?? 0}px ${t?.padding?.bottom ?? 0}px ${t?.padding?.left ?? 0}px`,
121
+ textAlign: t?.align || "left",
122
+ maxWidth: "100%"
123
+ };
124
+ }
125
+ function C(t) {
126
+ const n = t?.align || "left";
127
+ return {
128
+ width: "100%",
129
+ maxWidth: "100%",
130
+ paddingBottom: "56.25%",
131
+ height: "0",
132
+ position: "relative",
133
+ display: "inline-block",
134
+ borderRadius: (t?.borderRadius || 0) + "px",
135
+ border: `${t?.border?.width || 0}px ${t?.border?.style || "solid"} ${t?.border?.color || "#000000"}`,
136
+ overflow: "hidden",
137
+ marginLeft: n === "center" || n === "right" ? "auto" : "0",
138
+ marginRight: n === "center" ? "auto" : "0",
139
+ boxSizing: "border-box"
140
+ };
141
+ }
142
+ function H() {
143
+ return {
144
+ position: "absolute",
145
+ top: "0",
146
+ left: "0",
147
+ width: "100%",
148
+ height: "100%",
149
+ objectFit: "cover",
150
+ display: "block"
151
+ };
152
+ }
153
+ function T() {
154
+ return {
155
+ position: "absolute",
156
+ top: "0",
157
+ left: "0",
158
+ width: "100%",
159
+ height: "100%",
160
+ background: "#e5e7eb",
161
+ display: "flex",
162
+ alignItems: "center",
163
+ justifyContent: "center"
164
+ };
165
+ }
166
+ function L(t) {
167
+ return {
168
+ margin: `${t?.margin?.top ?? 0}px ${t?.margin?.right ?? 0}px ${t?.margin?.bottom ?? 4}px ${t?.margin?.left ?? 0}px`,
169
+ textAlign: t?.align || "center"
170
+ };
171
+ }
172
+ function M(t) {
173
+ t?.fontFamily && m(t.fontFamily);
174
+ const n = !!t?.icon;
175
+ return {
176
+ background: s(t),
177
+ color: t?.color || "#ffffff",
178
+ fontSize: Math.max(5, t?.fontSize || 16) + "px",
179
+ fontWeight: t?.fontWeight || "500",
180
+ fontFamily: t?.fontFamily || "Arial, sans-serif",
181
+ letterSpacing: `${t?.letterSpacing ?? 0}px`,
182
+ padding: `${t?.padding?.top ?? 8}px ${t?.padding?.right ?? 16}px ${t?.padding?.bottom ?? 8}px ${t?.padding?.left ?? 16}px`,
183
+ borderRadius: (t?.borderRadius || 4) + "px",
184
+ border: `${t?.border?.width || 0}px ${t?.border?.style || "solid"} ${t?.border?.color || "#000000"}`,
185
+ ...n ? {
186
+ display: "inline-flex",
187
+ alignItems: "center",
188
+ verticalAlign: "middle"
189
+ } : { display: "inline-block" },
190
+ lineHeight: "1.2",
191
+ textDecoration: "none"
192
+ };
193
+ }
194
+ function h(t) {
195
+ const n = Math.max(4, t?.iconSize ?? 20), i = t?.iconGap ?? 8, g = t?.iconPosition !== "after";
196
+ return {
197
+ display: "block",
198
+ width: n + "px",
199
+ height: n + "px",
200
+ flexShrink: "0",
201
+ marginRight: g ? i + "px" : "0",
202
+ marginLeft: g ? "0" : i + "px"
203
+ };
204
+ }
205
+ function $(t) {
206
+ const n = t.target;
207
+ n.style.display = "none";
208
+ }
209
+ function R(t) {
210
+ return {
211
+ margin: `${t?.margin?.top ?? 0}px ${t?.margin?.right ?? 0}px ${t?.margin?.bottom ?? 4}px ${t?.margin?.left ?? 0}px`,
212
+ padding: `${t?.padding?.top ?? 0}px ${t?.padding?.right ?? 0}px ${t?.padding?.bottom ?? 0}px ${t?.padding?.left ?? 0}px`,
213
+ textAlign: t?.align || "left"
214
+ };
215
+ }
216
+ function W(t) {
217
+ return t?.fontFamily && m(t.fontFamily), {
218
+ color: t?.color || "#007bff",
219
+ fontSize: Math.max(6, t?.fontSize || 16) + "px",
220
+ fontWeight: t?.fontWeight || "normal",
221
+ fontFamily: t?.fontFamily || "Arial, sans-serif",
222
+ letterSpacing: `${t?.letterSpacing ?? 0}px`,
223
+ textDecoration: t?.textDecoration || "underline"
224
+ };
225
+ }
226
+ function D(t) {
227
+ return t?.fontFamily && m(t.fontFamily), {
228
+ margin: `${t?.margin?.top ?? 0}px ${t?.margin?.right ?? 0}px ${t?.margin?.bottom ?? 0}px ${t?.margin?.left ?? 0}px`,
229
+ padding: `${t?.padding?.top ?? 0}px ${t?.padding?.right ?? 0}px ${t?.padding?.bottom ?? 0}px ${t?.padding?.left ?? 16}px`,
230
+ fontSize: Math.max(6, t?.fontSize || 16) + "px",
231
+ fontFamily: t?.fontFamily || "Arial, sans-serif",
232
+ lineHeight: String(t?.lineHeight ?? 1.5),
233
+ letterSpacing: `${t?.letterSpacing ?? 0}px`,
234
+ color: t?.color || "#111111",
235
+ background: s(t)
236
+ };
237
+ }
238
+ function I(t) {
239
+ return {
240
+ margin: `${t?.margin?.top ?? 0}px ${t?.margin?.right ?? 0}px ${t?.margin?.bottom ?? 0}px ${t?.margin?.left ?? 0}px`,
241
+ padding: `${t?.padding?.top ?? 0}px ${t?.padding?.right ?? 0}px ${t?.padding?.bottom ?? 0}px ${t?.padding?.left ?? 0}px`,
242
+ textAlign: t?.align || "left"
243
+ };
244
+ }
245
+ function P(t) {
246
+ const n = t?.align || "left";
247
+ return {
248
+ width: (t?.width || 100) + "%",
249
+ height: (t?.height || 1) + "px",
250
+ background: s(t),
251
+ border: "none",
252
+ margin: n === "center" ? "0 auto" : n === "right" ? "0 0 0 auto" : "0"
253
+ };
254
+ }
255
+ function B(t) {
256
+ return {
257
+ width: "100%",
258
+ height: (t?.height || 16) + "px",
259
+ background: s(t)
260
+ };
261
+ }
262
+ function j(t) {
263
+ return t?.fontFamily && m(t.fontFamily), {
264
+ margin: `${t?.margin?.top ?? 0}px ${t?.margin?.right ?? 0}px ${t?.margin?.bottom ?? 0}px ${t?.margin?.left ?? 0}px`,
265
+ padding: `${t?.padding?.top ?? 0}px ${t?.padding?.right ?? 0}px ${t?.padding?.bottom ?? 0}px ${t?.padding?.left ?? 0}px`,
266
+ textAlign: t?.align || "left",
267
+ lineHeight: "0",
268
+ background: s(t)
269
+ };
270
+ }
271
+ function E(t, n, i) {
272
+ t?.fontFamily && m(t.fontFamily);
273
+ const g = t?.mobileStack === !0, d = t?.spacing ?? 8, f = n === 0, p = n === i - 1;
274
+ return {
275
+ display: "inline-block",
276
+ marginLeft: f ? "0px" : `${d / 2}px`,
277
+ marginRight: p ? "0px" : `${d / 2}px`,
278
+ fontSize: Math.max(6, t?.fontSize ?? 14) + "px",
279
+ lineHeight: String(t?.lineHeight ?? 1.4),
280
+ letterSpacing: (t?.letterSpacing ?? 0) + "px",
281
+ color: t?.color || "#111111",
282
+ fontWeight: t?.fontWeight || "normal",
283
+ fontFamily: t?.fontFamily ? `'${t.fontFamily}', Arial, sans-serif` : "Arial, sans-serif",
284
+ fontStyle: t?.fontStyle || "normal",
285
+ textTransform: t?.textTransform || "none",
286
+ textDecoration: t?.textDecoration || "none",
287
+ whiteSpace: g ? "normal" : "nowrap",
288
+ cursor: "default"
289
+ };
290
+ }
291
+ function N(t) {
292
+ return {
293
+ margin: `${t?.margin?.top ?? 0}px ${t?.margin?.right ?? 0}px ${t?.margin?.bottom ?? 0}px ${t?.margin?.left ?? 0}px`,
294
+ padding: `${t?.padding?.top ?? 0}px ${t?.padding?.right ?? 0}px ${t?.padding?.bottom ?? 0}px ${t?.padding?.left ?? 0}px`,
295
+ textAlign: t?.align || "left",
296
+ display: "flex",
297
+ flexWrap: "wrap",
298
+ gap: (t?.spacing ?? 8) + "px",
299
+ justifyContent: t?.align === "center" ? "center" : t?.align === "right" ? "flex-end" : "flex-start"
300
+ };
301
+ }
302
+ return (t, n) => l.value === "heading" ? (o(), J(G(e.comp.props?.level || "h2"), {
303
+ key: 0,
304
+ style: a(k(e.comp.props)),
305
+ class: "truncate",
306
+ innerHTML: u(e.comp.props?.content) || "Heading"
307
+ }, null, 8, ["style", "innerHTML"])) : l.value === "paragraph" ? (o(), r("p", {
308
+ key: 1,
309
+ style: a([w(e.comp.props), {
310
+ display: "-webkit-box",
311
+ "-webkit-line-clamp": "2",
312
+ "-webkit-box-orient": "vertical"
313
+ }]),
314
+ class: "overflow-hidden",
315
+ innerHTML: u(e.comp.props?.content) || "Text"
316
+ }, null, 12, K)) : l.value === "image" ? (o(), r("div", {
317
+ key: 2,
318
+ style: a(F(e.comp.props))
319
+ }, [c("img", {
320
+ src: e.comp.props?.src,
321
+ alt: e.comp.props?.alt || "",
322
+ style: a(z(e.comp.props))
323
+ }, null, 12, Q)], 4)) : l.value === "video" ? (o(), r("div", {
324
+ key: 3,
325
+ style: a(A(e.comp.props))
326
+ }, [c("div", { style: a(C(e.comp.props)) }, [e.comp.props?.coverImage ? (o(), r("img", {
327
+ key: 0,
328
+ src: e.comp.props.coverImage,
329
+ alt: e.comp.props?.alt || "Video",
330
+ style: a(H())
331
+ }, null, 12, U)) : (o(), r("div", {
332
+ key: 1,
333
+ style: a(T())
334
+ }, [(o(), r("svg", X, [...n[0] || (n[0] = [c("path", {
335
+ "fill-rule": "evenodd",
336
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z",
337
+ "clip-rule": "evenodd"
338
+ }, null, -1)])]))], 4))], 4)], 4)) : l.value === "button" ? (o(), r("div", {
339
+ key: 4,
340
+ style: a(L(e.comp.props))
341
+ }, [c("span", {
342
+ style: a(M(e.comp.props)),
343
+ class: "inline-block truncate"
344
+ }, [
345
+ e.comp.props?.icon && e.comp.props?.iconPosition !== "after" ? (o(), r("img", {
346
+ key: 0,
347
+ src: e.comp.props.icon,
348
+ alt: e.comp.props?.iconAlt || "",
349
+ style: a(h(e.comp.props)),
350
+ onError: $
351
+ }, null, 44, Y)) : v("", !0),
352
+ V(" " + x(e.comp.props?.text || "Button") + " ", 1),
353
+ e.comp.props?.icon && e.comp.props?.iconPosition === "after" ? (o(), r("img", {
354
+ key: 1,
355
+ src: e.comp.props.icon,
356
+ alt: e.comp.props?.iconAlt || "",
357
+ style: a(h(e.comp.props)),
358
+ onError: $
359
+ }, null, 44, Z)) : v("", !0)
360
+ ], 4)], 4)) : l.value === "anchor" ? (o(), r("div", {
361
+ key: 5,
362
+ style: a(R(e.comp.props))
363
+ }, [c("span", {
364
+ style: a(W(e.comp.props)),
365
+ class: "truncate block"
366
+ }, x(e.comp.props?.text || "Link"), 5)], 4)) : l.value === "list" ? (o(), r("div", {
367
+ key: 6,
368
+ style: a(D(e.comp.props)),
369
+ innerHTML: u(e.comp.props?.content) || "<ul><li>Item</li></ul>"
370
+ }, null, 12, _)) : l.value === "divider" ? (o(), r("div", {
371
+ key: 7,
372
+ style: a(I(e.comp.props))
373
+ }, [c("hr", { style: a(P(e.comp.props)) }, null, 4)], 4)) : l.value === "spacer" ? (o(), r("div", tt, [c("div", { style: a(B(e.comp.props)) }, null, 4)])) : l.value === "menu" ? (o(), r("div", {
374
+ key: 9,
375
+ style: a(j(e.comp.props))
376
+ }, [e.comp.props?.items?.some((i) => i.enabled && i.label) ? (o(!0), r(b, { key: 1 }, S(e.comp.props.items.filter((i) => i.enabled && i.label), (i, g) => (o(), r("span", {
377
+ key: i._id || g,
378
+ style: a(E(e.comp.props, Number(g), e.comp.props.items.filter((d) => d.enabled && d.label).length))
379
+ }, x(i.label), 5))), 128)) : (o(), r("div", et, " Menu "))], 4)) : l.value === "socials" ? (o(), r("div", {
380
+ key: 10,
381
+ style: a(N(e.comp.props))
382
+ }, [e.comp.props?.platforms?.some((i) => i.enabled && i.link) ? (o(!0), r(b, { key: 0 }, S(e.comp.props.platforms.filter((i) => i.enabled && i.link), (i) => (o(), r("span", {
383
+ key: i.name,
384
+ style: {
385
+ display: "inline-flex",
386
+ alignItems: "center",
387
+ justifyContent: "center"
388
+ }
389
+ }, [c("img", {
390
+ src: i.icon,
391
+ alt: i.name,
392
+ style: a({
393
+ width: (e.comp.props?.iconSize || 24) + "px",
394
+ height: (e.comp.props?.iconSize || 24) + "px",
395
+ display: "block"
396
+ })
397
+ }, null, 12, nt)]))), 128)) : (o(), r("span", it, "Socials"))], 4)) : (o(), r("div", ot, x(l.value), 1));
398
+ }
399
+ }), lt = at;
400
+ export {
401
+ lt as default
402
+ };
@@ -0,0 +1,80 @@
1
+ import { Fragment as $, computed as w, createCommentVNode as p, createElementBlock as c, createVNode as k, defineAsyncComponent as v, defineComponent as y, normalizeStyle as b, openBlock as l, renderList as P, unref as S } from "vue";
2
+ var R = {
3
+ key: 0,
4
+ class: "w-full border border-dashed border-(--md-border) rounded",
5
+ style: { "min-height": "10px" }
6
+ }, C = /* @__PURE__ */ y({
7
+ __name: "RowPreviewRow",
8
+ props: {
9
+ row: {},
10
+ scale: {},
11
+ depth: {}
12
+ },
13
+ setup(n) {
14
+ const h = v(() => import("./index.js").then((e) => e.t)), m = n;
15
+ function g(e) {
16
+ const r = e?.backgroundGradient;
17
+ if (r?.useGradient === !0 && Array.isArray(r?.gradient?.colors) && r.gradient.colors.length >= 2) {
18
+ const { type: t, direction: a, colors: o } = r.gradient, s = o.map((d) => `${d.color} ${d.position}%`).join(", ");
19
+ return t === "radial" ? `radial-gradient(circle at center, ${s})` : `linear-gradient(${a}, ${s})`;
20
+ }
21
+ return e?.backgroundColor ?? "transparent";
22
+ }
23
+ const x = w(() => {
24
+ const e = m.row, r = {
25
+ display: "flex",
26
+ flexDirection: "row",
27
+ background: g(e),
28
+ padding: `${e.padding?.top ?? 0}px ${e.padding?.right ?? 0}px ${e.padding?.bottom ?? 0}px ${e.padding?.left ?? 0}px`,
29
+ alignItems: "stretch",
30
+ border: `${e.border?.width ?? 0}px ${e.border?.style ?? "solid"} ${e.border?.color ?? "transparent"}`,
31
+ borderRadius: `${e.border?.radius ?? 0}px`,
32
+ gap: `${e.gap ?? 0}px`,
33
+ overflow: "hidden"
34
+ };
35
+ return e.backgroundImage && (r.backgroundImage = `url(${e.backgroundImage})`, r.backgroundSize = e.backgroundSize ?? "cover", r.backgroundPosition = e.backgroundPosition ?? "center center"), r;
36
+ });
37
+ function f(e, r) {
38
+ const t = {
39
+ top: "flex-start",
40
+ middle: "center",
41
+ bottom: "flex-end"
42
+ }, a = e.width ?? 50, o = r?.columns?.length || 1, s = r?.gap ?? 0, d = o > 1 ? s * (o - 1) / o : 0, u = d > 0 ? `calc(${a}% - ${d}px)` : `${a}%`, i = {
43
+ flex: `0 0 ${u}`,
44
+ width: u,
45
+ maxWidth: u,
46
+ boxSizing: "border-box",
47
+ background: g(e),
48
+ padding: `${e.padding?.top ?? 10}px ${e.padding?.right ?? 10}px ${e.padding?.bottom ?? 10}px ${e.padding?.left ?? 10}px`,
49
+ border: `${e.border?.width ?? 0}px ${e.border?.style ?? "solid"} ${e.border?.color ?? "transparent"}`,
50
+ borderRadius: `${e.border?.radius ?? 0}px`,
51
+ overflow: "hidden",
52
+ minWidth: "0",
53
+ display: "flex",
54
+ flexDirection: "column",
55
+ justifyContent: t[e.verticalAlign] ?? "flex-start"
56
+ };
57
+ return e.backgroundImage && (i.backgroundImage = `url(${e.backgroundImage})`, i.backgroundSize = e.backgroundSize ?? "cover", i.backgroundPosition = e.backgroundPosition ?? "center center", i.minHeight = "14px"), i;
58
+ }
59
+ return (e, r) => (n.depth ?? 0) < 5 ? (l(), c("div", {
60
+ key: 0,
61
+ style: b(x.value),
62
+ class: "w-full"
63
+ }, [(l(!0), c($, null, P(n.row.columns ?? [], (t) => (l(), c("div", {
64
+ key: t.id,
65
+ style: b(f(t, n.row)),
66
+ class: "overflow-hidden shrink-0"
67
+ }, [k(S(h), {
68
+ children: t.children ?? t.components ?? [],
69
+ scale: n.scale,
70
+ depth: (n.depth ?? 0) + 1
71
+ }, null, 8, [
72
+ "children",
73
+ "scale",
74
+ "depth"
75
+ ]), (t.children ?? t.components ?? []).length === 0 ? (l(), c("div", R)) : p("", !0)], 4))), 128))], 4)) : p("", !0);
76
+ }
77
+ }), z = C;
78
+ export {
79
+ z as default
80
+ };
@@ -0,0 +1,80 @@
1
+ import { C as w, L as c, T as $, f as k, h as v, mt as y, v as p, vt as b, w as P, y as l, z as S } from "./vue.runtime.esm-bundler-CsdyQceJ.js";
2
+ var C = {
3
+ key: 0,
4
+ class: "w-full border border-dashed border-(--md-border) rounded",
5
+ style: { "min-height": "10px" }
6
+ }, R = /* @__PURE__ */ $({
7
+ __name: "RowPreviewRow",
8
+ props: {
9
+ row: {},
10
+ scale: {},
11
+ depth: {}
12
+ },
13
+ setup(n) {
14
+ const h = P(() => import("./element-Dq6bmt2l.js").then((e) => e.o)), m = n;
15
+ function g(e) {
16
+ const r = e?.backgroundGradient;
17
+ if (r?.useGradient === !0 && Array.isArray(r?.gradient?.colors) && r.gradient.colors.length >= 2) {
18
+ const { type: t, direction: i, colors: o } = r.gradient, s = o.map((d) => `${d.color} ${d.position}%`).join(", ");
19
+ return t === "radial" ? `radial-gradient(circle at center, ${s})` : `linear-gradient(${i}, ${s})`;
20
+ }
21
+ return e?.backgroundColor ?? "transparent";
22
+ }
23
+ const x = v(() => {
24
+ const e = m.row, r = {
25
+ display: "flex",
26
+ flexDirection: "row",
27
+ background: g(e),
28
+ padding: `${e.padding?.top ?? 0}px ${e.padding?.right ?? 0}px ${e.padding?.bottom ?? 0}px ${e.padding?.left ?? 0}px`,
29
+ alignItems: "stretch",
30
+ border: `${e.border?.width ?? 0}px ${e.border?.style ?? "solid"} ${e.border?.color ?? "transparent"}`,
31
+ borderRadius: `${e.border?.radius ?? 0}px`,
32
+ gap: `${e.gap ?? 0}px`,
33
+ overflow: "hidden"
34
+ };
35
+ return e.backgroundImage && (r.backgroundImage = `url(${e.backgroundImage})`, r.backgroundSize = e.backgroundSize ?? "cover", r.backgroundPosition = e.backgroundPosition ?? "center center"), r;
36
+ });
37
+ function f(e, r) {
38
+ const t = {
39
+ top: "flex-start",
40
+ middle: "center",
41
+ bottom: "flex-end"
42
+ }, i = e.width ?? 50, o = r?.columns?.length || 1, s = r?.gap ?? 0, d = o > 1 ? s * (o - 1) / o : 0, u = d > 0 ? `calc(${i}% - ${d}px)` : `${i}%`, a = {
43
+ flex: `0 0 ${u}`,
44
+ width: u,
45
+ maxWidth: u,
46
+ boxSizing: "border-box",
47
+ background: g(e),
48
+ padding: `${e.padding?.top ?? 10}px ${e.padding?.right ?? 10}px ${e.padding?.bottom ?? 10}px ${e.padding?.left ?? 10}px`,
49
+ border: `${e.border?.width ?? 0}px ${e.border?.style ?? "solid"} ${e.border?.color ?? "transparent"}`,
50
+ borderRadius: `${e.border?.radius ?? 0}px`,
51
+ overflow: "hidden",
52
+ minWidth: "0",
53
+ display: "flex",
54
+ flexDirection: "column",
55
+ justifyContent: t[e.verticalAlign] ?? "flex-start"
56
+ };
57
+ return e.backgroundImage && (a.backgroundImage = `url(${e.backgroundImage})`, a.backgroundSize = e.backgroundSize ?? "cover", a.backgroundPosition = e.backgroundPosition ?? "center center", a.minHeight = "14px"), a;
58
+ }
59
+ return (e, r) => (n.depth ?? 0) < 5 ? (c(), l("div", {
60
+ key: 0,
61
+ style: b(x.value),
62
+ class: "w-full"
63
+ }, [(c(!0), l(k, null, S(n.row.columns ?? [], (t) => (c(), l("div", {
64
+ key: t.id,
65
+ style: b(f(t, n.row)),
66
+ class: "overflow-hidden shrink-0"
67
+ }, [w(y(h), {
68
+ children: t.children ?? t.components ?? [],
69
+ scale: n.scale,
70
+ depth: (n.depth ?? 0) + 1
71
+ }, null, 8, [
72
+ "children",
73
+ "scale",
74
+ "depth"
75
+ ]), (t.children ?? t.components ?? []).length === 0 ? (c(), l("div", C)) : p("", !0)], 4))), 128))], 4)) : p("", !0);
76
+ }
77
+ }), I = R;
78
+ export {
79
+ I as default
80
+ };