@charisol/plexo-sdk 1.4.42 → 2.0.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 (255) hide show
  1. package/README.md +72 -0
  2. package/dist/InlineColorPicker-8ewm1Asx.js +2912 -0
  3. package/dist/client-DlVJt_6V.js +339 -0
  4. package/dist/colorUtils-ohNG3v1i.js +222 -0
  5. package/dist/columnOrder-f5-VOg2T.js +11 -0
  6. package/dist/{compiler-BvseEhDC.js → compiler-Dhpsq71h.js} +121 -120
  7. package/dist/compiler.js +1 -1
  8. package/dist/{compilerClient-BIrZIgfG.js → compilerClient-BC4TGAr9.js} +93 -92
  9. package/dist/compilerClient.js +1 -1
  10. package/dist/{iconSvgStatic-CGue7nyp.js → iconSvgStatic-Lnpg27U9.js} +66 -75
  11. package/dist/index.js +14042 -15423
  12. package/dist/legacy-B4E71HSa.js +16192 -0
  13. package/dist/lint-D-2x-Yeb.js +225 -0
  14. package/dist/{mjmlBrowser-DWk0mRD6.js → mjmlBrowser-wlHcAT8n.js} +2 -2
  15. package/dist/plexo-sdk.css +1 -1
  16. package/dist/rolldown-runtime-B1bRi_D7.js +27 -0
  17. package/dist/sanitize.js +1 -1
  18. package/dist/{sanitizeCompiledHtml-CNjUXlMK.js → sanitizeCompiledHtml-GgGsetm3.js} +673 -698
  19. package/dist/{zoom-in-DL4pfiLG.js → schemas-Bq5o5MfF.js} +916 -2120
  20. package/dist/utilities/colorUtils.d.ts +35 -0
  21. package/dist/utilities/playground.interfaces.d.ts +19 -1
  22. package/dist/v2/V2Editor.d.ts +25 -0
  23. package/dist/v2/compile/build.d.ts +38 -0
  24. package/dist/v2/compile/html.d.ts +18 -0
  25. package/dist/v2/compile/index.d.ts +28 -15
  26. package/dist/v2/compile/react.d.ts +17 -0
  27. package/dist/v2/compile/schema.d.ts +16 -0
  28. package/dist/v2/components/canvas/AlignmentGuidesOverlay.d.ts +7 -0
  29. package/dist/v2/components/canvas/CanvasArea.d.ts +2 -0
  30. package/dist/v2/components/canvas/CanvasControls.d.ts +2 -0
  31. package/dist/v2/components/canvas/ContextualToolbar.d.ts +7 -0
  32. package/dist/v2/components/canvas/DropIndicator.d.ts +6 -0
  33. package/dist/v2/components/canvas/IrView.d.ts +12 -0
  34. package/dist/v2/components/canvas/NodeRenderer.d.ts +12 -0
  35. package/dist/v2/components/canvas/PageFrame.d.ts +9 -0
  36. package/dist/v2/components/canvas/ResizeHandles.d.ts +8 -0
  37. package/dist/v2/components/canvas/SectionToolbar.d.ts +6 -0
  38. package/dist/v2/components/canvas/SpacingOverlay.d.ts +7 -0
  39. package/dist/v2/components/design/AutoUpdateWatcher.d.ts +7 -0
  40. package/dist/v2/components/design/DesignSystemPanel.d.ts +7 -0
  41. package/dist/v2/components/design/ReviewView.d.ts +7 -0
  42. package/dist/v2/components/design/StrataCard.d.ts +8 -0
  43. package/dist/v2/components/design/TidyView.d.ts +15 -0
  44. package/dist/v2/components/design/bits.d.ts +20 -0
  45. package/dist/v2/components/design/useStrataSync.d.ts +51 -0
  46. package/dist/v2/components/layout/ContextMenu.d.ts +2 -0
  47. package/dist/v2/components/layout/EditorShell.d.ts +2 -0
  48. package/dist/v2/components/layout/LeftToolRail.d.ts +2 -0
  49. package/dist/v2/components/layout/PreviewOverlay.d.ts +6 -0
  50. package/dist/v2/components/layout/TopToolbar.d.ts +8 -0
  51. package/dist/v2/components/modals/SettingsModal.d.ts +7 -0
  52. package/dist/v2/components/modals/ShortcutsModal.d.ts +7 -0
  53. package/dist/v2/components/properties/ColorField.d.ts +14 -0
  54. package/dist/v2/components/properties/ElementSettings.d.ts +39 -0
  55. package/dist/v2/components/properties/LinkField.d.ts +26 -0
  56. package/dist/v2/components/properties/PageInspector.d.ts +2 -0
  57. package/dist/v2/components/properties/PropertiesPanel.d.ts +2 -0
  58. package/dist/v2/components/properties/SectionSettings.d.ts +6 -0
  59. package/dist/v2/components/properties/sections/ConstraintsSection.d.ts +7 -0
  60. package/dist/v2/components/properties/sections/LayoutDiagnostics.d.ts +7 -0
  61. package/dist/v2/components/sections/BlockInspector.d.ts +9 -0
  62. package/dist/v2/components/sections/FieldForm.d.ts +14 -0
  63. package/dist/v2/components/sections/ManagedChildNotice.d.ts +7 -0
  64. package/dist/v2/components/sections/SectionThumb.d.ts +11 -0
  65. package/dist/v2/components/sidebar/FlyoutDrawer.d.ts +2 -0
  66. package/dist/v2/components/sidebar/InsertPanel.d.ts +2 -0
  67. package/dist/v2/components/sidebar/LayersPanel.d.ts +2 -0
  68. package/dist/v2/components/sidebar/LibraryPanel.d.ts +3 -0
  69. package/dist/v2/components/sidebar/PagesPanel.d.ts +2 -0
  70. package/dist/v2/components/sidebar/SectionsPanel.d.ts +6 -0
  71. package/dist/v2/components/sidebar/SolPanel.d.ts +3 -0
  72. package/dist/v2/components/sidebar/TemplateChooser.d.ts +13 -0
  73. package/dist/v2/context/BlockContext.d.ts +7 -0
  74. package/dist/v2/context/EditorContext.d.ts +213 -0
  75. package/dist/v2/context/FrameContext.d.ts +3 -0
  76. package/dist/v2/context/ParentLayoutContext.d.ts +10 -0
  77. package/dist/v2/context/PlacementContext.d.ts +4 -0
  78. package/dist/v2/data/blankPage.d.ts +3 -0
  79. package/dist/v2/data/insertableComponents.d.ts +17 -0
  80. package/dist/v2/data/samplePageData.d.ts +3 -0
  81. package/dist/v2/design/audit.d.ts +78 -0
  82. package/dist/v2/design/baseline.d.ts +3 -0
  83. package/dist/v2/design/baselineData.d.ts +3 -0
  84. package/dist/v2/design/components.d.ts +9 -0
  85. package/dist/v2/design/css.d.ts +16 -0
  86. package/dist/v2/design/fonts.d.ts +10 -0
  87. package/dist/v2/design/index.d.ts +11 -0
  88. package/dist/v2/design/lint.d.ts +22 -0
  89. package/dist/v2/design/shades.d.ts +15 -0
  90. package/dist/v2/design/textStyles.d.ts +29 -0
  91. package/dist/v2/design/themes.d.ts +35 -0
  92. package/dist/v2/design/tokens.d.ts +24 -0
  93. package/dist/v2/design/types.d.ts +81 -0
  94. package/dist/v2/host/HostContext.d.ts +176 -0
  95. package/dist/v2/host/SolMark.d.ts +8 -0
  96. package/dist/v2/index.d.ts +19 -11
  97. package/dist/v2/migrate/legacy.d.ts +26 -0
  98. package/dist/v2/render/adapt.d.ts +12 -0
  99. package/dist/v2/render/anchors.d.ts +7 -0
  100. package/dist/v2/render/elementCss.d.ts +7 -0
  101. package/dist/v2/render/elementProps.d.ts +92 -0
  102. package/dist/v2/render/elements.d.ts +32 -0
  103. package/dist/v2/render/formAction.d.ts +33 -0
  104. package/dist/v2/render/frames.d.ts +10 -0
  105. package/dist/v2/render/iconSet.d.ts +5 -0
  106. package/dist/v2/render/ir.d.ts +20 -0
  107. package/dist/v2/render/nodeStyle.d.ts +24 -0
  108. package/dist/v2/render/placement.d.ts +12 -0
  109. package/dist/v2/render/resolve.d.ts +3 -0
  110. package/dist/v2/render/runtime.d.ts +18 -0
  111. package/dist/v2/render/sanitize.d.ts +15 -0
  112. package/dist/v2/render/socialIcons.d.ts +83 -0
  113. package/dist/v2/sections/catalog/about.d.ts +2 -0
  114. package/dist/v2/sections/catalog/announcement.d.ts +2 -0
  115. package/dist/v2/sections/catalog/contact.d.ts +2 -0
  116. package/dist/v2/sections/catalog/cta.d.ts +2 -0
  117. package/dist/v2/sections/catalog/faq.d.ts +2 -0
  118. package/dist/v2/sections/catalog/features.d.ts +2 -0
  119. package/dist/v2/sections/catalog/footer.d.ts +5 -0
  120. package/dist/v2/sections/catalog/gallery.d.ts +2 -0
  121. package/dist/v2/sections/catalog/header.d.ts +2 -0
  122. package/dist/v2/sections/catalog/hero.d.ts +2 -0
  123. package/dist/v2/sections/catalog/logos.d.ts +2 -0
  124. package/dist/v2/sections/catalog/pricing.d.ts +2 -0
  125. package/dist/v2/sections/catalog/stats.d.ts +2 -0
  126. package/dist/v2/sections/catalog/steps.d.ts +2 -0
  127. package/dist/v2/sections/catalog/team.d.ts +2 -0
  128. package/dist/v2/sections/catalog/testimonials.d.ts +2 -0
  129. package/dist/v2/sections/catalog/video.d.ts +2 -0
  130. package/dist/v2/sections/kit.d.ts +64 -0
  131. package/dist/v2/sections/materialize.d.ts +72 -0
  132. package/dist/v2/sections/names.d.ts +6 -0
  133. package/dist/v2/sections/pageTemplates.d.ts +52 -0
  134. package/dist/v2/sections/registry.d.ts +5 -0
  135. package/dist/v2/sections/types.d.ts +103 -0
  136. package/dist/v2/sol/catalogSchema.d.ts +43 -0
  137. package/dist/v2/sol/commands.d.ts +21 -0
  138. package/dist/v2/sol/describe.d.ts +32 -0
  139. package/dist/v2/sol/index.d.ts +7 -0
  140. package/dist/v2/sol/parse.d.ts +10 -0
  141. package/dist/v2/sol/prompt.d.ts +5 -0
  142. package/dist/v2/sol/schema.d.ts +177 -0
  143. package/dist/v2/sol/summarize.d.ts +4 -0
  144. package/dist/v2/strata/autoUpdate.d.ts +37 -0
  145. package/dist/v2/strata/client.d.ts +38 -0
  146. package/dist/v2/strata/index.d.ts +8 -0
  147. package/dist/v2/strata/merge.d.ts +27 -0
  148. package/dist/v2/strata/types.d.ts +115 -0
  149. package/dist/v2/types/editor.d.ts +175 -0
  150. package/dist/v2/utils/css.d.ts +3 -0
  151. package/dist/v2/utils/id.d.ts +3 -0
  152. package/dist/v2-compile.js +138 -7
  153. package/dist/v2-strata.js +2 -0
  154. package/dist/v2.js +11089 -8174
  155. package/package.json +6 -1
  156. package/dist/toReact-BBzjWoFG.js +0 -595
  157. package/dist/v2/ai/commands.d.ts +0 -616
  158. package/dist/v2/ai/dispatch.d.ts +0 -24
  159. package/dist/v2/ai/nodeSchema.d.ts +0 -196
  160. package/dist/v2/brand/BrandColorSwatches.d.ts +0 -4
  161. package/dist/v2/brand/BrandPanel.d.ts +0 -4
  162. package/dist/v2/brand/ChangeSetGallery.d.ts +0 -10
  163. package/dist/v2/brand/StyleSetEditor.d.ts +0 -22
  164. package/dist/v2/canvas/CatalogDragContext.d.ts +0 -27
  165. package/dist/v2/canvas/ContextMenuContext.d.ts +0 -16
  166. package/dist/v2/canvas/DeviceModeContext.d.ts +0 -20
  167. package/dist/v2/canvas/DragEngineContext.d.ts +0 -13
  168. package/dist/v2/canvas/LayoutGuideContext.d.ts +0 -22
  169. package/dist/v2/canvas/PreviewModeContext.d.ts +0 -15
  170. package/dist/v2/canvas/SidebarContext.d.ts +0 -21
  171. package/dist/v2/canvas/StylePainterContext.d.ts +0 -19
  172. package/dist/v2/canvas/WorkspaceThemeContext.d.ts +0 -19
  173. package/dist/v2/canvas/aiTextTransforms.d.ts +0 -24
  174. package/dist/v2/canvas/animationPresets.d.ts +0 -12
  175. package/dist/v2/canvas/constants.d.ts +0 -6
  176. package/dist/v2/canvas/layoutRoles.d.ts +0 -12
  177. package/dist/v2/canvas/modelRect.d.ts +0 -4
  178. package/dist/v2/canvas/rectMath.d.ts +0 -34
  179. package/dist/v2/canvas/reorderMath.d.ts +0 -8
  180. package/dist/v2/canvas/resizeMath.d.ts +0 -16
  181. package/dist/v2/canvas/resolveBoxStyle.d.ts +0 -12
  182. package/dist/v2/canvas/resolveTargetSection.d.ts +0 -10
  183. package/dist/v2/canvas/sectionDividerShapes.d.ts +0 -12
  184. package/dist/v2/canvas/snapping.d.ts +0 -28
  185. package/dist/v2/canvas/useAlignNode.d.ts +0 -10
  186. package/dist/v2/canvas/useClipboardKeyBinding.d.ts +0 -7
  187. package/dist/v2/canvas/useDeleteKeyBinding.d.ts +0 -3
  188. package/dist/v2/canvas/useDragEngine.d.ts +0 -44
  189. package/dist/v2/canvas/useDraggableNode.d.ts +0 -30
  190. package/dist/v2/canvas/useInlineTextEdit.d.ts +0 -29
  191. package/dist/v2/canvas/usePointerEngine.d.ts +0 -22
  192. package/dist/v2/canvas/useResizeHandle.d.ts +0 -12
  193. package/dist/v2/canvas/useResolvedTextStyles.d.ts +0 -13
  194. package/dist/v2/canvas/useSelectionRects.d.ts +0 -13
  195. package/dist/v2/canvas/useUndoRedoKeyBinding.d.ts +0 -8
  196. package/dist/v2/catalog/elementCatalog.d.ts +0 -31
  197. package/dist/v2/catalog/imagePreset.d.ts +0 -7
  198. package/dist/v2/compile/toReact.d.ts +0 -32
  199. package/dist/v2/components/AdornmentLayer.d.ts +0 -20
  200. package/dist/v2/components/AskSolPanel.d.ts +0 -25
  201. package/dist/v2/components/CatalogDragGhost.d.ts +0 -6
  202. package/dist/v2/components/CellBoundary.d.ts +0 -14
  203. package/dist/v2/components/CenterCanvas.d.ts +0 -3
  204. package/dist/v2/components/ContentTabPanel.d.ts +0 -12
  205. package/dist/v2/components/ContextMenu.d.ts +0 -5
  206. package/dist/v2/components/ContextualToolbar.d.ts +0 -25
  207. package/dist/v2/components/ImagesTabPanel.d.ts +0 -15
  208. package/dist/v2/components/LayoutGuidePanel.d.ts +0 -10
  209. package/dist/v2/components/ManageLayersPanel.d.ts +0 -13
  210. package/dist/v2/components/NodeRenderer.d.ts +0 -8
  211. package/dist/v2/components/PreviewOverlay.d.ts +0 -11
  212. package/dist/v2/components/ResizeHandle.d.ts +0 -6
  213. package/dist/v2/components/RightRail.d.ts +0 -13
  214. package/dist/v2/components/SectionDividerOverlay.d.ts +0 -8
  215. package/dist/v2/components/SectionEdgeAddZone.d.ts +0 -17
  216. package/dist/v2/components/SectionGridOverlay.d.ts +0 -10
  217. package/dist/v2/components/SectionNamePill.d.ts +0 -6
  218. package/dist/v2/components/SectionNode.d.ts +0 -5
  219. package/dist/v2/components/SectionSideRail.d.ts +0 -17
  220. package/dist/v2/components/SelectionToolbar.d.ts +0 -11
  221. package/dist/v2/components/StylePainterToast.d.ts +0 -5
  222. package/dist/v2/components/V2Canvas.d.ts +0 -59
  223. package/dist/v2/components/nodes/ButtonNode.d.ts +0 -4
  224. package/dist/v2/components/nodes/ContainerNode.d.ts +0 -11
  225. package/dist/v2/components/nodes/EmbedNode.d.ts +0 -4
  226. package/dist/v2/components/nodes/ImageNode.d.ts +0 -4
  227. package/dist/v2/components/nodes/InputNode.d.ts +0 -4
  228. package/dist/v2/components/nodes/MenuNode.d.ts +0 -18
  229. package/dist/v2/components/nodes/TextNode.d.ts +0 -4
  230. package/dist/v2/inspector/AiQuickEditPanel.d.ts +0 -12
  231. package/dist/v2/inspector/AnimationPanel.d.ts +0 -11
  232. package/dist/v2/inspector/DesignAccordions.d.ts +0 -7
  233. package/dist/v2/inspector/FieldRenderer.d.ts +0 -9
  234. package/dist/v2/inspector/IconPopoverButton.d.ts +0 -9
  235. package/dist/v2/inspector/MenuIconPanel.d.ts +0 -7
  236. package/dist/v2/inspector/MenuManagePanel.d.ts +0 -8
  237. package/dist/v2/inspector/Popover.d.ts +0 -21
  238. package/dist/v2/inspector/SectionDividerPanel.d.ts +0 -9
  239. package/dist/v2/inspector/fieldStyles.d.ts +0 -15
  240. package/dist/v2/inspector/fields/ColorField.d.ts +0 -7
  241. package/dist/v2/inspector/fields/NumberField.d.ts +0 -7
  242. package/dist/v2/inspector/fields/SelectField.d.ts +0 -7
  243. package/dist/v2/inspector/fields/TextField.d.ts +0 -7
  244. package/dist/v2/inspector/fields/TextStyleField.d.ts +0 -11
  245. package/dist/v2/inspector/fields/TextareaField.d.ts +0 -7
  246. package/dist/v2/inspector/schema.d.ts +0 -25
  247. package/dist/v2/inspector/useFieldCommit.d.ts +0 -12
  248. package/dist/v2/store/brandDefaults.d.ts +0 -4
  249. package/dist/v2/store/brandTypes.d.ts +0 -40
  250. package/dist/v2/store/cloneSubtree.d.ts +0 -12
  251. package/dist/v2/store/createBrandStore.d.ts +0 -2
  252. package/dist/v2/store/createCanvasStore.d.ts +0 -2
  253. package/dist/v2/store/seed.d.ts +0 -17
  254. package/dist/v2/store/types.d.ts +0 -163
  255. package/dist/v2/ui/theme.d.ts +0 -85
@@ -1,4 +1,5 @@
1
- import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h, x as g } from "./iconSvgStatic-CGue7nyp.js";
1
+ import { t as e } from "./columnOrder-f5-VOg2T.js";
2
+ import { a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./iconSvgStatic-Lnpg27U9.js";
2
3
  import { t as _ } from "./maildripEmbed-CfjDAP8i.js";
3
4
  //#region src/utilities/responsiveDefaults.ts
4
5
  var v = {
@@ -648,31 +649,31 @@ function X(e, t, n, r, i = []) {
648
649
  function ae(e) {
649
650
  return `<!-- Unsupported block ${String(e)} -->`;
650
651
  }
651
- var oe = (g, _ = !1) => {
652
- if (!g || typeof g != "object") return "";
653
- let v = g.style || {}, y = g.type === "heading" || g.type === "paragraph" || g.type === "text", b = y ? c(g).autoWidth : !1, x = b ? Object.fromEntries(Object.entries(v).filter(([e]) => e !== "width")) : v, S = P(g.type === "form_container" ? {
652
+ var oe = (e, _ = !1) => {
653
+ if (!e || typeof e != "object") return "";
654
+ let v = e.style || {}, y = e.type === "heading" || e.type === "paragraph" || e.type === "text", b = y ? l(e).autoWidth : !1, x = b ? Object.fromEntries(Object.entries(v).filter(([e]) => e !== "width")) : v, S = P(e.type === "form_container" ? {
654
655
  ...z(),
655
656
  ...v
656
- } : x), C = g.attributes || {}, w = ` data-plexo-id="${B(g.id)}"`, T = String(C.boxAlign || "left"), E = y && (b || !!v.width), D = (e) => E ? `<div style="text-align: ${T};">${e}</div>` : e, O = `${E ? "display: inline-block; " : ""}${y && v.height ? "overflow: hidden; " : ""}`;
657
- switch (g.type) {
657
+ } : x), C = e.attributes || {}, w = ` data-plexo-id="${B(e.id)}"`, T = String(C.boxAlign || "left"), E = y && (b || !!v.width), D = (e) => E ? `<div style="text-align: ${T};">${e}</div>` : e, O = `${E ? "display: inline-block; " : ""}${y && v.height ? "overflow: hidden; " : ""}`;
658
+ switch (e.type) {
658
659
  case "heading": return D(`<h2${w} style="margin-top: 0; margin-bottom: 8px; ${O}${S}">${C.text || "Heading"}</h2>`);
659
660
  case "paragraph": return D(`<p${w} style="margin-top: 0; margin-bottom: 12px; ${O}${S}">${C.text || "Paragraph text content."}</p>`);
660
661
  case "text": return D(`<div${w} style="${O}${S}">${C.text || ""}</div>`);
661
662
  case "button": {
662
- let e = u(g), t = P({
663
+ let t = d(e), n = P({
663
664
  ...v,
664
- width: e.width,
665
- height: e.height
665
+ width: t.width,
666
+ height: t.height
666
667
  });
667
- return `<div data-plexo-id="${B(String(g.id))}-align" style="text-align: ${v.textAlign || "center"};"><a${w} href="${C.href || "#"}" target="${C.openInNewTab ? "_blank" : "_self"}" style="display: inline-block; text-decoration: none; box-sizing: border-box; ${t}">${C.text || "Button"}</a></div>`;
668
+ return `<div data-plexo-id="${B(String(e.id))}-align" style="text-align: ${v.textAlign || "center"};"><a${w} href="${C.href || "#"}" target="${C.openInNewTab ? "_blank" : "_self"}" style="display: inline-block; text-decoration: none; box-sizing: border-box; ${n}">${C.text || "Button"}</a></div>`;
668
669
  }
669
670
  case "image": {
670
- let e = h(g), t = v.textAlign === "center" ? "margin: 0 auto; display: block;" : v.textAlign === "right" ? "margin-left: auto; display: block;" : "display: inline-block;", n = P({
671
+ let t = g(e), n = v.textAlign === "center" ? "margin: 0 auto; display: block;" : v.textAlign === "right" ? "margin-left: auto; display: block;" : "display: inline-block;", r = P({
671
672
  ...v,
672
- width: e.width,
673
- height: e.height
673
+ width: t.width,
674
+ height: t.height
674
675
  });
675
- return `<img${w} src="${C.src || "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe"}" alt="${C.alt || ""}" style="${n} ${t}" />`;
676
+ return `<img${w} src="${C.src || "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe"}" alt="${C.alt || ""}" style="${r} ${n}" />`;
676
677
  }
677
678
  case "divider": return `<hr${w} style="border: 0; border-top: ${v.borderWidth || "1px"} ${v.borderStyle || "solid"} ${v.borderColor || "#334155"}; ${S}" />`;
678
679
  case "spacer": return `<div${w} style="height: ${v.height || "24px"};"></div>`;
@@ -682,36 +683,36 @@ var oe = (g, _ = !1) => {
682
683
  </div>`;
683
684
  case "form_container": {
684
685
  if (C.provider === "maildrip" && typeof C.maildripPageId == "string" && C.maildripPageId.trim()) {
685
- let e = B(C.maildripPageId.trim());
686
+ let t = B(C.maildripPageId.trim());
686
687
  return `<div${w} style="${P({
687
688
  ...v,
688
- height: p(g)
689
- })}"><opt-in-embed-form page-id="${e}"></opt-in-embed-form></div>`;
689
+ height: m(e)
690
+ })}"><opt-in-embed-form page-id="${t}"></opt-in-embed-form></div>`;
690
691
  }
691
- let n = {
692
+ let r = {
692
693
  ...z(),
693
694
  ...v
694
- }, r = {};
695
- for (let e of Object.keys(n)) U.includes(e) || (r[e] = n[e]);
696
- r.height = p(g);
697
- let i = P(r), a = l(t(Array.isArray(C.fields) ? C.fields : [])), o = n.fieldSpacing || "12px", s = a.map((e) => `<div style="margin-bottom: ${o};">${re(e)}</div>`).join(""), c = C.buttonAutoWidth === !1 ? n.buttonWidth || "100%" : "auto", u = n.buttonAlign === "left" ? "flex-start" : n.buttonAlign === "right" ? "flex-end" : "center", d = C.buttonAutoHeight === !1 && n.buttonHeight || "auto", f = P({
698
- backgroundColor: n.buttonBackgroundColor,
699
- color: n.buttonTextColor,
700
- borderRadius: n.buttonBorderRadius,
701
- paddingTop: e(n.buttonPaddingTop, n.buttonPadding, "top", "10px"),
702
- paddingBottom: e(n.buttonPaddingBottom, n.buttonPadding, "bottom", "10px"),
703
- paddingLeft: e(n.buttonPaddingLeft, n.buttonPadding, "left", "14px"),
704
- paddingRight: e(n.buttonPaddingRight, n.buttonPadding, "right", "14px"),
705
- marginTop: e(n.buttonMarginTop, n.buttonMargin, "top"),
706
- marginBottom: e(n.buttonMarginBottom, n.buttonMargin, "bottom"),
707
- marginLeft: e(n.buttonMarginLeft, n.buttonMargin, "left"),
708
- marginRight: e(n.buttonMarginRight, n.buttonMargin, "right"),
709
- fontSize: n.buttonFontSize,
710
- fontWeight: n.buttonFontWeight,
711
- width: c,
712
- height: d
713
- }), m = B(C.actionUrl || C.action || "#"), h = B(C.method || "POST"), _ = C.submitLabel || "Submit";
714
- return `<form${w} action="${m}" method="${h}" style="${i}">${s}${`<div style="opacity: 0; height: 0; width: 0; overflow: hidden;"><label>Leave this field blank</label><input type="text" name="${H}" tabindex="-1" autocomplete="off" /></div>`}<div style="display: flex; width: 100%; justify-content: ${u};"><button type="submit" style="border: 0; cursor: pointer; ${f}">${_}</button></div></form>`;
695
+ }, i = {};
696
+ for (let e of Object.keys(r)) U.includes(e) || (i[e] = r[e]);
697
+ i.height = m(e);
698
+ let a = P(i), o = u(n(Array.isArray(C.fields) ? C.fields : [])), s = r.fieldSpacing || "12px", c = o.map((e) => `<div style="margin-bottom: ${s};">${re(e)}</div>`).join(""), l = C.buttonAutoWidth === !1 ? r.buttonWidth || "100%" : "auto", d = r.buttonAlign === "left" ? "flex-start" : r.buttonAlign === "right" ? "flex-end" : "center", f = C.buttonAutoHeight === !1 && r.buttonHeight || "auto", p = P({
699
+ backgroundColor: r.buttonBackgroundColor,
700
+ color: r.buttonTextColor,
701
+ borderRadius: r.buttonBorderRadius,
702
+ paddingTop: t(r.buttonPaddingTop, r.buttonPadding, "top", "10px"),
703
+ paddingBottom: t(r.buttonPaddingBottom, r.buttonPadding, "bottom", "10px"),
704
+ paddingLeft: t(r.buttonPaddingLeft, r.buttonPadding, "left", "14px"),
705
+ paddingRight: t(r.buttonPaddingRight, r.buttonPadding, "right", "14px"),
706
+ marginTop: t(r.buttonMarginTop, r.buttonMargin, "top"),
707
+ marginBottom: t(r.buttonMarginBottom, r.buttonMargin, "bottom"),
708
+ marginLeft: t(r.buttonMarginLeft, r.buttonMargin, "left"),
709
+ marginRight: t(r.buttonMarginRight, r.buttonMargin, "right"),
710
+ fontSize: r.buttonFontSize,
711
+ fontWeight: r.buttonFontWeight,
712
+ width: l,
713
+ height: f
714
+ }), h = B(C.actionUrl || C.action || "#"), g = B(C.method || "POST"), _ = C.submitLabel || "Submit";
715
+ return `<form${w} action="${h}" method="${g}" style="${a}">${c}${`<div style="opacity: 0; height: 0; width: 0; overflow: hidden;"><label>Leave this field blank</label><input type="text" name="${H}" tabindex="-1" autocomplete="off" /></div>`}<div style="display: flex; width: 100%; justify-content: ${d};"><button type="submit" style="border: 0; cursor: pointer; ${p}">${_}</button></div></form>`;
715
716
  }
716
717
  case "input": {
717
718
  let e = C.inputType || C.type || "text", t = B(C.name || C.fieldName || "field"), n = B(C.placeholder || ""), r = C.required ? " required" : "";
@@ -721,7 +722,7 @@ var oe = (g, _ = !1) => {
721
722
  case "select": return `<select${w} name="${B(C.name || C.fieldName || "field")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${S}"${C.required ? " required" : ""}>${(Array.isArray(C.options) ? C.options : []).map((e) => `<option value="${B(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>`;
722
723
  case "html": return `<div${w} style="${P({
723
724
  ...v,
724
- height: s(g, "auto")
725
+ height: c(e, "auto")
725
726
  })}">${C.htmlContent || C.text || ""}</div>`;
726
727
  case "blog_title":
727
728
  case "blog_content":
@@ -731,8 +732,8 @@ var oe = (g, _ = !1) => {
731
732
  case "blog_categories":
732
733
  case "blog_comments":
733
734
  case "blog_post_list": {
734
- let e = g.type.replace(/^blog_/, "").replace(/_([a-z])/g, (e, t) => t.toUpperCase()), t = P(v);
735
- return `<div${w} data-plexo-blog-${e}="true"${V("data-plexo-blog-prefix", C.prefix)} style="${t}"></div>`;
735
+ let t = e.type.replace(/^blog_/, "").replace(/_([a-z])/g, (e, t) => t.toUpperCase()), n = P(v);
736
+ return `<div${w} data-plexo-blog-${t}="true"${V("data-plexo-blog-prefix", C.prefix)} style="${n}"></div>`;
736
737
  }
737
738
  case "product":
738
739
  case "booking":
@@ -741,19 +742,19 @@ var oe = (g, _ = !1) => {
741
742
  case "checkout_flow":
742
743
  case "order_confirmation":
743
744
  case "order_tracking": {
744
- let e = g.type.replace(/_([a-z])/g, (e, t) => t.toUpperCase()), t = P(v);
745
- return `<div${w} data-plexo-commerce-${e}="true"${V("data-plexo-product-id", C.productId)}${V("data-plexo-service-id", C.serviceId)}${V("data-plexo-commerce-mode", C.mode)}${C.storeMode === !1 ? " data-plexo-commerce-store-mode=\"false\"" : ""}${V("data-plexo-commerce-limit", C.limit)}${V("data-plexo-commerce-category", C.category)}${V("data-plexo-commerce-sort", C.sort)}${V("data-plexo-commerce-items-per-row", C.itemsPerRow)}${V("data-plexo-commerce-items-per-page", C.itemsPerPage)}${C.paginated ? " data-plexo-commerce-paginated=\"true\"" : ""} style="${t}">${_ ? `<div style="padding: 12px; box-sizing: border-box; height: 100%;">${ne(g.type)}</div>` : ""}</div>`;
745
+ let t = e.type.replace(/_([a-z])/g, (e, t) => t.toUpperCase()), n = P(v);
746
+ return `<div${w} data-plexo-commerce-${t}="true"${V("data-plexo-product-id", C.productId)}${V("data-plexo-service-id", C.serviceId)}${V("data-plexo-commerce-mode", C.mode)}${C.storeMode === !1 ? " data-plexo-commerce-store-mode=\"false\"" : ""}${V("data-plexo-commerce-limit", C.limit)}${V("data-plexo-commerce-category", C.category)}${V("data-plexo-commerce-sort", C.sort)}${V("data-plexo-commerce-items-per-row", C.itemsPerRow)}${V("data-plexo-commerce-items-per-page", C.itemsPerPage)}${C.paginated ? " data-plexo-commerce-paginated=\"true\"" : ""} style="${n}">${_ ? `<div style="padding: 12px; box-sizing: border-box; height: 100%;">${ne(e.type)}</div>` : ""}</div>`;
746
747
  }
747
748
  case "social": {
748
- let e = r(g), t = v.textAlign === "center" ? "center" : v.textAlign === "right" ? "flex-end" : "flex-start";
749
+ let t = i(e), n = v.textAlign === "center" ? "center" : v.textAlign === "right" ? "flex-end" : "flex-start";
749
750
  return `<div${w} style="${P({
750
751
  padding: v.padding,
751
752
  margin: v.margin,
752
753
  display: "flex",
753
754
  flexWrap: "wrap",
754
755
  gap: v.iconSpacing || "8px",
755
- justifyContent: t
756
- })}">${e.map((e) => {
756
+ justifyContent: n
757
+ })}">${t.map((e) => {
757
758
  let t = P({
758
759
  width: e.size,
759
760
  height: e.size,
@@ -766,45 +767,45 @@ var oe = (g, _ = !1) => {
766
767
  justifyContent: "center",
767
768
  overflow: "hidden"
768
769
  });
769
- return `<a href="${B(e.url)}" style="${t} text-decoration: none;">${f(e.provider, e.color)}</a>`;
770
+ return `<a href="${B(e.url)}" style="${t} text-decoration: none;">${p(e.provider, e.color)}</a>`;
770
771
  }).join("")}</div>`;
771
772
  }
772
773
  case "menu": {
773
- let e = n(g), t = v.textAlign === "center" ? "center" : v.textAlign === "right" ? "flex-end" : "flex-start";
774
+ let t = r(e), n = v.textAlign === "center" ? "center" : v.textAlign === "right" ? "flex-end" : "flex-start";
774
775
  return `<div${w} style="${P({
775
776
  ...v,
776
777
  display: "flex",
777
778
  flexWrap: "wrap",
778
779
  gap: "16px",
779
- justifyContent: t
780
- })}">${e.map((e) => `<a href="${B(e.href)}" style="text-decoration: none; color: inherit; font-weight: ${v.fontWeight || 600};">${B(e.label)}</a>`).join("")}</div>`;
780
+ justifyContent: n
781
+ })}">${t.map((e) => `<a href="${B(e.href)}" style="text-decoration: none; color: inherit; font-weight: ${v.fontWeight || 600};">${B(e.label)}</a>`).join("")}</div>`;
781
782
  }
782
783
  case "icon": {
783
- let e = v.fontSize || `${C.iconSize || 48}px`, t = v.color || "#1e293b", n = parseInt(String(e), 10) || 48, r = m(C.iconName, n, t), i = v.textAlign === "right" ? "flex-end" : v.textAlign === "left" ? "flex-start" : "center", a = P({
784
+ let t = v.fontSize || `${C.iconSize || 48}px`, n = v.color || "#1e293b", r = parseInt(String(t), 10) || 48, i = h(C.iconName, r, n), a = v.textAlign === "right" ? "flex-end" : v.textAlign === "left" ? "flex-start" : "center", o = P({
784
785
  padding: v.padding,
785
786
  margin: v.margin,
786
787
  display: "flex",
787
- justifyContent: i
788
- }), o = typeof C.href == "string" ? C.href.trim() : "", s = `<span style="display: inline-flex; align-items: center; justify-content: center; color: ${t};">${r}</span>`, c = o ? `<a${w} href="${B(o)}" target="${C.openInNewTab ? "_blank" : "_self"}" style="text-decoration: none;">${s}</a>` : `<span${w}>${s}</span>`;
789
- return `<div data-plexo-id="${B(String(g.id))}-align" style="${a}">${c}</div>`;
788
+ justifyContent: a
789
+ }), s = typeof C.href == "string" ? C.href.trim() : "", c = `<span style="display: inline-flex; align-items: center; justify-content: center; color: ${n};">${i}</span>`, l = s ? `<a${w} href="${B(s)}" target="${C.openInNewTab ? "_blank" : "_self"}" style="text-decoration: none;">${c}</a>` : `<span${w}>${c}</span>`;
790
+ return `<div data-plexo-id="${B(String(e.id))}-align" style="${o}">${l}</div>`;
790
791
  }
791
792
  case "table": {
792
- let e = d(g), t = `${v.borderWidth || "1px"} ${v.borderStyle || "solid"} ${v.borderColor || "#cbd5e1"}`, n = (n, r, i, a) => {
793
- let o = a ? "th" : "td", s = a ? v.headerBgColor || "#f8fafc" : e.striped && r % 2 == 1 ? "#f8fafc" : v.contentBgColor || "#ffffff", c = a ? v.headerTextColor || "#1e293b" : v.contentTextColor || "#475569", l = a ? v.headerTextAlign || "left" : v.contentTextAlign || "left";
794
- return `<tr>${n.map((e, n) => {
795
- let r = P({
793
+ let t = f(e), n = `${v.borderWidth || "1px"} ${v.borderStyle || "solid"} ${v.borderColor || "#cbd5e1"}`, r = (r, i, a, o) => {
794
+ let s = o ? "th" : "td", c = o ? v.headerBgColor || "#f8fafc" : t.striped && i % 2 == 1 ? "#f8fafc" : v.contentBgColor || "#ffffff", l = o ? v.headerTextColor || "#1e293b" : v.contentTextColor || "#475569", u = o ? v.headerTextAlign || "left" : v.contentTextAlign || "left";
795
+ return `<tr>${r.map((t, r) => {
796
+ let i = P({
796
797
  padding: v.cellPadding || "8px",
797
- border: t,
798
- backgroundColor: s,
799
- color: c,
800
- textAlign: l,
798
+ border: n,
799
+ backgroundColor: c,
800
+ color: l,
801
+ textAlign: u,
801
802
  lineHeight: v.contentLineHeight,
802
803
  letterSpacing: v.contentLetterSpacing,
803
- fontWeight: a ? "700" : void 0
804
- }), u = ` data-plexo-cell="${B(g.id)}|${i}-${n}"`;
805
- return `<${o}${u} style="${r}">${e || "&nbsp;"}</${o}>`;
804
+ fontWeight: o ? "700" : void 0
805
+ }), d = ` data-plexo-cell="${B(e.id)}|${a}-${r}"`;
806
+ return `<${s}${d} style="${i}">${t || "&nbsp;"}</${s}>`;
806
807
  }).join("")}</tr>`;
807
- }, r = e.enableHeader && e.cells.length > 0 ? `<thead>${n(e.cells[0], 0, 0, !0)}</thead>` : "", i = +!!e.enableHeader, a = e.enableFooter ? e.cells.length - 1 : e.cells.length, o = e.cells.slice(i, Math.max(i, a)).map((e, t) => n(e, t, i + t, !1)).join(""), s = e.enableFooter && e.cells.length > i ? `<tfoot>${n(e.cells[e.cells.length - 1], e.cells.length - 1, e.cells.length - 1, !1)}</tfoot>` : "", c = P({
808
+ }, i = t.enableHeader && t.cells.length > 0 ? `<thead>${r(t.cells[0], 0, 0, !0)}</thead>` : "", a = +!!t.enableHeader, o = t.enableFooter ? t.cells.length - 1 : t.cells.length, s = t.cells.slice(a, Math.max(a, o)).map((e, t) => r(e, t, a + t, !1)).join(""), c = t.enableFooter && t.cells.length > a ? `<tfoot>${r(t.cells[t.cells.length - 1], t.cells.length - 1, t.cells.length - 1, !1)}</tfoot>` : "", l = P({
808
809
  borderCollapse: "collapse",
809
810
  width: "100%"
810
811
  });
@@ -812,10 +813,10 @@ var oe = (g, _ = !1) => {
812
813
  padding: v.padding,
813
814
  margin: v.margin,
814
815
  overflowX: "auto"
815
- })}"><table style="${c}">${r}<tbody>${o}</tbody>${s}</table></div>`;
816
+ })}"><table style="${l}">${i}<tbody>${s}</tbody>${c}</table></div>`;
816
817
  }
817
818
  case "video": {
818
- let e = i(C.videoUrl), t = C.linkType === "email" ? `mailto:${C.href || ""}` : C.href || C.videoUrl || "#", n = C.target || "_blank";
819
+ let e = a(C.videoUrl), t = C.linkType === "email" ? `mailto:${C.href || ""}` : C.href || C.videoUrl || "#", n = C.target || "_blank";
819
820
  return `<div${w} style="${P({
820
821
  padding: v.padding,
821
822
  margin: v.margin,
@@ -824,25 +825,25 @@ var oe = (g, _ = !1) => {
824
825
  })}"><a href="${B(t)}" target="${B(n)}" style="position: relative; display: block; text-decoration: none;"><img src="${B(e.thumbnailUrl)}" alt="${B(C.alt || "Video preview")}" style="width: 100%; display: block;" /><span style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 9999px; background: rgba(15, 23, 42, 0.75); display: flex; align-items: center; justify-content: center;"><span style="width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 16px solid #ffffff; margin-left: 4px;"></span></span></a></div>`;
825
826
  }
826
827
  case "timer": {
827
- let e = C.showLabels !== !1, t = P({
828
+ let t = C.showLabels !== !1, n = P({
828
829
  fontFamily: v.digitsFontFamily,
829
830
  fontSize: v.digitsFontSize || "40px",
830
831
  color: v.digitsColor || "#1e293b",
831
832
  fontWeight: "800"
832
- }), n = P({
833
+ }), r = P({
833
834
  fontFamily: v.labelsFontFamily,
834
835
  fontSize: v.labelsFontSize || "16px",
835
836
  color: v.labelsColor || "#64748b"
836
- }), r = P({
837
+ }), i = P({
837
838
  backgroundColor: v.backgroundColor || "#f8fafc",
838
839
  borderRadius: v.borderRadius || "8px",
839
840
  padding: v.padding || "16px",
840
841
  textAlign: "center"
841
- }), i = (r, i, a) => `<div style="display: inline-flex; flex-direction: column; align-items: center; padding: 0 10px;"><span data-unit="${r}" style="${t}">${a}</span>${e ? `<span style="${n}">${i}</span>` : ""}</div>`, o = a(C.targetDate, C.timezone), s = B(new Date(o.targetTimestamp).toISOString()), c = `<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${g.id}"]`)});if(!wrap)return;var target=new Date(wrap.getAttribute('data-plexo-target')).getTime();function pad(n){return String(n).padStart(2,'0');}function tick(){var diff=target-Date.now();var d=wrap.querySelector('[data-unit="days"]'),h=wrap.querySelector('[data-unit="hours"]'),m=wrap.querySelector('[data-unit="minutes"]'),s=wrap.querySelector('[data-unit="seconds"]');if(diff<=0){[d,h,m,s].forEach(function(n){if(n)n.textContent='00';});clearInterval(iv);return;}var total=Math.floor(diff/1000);if(d)d.textContent=pad(Math.floor(total/86400));if(h)h.textContent=pad(Math.floor(total%86400/3600));if(m)m.textContent=pad(Math.floor(total%3600/60));if(s)s.textContent=pad(total%60);}tick();var iv=setInterval(tick,1000);})();<\/script>`;
842
- return `<div${w} data-plexo-target="${s}" style="${r}"><div>${i("days", "Days", o.days)}${i("hours", "Hours", o.hours)}${i("minutes", "Mins", o.minutes)}${i("seconds", "Secs", o.seconds)}</div>${c}</div>`;
842
+ }), a = (e, i, a) => `<div style="display: inline-flex; flex-direction: column; align-items: center; padding: 0 10px;"><span data-unit="${e}" style="${n}">${a}</span>${t ? `<span style="${r}">${i}</span>` : ""}</div>`, s = o(C.targetDate, C.timezone), c = B(new Date(s.targetTimestamp).toISOString()), l = `<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${e.id}"]`)});if(!wrap)return;var target=new Date(wrap.getAttribute('data-plexo-target')).getTime();function pad(n){return String(n).padStart(2,'0');}function tick(){var diff=target-Date.now();var d=wrap.querySelector('[data-unit="days"]'),h=wrap.querySelector('[data-unit="hours"]'),m=wrap.querySelector('[data-unit="minutes"]'),s=wrap.querySelector('[data-unit="seconds"]');if(diff<=0){[d,h,m,s].forEach(function(n){if(n)n.textContent='00';});clearInterval(iv);return;}var total=Math.floor(diff/1000);if(d)d.textContent=pad(Math.floor(total/86400));if(h)h.textContent=pad(Math.floor(total%86400/3600));if(m)m.textContent=pad(Math.floor(total%3600/60));if(s)s.textContent=pad(total%60);}tick();var iv=setInterval(tick,1000);})();<\/script>`;
843
+ return `<div${w} data-plexo-target="${c}" style="${i}"><div>${a("days", "Days", s.days)}${a("hours", "Hours", s.hours)}${a("minutes", "Mins", s.minutes)}${a("seconds", "Secs", s.seconds)}</div>${l}</div>`;
843
844
  }
844
845
  case "carousel": {
845
- let e = Array.isArray(C.images) ? C.images : [], t = `plexo-carousel-${g.id}`, n = P({
846
+ let t = Array.isArray(C.images) ? C.images : [], n = `plexo-carousel-${e.id}`, r = P({
846
847
  padding: v.padding || "10px",
847
848
  margin: v.margin,
848
849
  backgroundColor: v.backgroundColor,
@@ -851,67 +852,67 @@ var oe = (g, _ = !1) => {
851
852
  width: v.width || "100%",
852
853
  height: v.height || "360px"
853
854
  });
854
- if (e.length === 0) return `<div${w} style="${n}"><div style="padding: 40px; text-align: center; color: #94a3b8;">No images in carousel</div></div>`;
855
- let r = Math.min(e.length - 1, Math.max(0, parseInt(String(C.activeIdx), 10) || 0)), i = e.map((t, n) => (n - r + e.length) % e.length), a = e.length * 5, o = .6, s = e.map((n, r) => {
856
- let o = i[r] * 5, s = e.length > 1 ? ` animation: ${t}-fade ${a}s ease-in-out infinite; animation-delay: ${o}s;` : "";
857
- return `<div data-slide-idx="${r}" style="opacity: ${e.length > 1 ? "0" : "1"};${s}"><img src="${B(n.src)}" alt="${B(n.alt || n.caption || "")}" style="width: 100%; height: 100%; object-fit: cover; display: block;" />${n.caption ? `<div class="${t}-caption" style="padding: 8px; text-align: center; background: rgba(15, 23, 42, 0.8); color: #fff; font-size: 12px; font-weight: 600;">${B(n.caption)}</div>` : ""}</div>`;
858
- }).join(""), c = e.some((e) => !!e.caption) ? "38px" : "10px", l = e.length > 1 ? `<div class="${t}-dots" style="display: flex; gap: 6px; justify-content: center;">${e.map((e, n) => {
859
- let r = i[n] * 5;
860
- return `<span style="width: 6px; height: 6px; border-radius: 9999px; background: #cbd5e1; animation: ${t}-dot ${a}s ease-in-out infinite; animation-delay: ${r}s;"></span>`;
861
- }).join("")}</div>` : "", u = (5 - o) / a * 100, d = 5 / a * 100, f = o / a * 100;
862
- return `<div${w} class="${t}" style="${n}">${e.length > 1 ? `<style>.${t}{position:relative;}.${t} [data-slide-idx]{position:absolute;inset:0;}.${t}-caption{position:absolute;left:0;right:0;bottom:0;}.${t}-dots{position:absolute;left:0;right:0;bottom:${c};}@keyframes ${t}-fade{0%{opacity:0;}${f}%{opacity:1;}${u}%{opacity:1;}${d}%{opacity:0;}100%{opacity:0;}}@keyframes ${t}-dot{0%{background:#cbd5e1;}${f}%{background:#4f46e5;}${u}%{background:#4f46e5;}${d}%{background:#cbd5e1;}100%{background:#cbd5e1;}}</style>` : `<style>.${t}{position:relative;}.${t} [data-slide-idx]{position:absolute;inset:0;}.${t}-caption{position:absolute;left:0;right:0;bottom:0;}</style>`}${s}${l}</div>`;
855
+ if (t.length === 0) return `<div${w} style="${r}"><div style="padding: 40px; text-align: center; color: #94a3b8;">No images in carousel</div></div>`;
856
+ let i = Math.min(t.length - 1, Math.max(0, parseInt(String(C.activeIdx), 10) || 0)), a = t.map((e, n) => (n - i + t.length) % t.length), o = t.length * 5, s = .6, c = t.map((e, r) => {
857
+ let i = a[r] * 5, s = t.length > 1 ? ` animation: ${n}-fade ${o}s ease-in-out infinite; animation-delay: ${i}s;` : "";
858
+ return `<div data-slide-idx="${r}" style="opacity: ${t.length > 1 ? "0" : "1"};${s}"><img src="${B(e.src)}" alt="${B(e.alt || e.caption || "")}" style="width: 100%; height: 100%; object-fit: cover; display: block;" />${e.caption ? `<div class="${n}-caption" style="padding: 8px; text-align: center; background: rgba(15, 23, 42, 0.8); color: #fff; font-size: 12px; font-weight: 600;">${B(e.caption)}</div>` : ""}</div>`;
859
+ }).join(""), l = t.some((e) => !!e.caption) ? "38px" : "10px", u = t.length > 1 ? `<div class="${n}-dots" style="display: flex; gap: 6px; justify-content: center;">${t.map((e, t) => {
860
+ let r = a[t] * 5;
861
+ return `<span style="width: 6px; height: 6px; border-radius: 9999px; background: #cbd5e1; animation: ${n}-dot ${o}s ease-in-out infinite; animation-delay: ${r}s;"></span>`;
862
+ }).join("")}</div>` : "", d = (5 - s) / o * 100, f = 5 / o * 100, p = s / o * 100;
863
+ return `<div${w} class="${n}" style="${r}">${t.length > 1 ? `<style>.${n}{position:relative;}.${n} [data-slide-idx]{position:absolute;inset:0;}.${n}-caption{position:absolute;left:0;right:0;bottom:0;}.${n}-dots{position:absolute;left:0;right:0;bottom:${l};}@keyframes ${n}-fade{0%{opacity:0;}${p}%{opacity:1;}${d}%{opacity:1;}${f}%{opacity:0;}100%{opacity:0;}}@keyframes ${n}-dot{0%{background:#cbd5e1;}${p}%{background:#4f46e5;}${d}%{background:#4f46e5;}${f}%{background:#cbd5e1;}100%{background:#cbd5e1;}}</style>` : `<style>.${n}{position:relative;}.${n} [data-slide-idx]{position:absolute;inset:0;}.${n}-caption{position:absolute;left:0;right:0;bottom:0;}</style>`}${c}${u}</div>`;
863
864
  }
864
865
  case "accordion": {
865
- let e = o(g), t = C.mode === "multi" ? "multi" : "single", n = C.iconStyle || "chevron", r = C.iconPosition === "left", i = C.showDividers !== !1, a = C.animation !== "none", s = P({
866
+ let t = s(e), n = C.mode === "multi" ? "multi" : "single", r = C.iconStyle || "chevron", i = C.iconPosition === "left", a = C.showDividers !== !1, o = C.animation !== "none", c = P({
866
867
  border: `${v.borderWidth || "1px"} ${v.borderStyle || "solid"} ${v.borderColor || "#e2e8f0"}`,
867
868
  borderRadius: v.borderRadius || "10px",
868
869
  overflow: "hidden",
869
870
  margin: v.margin
870
871
  });
871
- return e.length === 0 ? `<div${w} style="${s}"></div>` : `<div${w} data-acc-mode="${t}" data-acc-icon-style="${n}" style="${s}"><div class="plexo-acc-group">${X(e, v, {
872
- iconStyle: n,
873
- iconOnLeft: r,
874
- showDividers: i,
875
- animated: a
876
- }, g.id)}</div>${`<script>(function(){var root=document.querySelector(${JSON.stringify(`[data-plexo-id="${g.id}"]`)});if(!root)return;var mode=root.getAttribute('data-acc-mode')||'single';var iconStyle=root.getAttribute('data-acc-icon-style')||'chevron';function setIconState(icon,open){if(!icon)return;if(iconStyle==='plus'){icon.textContent=open?'−':'+';}else if(iconStyle==='arrow'){icon.style.transform=open?'rotate(90deg)':'';}else if(iconStyle==='chevron'){icon.style.transform=open?'rotate(180deg)':'';}}var headers=root.querySelectorAll('[data-acc-header]');headers.forEach(function(header){header.addEventListener('click',function(){var item=header.parentElement;var group=item.parentElement;var panel=item.children[1];var isOpen=header.getAttribute('data-acc-open')==='1';if(mode!=='multi'&&group){Array.prototype.forEach.call(group.children,function(sib){if(sib===item)return;var sh=sib.children[0];var sp=sib.children[1];if(sh){sh.setAttribute('data-acc-open','0');setIconState(sh.querySelector('[data-acc-icon]'),false);}if(sp)sp.style.gridTemplateRows='0fr';});}var next=!isOpen;header.setAttribute('data-acc-open',next?'1':'0');panel.style.gridTemplateRows=next?'1fr':'0fr';setIconState(header.querySelector('[data-acc-icon]'),next);});});})();<\/script>`}</div>`;
872
+ return t.length === 0 ? `<div${w} style="${c}"></div>` : `<div${w} data-acc-mode="${n}" data-acc-icon-style="${r}" style="${c}"><div class="plexo-acc-group">${X(t, v, {
873
+ iconStyle: r,
874
+ iconOnLeft: i,
875
+ showDividers: a,
876
+ animated: o
877
+ }, e.id)}</div>${`<script>(function(){var root=document.querySelector(${JSON.stringify(`[data-plexo-id="${e.id}"]`)});if(!root)return;var mode=root.getAttribute('data-acc-mode')||'single';var iconStyle=root.getAttribute('data-acc-icon-style')||'chevron';function setIconState(icon,open){if(!icon)return;if(iconStyle==='plus'){icon.textContent=open?'−':'+';}else if(iconStyle==='arrow'){icon.style.transform=open?'rotate(90deg)':'';}else if(iconStyle==='chevron'){icon.style.transform=open?'rotate(180deg)':'';}}var headers=root.querySelectorAll('[data-acc-header]');headers.forEach(function(header){header.addEventListener('click',function(){var item=header.parentElement;var group=item.parentElement;var panel=item.children[1];var isOpen=header.getAttribute('data-acc-open')==='1';if(mode!=='multi'&&group){Array.prototype.forEach.call(group.children,function(sib){if(sib===item)return;var sh=sib.children[0];var sp=sib.children[1];if(sh){sh.setAttribute('data-acc-open','0');setIconState(sh.querySelector('[data-acc-icon]'),false);}if(sp)sp.style.gridTemplateRows='0fr';});}var next=!isOpen;header.setAttribute('data-acc-open',next?'1':'0');panel.style.gridTemplateRows=next?'1fr':'0fr';setIconState(header.querySelector('[data-acc-icon]'),next);});});})();<\/script>`}</div>`;
877
878
  }
878
- default: return ae(g.type);
879
+ default: return ae(e.type);
879
880
  }
880
- }, Z = (e, t, n) => {
881
- if (!e || typeof e != "object") return "";
882
- let r = j(e);
883
- if (!r) return `\n <!-- ROW SKIPPED (type="${typeof e.type == "string" ? e.type : "unknown"}"${e.id ? `, id="${e.id}"` : ""}): this row has no 'columns' array and its shorthand content (e.g. a list of items/links) can't be auto-converted without losing data. Provide a fully hydrated row with 'columns' and 'elements' instead. -->`;
884
- let i = r.style?.columnGap, a = typeof i == "number" ? `${i}px` : typeof i == "string" ? i.trim() : "", o = a !== "" && a !== "0" && a !== "0px", s = r.style?.gap, c = typeof s == "number" ? `${s}px` : typeof s == "string" ? s.trim() : "", l = c !== "" && c !== "0" && c !== "0px", u = { ...r.style || {} };
885
- delete u.columnGap;
886
- let d = P(u), f = V("id", r.htmlId), p = V("class", r.htmlClass), m = r.id || `row-${Math.random().toString(36).substring(2, 9)}`;
887
- I(t, m, r.style, "tablet", r.styleTablet), I(t, m, r.style, "mobile", r.styleMobile), (o || l) && t.mobile.push(`[data-plexo-id="${m}"] > .plexo-col { margin-bottom: 0; }`);
888
- let h = `\n <!-- ROW START: ${r.id || "row"} -->`, _ = o ? `gap: ${a}; margin-left: 0; margin-right: 0;` : "margin-left: -8px; margin-right: -8px;";
889
- h += `\n <div data-plexo-id="${m}"${f}${p} class="plexo-row" style="display: flex; flex-wrap: wrap; ${_} ${d}">`;
890
- let v = Array.isArray(r.columns) ? r.columns : [], y = o && v.length > 1 ? `(${a} * ${v.length - 1} / ${v.length})` : "";
891
- for (let e of v) {
892
- if (!e) continue;
893
- let r = e.styles || e.style || {}, i = P(r), a = r.gap || "16px", s = V("id", e.attrs?.htmlId), c = e.attrs?.htmlClass ? ` ${e.attrs.htmlClass}` : "", l = e.id || `col-${Math.random().toString(36).substring(2, 9)}`;
894
- I(t, l, r, "tablet", e.stylesTablet), I(t, l, r, "mobile", e.stylesMobile);
895
- let u = Array.isArray(e.elements) ? e.elements : [], d = Array.isArray(e.nestedRows) ? e.nestedRows : [], f = n && u.length === 0 && d.length === 0 ? "min-height: 148px; " : "", p = e.width || "100%", m = typeof p == "string" && /^\s*\d+(\.\d+)?\s*%\s*$/.test(p), _ = o && m && y ? `calc(${p.trim()} - ${y})` : p, v = o ? "padding-left: 0; padding-right: 0;" : "padding-left: 8px; padding-right: 8px;";
896
- h += `\n <!-- COLUMN START: ${e.id || "col"} -->`, h += `\n <div data-plexo-id="${l}"${s} class="plexo-col${c}" style="box-sizing: border-box; ${v} width: ${_}; --plexo-col-gap: ${a}; ${f}${i}">`;
897
- let b = new Map(u.map((e) => [e.id, e])), x = new Map(d.map((e) => [e.id, e])), S = g({
898
- ...e,
899
- elements: u,
900
- nestedRows: d
881
+ }, Z = (t, n, r) => {
882
+ if (!t || typeof t != "object") return "";
883
+ let i = j(t);
884
+ if (!i) return `\n <!-- ROW SKIPPED (type="${typeof t.type == "string" ? t.type : "unknown"}"${t.id ? `, id="${t.id}"` : ""}): this row has no 'columns' array and its shorthand content (e.g. a list of items/links) can't be auto-converted without losing data. Provide a fully hydrated row with 'columns' and 'elements' instead. -->`;
885
+ let a = i.style?.columnGap, o = typeof a == "number" ? `${a}px` : typeof a == "string" ? a.trim() : "", s = o !== "" && o !== "0" && o !== "0px", c = i.style?.gap, l = typeof c == "number" ? `${c}px` : typeof c == "string" ? c.trim() : "", u = l !== "" && l !== "0" && l !== "0px", d = { ...i.style || {} };
886
+ delete d.columnGap;
887
+ let f = P(d), p = V("id", i.htmlId), m = V("class", i.htmlClass), h = i.id || `row-${Math.random().toString(36).substring(2, 9)}`;
888
+ I(n, h, i.style, "tablet", i.styleTablet), I(n, h, i.style, "mobile", i.styleMobile), (s || u) && n.mobile.push(`[data-plexo-id="${h}"] > .plexo-col { margin-bottom: 0; }`);
889
+ let g = `\n <!-- ROW START: ${i.id || "row"} -->`, _ = s ? `gap: ${o}; margin-left: 0; margin-right: 0;` : "margin-left: -8px; margin-right: -8px;";
890
+ g += `\n <div data-plexo-id="${h}"${p}${m} class="plexo-row" style="display: flex; flex-wrap: wrap; ${_} ${f}">`;
891
+ let v = Array.isArray(i.columns) ? i.columns : [], y = s && v.length > 1 ? `(${o} * ${v.length - 1} / ${v.length})` : "";
892
+ for (let t of v) {
893
+ if (!t) continue;
894
+ let i = t.styles || t.style || {}, a = P(i), o = i.gap || "16px", c = V("id", t.attrs?.htmlId), l = t.attrs?.htmlClass ? ` ${t.attrs.htmlClass}` : "", u = t.id || `col-${Math.random().toString(36).substring(2, 9)}`;
895
+ I(n, u, i, "tablet", t.stylesTablet), I(n, u, i, "mobile", t.stylesMobile);
896
+ let d = Array.isArray(t.elements) ? t.elements : [], f = Array.isArray(t.nestedRows) ? t.nestedRows : [], p = r && d.length === 0 && f.length === 0 ? "min-height: 148px; " : "", m = t.width || "100%", h = typeof m == "string" && /^\s*\d+(\.\d+)?\s*%\s*$/.test(m), _ = s && h && y ? `calc(${m.trim()} - ${y})` : m, v = s ? "padding-left: 0; padding-right: 0;" : "padding-left: 8px; padding-right: 8px;";
897
+ g += `\n <!-- COLUMN START: ${t.id || "col"} -->`, g += `\n <div data-plexo-id="${u}"${c} class="plexo-col${l}" style="box-sizing: border-box; ${v} width: ${_}; --plexo-col-gap: ${o}; ${p}${a}">`;
898
+ let b = new Map(d.map((e) => [e.id, e])), x = new Map(f.map((e) => [e.id, e])), S = e({
899
+ ...t,
900
+ elements: d,
901
+ nestedRows: f
901
902
  }), C = S[S.length - 1];
902
903
  for (let e of S) {
903
- let r = b.get(e);
904
- if (r) {
905
- let i = r.attributes || {}, o = typeof i.htmlClassNames == "string" ? i.htmlClassNames : typeof i.htmlClass == "string" ? i.htmlClass : typeof i.className == "string" ? i.className : "", s = V("id", i.htmlId), c = V("class", o), l = r.style?.display, u = l === "inline-block" || l === "inline" || l === "inline-flex", d = e === C ? "" : `margin-bottom: ${a};`, f = u ? `${d}${d ? " " : ""}display: ${l}; vertical-align: top;` : d;
906
- I(t, r.id, r.style, "tablet", L(r, r.styleTablet)), I(t, r.id, r.style, "mobile", L(r, r.styleMobile)), R(t, r, "tablet", r.styleTablet), R(t, r, "mobile", r.styleMobile), h += `\n <div${s}${c} style="${f}">`, h += `\n ${oe(r, n)}`, h += "\n </div>";
904
+ let t = b.get(e);
905
+ if (t) {
906
+ let i = t.attributes || {}, a = typeof i.htmlClassNames == "string" ? i.htmlClassNames : typeof i.htmlClass == "string" ? i.htmlClass : typeof i.className == "string" ? i.className : "", s = V("id", i.htmlId), c = V("class", a), l = t.style?.display, u = l === "inline-block" || l === "inline" || l === "inline-flex", d = e === C ? "" : `margin-bottom: ${o};`, f = u ? `${d}${d ? " " : ""}display: ${l}; vertical-align: top;` : d;
907
+ I(n, t.id, t.style, "tablet", L(t, t.styleTablet)), I(n, t.id, t.style, "mobile", L(t, t.styleMobile)), R(n, t, "tablet", t.styleTablet), R(n, t, "mobile", t.styleMobile), g += `\n <div${s}${c} style="${f}">`, g += `\n ${oe(t, r)}`, g += "\n </div>";
907
908
  continue;
908
909
  }
909
910
  let i = x.get(e);
910
- i && (h += Z(i, t, n));
911
+ i && (g += Z(i, n, r));
911
912
  }
912
- h += "\n </div>";
913
+ g += "\n </div>";
913
914
  }
914
- return h += "\n </div>", h;
915
+ return g += "\n </div>", g;
915
916
  };
916
917
  function se(e) {
917
918
  let t = /* @__PURE__ */ new Set(), n = 0, r = (e) => {
package/dist/compiler.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "./compiler-BvseEhDC.js";
1
+ import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "./compiler-Dhpsq71h.js";
2
2
  export { u as DEFAULT_BODY_FONT_FAMILY, o as FORM_HONEYPOT_FIELD_NAME, c as FORM_NON_CSS_STYLE_KEYS, i as collectResponsiveRule, e as compileToHTML, s as compileToHTMLWithStrataAuto, l as compileToPlainText, t as convertSectionRowToPlexoRow, a as getFormDefaultStyle, d as getInlineStylesImportant, n as htmlToPlainText, r as injectStrataBundle };