@maildeno/editor 0.1.3 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/CHANGELOG.md +258 -0
  2. package/README.md +397 -381
  3. package/dist/RowPreviewChildren-DT0y0lKC.js +4 -0
  4. package/dist/RowPreviewChildren-OsbF7_vu.js +4 -0
  5. package/dist/RowPreviewLegacyComponent-BV4b5bHQ.js +487 -0
  6. package/dist/RowPreviewLegacyComponent-C08MGJVT.js +487 -0
  7. package/dist/RowPreviewRow-ByxeBYV8.js +112 -0
  8. package/dist/RowPreviewRow-N-hh5l_H.js +112 -0
  9. package/dist/adapters/errors.d.ts +59 -0
  10. package/dist/adapters/index.d.ts +31 -0
  11. package/dist/adapters/types.d.ts +68 -0
  12. package/dist/brand.d.ts +15 -0
  13. package/dist/components/DesktopOnlyNotice.vue.d.ts +20 -0
  14. package/dist/components/features/emailBuilder/EmailEditor.vue.d.ts +182 -0
  15. package/dist/components/features/emailBuilder/assistant/AssistantPanel.vue.d.ts +37 -0
  16. package/dist/components/features/emailBuilder/blocks/AnchorBlock.vue.d.ts +3 -0
  17. package/dist/components/features/emailBuilder/blocks/ButtonBlock.vue.d.ts +3 -0
  18. package/dist/components/features/emailBuilder/blocks/DividerBlock.vue.d.ts +3 -0
  19. package/dist/components/features/emailBuilder/blocks/HeadingBlock.vue.d.ts +3 -0
  20. package/dist/components/features/emailBuilder/blocks/ImageBlock.vue.d.ts +3 -0
  21. package/dist/components/features/emailBuilder/blocks/ListBlock.vue.d.ts +3 -0
  22. package/dist/components/features/emailBuilder/blocks/MenuBlock.vue.d.ts +3 -0
  23. package/dist/components/features/emailBuilder/blocks/ParagraphBlock.vue.d.ts +3 -0
  24. package/dist/components/features/emailBuilder/blocks/SocialsBlock.vue.d.ts +3 -0
  25. package/dist/components/features/emailBuilder/blocks/SpacerBlock.vue.d.ts +3 -0
  26. package/dist/components/features/emailBuilder/blocks/VideoBlock.vue.d.ts +3 -0
  27. package/dist/components/features/emailBuilder/canvas/Canvas.vue.d.ts +3 -0
  28. package/dist/components/features/emailBuilder/canvas/CanvasColumn.vue.d.ts +49 -0
  29. package/dist/components/features/emailBuilder/canvas/CanvasComponent.vue.d.ts +56 -0
  30. package/dist/components/features/emailBuilder/canvas/CanvasElement.vue.d.ts +21 -0
  31. package/dist/components/features/emailBuilder/canvas/CanvasRow.vue.d.ts +49 -0
  32. package/dist/components/features/emailBuilder/canvas/CanvasRowSpacer.vue.d.ts +40 -0
  33. package/dist/components/features/emailBuilder/health/HealthIndicator.vue.d.ts +3 -0
  34. package/dist/components/features/emailBuilder/layout/Header.vue.d.ts +54 -0
  35. package/dist/components/features/emailBuilder/layout/SendEmail.vue.d.ts +21 -0
  36. package/dist/components/features/emailBuilder/layout/SidebarLeft.vue.d.ts +3 -0
  37. package/dist/components/features/emailBuilder/layout/SidebarRight.vue.d.ts +3 -0
  38. package/dist/components/features/emailBuilder/panels/AnchorPanel.vue.d.ts +3 -0
  39. package/dist/components/features/emailBuilder/panels/ButtonPanel.vue.d.ts +3 -0
  40. package/dist/components/features/emailBuilder/panels/DividerPanel.vue.d.ts +3 -0
  41. package/dist/components/features/emailBuilder/panels/HeadingPanel.vue.d.ts +3 -0
  42. package/dist/components/features/emailBuilder/panels/ImagePanel.vue.d.ts +3 -0
  43. package/dist/components/features/emailBuilder/panels/ListPanel.vue.d.ts +3 -0
  44. package/dist/components/features/emailBuilder/panels/MenuPanel.vue.d.ts +3 -0
  45. package/dist/components/features/emailBuilder/panels/ParagraphPanel.vue.d.ts +3 -0
  46. package/dist/components/features/emailBuilder/panels/RowColumnPanel.vue.d.ts +13 -0
  47. package/dist/components/features/emailBuilder/panels/RowPanel.vue.d.ts +13 -0
  48. package/dist/components/features/emailBuilder/panels/RowSpacerPanel.vue.d.ts +13 -0
  49. package/dist/components/features/emailBuilder/panels/SocialsPanel.vue.d.ts +3 -0
  50. package/dist/components/features/emailBuilder/panels/SpacerPanel.vue.d.ts +3 -0
  51. package/dist/components/features/emailBuilder/panels/VideoPanel.vue.d.ts +3 -0
  52. package/dist/components/features/emailBuilder/panels/shared/DeviceTabs.vue.d.ts +19 -0
  53. package/dist/components/features/emailBuilder/panels/shared/LinkFieldMergeTags.vue.d.ts +31 -0
  54. package/dist/components/features/emailBuilder/panels/shared/OverrideBadge.vue.d.ts +9 -0
  55. package/dist/components/features/emailBuilder/panels/shared/PreviewBadge.vue.d.ts +11 -0
  56. package/dist/components/features/emailBuilder/panels/shared/TextFieldMergeTags.vue.d.ts +25 -0
  57. package/dist/components/features/emailBuilder/panels/ui/BoxStylingSection.vue.d.ts +7 -0
  58. package/dist/components/features/emailBuilder/panels/ui/PropertyAlignment.vue.d.ts +30 -0
  59. package/dist/components/features/emailBuilder/panels/ui/PropertyColor.vue.d.ts +75 -0
  60. package/dist/components/features/emailBuilder/panels/ui/PropertyGradientColor.vue.d.ts +27 -0
  61. package/dist/components/features/emailBuilder/panels/ui/PropertyNumberSlider.vue.d.ts +74 -0
  62. package/dist/components/features/emailBuilder/panels/ui/PropertySection.vue.d.ts +17 -0
  63. package/dist/components/features/emailBuilder/panels/ui/PropertySelect.vue.d.ts +74 -0
  64. package/dist/components/features/emailBuilder/panels/ui/PropertyTextStyle.vue.d.ts +52 -0
  65. package/dist/components/features/emailBuilder/panels/ui/PropertyTextStylePanel.vue.d.ts +72 -0
  66. package/dist/components/features/emailBuilder/panels/ui/PropertyToggle.vue.d.ts +45 -0
  67. package/dist/components/features/emailBuilder/panels/ui/PropertyVisibility.vue.d.ts +32 -0
  68. package/dist/components/features/emailBuilder/panels/ui/SpacingControl.vue.d.ts +19 -0
  69. package/dist/components/features/emailBuilder/panels/ui/color-picker/AlphaSlider.vue.d.ts +28 -0
  70. package/dist/components/features/emailBuilder/panels/ui/color-picker/ColorPickerPanel.vue.d.ts +31 -0
  71. package/dist/components/features/emailBuilder/panels/ui/color-picker/HueSlider.vue.d.ts +19 -0
  72. package/dist/components/features/emailBuilder/panels/ui/color-picker/RecentColors.vue.d.ts +20 -0
  73. package/dist/components/features/emailBuilder/panels/ui/color-picker/SVPanel.vue.d.ts +39 -0
  74. package/dist/components/features/emailBuilder/panels/ui/visibility-rule/Rule.vue.d.ts +28 -0
  75. package/dist/components/features/emailBuilder/preview/PreviewScreen.vue.d.ts +7 -0
  76. package/dist/components/features/emailBuilder/preview/ui/PreviewCanvas.vue.d.ts +10 -0
  77. package/dist/components/features/emailBuilder/preview/ui/PreviewCapabilityBadges.vue.d.ts +12 -0
  78. package/dist/components/features/emailBuilder/preview/ui/PreviewClientCard.vue.d.ts +20 -0
  79. package/dist/components/features/emailBuilder/preview/ui/PreviewClientList.vue.d.ts +21 -0
  80. package/dist/components/features/emailBuilder/preview/ui/PreviewClientPicker.vue.d.ts +16 -0
  81. package/dist/components/features/emailBuilder/preview/ui/PreviewComponent.vue.d.ts +10 -0
  82. package/dist/components/features/emailBuilder/preview/ui/PreviewDetailView.vue.d.ts +41 -0
  83. package/dist/components/features/emailBuilder/preview/ui/PreviewRendered.vue.d.ts +8 -0
  84. package/dist/components/features/emailBuilder/product/RowPreview.vue.d.ts +8 -0
  85. package/dist/components/features/emailBuilder/product/RowPreviewChildren.vue.d.ts +14 -0
  86. package/dist/components/features/emailBuilder/product/RowPreviewLegacyComponent.vue.d.ts +14 -0
  87. package/dist/components/features/emailBuilder/product/RowPreviewRow.vue.d.ts +9 -0
  88. package/dist/components/features/emailBuilder/product/SavedRowsPanel.vue.d.ts +3 -0
  89. package/dist/components/features/emailBuilder/product/SavedTemplatesPanel.vue.d.ts +13 -0
  90. package/dist/components/features/emailBuilder/product/VersionHistoryPanel.vue.d.ts +14 -0
  91. package/dist/components/features/emailBuilder/sidebar/SidebarBlockButton.vue.d.ts +35 -0
  92. package/dist/components/features/emailBuilder/tabs/GeneralTab.vue.d.ts +3 -0
  93. package/dist/components/features/emailBuilder/tabs/LayoutTab.vue.d.ts +3 -0
  94. package/dist/components/features/emailBuilder/tabs/content/ContentTab.vue.d.ts +3 -0
  95. package/dist/components/features/emailBuilder/tabs/content/LayersPanel.vue.d.ts +7 -0
  96. package/dist/components/features/emailBuilder/tabs/general/MergeTagsTab.vue.d.ts +3 -0
  97. package/dist/components/features/emailBuilder/tabs/general/StylesTab.vue.d.ts +3 -0
  98. package/dist/components/features/emailBuilder/tabs/general/VisibilityTab.vue.d.ts +3 -0
  99. package/dist/components/features/emailBuilder/tabs/general/VisibilityWrapESPTab.vue.d.ts +3 -0
  100. package/dist/components/features/emailBuilder/tabs/general/merge-tags/LinkTagTab.vue.d.ts +3 -0
  101. package/dist/components/features/emailBuilder/tabs/general/merge-tags/MergeTagTab.vue.d.ts +3 -0
  102. package/dist/components/features/emailBuilder/ui/LinkInputDialog.vue.d.ts +17 -0
  103. package/dist/components/features/emailBuilder/ui/canvas/CanvasRowDropZone.vue.d.ts +12 -0
  104. package/dist/components/features/emailBuilder/ui/canvas/DropZone.vue.d.ts +10 -0
  105. package/dist/components/features/emailBuilder/ui/canvas/Loader.vue.d.ts +19 -0
  106. package/dist/components/features/emailBuilder/ui/layers-panel/ComponentIcon.vue.d.ts +7 -0
  107. package/dist/components/features/emailBuilder/ui/layers-panel/LayerColumnChildren.vue.d.ts +42 -0
  108. package/dist/components/features/emailBuilder/ui/layers-panel/LayerDropLine.vue.d.ts +8 -0
  109. package/dist/components/features/emailBuilder/ui/renderers/AnchorRenderer.vue.d.ts +10 -0
  110. package/dist/components/features/emailBuilder/ui/renderers/DividerRenderer.vue.d.ts +10 -0
  111. package/dist/components/features/emailBuilder/ui/renderers/HeadingRenderer.vue.d.ts +10 -0
  112. package/dist/components/features/emailBuilder/ui/renderers/ImageRenderer.vue.d.ts +10 -0
  113. package/dist/components/features/emailBuilder/ui/renderers/ListRenderer.vue.d.ts +10 -0
  114. package/dist/components/features/emailBuilder/ui/renderers/MenuRenderer.vue.d.ts +10 -0
  115. package/dist/components/features/emailBuilder/ui/renderers/ParagraphRenderer.vue.d.ts +10 -0
  116. package/dist/components/features/emailBuilder/ui/renderers/SocialsRenderer.vue.d.ts +10 -0
  117. package/dist/components/features/emailBuilder/ui/renderers/SpacerRenderer.vue.d.ts +10 -0
  118. package/dist/components/features/emailBuilder/ui/renderers/VideoRenderer.vue.d.ts +10 -0
  119. package/dist/components/features/emailBuilder/ui/rich-text-editor/RichTextEditor.vue.d.ts +12 -0
  120. package/dist/components/features/emailBuilder/ui/rich-text-editor/pickers/MergeTagPicker.vue.d.ts +18 -0
  121. package/dist/components/features/emailBuilder/ui/rich-text-editor/pickers/RichTextColorPicker.vue.d.ts +15 -0
  122. package/dist/components/features/emailBuilder/ui/visibility/SupportBadge.vue.d.ts +10 -0
  123. package/dist/components/features/emailBuilder/ui/visibility/VisibilityPopover.vue.d.ts +45 -0
  124. package/dist/components/ui/ConfirmDialog.vue.d.ts +3 -0
  125. package/dist/components/ui/Icon.vue.d.ts +33 -0
  126. package/dist/components/ui/InfoDialog.vue.d.ts +12 -0
  127. package/dist/components/ui/Loading.vue.d.ts +6 -0
  128. package/dist/components/ui/ShadowSafeToast.vue.d.ts +3 -0
  129. package/dist/components/ui/primitives/Button.vue.d.ts +23 -0
  130. package/dist/components/ui/primitives/DatePicker.vue.d.ts +16 -0
  131. package/dist/components/ui/primitives/Dialog.vue.d.ts +34 -0
  132. package/dist/components/ui/primitives/InputText.vue.d.ts +29 -0
  133. package/dist/components/ui/primitives/Message.vue.d.ts +20 -0
  134. package/dist/components/ui/primitives/Select.vue.d.ts +22 -0
  135. package/dist/composables/emailBuilder/components/useSystemRows.d.ts +22 -0
  136. package/dist/composables/emailBuilder/core/ui/useLayerHoverScroll.d.ts +10 -10
  137. package/dist/composables/emailBuilder/core/useEmailBuilder.d.ts +18 -0
  138. package/dist/composables/emailBuilder/export/logic/espLogicWrapper.d.ts +4 -4
  139. package/dist/composables/emailBuilder/export/targets/templateSnapshot.d.ts +24 -0
  140. package/dist/composables/emailBuilder/persistence/useEmailBuilderPersistence.d.ts +1 -1
  141. package/dist/composables/system/useColorScheme.d.ts +16 -0
  142. package/dist/editor.css +1072 -682
  143. package/dist/element-C2ZH0Z_i.js +86561 -0
  144. package/dist/element-scoped-styles.css +1072 -682
  145. package/dist/element.d.ts +1 -1
  146. package/dist/element.js +5 -2
  147. package/dist/estree-DBJlF9un.js +4876 -0
  148. package/dist/html-3PMDtB0V.js +3123 -0
  149. package/dist/index-DhFg3uKs.js +75864 -0
  150. package/dist/index.d.ts +4 -2
  151. package/dist/index.js +16 -67053
  152. package/dist/init.d.ts +95 -2
  153. package/dist/init.js +166 -122
  154. package/dist/standalone-DKWMQftY.js +2391 -0
  155. package/dist/theme.d.ts +68 -17
  156. package/dist/types/assistant.d.ts +56 -0
  157. package/dist/typescript-l6-4tT8s.js +13240 -0
  158. package/package.json +6 -3
  159. package/dist/RowPreviewLegacyComponent-CXsY4P-R.js +0 -439
  160. package/dist/RowPreviewLegacyComponent-yjHSkZLz.js +0 -439
  161. package/dist/RowPreviewRow-CBfAnQ6o.js +0 -107
  162. package/dist/RowPreviewRow-CeowK6Q_.js +0 -107
  163. package/dist/composables/emailBuilder/transform/pipeline/optimizeAI.d.ts +0 -125
  164. package/dist/element-CMhqxYnE.js +0 -67099
  165. package/dist/estree-B67dfAo1.js +0 -7989
  166. package/dist/html-DGrfikay.js +0 -7353
  167. package/dist/standalone-Bd2oQFm3.js +0 -3639
  168. package/dist/typescript-C_Ru9PRN.js +0 -23184
  169. package/dist/vue.runtime.esm-bundler-CfYyFhW6.js +0 -9097
@@ -0,0 +1,487 @@
1
+ import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeStyle, createElementBlock, createElementVNode, createCommentVNode, createTextVNode, toDisplayString, Fragment, renderList } from "vue";
2
+ const _hoisted_1 = ["innerHTML"];
3
+ const _hoisted_2 = ["src", "alt"];
4
+ const _hoisted_3 = ["src", "alt"];
5
+ const _hoisted_4 = {
6
+ style: { "width": "30%", "height": "30%", "color": "#9ca3af" },
7
+ fill: "currentColor",
8
+ viewBox: "0 0 20 20"
9
+ };
10
+ const _hoisted_5 = ["src", "alt"];
11
+ const _hoisted_6 = ["src", "alt"];
12
+ const _hoisted_7 = ["innerHTML"];
13
+ const _hoisted_8 = { key: 8 };
14
+ const _hoisted_9 = { key: 0 };
15
+ const _hoisted_10 = ["src", "alt"];
16
+ const _hoisted_11 = {
17
+ key: 1,
18
+ style: { "font-size": "7px", "color": "#9ca3af", "font-style": "italic" }
19
+ };
20
+ const _hoisted_12 = {
21
+ key: 11,
22
+ class: "rounded truncate",
23
+ style: { "font-size": "7px", "color": "#9ca3af", "background": "#f3f4f6", "padding": "1px 3px" }
24
+ };
25
+ const _sfc_main = /* @__PURE__ */ defineComponent({
26
+ __name: "RowPreviewLegacyComponent",
27
+ props: {
28
+ comp: {},
29
+ scale: {}
30
+ },
31
+ setup(__props) {
32
+ const props = __props;
33
+ const compType = computed(() => props.comp.componentType ?? props.comp.type);
34
+ function resolvePreviewHtml(html) {
35
+ if (!html) return "";
36
+ return html.replace(
37
+ /<span[^>]*\bdata-merge="([^"]+)"(?:[^>]*\bdata-merge-default="([^"]*)")?[^>]*>.*?<\/span>/gs,
38
+ (_, name, fallback) => {
39
+ const tag = name.trim();
40
+ const def = fallback == null ? void 0 : fallback.trim();
41
+ return def ? `{{ ${tag}|'${def}' }}` : `{{ ${tag} }}`;
42
+ }
43
+ );
44
+ }
45
+ function resolveBackground(item) {
46
+ var _a;
47
+ const bg = item == null ? void 0 : item.backgroundGradient;
48
+ const hasGradient = (bg == null ? void 0 : bg.useGradient) === true && Array.isArray((_a = bg == null ? void 0 : bg.gradient) == null ? void 0 : _a.colors) && bg.gradient.colors.length >= 2;
49
+ if (hasGradient) {
50
+ const { type, direction, colors } = bg.gradient;
51
+ const stops = colors.map((c) => `${c.color} ${c.position}%`).join(", ");
52
+ return type === "radial" ? `radial-gradient(circle at center, ${stops})` : `linear-gradient(${direction}, ${stops})`;
53
+ }
54
+ return (item == null ? void 0 : item.backgroundColor) || "transparent";
55
+ }
56
+ function loadGoogleFont(fontFamily) {
57
+ if (!fontFamily) return;
58
+ const knownGoogleFonts = [
59
+ "Roboto",
60
+ "Open Sans",
61
+ "Lato",
62
+ "Montserrat",
63
+ "Poppins",
64
+ "Nunito",
65
+ "Raleway",
66
+ "Plus Jakarta Sans"
67
+ ];
68
+ const isGoogle = fontFamily.includes(" ") || knownGoogleFonts.some((f) => fontFamily.includes(f));
69
+ if (isGoogle && typeof document !== "undefined") {
70
+ const formatted = fontFamily.replace(/ /g, "+");
71
+ const href = `https://fonts.googleapis.com/css2?family=${formatted}:wght@300;400;500;600;700;800&display=swap`;
72
+ if (!document.querySelector(`link[href="${href}"]`)) {
73
+ const link = document.createElement("link");
74
+ link.href = href;
75
+ link.rel = "stylesheet";
76
+ document.head.appendChild(link);
77
+ }
78
+ }
79
+ }
80
+ function headingStyle(p) {
81
+ var _a, _b, _c, _d, _e, _f, _g, _h;
82
+ if (p == null ? void 0 : p.fontFamily) loadGoogleFont(p.fontFamily);
83
+ return {
84
+ fontSize: Math.max(7, (p == null ? void 0 : p.fontSize) || 24) + "px",
85
+ color: (p == null ? void 0 : p.color) || "#111111",
86
+ fontWeight: (p == null ? void 0 : p.fontWeight) || "bold",
87
+ fontFamily: (p == null ? void 0 : p.fontFamily) || "Arial, sans-serif",
88
+ textAlign: (p == null ? void 0 : p.align) || "left",
89
+ lineHeight: String((p == null ? void 0 : p.lineHeight) ?? 1.2),
90
+ letterSpacing: `${(p == null ? void 0 : p.letterSpacing) ?? 0}px`,
91
+ textTransform: (p == null ? void 0 : p.textTransform) || "none",
92
+ textDecoration: (p == null ? void 0 : p.textDecoration) || "none",
93
+ background: resolveBackground(p),
94
+ margin: `${((_a = p == null ? void 0 : p.margin) == null ? void 0 : _a.top) ?? 0}px ${((_b = p == null ? void 0 : p.margin) == null ? void 0 : _b.right) ?? 0}px ${((_c = p == null ? void 0 : p.margin) == null ? void 0 : _c.bottom) ?? 4}px ${((_d = p == null ? void 0 : p.margin) == null ? void 0 : _d.left) ?? 0}px`,
95
+ padding: `${((_e = p == null ? void 0 : p.padding) == null ? void 0 : _e.top) ?? 0}px ${((_f = p == null ? void 0 : p.padding) == null ? void 0 : _f.right) ?? 0}px ${((_g = p == null ? void 0 : p.padding) == null ? void 0 : _g.bottom) ?? 0}px ${((_h = p == null ? void 0 : p.padding) == null ? void 0 : _h.left) ?? 0}px`
96
+ };
97
+ }
98
+ function paragraphStyle(p) {
99
+ var _a, _b, _c, _d, _e, _f, _g, _h;
100
+ if (p == null ? void 0 : p.fontFamily) loadGoogleFont(p.fontFamily);
101
+ return {
102
+ fontSize: Math.max(6, (p == null ? void 0 : p.fontSize) || 16) + "px",
103
+ color: (p == null ? void 0 : p.color) || "#111111",
104
+ fontFamily: (p == null ? void 0 : p.fontFamily) || "Arial, sans-serif",
105
+ fontWeight: (p == null ? void 0 : p.fontWeight) || "normal",
106
+ fontStyle: (p == null ? void 0 : p.fontStyle) || "normal",
107
+ textAlign: (p == null ? void 0 : p.align) || "left",
108
+ lineHeight: String((p == null ? void 0 : p.lineHeight) ?? 1.5),
109
+ letterSpacing: `${(p == null ? void 0 : p.letterSpacing) ?? 0}px`,
110
+ textTransform: (p == null ? void 0 : p.textTransform) || "none",
111
+ textDecoration: (p == null ? void 0 : p.textDecoration) || "none",
112
+ background: resolveBackground(p),
113
+ margin: `${((_a = p == null ? void 0 : p.margin) == null ? void 0 : _a.top) ?? 0}px ${((_b = p == null ? void 0 : p.margin) == null ? void 0 : _b.right) ?? 0}px ${((_c = p == null ? void 0 : p.margin) == null ? void 0 : _c.bottom) ?? 4}px ${((_d = p == null ? void 0 : p.margin) == null ? void 0 : _d.left) ?? 0}px`,
114
+ padding: `${((_e = p == null ? void 0 : p.padding) == null ? void 0 : _e.top) ?? 0}px ${((_f = p == null ? void 0 : p.padding) == null ? void 0 : _f.right) ?? 0}px ${((_g = p == null ? void 0 : p.padding) == null ? void 0 : _g.bottom) ?? 0}px ${((_h = p == null ? void 0 : p.padding) == null ? void 0 : _h.left) ?? 0}px`
115
+ };
116
+ }
117
+ function imageContainerStyle(p) {
118
+ var _a, _b, _c, _d, _e, _f, _g, _h;
119
+ return {
120
+ margin: `${((_a = p == null ? void 0 : p.margin) == null ? void 0 : _a.top) ?? 0}px ${((_b = p == null ? void 0 : p.margin) == null ? void 0 : _b.right) ?? 0}px ${((_c = p == null ? void 0 : p.margin) == null ? void 0 : _c.bottom) ?? 0}px ${((_d = p == null ? void 0 : p.margin) == null ? void 0 : _d.left) ?? 0}px`,
121
+ padding: `${((_e = p == null ? void 0 : p.padding) == null ? void 0 : _e.top) ?? 0}px ${((_f = p == null ? void 0 : p.padding) == null ? void 0 : _f.right) ?? 0}px ${((_g = p == null ? void 0 : p.padding) == null ? void 0 : _g.bottom) ?? 0}px ${((_h = p == null ? void 0 : p.padding) == null ? void 0 : _h.left) ?? 0}px`,
122
+ textAlign: (p == null ? void 0 : p.align) || "left"
123
+ };
124
+ }
125
+ function imageStyle(p) {
126
+ var _a, _b, _c;
127
+ const align = (p == null ? void 0 : p.align) || "left";
128
+ return {
129
+ width: ((p == null ? void 0 : p.width) || 100) + "%",
130
+ height: (p == null ? void 0 : p.height) || "auto",
131
+ borderRadius: ((p == null ? void 0 : p.borderRadius) || 0) + "px",
132
+ border: `${((_a = p == null ? void 0 : p.border) == null ? void 0 : _a.width) || 0}px ${((_b = p == null ? void 0 : p.border) == null ? void 0 : _b.style) || "solid"} ${((_c = p == null ? void 0 : p.border) == null ? void 0 : _c.color) || "#000000"}`,
133
+ display: "block",
134
+ margin: align === "center" ? "0 auto" : align === "right" ? "0 0 0 auto" : "0"
135
+ };
136
+ }
137
+ function videoContainerStyle(p) {
138
+ var _a, _b, _c, _d, _e, _f, _g, _h;
139
+ return {
140
+ margin: `${((_a = p == null ? void 0 : p.margin) == null ? void 0 : _a.top) ?? 0}px ${((_b = p == null ? void 0 : p.margin) == null ? void 0 : _b.right) ?? 0}px ${((_c = p == null ? void 0 : p.margin) == null ? void 0 : _c.bottom) ?? 0}px ${((_d = p == null ? void 0 : p.margin) == null ? void 0 : _d.left) ?? 0}px`,
141
+ padding: `${((_e = p == null ? void 0 : p.padding) == null ? void 0 : _e.top) ?? 0}px ${((_f = p == null ? void 0 : p.padding) == null ? void 0 : _f.right) ?? 0}px ${((_g = p == null ? void 0 : p.padding) == null ? void 0 : _g.bottom) ?? 0}px ${((_h = p == null ? void 0 : p.padding) == null ? void 0 : _h.left) ?? 0}px`,
142
+ textAlign: (p == null ? void 0 : p.align) || "left",
143
+ maxWidth: "100%"
144
+ };
145
+ }
146
+ function videoThumbnailStyle(p) {
147
+ var _a, _b, _c;
148
+ const align = (p == null ? void 0 : p.align) || "left";
149
+ return {
150
+ width: "100%",
151
+ maxWidth: "100%",
152
+ paddingBottom: "56.25%",
153
+ height: "0",
154
+ position: "relative",
155
+ display: "inline-block",
156
+ borderRadius: ((p == null ? void 0 : p.borderRadius) || 0) + "px",
157
+ border: `${((_a = p == null ? void 0 : p.border) == null ? void 0 : _a.width) || 0}px ${((_b = p == null ? void 0 : p.border) == null ? void 0 : _b.style) || "solid"} ${((_c = p == null ? void 0 : p.border) == null ? void 0 : _c.color) || "#000000"}`,
158
+ overflow: "hidden",
159
+ marginLeft: align === "center" ? "auto" : align === "right" ? "auto" : "0",
160
+ marginRight: align === "center" ? "auto" : "0",
161
+ boxSizing: "border-box"
162
+ };
163
+ }
164
+ function videoImageStyle() {
165
+ return {
166
+ position: "absolute",
167
+ top: "0",
168
+ left: "0",
169
+ width: "100%",
170
+ height: "100%",
171
+ objectFit: "cover",
172
+ display: "block"
173
+ };
174
+ }
175
+ function videoPlaceholderStyle() {
176
+ return {
177
+ position: "absolute",
178
+ top: "0",
179
+ left: "0",
180
+ width: "100%",
181
+ height: "100%",
182
+ background: "#e5e7eb",
183
+ display: "flex",
184
+ alignItems: "center",
185
+ justifyContent: "center"
186
+ };
187
+ }
188
+ function buttonContainerStyle(p) {
189
+ var _a, _b, _c, _d;
190
+ return {
191
+ margin: `${((_a = p == null ? void 0 : p.margin) == null ? void 0 : _a.top) ?? 0}px ${((_b = p == null ? void 0 : p.margin) == null ? void 0 : _b.right) ?? 0}px ${((_c = p == null ? void 0 : p.margin) == null ? void 0 : _c.bottom) ?? 4}px ${((_d = p == null ? void 0 : p.margin) == null ? void 0 : _d.left) ?? 0}px`,
192
+ textAlign: (p == null ? void 0 : p.align) || "center"
193
+ };
194
+ }
195
+ function buttonStyle(p) {
196
+ var _a, _b, _c, _d, _e, _f, _g;
197
+ if (p == null ? void 0 : p.fontFamily) loadGoogleFont(p.fontFamily);
198
+ const hasIcon = !!(p == null ? void 0 : p.icon);
199
+ return {
200
+ background: resolveBackground(p),
201
+ color: (p == null ? void 0 : p.color) || "#ffffff",
202
+ fontSize: Math.max(5, (p == null ? void 0 : p.fontSize) || 16) + "px",
203
+ fontWeight: (p == null ? void 0 : p.fontWeight) || "500",
204
+ fontFamily: (p == null ? void 0 : p.fontFamily) || "Arial, sans-serif",
205
+ letterSpacing: `${(p == null ? void 0 : p.letterSpacing) ?? 0}px`,
206
+ padding: `${((_a = p == null ? void 0 : p.padding) == null ? void 0 : _a.top) ?? 8}px ${((_b = p == null ? void 0 : p.padding) == null ? void 0 : _b.right) ?? 16}px ${((_c = p == null ? void 0 : p.padding) == null ? void 0 : _c.bottom) ?? 8}px ${((_d = p == null ? void 0 : p.padding) == null ? void 0 : _d.left) ?? 16}px`,
207
+ borderRadius: ((p == null ? void 0 : p.borderRadius) || 4) + "px",
208
+ border: `${((_e = p == null ? void 0 : p.border) == null ? void 0 : _e.width) || 0}px ${((_f = p == null ? void 0 : p.border) == null ? void 0 : _f.style) || "solid"} ${((_g = p == null ? void 0 : p.border) == null ? void 0 : _g.color) || "#000000"}`,
209
+ // Icon branch uses inline-flex so icon + text align cleanly on one row.
210
+ // Plain branch stays inline-block (unchanged behaviour).
211
+ ...hasIcon ? {
212
+ display: "inline-flex",
213
+ alignItems: "center",
214
+ verticalAlign: "middle"
215
+ } : { display: "inline-block" },
216
+ lineHeight: "1.2",
217
+ textDecoration: "none"
218
+ };
219
+ }
220
+ function buttonIconStyle(p) {
221
+ const size = Math.max(4, (p == null ? void 0 : p.iconSize) ?? 20);
222
+ const gap = (p == null ? void 0 : p.iconGap) ?? 8;
223
+ const isBefore = (p == null ? void 0 : p.iconPosition) !== "after";
224
+ return {
225
+ display: "block",
226
+ width: size + "px",
227
+ height: size + "px",
228
+ flexShrink: "0",
229
+ marginRight: isBefore ? gap + "px" : "0",
230
+ marginLeft: isBefore ? "0" : gap + "px"
231
+ };
232
+ }
233
+ function onIconError(e) {
234
+ const img = e.target;
235
+ img.style.display = "none";
236
+ }
237
+ function anchorContainerStyle(p) {
238
+ var _a, _b, _c, _d, _e, _f, _g, _h;
239
+ return {
240
+ margin: `${((_a = p == null ? void 0 : p.margin) == null ? void 0 : _a.top) ?? 0}px ${((_b = p == null ? void 0 : p.margin) == null ? void 0 : _b.right) ?? 0}px ${((_c = p == null ? void 0 : p.margin) == null ? void 0 : _c.bottom) ?? 4}px ${((_d = p == null ? void 0 : p.margin) == null ? void 0 : _d.left) ?? 0}px`,
241
+ padding: `${((_e = p == null ? void 0 : p.padding) == null ? void 0 : _e.top) ?? 0}px ${((_f = p == null ? void 0 : p.padding) == null ? void 0 : _f.right) ?? 0}px ${((_g = p == null ? void 0 : p.padding) == null ? void 0 : _g.bottom) ?? 0}px ${((_h = p == null ? void 0 : p.padding) == null ? void 0 : _h.left) ?? 0}px`,
242
+ textAlign: (p == null ? void 0 : p.align) || "left"
243
+ };
244
+ }
245
+ function anchorStyle(p) {
246
+ if (p == null ? void 0 : p.fontFamily) loadGoogleFont(p.fontFamily);
247
+ return {
248
+ color: (p == null ? void 0 : p.color) || "#007bff",
249
+ fontSize: Math.max(6, (p == null ? void 0 : p.fontSize) || 16) + "px",
250
+ fontWeight: (p == null ? void 0 : p.fontWeight) || "normal",
251
+ fontFamily: (p == null ? void 0 : p.fontFamily) || "Arial, sans-serif",
252
+ letterSpacing: `${(p == null ? void 0 : p.letterSpacing) ?? 0}px`,
253
+ textDecoration: (p == null ? void 0 : p.textDecoration) || "underline"
254
+ };
255
+ }
256
+ function listWrapStyle(p) {
257
+ var _a, _b, _c, _d, _e, _f, _g, _h;
258
+ if (p == null ? void 0 : p.fontFamily) loadGoogleFont(p.fontFamily);
259
+ return {
260
+ margin: `${((_a = p == null ? void 0 : p.margin) == null ? void 0 : _a.top) ?? 0}px ${((_b = p == null ? void 0 : p.margin) == null ? void 0 : _b.right) ?? 0}px ${((_c = p == null ? void 0 : p.margin) == null ? void 0 : _c.bottom) ?? 0}px ${((_d = p == null ? void 0 : p.margin) == null ? void 0 : _d.left) ?? 0}px`,
261
+ padding: `${((_e = p == null ? void 0 : p.padding) == null ? void 0 : _e.top) ?? 0}px ${((_f = p == null ? void 0 : p.padding) == null ? void 0 : _f.right) ?? 0}px ${((_g = p == null ? void 0 : p.padding) == null ? void 0 : _g.bottom) ?? 0}px ${((_h = p == null ? void 0 : p.padding) == null ? void 0 : _h.left) ?? 16}px`,
262
+ fontSize: Math.max(6, (p == null ? void 0 : p.fontSize) || 16) + "px",
263
+ fontFamily: (p == null ? void 0 : p.fontFamily) || "Arial, sans-serif",
264
+ lineHeight: String((p == null ? void 0 : p.lineHeight) ?? 1.5),
265
+ letterSpacing: `${(p == null ? void 0 : p.letterSpacing) ?? 0}px`,
266
+ color: (p == null ? void 0 : p.color) || "#111111",
267
+ background: resolveBackground(p)
268
+ };
269
+ }
270
+ function dividerContainerStyle(p) {
271
+ var _a, _b, _c, _d, _e, _f, _g, _h;
272
+ return {
273
+ margin: `${((_a = p == null ? void 0 : p.margin) == null ? void 0 : _a.top) ?? 0}px ${((_b = p == null ? void 0 : p.margin) == null ? void 0 : _b.right) ?? 0}px ${((_c = p == null ? void 0 : p.margin) == null ? void 0 : _c.bottom) ?? 0}px ${((_d = p == null ? void 0 : p.margin) == null ? void 0 : _d.left) ?? 0}px`,
274
+ padding: `${((_e = p == null ? void 0 : p.padding) == null ? void 0 : _e.top) ?? 0}px ${((_f = p == null ? void 0 : p.padding) == null ? void 0 : _f.right) ?? 0}px ${((_g = p == null ? void 0 : p.padding) == null ? void 0 : _g.bottom) ?? 0}px ${((_h = p == null ? void 0 : p.padding) == null ? void 0 : _h.left) ?? 0}px`,
275
+ textAlign: (p == null ? void 0 : p.align) || "left"
276
+ };
277
+ }
278
+ function dividerStyle(p) {
279
+ const align = (p == null ? void 0 : p.align) || "left";
280
+ return {
281
+ width: ((p == null ? void 0 : p.width) || 100) + "%",
282
+ height: ((p == null ? void 0 : p.height) || 1) + "px",
283
+ background: resolveBackground(p),
284
+ border: "none",
285
+ margin: align === "center" ? "0 auto" : align === "right" ? "0 0 0 auto" : "0"
286
+ };
287
+ }
288
+ function spacerStyle(p) {
289
+ return {
290
+ width: "100%",
291
+ height: ((p == null ? void 0 : p.height) || 16) + "px",
292
+ background: resolveBackground(p)
293
+ };
294
+ }
295
+ function menuContainerStyle(p) {
296
+ var _a, _b, _c, _d, _e, _f, _g, _h;
297
+ if (p == null ? void 0 : p.fontFamily) loadGoogleFont(p.fontFamily);
298
+ return {
299
+ margin: `${((_a = p == null ? void 0 : p.margin) == null ? void 0 : _a.top) ?? 0}px ${((_b = p == null ? void 0 : p.margin) == null ? void 0 : _b.right) ?? 0}px ${((_c = p == null ? void 0 : p.margin) == null ? void 0 : _c.bottom) ?? 0}px ${((_d = p == null ? void 0 : p.margin) == null ? void 0 : _d.left) ?? 0}px`,
300
+ padding: `${((_e = p == null ? void 0 : p.padding) == null ? void 0 : _e.top) ?? 0}px ${((_f = p == null ? void 0 : p.padding) == null ? void 0 : _f.right) ?? 0}px ${((_g = p == null ? void 0 : p.padding) == null ? void 0 : _g.bottom) ?? 0}px ${((_h = p == null ? void 0 : p.padding) == null ? void 0 : _h.left) ?? 0}px`,
301
+ textAlign: (p == null ? void 0 : p.align) || "left",
302
+ lineHeight: "0",
303
+ background: resolveBackground(p)
304
+ };
305
+ }
306
+ function menuItemStyle(p, index, total) {
307
+ if (p == null ? void 0 : p.fontFamily) loadGoogleFont(p.fontFamily);
308
+ const isStacked = (p == null ? void 0 : p.mobileStack) === true;
309
+ const spacing = (p == null ? void 0 : p.spacing) ?? 8;
310
+ const isFirst = index === 0;
311
+ const isLast = index === total - 1;
312
+ return {
313
+ // display is always block, used for showcase
314
+ display: "inline-block",
315
+ marginLeft: isFirst ? "0px" : `${spacing / 2}px`,
316
+ marginRight: isLast ? "0px" : `${spacing / 2}px`,
317
+ // marginBottom: isStacked && !isLast ? `${spacing}px` : "0",
318
+ fontSize: Math.max(6, (p == null ? void 0 : p.fontSize) ?? 14) + "px",
319
+ lineHeight: String((p == null ? void 0 : p.lineHeight) ?? 1.4),
320
+ letterSpacing: ((p == null ? void 0 : p.letterSpacing) ?? 0) + "px",
321
+ color: (p == null ? void 0 : p.color) || "#111111",
322
+ fontWeight: (p == null ? void 0 : p.fontWeight) || "normal",
323
+ fontFamily: (p == null ? void 0 : p.fontFamily) ? `'${p.fontFamily}', Arial, sans-serif` : "Arial, sans-serif",
324
+ fontStyle: (p == null ? void 0 : p.fontStyle) || "normal",
325
+ textTransform: (p == null ? void 0 : p.textTransform) || "none",
326
+ textDecoration: (p == null ? void 0 : p.textDecoration) || "none",
327
+ whiteSpace: isStacked ? "normal" : "nowrap",
328
+ cursor: "default"
329
+ };
330
+ }
331
+ function socialsContainerStyle(p) {
332
+ var _a, _b, _c, _d, _e, _f, _g, _h;
333
+ return {
334
+ margin: `${((_a = p == null ? void 0 : p.margin) == null ? void 0 : _a.top) ?? 0}px ${((_b = p == null ? void 0 : p.margin) == null ? void 0 : _b.right) ?? 0}px ${((_c = p == null ? void 0 : p.margin) == null ? void 0 : _c.bottom) ?? 0}px ${((_d = p == null ? void 0 : p.margin) == null ? void 0 : _d.left) ?? 0}px`,
335
+ padding: `${((_e = p == null ? void 0 : p.padding) == null ? void 0 : _e.top) ?? 0}px ${((_f = p == null ? void 0 : p.padding) == null ? void 0 : _f.right) ?? 0}px ${((_g = p == null ? void 0 : p.padding) == null ? void 0 : _g.bottom) ?? 0}px ${((_h = p == null ? void 0 : p.padding) == null ? void 0 : _h.left) ?? 0}px`,
336
+ textAlign: (p == null ? void 0 : p.align) || "left",
337
+ display: "flex",
338
+ flexWrap: "wrap",
339
+ gap: ((p == null ? void 0 : p.spacing) ?? 8) + "px",
340
+ justifyContent: (p == null ? void 0 : p.align) === "center" ? "center" : (p == null ? void 0 : p.align) === "right" ? "flex-end" : "flex-start"
341
+ };
342
+ }
343
+ return (_ctx, _cache) => {
344
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
345
+ return compType.value === "heading" ? (openBlock(), createBlock(resolveDynamicComponent(((_a = __props.comp.props) == null ? void 0 : _a.level) || "h2"), {
346
+ key: 0,
347
+ style: normalizeStyle(headingStyle(__props.comp.props)),
348
+ class: "truncate",
349
+ innerHTML: resolvePreviewHtml((_b = __props.comp.props) == null ? void 0 : _b.content) || "Heading"
350
+ }, null, 8, ["style", "innerHTML"])) : compType.value === "paragraph" ? (openBlock(), createElementBlock("p", {
351
+ key: 1,
352
+ style: normalizeStyle([paragraphStyle(__props.comp.props), { "display": "-webkit-box", "-webkit-line-clamp": "2", "-webkit-box-orient": "vertical" }]),
353
+ class: "overflow-hidden",
354
+ innerHTML: resolvePreviewHtml((_c = __props.comp.props) == null ? void 0 : _c.content) || "Text"
355
+ }, null, 12, _hoisted_1)) : compType.value === "image" ? (openBlock(), createElementBlock("div", {
356
+ key: 2,
357
+ style: normalizeStyle(imageContainerStyle(__props.comp.props))
358
+ }, [
359
+ createElementVNode("img", {
360
+ src: (_d = __props.comp.props) == null ? void 0 : _d.src,
361
+ alt: ((_e = __props.comp.props) == null ? void 0 : _e.alt) || "",
362
+ style: normalizeStyle(imageStyle(__props.comp.props))
363
+ }, null, 12, _hoisted_2)
364
+ ], 4)) : compType.value === "video" ? (openBlock(), createElementBlock("div", {
365
+ key: 3,
366
+ style: normalizeStyle(videoContainerStyle(__props.comp.props))
367
+ }, [
368
+ createElementVNode("div", {
369
+ style: normalizeStyle(videoThumbnailStyle(__props.comp.props))
370
+ }, [
371
+ ((_f = __props.comp.props) == null ? void 0 : _f.coverImage) ? (openBlock(), createElementBlock("img", {
372
+ key: 0,
373
+ src: __props.comp.props.coverImage,
374
+ alt: ((_g = __props.comp.props) == null ? void 0 : _g.alt) || "Video",
375
+ style: normalizeStyle(videoImageStyle())
376
+ }, null, 12, _hoisted_3)) : (openBlock(), createElementBlock("div", {
377
+ key: 1,
378
+ style: normalizeStyle(videoPlaceholderStyle())
379
+ }, [
380
+ (openBlock(), createElementBlock("svg", _hoisted_4, [..._cache[0] || (_cache[0] = [
381
+ createElementVNode("path", {
382
+ "fill-rule": "evenodd",
383
+ 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",
384
+ "clip-rule": "evenodd"
385
+ }, null, -1)
386
+ ])]))
387
+ ], 4))
388
+ ], 4)
389
+ ], 4)) : compType.value === "button" ? (openBlock(), createElementBlock("div", {
390
+ key: 4,
391
+ style: normalizeStyle(buttonContainerStyle(__props.comp.props))
392
+ }, [
393
+ createElementVNode("span", {
394
+ style: normalizeStyle(buttonStyle(__props.comp.props)),
395
+ class: "inline-block truncate"
396
+ }, [
397
+ ((_h = __props.comp.props) == null ? void 0 : _h.icon) && ((_i = __props.comp.props) == null ? void 0 : _i.iconPosition) !== "after" ? (openBlock(), createElementBlock("img", {
398
+ key: 0,
399
+ src: __props.comp.props.icon,
400
+ alt: ((_j = __props.comp.props) == null ? void 0 : _j.iconAlt) || "",
401
+ style: normalizeStyle(buttonIconStyle(__props.comp.props)),
402
+ onError: onIconError
403
+ }, null, 44, _hoisted_5)) : createCommentVNode("", true),
404
+ createTextVNode(" " + toDisplayString(((_k = __props.comp.props) == null ? void 0 : _k.text) || "Button") + " ", 1),
405
+ ((_l = __props.comp.props) == null ? void 0 : _l.icon) && ((_m = __props.comp.props) == null ? void 0 : _m.iconPosition) === "after" ? (openBlock(), createElementBlock("img", {
406
+ key: 1,
407
+ src: __props.comp.props.icon,
408
+ alt: ((_n = __props.comp.props) == null ? void 0 : _n.iconAlt) || "",
409
+ style: normalizeStyle(buttonIconStyle(__props.comp.props)),
410
+ onError: onIconError
411
+ }, null, 44, _hoisted_6)) : createCommentVNode("", true)
412
+ ], 4)
413
+ ], 4)) : compType.value === "anchor" ? (openBlock(), createElementBlock("div", {
414
+ key: 5,
415
+ style: normalizeStyle(anchorContainerStyle(__props.comp.props))
416
+ }, [
417
+ createElementVNode("span", {
418
+ style: normalizeStyle(anchorStyle(__props.comp.props)),
419
+ class: "truncate block"
420
+ }, toDisplayString(((_o = __props.comp.props) == null ? void 0 : _o.text) || "Link"), 5)
421
+ ], 4)) : compType.value === "list" ? (openBlock(), createElementBlock("div", {
422
+ key: 6,
423
+ style: normalizeStyle(listWrapStyle(__props.comp.props)),
424
+ innerHTML: resolvePreviewHtml((_p = __props.comp.props) == null ? void 0 : _p.content) || "<ul><li>Item</li></ul>"
425
+ }, null, 12, _hoisted_7)) : compType.value === "divider" ? (openBlock(), createElementBlock("div", {
426
+ key: 7,
427
+ style: normalizeStyle(dividerContainerStyle(__props.comp.props))
428
+ }, [
429
+ createElementVNode("hr", {
430
+ style: normalizeStyle(dividerStyle(__props.comp.props))
431
+ }, null, 4)
432
+ ], 4)) : compType.value === "spacer" ? (openBlock(), createElementBlock("div", _hoisted_8, [
433
+ createElementVNode("div", {
434
+ style: normalizeStyle(spacerStyle(__props.comp.props))
435
+ }, null, 4)
436
+ ])) : compType.value === "menu" ? (openBlock(), createElementBlock("div", {
437
+ key: 9,
438
+ style: normalizeStyle(menuContainerStyle(__props.comp.props))
439
+ }, [
440
+ !((_r = (_q = __props.comp.props) == null ? void 0 : _q.items) == null ? void 0 : _r.some((i) => i.enabled && i.label)) ? (openBlock(), createElementBlock("div", _hoisted_9, " Menu ")) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(__props.comp.props.items.filter(
441
+ (i) => i.enabled && i.label
442
+ ), (item, idx) => {
443
+ return openBlock(), createElementBlock("span", {
444
+ key: item._id || idx,
445
+ style: normalizeStyle(
446
+ menuItemStyle(
447
+ __props.comp.props,
448
+ Number(idx),
449
+ __props.comp.props.items.filter((i) => i.enabled && i.label).length
450
+ )
451
+ )
452
+ }, toDisplayString(item.label), 5);
453
+ }), 128))
454
+ ], 4)) : compType.value === "socials" ? (openBlock(), createElementBlock("div", {
455
+ key: 10,
456
+ style: normalizeStyle(socialsContainerStyle(__props.comp.props))
457
+ }, [
458
+ ((_t = (_s = __props.comp.props) == null ? void 0 : _s.platforms) == null ? void 0 : _t.some((p) => p.enabled && p.link)) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.comp.props.platforms.filter(
459
+ (p) => p.enabled && p.link
460
+ ), (platform) => {
461
+ var _a2, _b2;
462
+ return openBlock(), createElementBlock("span", {
463
+ key: platform.name,
464
+ style: {
465
+ display: "inline-flex",
466
+ alignItems: "center",
467
+ justifyContent: "center"
468
+ }
469
+ }, [
470
+ createElementVNode("img", {
471
+ src: platform.icon,
472
+ alt: platform.name,
473
+ style: normalizeStyle({
474
+ width: (((_a2 = __props.comp.props) == null ? void 0 : _a2.iconSize) || 24) + "px",
475
+ height: (((_b2 = __props.comp.props) == null ? void 0 : _b2.iconSize) || 24) + "px",
476
+ display: "block"
477
+ })
478
+ }, null, 12, _hoisted_10)
479
+ ]);
480
+ }), 128)) : (openBlock(), createElementBlock("span", _hoisted_11, "Socials"))
481
+ ], 4)) : (openBlock(), createElementBlock("div", _hoisted_12, toDisplayString(compType.value), 1));
482
+ };
483
+ }
484
+ });
485
+ export {
486
+ _sfc_main as default
487
+ };
@@ -0,0 +1,112 @@
1
+ import { defineComponent, defineAsyncComponent, computed, openBlock, createElementBlock, normalizeStyle, Fragment, renderList, createVNode, unref, createCommentVNode } from "vue";
2
+ const _hoisted_1 = {
3
+ key: 0,
4
+ class: "w-full border border-dashed border-(--md-border) rounded",
5
+ style: { "min-height": "10px" }
6
+ };
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "RowPreviewRow",
9
+ props: {
10
+ row: {},
11
+ scale: {},
12
+ depth: {}
13
+ },
14
+ setup(__props) {
15
+ const RowPreviewChildren = defineAsyncComponent(
16
+ () => import("./RowPreviewChildren-OsbF7_vu.js")
17
+ );
18
+ const props = __props;
19
+ function resolveBackground(item) {
20
+ var _a;
21
+ const bg = item == null ? void 0 : item.backgroundGradient;
22
+ const hasGradient = (bg == null ? void 0 : bg.useGradient) === true && Array.isArray((_a = bg == null ? void 0 : bg.gradient) == null ? void 0 : _a.colors) && bg.gradient.colors.length >= 2;
23
+ if (hasGradient) {
24
+ const { type, direction, colors } = bg.gradient;
25
+ const stops = colors.map((c) => `${c.color} ${c.position}%`).join(", ");
26
+ return type === "radial" ? `radial-gradient(circle at center, ${stops})` : `linear-gradient(${direction}, ${stops})`;
27
+ }
28
+ return (item == null ? void 0 : item.backgroundColor) ?? "transparent";
29
+ }
30
+ const rowStyle = computed(() => {
31
+ var _a, _b, _c, _d, _e, _f, _g, _h;
32
+ const r = props.row;
33
+ const style = {
34
+ display: "flex",
35
+ flexDirection: "row",
36
+ background: resolveBackground(r),
37
+ padding: `${((_a = r.padding) == null ? void 0 : _a.top) ?? 0}px ${((_b = r.padding) == null ? void 0 : _b.right) ?? 0}px ${((_c = r.padding) == null ? void 0 : _c.bottom) ?? 0}px ${((_d = r.padding) == null ? void 0 : _d.left) ?? 0}px`,
38
+ alignItems: "stretch",
39
+ border: `${((_e = r.border) == null ? void 0 : _e.width) ?? 0}px ${((_f = r.border) == null ? void 0 : _f.style) ?? "solid"} ${((_g = r.border) == null ? void 0 : _g.color) ?? "transparent"}`,
40
+ borderRadius: `${((_h = r.border) == null ? void 0 : _h.radius) ?? 0}px`,
41
+ gap: `${r.gap ?? 0}px`,
42
+ overflow: "hidden"
43
+ };
44
+ if (r.backgroundImage) {
45
+ style.backgroundImage = `url(${r.backgroundImage})`;
46
+ style.backgroundSize = r.backgroundSize ?? "cover";
47
+ style.backgroundPosition = r.backgroundPosition ?? "center center";
48
+ }
49
+ return style;
50
+ });
51
+ function colStyle(col, parentRow) {
52
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
53
+ const verticalAlignMap = {
54
+ top: "flex-start",
55
+ middle: "center",
56
+ bottom: "flex-end"
57
+ };
58
+ const widthPct = col.width ?? 50;
59
+ const siblingCount = ((_a = parentRow == null ? void 0 : parentRow.columns) == null ? void 0 : _a.length) || 1;
60
+ const gapPx = (parentRow == null ? void 0 : parentRow.gap) ?? 0;
61
+ const gapShare = siblingCount > 1 ? gapPx * (siblingCount - 1) / siblingCount : 0;
62
+ const widthValue = gapShare > 0 ? `calc(${widthPct}% - ${gapShare}px)` : `${widthPct}%`;
63
+ const style = {
64
+ flex: `0 0 ${widthValue}`,
65
+ width: widthValue,
66
+ maxWidth: widthValue,
67
+ boxSizing: "border-box",
68
+ background: resolveBackground(col),
69
+ padding: `${((_b = col.padding) == null ? void 0 : _b.top) ?? 10}px ${((_c = col.padding) == null ? void 0 : _c.right) ?? 10}px ${((_d = col.padding) == null ? void 0 : _d.bottom) ?? 10}px ${((_e = col.padding) == null ? void 0 : _e.left) ?? 10}px`,
70
+ border: `${((_f = col.border) == null ? void 0 : _f.width) ?? 0}px ${((_g = col.border) == null ? void 0 : _g.style) ?? "solid"} ${((_h = col.border) == null ? void 0 : _h.color) ?? "transparent"}`,
71
+ borderRadius: `${((_i = col.border) == null ? void 0 : _i.radius) ?? 0}px`,
72
+ overflow: "hidden",
73
+ minWidth: "0",
74
+ display: "flex",
75
+ flexDirection: "column",
76
+ justifyContent: verticalAlignMap[col.verticalAlign] ?? "flex-start"
77
+ };
78
+ if (col.backgroundImage) {
79
+ style.backgroundImage = `url(${col.backgroundImage})`;
80
+ style.backgroundSize = col.backgroundSize ?? "cover";
81
+ style.backgroundPosition = col.backgroundPosition ?? "center center";
82
+ style.minHeight = "14px";
83
+ }
84
+ return style;
85
+ }
86
+ return (_ctx, _cache) => {
87
+ return (__props.depth ?? 0) < 5 ? (openBlock(), createElementBlock("div", {
88
+ key: 0,
89
+ style: normalizeStyle(rowStyle.value),
90
+ class: "w-full"
91
+ }, [
92
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.row.columns ?? [], (col) => {
93
+ return openBlock(), createElementBlock("div", {
94
+ key: col.id,
95
+ style: normalizeStyle(colStyle(col, __props.row)),
96
+ class: "overflow-hidden shrink-0"
97
+ }, [
98
+ createVNode(unref(RowPreviewChildren), {
99
+ children: col.children ?? col.components ?? [],
100
+ scale: __props.scale,
101
+ depth: (__props.depth ?? 0) + 1
102
+ }, null, 8, ["children", "scale", "depth"]),
103
+ (col.children ?? col.components ?? []).length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1)) : createCommentVNode("", true)
104
+ ], 4);
105
+ }), 128))
106
+ ], 4)) : createCommentVNode("", true);
107
+ };
108
+ }
109
+ });
110
+ export {
111
+ _sfc_main as default
112
+ };