@maildeno/editor 0.4.4 → 0.4.6

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 (226) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/DatePicker-6dMK-shv.js +5639 -0
  3. package/dist/DatePicker-CEm1DPgG.js +5640 -0
  4. package/dist/HealthIndicator-Ch5Ck0BL.js +1954 -0
  5. package/dist/HealthIndicator-Dr5vMr1T.js +1953 -0
  6. package/dist/PreviewCanvas-CG52GC5m.js +667 -0
  7. package/dist/PreviewCanvas-CjOrVIGt.js +668 -0
  8. package/dist/RichTextEditor-DaaHuVox.js +13487 -0
  9. package/dist/RichTextEditor-DoWpYF0R.js +13432 -0
  10. package/dist/RowPreviewChildren-DQoyExvw.js +4 -0
  11. package/dist/RowPreviewChildren-yl3aB7hb.js +4 -0
  12. package/dist/{RowPreviewLegacyComponent-B1rwsYW_.js → RowPreviewLegacyComponent-CHxbwy9l.js} +11 -11
  13. package/dist/{RowPreviewRow-BjO2HdFR.js → RowPreviewRow-Bizr4PTf.js} +12 -12
  14. package/dist/{RowPreviewRow-D8yJ4LSs.js → RowPreviewRow-CLhz0YQ5.js} +1 -1
  15. package/dist/SavedRowsPanel-C0DkAzHi.js +611 -0
  16. package/dist/SavedRowsPanel-Cp3gADrK.js +610 -0
  17. package/dist/editor.css +1 -1
  18. package/dist/element-CRfWpZos.js +40842 -0
  19. package/dist/element.js +1 -1
  20. package/dist/index-BlYp4vAp.js +34092 -0
  21. package/dist/index.js +6 -6
  22. package/dist/init.js +2 -2
  23. package/package.json +7 -9
  24. package/dist/RowPreviewChildren-C_6CFAct.js +0 -4
  25. package/dist/RowPreviewChildren-y7meU9Pj.js +0 -4
  26. package/dist/adapters/index.d.ts +0 -38
  27. package/dist/baseStyles.d.ts +0 -13
  28. package/dist/blocks/canvasStyleHelpers.d.ts +0 -17
  29. package/dist/blocks/definitions/anchor.d.ts +0 -2
  30. package/dist/blocks/definitions/button.d.ts +0 -2
  31. package/dist/blocks/definitions/divider.d.ts +0 -2
  32. package/dist/blocks/definitions/heading.d.ts +0 -2
  33. package/dist/blocks/definitions/image.d.ts +0 -2
  34. package/dist/blocks/definitions/list.d.ts +0 -2
  35. package/dist/blocks/definitions/menu.d.ts +0 -2
  36. package/dist/blocks/definitions/paragraph.d.ts +0 -2
  37. package/dist/blocks/definitions/socials.d.ts +0 -2
  38. package/dist/blocks/definitions/spacer.d.ts +0 -2
  39. package/dist/blocks/definitions/video.d.ts +0 -2
  40. package/dist/blocks/index.d.ts +0 -8
  41. package/dist/brand.d.ts +0 -15
  42. package/dist/components/DesktopOnlyNotice.vue.d.ts +0 -20
  43. package/dist/components/features/emailBuilder/assistant/AssistantPanel.vue.d.ts +0 -37
  44. package/dist/components/features/emailBuilder/blocks/AnchorBlock.vue.d.ts +0 -3
  45. package/dist/components/features/emailBuilder/blocks/ButtonBlock.vue.d.ts +0 -3
  46. package/dist/components/features/emailBuilder/blocks/DividerBlock.vue.d.ts +0 -3
  47. package/dist/components/features/emailBuilder/blocks/HeadingBlock.vue.d.ts +0 -3
  48. package/dist/components/features/emailBuilder/blocks/ImageBlock.vue.d.ts +0 -3
  49. package/dist/components/features/emailBuilder/blocks/ListBlock.vue.d.ts +0 -3
  50. package/dist/components/features/emailBuilder/blocks/MenuBlock.vue.d.ts +0 -3
  51. package/dist/components/features/emailBuilder/blocks/ParagraphBlock.vue.d.ts +0 -3
  52. package/dist/components/features/emailBuilder/blocks/SocialsBlock.vue.d.ts +0 -3
  53. package/dist/components/features/emailBuilder/blocks/SpacerBlock.vue.d.ts +0 -3
  54. package/dist/components/features/emailBuilder/blocks/VideoBlock.vue.d.ts +0 -3
  55. package/dist/components/features/emailBuilder/canvas/Canvas.vue.d.ts +0 -3
  56. package/dist/components/features/emailBuilder/canvas/CanvasColumn.vue.d.ts +0 -49
  57. package/dist/components/features/emailBuilder/canvas/CanvasComponent.vue.d.ts +0 -56
  58. package/dist/components/features/emailBuilder/canvas/CanvasElement.vue.d.ts +0 -21
  59. package/dist/components/features/emailBuilder/canvas/CanvasRow.vue.d.ts +0 -49
  60. package/dist/components/features/emailBuilder/canvas/CanvasRowSpacer.vue.d.ts +0 -40
  61. package/dist/components/features/emailBuilder/health/HealthIndicator.vue.d.ts +0 -3
  62. package/dist/components/features/emailBuilder/layout/Header.vue.d.ts +0 -54
  63. package/dist/components/features/emailBuilder/layout/SendEmail.vue.d.ts +0 -21
  64. package/dist/components/features/emailBuilder/layout/SidebarLeft.vue.d.ts +0 -3
  65. package/dist/components/features/emailBuilder/layout/SidebarRight.vue.d.ts +0 -3
  66. package/dist/components/features/emailBuilder/panels/AnchorPanel.vue.d.ts +0 -3
  67. package/dist/components/features/emailBuilder/panels/ButtonPanel.vue.d.ts +0 -3
  68. package/dist/components/features/emailBuilder/panels/DividerPanel.vue.d.ts +0 -3
  69. package/dist/components/features/emailBuilder/panels/HeadingPanel.vue.d.ts +0 -3
  70. package/dist/components/features/emailBuilder/panels/ImagePanel.vue.d.ts +0 -3
  71. package/dist/components/features/emailBuilder/panels/ListPanel.vue.d.ts +0 -3
  72. package/dist/components/features/emailBuilder/panels/MenuPanel.vue.d.ts +0 -3
  73. package/dist/components/features/emailBuilder/panels/ParagraphPanel.vue.d.ts +0 -3
  74. package/dist/components/features/emailBuilder/panels/RowColumnPanel.vue.d.ts +0 -13
  75. package/dist/components/features/emailBuilder/panels/RowPanel.vue.d.ts +0 -13
  76. package/dist/components/features/emailBuilder/panels/RowSpacerPanel.vue.d.ts +0 -13
  77. package/dist/components/features/emailBuilder/panels/SocialsPanel.vue.d.ts +0 -3
  78. package/dist/components/features/emailBuilder/panels/SpacerPanel.vue.d.ts +0 -3
  79. package/dist/components/features/emailBuilder/panels/VideoPanel.vue.d.ts +0 -3
  80. package/dist/components/features/emailBuilder/panels/shared/DeviceTabs.vue.d.ts +0 -19
  81. package/dist/components/features/emailBuilder/panels/shared/LinkFieldMergeTags.vue.d.ts +0 -31
  82. package/dist/components/features/emailBuilder/panels/shared/OverrideBadge.vue.d.ts +0 -9
  83. package/dist/components/features/emailBuilder/panels/shared/PreviewBadge.vue.d.ts +0 -11
  84. package/dist/components/features/emailBuilder/panels/shared/TextFieldMergeTags.vue.d.ts +0 -25
  85. package/dist/components/features/emailBuilder/panels/ui/BoxStylingSection.vue.d.ts +0 -7
  86. package/dist/components/features/emailBuilder/panels/ui/PropertyAlignment.vue.d.ts +0 -30
  87. package/dist/components/features/emailBuilder/panels/ui/PropertyColor.vue.d.ts +0 -75
  88. package/dist/components/features/emailBuilder/panels/ui/PropertyGradientColor.vue.d.ts +0 -27
  89. package/dist/components/features/emailBuilder/panels/ui/PropertyNumberSlider.vue.d.ts +0 -74
  90. package/dist/components/features/emailBuilder/panels/ui/PropertySection.vue.d.ts +0 -17
  91. package/dist/components/features/emailBuilder/panels/ui/PropertySelect.vue.d.ts +0 -74
  92. package/dist/components/features/emailBuilder/panels/ui/PropertyTextStyle.vue.d.ts +0 -52
  93. package/dist/components/features/emailBuilder/panels/ui/PropertyTextStylePanel.vue.d.ts +0 -72
  94. package/dist/components/features/emailBuilder/panels/ui/PropertyToggle.vue.d.ts +0 -45
  95. package/dist/components/features/emailBuilder/panels/ui/PropertyVisibility.vue.d.ts +0 -32
  96. package/dist/components/features/emailBuilder/panels/ui/SpacingControl.vue.d.ts +0 -19
  97. package/dist/components/features/emailBuilder/panels/ui/color-picker/AlphaSlider.vue.d.ts +0 -28
  98. package/dist/components/features/emailBuilder/panels/ui/color-picker/ColorPickerPanel.vue.d.ts +0 -31
  99. package/dist/components/features/emailBuilder/panels/ui/color-picker/HueSlider.vue.d.ts +0 -19
  100. package/dist/components/features/emailBuilder/panels/ui/color-picker/RecentColors.vue.d.ts +0 -20
  101. package/dist/components/features/emailBuilder/panels/ui/color-picker/SVPanel.vue.d.ts +0 -39
  102. package/dist/components/features/emailBuilder/panels/ui/visibility-rule/Rule.vue.d.ts +0 -28
  103. package/dist/components/features/emailBuilder/preview/PreviewScreen.vue.d.ts +0 -7
  104. package/dist/components/features/emailBuilder/preview/ui/PreviewCanvas.vue.d.ts +0 -10
  105. package/dist/components/features/emailBuilder/preview/ui/PreviewCapabilityBadges.vue.d.ts +0 -12
  106. package/dist/components/features/emailBuilder/preview/ui/PreviewClientCard.vue.d.ts +0 -20
  107. package/dist/components/features/emailBuilder/preview/ui/PreviewClientList.vue.d.ts +0 -21
  108. package/dist/components/features/emailBuilder/preview/ui/PreviewClientPicker.vue.d.ts +0 -16
  109. package/dist/components/features/emailBuilder/preview/ui/PreviewComponent.vue.d.ts +0 -10
  110. package/dist/components/features/emailBuilder/preview/ui/PreviewDetailView.vue.d.ts +0 -41
  111. package/dist/components/features/emailBuilder/preview/ui/PreviewRendered.vue.d.ts +0 -8
  112. package/dist/components/features/emailBuilder/product/RowPreview.vue.d.ts +0 -8
  113. package/dist/components/features/emailBuilder/product/RowPreviewChildren.vue.d.ts +0 -14
  114. package/dist/components/features/emailBuilder/product/RowPreviewLegacyComponent.vue.d.ts +0 -14
  115. package/dist/components/features/emailBuilder/product/RowPreviewRow.vue.d.ts +0 -9
  116. package/dist/components/features/emailBuilder/product/SavedRowsPanel.vue.d.ts +0 -3
  117. package/dist/components/features/emailBuilder/product/SavedTemplatesPanel.vue.d.ts +0 -13
  118. package/dist/components/features/emailBuilder/product/VersionHistoryPanel.vue.d.ts +0 -14
  119. package/dist/components/features/emailBuilder/sidebar/SidebarBlockButton.vue.d.ts +0 -35
  120. package/dist/components/features/emailBuilder/tabs/GeneralTab.vue.d.ts +0 -3
  121. package/dist/components/features/emailBuilder/tabs/LayoutTab.vue.d.ts +0 -3
  122. package/dist/components/features/emailBuilder/tabs/content/ContentTab.vue.d.ts +0 -3
  123. package/dist/components/features/emailBuilder/tabs/content/LayersPanel.vue.d.ts +0 -7
  124. package/dist/components/features/emailBuilder/tabs/general/MergeTagsTab.vue.d.ts +0 -3
  125. package/dist/components/features/emailBuilder/tabs/general/StylesTab.vue.d.ts +0 -3
  126. package/dist/components/features/emailBuilder/tabs/general/VisibilityTab.vue.d.ts +0 -3
  127. package/dist/components/features/emailBuilder/tabs/general/VisibilityWrapESPTab.vue.d.ts +0 -3
  128. package/dist/components/features/emailBuilder/tabs/general/merge-tags/LinkTagTab.vue.d.ts +0 -3
  129. package/dist/components/features/emailBuilder/tabs/general/merge-tags/MergeTagTab.vue.d.ts +0 -3
  130. package/dist/components/features/emailBuilder/ui/LinkInputDialog.vue.d.ts +0 -17
  131. package/dist/components/features/emailBuilder/ui/canvas/CanvasRowDropZone.vue.d.ts +0 -12
  132. package/dist/components/features/emailBuilder/ui/canvas/DropZone.vue.d.ts +0 -10
  133. package/dist/components/features/emailBuilder/ui/canvas/Loader.vue.d.ts +0 -19
  134. package/dist/components/features/emailBuilder/ui/layers-panel/ComponentIcon.vue.d.ts +0 -7
  135. package/dist/components/features/emailBuilder/ui/layers-panel/LayerColumnChildren.vue.d.ts +0 -42
  136. package/dist/components/features/emailBuilder/ui/layers-panel/LayerDropLine.vue.d.ts +0 -8
  137. package/dist/components/features/emailBuilder/ui/renderers/AnchorRenderer.vue.d.ts +0 -10
  138. package/dist/components/features/emailBuilder/ui/renderers/DividerRenderer.vue.d.ts +0 -10
  139. package/dist/components/features/emailBuilder/ui/renderers/HeadingRenderer.vue.d.ts +0 -10
  140. package/dist/components/features/emailBuilder/ui/renderers/ImageRenderer.vue.d.ts +0 -10
  141. package/dist/components/features/emailBuilder/ui/renderers/ListRenderer.vue.d.ts +0 -10
  142. package/dist/components/features/emailBuilder/ui/renderers/MenuRenderer.vue.d.ts +0 -10
  143. package/dist/components/features/emailBuilder/ui/renderers/ParagraphRenderer.vue.d.ts +0 -10
  144. package/dist/components/features/emailBuilder/ui/renderers/SocialsRenderer.vue.d.ts +0 -10
  145. package/dist/components/features/emailBuilder/ui/renderers/SpacerRenderer.vue.d.ts +0 -10
  146. package/dist/components/features/emailBuilder/ui/renderers/VideoRenderer.vue.d.ts +0 -10
  147. package/dist/components/features/emailBuilder/ui/rich-text-editor/RichTextEditor.vue.d.ts +0 -12
  148. package/dist/components/features/emailBuilder/ui/rich-text-editor/pickers/MergeTagPicker.vue.d.ts +0 -18
  149. package/dist/components/features/emailBuilder/ui/rich-text-editor/pickers/RichTextColorPicker.vue.d.ts +0 -15
  150. package/dist/components/features/emailBuilder/ui/visibility/SupportBadge.vue.d.ts +0 -10
  151. package/dist/components/features/emailBuilder/ui/visibility/VisibilityPopover.vue.d.ts +0 -45
  152. package/dist/components/ui/ConfirmDialog.vue.d.ts +0 -3
  153. package/dist/components/ui/Icon.vue.d.ts +0 -33
  154. package/dist/components/ui/InfoDialog.vue.d.ts +0 -12
  155. package/dist/components/ui/Loading.vue.d.ts +0 -6
  156. package/dist/components/ui/ShadowSafeToast.vue.d.ts +0 -3
  157. package/dist/components/ui/primitives/Button.vue.d.ts +0 -23
  158. package/dist/components/ui/primitives/DatePicker.vue.d.ts +0 -16
  159. package/dist/components/ui/primitives/Dialog.vue.d.ts +0 -34
  160. package/dist/components/ui/primitives/InputText.vue.d.ts +0 -29
  161. package/dist/components/ui/primitives/Message.vue.d.ts +0 -20
  162. package/dist/components/ui/primitives/Select.vue.d.ts +0 -22
  163. package/dist/composables/emailBuilder/components/useComponentStyleEditor.d.ts +0 -72
  164. package/dist/composables/emailBuilder/components/useProductRowActions.d.ts +0 -3
  165. package/dist/composables/emailBuilder/components/useProductRows.d.ts +0 -59
  166. package/dist/composables/emailBuilder/components/useSystemRows.d.ts +0 -22
  167. package/dist/composables/emailBuilder/core/config/componentConfig.d.ts +0 -29
  168. package/dist/composables/emailBuilder/core/link-tags/useLinkTagInsert.d.ts +0 -13
  169. package/dist/composables/emailBuilder/core/merge-tags/mergeTagDefinitions.d.ts +0 -64
  170. package/dist/composables/emailBuilder/core/merge-tags/resolveMergeTags.d.ts +0 -27
  171. package/dist/composables/emailBuilder/core/ui/useLayerHoverScroll.d.ts +0 -20
  172. package/dist/composables/emailBuilder/core/ui/useLayoutDrag.d.ts +0 -85
  173. package/dist/composables/emailBuilder/core/ui/useRichTextEditors.d.ts +0 -6
  174. package/dist/composables/emailBuilder/core/ui/visibilityBadgeHelpers.d.ts +0 -22
  175. package/dist/composables/emailBuilder/core/useEmailBuilder.d.ts +0 -292
  176. package/dist/composables/emailBuilder/core/useEmailBuilderDefault.d.ts +0 -507
  177. package/dist/composables/emailBuilder/core/useEmailBuilderOperations.d.ts +0 -31
  178. package/dist/composables/emailBuilder/core/useEmailBuilderVisibility.d.ts +0 -31
  179. package/dist/composables/emailBuilder/export/actions/download.d.ts +0 -24
  180. package/dist/composables/emailBuilder/export/generators/html.d.ts +0 -3
  181. package/dist/composables/emailBuilder/export/generators/mjml.d.ts +0 -6
  182. package/dist/composables/emailBuilder/export/generators/react-email.d.ts +0 -61
  183. package/dist/composables/emailBuilder/export/helpers/generatorHelpers.d.ts +0 -53
  184. package/dist/composables/emailBuilder/export/logic/reactLogicWrapper.d.ts +0 -31
  185. package/dist/composables/emailBuilder/export/merge-tags/mergeTagMapper.d.ts +0 -42
  186. package/dist/composables/emailBuilder/export/merge-tags/reactMergeTagMapper.d.ts +0 -26
  187. package/dist/composables/emailBuilder/export/shared/containers.d.ts +0 -18
  188. package/dist/composables/emailBuilder/export/shared/styles.d.ts +0 -12
  189. package/dist/composables/emailBuilder/export/shared/tagIdentifier.d.ts +0 -1
  190. package/dist/composables/emailBuilder/export/targets/htmlExport.d.ts +0 -20
  191. package/dist/composables/emailBuilder/export/targets/jsonExport.d.ts +0 -28
  192. package/dist/composables/emailBuilder/export/targets/mjmlExport.d.ts +0 -19
  193. package/dist/composables/emailBuilder/export/targets/reactEmailExport.d.ts +0 -20
  194. package/dist/composables/emailBuilder/export/targets/templateSnapshot.d.ts +0 -24
  195. package/dist/composables/emailBuilder/export/transformers/espWrapper.d.ts +0 -2
  196. package/dist/composables/emailBuilder/export/transformers/formatting.d.ts +0 -3
  197. package/dist/composables/emailBuilder/export/transformers/minify.d.ts +0 -33
  198. package/dist/composables/emailBuilder/export/transformers/tagMapper.d.ts +0 -29
  199. package/dist/composables/emailBuilder/export/types/export.d.ts +0 -24
  200. package/dist/composables/emailBuilder/export/useEmailExportEngine.d.ts +0 -63
  201. package/dist/composables/emailBuilder/export/useEmailExportMobileStyles.d.ts +0 -3
  202. package/dist/composables/emailBuilder/export/useExportSettings.d.ts +0 -5
  203. package/dist/composables/emailBuilder/health/accessibilityChecker.d.ts +0 -64
  204. package/dist/composables/emailBuilder/health/healthIndicator.d.ts +0 -19
  205. package/dist/composables/emailBuilder/history/useEmailBuilderHistory.d.ts +0 -26
  206. package/dist/composables/emailBuilder/history/useHistory.d.ts +0 -16
  207. package/dist/composables/emailBuilder/preview/useClientPreview.d.ts +0 -127
  208. package/dist/composables/emailBuilder/transform/pipeline/hydrate.d.ts +0 -54
  209. package/dist/composables/emailBuilder/types/emailBuilder.d.ts +0 -79
  210. package/dist/composables/system/useColor.d.ts +0 -26
  211. package/dist/composables/system/useDeviceDetection.d.ts +0 -5
  212. package/dist/composables/system/useGoogleFonts.d.ts +0 -11
  213. package/dist/composables/system/useImageUpload.d.ts +0 -23
  214. package/dist/composables/system/useSavedRowsPanel.d.ts +0 -35
  215. package/dist/composables/ui/useConfirm.d.ts +0 -33
  216. package/dist/composables/ui/useInfoDialog.d.ts +0 -22
  217. package/dist/composables/ui/useTeleportTarget.d.ts +0 -49
  218. package/dist/composables/ui/useToast.d.ts +0 -32
  219. package/dist/devStyleMirror.d.ts +0 -20
  220. package/dist/documentScopedStyles.d.ts +0 -39
  221. package/dist/element-DyFj9kgl.js +0 -62972
  222. package/dist/index-Cud9IN-O.js +0 -56306
  223. package/dist/lightDom.d.ts +0 -30
  224. package/dist/shadowStyles.d.ts +0 -8
  225. package/dist/utils/generateId.d.ts +0 -1
  226. package/dist/utils/shadowDom.d.ts +0 -30
@@ -0,0 +1,668 @@
1
+ import { defineComponent as de, computed as s, resolveComponent as we, withDirectives as k, openBlock as o, createElementBlock as i, normalizeStyle as l, Fragment as I, renderList as H, createBlock as X, vShow as S, resolveDynamicComponent as Ae, createElementVNode as m, createCommentVNode as B, createTextVNode as ze, toDisplayString as _, normalizeClass as Ce, createStaticVNode as Me, unref as V } from "vue";
2
+ import { e as se, V as ce } from "./index-BlYp4vAp.js";
3
+ const Ie = ["innerHTML"], We = ["innerHTML"], He = ["src", "alt"], Re = ["src", "alt"], Fe = {
4
+ style: { width: "28px", height: "28px", color: "#94a3b8" },
5
+ fill: "currentColor",
6
+ viewBox: "0 0 20 20"
7
+ }, Pe = ["src", "alt"], Be = ["src", "alt"], _e = ["src", "alt"], Te = 5, De = /* @__PURE__ */ de({
8
+ __name: "PreviewComponent",
9
+ props: {
10
+ component: {},
11
+ forceMobile: { type: Boolean },
12
+ depth: {}
13
+ },
14
+ setup(w) {
15
+ const c = w, b = s(
16
+ () => c.component.componentType ?? c.component.type
17
+ ), { visibilityPreviewContext: T } = se(), { evaluateVisibility: j } = ce(), h = s(() => {
18
+ var r;
19
+ const e = b.value, a = e === "row" || e === "row-spacer" ? c.component.visibility : (r = c.component.props) == null ? void 0 : r.visibility;
20
+ return j(a, T.value);
21
+ }), n = s(() => {
22
+ const e = c.component.props ?? {};
23
+ if (!c.forceMobile || !e.mobile) return e;
24
+ const a = { ...e };
25
+ for (const [r, p] of Object.entries(e.mobile))
26
+ p != null && (a[r] = p);
27
+ return a;
28
+ });
29
+ function u(e, a = "0") {
30
+ return e ? `${e.top ?? 0}px ${e.right ?? 0}px ${e.bottom ?? 0}px ${e.left ?? 0}px` : a;
31
+ }
32
+ function W(e) {
33
+ return e == null ? "" : String(e);
34
+ }
35
+ function $(e) {
36
+ var p;
37
+ const a = e == null ? void 0 : e.backgroundGradient;
38
+ if ((a == null ? void 0 : a.useGradient) === !0 && Array.isArray((p = a == null ? void 0 : a.gradient) == null ? void 0 : p.colors) && a.gradient.colors.length >= 2) {
39
+ const { type: v, direction: A, colors: R } = a.gradient, C = R.map((F) => `${F.color} ${F.position}%`).join(", ");
40
+ return v === "radial" ? `radial-gradient(circle at center, ${C})` : `linear-gradient(${A}, ${C})`;
41
+ }
42
+ return (e == null ? void 0 : e.backgroundColor) ?? "transparent";
43
+ }
44
+ const G = s(() => {
45
+ const e = c.component, r = {
46
+ display: "flex",
47
+ flexDirection: c.forceMobile && e.mobileStack === !0 ? "column" : "row",
48
+ background: $(e),
49
+ padding: e.padding ? `${e.padding.top}px ${e.padding.right}px ${e.padding.bottom}px ${e.padding.left}px` : "0",
50
+ minHeight: e.minHeight ? `${e.minHeight}px` : "auto",
51
+ alignItems: "stretch",
52
+ // CRITICAL: nested rows must fill the parent column's width. Without
53
+ // these three, a flex row inside a flex column (parent column has
54
+ // flex-direction: column) sizes to its content, then the percent-width
55
+ // children compute against that smaller width and overflow horizontally
56
+ // — that's the "Heading One/Two cards float outside the parent column"
57
+ // bug from the preview screenshot.
58
+ width: "100%",
59
+ minWidth: "0",
60
+ boxSizing: "border-box"
61
+ };
62
+ return e.border && (r.border = `${e.border.width ?? 0}px ${e.border.style ?? "solid"} ${e.border.color ?? "transparent"}`, r.borderRadius = `${e.border.radius ?? 0}px`), (e.gap ?? 0) > 0 && (r.gap = `${e.gap}px`), e.backgroundImage && (r.backgroundImage = `url(${e.backgroundImage})`, r.backgroundSize = e.backgroundSize ?? "cover", r.backgroundPosition = e.backgroundPosition ?? "center center", r.backgroundRepeat = e.backgroundRepeat ?? "no-repeat"), r;
63
+ }), N = {
64
+ top: "flex-start",
65
+ middle: "center",
66
+ bottom: "flex-end"
67
+ };
68
+ function E(e) {
69
+ var A;
70
+ const a = c.component, r = c.forceMobile && a.mobileStack === !0, p = ((A = e.border) == null ? void 0 : A.radius) ?? 0, v = {
71
+ width: r ? "100%" : `${e.width ?? 100}%`,
72
+ boxSizing: "border-box",
73
+ display: "flex",
74
+ flexDirection: "column",
75
+ justifyContent: N[e.verticalAlign] || "flex-start",
76
+ padding: e.padding ? `${e.padding.top}px ${e.padding.right}px ${e.padding.bottom}px ${e.padding.left}px` : "10px",
77
+ background: $(e),
78
+ minWidth: "0"
79
+ // Apply `overflow: hidden` only when the nested column has rounded
80
+ // corners — there, it's needed to clip children to the rounded shape.
81
+ // For square columns, omit overflow so the flex+radius+overflow quirk
82
+ // (which hides backgrounds in some engines) doesn't apply. Matches real
83
+ // CanvasColumn behavior.
84
+ };
85
+ return p > 0 && (v.overflow = "hidden"), e.border && (v.border = `${e.border.width ?? 0}px ${e.border.style ?? "solid"} ${e.border.color ?? "transparent"}`, v.borderRadius = `${p}px`), e.backgroundImage && (v.backgroundImage = `url(${e.backgroundImage})`, v.backgroundSize = e.backgroundSize ?? "cover", v.backgroundPosition = e.backgroundPosition ?? "center center", v.backgroundRepeat = e.backgroundRepeat ?? "no-repeat"), v;
86
+ }
87
+ const t = s(() => ({
88
+ width: "100%",
89
+ height: (c.component.height ?? 20) + "px",
90
+ background: $(c.component)
91
+ })), d = s(() => {
92
+ const e = n.value;
93
+ return {
94
+ margin: u(e.margin),
95
+ padding: u(e.padding),
96
+ fontSize: (e.fontSize ?? 32) + "px",
97
+ lineHeight: String(e.lineHeight ?? 1.2),
98
+ letterSpacing: (e.letterSpacing ?? 0) + "px",
99
+ color: e.color ?? "#111111",
100
+ fontWeight: e.fontWeight ?? "bold",
101
+ fontFamily: e.fontFamily ? `'${e.fontFamily}', Arial, sans-serif` : "Arial, sans-serif",
102
+ background: $(e),
103
+ textTransform: e.textTransform ?? "none",
104
+ textDecoration: e.textDecoration ?? "none",
105
+ textAlign: e.align ?? "left",
106
+ // Wrap long unbroken strings (URLs, hash-codes) inside narrow columns
107
+ // instead of letting them push the layout wider. Mirrors what real
108
+ // email clients do on small viewports.
109
+ overflowWrap: "break-word",
110
+ wordBreak: "break-word"
111
+ };
112
+ }), f = s(() => {
113
+ const e = n.value;
114
+ return {
115
+ margin: u(e.margin),
116
+ padding: u(e.padding),
117
+ fontSize: (e.fontSize ?? 16) + "px",
118
+ lineHeight: String(e.lineHeight ?? 1.5),
119
+ letterSpacing: (e.letterSpacing ?? 0) + "px",
120
+ color: e.color ?? "#111111",
121
+ fontWeight: e.fontWeight ?? "normal",
122
+ fontFamily: e.fontFamily ? `'${e.fontFamily}', Arial, sans-serif` : "Arial, sans-serif",
123
+ fontStyle: e.fontStyle ?? "normal",
124
+ background: $(e),
125
+ textTransform: e.textTransform ?? "none",
126
+ textDecoration: e.textDecoration ?? "none",
127
+ textAlign: e.align ?? "left",
128
+ overflowWrap: "break-word",
129
+ wordBreak: "break-word"
130
+ };
131
+ }), g = s(() => {
132
+ const e = n.value;
133
+ return {
134
+ margin: u(e.margin),
135
+ padding: u(e.padding, "0 0 0 20px"),
136
+ fontSize: (e.fontSize ?? 16) + "px",
137
+ lineHeight: String(e.lineHeight ?? 1.5),
138
+ letterSpacing: (e.letterSpacing ?? 0) + "px",
139
+ fontFamily: e.fontFamily ? `'${e.fontFamily}', Arial, sans-serif` : "Arial, sans-serif",
140
+ color: e.color ?? "#111111",
141
+ background: $(e),
142
+ overflowWrap: "break-word",
143
+ wordBreak: "break-word"
144
+ };
145
+ }), x = s(() => {
146
+ const e = n.value;
147
+ return {
148
+ margin: u(e.margin),
149
+ padding: u(e.padding),
150
+ textAlign: e.align ?? "center"
151
+ };
152
+ }), z = s(() => {
153
+ const e = n.value;
154
+ return {
155
+ width: typeof e.width == "number" ? e.width + "%" : "100%",
156
+ height: "auto",
157
+ maxWidth: "100%",
158
+ borderRadius: (e.borderRadius ?? 0) + "px",
159
+ border: e.border ? `${e.border.width ?? 0}px ${e.border.style ?? "solid"} ${e.border.color ?? "transparent"}` : "none",
160
+ display: "inline-block"
161
+ };
162
+ }), O = s(() => ({
163
+ width: "100%",
164
+ height: "100px",
165
+ background: "#e2e8f0",
166
+ borderRadius: "4px"
167
+ })), D = s(() => {
168
+ const e = n.value;
169
+ return {
170
+ margin: u(e.margin),
171
+ padding: u(e.padding),
172
+ textAlign: e.align ?? "center"
173
+ };
174
+ }), L = s(() => {
175
+ const e = n.value;
176
+ return {
177
+ position: "relative",
178
+ display: "inline-block",
179
+ width: typeof e.width == "number" ? e.width + "%" : "100%",
180
+ paddingTop: "56.25%",
181
+ overflow: "hidden",
182
+ borderRadius: (e.borderRadius ?? 0) + "px"
183
+ };
184
+ }), ue = s(() => ({
185
+ position: "absolute",
186
+ top: "0",
187
+ left: "0",
188
+ width: "100%",
189
+ height: "100%",
190
+ objectFit: "cover"
191
+ })), pe = s(() => ({
192
+ position: "absolute",
193
+ top: "0",
194
+ left: "0",
195
+ width: "100%",
196
+ height: "100%",
197
+ background: "#e2e8f0",
198
+ display: "flex",
199
+ alignItems: "center",
200
+ justifyContent: "center"
201
+ })), ge = s(() => {
202
+ const e = n.value;
203
+ return {
204
+ margin: u(e.margin),
205
+ textAlign: e.align ?? "center"
206
+ };
207
+ }), me = s(() => {
208
+ const e = n.value, a = !!e.icon;
209
+ return {
210
+ background: $(e),
211
+ color: e.color ?? "#ffffff",
212
+ fontSize: (e.fontSize ?? 16) + "px",
213
+ fontWeight: e.fontWeight ?? "600",
214
+ fontFamily: e.fontFamily ? `'${e.fontFamily}', Arial, sans-serif` : "Arial, sans-serif",
215
+ letterSpacing: (e.letterSpacing ?? 0) + "px",
216
+ padding: u(e.padding, "12px 24px"),
217
+ borderRadius: (e.borderRadius ?? 4) + "px",
218
+ border: e.border ? `${e.border.width ?? 0}px ${e.border.style ?? "solid"} ${e.border.color ?? "transparent"}` : "none",
219
+ display: a ? "inline-flex" : "inline-block",
220
+ alignItems: a ? "center" : void 0,
221
+ verticalAlign: a ? "middle" : void 0,
222
+ lineHeight: "1.2",
223
+ textDecoration: "none",
224
+ textTransform: e.textTransform ?? "none",
225
+ whiteSpace: "nowrap"
226
+ };
227
+ }), q = s(() => {
228
+ const e = n.value, a = Math.max(4, e.iconSize ?? 20), r = e.iconGap ?? 8, p = e.iconPosition !== "after";
229
+ return {
230
+ display: "block",
231
+ width: a + "px",
232
+ height: a + "px",
233
+ flexShrink: "0",
234
+ marginRight: p ? r + "px" : "0",
235
+ marginLeft: p ? "0" : r + "px"
236
+ };
237
+ }), fe = s(() => {
238
+ const e = n.value;
239
+ return {
240
+ margin: u(e.margin),
241
+ padding: u(e.padding),
242
+ textAlign: e.align ?? "left"
243
+ };
244
+ }), be = s(() => {
245
+ const e = n.value;
246
+ return {
247
+ color: e.color ?? "#007bff",
248
+ fontSize: (e.fontSize ?? 16) + "px",
249
+ fontWeight: e.fontWeight ?? "normal",
250
+ fontFamily: e.fontFamily ? `'${e.fontFamily}', Arial, sans-serif` : "Arial, sans-serif",
251
+ letterSpacing: (e.letterSpacing ?? 0) + "px",
252
+ textDecoration: e.textDecoration ?? "underline",
253
+ overflowWrap: "break-word",
254
+ wordBreak: "break-word"
255
+ };
256
+ }), xe = s(() => {
257
+ const e = n.value;
258
+ return {
259
+ margin: u(e.margin),
260
+ padding: u(e.padding),
261
+ textAlign: e.align ?? "center"
262
+ };
263
+ }), ve = s(() => {
264
+ const e = n.value, a = e.align ?? "center";
265
+ return {
266
+ width: (e.width ?? 100) + "%",
267
+ height: (e.height ?? 1) + "px",
268
+ background: $(e),
269
+ border: "none",
270
+ display: "block",
271
+ margin: a === "center" ? "0 auto" : a === "right" ? "0 0 0 auto" : "0"
272
+ };
273
+ }), ye = s(() => {
274
+ const e = n.value;
275
+ return {
276
+ width: "100%",
277
+ height: (e.height ?? 20) + "px",
278
+ background: $(e)
279
+ };
280
+ }), he = s(() => {
281
+ const e = n.value;
282
+ return {
283
+ display: "flex",
284
+ flexWrap: "wrap",
285
+ gap: (e.spacing ?? 8) + "px",
286
+ justifyContent: e.align === "center" ? "center" : e.align === "right" ? "flex-end" : "flex-start",
287
+ margin: u(e.margin),
288
+ padding: u(e.padding)
289
+ // No `background` key — wrapper stays transparent so parent column/row
290
+ // bg shows through. This is the documented behavior the user flagged.
291
+ };
292
+ }), ke = {
293
+ display: "inline-flex",
294
+ alignItems: "center",
295
+ justifyContent: "center"
296
+ }, Se = s(() => {
297
+ const e = n.value;
298
+ return {
299
+ margin: u(e.margin),
300
+ padding: u(e.padding),
301
+ textAlign: e.align ?? "left",
302
+ lineHeight: "0",
303
+ background: $(e)
304
+ };
305
+ });
306
+ function $e(e, a) {
307
+ const r = n.value, p = r.mobileStack === !0 && c.forceMobile, v = r.spacing ?? 8, A = Math.ceil((v ?? 0) / 2), R = e === 0, C = e === a - 1;
308
+ return {
309
+ display: p ? "block" : "inline-block",
310
+ marginLeft: p || R ? "0px" : A + "px",
311
+ marginRight: p || C ? "0px" : A + "px",
312
+ marginBottom: p && !C ? v + "px" : "0px",
313
+ fontSize: Math.max(6, r.fontSize ?? 14) + "px",
314
+ lineHeight: String(r.lineHeight ?? 1.4),
315
+ letterSpacing: (r.letterSpacing ?? 0) + "px",
316
+ color: r.color ?? "#111111",
317
+ fontWeight: r.fontWeight ?? "normal",
318
+ fontFamily: r.fontFamily ? `'${r.fontFamily}', Arial, sans-serif` : "Arial, sans-serif",
319
+ fontStyle: r.fontStyle ?? "normal",
320
+ textTransform: r.textTransform ?? "none",
321
+ textDecoration: r.textDecoration ?? "none",
322
+ whiteSpace: p ? "normal" : "nowrap"
323
+ };
324
+ }
325
+ const J = s(() => c.depth ?? 0);
326
+ return (e, a) => {
327
+ var p, v, A, R, C, F, K, Q, U, Y, Z, ee, te, ne, oe, ie, re, ae, le;
328
+ const r = we("PreviewComponent", !0);
329
+ return b.value === "row" && J.value < Te ? k((o(), i("div", {
330
+ key: 0,
331
+ style: l(G.value)
332
+ }, [
333
+ (o(!0), i(I, null, H(w.component.columns || [], (y) => (o(), i("div", {
334
+ key: y.id,
335
+ style: l(E(y))
336
+ }, [
337
+ (o(!0), i(I, null, H(y.children ?? y.components ?? [], (M) => (o(), X(r, {
338
+ key: M.id,
339
+ component: M,
340
+ "force-mobile": w.forceMobile,
341
+ depth: J.value + 1
342
+ }, null, 8, ["component", "force-mobile", "depth"]))), 128))
343
+ ], 4))), 128))
344
+ ], 4)), [
345
+ [S, h.value]
346
+ ]) : b.value === "row-spacer" ? k((o(), i("div", {
347
+ key: 1,
348
+ style: l(t.value)
349
+ }, null, 4)), [
350
+ [S, h.value]
351
+ ]) : b.value === "heading" ? k((o(), X(Ae(((p = n.value) == null ? void 0 : p.level) || "h2"), {
352
+ key: 2,
353
+ style: l(d.value),
354
+ innerHTML: W((v = n.value) == null ? void 0 : v.content)
355
+ }, null, 8, ["style", "innerHTML"])), [
356
+ [S, h.value]
357
+ ]) : b.value === "paragraph" ? k((o(), i("p", {
358
+ key: 3,
359
+ style: l(f.value),
360
+ innerHTML: W((A = n.value) == null ? void 0 : A.content)
361
+ }, null, 12, Ie)), [
362
+ [S, h.value]
363
+ ]) : b.value === "list" ? k((o(), i("div", {
364
+ key: 4,
365
+ style: l(g.value),
366
+ innerHTML: W((R = n.value) == null ? void 0 : R.content)
367
+ }, null, 12, We)), [
368
+ [S, h.value]
369
+ ]) : b.value === "image" ? k((o(), i("div", {
370
+ key: 5,
371
+ style: l(x.value)
372
+ }, [
373
+ (C = n.value) != null && C.src ? (o(), i("img", {
374
+ key: 0,
375
+ src: n.value.src,
376
+ alt: ((F = n.value) == null ? void 0 : F.alt) || "",
377
+ style: l(z.value)
378
+ }, null, 12, He)) : (o(), i("div", {
379
+ key: 1,
380
+ style: l(O.value)
381
+ }, null, 4))
382
+ ], 4)), [
383
+ [S, h.value]
384
+ ]) : b.value === "video" ? k((o(), i("div", {
385
+ key: 6,
386
+ style: l(D.value)
387
+ }, [
388
+ m("div", {
389
+ style: l(L.value)
390
+ }, [
391
+ (K = n.value) != null && K.coverImage ? (o(), i("img", {
392
+ key: 0,
393
+ src: n.value.coverImage,
394
+ alt: ((Q = n.value) == null ? void 0 : Q.alt) || "Video",
395
+ style: l(ue.value)
396
+ }, null, 12, Re)) : (o(), i("div", {
397
+ key: 1,
398
+ style: l(pe.value)
399
+ }, [
400
+ (o(), i("svg", Fe, [...a[0] || (a[0] = [
401
+ m("path", {
402
+ "fill-rule": "evenodd",
403
+ 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",
404
+ "clip-rule": "evenodd"
405
+ }, null, -1)
406
+ ])]))
407
+ ], 4))
408
+ ], 4)
409
+ ], 4)), [
410
+ [S, h.value]
411
+ ]) : b.value === "button" ? k((o(), i("div", {
412
+ key: 7,
413
+ style: l(ge.value)
414
+ }, [
415
+ m("span", {
416
+ style: l(me.value)
417
+ }, [
418
+ (U = n.value) != null && U.icon && ((Y = n.value) == null ? void 0 : Y.iconPosition) !== "after" ? (o(), i("img", {
419
+ key: 0,
420
+ src: n.value.icon,
421
+ alt: ((Z = n.value) == null ? void 0 : Z.iconAlt) || "",
422
+ style: l(q.value)
423
+ }, null, 12, Pe)) : B("", !0),
424
+ ze(" " + _(((ee = n.value) == null ? void 0 : ee.text) || "Button") + " ", 1),
425
+ (te = n.value) != null && te.icon && ((ne = n.value) == null ? void 0 : ne.iconPosition) === "after" ? (o(), i("img", {
426
+ key: 1,
427
+ src: n.value.icon,
428
+ alt: ((oe = n.value) == null ? void 0 : oe.iconAlt) || "",
429
+ style: l(q.value)
430
+ }, null, 12, Be)) : B("", !0)
431
+ ], 4)
432
+ ], 4)), [
433
+ [S, h.value]
434
+ ]) : b.value === "anchor" ? k((o(), i("div", {
435
+ key: 8,
436
+ style: l(fe.value)
437
+ }, [
438
+ m("span", {
439
+ style: l(be.value)
440
+ }, _(((ie = n.value) == null ? void 0 : ie.text) || "Link"), 5)
441
+ ], 4)), [
442
+ [S, h.value]
443
+ ]) : b.value === "divider" ? k((o(), i("div", {
444
+ key: 9,
445
+ style: l(xe.value)
446
+ }, [
447
+ m("hr", {
448
+ style: l(ve.value)
449
+ }, null, 4)
450
+ ], 4)), [
451
+ [S, h.value]
452
+ ]) : b.value === "spacer" ? k((o(), i("div", {
453
+ key: 10,
454
+ style: l(ye.value)
455
+ }, null, 4)), [
456
+ [S, h.value]
457
+ ]) : b.value === "socials" ? k((o(), i("div", {
458
+ key: 11,
459
+ style: l(he.value)
460
+ }, [
461
+ (ae = (re = n.value) == null ? void 0 : re.platforms) != null && ae.some((y) => y.enabled && y.link) ? (o(!0), i(I, { key: 0 }, H(n.value.platforms.filter(
462
+ (y) => y.enabled && y.link
463
+ ), (y) => {
464
+ var M, P;
465
+ return o(), i("span", {
466
+ key: y.name,
467
+ style: ke
468
+ }, [
469
+ m("img", {
470
+ src: y.icon,
471
+ alt: y.name,
472
+ style: l({
473
+ width: (((M = n.value) == null ? void 0 : M.iconSize) || 24) + "px",
474
+ height: (((P = n.value) == null ? void 0 : P.iconSize) || 24) + "px",
475
+ display: "block"
476
+ })
477
+ }, null, 12, _e)
478
+ ]);
479
+ }), 128)) : B("", !0)
480
+ ], 4)), [
481
+ [S, h.value]
482
+ ]) : b.value === "menu" ? k((o(), i("div", {
483
+ key: 12,
484
+ style: l(Se.value)
485
+ }, [
486
+ (o(!0), i(I, null, H(((le = n.value) == null ? void 0 : le.items) || [], (y, M) => {
487
+ var P;
488
+ return o(), i("span", {
489
+ key: M,
490
+ style: l($e(Number(M), (((P = n.value) == null ? void 0 : P.items) || []).length))
491
+ }, _(y.label || ""), 5);
492
+ }), 128))
493
+ ], 4)), [
494
+ [S, h.value]
495
+ ]) : B("", !0);
496
+ };
497
+ }
498
+ }), Le = { class: "flex flex-col h-full bg-(--md-surface) rounded-xl border border-(--md-border) overflow-hidden" }, Ve = { class: "flex items-center gap-3 px-3 py-2.5 border-b border-(--md-border) bg-(--md-surface-hover)/70 shrink-0" }, je = { class: "flex-1 min-w-0 flex items-center gap-2 rounded-md px-2.5 py-1.5 border bg-(--md-surface) border-(--md-border)" }, Ge = { class: "ml-auto text-[10.5px] text-(--md-text-subtle) font-mono shrink-0" }, Ne = { class: "p-6" }, Ee = {
499
+ key: 0,
500
+ class: "flex flex-col items-center justify-center h-[60vh] text-center gap-3"
501
+ }, qe = /* @__PURE__ */ de({
502
+ __name: "PreviewCanvas",
503
+ props: {
504
+ rows: {},
505
+ canvas: {},
506
+ forceMobile: { type: Boolean }
507
+ },
508
+ setup(w) {
509
+ const c = w, { visibilityPreviewContext: b } = se(), { evaluateVisibility: T } = ce(), j = s(() => {
510
+ var t;
511
+ return ((t = c.canvas) == null ? void 0 : t.bodyBackgroundColor) ?? "#f9fafb";
512
+ }), h = s(() => (c.rows ?? []).length > 0), n = s(() => {
513
+ var f, g;
514
+ const t = ((f = c.canvas) == null ? void 0 : f.width) ?? 600;
515
+ if (!c.forceMobile) return t;
516
+ const d = ((g = c.canvas) == null ? void 0 : g.mobileBreakpoint) ?? 600;
517
+ return d === 600 ? 360 : d;
518
+ }), u = s(() => {
519
+ var d;
520
+ const t = (d = c.canvas) == null ? void 0 : d.padding;
521
+ return t ? `${t.top ?? 0}px ${t.right ?? 0}px ${t.bottom ?? 0}px ${t.left ?? 0}px` : "0";
522
+ });
523
+ function W(t) {
524
+ var g;
525
+ const d = t == null ? void 0 : t.backgroundGradient;
526
+ if ((d == null ? void 0 : d.useGradient) === !0 && Array.isArray((g = d == null ? void 0 : d.gradient) == null ? void 0 : g.colors) && d.gradient.colors.length >= 2) {
527
+ const { type: x, direction: z, colors: O } = d.gradient, D = O.map((L) => `${L.color} ${L.position}%`).join(", ");
528
+ return x === "radial" ? `radial-gradient(circle at center, ${D})` : `linear-gradient(${z}, ${D})`;
529
+ }
530
+ return (t == null ? void 0 : t.backgroundColor) ?? "transparent";
531
+ }
532
+ function $(t) {
533
+ return {
534
+ width: "100%",
535
+ height: (t.height ?? 20) + "px",
536
+ background: W(t)
537
+ };
538
+ }
539
+ function G(t) {
540
+ const f = {
541
+ display: "flex",
542
+ flexDirection: c.forceMobile && t.mobileStack === !0 ? "column" : "row",
543
+ background: W(t),
544
+ padding: t.padding ? `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px` : "0",
545
+ minHeight: t.minHeight ? `${t.minHeight}px` : "auto",
546
+ alignItems: "stretch",
547
+ width: "100%",
548
+ boxSizing: "border-box"
549
+ };
550
+ return t.border && (f.border = `${t.border.width ?? 0}px ${t.border.style ?? "solid"} ${t.border.color ?? "transparent"}`, f.borderRadius = `${t.border.radius ?? 0}px`), (t.gap ?? 0) > 0 && (f.gap = `${t.gap}px`), t.backgroundImage && (f.backgroundImage = `url(${t.backgroundImage})`, f.backgroundSize = t.backgroundSize ?? "cover", f.backgroundPosition = t.backgroundPosition ?? "center center", f.backgroundRepeat = t.backgroundRepeat ?? "no-repeat"), f;
551
+ }
552
+ const N = {
553
+ top: "flex-start",
554
+ middle: "center",
555
+ bottom: "flex-end"
556
+ };
557
+ function E(t, d) {
558
+ var z;
559
+ const f = c.forceMobile && d.mobileStack === !0, g = ((z = t.border) == null ? void 0 : z.radius) ?? 0, x = {
560
+ width: f ? "100%" : `${t.width ?? 100}%`,
561
+ boxSizing: "border-box",
562
+ display: "flex",
563
+ flexDirection: "column",
564
+ justifyContent: N[t.verticalAlign] || "flex-start",
565
+ padding: t.padding ? `${t.padding.top ?? 0}px ${t.padding.right ?? 0}px ${t.padding.bottom ?? 0}px ${t.padding.left ?? 0}px` : "10px",
566
+ background: W(t),
567
+ // minWidth:0 lets flex columns shrink below their content's intrinsic
568
+ // width — required for word-wrap to actually take effect inside flex.
569
+ minWidth: "0"
570
+ };
571
+ return g > 0 && (x.overflow = "hidden"), t.border && (x.border = `${t.border.width ?? 0}px ${t.border.style ?? "solid"} ${t.border.color ?? "transparent"}`, x.borderRadius = `${g}px`), t.backgroundImage && (x.backgroundImage = `url(${t.backgroundImage})`, x.backgroundSize = t.backgroundSize ?? "cover", x.backgroundPosition = t.backgroundPosition ?? "center center", x.backgroundRepeat = t.backgroundRepeat ?? "no-repeat"), x;
572
+ }
573
+ return (t, d) => {
574
+ var f;
575
+ return o(), i("div", Le, [
576
+ m("div", Ve, [
577
+ d[3] || (d[3] = m("div", { class: "flex items-center gap-1.5 shrink-0" }, [
578
+ m("span", {
579
+ class: "w-2.5 h-2.5 rounded-full bg-[#ff5f57]",
580
+ "aria-hidden": "true"
581
+ }),
582
+ m("span", {
583
+ class: "w-2.5 h-2.5 rounded-full bg-[#febc2e]",
584
+ "aria-hidden": "true"
585
+ }),
586
+ m("span", {
587
+ class: "w-2.5 h-2.5 rounded-full bg-[#28c840]",
588
+ "aria-hidden": "true"
589
+ })
590
+ ], -1)),
591
+ m("div", je, [
592
+ d[0] || (d[0] = m("span", { class: "w-1.5 h-1.5 rounded-full bg-(--md-success) shrink-0" }, null, -1)),
593
+ d[1] || (d[1] = m("span", { class: "text-[12px] font-medium text-(--md-text) truncate" }, " Source ", -1)),
594
+ d[2] || (d[2] = m("span", { class: "text-[10.5px] text-(--md-text-subtle) truncate" }, " · Live canvas data ", -1)),
595
+ m("span", Ge, _(n.value) + "px ", 1)
596
+ ]),
597
+ m("span", {
598
+ class: Ce([
599
+ "inline-flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wider px-1.5 py-1 rounded shrink-0",
600
+ w.forceMobile ? "bg-(--md-warning-bg) text-(--md-warning-fg)" : "bg-(--md-success-bg) text-(--md-success-fg)"
601
+ ])
602
+ }, _(w.forceMobile ? "Mobile" : "Desktop"), 3)
603
+ ]),
604
+ m("div", {
605
+ class: "flex-1 overflow-y-auto overflow-x-hidden",
606
+ style: l({ backgroundColor: j.value })
607
+ }, [
608
+ m("div", Ne, [
609
+ h.value ? (o(), i("div", {
610
+ key: 1,
611
+ class: "mx-auto shadow-sm rounded-md overflow-hidden",
612
+ style: l({
613
+ width: n.value + "px",
614
+ maxWidth: "100%",
615
+ backgroundColor: ((f = w.canvas) == null ? void 0 : f.backgroundColor) ?? "#ffffff"
616
+ })
617
+ }, [
618
+ m("div", {
619
+ style: l({
620
+ padding: u.value
621
+ })
622
+ }, [
623
+ (o(!0), i(I, null, H(w.rows, (g) => (o(), i(I, {
624
+ key: g.id
625
+ }, [
626
+ g.type === "row-spacer" ? k((o(), i("div", {
627
+ key: 0,
628
+ style: l($(g))
629
+ }, null, 4)), [
630
+ [
631
+ S,
632
+ V(T)(g.visibility, V(b))
633
+ ]
634
+ ]) : g.type === "row" ? k((o(), i("div", {
635
+ key: 1,
636
+ style: l(G(g))
637
+ }, [
638
+ (o(!0), i(I, null, H(g.columns || [], (x) => (o(), i("div", {
639
+ key: x.id,
640
+ style: l(E(x, g))
641
+ }, [
642
+ (o(!0), i(I, null, H(x.children ?? x.components ?? [], (z) => (o(), X(De, {
643
+ key: z.id,
644
+ component: z,
645
+ "force-mobile": w.forceMobile,
646
+ depth: 1
647
+ }, null, 8, ["component", "force-mobile"]))), 128))
648
+ ], 4))), 128))
649
+ ], 4)), [
650
+ [
651
+ S,
652
+ V(T)(g.visibility, V(b))
653
+ ]
654
+ ]) : B("", !0)
655
+ ], 64))), 128))
656
+ ], 4)
657
+ ], 4)) : (o(), i("div", Ee, [...d[4] || (d[4] = [
658
+ Me('<div class="w-12 h-12 rounded-xl bg-(--md-surface) border border-(--md-border) flex items-center justify-center"><svg class="w-6 h-6 text-(--md-text-subtle)" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg></div><div><p class="text-sm font-medium text-(--md-text-muted)"> No content yet </p><p class="text-[12px] text-(--md-text-subtle) mt-1"> Add components in the builder to see them here. </p></div>', 2)
659
+ ])]))
660
+ ])
661
+ ], 4)
662
+ ]);
663
+ };
664
+ }
665
+ });
666
+ export {
667
+ qe as default
668
+ };