@maildeno/editor 0.4.3 → 0.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.4
4
+
5
+ Packaging only. No API change, no behaviour change in the editor itself.
6
+ The published package drops from 8.13 MB unpacked to 5.48 MB, 32.6% smaller.
7
+
8
+ ### Changed
9
+
10
+ **React Email export formats with prettier's babel-ts parser** instead of
11
+ the typescript parser. `prettier/plugins/typescript` is 900kB of source
12
+ against babel's 318kB and was the largest single file in the package.
13
+ Output is byte-identical on the TSX this package generates, verified
14
+ across generics, JSX, inline style objects and mapped children. The
15
+ typescript parser is the stricter of the two, which matters for arbitrary
16
+ user code but not for TSX `react-email.ts` generated moments earlier.
17
+ Saves 600kB.
18
+
19
+ **Both build passes are minified.** They have to agree: the two passes
20
+ share chunks by content hash, so identical output collapses to one file
21
+ and differing output ships two. Minifying only the element pass made the
22
+ package *larger* — 8.68 MB — because every prettier chunk was then
23
+ carried twice, once minified and once not. Saves 1.92MB with both on.
24
+
25
+ **`element-scoped-styles.css` is no longer emitted.** Nothing referenced
26
+ it: not `src/`, not the framework guides, not the README, not the exports
27
+ map. The shadow root reads those rules from the substituted string inside
28
+ the chunk, and Vite only extracted the file because library mode always
29
+ does. `dist/editor.css` is unaffected and `./style.css` still resolves.
30
+ Saves 72kB.
31
+
3
32
  ## 0.4.3
4
33
 
5
34
  ### Fixed
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./index-Cud9IN-O.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { G as f } from "./element-DyFj9kgl.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,454 @@
1
+ import { n as rt, o as lt, q as g, A as ct, v as s, B as dt, t as m, C as u, y as P, D as gt, E as S, F as E, u as j } from "./element-DyFj9kgl.js";
2
+ const st = ["innerHTML"], mt = ["src", "alt"], ft = ["src", "alt"], xt = {
3
+ style: { width: "30%", height: "30%", color: "#9ca3af" },
4
+ fill: "currentColor",
5
+ viewBox: "0 0 20 20"
6
+ }, ut = ["src", "alt"], yt = ["src", "alt"], ht = ["innerHTML"], $t = { key: 8 }, bt = { key: 0 }, St = ["src", "alt"], kt = {
7
+ key: 1,
8
+ style: { "font-size": "7px", color: "#9ca3af", "font-style": "italic" }
9
+ }, vt = {
10
+ key: 11,
11
+ class: "rounded truncate",
12
+ style: { "font-size": "7px", color: "#9ca3af", background: "#f3f4f6", padding: "1px 3px" }
13
+ }, Ft = /* @__PURE__ */ rt({
14
+ __name: "RowPreviewLegacyComponent",
15
+ props: {
16
+ comp: {},
17
+ scale: {}
18
+ },
19
+ setup(a) {
20
+ const v = a, x = lt(() => v.comp.componentType ?? v.comp.type);
21
+ function k(t) {
22
+ return t ? t.replace(
23
+ /<span[^>]*\bdata-merge="([^"]+)"(?:[^>]*\bdata-merge-default="([^"]*)")?[^>]*>.*?<\/span>/gs,
24
+ (n, o, e) => {
25
+ const i = o.trim(), r = e == null ? void 0 : e.trim();
26
+ return r ? `{{ ${i}|'${r}' }}` : `{{ ${i} }}`;
27
+ }
28
+ ) : "";
29
+ }
30
+ function y(t) {
31
+ var e;
32
+ const n = t == null ? void 0 : t.backgroundGradient;
33
+ if ((n == null ? void 0 : n.useGradient) === !0 && Array.isArray((e = n == null ? void 0 : n.gradient) == null ? void 0 : e.colors) && n.gradient.colors.length >= 2) {
34
+ const { type: i, direction: r, colors: l } = n.gradient, c = l.map((d) => `${d.color} ${d.position}%`).join(", ");
35
+ return i === "radial" ? `radial-gradient(circle at center, ${c})` : `linear-gradient(${r}, ${c})`;
36
+ }
37
+ return (t == null ? void 0 : t.backgroundColor) || "transparent";
38
+ }
39
+ function h(t) {
40
+ if (!t) return;
41
+ const n = [
42
+ "Roboto",
43
+ "Open Sans",
44
+ "Lato",
45
+ "Montserrat",
46
+ "Poppins",
47
+ "Nunito",
48
+ "Raleway",
49
+ "Plus Jakarta Sans"
50
+ ];
51
+ if ((t.includes(" ") || n.some((e) => t.includes(e))) && typeof document < "u") {
52
+ const i = `https://fonts.googleapis.com/css2?family=${t.replace(/ /g, "+")}:wght@300;400;500;600;700;800&display=swap`;
53
+ if (!document.querySelector(`link[href="${i}"]`)) {
54
+ const r = document.createElement("link");
55
+ r.href = i, r.rel = "stylesheet", document.head.appendChild(r);
56
+ }
57
+ }
58
+ }
59
+ function N(t) {
60
+ var n, o, e, i, r, l, c, d;
61
+ return t != null && t.fontFamily && h(t.fontFamily), {
62
+ fontSize: Math.max(7, (t == null ? void 0 : t.fontSize) || 24) + "px",
63
+ color: (t == null ? void 0 : t.color) || "#111111",
64
+ fontWeight: (t == null ? void 0 : t.fontWeight) || "bold",
65
+ fontFamily: (t == null ? void 0 : t.fontFamily) || "Arial, sans-serif",
66
+ textAlign: (t == null ? void 0 : t.align) || "left",
67
+ lineHeight: String((t == null ? void 0 : t.lineHeight) ?? 1.2),
68
+ letterSpacing: `${(t == null ? void 0 : t.letterSpacing) ?? 0}px`,
69
+ textTransform: (t == null ? void 0 : t.textTransform) || "none",
70
+ textDecoration: (t == null ? void 0 : t.textDecoration) || "none",
71
+ background: y(t),
72
+ margin: `${((n = t == null ? void 0 : t.margin) == null ? void 0 : n.top) ?? 0}px ${((o = t == null ? void 0 : t.margin) == null ? void 0 : o.right) ?? 0}px ${((e = t == null ? void 0 : t.margin) == null ? void 0 : e.bottom) ?? 4}px ${((i = t == null ? void 0 : t.margin) == null ? void 0 : i.left) ?? 0}px`,
73
+ padding: `${((r = t == null ? void 0 : t.padding) == null ? void 0 : r.top) ?? 0}px ${((l = t == null ? void 0 : t.padding) == null ? void 0 : l.right) ?? 0}px ${((c = t == null ? void 0 : t.padding) == null ? void 0 : c.bottom) ?? 0}px ${((d = t == null ? void 0 : t.padding) == null ? void 0 : d.left) ?? 0}px`
74
+ };
75
+ }
76
+ function V(t) {
77
+ var n, o, e, i, r, l, c, d;
78
+ return t != null && t.fontFamily && h(t.fontFamily), {
79
+ fontSize: Math.max(6, (t == null ? void 0 : t.fontSize) || 16) + "px",
80
+ color: (t == null ? void 0 : t.color) || "#111111",
81
+ fontFamily: (t == null ? void 0 : t.fontFamily) || "Arial, sans-serif",
82
+ fontWeight: (t == null ? void 0 : t.fontWeight) || "normal",
83
+ fontStyle: (t == null ? void 0 : t.fontStyle) || "normal",
84
+ textAlign: (t == null ? void 0 : t.align) || "left",
85
+ lineHeight: String((t == null ? void 0 : t.lineHeight) ?? 1.5),
86
+ letterSpacing: `${(t == null ? void 0 : t.letterSpacing) ?? 0}px`,
87
+ textTransform: (t == null ? void 0 : t.textTransform) || "none",
88
+ textDecoration: (t == null ? void 0 : t.textDecoration) || "none",
89
+ background: y(t),
90
+ margin: `${((n = t == null ? void 0 : t.margin) == null ? void 0 : n.top) ?? 0}px ${((o = t == null ? void 0 : t.margin) == null ? void 0 : o.right) ?? 0}px ${((e = t == null ? void 0 : t.margin) == null ? void 0 : e.bottom) ?? 4}px ${((i = t == null ? void 0 : t.margin) == null ? void 0 : i.left) ?? 0}px`,
91
+ padding: `${((r = t == null ? void 0 : t.padding) == null ? void 0 : r.top) ?? 0}px ${((l = t == null ? void 0 : t.padding) == null ? void 0 : l.right) ?? 0}px ${((c = t == null ? void 0 : t.padding) == null ? void 0 : c.bottom) ?? 0}px ${((d = t == null ? void 0 : t.padding) == null ? void 0 : d.left) ?? 0}px`
92
+ };
93
+ }
94
+ function q(t) {
95
+ var n, o, e, i, r, l, c, d;
96
+ return {
97
+ margin: `${((n = t == null ? void 0 : t.margin) == null ? void 0 : n.top) ?? 0}px ${((o = t == null ? void 0 : t.margin) == null ? void 0 : o.right) ?? 0}px ${((e = t == null ? void 0 : t.margin) == null ? void 0 : e.bottom) ?? 0}px ${((i = t == null ? void 0 : t.margin) == null ? void 0 : i.left) ?? 0}px`,
98
+ padding: `${((r = t == null ? void 0 : t.padding) == null ? void 0 : r.top) ?? 0}px ${((l = t == null ? void 0 : t.padding) == null ? void 0 : l.right) ?? 0}px ${((c = t == null ? void 0 : t.padding) == null ? void 0 : c.bottom) ?? 0}px ${((d = t == null ? void 0 : t.padding) == null ? void 0 : d.left) ?? 0}px`,
99
+ textAlign: (t == null ? void 0 : t.align) || "left"
100
+ };
101
+ }
102
+ function J(t) {
103
+ var o, e, i;
104
+ const n = (t == null ? void 0 : t.align) || "left";
105
+ return {
106
+ width: ((t == null ? void 0 : t.width) || 100) + "%",
107
+ height: (t == null ? void 0 : t.height) || "auto",
108
+ borderRadius: ((t == null ? void 0 : t.borderRadius) || 0) + "px",
109
+ border: `${((o = t == null ? void 0 : t.border) == null ? void 0 : o.width) || 0}px ${((e = t == null ? void 0 : t.border) == null ? void 0 : e.style) || "solid"} ${((i = t == null ? void 0 : t.border) == null ? void 0 : i.color) || "#000000"}`,
110
+ display: "block",
111
+ margin: n === "center" ? "0 auto" : n === "right" ? "0 0 0 auto" : "0"
112
+ };
113
+ }
114
+ function O(t) {
115
+ var n, o, e, i, r, l, c, d;
116
+ return {
117
+ margin: `${((n = t == null ? void 0 : t.margin) == null ? void 0 : n.top) ?? 0}px ${((o = t == null ? void 0 : t.margin) == null ? void 0 : o.right) ?? 0}px ${((e = t == null ? void 0 : t.margin) == null ? void 0 : e.bottom) ?? 0}px ${((i = t == null ? void 0 : t.margin) == null ? void 0 : i.left) ?? 0}px`,
118
+ padding: `${((r = t == null ? void 0 : t.padding) == null ? void 0 : r.top) ?? 0}px ${((l = t == null ? void 0 : t.padding) == null ? void 0 : l.right) ?? 0}px ${((c = t == null ? void 0 : t.padding) == null ? void 0 : c.bottom) ?? 0}px ${((d = t == null ? void 0 : t.padding) == null ? void 0 : d.left) ?? 0}px`,
119
+ textAlign: (t == null ? void 0 : t.align) || "left",
120
+ maxWidth: "100%"
121
+ };
122
+ }
123
+ function K(t) {
124
+ var o, e, i;
125
+ const n = (t == null ? void 0 : t.align) || "left";
126
+ return {
127
+ width: "100%",
128
+ maxWidth: "100%",
129
+ paddingBottom: "56.25%",
130
+ height: "0",
131
+ position: "relative",
132
+ display: "inline-block",
133
+ borderRadius: ((t == null ? void 0 : t.borderRadius) || 0) + "px",
134
+ border: `${((o = t == null ? void 0 : t.border) == null ? void 0 : o.width) || 0}px ${((e = t == null ? void 0 : t.border) == null ? void 0 : e.style) || "solid"} ${((i = t == null ? void 0 : t.border) == null ? void 0 : i.color) || "#000000"}`,
135
+ overflow: "hidden",
136
+ marginLeft: n === "center" || n === "right" ? "auto" : "0",
137
+ marginRight: n === "center" ? "auto" : "0",
138
+ boxSizing: "border-box"
139
+ };
140
+ }
141
+ function Q() {
142
+ return {
143
+ position: "absolute",
144
+ top: "0",
145
+ left: "0",
146
+ width: "100%",
147
+ height: "100%",
148
+ objectFit: "cover",
149
+ display: "block"
150
+ };
151
+ }
152
+ function U() {
153
+ return {
154
+ position: "absolute",
155
+ top: "0",
156
+ left: "0",
157
+ width: "100%",
158
+ height: "100%",
159
+ background: "#e5e7eb",
160
+ display: "flex",
161
+ alignItems: "center",
162
+ justifyContent: "center"
163
+ };
164
+ }
165
+ function X(t) {
166
+ var n, o, e, i;
167
+ return {
168
+ margin: `${((n = t == null ? void 0 : t.margin) == null ? void 0 : n.top) ?? 0}px ${((o = t == null ? void 0 : t.margin) == null ? void 0 : o.right) ?? 0}px ${((e = t == null ? void 0 : t.margin) == null ? void 0 : e.bottom) ?? 4}px ${((i = t == null ? void 0 : t.margin) == null ? void 0 : i.left) ?? 0}px`,
169
+ textAlign: (t == null ? void 0 : t.align) || "center"
170
+ };
171
+ }
172
+ function Y(t) {
173
+ var o, e, i, r, l, c, d;
174
+ t != null && t.fontFamily && h(t.fontFamily);
175
+ const n = !!(t != null && t.icon);
176
+ return {
177
+ background: y(t),
178
+ color: (t == null ? void 0 : t.color) || "#ffffff",
179
+ fontSize: Math.max(5, (t == null ? void 0 : t.fontSize) || 16) + "px",
180
+ fontWeight: (t == null ? void 0 : t.fontWeight) || "500",
181
+ fontFamily: (t == null ? void 0 : t.fontFamily) || "Arial, sans-serif",
182
+ letterSpacing: `${(t == null ? void 0 : t.letterSpacing) ?? 0}px`,
183
+ padding: `${((o = t == null ? void 0 : t.padding) == null ? void 0 : o.top) ?? 8}px ${((e = t == null ? void 0 : t.padding) == null ? void 0 : e.right) ?? 16}px ${((i = t == null ? void 0 : t.padding) == null ? void 0 : i.bottom) ?? 8}px ${((r = t == null ? void 0 : t.padding) == null ? void 0 : r.left) ?? 16}px`,
184
+ borderRadius: ((t == null ? void 0 : t.borderRadius) || 4) + "px",
185
+ border: `${((l = t == null ? void 0 : t.border) == null ? void 0 : l.width) || 0}px ${((c = t == null ? void 0 : t.border) == null ? void 0 : c.style) || "solid"} ${((d = t == null ? void 0 : t.border) == null ? void 0 : d.color) || "#000000"}`,
186
+ // Icon branch uses inline-flex so icon + text align cleanly on one row.
187
+ // Plain branch stays inline-block (unchanged behaviour).
188
+ ...n ? {
189
+ display: "inline-flex",
190
+ alignItems: "center",
191
+ verticalAlign: "middle"
192
+ } : { display: "inline-block" },
193
+ lineHeight: "1.2",
194
+ textDecoration: "none"
195
+ };
196
+ }
197
+ function w(t) {
198
+ const n = Math.max(4, (t == null ? void 0 : t.iconSize) ?? 20), o = (t == null ? void 0 : t.iconGap) ?? 8, e = (t == null ? void 0 : t.iconPosition) !== "after";
199
+ return {
200
+ display: "block",
201
+ width: n + "px",
202
+ height: n + "px",
203
+ flexShrink: "0",
204
+ marginRight: e ? o + "px" : "0",
205
+ marginLeft: e ? "0" : o + "px"
206
+ };
207
+ }
208
+ function F(t) {
209
+ const n = t.target;
210
+ n.style.display = "none";
211
+ }
212
+ function Z(t) {
213
+ var n, o, e, i, r, l, c, d;
214
+ return {
215
+ margin: `${((n = t == null ? void 0 : t.margin) == null ? void 0 : n.top) ?? 0}px ${((o = t == null ? void 0 : t.margin) == null ? void 0 : o.right) ?? 0}px ${((e = t == null ? void 0 : t.margin) == null ? void 0 : e.bottom) ?? 4}px ${((i = t == null ? void 0 : t.margin) == null ? void 0 : i.left) ?? 0}px`,
216
+ padding: `${((r = t == null ? void 0 : t.padding) == null ? void 0 : r.top) ?? 0}px ${((l = t == null ? void 0 : t.padding) == null ? void 0 : l.right) ?? 0}px ${((c = t == null ? void 0 : t.padding) == null ? void 0 : c.bottom) ?? 0}px ${((d = t == null ? void 0 : t.padding) == null ? void 0 : d.left) ?? 0}px`,
217
+ textAlign: (t == null ? void 0 : t.align) || "left"
218
+ };
219
+ }
220
+ function _(t) {
221
+ return t != null && t.fontFamily && h(t.fontFamily), {
222
+ color: (t == null ? void 0 : t.color) || "#007bff",
223
+ fontSize: Math.max(6, (t == null ? void 0 : t.fontSize) || 16) + "px",
224
+ fontWeight: (t == null ? void 0 : t.fontWeight) || "normal",
225
+ fontFamily: (t == null ? void 0 : t.fontFamily) || "Arial, sans-serif",
226
+ letterSpacing: `${(t == null ? void 0 : t.letterSpacing) ?? 0}px`,
227
+ textDecoration: (t == null ? void 0 : t.textDecoration) || "underline"
228
+ };
229
+ }
230
+ function p(t) {
231
+ var n, o, e, i, r, l, c, d;
232
+ return t != null && t.fontFamily && h(t.fontFamily), {
233
+ margin: `${((n = t == null ? void 0 : t.margin) == null ? void 0 : n.top) ?? 0}px ${((o = t == null ? void 0 : t.margin) == null ? void 0 : o.right) ?? 0}px ${((e = t == null ? void 0 : t.margin) == null ? void 0 : e.bottom) ?? 0}px ${((i = t == null ? void 0 : t.margin) == null ? void 0 : i.left) ?? 0}px`,
234
+ padding: `${((r = t == null ? void 0 : t.padding) == null ? void 0 : r.top) ?? 0}px ${((l = t == null ? void 0 : t.padding) == null ? void 0 : l.right) ?? 0}px ${((c = t == null ? void 0 : t.padding) == null ? void 0 : c.bottom) ?? 0}px ${((d = t == null ? void 0 : t.padding) == null ? void 0 : d.left) ?? 16}px`,
235
+ fontSize: Math.max(6, (t == null ? void 0 : t.fontSize) || 16) + "px",
236
+ fontFamily: (t == null ? void 0 : t.fontFamily) || "Arial, sans-serif",
237
+ lineHeight: String((t == null ? void 0 : t.lineHeight) ?? 1.5),
238
+ letterSpacing: `${(t == null ? void 0 : t.letterSpacing) ?? 0}px`,
239
+ color: (t == null ? void 0 : t.color) || "#111111",
240
+ background: y(t)
241
+ };
242
+ }
243
+ function tt(t) {
244
+ var n, o, e, i, r, l, c, d;
245
+ return {
246
+ margin: `${((n = t == null ? void 0 : t.margin) == null ? void 0 : n.top) ?? 0}px ${((o = t == null ? void 0 : t.margin) == null ? void 0 : o.right) ?? 0}px ${((e = t == null ? void 0 : t.margin) == null ? void 0 : e.bottom) ?? 0}px ${((i = t == null ? void 0 : t.margin) == null ? void 0 : i.left) ?? 0}px`,
247
+ padding: `${((r = t == null ? void 0 : t.padding) == null ? void 0 : r.top) ?? 0}px ${((l = t == null ? void 0 : t.padding) == null ? void 0 : l.right) ?? 0}px ${((c = t == null ? void 0 : t.padding) == null ? void 0 : c.bottom) ?? 0}px ${((d = t == null ? void 0 : t.padding) == null ? void 0 : d.left) ?? 0}px`,
248
+ textAlign: (t == null ? void 0 : t.align) || "left"
249
+ };
250
+ }
251
+ function nt(t) {
252
+ const n = (t == null ? void 0 : t.align) || "left";
253
+ return {
254
+ width: ((t == null ? void 0 : t.width) || 100) + "%",
255
+ height: ((t == null ? void 0 : t.height) || 1) + "px",
256
+ background: y(t),
257
+ border: "none",
258
+ margin: n === "center" ? "0 auto" : n === "right" ? "0 0 0 auto" : "0"
259
+ };
260
+ }
261
+ function et(t) {
262
+ return {
263
+ width: "100%",
264
+ height: ((t == null ? void 0 : t.height) || 16) + "px",
265
+ background: y(t)
266
+ };
267
+ }
268
+ function it(t) {
269
+ var n, o, e, i, r, l, c, d;
270
+ return t != null && t.fontFamily && h(t.fontFamily), {
271
+ margin: `${((n = t == null ? void 0 : t.margin) == null ? void 0 : n.top) ?? 0}px ${((o = t == null ? void 0 : t.margin) == null ? void 0 : o.right) ?? 0}px ${((e = t == null ? void 0 : t.margin) == null ? void 0 : e.bottom) ?? 0}px ${((i = t == null ? void 0 : t.margin) == null ? void 0 : i.left) ?? 0}px`,
272
+ padding: `${((r = t == null ? void 0 : t.padding) == null ? void 0 : r.top) ?? 0}px ${((l = t == null ? void 0 : t.padding) == null ? void 0 : l.right) ?? 0}px ${((c = t == null ? void 0 : t.padding) == null ? void 0 : c.bottom) ?? 0}px ${((d = t == null ? void 0 : t.padding) == null ? void 0 : d.left) ?? 0}px`,
273
+ textAlign: (t == null ? void 0 : t.align) || "left",
274
+ lineHeight: "0",
275
+ background: y(t)
276
+ };
277
+ }
278
+ function ot(t, n, o) {
279
+ t != null && t.fontFamily && h(t.fontFamily);
280
+ const e = (t == null ? void 0 : t.mobileStack) === !0, i = (t == null ? void 0 : t.spacing) ?? 8, r = n === 0, l = n === o - 1;
281
+ return {
282
+ // display is always block, used for showcase
283
+ display: "inline-block",
284
+ marginLeft: r ? "0px" : `${i / 2}px`,
285
+ marginRight: l ? "0px" : `${i / 2}px`,
286
+ // marginBottom: isStacked && !isLast ? `${spacing}px` : "0",
287
+ fontSize: Math.max(6, (t == null ? void 0 : t.fontSize) ?? 14) + "px",
288
+ lineHeight: String((t == null ? void 0 : t.lineHeight) ?? 1.4),
289
+ letterSpacing: ((t == null ? void 0 : t.letterSpacing) ?? 0) + "px",
290
+ color: (t == null ? void 0 : t.color) || "#111111",
291
+ fontWeight: (t == null ? void 0 : t.fontWeight) || "normal",
292
+ fontFamily: t != null && t.fontFamily ? `'${t.fontFamily}', Arial, sans-serif` : "Arial, sans-serif",
293
+ fontStyle: (t == null ? void 0 : t.fontStyle) || "normal",
294
+ textTransform: (t == null ? void 0 : t.textTransform) || "none",
295
+ textDecoration: (t == null ? void 0 : t.textDecoration) || "none",
296
+ whiteSpace: e ? "normal" : "nowrap",
297
+ cursor: "default"
298
+ };
299
+ }
300
+ function at(t) {
301
+ var n, o, e, i, r, l, c, d;
302
+ return {
303
+ margin: `${((n = t == null ? void 0 : t.margin) == null ? void 0 : n.top) ?? 0}px ${((o = t == null ? void 0 : t.margin) == null ? void 0 : o.right) ?? 0}px ${((e = t == null ? void 0 : t.margin) == null ? void 0 : e.bottom) ?? 0}px ${((i = t == null ? void 0 : t.margin) == null ? void 0 : i.left) ?? 0}px`,
304
+ padding: `${((r = t == null ? void 0 : t.padding) == null ? void 0 : r.top) ?? 0}px ${((l = t == null ? void 0 : t.padding) == null ? void 0 : l.right) ?? 0}px ${((c = t == null ? void 0 : t.padding) == null ? void 0 : c.bottom) ?? 0}px ${((d = t == null ? void 0 : t.padding) == null ? void 0 : d.left) ?? 0}px`,
305
+ textAlign: (t == null ? void 0 : t.align) || "left",
306
+ display: "flex",
307
+ flexWrap: "wrap",
308
+ gap: ((t == null ? void 0 : t.spacing) ?? 8) + "px",
309
+ justifyContent: (t == null ? void 0 : t.align) === "center" ? "center" : (t == null ? void 0 : t.align) === "right" ? "flex-end" : "flex-start"
310
+ };
311
+ }
312
+ return (t, n) => {
313
+ var o, e, i, r, l, c, d, A, z, C, H, M, T, L, W, D, R, I, B, G;
314
+ return x.value === "heading" ? (g(), ct(dt(((o = a.comp.props) == null ? void 0 : o.level) || "h2"), {
315
+ key: 0,
316
+ style: s(N(a.comp.props)),
317
+ class: "truncate",
318
+ innerHTML: k((e = a.comp.props) == null ? void 0 : e.content) || "Heading"
319
+ }, null, 8, ["style", "innerHTML"])) : x.value === "paragraph" ? (g(), m("p", {
320
+ key: 1,
321
+ style: s([V(a.comp.props), { display: "-webkit-box", "-webkit-line-clamp": "2", "-webkit-box-orient": "vertical" }]),
322
+ class: "overflow-hidden",
323
+ innerHTML: k((i = a.comp.props) == null ? void 0 : i.content) || "Text"
324
+ }, null, 12, st)) : x.value === "image" ? (g(), m("div", {
325
+ key: 2,
326
+ style: s(q(a.comp.props))
327
+ }, [
328
+ u("img", {
329
+ src: (r = a.comp.props) == null ? void 0 : r.src,
330
+ alt: ((l = a.comp.props) == null ? void 0 : l.alt) || "",
331
+ style: s(J(a.comp.props))
332
+ }, null, 12, mt)
333
+ ], 4)) : x.value === "video" ? (g(), m("div", {
334
+ key: 3,
335
+ style: s(O(a.comp.props))
336
+ }, [
337
+ u("div", {
338
+ style: s(K(a.comp.props))
339
+ }, [
340
+ (c = a.comp.props) != null && c.coverImage ? (g(), m("img", {
341
+ key: 0,
342
+ src: a.comp.props.coverImage,
343
+ alt: ((d = a.comp.props) == null ? void 0 : d.alt) || "Video",
344
+ style: s(Q())
345
+ }, null, 12, ft)) : (g(), m("div", {
346
+ key: 1,
347
+ style: s(U())
348
+ }, [
349
+ (g(), m("svg", xt, [...n[0] || (n[0] = [
350
+ u("path", {
351
+ "fill-rule": "evenodd",
352
+ 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",
353
+ "clip-rule": "evenodd"
354
+ }, null, -1)
355
+ ])]))
356
+ ], 4))
357
+ ], 4)
358
+ ], 4)) : x.value === "button" ? (g(), m("div", {
359
+ key: 4,
360
+ style: s(X(a.comp.props))
361
+ }, [
362
+ u("span", {
363
+ style: s(Y(a.comp.props)),
364
+ class: "inline-block truncate"
365
+ }, [
366
+ (A = a.comp.props) != null && A.icon && ((z = a.comp.props) == null ? void 0 : z.iconPosition) !== "after" ? (g(), m("img", {
367
+ key: 0,
368
+ src: a.comp.props.icon,
369
+ alt: ((C = a.comp.props) == null ? void 0 : C.iconAlt) || "",
370
+ style: s(w(a.comp.props)),
371
+ onError: F
372
+ }, null, 44, ut)) : P("", !0),
373
+ gt(" " + S(((H = a.comp.props) == null ? void 0 : H.text) || "Button") + " ", 1),
374
+ (M = a.comp.props) != null && M.icon && ((T = a.comp.props) == null ? void 0 : T.iconPosition) === "after" ? (g(), m("img", {
375
+ key: 1,
376
+ src: a.comp.props.icon,
377
+ alt: ((L = a.comp.props) == null ? void 0 : L.iconAlt) || "",
378
+ style: s(w(a.comp.props)),
379
+ onError: F
380
+ }, null, 44, yt)) : P("", !0)
381
+ ], 4)
382
+ ], 4)) : x.value === "anchor" ? (g(), m("div", {
383
+ key: 5,
384
+ style: s(Z(a.comp.props))
385
+ }, [
386
+ u("span", {
387
+ style: s(_(a.comp.props)),
388
+ class: "truncate block"
389
+ }, S(((W = a.comp.props) == null ? void 0 : W.text) || "Link"), 5)
390
+ ], 4)) : x.value === "list" ? (g(), m("div", {
391
+ key: 6,
392
+ style: s(p(a.comp.props)),
393
+ innerHTML: k((D = a.comp.props) == null ? void 0 : D.content) || "<ul><li>Item</li></ul>"
394
+ }, null, 12, ht)) : x.value === "divider" ? (g(), m("div", {
395
+ key: 7,
396
+ style: s(tt(a.comp.props))
397
+ }, [
398
+ u("hr", {
399
+ style: s(nt(a.comp.props))
400
+ }, null, 4)
401
+ ], 4)) : x.value === "spacer" ? (g(), m("div", $t, [
402
+ u("div", {
403
+ style: s(et(a.comp.props))
404
+ }, null, 4)
405
+ ])) : x.value === "menu" ? (g(), m("div", {
406
+ key: 9,
407
+ style: s(it(a.comp.props))
408
+ }, [
409
+ (I = (R = a.comp.props) == null ? void 0 : R.items) != null && I.some((f) => f.enabled && f.label) ? (g(!0), m(E, { key: 1 }, j(a.comp.props.items.filter(
410
+ (f) => f.enabled && f.label
411
+ ), (f, $) => (g(), m("span", {
412
+ key: f._id || $,
413
+ style: s(
414
+ ot(
415
+ a.comp.props,
416
+ Number($),
417
+ a.comp.props.items.filter((b) => b.enabled && b.label).length
418
+ )
419
+ )
420
+ }, S(f.label), 5))), 128)) : (g(), m("div", bt, " Menu "))
421
+ ], 4)) : x.value === "socials" ? (g(), m("div", {
422
+ key: 10,
423
+ style: s(at(a.comp.props))
424
+ }, [
425
+ (G = (B = a.comp.props) == null ? void 0 : B.platforms) != null && G.some((f) => f.enabled && f.link) ? (g(!0), m(E, { key: 0 }, j(a.comp.props.platforms.filter(
426
+ (f) => f.enabled && f.link
427
+ ), (f) => {
428
+ var $, b;
429
+ return g(), m("span", {
430
+ key: f.name,
431
+ style: {
432
+ display: "inline-flex",
433
+ alignItems: "center",
434
+ justifyContent: "center"
435
+ }
436
+ }, [
437
+ u("img", {
438
+ src: f.icon,
439
+ alt: f.name,
440
+ style: s({
441
+ width: ((($ = a.comp.props) == null ? void 0 : $.iconSize) || 24) + "px",
442
+ height: (((b = a.comp.props) == null ? void 0 : b.iconSize) || 24) + "px",
443
+ display: "block"
444
+ })
445
+ }, null, 12, St)
446
+ ]);
447
+ }), 128)) : (g(), m("span", kt, "Socials"))
448
+ ], 4)) : (g(), m("div", vt, S(x.value), 1));
449
+ };
450
+ }
451
+ });
452
+ export {
453
+ Ft as default
454
+ };