@charisol/plexo-sdk 1.4.42 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -0
- package/dist/InlineColorPicker-8ewm1Asx.js +2912 -0
- package/dist/client-DlVJt_6V.js +339 -0
- package/dist/colorUtils-ohNG3v1i.js +222 -0
- package/dist/columnOrder-f5-VOg2T.js +11 -0
- package/dist/{compiler-BvseEhDC.js → compiler-Dhpsq71h.js} +121 -120
- package/dist/compiler.js +1 -1
- package/dist/{compilerClient-BIrZIgfG.js → compilerClient-BC4TGAr9.js} +93 -92
- package/dist/compilerClient.js +1 -1
- package/dist/{iconSvgStatic-CGue7nyp.js → iconSvgStatic-Lnpg27U9.js} +66 -75
- package/dist/index.js +14042 -15423
- package/dist/legacy-71dHsiAM.js +16088 -0
- package/dist/lint-D-2x-Yeb.js +225 -0
- package/dist/{mjmlBrowser-DWk0mRD6.js → mjmlBrowser-wlHcAT8n.js} +2 -2
- package/dist/plexo-sdk.css +1 -1
- package/dist/rolldown-runtime-B1bRi_D7.js +27 -0
- package/dist/sanitize.js +1 -1
- package/dist/{sanitizeCompiledHtml-CNjUXlMK.js → sanitizeCompiledHtml-GgGsetm3.js} +673 -698
- package/dist/{zoom-in-DL4pfiLG.js → schemas-Bq5o5MfF.js} +916 -2120
- package/dist/utilities/colorUtils.d.ts +35 -0
- package/dist/utilities/playground.interfaces.d.ts +19 -1
- package/dist/v2/V2Editor.d.ts +25 -0
- package/dist/v2/compile/build.d.ts +38 -0
- package/dist/v2/compile/html.d.ts +18 -0
- package/dist/v2/compile/index.d.ts +28 -15
- package/dist/v2/compile/react.d.ts +17 -0
- package/dist/v2/compile/schema.d.ts +16 -0
- package/dist/v2/components/canvas/AlignmentGuidesOverlay.d.ts +7 -0
- package/dist/v2/components/canvas/CanvasArea.d.ts +2 -0
- package/dist/v2/components/canvas/CanvasControls.d.ts +2 -0
- package/dist/v2/components/canvas/ContextualToolbar.d.ts +7 -0
- package/dist/v2/components/canvas/DropIndicator.d.ts +6 -0
- package/dist/v2/components/canvas/IrView.d.ts +12 -0
- package/dist/v2/components/canvas/NodeRenderer.d.ts +12 -0
- package/dist/v2/components/canvas/PageFrame.d.ts +9 -0
- package/dist/v2/components/canvas/ResizeHandles.d.ts +8 -0
- package/dist/v2/components/canvas/SectionToolbar.d.ts +6 -0
- package/dist/v2/components/canvas/SpacingOverlay.d.ts +7 -0
- package/dist/v2/components/design/AutoUpdateWatcher.d.ts +7 -0
- package/dist/v2/components/design/DesignSystemPanel.d.ts +7 -0
- package/dist/v2/components/design/ReviewView.d.ts +7 -0
- package/dist/v2/components/design/StrataCard.d.ts +8 -0
- package/dist/v2/components/design/TidyView.d.ts +15 -0
- package/dist/v2/components/design/bits.d.ts +20 -0
- package/dist/v2/components/design/useStrataSync.d.ts +51 -0
- package/dist/v2/components/layout/ContextMenu.d.ts +2 -0
- package/dist/v2/components/layout/EditorShell.d.ts +2 -0
- package/dist/v2/components/layout/LeftToolRail.d.ts +2 -0
- package/dist/v2/components/layout/PreviewOverlay.d.ts +6 -0
- package/dist/v2/components/layout/TopToolbar.d.ts +2 -0
- package/dist/v2/components/modals/SettingsModal.d.ts +7 -0
- package/dist/v2/components/modals/ShortcutsModal.d.ts +7 -0
- package/dist/v2/components/properties/ColorField.d.ts +14 -0
- package/dist/v2/components/properties/ElementSettings.d.ts +39 -0
- package/dist/v2/components/properties/LinkField.d.ts +26 -0
- package/dist/v2/components/properties/PageInspector.d.ts +2 -0
- package/dist/v2/components/properties/PropertiesPanel.d.ts +2 -0
- package/dist/v2/components/properties/SectionSettings.d.ts +6 -0
- package/dist/v2/components/properties/sections/ConstraintsSection.d.ts +7 -0
- package/dist/v2/components/properties/sections/LayoutDiagnostics.d.ts +7 -0
- package/dist/v2/components/sections/BlockInspector.d.ts +9 -0
- package/dist/v2/components/sections/FieldForm.d.ts +14 -0
- package/dist/v2/components/sections/ManagedChildNotice.d.ts +7 -0
- package/dist/v2/components/sections/SectionThumb.d.ts +11 -0
- package/dist/v2/components/sidebar/FlyoutDrawer.d.ts +2 -0
- package/dist/v2/components/sidebar/InsertPanel.d.ts +2 -0
- package/dist/v2/components/sidebar/LayersPanel.d.ts +2 -0
- package/dist/v2/components/sidebar/LibraryPanel.d.ts +3 -0
- package/dist/v2/components/sidebar/PagesPanel.d.ts +2 -0
- package/dist/v2/components/sidebar/SectionsPanel.d.ts +6 -0
- package/dist/v2/components/sidebar/SolPanel.d.ts +3 -0
- package/dist/v2/components/sidebar/TemplateChooser.d.ts +13 -0
- package/dist/v2/context/BlockContext.d.ts +7 -0
- package/dist/v2/context/EditorContext.d.ts +213 -0
- package/dist/v2/context/FrameContext.d.ts +3 -0
- package/dist/v2/context/ParentLayoutContext.d.ts +10 -0
- package/dist/v2/context/PlacementContext.d.ts +4 -0
- package/dist/v2/data/blankPage.d.ts +3 -0
- package/dist/v2/data/insertableComponents.d.ts +17 -0
- package/dist/v2/data/samplePageData.d.ts +3 -0
- package/dist/v2/design/audit.d.ts +78 -0
- package/dist/v2/design/baseline.d.ts +3 -0
- package/dist/v2/design/baselineData.d.ts +3 -0
- package/dist/v2/design/components.d.ts +9 -0
- package/dist/v2/design/css.d.ts +16 -0
- package/dist/v2/design/fonts.d.ts +10 -0
- package/dist/v2/design/index.d.ts +11 -0
- package/dist/v2/design/lint.d.ts +22 -0
- package/dist/v2/design/shades.d.ts +15 -0
- package/dist/v2/design/textStyles.d.ts +29 -0
- package/dist/v2/design/themes.d.ts +35 -0
- package/dist/v2/design/tokens.d.ts +24 -0
- package/dist/v2/design/types.d.ts +81 -0
- package/dist/v2/host/HostContext.d.ts +176 -0
- package/dist/v2/host/SolMark.d.ts +8 -0
- package/dist/v2/index.d.ts +19 -11
- package/dist/v2/migrate/legacy.d.ts +26 -0
- package/dist/v2/render/adapt.d.ts +12 -0
- package/dist/v2/render/anchors.d.ts +7 -0
- package/dist/v2/render/elementCss.d.ts +7 -0
- package/dist/v2/render/elementProps.d.ts +92 -0
- package/dist/v2/render/elements.d.ts +32 -0
- package/dist/v2/render/formAction.d.ts +33 -0
- package/dist/v2/render/frames.d.ts +10 -0
- package/dist/v2/render/iconSet.d.ts +5 -0
- package/dist/v2/render/ir.d.ts +20 -0
- package/dist/v2/render/nodeStyle.d.ts +24 -0
- package/dist/v2/render/placement.d.ts +12 -0
- package/dist/v2/render/resolve.d.ts +3 -0
- package/dist/v2/render/runtime.d.ts +18 -0
- package/dist/v2/render/sanitize.d.ts +15 -0
- package/dist/v2/render/socialIcons.d.ts +83 -0
- package/dist/v2/sections/catalog/about.d.ts +2 -0
- package/dist/v2/sections/catalog/announcement.d.ts +2 -0
- package/dist/v2/sections/catalog/contact.d.ts +2 -0
- package/dist/v2/sections/catalog/cta.d.ts +2 -0
- package/dist/v2/sections/catalog/faq.d.ts +2 -0
- package/dist/v2/sections/catalog/features.d.ts +2 -0
- package/dist/v2/sections/catalog/footer.d.ts +5 -0
- package/dist/v2/sections/catalog/gallery.d.ts +2 -0
- package/dist/v2/sections/catalog/header.d.ts +2 -0
- package/dist/v2/sections/catalog/hero.d.ts +2 -0
- package/dist/v2/sections/catalog/logos.d.ts +2 -0
- package/dist/v2/sections/catalog/pricing.d.ts +2 -0
- package/dist/v2/sections/catalog/stats.d.ts +2 -0
- package/dist/v2/sections/catalog/steps.d.ts +2 -0
- package/dist/v2/sections/catalog/team.d.ts +2 -0
- package/dist/v2/sections/catalog/testimonials.d.ts +2 -0
- package/dist/v2/sections/catalog/video.d.ts +2 -0
- package/dist/v2/sections/kit.d.ts +64 -0
- package/dist/v2/sections/materialize.d.ts +72 -0
- package/dist/v2/sections/pageTemplates.d.ts +52 -0
- package/dist/v2/sections/registry.d.ts +5 -0
- package/dist/v2/sections/types.d.ts +103 -0
- package/dist/v2/sol/catalogSchema.d.ts +43 -0
- package/dist/v2/sol/commands.d.ts +21 -0
- package/dist/v2/sol/describe.d.ts +32 -0
- package/dist/v2/sol/index.d.ts +7 -0
- package/dist/v2/sol/parse.d.ts +10 -0
- package/dist/v2/sol/prompt.d.ts +5 -0
- package/dist/v2/sol/schema.d.ts +177 -0
- package/dist/v2/sol/summarize.d.ts +4 -0
- package/dist/v2/strata/autoUpdate.d.ts +37 -0
- package/dist/v2/strata/client.d.ts +38 -0
- package/dist/v2/strata/index.d.ts +8 -0
- package/dist/v2/strata/merge.d.ts +27 -0
- package/dist/v2/strata/types.d.ts +115 -0
- package/dist/v2/types/editor.d.ts +175 -0
- package/dist/v2/utils/css.d.ts +3 -0
- package/dist/v2/utils/id.d.ts +3 -0
- package/dist/v2-compile.js +138 -7
- package/dist/v2-strata.js +2 -0
- package/dist/v2.js +10993 -8186
- package/package.json +6 -1
- package/dist/toReact-BBzjWoFG.js +0 -595
- package/dist/v2/ai/commands.d.ts +0 -616
- package/dist/v2/ai/dispatch.d.ts +0 -24
- package/dist/v2/ai/nodeSchema.d.ts +0 -196
- package/dist/v2/brand/BrandColorSwatches.d.ts +0 -4
- package/dist/v2/brand/BrandPanel.d.ts +0 -4
- package/dist/v2/brand/ChangeSetGallery.d.ts +0 -10
- package/dist/v2/brand/StyleSetEditor.d.ts +0 -22
- package/dist/v2/canvas/CatalogDragContext.d.ts +0 -27
- package/dist/v2/canvas/ContextMenuContext.d.ts +0 -16
- package/dist/v2/canvas/DeviceModeContext.d.ts +0 -20
- package/dist/v2/canvas/DragEngineContext.d.ts +0 -13
- package/dist/v2/canvas/LayoutGuideContext.d.ts +0 -22
- package/dist/v2/canvas/PreviewModeContext.d.ts +0 -15
- package/dist/v2/canvas/SidebarContext.d.ts +0 -21
- package/dist/v2/canvas/StylePainterContext.d.ts +0 -19
- package/dist/v2/canvas/WorkspaceThemeContext.d.ts +0 -19
- package/dist/v2/canvas/aiTextTransforms.d.ts +0 -24
- package/dist/v2/canvas/animationPresets.d.ts +0 -12
- package/dist/v2/canvas/constants.d.ts +0 -6
- package/dist/v2/canvas/layoutRoles.d.ts +0 -12
- package/dist/v2/canvas/modelRect.d.ts +0 -4
- package/dist/v2/canvas/rectMath.d.ts +0 -34
- package/dist/v2/canvas/reorderMath.d.ts +0 -8
- package/dist/v2/canvas/resizeMath.d.ts +0 -16
- package/dist/v2/canvas/resolveBoxStyle.d.ts +0 -12
- package/dist/v2/canvas/resolveTargetSection.d.ts +0 -10
- package/dist/v2/canvas/sectionDividerShapes.d.ts +0 -12
- package/dist/v2/canvas/snapping.d.ts +0 -28
- package/dist/v2/canvas/useAlignNode.d.ts +0 -10
- package/dist/v2/canvas/useClipboardKeyBinding.d.ts +0 -7
- package/dist/v2/canvas/useDeleteKeyBinding.d.ts +0 -3
- package/dist/v2/canvas/useDragEngine.d.ts +0 -44
- package/dist/v2/canvas/useDraggableNode.d.ts +0 -30
- package/dist/v2/canvas/useInlineTextEdit.d.ts +0 -29
- package/dist/v2/canvas/usePointerEngine.d.ts +0 -22
- package/dist/v2/canvas/useResizeHandle.d.ts +0 -12
- package/dist/v2/canvas/useResolvedTextStyles.d.ts +0 -13
- package/dist/v2/canvas/useSelectionRects.d.ts +0 -13
- package/dist/v2/canvas/useUndoRedoKeyBinding.d.ts +0 -8
- package/dist/v2/catalog/elementCatalog.d.ts +0 -31
- package/dist/v2/catalog/imagePreset.d.ts +0 -7
- package/dist/v2/compile/toReact.d.ts +0 -32
- package/dist/v2/components/AdornmentLayer.d.ts +0 -20
- package/dist/v2/components/AskSolPanel.d.ts +0 -25
- package/dist/v2/components/CatalogDragGhost.d.ts +0 -6
- package/dist/v2/components/CellBoundary.d.ts +0 -14
- package/dist/v2/components/CenterCanvas.d.ts +0 -3
- package/dist/v2/components/ContentTabPanel.d.ts +0 -12
- package/dist/v2/components/ContextMenu.d.ts +0 -5
- package/dist/v2/components/ContextualToolbar.d.ts +0 -25
- package/dist/v2/components/ImagesTabPanel.d.ts +0 -15
- package/dist/v2/components/LayoutGuidePanel.d.ts +0 -10
- package/dist/v2/components/ManageLayersPanel.d.ts +0 -13
- package/dist/v2/components/NodeRenderer.d.ts +0 -8
- package/dist/v2/components/PreviewOverlay.d.ts +0 -11
- package/dist/v2/components/ResizeHandle.d.ts +0 -6
- package/dist/v2/components/RightRail.d.ts +0 -13
- package/dist/v2/components/SectionDividerOverlay.d.ts +0 -8
- package/dist/v2/components/SectionEdgeAddZone.d.ts +0 -17
- package/dist/v2/components/SectionGridOverlay.d.ts +0 -10
- package/dist/v2/components/SectionNamePill.d.ts +0 -6
- package/dist/v2/components/SectionNode.d.ts +0 -5
- package/dist/v2/components/SectionSideRail.d.ts +0 -17
- package/dist/v2/components/SelectionToolbar.d.ts +0 -11
- package/dist/v2/components/StylePainterToast.d.ts +0 -5
- package/dist/v2/components/V2Canvas.d.ts +0 -59
- package/dist/v2/components/nodes/ButtonNode.d.ts +0 -4
- package/dist/v2/components/nodes/ContainerNode.d.ts +0 -11
- package/dist/v2/components/nodes/EmbedNode.d.ts +0 -4
- package/dist/v2/components/nodes/ImageNode.d.ts +0 -4
- package/dist/v2/components/nodes/InputNode.d.ts +0 -4
- package/dist/v2/components/nodes/MenuNode.d.ts +0 -18
- package/dist/v2/components/nodes/TextNode.d.ts +0 -4
- package/dist/v2/inspector/AiQuickEditPanel.d.ts +0 -12
- package/dist/v2/inspector/AnimationPanel.d.ts +0 -11
- package/dist/v2/inspector/DesignAccordions.d.ts +0 -7
- package/dist/v2/inspector/FieldRenderer.d.ts +0 -9
- package/dist/v2/inspector/IconPopoverButton.d.ts +0 -9
- package/dist/v2/inspector/MenuIconPanel.d.ts +0 -7
- package/dist/v2/inspector/MenuManagePanel.d.ts +0 -8
- package/dist/v2/inspector/Popover.d.ts +0 -21
- package/dist/v2/inspector/SectionDividerPanel.d.ts +0 -9
- package/dist/v2/inspector/fieldStyles.d.ts +0 -15
- package/dist/v2/inspector/fields/ColorField.d.ts +0 -7
- package/dist/v2/inspector/fields/NumberField.d.ts +0 -7
- package/dist/v2/inspector/fields/SelectField.d.ts +0 -7
- package/dist/v2/inspector/fields/TextField.d.ts +0 -7
- package/dist/v2/inspector/fields/TextStyleField.d.ts +0 -11
- package/dist/v2/inspector/fields/TextareaField.d.ts +0 -7
- package/dist/v2/inspector/schema.d.ts +0 -25
- package/dist/v2/inspector/useFieldCommit.d.ts +0 -12
- package/dist/v2/store/brandDefaults.d.ts +0 -4
- package/dist/v2/store/brandTypes.d.ts +0 -40
- package/dist/v2/store/cloneSubtree.d.ts +0 -12
- package/dist/v2/store/createBrandStore.d.ts +0 -2
- package/dist/v2/store/createCanvasStore.d.ts +0 -2
- package/dist/v2/store/seed.d.ts +0 -17
- package/dist/v2/store/types.d.ts +0 -163
- package/dist/v2/ui/theme.d.ts +0 -85
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
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 = (
|
|
652
|
-
if (!
|
|
653
|
-
let v =
|
|
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 =
|
|
657
|
-
switch (
|
|
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
|
|
663
|
+
let t = d(e), n = P({
|
|
663
664
|
...v,
|
|
664
|
-
width:
|
|
665
|
-
height:
|
|
665
|
+
width: t.width,
|
|
666
|
+
height: t.height
|
|
666
667
|
});
|
|
667
|
-
return `<div data-plexo-id="${B(String(
|
|
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
|
|
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:
|
|
673
|
-
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="${
|
|
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
|
|
686
|
+
let t = B(C.maildripPageId.trim());
|
|
686
687
|
return `<div${w} style="${P({
|
|
687
688
|
...v,
|
|
688
|
-
height:
|
|
689
|
-
})}"><opt-in-embed-form page-id="${
|
|
689
|
+
height: m(e)
|
|
690
|
+
})}"><opt-in-embed-form page-id="${t}"></opt-in-embed-form></div>`;
|
|
690
691
|
}
|
|
691
|
-
let
|
|
692
|
+
let r = {
|
|
692
693
|
...z(),
|
|
693
694
|
...v
|
|
694
|
-
},
|
|
695
|
-
for (let e of Object.keys(
|
|
696
|
-
|
|
697
|
-
let
|
|
698
|
-
backgroundColor:
|
|
699
|
-
color:
|
|
700
|
-
borderRadius:
|
|
701
|
-
paddingTop:
|
|
702
|
-
paddingBottom:
|
|
703
|
-
paddingLeft:
|
|
704
|
-
paddingRight:
|
|
705
|
-
marginTop:
|
|
706
|
-
marginBottom:
|
|
707
|
-
marginLeft:
|
|
708
|
-
marginRight:
|
|
709
|
-
fontSize:
|
|
710
|
-
fontWeight:
|
|
711
|
-
width:
|
|
712
|
-
height:
|
|
713
|
-
}),
|
|
714
|
-
return `<form${w} action="${
|
|
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:
|
|
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
|
|
735
|
-
return `<div${w} data-plexo-blog-${
|
|
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
|
|
745
|
-
return `<div${w} data-plexo-commerce-${
|
|
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
|
|
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:
|
|
756
|
-
})}">${
|
|
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;">${
|
|
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
|
|
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:
|
|
780
|
-
})}">${
|
|
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
|
|
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:
|
|
788
|
-
}),
|
|
789
|
-
return `<div data-plexo-id="${B(String(
|
|
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
|
|
793
|
-
let
|
|
794
|
-
return `<tr>${
|
|
795
|
-
let
|
|
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:
|
|
798
|
-
backgroundColor:
|
|
799
|
-
color:
|
|
800
|
-
textAlign:
|
|
798
|
+
border: n,
|
|
799
|
+
backgroundColor: c,
|
|
800
|
+
color: l,
|
|
801
|
+
textAlign: u,
|
|
801
802
|
lineHeight: v.contentLineHeight,
|
|
802
803
|
letterSpacing: v.contentLetterSpacing,
|
|
803
|
-
fontWeight:
|
|
804
|
-
}),
|
|
805
|
-
return `<${
|
|
804
|
+
fontWeight: o ? "700" : void 0
|
|
805
|
+
}), d = ` data-plexo-cell="${B(e.id)}|${a}-${r}"`;
|
|
806
|
+
return `<${s}${d} style="${i}">${t || " "}</${s}>`;
|
|
806
807
|
}).join("")}</tr>`;
|
|
807
|
-
},
|
|
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="${
|
|
816
|
+
})}"><table style="${l}">${i}<tbody>${s}</tbody>${c}</table></div>`;
|
|
816
817
|
}
|
|
817
818
|
case "video": {
|
|
818
|
-
let e =
|
|
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
|
|
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
|
-
}),
|
|
833
|
+
}), r = P({
|
|
833
834
|
fontFamily: v.labelsFontFamily,
|
|
834
835
|
fontSize: v.labelsFontSize || "16px",
|
|
835
836
|
color: v.labelsColor || "#64748b"
|
|
836
|
-
}),
|
|
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
|
-
}),
|
|
842
|
-
return `<div${w} data-plexo-target="${
|
|
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
|
|
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 (
|
|
855
|
-
let
|
|
856
|
-
let
|
|
857
|
-
return `<div data-slide-idx="${r}" style="opacity: ${
|
|
858
|
-
}).join(""),
|
|
859
|
-
let r =
|
|
860
|
-
return `<span style="width: 6px; height: 6px; border-radius: 9999px; background: #cbd5e1; animation: ${
|
|
861
|
-
}).join("")}</div>` : "",
|
|
862
|
-
return `<div${w} class="${
|
|
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
|
|
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
|
|
872
|
-
iconStyle:
|
|
873
|
-
iconOnLeft:
|
|
874
|
-
showDividers:
|
|
875
|
-
animated:
|
|
876
|
-
},
|
|
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(
|
|
879
|
+
default: return ae(e.type);
|
|
879
880
|
}
|
|
880
|
-
}, Z = (
|
|
881
|
-
if (!
|
|
882
|
-
let
|
|
883
|
-
if (!
|
|
884
|
-
let
|
|
885
|
-
delete
|
|
886
|
-
let
|
|
887
|
-
I(
|
|
888
|
-
let
|
|
889
|
-
|
|
890
|
-
let v = Array.isArray(
|
|
891
|
-
for (let
|
|
892
|
-
if (!
|
|
893
|
-
let
|
|
894
|
-
I(
|
|
895
|
-
let
|
|
896
|
-
|
|
897
|
-
let b = new Map(
|
|
898
|
-
...
|
|
899
|
-
elements:
|
|
900
|
-
nestedRows:
|
|
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
|
|
904
|
-
if (
|
|
905
|
-
let i =
|
|
906
|
-
I(
|
|
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 && (
|
|
911
|
+
i && (g += Z(i, n, r));
|
|
911
912
|
}
|
|
912
|
-
|
|
913
|
+
g += "\n </div>";
|
|
913
914
|
}
|
|
914
|
-
return
|
|
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-
|
|
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 };
|