@maildeno/editor 0.4.2 → 0.4.3

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,51 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.3
4
+
5
+ ### Fixed
6
+
7
+ **Every component `<style scoped>` block was missing when installing from
8
+ npm and using the `EmailEditor` Vue component.** The editor rendered
9
+ unstyled panels — `HealthIndicator`, `DesktopOnlyNotice`, the text panel,
10
+ and 29 other scoped blocks — while Tailwind, the fonts and the icons all
11
+ applied normally. `init()` and the custom element were unaffected, and
12
+ building against a local `dist/` folder never reproduced it.
13
+
14
+ 0.4.2 delivered those styles by prepending a self-executing snippet to the
15
+ entry chunk:
16
+
17
+ ```js
18
+ (function(){ /* … document.head.appendChild(style) … */ })();
19
+ import { a, c, g, … } from "./index-DhFg3uKs.js";
20
+ export { a as EmailEditor, … };
21
+ ```
22
+
23
+ `package.json` declares `sideEffects` as covering CSS files only, which
24
+ tells a consumer's bundler that every `.js` in the package is pure. Rollup
25
+ had emitted `dist/index.js` as a thin facade holding nothing but that
26
+ snippet and a set of re-exports — and a pure module whose exports can be
27
+ reached directly is one a bundler may delete outright. So consumer builds
28
+ dropped the file, the snippet went with it, and the CSS never ran.
29
+ Verified against the published 0.4.2 tarball: zero of 32 scoped selectors
30
+ survived a consumer build.
31
+
32
+ Whether Rollup emits that facade is a chunking decision, which is why the
33
+ same source built correctly in this repo and shipped broken. The styles
34
+ are now substituted into a value `baseStyles.ts` returns, so
35
+ `EmailEditor.vue` injects them on mount alongside Tailwind and the fonts.
36
+ Reachable from the component, they cannot be dropped without dropping the
37
+ component — the mechanism `shadowStyles.ts` has always used for the shadow
38
+ root. Confirmed surviving even under `sideEffects: false`.
39
+
40
+ Nothing changed in the public API, and no CSS import is needed.
41
+
42
+ ### Changed
43
+
44
+ **A missing style substitution now fails the build instead of warning.**
45
+ Both build passes error out if the placeholder cannot be found in any
46
+ chunk. A warning in a build log was not enough to catch this before
47
+ publishing.
48
+
3
49
  ## 0.4.2
4
50
 
5
51
  Docs only — no code changes. 0.4.1's `onSave` fix is confirmed working on the
@@ -0,0 +1,439 @@
1
+ import { H as resolveDynamicComponent, L as openBlock, S as createTextVNode, T as defineComponent, _ as createBlock, f as Fragment, g as createBaseVNode, h as computed, v as createCommentVNode, vt as normalizeStyle, y as createElementBlock, yt as toDisplayString, z as renderList } from "./vue.runtime.esm-bundler-BaHqghYy.js";
2
+ //#region src/components/features/emailBuilder/product/RowPreviewLegacyComponent.vue?vue&type=script&setup=true&lang.ts
3
+ var _hoisted_1 = ["innerHTML"];
4
+ var _hoisted_2 = ["src", "alt"];
5
+ var _hoisted_3 = ["src", "alt"];
6
+ var _hoisted_4 = {
7
+ style: {
8
+ "width": "30%",
9
+ "height": "30%",
10
+ "color": "#9ca3af"
11
+ },
12
+ fill: "currentColor",
13
+ viewBox: "0 0 20 20"
14
+ };
15
+ var _hoisted_5 = ["src", "alt"];
16
+ var _hoisted_6 = ["src", "alt"];
17
+ var _hoisted_7 = ["innerHTML"];
18
+ var _hoisted_8 = { key: 8 };
19
+ var _hoisted_9 = { key: 0 };
20
+ var _hoisted_10 = ["src", "alt"];
21
+ var _hoisted_11 = {
22
+ key: 1,
23
+ style: {
24
+ "font-size": "7px",
25
+ "color": "#9ca3af",
26
+ "font-style": "italic"
27
+ }
28
+ };
29
+ var _hoisted_12 = {
30
+ key: 11,
31
+ class: "rounded truncate",
32
+ style: {
33
+ "font-size": "7px",
34
+ "color": "#9ca3af",
35
+ "background": "#f3f4f6",
36
+ "padding": "1px 3px"
37
+ }
38
+ };
39
+ //#endregion
40
+ //#region src/components/features/emailBuilder/product/RowPreviewLegacyComponent.vue
41
+ var RowPreviewLegacyComponent_default = /* @__PURE__ */ defineComponent({
42
+ __name: "RowPreviewLegacyComponent",
43
+ props: {
44
+ comp: {},
45
+ scale: {}
46
+ },
47
+ setup(__props) {
48
+ const props = __props;
49
+ const compType = computed(() => props.comp.componentType ?? props.comp.type);
50
+ function resolvePreviewHtml(html) {
51
+ if (!html) return "";
52
+ return html.replace(/<span[^>]*\bdata-merge="([^"]+)"(?:[^>]*\bdata-merge-default="([^"]*)")?[^>]*>.*?<\/span>/gs, (_, name, fallback) => {
53
+ const tag = name.trim();
54
+ const def = fallback?.trim();
55
+ return def ? `{{ ${tag}|'${def}' }}` : `{{ ${tag} }}`;
56
+ });
57
+ }
58
+ function resolveBackground(item) {
59
+ const bg = item?.backgroundGradient;
60
+ if (bg?.useGradient === true && Array.isArray(bg?.gradient?.colors) && bg.gradient.colors.length >= 2) {
61
+ const { type, direction, colors } = bg.gradient;
62
+ const stops = colors.map((c) => `${c.color} ${c.position}%`).join(", ");
63
+ return type === "radial" ? `radial-gradient(circle at center, ${stops})` : `linear-gradient(${direction}, ${stops})`;
64
+ }
65
+ return item?.backgroundColor || "transparent";
66
+ }
67
+ function loadGoogleFont(fontFamily) {
68
+ if (!fontFamily) return;
69
+ if ((fontFamily.includes(" ") || [
70
+ "Roboto",
71
+ "Open Sans",
72
+ "Lato",
73
+ "Montserrat",
74
+ "Poppins",
75
+ "Nunito",
76
+ "Raleway",
77
+ "Plus Jakarta Sans"
78
+ ].some((f) => fontFamily.includes(f))) && typeof document !== "undefined") {
79
+ const href = `https://fonts.googleapis.com/css2?family=${fontFamily.replace(/ /g, "+")}:wght@300;400;500;600;700;800&display=swap`;
80
+ if (!document.querySelector(`link[href="${href}"]`)) {
81
+ const link = document.createElement("link");
82
+ link.href = href;
83
+ link.rel = "stylesheet";
84
+ document.head.appendChild(link);
85
+ }
86
+ }
87
+ }
88
+ function headingStyle(p) {
89
+ if (p?.fontFamily) loadGoogleFont(p.fontFamily);
90
+ return {
91
+ fontSize: Math.max(7, p?.fontSize || 24) + "px",
92
+ color: p?.color || "#111111",
93
+ fontWeight: p?.fontWeight || "bold",
94
+ fontFamily: p?.fontFamily || "Arial, sans-serif",
95
+ textAlign: p?.align || "left",
96
+ lineHeight: String(p?.lineHeight ?? 1.2),
97
+ letterSpacing: `${p?.letterSpacing ?? 0}px`,
98
+ textTransform: p?.textTransform || "none",
99
+ textDecoration: p?.textDecoration || "none",
100
+ background: resolveBackground(p),
101
+ margin: `${p?.margin?.top ?? 0}px ${p?.margin?.right ?? 0}px ${p?.margin?.bottom ?? 4}px ${p?.margin?.left ?? 0}px`,
102
+ padding: `${p?.padding?.top ?? 0}px ${p?.padding?.right ?? 0}px ${p?.padding?.bottom ?? 0}px ${p?.padding?.left ?? 0}px`
103
+ };
104
+ }
105
+ function paragraphStyle(p) {
106
+ if (p?.fontFamily) loadGoogleFont(p.fontFamily);
107
+ return {
108
+ fontSize: Math.max(6, p?.fontSize || 16) + "px",
109
+ color: p?.color || "#111111",
110
+ fontFamily: p?.fontFamily || "Arial, sans-serif",
111
+ fontWeight: p?.fontWeight || "normal",
112
+ fontStyle: p?.fontStyle || "normal",
113
+ textAlign: p?.align || "left",
114
+ lineHeight: String(p?.lineHeight ?? 1.5),
115
+ letterSpacing: `${p?.letterSpacing ?? 0}px`,
116
+ textTransform: p?.textTransform || "none",
117
+ textDecoration: p?.textDecoration || "none",
118
+ background: resolveBackground(p),
119
+ margin: `${p?.margin?.top ?? 0}px ${p?.margin?.right ?? 0}px ${p?.margin?.bottom ?? 4}px ${p?.margin?.left ?? 0}px`,
120
+ padding: `${p?.padding?.top ?? 0}px ${p?.padding?.right ?? 0}px ${p?.padding?.bottom ?? 0}px ${p?.padding?.left ?? 0}px`
121
+ };
122
+ }
123
+ function imageContainerStyle(p) {
124
+ return {
125
+ margin: `${p?.margin?.top ?? 0}px ${p?.margin?.right ?? 0}px ${p?.margin?.bottom ?? 0}px ${p?.margin?.left ?? 0}px`,
126
+ padding: `${p?.padding?.top ?? 0}px ${p?.padding?.right ?? 0}px ${p?.padding?.bottom ?? 0}px ${p?.padding?.left ?? 0}px`,
127
+ textAlign: p?.align || "left"
128
+ };
129
+ }
130
+ function imageStyle(p) {
131
+ const align = p?.align || "left";
132
+ return {
133
+ width: (p?.width || 100) + "%",
134
+ height: p?.height || "auto",
135
+ borderRadius: (p?.borderRadius || 0) + "px",
136
+ border: `${p?.border?.width || 0}px ${p?.border?.style || "solid"} ${p?.border?.color || "#000000"}`,
137
+ display: "block",
138
+ margin: align === "center" ? "0 auto" : align === "right" ? "0 0 0 auto" : "0"
139
+ };
140
+ }
141
+ function videoContainerStyle(p) {
142
+ return {
143
+ margin: `${p?.margin?.top ?? 0}px ${p?.margin?.right ?? 0}px ${p?.margin?.bottom ?? 0}px ${p?.margin?.left ?? 0}px`,
144
+ padding: `${p?.padding?.top ?? 0}px ${p?.padding?.right ?? 0}px ${p?.padding?.bottom ?? 0}px ${p?.padding?.left ?? 0}px`,
145
+ textAlign: p?.align || "left",
146
+ maxWidth: "100%"
147
+ };
148
+ }
149
+ function videoThumbnailStyle(p) {
150
+ const align = p?.align || "left";
151
+ return {
152
+ width: "100%",
153
+ maxWidth: "100%",
154
+ paddingBottom: "56.25%",
155
+ height: "0",
156
+ position: "relative",
157
+ display: "inline-block",
158
+ borderRadius: (p?.borderRadius || 0) + "px",
159
+ border: `${p?.border?.width || 0}px ${p?.border?.style || "solid"} ${p?.border?.color || "#000000"}`,
160
+ overflow: "hidden",
161
+ marginLeft: align === "center" ? "auto" : align === "right" ? "auto" : "0",
162
+ marginRight: align === "center" ? "auto" : "0",
163
+ boxSizing: "border-box"
164
+ };
165
+ }
166
+ function videoImageStyle() {
167
+ return {
168
+ position: "absolute",
169
+ top: "0",
170
+ left: "0",
171
+ width: "100%",
172
+ height: "100%",
173
+ objectFit: "cover",
174
+ display: "block"
175
+ };
176
+ }
177
+ function videoPlaceholderStyle() {
178
+ return {
179
+ position: "absolute",
180
+ top: "0",
181
+ left: "0",
182
+ width: "100%",
183
+ height: "100%",
184
+ background: "#e5e7eb",
185
+ display: "flex",
186
+ alignItems: "center",
187
+ justifyContent: "center"
188
+ };
189
+ }
190
+ function buttonContainerStyle(p) {
191
+ return {
192
+ margin: `${p?.margin?.top ?? 0}px ${p?.margin?.right ?? 0}px ${p?.margin?.bottom ?? 4}px ${p?.margin?.left ?? 0}px`,
193
+ textAlign: p?.align || "center"
194
+ };
195
+ }
196
+ function buttonStyle(p) {
197
+ if (p?.fontFamily) loadGoogleFont(p.fontFamily);
198
+ const hasIcon = !!p?.icon;
199
+ return {
200
+ background: resolveBackground(p),
201
+ color: p?.color || "#ffffff",
202
+ fontSize: Math.max(5, p?.fontSize || 16) + "px",
203
+ fontWeight: p?.fontWeight || "500",
204
+ fontFamily: p?.fontFamily || "Arial, sans-serif",
205
+ letterSpacing: `${p?.letterSpacing ?? 0}px`,
206
+ padding: `${p?.padding?.top ?? 8}px ${p?.padding?.right ?? 16}px ${p?.padding?.bottom ?? 8}px ${p?.padding?.left ?? 16}px`,
207
+ borderRadius: (p?.borderRadius || 4) + "px",
208
+ border: `${p?.border?.width || 0}px ${p?.border?.style || "solid"} ${p?.border?.color || "#000000"}`,
209
+ ...hasIcon ? {
210
+ display: "inline-flex",
211
+ alignItems: "center",
212
+ verticalAlign: "middle"
213
+ } : { display: "inline-block" },
214
+ lineHeight: "1.2",
215
+ textDecoration: "none"
216
+ };
217
+ }
218
+ function buttonIconStyle(p) {
219
+ const size = Math.max(4, p?.iconSize ?? 20);
220
+ const gap = p?.iconGap ?? 8;
221
+ const isBefore = p?.iconPosition !== "after";
222
+ return {
223
+ display: "block",
224
+ width: size + "px",
225
+ height: size + "px",
226
+ flexShrink: "0",
227
+ marginRight: isBefore ? gap + "px" : "0",
228
+ marginLeft: isBefore ? "0" : gap + "px"
229
+ };
230
+ }
231
+ function onIconError(e) {
232
+ const img = e.target;
233
+ img.style.display = "none";
234
+ }
235
+ function anchorContainerStyle(p) {
236
+ return {
237
+ margin: `${p?.margin?.top ?? 0}px ${p?.margin?.right ?? 0}px ${p?.margin?.bottom ?? 4}px ${p?.margin?.left ?? 0}px`,
238
+ padding: `${p?.padding?.top ?? 0}px ${p?.padding?.right ?? 0}px ${p?.padding?.bottom ?? 0}px ${p?.padding?.left ?? 0}px`,
239
+ textAlign: p?.align || "left"
240
+ };
241
+ }
242
+ function anchorStyle(p) {
243
+ if (p?.fontFamily) loadGoogleFont(p.fontFamily);
244
+ return {
245
+ color: p?.color || "#007bff",
246
+ fontSize: Math.max(6, p?.fontSize || 16) + "px",
247
+ fontWeight: p?.fontWeight || "normal",
248
+ fontFamily: p?.fontFamily || "Arial, sans-serif",
249
+ letterSpacing: `${p?.letterSpacing ?? 0}px`,
250
+ textDecoration: p?.textDecoration || "underline"
251
+ };
252
+ }
253
+ function listWrapStyle(p) {
254
+ if (p?.fontFamily) loadGoogleFont(p.fontFamily);
255
+ return {
256
+ margin: `${p?.margin?.top ?? 0}px ${p?.margin?.right ?? 0}px ${p?.margin?.bottom ?? 0}px ${p?.margin?.left ?? 0}px`,
257
+ padding: `${p?.padding?.top ?? 0}px ${p?.padding?.right ?? 0}px ${p?.padding?.bottom ?? 0}px ${p?.padding?.left ?? 16}px`,
258
+ fontSize: Math.max(6, p?.fontSize || 16) + "px",
259
+ fontFamily: p?.fontFamily || "Arial, sans-serif",
260
+ lineHeight: String(p?.lineHeight ?? 1.5),
261
+ letterSpacing: `${p?.letterSpacing ?? 0}px`,
262
+ color: p?.color || "#111111",
263
+ background: resolveBackground(p)
264
+ };
265
+ }
266
+ function dividerContainerStyle(p) {
267
+ return {
268
+ margin: `${p?.margin?.top ?? 0}px ${p?.margin?.right ?? 0}px ${p?.margin?.bottom ?? 0}px ${p?.margin?.left ?? 0}px`,
269
+ padding: `${p?.padding?.top ?? 0}px ${p?.padding?.right ?? 0}px ${p?.padding?.bottom ?? 0}px ${p?.padding?.left ?? 0}px`,
270
+ textAlign: p?.align || "left"
271
+ };
272
+ }
273
+ function dividerStyle(p) {
274
+ const align = p?.align || "left";
275
+ return {
276
+ width: (p?.width || 100) + "%",
277
+ height: (p?.height || 1) + "px",
278
+ background: resolveBackground(p),
279
+ border: "none",
280
+ margin: align === "center" ? "0 auto" : align === "right" ? "0 0 0 auto" : "0"
281
+ };
282
+ }
283
+ function spacerStyle(p) {
284
+ return {
285
+ width: "100%",
286
+ height: (p?.height || 16) + "px",
287
+ background: resolveBackground(p)
288
+ };
289
+ }
290
+ function menuContainerStyle(p) {
291
+ if (p?.fontFamily) loadGoogleFont(p.fontFamily);
292
+ return {
293
+ margin: `${p?.margin?.top ?? 0}px ${p?.margin?.right ?? 0}px ${p?.margin?.bottom ?? 0}px ${p?.margin?.left ?? 0}px`,
294
+ padding: `${p?.padding?.top ?? 0}px ${p?.padding?.right ?? 0}px ${p?.padding?.bottom ?? 0}px ${p?.padding?.left ?? 0}px`,
295
+ textAlign: p?.align || "left",
296
+ lineHeight: "0",
297
+ background: resolveBackground(p)
298
+ };
299
+ }
300
+ function menuItemStyle(p, index, total) {
301
+ if (p?.fontFamily) loadGoogleFont(p.fontFamily);
302
+ const isStacked = p?.mobileStack === true;
303
+ const spacing = p?.spacing ?? 8;
304
+ const isFirst = index === 0;
305
+ const isLast = index === total - 1;
306
+ return {
307
+ display: "inline-block",
308
+ marginLeft: isFirst ? "0px" : `${spacing / 2}px`,
309
+ marginRight: isLast ? "0px" : `${spacing / 2}px`,
310
+ fontSize: Math.max(6, p?.fontSize ?? 14) + "px",
311
+ lineHeight: String(p?.lineHeight ?? 1.4),
312
+ letterSpacing: (p?.letterSpacing ?? 0) + "px",
313
+ color: p?.color || "#111111",
314
+ fontWeight: p?.fontWeight || "normal",
315
+ fontFamily: p?.fontFamily ? `'${p.fontFamily}', Arial, sans-serif` : "Arial, sans-serif",
316
+ fontStyle: p?.fontStyle || "normal",
317
+ textTransform: p?.textTransform || "none",
318
+ textDecoration: p?.textDecoration || "none",
319
+ whiteSpace: isStacked ? "normal" : "nowrap",
320
+ cursor: "default"
321
+ };
322
+ }
323
+ function socialsContainerStyle(p) {
324
+ return {
325
+ margin: `${p?.margin?.top ?? 0}px ${p?.margin?.right ?? 0}px ${p?.margin?.bottom ?? 0}px ${p?.margin?.left ?? 0}px`,
326
+ padding: `${p?.padding?.top ?? 0}px ${p?.padding?.right ?? 0}px ${p?.padding?.bottom ?? 0}px ${p?.padding?.left ?? 0}px`,
327
+ textAlign: p?.align || "left",
328
+ display: "flex",
329
+ flexWrap: "wrap",
330
+ gap: (p?.spacing ?? 8) + "px",
331
+ justifyContent: p?.align === "center" ? "center" : p?.align === "right" ? "flex-end" : "flex-start"
332
+ };
333
+ }
334
+ return (_ctx, _cache) => {
335
+ return compType.value === "heading" ? (openBlock(), createBlock(resolveDynamicComponent(__props.comp.props?.level || "h2"), {
336
+ key: 0,
337
+ style: normalizeStyle(headingStyle(__props.comp.props)),
338
+ class: "truncate",
339
+ innerHTML: resolvePreviewHtml(__props.comp.props?.content) || "Heading"
340
+ }, null, 8, ["style", "innerHTML"])) : compType.value === "paragraph" ? (openBlock(), createElementBlock("p", {
341
+ key: 1,
342
+ style: normalizeStyle([paragraphStyle(__props.comp.props), {
343
+ "display": "-webkit-box",
344
+ "-webkit-line-clamp": "2",
345
+ "-webkit-box-orient": "vertical"
346
+ }]),
347
+ class: "overflow-hidden",
348
+ innerHTML: resolvePreviewHtml(__props.comp.props?.content) || "Text"
349
+ }, null, 12, _hoisted_1)) : compType.value === "image" ? (openBlock(), createElementBlock("div", {
350
+ key: 2,
351
+ style: normalizeStyle(imageContainerStyle(__props.comp.props))
352
+ }, [createBaseVNode("img", {
353
+ src: __props.comp.props?.src,
354
+ alt: __props.comp.props?.alt || "",
355
+ style: normalizeStyle(imageStyle(__props.comp.props))
356
+ }, null, 12, _hoisted_2)], 4)) : compType.value === "video" ? (openBlock(), createElementBlock("div", {
357
+ key: 3,
358
+ style: normalizeStyle(videoContainerStyle(__props.comp.props))
359
+ }, [createBaseVNode("div", { style: normalizeStyle(videoThumbnailStyle(__props.comp.props)) }, [__props.comp.props?.coverImage ? (openBlock(), createElementBlock("img", {
360
+ key: 0,
361
+ src: __props.comp.props.coverImage,
362
+ alt: __props.comp.props?.alt || "Video",
363
+ style: normalizeStyle(videoImageStyle())
364
+ }, null, 12, _hoisted_3)) : (openBlock(), createElementBlock("div", {
365
+ key: 1,
366
+ style: normalizeStyle(videoPlaceholderStyle())
367
+ }, [(openBlock(), createElementBlock("svg", _hoisted_4, [..._cache[0] || (_cache[0] = [createBaseVNode("path", {
368
+ "fill-rule": "evenodd",
369
+ 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",
370
+ "clip-rule": "evenodd"
371
+ }, null, -1)])]))], 4))], 4)], 4)) : compType.value === "button" ? (openBlock(), createElementBlock("div", {
372
+ key: 4,
373
+ style: normalizeStyle(buttonContainerStyle(__props.comp.props))
374
+ }, [createBaseVNode("span", {
375
+ style: normalizeStyle(buttonStyle(__props.comp.props)),
376
+ class: "inline-block truncate"
377
+ }, [
378
+ __props.comp.props?.icon && __props.comp.props?.iconPosition !== "after" ? (openBlock(), createElementBlock("img", {
379
+ key: 0,
380
+ src: __props.comp.props.icon,
381
+ alt: __props.comp.props?.iconAlt || "",
382
+ style: normalizeStyle(buttonIconStyle(__props.comp.props)),
383
+ onError: onIconError
384
+ }, null, 44, _hoisted_5)) : createCommentVNode("", true),
385
+ createTextVNode(" " + toDisplayString(__props.comp.props?.text || "Button") + " ", 1),
386
+ __props.comp.props?.icon && __props.comp.props?.iconPosition === "after" ? (openBlock(), createElementBlock("img", {
387
+ key: 1,
388
+ src: __props.comp.props.icon,
389
+ alt: __props.comp.props?.iconAlt || "",
390
+ style: normalizeStyle(buttonIconStyle(__props.comp.props)),
391
+ onError: onIconError
392
+ }, null, 44, _hoisted_6)) : createCommentVNode("", true)
393
+ ], 4)], 4)) : compType.value === "anchor" ? (openBlock(), createElementBlock("div", {
394
+ key: 5,
395
+ style: normalizeStyle(anchorContainerStyle(__props.comp.props))
396
+ }, [createBaseVNode("span", {
397
+ style: normalizeStyle(anchorStyle(__props.comp.props)),
398
+ class: "truncate block"
399
+ }, toDisplayString(__props.comp.props?.text || "Link"), 5)], 4)) : compType.value === "list" ? (openBlock(), createElementBlock("div", {
400
+ key: 6,
401
+ style: normalizeStyle(listWrapStyle(__props.comp.props)),
402
+ innerHTML: resolvePreviewHtml(__props.comp.props?.content) || "<ul><li>Item</li></ul>"
403
+ }, null, 12, _hoisted_7)) : compType.value === "divider" ? (openBlock(), createElementBlock("div", {
404
+ key: 7,
405
+ style: normalizeStyle(dividerContainerStyle(__props.comp.props))
406
+ }, [createBaseVNode("hr", { style: normalizeStyle(dividerStyle(__props.comp.props)) }, null, 4)], 4)) : compType.value === "spacer" ? (openBlock(), createElementBlock("div", _hoisted_8, [createBaseVNode("div", { style: normalizeStyle(spacerStyle(__props.comp.props)) }, null, 4)])) : compType.value === "menu" ? (openBlock(), createElementBlock("div", {
407
+ key: 9,
408
+ style: normalizeStyle(menuContainerStyle(__props.comp.props))
409
+ }, [!__props.comp.props?.items?.some((i) => i.enabled && i.label) ? (openBlock(), createElementBlock("div", _hoisted_9, " Menu ")) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(__props.comp.props.items.filter((i) => i.enabled && i.label), (item, idx) => {
410
+ return openBlock(), createElementBlock("span", {
411
+ key: item._id || idx,
412
+ style: normalizeStyle(menuItemStyle(__props.comp.props, Number(idx), __props.comp.props.items.filter((i) => i.enabled && i.label).length))
413
+ }, toDisplayString(item.label), 5);
414
+ }), 128))], 4)) : compType.value === "socials" ? (openBlock(), createElementBlock("div", {
415
+ key: 10,
416
+ style: normalizeStyle(socialsContainerStyle(__props.comp.props))
417
+ }, [__props.comp.props?.platforms?.some((p) => p.enabled && p.link) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.comp.props.platforms.filter((p) => p.enabled && p.link), (platform) => {
418
+ return openBlock(), createElementBlock("span", {
419
+ key: platform.name,
420
+ style: {
421
+ display: "inline-flex",
422
+ alignItems: "center",
423
+ justifyContent: "center"
424
+ }
425
+ }, [createBaseVNode("img", {
426
+ src: platform.icon,
427
+ alt: platform.name,
428
+ style: normalizeStyle({
429
+ width: (__props.comp.props?.iconSize || 24) + "px",
430
+ height: (__props.comp.props?.iconSize || 24) + "px",
431
+ display: "block"
432
+ })
433
+ }, null, 12, _hoisted_10)]);
434
+ }), 128)) : (openBlock(), createElementBlock("span", _hoisted_11, "Socials"))], 4)) : (openBlock(), createElementBlock("div", _hoisted_12, toDisplayString(compType.value), 1));
435
+ };
436
+ }
437
+ });
438
+ //#endregion
439
+ export { RowPreviewLegacyComponent_default as default };