@charisol/plexo-sdk 1.4.41 → 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/components/SolMark.d.ts +8 -0
- package/dist/{iconSvgStatic-CGue7nyp.js → iconSvgStatic-Lnpg27U9.js} +66 -75
- package/dist/index.js +13129 -14500
- 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/aiHelper.d.ts +4 -0
- package/dist/utilities/colorUtils.d.ts +35 -0
- package/dist/utilities/playground.interfaces.d.ts +24 -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 -10
- 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 +10979 -8145
- 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 -19
- 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 -56
- 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 { d as t, f as n, g as r, h as i, m as a, o, p as s, t as c, u as l, y as u } from "./iconSvgStatic-Lnpg27U9.js";
|
|
2
3
|
//#region src/utilities/instrumentation.ts
|
|
3
4
|
var d = "plexo-node", f = "plexo-row", p = "plexo-col";
|
|
4
5
|
function m(e) {
|
|
@@ -180,79 +181,79 @@ var v = "https://cdn.jsdelivr.net/npm/@charisol/plexo-sdk@latest/dist/social-ico
|
|
|
180
181
|
"borderBottomLeftRadius"
|
|
181
182
|
]);
|
|
182
183
|
return n && t.push(`border-radius="${b(n)}"`), t.join(" ");
|
|
183
|
-
}, R = (
|
|
184
|
-
let p = E(
|
|
185
|
-
if (
|
|
186
|
-
if (
|
|
184
|
+
}, R = (e, d, f) => {
|
|
185
|
+
let p = E(e, d), m = x(e.style || {}), h = p.htmlId ? ` id="${b(p.htmlId)}"` : "", g = S(p.htmlClassNames, p.htmlClass, d === "landing_page" && p.hideOnMobile ? "hidden md:block" : ""), _ = d === "landing_page" ? C(g, e.id, f) : g, y = _ ? ` class="${b(_)}"` : "", A = typeof p.customCss == "string" && p.customCss.trim() ? p.customCss.trim() : "", j = A && d === "landing_page" ? `<style>${A}</style>` : "";
|
|
186
|
+
if (e.type === "form_container") return `${j}${O(e, d, f)}`;
|
|
187
|
+
if (e.type === "input" || e.type === "select" || e.type === "textarea") return `${j}${D(e, d, f)}`;
|
|
187
188
|
if (d === "email") {
|
|
188
|
-
if (
|
|
189
|
-
let
|
|
189
|
+
if (e.type === "button") {
|
|
190
|
+
let t = b(p.href || "#"), n = b(p.text || "Button"), r = o(e).width, i = r === "auto" ? "" : ` width="${b(r)}"`, a = e.style || {}, s = L(a), c = I(a, "padding", [
|
|
190
191
|
"paddingTop",
|
|
191
192
|
"paddingRight",
|
|
192
193
|
"paddingBottom",
|
|
193
194
|
"paddingLeft"
|
|
194
195
|
]) || "10px 16px";
|
|
195
|
-
return `<mj-button href="${
|
|
196
|
+
return `<mj-button href="${t}" css-class="${C(p.hideOnDesktop ? "desktop-hide" : "", e.id, f)}" padding="0" inner-padding="${b(c)}"${i}${s ? ` ${s}` : ""}>${n}</mj-button>`;
|
|
196
197
|
}
|
|
197
|
-
if (
|
|
198
|
-
let
|
|
199
|
-
return `<mj-image src="${b(p.src || "")}" alt="${b(p.alt || "")}"${
|
|
198
|
+
if (e.type === "image") {
|
|
199
|
+
let t = l(e), n = t.width && t.width !== "100%" ? ` width="${b(t.width)}"` : "", r = t.height && t.height !== "auto" ? ` height="${b(t.height)}"` : "", i = w(e.id, f);
|
|
200
|
+
return `<mj-image src="${b(p.src || "")}" alt="${b(p.alt || "")}"${n}${r}${i} />`;
|
|
200
201
|
}
|
|
201
|
-
if (
|
|
202
|
-
let
|
|
203
|
-
if (!
|
|
204
|
-
let
|
|
202
|
+
if (e.type === "social") {
|
|
203
|
+
let t = n(e);
|
|
204
|
+
if (!t.length) return "";
|
|
205
|
+
let r = e.style || {}, i = r.textAlign === "center" ? "center" : r.textAlign === "right" ? "flex-end" : "flex-start", a = r.iconSpacing || "8px", o = I(r, "padding", [
|
|
205
206
|
"paddingTop",
|
|
206
207
|
"paddingRight",
|
|
207
208
|
"paddingBottom",
|
|
208
209
|
"paddingLeft"
|
|
209
|
-
]) || "8px",
|
|
210
|
+
]) || "8px", s = I(r, "margin", [
|
|
210
211
|
"marginTop",
|
|
211
212
|
"marginRight",
|
|
212
213
|
"marginBottom",
|
|
213
214
|
"marginLeft"
|
|
214
|
-
]),
|
|
215
|
+
]), c = (e) => e === "square" ? "14px" : "9999px", l = t.map((e) => {
|
|
215
216
|
let t = `<img src="${`${v}/${u[e.provider] ? e.provider : "fallback"}.png`}" alt="" width="${parseInt(e.size, 10) || 36}" style="display:block;width:60%;height:60%;border:0;" />`;
|
|
216
|
-
return `<a href="${b(e.url)}" style="display:inline-flex;align-items:center;justify-content:center;width:${b(e.size)};height:${b(e.size)};background-color:${b(e.backgroundColor)};border-radius:${
|
|
217
|
-
}).join(""), d = `display:flex;flex-wrap:wrap;justify-content:${
|
|
218
|
-
return `<mj-raw><tr><td style="font-size:16px;"><div${T(
|
|
217
|
+
return `<a href="${b(e.url)}" style="display:inline-flex;align-items:center;justify-content:center;width:${b(e.size)};height:${b(e.size)};background-color:${b(e.backgroundColor)};border-radius:${c(e.iconType)};text-decoration:none;">${t}</a>`;
|
|
218
|
+
}).join(""), d = `display:flex;flex-wrap:wrap;justify-content:${i};gap:${b(String(a))};padding:${b(o)};${s ? `margin:${b(s)};` : ""}`;
|
|
219
|
+
return `<mj-raw><tr><td style="font-size:16px;"><div${T(e.id, f)} style="${d}">${l}</div></td></tr></mj-raw>`;
|
|
219
220
|
}
|
|
220
|
-
if (
|
|
221
|
-
let
|
|
222
|
-
return `<mj-navbar hamburger="hamburger"${w(
|
|
221
|
+
if (e.type === "menu") {
|
|
222
|
+
let n = t(e);
|
|
223
|
+
return `<mj-navbar hamburger="hamburger"${w(e.id, f)}>${n.map((e) => `<mj-navbar-link href="${b(e.href)}">${b(e.label)}</mj-navbar-link>`).join("")}</mj-navbar>`;
|
|
223
224
|
}
|
|
224
|
-
if (
|
|
225
|
-
let
|
|
226
|
-
let
|
|
227
|
-
return `<tr>${
|
|
228
|
-
let
|
|
229
|
-
return `<${
|
|
225
|
+
if (e.type === "table") {
|
|
226
|
+
let t = s(e), n = e.style || {}, r = `${n.borderWidth || "1px"} ${n.borderStyle || "solid"} ${n.borderColor || "#cbd5e1"}`, i = (i, a, o, s) => {
|
|
227
|
+
let c = s ? "th" : "td", l = s ? n.headerBgColor || "#f8fafc" : t.striped && a % 2 == 1 ? "#f8fafc" : n.contentBgColor || "#ffffff", u = s ? n.headerTextColor || "#1e293b" : n.contentTextColor || "#475569";
|
|
228
|
+
return `<tr>${i.map((t, i) => {
|
|
229
|
+
let a = f ? ` data-plexo-cell="${b(e.id)}|${o}-${i}"` : "";
|
|
230
|
+
return `<${c}${a} style="padding: ${n.cellPadding || "8px"}; border: ${r}; background-color: ${l}; color: ${u};">${b(t) || " "}</${c}>`;
|
|
230
231
|
}).join("")}</tr>`;
|
|
231
|
-
},
|
|
232
|
-
return `<mj-table${w(
|
|
232
|
+
}, a = +!!t.enableHeader, o = t.enableFooter ? t.cells.length - 1 : t.cells.length, c = t.enableHeader && t.cells.length > 0 ? `<thead>${i(t.cells[0], 0, 0, !0)}</thead>` : "", l = t.cells.slice(a, Math.max(a, o)).map((e, t) => i(e, t, a + t, !1)).join(""), u = t.enableFooter && t.cells.length > a ? `<tfoot>${i(t.cells[t.cells.length - 1], t.cells.length - 1, t.cells.length - 1, !1)}</tfoot>` : "";
|
|
233
|
+
return `<mj-table${w(e.id, f)}><table role="presentation" style="border-collapse: collapse; width: 100%;">${c}<tbody>${l}</tbody>${u}</table></mj-table>`;
|
|
233
234
|
}
|
|
234
|
-
if (
|
|
235
|
-
let
|
|
236
|
-
return `<mj-image src="${b(
|
|
235
|
+
if (e.type === "video") {
|
|
236
|
+
let t = r(p.videoUrl), n = p.linkType === "email" ? `mailto:${p.href || ""}` : p.href || p.videoUrl || "#", i = w(e.id, f);
|
|
237
|
+
return `<mj-image src="${b(t.thumbnailUrl)}" href="${b(n)}" alt="${b(p.alt || "Video preview")}"${i} />`;
|
|
237
238
|
}
|
|
238
|
-
if (
|
|
239
|
-
let
|
|
240
|
-
return `<mj-text align="center"${w(
|
|
239
|
+
if (e.type === "timer") {
|
|
240
|
+
let t = i(p.targetDate, p.timezone), n = p.showLabels !== !1;
|
|
241
|
+
return `<mj-text align="center"${w(e.id, f)}><div style="font-size: 28px; font-weight: 800;">${t.days}d ${t.hours}h ${t.minutes}m ${t.seconds}s</div>${n ? `<div style="font-size: 12px; color: #64748b;">Countdown to ${b(p.targetDate || "")}</div>` : ""}</mj-text>`;
|
|
241
242
|
}
|
|
242
|
-
if (
|
|
243
|
-
let
|
|
244
|
-
return
|
|
243
|
+
if (e.type === "carousel") {
|
|
244
|
+
let t = Array.isArray(p.images) ? p.images : [], n = w(e.id, f);
|
|
245
|
+
return t.length === 0 ? `<mj-text align="center"${n}>No images in carousel</mj-text>` : `<mj-carousel${n}>${t.map((e) => `<mj-carousel-image src="${b(e.src)}" alt="${b(e.alt || "")}" />`).join("")}</mj-carousel>`;
|
|
245
246
|
}
|
|
246
|
-
if (
|
|
247
|
-
let
|
|
248
|
-
return `<mj-text align="center"${w(
|
|
247
|
+
if (e.type === "icon") {
|
|
248
|
+
let t = parseInt(String(p.iconSize || 48), 10) || 48, n = e.style?.color || "#1e293b", r = c(p.iconName, t, n);
|
|
249
|
+
return `<mj-text align="center"${w(e.id, f)}>${r}</mj-text>`;
|
|
249
250
|
}
|
|
250
|
-
let d = C(p.hideOnDesktop ? "desktop-hide" : "",
|
|
251
|
-
if (
|
|
252
|
-
let
|
|
251
|
+
let d = C(p.hideOnDesktop ? "desktop-hide" : "", e.id, f);
|
|
252
|
+
if (e.type === "heading" || e.type === "paragraph" || e.type === "text") {
|
|
253
|
+
let t = e.type === "heading" ? {
|
|
253
254
|
fontSize: "24px",
|
|
254
255
|
fontWeight: "700"
|
|
255
|
-
} : { fontSize: "14px" },
|
|
256
|
+
} : { fontSize: "14px" }, n = e.style || {}, r = P(n, t), i = a(e).autoWidth, o = String(p.boxAlign || "left"), s = /* @__PURE__ */ new Set([
|
|
256
257
|
"fontSize",
|
|
257
258
|
"fontWeight",
|
|
258
259
|
"color",
|
|
@@ -260,41 +261,41 @@ var v = "https://cdn.jsdelivr.net/npm/@charisol/plexo-sdk@latest/dist/social-ico
|
|
|
260
261
|
"lineHeight",
|
|
261
262
|
"letterSpacing",
|
|
262
263
|
"textAlign"
|
|
263
|
-
]),
|
|
264
|
-
|
|
265
|
-
let
|
|
266
|
-
|
|
267
|
-
let u = S(
|
|
268
|
-
return `<mj-text${
|
|
264
|
+
]), c = Object.entries(n).filter(([e, t]) => !s.has(e) && e !== "width" && t != null && t !== "").map(([e, t]) => `${e.replace(/([A-Z])/g, "-$1").toLowerCase()}: ${b(String(t))}`);
|
|
265
|
+
i ? c.push("display: inline-block") : n.width && c.push(`width: ${b(String(n.width))}`), n.height && c.push("overflow: hidden"), (n.textAlign || o !== "left") && c.push(`text-align: ${b(String(n.textAlign || "left"))} !important`);
|
|
266
|
+
let l = "";
|
|
267
|
+
c.length > 0 && (l = `plexo-textbox-${e.id}`, k.push(`.${l} > div { ${c.join("; ")}; }`));
|
|
268
|
+
let u = S(l, d);
|
|
269
|
+
return `<mj-text${r ? ` ${r}` : ""} align="${b(o)}" css-class="${u}">${p.text || ""}</mj-text>`;
|
|
269
270
|
}
|
|
270
|
-
if (
|
|
271
|
-
let
|
|
272
|
-
return `<mj-spacer height="${b(String(
|
|
271
|
+
if (e.type === "spacer") {
|
|
272
|
+
let t = e.style?.height || "24px", n = w(e.id, f);
|
|
273
|
+
return `<mj-spacer height="${b(String(t))}"${n} />`;
|
|
273
274
|
}
|
|
274
|
-
if (
|
|
275
|
-
let
|
|
276
|
-
return `<mj-divider border-width="${b(String(
|
|
275
|
+
if (e.type === "divider") {
|
|
276
|
+
let t = e.style || {}, n = w(e.id, f);
|
|
277
|
+
return `<mj-divider border-width="${b(String(t.borderWidth || "1px"))}" border-style="${b(String(t.borderStyle || "solid"))}" border-color="${b(String(t.borderColor || "#334155"))}"${n} />`;
|
|
277
278
|
}
|
|
278
|
-
return
|
|
279
|
+
return e.type === "card" ? `<mj-text css-class="${d}"><strong style="display:block;margin-bottom:8px;">${b(p.title || "Card Title")}</strong><span style="font-size:14px;color:#64748b;">${b(p.description || "Card description.")}</span></mj-text>` : e.type === "html" ? `<mj-text css-class="${d}">${p.htmlContent || p.text || ""}</mj-text>` : `<mj-text${h}${y} css-class="${d}">${b(p.text || p.htmlContent || "")}</mj-text>`;
|
|
279
280
|
}
|
|
280
|
-
if (
|
|
281
|
-
let
|
|
282
|
-
return
|
|
281
|
+
if (e.type === "heading" || e.type === "paragraph" || e.type === "text") {
|
|
282
|
+
let t = e.style || {}, n = a(e).autoWidth, r = String(p.boxAlign || "left"), i = x(n ? Object.fromEntries(Object.entries(t).filter(([e]) => e !== "width")) : t), o = n || !!t.width, s = o ? "display:inline-block;" : "", c = e.type === "heading" ? "h2" : "p", l = e.type === "heading" ? "Heading" : "", u = `${j}<${c}${h}${y} style="${s}${i}">${b(p.text || l)}</${c}>`;
|
|
283
|
+
return o ? `<div style="text-align:${b(r)};">${u}</div>` : u;
|
|
283
284
|
}
|
|
284
|
-
switch (
|
|
285
|
+
switch (e.type) {
|
|
285
286
|
case "button": return `${j}<a${h}${y} href="${b(p.href || "#")}" style="${m}">${b(p.text || "Button")}</a>`;
|
|
286
287
|
case "image": return `${j}<img${h}${y} src="${b(p.src || "")}" alt="${b(p.alt || "")}" style="${m}" />`;
|
|
287
288
|
case "html": return `${j}<div${h}${y} style="${m}">${String(p.htmlContent || "")}</div>`;
|
|
288
289
|
case "social": {
|
|
289
|
-
let
|
|
290
|
+
let t = e.style || {}, r = n(e), i = t.textAlign === "center" ? "center" : t.textAlign === "right" ? "flex-end" : "flex-start";
|
|
290
291
|
return `${j}<div${h}${y} style="${x({
|
|
291
|
-
padding:
|
|
292
|
-
margin:
|
|
292
|
+
padding: t.padding,
|
|
293
|
+
margin: t.margin,
|
|
293
294
|
display: "flex",
|
|
294
295
|
flexWrap: "wrap",
|
|
295
|
-
gap:
|
|
296
|
-
justifyContent:
|
|
297
|
-
})}">${
|
|
296
|
+
gap: t.iconSpacing || "8px",
|
|
297
|
+
justifyContent: i
|
|
298
|
+
})}">${r.map((e) => {
|
|
298
299
|
let t = `${v}/${u[e.provider] ? e.provider : "fallback"}.png`, n = x({
|
|
299
300
|
width: e.size,
|
|
300
301
|
height: e.size,
|
|
@@ -310,14 +311,14 @@ var v = "https://cdn.jsdelivr.net/npm/@charisol/plexo-sdk@latest/dist/social-ico
|
|
|
310
311
|
}).join("")}</div>`;
|
|
311
312
|
}
|
|
312
313
|
case "menu": {
|
|
313
|
-
let
|
|
314
|
+
let n = e.style || {}, r = t(e), i = n.textAlign === "center" ? "center" : n.textAlign === "right" ? "flex-end" : "flex-start";
|
|
314
315
|
return `${j}<div${h}${y} style="${x({
|
|
315
|
-
...
|
|
316
|
+
...n,
|
|
316
317
|
display: "flex",
|
|
317
318
|
flexWrap: "wrap",
|
|
318
319
|
gap: "16px",
|
|
319
|
-
justifyContent:
|
|
320
|
-
})}">${
|
|
320
|
+
justifyContent: i
|
|
321
|
+
})}">${r.map((e) => `<a href="${b(e.href)}" style="text-decoration:none;color:inherit;font-weight:${b(String(n.fontWeight || 600))};">${b(e.label)}</a>`).join("")}</div>`;
|
|
321
322
|
}
|
|
322
323
|
case "blog_title":
|
|
323
324
|
case "blog_content":
|
|
@@ -326,33 +327,33 @@ var v = "https://cdn.jsdelivr.net/npm/@charisol/plexo-sdk@latest/dist/social-ico
|
|
|
326
327
|
case "blog_author":
|
|
327
328
|
case "blog_categories":
|
|
328
329
|
case "blog_comments":
|
|
329
|
-
case "blog_post_list": return `${j}<div${h}${y} data-plexo-blog-${
|
|
330
|
+
case "blog_post_list": return `${j}<div${h}${y} data-plexo-blog-${e.type.replace(/^blog_/, "").replace(/_([a-z])/g, (e, t) => t.toUpperCase())}="true"${p.prefix ? ` data-plexo-blog-prefix="${b(p.prefix)}"` : ""} style="${m}"></div>`;
|
|
330
331
|
case "product":
|
|
331
332
|
case "booking":
|
|
332
333
|
case "shop_grid":
|
|
333
334
|
case "cart_summary":
|
|
334
335
|
case "checkout_flow":
|
|
335
336
|
case "order_confirmation":
|
|
336
|
-
case "order_tracking": return `${j}<div${h}${y} data-plexo-commerce-${
|
|
337
|
+
case "order_tracking": return `${j}<div${h}${y} data-plexo-commerce-${e.type.replace(/_([a-z])/g, (e, t) => t.toUpperCase())}="true"${p.productId ? ` data-plexo-product-id="${b(p.productId)}"` : ""}${p.serviceId ? ` data-plexo-service-id="${b(p.serviceId)}"` : ""}${p.mode ? ` data-plexo-commerce-mode="${b(p.mode)}"` : ""}${p.storeMode === !1 ? " data-plexo-commerce-store-mode=\"false\"" : ""}${p.limit ? ` data-plexo-commerce-limit="${b(String(p.limit))}"` : ""}${p.category ? ` data-plexo-commerce-category="${b(p.category)}"` : ""}${p.sort ? ` data-plexo-commerce-sort="${b(p.sort)}"` : ""}${p.itemsPerRow ? ` data-plexo-commerce-items-per-row="${b(String(p.itemsPerRow))}"` : ""}${p.itemsPerPage ? ` data-plexo-commerce-items-per-page="${b(String(p.itemsPerPage))}"` : ""}${p.paginated ? " data-plexo-commerce-paginated=\"true\"" : ""} style="${m}"></div>`;
|
|
337
338
|
default: return `${j}<div${h}${y} style="${m}">${b(p.text || "")}</div>`;
|
|
338
339
|
}
|
|
339
|
-
}, z = (
|
|
340
|
-
if (
|
|
341
|
-
let
|
|
342
|
-
let
|
|
343
|
-
if (
|
|
344
|
-
let o =
|
|
345
|
-
return o ? `<mj-raw><tr><td style="font-size:16px;">${B(o, "landing_page",
|
|
346
|
-
}).join(""),
|
|
347
|
-
return `<mj-column width="${b(
|
|
340
|
+
}, z = (t, n, r) => {
|
|
341
|
+
if (n === "email") {
|
|
342
|
+
let i = new Map(t.elements.map((e) => [e.id, e])), a = new Map((Array.isArray(t.nestedRows) ? t.nestedRows : []).map((e) => [e.id, e])), o = e(t).map((e) => {
|
|
343
|
+
let t = i.get(e);
|
|
344
|
+
if (t) return R(t, n, r);
|
|
345
|
+
let o = a.get(e);
|
|
346
|
+
return o ? `<mj-raw><tr><td style="font-size:16px;">${B(o, "landing_page", r)}</td></tr></mj-raw>` : "";
|
|
347
|
+
}).join(""), s = F(t.styles || {}), c = t.elements.length === 0 && (!Array.isArray(t.nestedRows) || t.nestedRows.length === 0), l = S(A && c ? N({}, t.id, [`min-height: ${j}px`]) : "", C("", t.id, r, p)), u = l ? ` css-class="${b(l)}"` : "";
|
|
348
|
+
return `<mj-column width="${b(t.width || "100%")}" padding="0"${s}${u}>${o}</mj-column>`;
|
|
348
349
|
}
|
|
349
|
-
let
|
|
350
|
-
let
|
|
351
|
-
if (
|
|
352
|
-
let
|
|
353
|
-
return
|
|
354
|
-
}).join(""),
|
|
355
|
-
return `<div${
|
|
350
|
+
let i = x(t.styles || {}), a = new Map(t.elements.map((e) => [e.id, e])), o = new Map((Array.isArray(t.nestedRows) ? t.nestedRows : []).map((e) => [e.id, e])), s = e(t).map((e) => {
|
|
351
|
+
let t = a.get(e);
|
|
352
|
+
if (t) return R(t, n, r);
|
|
353
|
+
let i = o.get(e);
|
|
354
|
+
return i ? B(i, n, r) : "";
|
|
355
|
+
}).join(""), c = T(t.id, r, p), l = t.elements.length === 0 && (!Array.isArray(t.nestedRows) || t.nestedRows.length === 0), u = A && l ? `min-height: ${j}px;` : "";
|
|
356
|
+
return `<div${c} style="width:${b(t.width || "100%")};${u}${i}">${s}</div>`;
|
|
356
357
|
}, B = (e, t, n) => {
|
|
357
358
|
if (t === "email") return `<mj-section css-class="${C(e.style?.hideOnDesktop ? "desktop-hide" : "", e.id, n, f)}"${F(e.style || {})} padding="0">${e.columns.map((e) => z(e, t, n)).join("")}</mj-section>`;
|
|
358
359
|
let r = x(e.style || {}), i = e.columns.map((e) => z(e, t, n)).join("");
|
package/dist/compilerClient.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./compilerClient-
|
|
1
|
+
import { t as e } from "./compilerClient-BC4TGAr9.js";
|
|
2
2
|
export { e as parseJsonToTargetFormat };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SOL's mark — Plexo's AI. The Plexo shield with a small accent inside, the same mark the
|
|
3
|
+
* Plexo dashboard uses for SOL, so every AI action in the builder reads as SOL.
|
|
4
|
+
*/
|
|
5
|
+
export declare function SolMark({ className, size }: {
|
|
6
|
+
className?: string;
|
|
7
|
+
size?: number;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
function e(e) {
|
|
3
|
-
let t = /* @__PURE__ */ new Set([...e.elements.map((e) => e.id), ...(e.nestedRows || []).map((e) => e.id)]), n = (e.childOrder || []).filter((e) => t.has(e)), r = new Set(n), i = [...e.elements.map((e) => e.id), ...(e.nestedRows || []).map((e) => e.id)].filter((e) => !r.has(e));
|
|
4
|
-
return [...n, ...i];
|
|
5
|
-
}
|
|
6
|
-
function t(e, t, n) {
|
|
7
|
-
let r = [...e], i = typeof n == "number" ? Math.max(0, Math.min(n, r.length)) : r.length;
|
|
8
|
-
return r.splice(i, 0, t), r;
|
|
9
|
-
}
|
|
10
|
-
var n = {
|
|
1
|
+
var e = {
|
|
11
2
|
facebook: {
|
|
12
3
|
path: "M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z",
|
|
13
4
|
color: "#0866FF",
|
|
@@ -213,42 +204,42 @@ var n = {
|
|
|
213
204
|
color: "#1E1914",
|
|
214
205
|
label: "Goodreads"
|
|
215
206
|
}
|
|
216
|
-
},
|
|
217
|
-
function
|
|
218
|
-
return
|
|
207
|
+
}, t = "M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z";
|
|
208
|
+
function n(t) {
|
|
209
|
+
return e[t]?.color || "#475569";
|
|
219
210
|
}
|
|
220
211
|
//#endregion
|
|
221
212
|
//#region src/utilities/elementResolvers.ts
|
|
222
|
-
var
|
|
223
|
-
function
|
|
224
|
-
let
|
|
213
|
+
var r = (e) => e === "twitter" ? "x" : e, i = (t, n = "currentColor") => `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="${n}" d="${e[r(t)]?.path || "M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z"}"/></svg>`;
|
|
214
|
+
function a(e, t) {
|
|
215
|
+
let i = e.attributes || {}, a = e.style || {}, o = Array.isArray(i.links) ? i.links : [], s = i.colorMode === "branded", c = s || !!t?.forceBrandedColor;
|
|
225
216
|
return o.filter((e) => e && typeof e == "object").map((e) => {
|
|
226
|
-
let t =
|
|
217
|
+
let t = r(String(e.provider || ""));
|
|
227
218
|
return {
|
|
228
219
|
provider: t,
|
|
229
220
|
url: typeof e.url == "string" && e.url.trim() ? e.url : "#",
|
|
230
|
-
color: c ?
|
|
231
|
-
backgroundColor: s ? "transparent" : e.backgroundColor ||
|
|
232
|
-
size: e.size ||
|
|
233
|
-
iconType: (e.iconType ||
|
|
221
|
+
color: c ? n(t) : e.color || a.iconColor || "#475569",
|
|
222
|
+
backgroundColor: s ? "transparent" : e.backgroundColor || a.iconBackgroundColor || "#f8fafc",
|
|
223
|
+
size: e.size || a.iconSize || "36px",
|
|
224
|
+
iconType: (e.iconType || i.iconType) === "square" ? "square" : "circle"
|
|
234
225
|
};
|
|
235
226
|
});
|
|
236
227
|
}
|
|
237
|
-
function
|
|
228
|
+
function o(e) {
|
|
238
229
|
let t = e.attributes || {};
|
|
239
230
|
return (Array.isArray(t.links) ? t.links : []).filter((e) => e && typeof e == "object").map((e) => ({
|
|
240
231
|
label: typeof e.label == "string" && e.label.trim() ? e.label : "Link",
|
|
241
232
|
href: typeof e.href == "string" && e.href.trim() ? e.href : "#"
|
|
242
233
|
}));
|
|
243
234
|
}
|
|
244
|
-
function
|
|
235
|
+
function s(e) {
|
|
245
236
|
let t = e.style || {}, n = e.attributes || {};
|
|
246
237
|
return {
|
|
247
238
|
width: t.width || "100%",
|
|
248
239
|
height: n.autoHeight === !1 && t.height || "auto"
|
|
249
240
|
};
|
|
250
241
|
}
|
|
251
|
-
function
|
|
242
|
+
function c(e, t, n, r) {
|
|
252
243
|
if (e) return e;
|
|
253
244
|
if (t) {
|
|
254
245
|
let e = t.trim().split(/\s+/).filter(Boolean);
|
|
@@ -264,25 +255,25 @@ function u(e, t, n, r) {
|
|
|
264
255
|
}
|
|
265
256
|
return r;
|
|
266
257
|
}
|
|
267
|
-
function
|
|
258
|
+
function l(e) {
|
|
268
259
|
let t = e.style || {}, n = e.attributes || {};
|
|
269
260
|
return {
|
|
270
261
|
width: n.autoWidth === !1 ? t.width || "100%" : "auto",
|
|
271
262
|
height: n.autoHeight === !1 && t.height || "auto"
|
|
272
263
|
};
|
|
273
264
|
}
|
|
274
|
-
function
|
|
265
|
+
function u(e) {
|
|
275
266
|
return { autoWidth: (e.attributes || {}).autoWidth === !0 };
|
|
276
267
|
}
|
|
277
|
-
function
|
|
268
|
+
function d(e) {
|
|
278
269
|
let t = e.style || {};
|
|
279
270
|
return (e.attributes || {}).autoHeight === !1 && t.height || "auto";
|
|
280
271
|
}
|
|
281
|
-
function
|
|
272
|
+
function f(e, t) {
|
|
282
273
|
let n = e.style || {};
|
|
283
274
|
return (e.attributes || {}).autoHeight === !1 && n.height || t;
|
|
284
275
|
}
|
|
285
|
-
var
|
|
276
|
+
var p = [
|
|
286
277
|
"showLabel",
|
|
287
278
|
"fontSize",
|
|
288
279
|
"labelFontWeight",
|
|
@@ -293,15 +284,15 @@ var h = [
|
|
|
293
284
|
"inputTextColor",
|
|
294
285
|
"placeholderColor"
|
|
295
286
|
];
|
|
296
|
-
function
|
|
287
|
+
function m(e) {
|
|
297
288
|
let t = null;
|
|
298
289
|
return (Array.isArray(e) ? e : []).map((e) => {
|
|
299
290
|
let n = e?.inheritStylesFromPrevious && t ? { ...e } : e;
|
|
300
|
-
if (e?.inheritStylesFromPrevious && t) for (let e of
|
|
291
|
+
if (e?.inheritStylesFromPrevious && t) for (let e of p) n[e] = t[e];
|
|
301
292
|
return t = n, n;
|
|
302
293
|
});
|
|
303
294
|
}
|
|
304
|
-
function
|
|
295
|
+
function h(e) {
|
|
305
296
|
let t = {};
|
|
306
297
|
for (let n of e) {
|
|
307
298
|
let e = n.name || n.id || "field";
|
|
@@ -319,8 +310,8 @@ function _(e) {
|
|
|
319
310
|
};
|
|
320
311
|
});
|
|
321
312
|
}
|
|
322
|
-
var
|
|
323
|
-
function
|
|
313
|
+
var g = (e) => String(Math.max(0, e)).padStart(2, "0"), _ = /[Zz]$|[+-]\d{2}:?\d{2}$/;
|
|
314
|
+
function v(e, t) {
|
|
324
315
|
let n = new Intl.DateTimeFormat("en-US", {
|
|
325
316
|
timeZone: t,
|
|
326
317
|
hourCycle: "h23",
|
|
@@ -333,12 +324,12 @@ function b(e, t) {
|
|
|
333
324
|
}).formatToParts(new Date(e)), r = (e) => Number(n.find((t) => t.type === e)?.value);
|
|
334
325
|
return Date.UTC(r("year"), r("month") - 1, r("day"), r("hour"), r("minute"), r("second")) - e;
|
|
335
326
|
}
|
|
336
|
-
function
|
|
337
|
-
let n =
|
|
338
|
-
return Number.isNaN(r) || n || !t ? r : r -
|
|
327
|
+
function y(e, t) {
|
|
328
|
+
let n = _.test(e), r = Date.parse(n ? e : `${e}Z`);
|
|
329
|
+
return Number.isNaN(r) || n || !t ? r : r - v(r, t);
|
|
339
330
|
}
|
|
340
|
-
function
|
|
341
|
-
let r = e ?
|
|
331
|
+
function b(e, t, n = Date.now()) {
|
|
332
|
+
let r = e ? y(e, t) : NaN, i = Number.isNaN(r) ? n : r, a = i - n;
|
|
342
333
|
if (a <= 0) return {
|
|
343
334
|
days: "00",
|
|
344
335
|
hours: "00",
|
|
@@ -349,31 +340,31 @@ function S(e, t, n = Date.now()) {
|
|
|
349
340
|
};
|
|
350
341
|
let o = Math.floor(a / 1e3), s = Math.floor(o / 86400), c = Math.floor(o % 86400 / 3600), l = Math.floor(o % 3600 / 60), u = o % 60;
|
|
351
342
|
return {
|
|
352
|
-
days:
|
|
353
|
-
hours:
|
|
354
|
-
minutes:
|
|
355
|
-
seconds:
|
|
343
|
+
days: g(s),
|
|
344
|
+
hours: g(c),
|
|
345
|
+
minutes: g(l),
|
|
346
|
+
seconds: g(u),
|
|
356
347
|
isExpired: !1,
|
|
357
348
|
targetTimestamp: i
|
|
358
349
|
};
|
|
359
350
|
}
|
|
360
|
-
var
|
|
351
|
+
var x = [
|
|
361
352
|
"youtube.com",
|
|
362
353
|
"www.youtube.com",
|
|
363
354
|
"youtu.be",
|
|
364
355
|
"m.youtube.com"
|
|
365
356
|
];
|
|
366
|
-
function
|
|
357
|
+
function S(e) {
|
|
367
358
|
return e.hostname === "youtu.be" ? e.pathname.slice(1).split("/")[0] || null : e.pathname.startsWith("/embed/") ? e.pathname.slice(7).split("/")[0] || null : e.pathname.startsWith("/shorts/") ? e.pathname.slice(8).split("/")[0] || null : e.searchParams.get("v");
|
|
368
359
|
}
|
|
369
|
-
function
|
|
360
|
+
function C(e) {
|
|
370
361
|
let t = e.pathname.match(/(\d+)/);
|
|
371
362
|
return t ? t[1] : null;
|
|
372
363
|
}
|
|
373
|
-
var
|
|
374
|
-
function
|
|
364
|
+
var w = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22640%22%20height%3D%22360%22%20viewBox%3D%220%200%20640%20360%22%3E%3Crect%20width%3D%22640%22%20height%3D%22360%22%20fill%3D%22%230f172a%22%2F%3E%3Ccircle%20cx%3D%22320%22%20cy%3D%22180%22%20r%3D%2248%22%20fill%3D%22%23ffffff%22%20opacity%3D%220.9%22%2F%3E%3Cpath%20d%3D%22M304%20156%20L356%20180%20L304%20204%20Z%22%20fill%3D%22%230f172a%22%2F%3E%3C%2Fsvg%3E";
|
|
365
|
+
function T(e) {
|
|
375
366
|
if (!e || typeof e != "string") return {
|
|
376
|
-
thumbnailUrl:
|
|
367
|
+
thumbnailUrl: w,
|
|
377
368
|
provider: "unknown"
|
|
378
369
|
};
|
|
379
370
|
let t;
|
|
@@ -381,30 +372,30 @@ function D(e) {
|
|
|
381
372
|
t = new URL(e);
|
|
382
373
|
} catch {
|
|
383
374
|
return {
|
|
384
|
-
thumbnailUrl:
|
|
375
|
+
thumbnailUrl: w,
|
|
385
376
|
provider: "unknown"
|
|
386
377
|
};
|
|
387
378
|
}
|
|
388
|
-
if (
|
|
389
|
-
let e =
|
|
379
|
+
if (x.includes(t.hostname)) {
|
|
380
|
+
let e = S(t);
|
|
390
381
|
if (e) return {
|
|
391
382
|
thumbnailUrl: `https://img.youtube.com/vi/${e}/hqdefault.jpg`,
|
|
392
383
|
provider: "youtube"
|
|
393
384
|
};
|
|
394
385
|
}
|
|
395
386
|
if (t.hostname === "vimeo.com" || t.hostname === "www.vimeo.com" || t.hostname === "player.vimeo.com") {
|
|
396
|
-
let e =
|
|
387
|
+
let e = C(t);
|
|
397
388
|
if (e) return {
|
|
398
389
|
thumbnailUrl: `https://vumbnail.com/${e}.jpg`,
|
|
399
390
|
provider: "vimeo"
|
|
400
391
|
};
|
|
401
392
|
}
|
|
402
393
|
return {
|
|
403
|
-
thumbnailUrl:
|
|
394
|
+
thumbnailUrl: w,
|
|
404
395
|
provider: "unknown"
|
|
405
396
|
};
|
|
406
397
|
}
|
|
407
|
-
function
|
|
398
|
+
function E(e) {
|
|
408
399
|
let t = e.attributes || {}, n = Math.max(1, Number(t.rowCount) || 2), r = Math.max(1, Number(t.colCount) || 2), i = Array.isArray(t.cells) ? t.cells : [], a = [];
|
|
409
400
|
for (let e = 0; e < n; e++) {
|
|
410
401
|
let t = Array.isArray(i[e]) ? i[e] : [], n = [];
|
|
@@ -420,29 +411,29 @@ function O(e) {
|
|
|
420
411
|
striped: !!t.striped
|
|
421
412
|
};
|
|
422
413
|
}
|
|
423
|
-
var
|
|
424
|
-
function
|
|
425
|
-
let r = n <
|
|
414
|
+
var D = 8;
|
|
415
|
+
function O(e, t, n) {
|
|
416
|
+
let r = n < D && Array.isArray(e?.children) ? e.children : [];
|
|
426
417
|
return {
|
|
427
418
|
id: typeof e?.id == "string" && e.id ? e.id : `item-${t}`,
|
|
428
419
|
title: typeof e?.title == "string" && e.title.trim() ? e.title : `Item ${t + 1}`,
|
|
429
420
|
content: typeof e?.content == "string" ? e.content : "",
|
|
430
421
|
defaultOpen: !!e?.defaultOpen,
|
|
431
|
-
children: r.map((e, t) =>
|
|
422
|
+
children: r.map((e, t) => O(e, t, n + 1))
|
|
432
423
|
};
|
|
433
424
|
}
|
|
434
|
-
function
|
|
425
|
+
function k(e, t) {
|
|
435
426
|
if (t !== "multi") {
|
|
436
427
|
let t = !1;
|
|
437
428
|
for (let n of e) n.defaultOpen && (t ? n.defaultOpen = !1 : t = !0);
|
|
438
429
|
}
|
|
439
|
-
for (let n of e)
|
|
430
|
+
for (let n of e) k(n.children, t);
|
|
440
431
|
}
|
|
441
|
-
function
|
|
442
|
-
let t = e.attributes || {}, n = t.mode === "multi" ? "multi" : "single", r = (Array.isArray(t.items) ? t.items : []).map((e, t) =>
|
|
443
|
-
return
|
|
432
|
+
function A(e) {
|
|
433
|
+
let t = e.attributes || {}, n = t.mode === "multi" ? "multi" : "single", r = (Array.isArray(t.items) ? t.items : []).map((e, t) => O(e, t, 0));
|
|
434
|
+
return k(r, n), r;
|
|
444
435
|
}
|
|
445
|
-
function
|
|
436
|
+
function j(e, t, n) {
|
|
446
437
|
let r = JSON.parse(JSON.stringify(Array.isArray(e) ? e : [])), i = (e, t) => {
|
|
447
438
|
let [r, ...a] = t;
|
|
448
439
|
if (e[r]) {
|
|
@@ -460,7 +451,7 @@ function N(e, t, n) {
|
|
|
460
451
|
}
|
|
461
452
|
//#endregion
|
|
462
453
|
//#region src/utilities/iconSvgStatic.ts
|
|
463
|
-
var
|
|
454
|
+
var M = {
|
|
464
455
|
"a-arrow-down": [
|
|
465
456
|
["path", { d: "m14 12 4 4 4-4" }],
|
|
466
457
|
["path", { d: "M18 16V7" }],
|
|
@@ -15280,18 +15271,18 @@ var P = {
|
|
|
15280
15271
|
y2: "11"
|
|
15281
15272
|
}]
|
|
15282
15273
|
]
|
|
15283
|
-
},
|
|
15284
|
-
function
|
|
15274
|
+
}, N = "circle-help";
|
|
15275
|
+
function P(e) {
|
|
15285
15276
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
15286
15277
|
}
|
|
15287
|
-
function
|
|
15288
|
-
let t = e || "HelpCircle", n =
|
|
15289
|
-
if (
|
|
15278
|
+
function F(e) {
|
|
15279
|
+
let t = e || "HelpCircle", n = P(t.replace(/^\w/, (e) => e.toUpperCase()));
|
|
15280
|
+
if (M[n]) return n;
|
|
15290
15281
|
let r = t.toLowerCase().replace(/[-_\s]/g, "");
|
|
15291
|
-
return Object.keys(
|
|
15282
|
+
return Object.keys(M).find((e) => e.replace(/-/g, "") === r) || N;
|
|
15292
15283
|
}
|
|
15293
|
-
function
|
|
15294
|
-
return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${n}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${(
|
|
15284
|
+
function I(e, t, n) {
|
|
15285
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${n}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${(M[F(e)] || M[N] || []).map(([e, t]) => `<${e} ${Object.entries(t).map(([e, t]) => `${e}="${String(t)}"`).join(" ")}></${e}>`).join("")}</svg>`;
|
|
15295
15286
|
}
|
|
15296
15287
|
//#endregion
|
|
15297
|
-
export {
|
|
15288
|
+
export { j as _, c as a, n as b, m as c, o as d, a as f, T as g, b as h, A as i, f as l, u as m, h as n, l as o, E as p, i as r, d as s, I as t, s as u, t as v, e as y };
|