@charisol/plexo-sdk 1.4.32 → 1.4.33

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.
@@ -97,7 +97,7 @@ function O(e, t) {
97
97
  }
98
98
  return n;
99
99
  }
100
- function k(e, t, n) {
100
+ function ee(e, t, n) {
101
101
  let r = e || {};
102
102
  return n ? {
103
103
  ...r,
@@ -107,8 +107,8 @@ function k(e, t, n) {
107
107
  }
108
108
  //#endregion
109
109
  //#region src/utilities/compiler.ts
110
- var A = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif";
111
- function j(e) {
110
+ var k = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif";
111
+ function A(e) {
112
112
  if (!e || typeof e != "object") return null;
113
113
  if (Array.isArray(e.columns) && e.columns.length > 0) return e;
114
114
  let t = (e.type || "").toLowerCase(), n = e.props || e.content || e.attributes || e.data || e.payload || e, r = e.style || {};
@@ -362,7 +362,7 @@ function j(e) {
362
362
  }
363
363
  }
364
364
  }
365
- var ee = /* @__PURE__ */ new Map([
365
+ var te = /* @__PURE__ */ new Map([
366
366
  ["'Roboto', sans-serif", "Roboto"],
367
367
  ["'Open Sans', sans-serif", "Open Sans"],
368
368
  ["'Lato', sans-serif", "Lato"],
@@ -446,7 +446,7 @@ var ee = /* @__PURE__ */ new Map([
446
446
  ["'Cookie', cursive", "Cookie"],
447
447
  ["'Great Vibes', cursive", "Great Vibes"]
448
448
  ]);
449
- function M(e, t = []) {
449
+ function ne(e, t = []) {
450
450
  let n = /* @__PURE__ */ new Set(), r = (e) => {
451
451
  if (!e) return;
452
452
  let t = Array.isArray(e.columns) ? e.columns : [];
@@ -464,15 +464,15 @@ function M(e, t = []) {
464
464
  for (let e of t) typeof e == "string" && e.trim() && n.add(e.trim());
465
465
  return n;
466
466
  }
467
- function N(e) {
467
+ function j(e) {
468
468
  let t = /* @__PURE__ */ new Set();
469
469
  for (let n of e) {
470
- let e = ee.get(n);
470
+ let e = te.get(n);
471
471
  e && t.add(e);
472
472
  }
473
473
  return t.size === 0 ? null : `https://fonts.googleapis.com/css?family=${Array.from(t).map((e) => `${encodeURIComponent(e).replace(/%20/g, "+")}:400,700`).join("|")}&display=swap`;
474
474
  }
475
- var P = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter(([e, t]) => t != null && t !== "").map(([e, t]) => {
475
+ var M = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter(([e, t]) => t != null && t !== "").map(([e, t]) => {
476
476
  let n = e.replace(/([A-Z])/g, "-$1").toLowerCase(), r = t;
477
477
  return typeof t == "number" && [
478
478
  "padding",
@@ -483,25 +483,25 @@ var P = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter((
483
483
  "width",
484
484
  "height"
485
485
  ].some((t) => e.toLowerCase().includes(t)) && (r = `${t}px`), `${n}: ${r};`;
486
- }).join(" "), F = (e = {}) => P(e).replace(/;(\s|$)/g, " !important;$1");
487
- function I(e) {
486
+ }).join(" "), N = (e = {}) => M(e).replace(/;(\s|$)/g, " !important;$1");
487
+ function re(e) {
488
488
  if (typeof e != "string") return !1;
489
489
  let t = e.toLowerCase();
490
490
  return t.includes("javascript:") || t.includes("vbscript:") || t.includes("expression") || t.includes("url(") || t.includes("@import") || t.includes("-moz-binding") || t.includes("behavior") || t.includes("</style") || /\\/.test(e);
491
491
  }
492
- function L(e, t, n, r, i) {
492
+ function P(e, t, n, r, i) {
493
493
  let a = {
494
494
  ...O(n, r),
495
495
  ...i || {}
496
496
  };
497
- for (let e of Object.keys(a)) I(a[e]) && delete a[e];
497
+ for (let e of Object.keys(a)) re(a[e]) && delete a[e];
498
498
  if (Object.keys(a).length === 0) return;
499
- let o = F(a);
499
+ let o = N(a);
500
500
  if (!o) return;
501
501
  let s = String(t).replace(/["\\]/g, "");
502
502
  e[r].push(`[data-plexo-id="${s}"] { ${o} }`);
503
503
  }
504
- function R(e, t) {
504
+ function F(e, t) {
505
505
  if (e.type !== "menu" || !t || t.textAlign === void 0) return t;
506
506
  let n = t.textAlign === "center" ? "center" : t.textAlign === "right" ? "flex-end" : "flex-start";
507
507
  return {
@@ -509,7 +509,7 @@ function R(e, t) {
509
509
  justifyContent: n
510
510
  };
511
511
  }
512
- var z = () => ({
512
+ var I = () => ({
513
513
  backgroundColor: "#ffffff",
514
514
  borderRadius: "20px",
515
515
  width: "100%",
@@ -532,11 +532,11 @@ var z = () => ({
532
532
  buttonPaddingRight: "14px",
533
533
  buttonFontSize: "13px",
534
534
  buttonFontWeight: "700"
535
- }), B = (e) => (e || "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), V = (e, t) => {
535
+ }), L = (e) => (e || "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), R = (e, t) => {
536
536
  if (typeof t != "string") return "";
537
537
  let n = t.trim();
538
- return n ? ` ${e}="${B(n)}"` : "";
539
- }, H = [
538
+ return n ? ` ${e}="${L(n)}"` : "";
539
+ }, z = [
540
540
  "fieldSpacing",
541
541
  "buttonBackgroundColor",
542
542
  "buttonTextColor",
@@ -556,36 +556,36 @@ var z = () => ({
556
556
  "buttonWidth",
557
557
  "buttonHeight",
558
558
  "buttonAlign"
559
- ], U = "#cbd5e1", W = "#e2e8f0", G = "#1e293b", K = "#64748b", q = (e) => `<span style="display:block;font-family:monospace;font-size:10px;letter-spacing:0.06em;text-transform:uppercase;color:#94a3b8;margin-bottom:8px;">${e} (live once published)</span>`, J = (e, t = W, n = "8px") => `<div style="width:${e};height:${n};background:${t};border-radius:3px;"></div>`;
560
- function Y(e) {
561
- let t = (e = "90px") => `<div style="width:100%;height:${e};background:linear-gradient(135deg,${W},${U});border-radius:6px;"></div>`, n = () => `<div style="flex:1;display:flex;flex-direction:column;gap:6px;">${t("64px")}${J("75%")}${J("40%", U)}</div>`;
559
+ ], B = "#cbd5e1", V = "#e2e8f0", H = "#1e293b", U = "#64748b", W = (e) => `<span style="display:block;font-family:monospace;font-size:10px;letter-spacing:0.06em;text-transform:uppercase;color:#94a3b8;margin-bottom:8px;">${e} (live once published)</span>`, G = (e, t = V, n = "8px") => `<div style="width:${e};height:${n};background:${t};border-radius:3px;"></div>`;
560
+ function K(e) {
561
+ let t = (e = "90px") => `<div style="width:100%;height:${e};background:linear-gradient(135deg,${V},${B});border-radius:6px;"></div>`, n = () => `<div style="flex:1;display:flex;flex-direction:column;gap:6px;">${t("64px")}${G("75%")}${G("40%", B)}</div>`;
562
562
  switch (e) {
563
- case "product": return `${q("Product")}<div style="display:flex;flex-direction:column;gap:8px;">${t()}<div style="font-weight:600;font-size:14px;color:${G};">Sample Product Name</div><div style="font-size:13px;color:${K};">$29.99</div><div style="background:${G};color:#fff;text-align:center;padding:8px;border-radius:6px;font-size:13px;font-weight:600;">Add to Cart</div></div>`;
564
- case "booking": return `${q("Booking")}<div style="font-weight:600;font-size:14px;color:${G};margin-bottom:8px;">Select a time</div><div style="display:flex;gap:6px;flex-wrap:wrap;">${[
563
+ case "product": return `${W("Product")}<div style="display:flex;flex-direction:column;gap:8px;">${t()}<div style="font-weight:600;font-size:14px;color:${H};">Sample Product Name</div><div style="font-size:13px;color:${U};">$29.99</div><div style="background:${H};color:#fff;text-align:center;padding:8px;border-radius:6px;font-size:13px;font-weight:600;">Add to Cart</div></div>`;
564
+ case "booking": return `${W("Booking")}<div style="font-weight:600;font-size:14px;color:${H};margin-bottom:8px;">Select a time</div><div style="display:flex;gap:6px;flex-wrap:wrap;">${[
565
565
  "9:00 AM",
566
566
  "10:00 AM",
567
567
  "11:30 AM",
568
568
  "2:00 PM"
569
- ].map((e) => `<span style="border:1px solid ${U};border-radius:6px;padding:6px 10px;font-size:12px;color:${G};">${e}</span>`).join("")}</div>`;
570
- case "shop_grid": return `${q("Shop Grid")}<div style="display:flex;gap:10px;">${n()}${n()}${n()}</div>`;
569
+ ].map((e) => `<span style="border:1px solid ${B};border-radius:6px;padding:6px 10px;font-size:12px;color:${H};">${e}</span>`).join("")}</div>`;
570
+ case "shop_grid": return `${W("Shop Grid")}<div style="display:flex;gap:10px;">${n()}${n()}${n()}</div>`;
571
571
  case "cart_summary": {
572
- let e = `<div style="width:36px;height:36px;flex-shrink:0;background:linear-gradient(135deg,${W},${U});border-radius:4px;"></div>`, t = () => `<div style="display:flex;gap:8px;align-items:center;">${e}<div style="flex:1;">${J("80%")}</div>${J("30px")}</div>`;
573
- return `${q("Cart Summary")}<div style="display:flex;flex-direction:column;gap:10px;">${t()}${t()}<div style="border-top:1px solid ${W};padding-top:8px;display:flex;justify-content:space-between;font-size:13px;font-weight:600;color:${G};"><span>Subtotal</span><span>$59.98</span></div></div>`;
572
+ let e = `<div style="width:36px;height:36px;flex-shrink:0;background:linear-gradient(135deg,${V},${B});border-radius:4px;"></div>`, t = () => `<div style="display:flex;gap:8px;align-items:center;">${e}<div style="flex:1;">${G("80%")}</div>${G("30px")}</div>`;
573
+ return `${W("Cart Summary")}<div style="display:flex;flex-direction:column;gap:10px;">${t()}${t()}<div style="border-top:1px solid ${V};padding-top:8px;display:flex;justify-content:space-between;font-size:13px;font-weight:600;color:${H};"><span>Subtotal</span><span>$59.98</span></div></div>`;
574
574
  }
575
- case "checkout_flow": return `${q("Checkout")}<div style="display:flex;gap:12px;"><div style="flex:1;display:flex;flex-direction:column;gap:8px;">${J("50%", U, "10px")}<div style="height:32px;background:#fff;border:1px solid ${W};border-radius:6px;"></div><div style="height:32px;background:#fff;border:1px solid ${W};border-radius:6px;"></div></div><div style="width:120px;flex-shrink:0;border:1px solid ${W};border-radius:6px;padding:10px;background:#fff;display:flex;flex-direction:column;gap:8px;">${J("70%", U)}${J("50%")}<div style="height:26px;background:${G};border-radius:4px;margin-top:4px;"></div></div></div>`;
576
- case "order_confirmation": return `${q("Order Confirmation")}<div style="text-align:center;padding:12px 0;"><div style="width:40px;height:40px;border-radius:100px;background:#dcfce7;color:#16a34a;display:flex;align-items:center;justify-content:center;margin:0 auto 10px;font-size:20px;line-height:1;">✓</div><div style="font-weight:600;font-size:15px;color:${G};">Thank you for your order</div><div style="font-size:12px;color:${K};margin-top:4px;">Order #10482</div></div>`;
577
- case "order_tracking": return `${q("Order Tracking")}<div style="display:flex;gap:8px;margin-bottom:16px;"><div style="flex:1;height:32px;background:#fff;border:1px solid ${W};border-radius:6px;"></div><div style="width:76px;height:32px;background:${G};border-radius:6px;flex-shrink:0;"></div></div><div style="display:flex;justify-content:space-between;">${[
575
+ case "checkout_flow": return `${W("Checkout")}<div style="display:flex;gap:12px;"><div style="flex:1;display:flex;flex-direction:column;gap:8px;">${G("50%", B, "10px")}<div style="height:32px;background:#fff;border:1px solid ${V};border-radius:6px;"></div><div style="height:32px;background:#fff;border:1px solid ${V};border-radius:6px;"></div></div><div style="width:120px;flex-shrink:0;border:1px solid ${V};border-radius:6px;padding:10px;background:#fff;display:flex;flex-direction:column;gap:8px;">${G("70%", B)}${G("50%")}<div style="height:26px;background:${H};border-radius:4px;margin-top:4px;"></div></div></div>`;
576
+ case "order_confirmation": return `${W("Order Confirmation")}<div style="text-align:center;padding:12px 0;"><div style="width:40px;height:40px;border-radius:100px;background:#dcfce7;color:#16a34a;display:flex;align-items:center;justify-content:center;margin:0 auto 10px;font-size:20px;line-height:1;">✓</div><div style="font-weight:600;font-size:15px;color:${H};">Thank you for your order</div><div style="font-size:12px;color:${U};margin-top:4px;">Order #10482</div></div>`;
577
+ case "order_tracking": return `${W("Order Tracking")}<div style="display:flex;gap:8px;margin-bottom:16px;"><div style="flex:1;height:32px;background:#fff;border:1px solid ${V};border-radius:6px;"></div><div style="width:76px;height:32px;background:${H};border-radius:6px;flex-shrink:0;"></div></div><div style="display:flex;justify-content:space-between;">${[
578
578
  ["Placed", !0],
579
579
  ["Processing", !1],
580
580
  ["Shipped", !1],
581
581
  ["Delivered", !1]
582
- ].map(([e, t]) => `<div style="display:flex;flex-direction:column;align-items:center;gap:4px;"><div style="width:10px;height:10px;border-radius:100px;background:${t ? "#16a34a" : U};"></div><span style="font-size:9px;color:${K};">${e}</span></div>`).join("")}</div>`;
582
+ ].map(([e, t]) => `<div style="display:flex;flex-direction:column;align-items:center;gap:4px;"><div style="width:10px;height:10px;border-radius:100px;background:${t ? "#16a34a" : B};"></div><span style="font-size:9px;color:${U};">${e}</span></div>`).join("")}</div>`;
583
583
  default: return "";
584
584
  }
585
585
  }
586
- var te = (e) => {
586
+ var q = (e) => {
587
587
  if (!e || typeof e != "object") return "";
588
- let t = e.kind || "text", n = B(e.name || e.id || "field"), r = e.required ? " required" : "", i = P({
588
+ let t = e.kind || "text", n = L(e.name || e.id || "field"), r = e.required ? " required" : "", i = M({
589
589
  fontSize: e.fontSize || "13px",
590
590
  borderRadius: e.borderRadius || "12px",
591
591
  borderWidth: e.borderWidth || "1px",
@@ -593,19 +593,19 @@ var te = (e) => {
593
593
  borderStyle: "solid",
594
594
  color: e.inputTextColor
595
595
  }), a = e.showLabel === !1 ? "" : `<label style="display: block; margin-bottom: 4px; font-size: ${e.fontSize || "12px"}; font-weight: ${e.labelFontWeight || "700"}; color: ${e.labelColor || "inherit"};">${e.label || ""}${e.required ? " <span style=\"color:#e11d48;\">*</span>" : ""}</label>`;
596
- return t === "textarea" ? `${a}<textarea name="${n}" placeholder="${B(e.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r}></textarea>` : t === "select" ? `${a}<select name="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r}>${(Array.isArray(e.options) ? e.options : []).map((e) => `<option value="${B(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>` : t === "radio" || t === "checkbox" ? `${a}<div style="display: flex; flex-wrap: wrap; gap: 8px;">${(Array.isArray(e.options) && e.options.length > 0 ? e.options : [{
596
+ return t === "textarea" ? `${a}<textarea name="${n}" placeholder="${L(e.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r}></textarea>` : t === "select" ? `${a}<select name="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r}>${(Array.isArray(e.options) ? e.options : []).map((e) => `<option value="${L(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>` : t === "radio" || t === "checkbox" ? `${a}<div style="display: flex; flex-wrap: wrap; gap: 8px;">${(Array.isArray(e.options) && e.options.length > 0 ? e.options : [{
597
597
  label: e.label || "Option",
598
598
  value: e.name || "option"
599
- }]).map((r) => `<label style="display: inline-flex; align-items: center; gap: 6px; font-size: ${e.fontSize || "12px"};"><input type="${t}" name="${n}" value="${B(r?.value ?? "")}" />${r?.label ?? r?.value ?? ""}</label>`).join("")}</div>` : `${a}<input type="${B(t)}" name="${n}" placeholder="${B(e.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r} />`;
599
+ }]).map((r) => `<label style="display: inline-flex; align-items: center; gap: 6px; font-size: ${e.fontSize || "12px"};"><input type="${t}" name="${n}" value="${L(r?.value ?? "")}" />${r?.label ?? r?.value ?? ""}</label>`).join("")}</div>` : `${a}<input type="${L(t)}" name="${n}" placeholder="${L(e.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r} />`;
600
600
  };
601
- function ne(e, t, n) {
601
+ function J(e, t, n) {
602
602
  if (e === "none") return "";
603
- let r = B(t);
603
+ let r = L(t);
604
604
  return e === "plus" ? `<span data-acc-icon style="font-size: 14px; line-height: 1; font-weight: 700; color: ${r};">${n ? "−" : "+"}</span>` : e === "arrow" ? `<span data-acc-icon style="font-size: 14px; line-height: 1; display: inline-block; color: ${r}; transform: ${n ? "rotate(90deg)" : "none"}; transition: transform 0.2s ease;">›</span>` : `<svg data-acc-icon width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="${r}" stroke-width="2.5" style="flex-shrink: 0; transform: ${n ? "rotate(180deg)" : "none"}; transition: transform 0.2s ease;"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5"/></svg>`;
605
605
  }
606
- function X(e, t, n, r, i = []) {
606
+ function Y(e, t, n, r, i = []) {
607
607
  return e.map((a, o) => {
608
- let s = [...i, o], c = o === e.length - 1, l = P({ borderBottom: n.showDividers && !c ? `1px solid ${t.dividerColor || "#e2e8f0"}` : void 0 }), u = P({
608
+ let s = [...i, o], c = o === e.length - 1, l = M({ borderBottom: n.showDividers && !c ? `1px solid ${t.dividerColor || "#e2e8f0"}` : void 0 }), u = M({
609
609
  display: "flex",
610
610
  alignItems: "center",
611
611
  gap: "8px",
@@ -622,35 +622,35 @@ function X(e, t, n, r, i = []) {
622
622
  border: "none",
623
623
  font: "inherit",
624
624
  background: void 0
625
- }), d = P({
625
+ }), d = M({
626
626
  display: "grid",
627
627
  gridTemplateRows: a.defaultOpen ? "1fr" : "0fr",
628
628
  transition: n.animated ? "grid-template-rows 0.25s ease" : void 0,
629
629
  backgroundColor: t.contentBackgroundColor || "#ffffff"
630
- }), f = P({
630
+ }), f = M({
631
631
  padding: t.contentPadding || "14px",
632
632
  color: t.contentTextColor || "#475569",
633
633
  fontSize: t.contentFontSize || "13px",
634
634
  whiteSpace: "pre-wrap"
635
- }), p = ne(n.iconStyle, t.iconColor || "#64748b", !!a.defaultOpen), m = B(a.title), h = B(a.content), g = a.children.length ? `<div class="plexo-acc-group" style="margin-top: 10px;">${X(a.children, t, n, r, s)}</div>` : "";
636
- return `<div class="plexo-acc-item" style="${l}"><button type="button"${` data-plexo-acc-item="${B(r)}|${s.join(".")}"`} data-acc-header data-acc-open="${a.defaultOpen ? "1" : "0"}" style="${u}"><span style="flex: 1;">${m}</span>${p}</button><div data-acc-panel style="${d}"><div style="overflow: hidden;"><div style="${f}">${h}${g}</div></div></div></div>`;
635
+ }), p = J(n.iconStyle, t.iconColor || "#64748b", !!a.defaultOpen), m = L(a.title), h = L(a.content), g = a.children.length ? `<div class="plexo-acc-group" style="margin-top: 10px;">${Y(a.children, t, n, r, s)}</div>` : "";
636
+ return `<div class="plexo-acc-item" style="${l}"><button type="button"${` data-plexo-acc-item="${L(r)}|${s.join(".")}"`} data-acc-header data-acc-open="${a.defaultOpen ? "1" : "0"}" style="${u}"><span style="flex: 1;">${m}</span>${p}</button><div data-acc-panel style="${d}"><div style="overflow: hidden;"><div style="${f}">${h}${g}</div></div></div></div>`;
637
637
  }).join("");
638
638
  }
639
- function re(e) {
639
+ function ie(e) {
640
640
  return `<!-- Unsupported block ${String(e)} -->`;
641
641
  }
642
- var ie = (g, _ = !1) => {
642
+ var ae = (g, _ = !1) => {
643
643
  if (!g || typeof g != "object") return "";
644
- 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" ? {
645
- ...z(),
644
+ 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 = M(g.type === "form_container" ? {
645
+ ...I(),
646
646
  ...v
647
- } : 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; " : ""}`;
647
+ } : x), C = g.attributes || {}, w = ` data-plexo-id="${L(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; " : ""}`;
648
648
  switch (g.type) {
649
649
  case "heading": return D(`<h2${w} style="margin-top: 0; margin-bottom: 8px; ${O}${S}">${C.text || "Heading"}</h2>`);
650
650
  case "paragraph": return D(`<p${w} style="margin-top: 0; margin-bottom: 12px; ${O}${S}">${C.text || "Paragraph text content."}</p>`);
651
651
  case "text": return D(`<div${w} style="${O}${S}">${C.text || ""}</div>`);
652
652
  case "button": {
653
- let e = u(g), t = P({
653
+ let e = u(g), t = M({
654
654
  ...v,
655
655
  width: e.width,
656
656
  height: e.height
@@ -658,7 +658,7 @@ var ie = (g, _ = !1) => {
658
658
  return `<div 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>`;
659
659
  }
660
660
  case "image": {
661
- 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({
661
+ 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 = M({
662
662
  ...v,
663
663
  width: e.width,
664
664
  height: e.height
@@ -673,19 +673,19 @@ var ie = (g, _ = !1) => {
673
673
  </div>`;
674
674
  case "form_container": {
675
675
  if (C.provider === "maildrip" && typeof C.maildripPageId == "string" && C.maildripPageId.trim()) {
676
- let e = B(C.maildripPageId.trim());
677
- return `<div${w} style="${P({
676
+ let e = L(C.maildripPageId.trim());
677
+ return `<div${w} style="${M({
678
678
  ...v,
679
679
  height: p(g)
680
680
  })}"><opt-in-embed-form page-id="${e}"></opt-in-embed-form></div>`;
681
681
  }
682
682
  let n = {
683
- ...z(),
683
+ ...I(),
684
684
  ...v
685
685
  }, r = {};
686
- for (let e of Object.keys(n)) H.includes(e) || (r[e] = n[e]);
686
+ for (let e of Object.keys(n)) z.includes(e) || (r[e] = n[e]);
687
687
  r.height = p(g);
688
- 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};">${te(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({
688
+ let i = M(r), a = l(t(Array.isArray(C.fields) ? C.fields : [])), o = n.fieldSpacing || "12px", s = a.map((e) => `<div style="margin-bottom: ${o};">${q(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 = M({
689
689
  backgroundColor: n.buttonBackgroundColor,
690
690
  color: n.buttonTextColor,
691
691
  borderRadius: n.buttonBorderRadius,
@@ -702,15 +702,15 @@ var ie = (g, _ = !1) => {
702
702
  width: c,
703
703
  height: d
704
704
  });
705
- return `<form${w} action="${B(C.actionUrl || C.action || "#")}" method="${B(C.method || "POST")}" style="${i}">${s}<div style="display: flex; width: 100%; justify-content: ${u};"><button type="submit" style="border: 0; cursor: pointer; ${f}">${C.submitLabel || "Submit"}</button></div></form>`;
705
+ return `<form${w} action="${L(C.actionUrl || C.action || "#")}" method="${L(C.method || "POST")}" style="${i}">${s}<div style="display: flex; width: 100%; justify-content: ${u};"><button type="submit" style="border: 0; cursor: pointer; ${f}">${C.submitLabel || "Submit"}</button></div></form>`;
706
706
  }
707
707
  case "input": {
708
- let e = C.inputType || C.type || "text", t = B(C.name || C.fieldName || "field"), n = B(C.placeholder || ""), r = C.required ? " required" : "";
709
- return `<input${w} type="${B(e)}" name="${t}" placeholder="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${S}"${r} />`;
708
+ let e = C.inputType || C.type || "text", t = L(C.name || C.fieldName || "field"), n = L(C.placeholder || ""), r = C.required ? " required" : "";
709
+ return `<input${w} type="${L(e)}" name="${t}" placeholder="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${S}"${r} />`;
710
710
  }
711
- case "textarea": return `<textarea${w} name="${B(C.name || C.fieldName || "field")}" placeholder="${B(C.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${S}"${C.required ? " required" : ""}></textarea>`;
712
- 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>`;
713
- case "html": return `<div${w} style="${P({
711
+ case "textarea": return `<textarea${w} name="${L(C.name || C.fieldName || "field")}" placeholder="${L(C.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${S}"${C.required ? " required" : ""}></textarea>`;
712
+ case "select": return `<select${w} name="${L(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="${L(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>`;
713
+ case "html": return `<div${w} style="${M({
714
714
  ...v,
715
715
  height: s(g, "auto")
716
716
  })}">${C.htmlContent || C.text || ""}</div>`;
@@ -722,8 +722,8 @@ var ie = (g, _ = !1) => {
722
722
  case "blog_categories":
723
723
  case "blog_comments":
724
724
  case "blog_post_list": {
725
- let e = g.type.replace(/^blog_/, "").replace(/_([a-z])/g, (e, t) => t.toUpperCase()), t = P(v);
726
- return `<div${w} data-plexo-blog-${e}="true"${V("data-plexo-blog-prefix", C.prefix)} style="${t}"></div>`;
725
+ let e = g.type.replace(/^blog_/, "").replace(/_([a-z])/g, (e, t) => t.toUpperCase()), t = M(v);
726
+ return `<div${w} data-plexo-blog-${e}="true"${R("data-plexo-blog-prefix", C.prefix)} style="${t}"></div>`;
727
727
  }
728
728
  case "product":
729
729
  case "booking":
@@ -732,12 +732,12 @@ var ie = (g, _ = !1) => {
732
732
  case "checkout_flow":
733
733
  case "order_confirmation":
734
734
  case "order_tracking": {
735
- let e = g.type.replace(/_([a-z])/g, (e, t) => t.toUpperCase()), t = P(v);
736
- 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%;">${Y(g.type)}</div>` : ""}</div>`;
735
+ let e = g.type.replace(/_([a-z])/g, (e, t) => t.toUpperCase()), t = M(v);
736
+ return `<div${w} data-plexo-commerce-${e}="true"${R("data-plexo-product-id", C.productId)}${R("data-plexo-service-id", C.serviceId)}${R("data-plexo-commerce-mode", C.mode)}${C.storeMode === !1 ? " data-plexo-commerce-store-mode=\"false\"" : ""}${R("data-plexo-commerce-limit", C.limit)}${R("data-plexo-commerce-category", C.category)}${R("data-plexo-commerce-sort", C.sort)}${R("data-plexo-commerce-items-per-row", C.itemsPerRow)}${R("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%;">${K(g.type)}</div>` : ""}</div>`;
737
737
  }
738
738
  case "social": {
739
739
  let e = r(g), t = v.textAlign === "center" ? "center" : v.textAlign === "right" ? "flex-end" : "flex-start";
740
- return `<div${w} style="${P({
740
+ return `<div${w} style="${M({
741
741
  padding: v.padding,
742
742
  margin: v.margin,
743
743
  display: "flex",
@@ -745,7 +745,7 @@ var ie = (g, _ = !1) => {
745
745
  gap: v.iconSpacing || "8px",
746
746
  justifyContent: t
747
747
  })}">${e.map((e) => {
748
- let t = P({
748
+ let t = M({
749
749
  width: e.size,
750
750
  height: e.size,
751
751
  padding: "8px",
@@ -757,33 +757,33 @@ var ie = (g, _ = !1) => {
757
757
  justifyContent: "center",
758
758
  overflow: "hidden"
759
759
  });
760
- return `<a href="${B(e.url)}" style="${t} text-decoration: none;">${f(e.provider, e.color)}</a>`;
760
+ return `<a href="${L(e.url)}" style="${t} text-decoration: none;">${f(e.provider, e.color)}</a>`;
761
761
  }).join("")}</div>`;
762
762
  }
763
763
  case "menu": {
764
764
  let e = n(g), t = v.textAlign === "center" ? "center" : v.textAlign === "right" ? "flex-end" : "flex-start";
765
- return `<div${w} style="${P({
765
+ return `<div${w} style="${M({
766
766
  ...v,
767
767
  display: "flex",
768
768
  flexWrap: "wrap",
769
769
  gap: "16px",
770
770
  justifyContent: t
771
- })}">${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>`;
771
+ })}">${e.map((e) => `<a href="${L(e.href)}" style="text-decoration: none; color: inherit; font-weight: ${v.fontWeight || 600};">${L(e.label)}</a>`).join("")}</div>`;
772
772
  }
773
773
  case "icon": {
774
- 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({
774
+ 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 = M({
775
775
  padding: v.padding,
776
776
  margin: v.margin,
777
777
  display: "flex",
778
778
  justifyContent: i
779
779
  }), o = typeof C.href == "string" ? C.href.trim() : "", s = `<span style="display: inline-flex; align-items: center; justify-content: center; color: ${t};">${r}</span>`;
780
- return `<div style="${a}">${o ? `<a${w} href="${B(o)}" target="${C.openInNewTab ? "_blank" : "_self"}" style="text-decoration: none;">${s}</a>` : `<span${w}>${s}</span>`}</div>`;
780
+ return `<div style="${a}">${o ? `<a${w} href="${L(o)}" target="${C.openInNewTab ? "_blank" : "_self"}" style="text-decoration: none;">${s}</a>` : `<span${w}>${s}</span>`}</div>`;
781
781
  }
782
782
  case "table": {
783
783
  let e = d(g), t = `${v.borderWidth || "1px"} ${v.borderStyle || "solid"} ${v.borderColor || "#cbd5e1"}`, n = (n, r, i, a) => {
784
784
  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";
785
785
  return `<tr>${n.map((e, n) => {
786
- let r = P({
786
+ let r = M({
787
787
  padding: v.cellPadding || "8px",
788
788
  border: t,
789
789
  backgroundColor: s,
@@ -792,14 +792,14 @@ var ie = (g, _ = !1) => {
792
792
  lineHeight: v.contentLineHeight,
793
793
  letterSpacing: v.contentLetterSpacing,
794
794
  fontWeight: a ? "700" : void 0
795
- }), u = ` data-plexo-cell="${B(g.id)}|${i}-${n}"`;
795
+ }), u = ` data-plexo-cell="${L(g.id)}|${i}-${n}"`;
796
796
  return `<${o}${u} style="${r}">${e || "&nbsp;"}</${o}>`;
797
797
  }).join("")}</tr>`;
798
- }, 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({
798
+ }, 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 = M({
799
799
  borderCollapse: "collapse",
800
800
  width: "100%"
801
801
  });
802
- return `<div${w} style="${P({
802
+ return `<div${w} style="${M({
803
803
  padding: v.padding,
804
804
  margin: v.margin,
805
805
  overflowX: "auto"
@@ -807,33 +807,33 @@ var ie = (g, _ = !1) => {
807
807
  }
808
808
  case "video": {
809
809
  let e = i(C.videoUrl), t = C.linkType === "email" ? `mailto:${C.href || ""}` : C.href || C.videoUrl || "#", n = C.target || "_blank";
810
- return `<div${w} style="${P({
810
+ return `<div${w} style="${M({
811
811
  padding: v.padding,
812
812
  margin: v.margin,
813
813
  borderRadius: v.borderRadius,
814
814
  overflow: "hidden"
815
- })}"><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>`;
815
+ })}"><a href="${L(t)}" target="${L(n)}" style="position: relative; display: block; text-decoration: none;"><img src="${L(e.thumbnailUrl)}" alt="${L(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>`;
816
816
  }
817
817
  case "timer": {
818
- let e = C.showLabels !== !1, t = P({
818
+ let e = C.showLabels !== !1, t = M({
819
819
  fontFamily: v.digitsFontFamily,
820
820
  fontSize: v.digitsFontSize || "40px",
821
821
  color: v.digitsColor || "#1e293b",
822
822
  fontWeight: "800"
823
- }), n = P({
823
+ }), n = M({
824
824
  fontFamily: v.labelsFontFamily,
825
825
  fontSize: v.labelsFontSize || "16px",
826
826
  color: v.labelsColor || "#64748b"
827
- }), r = P({
827
+ }), r = M({
828
828
  backgroundColor: v.backgroundColor || "#f8fafc",
829
829
  borderRadius: v.borderRadius || "8px",
830
830
  padding: v.padding || "16px",
831
831
  textAlign: "center"
832
- }), 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>`;
832
+ }), 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 = L(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>`;
833
833
  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>`;
834
834
  }
835
835
  case "carousel": {
836
- let e = Array.isArray(C.images) ? C.images : [], t = `plexo-carousel-${g.id}`, n = P({
836
+ let e = Array.isArray(C.images) ? C.images : [], t = `plexo-carousel-${g.id}`, n = M({
837
837
  padding: v.padding || "10px",
838
838
  margin: v.margin,
839
839
  backgroundColor: v.backgroundColor,
@@ -845,7 +845,7 @@ var ie = (g, _ = !1) => {
845
845
  if (e.length === 0) return `<div${w} style="${n}"><div style="padding: 40px; text-align: center; color: #94a3b8;">No images in carousel</div></div>`;
846
846
  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) => {
847
847
  let o = i[r] * 5, s = e.length > 1 ? ` animation: ${t}-fade ${a}s ease-in-out infinite; animation-delay: ${o}s;` : "";
848
- 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>`;
848
+ return `<div data-slide-idx="${r}" style="opacity: ${e.length > 1 ? "0" : "1"};${s}"><img src="${L(n.src)}" alt="${L(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;">${L(n.caption)}</div>` : ""}</div>`;
849
849
  }).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) => {
850
850
  let r = i[n] * 5;
851
851
  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>`;
@@ -853,38 +853,38 @@ var ie = (g, _ = !1) => {
853
853
  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>`;
854
854
  }
855
855
  case "accordion": {
856
- 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({
856
+ 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 = M({
857
857
  border: `${v.borderWidth || "1px"} ${v.borderStyle || "solid"} ${v.borderColor || "#e2e8f0"}`,
858
858
  borderRadius: v.borderRadius || "10px",
859
859
  overflow: "hidden",
860
860
  margin: v.margin
861
861
  });
862
- 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, {
862
+ 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">${Y(e, v, {
863
863
  iconStyle: n,
864
864
  iconOnLeft: r,
865
865
  showDividers: i,
866
866
  animated: a
867
867
  }, 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>`;
868
868
  }
869
- default: return re(g.type);
869
+ default: return ie(g.type);
870
870
  }
871
- }, Z = (e, t, n) => {
871
+ }, X = (e, t, n) => {
872
872
  if (!e || typeof e != "object") return "";
873
- let r = j(e);
873
+ let r = A(e);
874
874
  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. -->`;
875
- 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 || {} };
876
- delete s.columnGap;
877
- let c = P(s), l = V("id", r.htmlId), u = V("class", r.htmlClass), d = r.id || `row-${Math.random().toString(36).substring(2, 9)}`;
878
- L(t, d, r.style, "tablet", r.styleTablet), L(t, d, r.style, "mobile", r.styleMobile), o && t.mobile.push(`[data-plexo-id="${d}"] > .plexo-col { margin-bottom: 0; }`);
879
- let f = `\n <!-- ROW START: ${r.id || "row"} -->`, p = o ? `gap: ${a}; margin-left: 0; margin-right: 0;` : "margin-left: -8px; margin-right: -8px;";
880
- f += `\n <div data-plexo-id="${d}"${l}${u} class="plexo-row" style="display: flex; flex-wrap: wrap; ${p} ${c}">`;
881
- let m = Array.isArray(r.columns) ? r.columns : [], h = o && m.length > 1 ? `(${a} * ${m.length - 1} / ${m.length})` : "";
882
- for (let e of m) {
875
+ 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 || {} };
876
+ delete u.columnGap;
877
+ let d = M(u), f = R("id", r.htmlId), p = R("class", r.htmlClass), m = r.id || `row-${Math.random().toString(36).substring(2, 9)}`;
878
+ P(t, m, r.style, "tablet", r.styleTablet), P(t, m, r.style, "mobile", r.styleMobile), (o || l) && t.mobile.push(`[data-plexo-id="${m}"] > .plexo-col { margin-bottom: 0; }`);
879
+ let h = `\n <!-- ROW START: ${r.id || "row"} -->`, _ = o ? `gap: ${a}; margin-left: 0; margin-right: 0;` : "margin-left: -8px; margin-right: -8px;";
880
+ h += `\n <div data-plexo-id="${m}"${f}${p} class="plexo-row" style="display: flex; flex-wrap: wrap; ${_} ${d}">`;
881
+ let v = Array.isArray(r.columns) ? r.columns : [], y = o && v.length > 1 ? `(${a} * ${v.length - 1} / ${v.length})` : "";
882
+ for (let e of v) {
883
883
  if (!e) continue;
884
- 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)}`;
885
- L(t, l, r, "tablet", e.stylesTablet), L(t, l, r, "mobile", e.stylesMobile);
886
- let u = Array.isArray(e.elements) ? e.elements : [], d = Array.isArray(e.nestedRows) ? e.nestedRows : [], p = n && u.length === 0 && d.length === 0 ? "min-height: 148px; " : "", m = e.width || "100%", _ = typeof m == "string" && /^\s*\d+(\.\d+)?\s*%\s*$/.test(m), v = o && _ && h ? `calc(${m.trim()} - ${h})` : m, y = o ? "padding-left: 0; padding-right: 0;" : "padding-left: 8px; padding-right: 8px;";
887
- f += `\n <!-- COLUMN START: ${e.id || "col"} -->`, f += `\n <div data-plexo-id="${l}"${s} class="plexo-col${c}" style="box-sizing: border-box; ${y} width: ${v}; --plexo-col-gap: ${a}; ${p}${i}">`;
884
+ let r = e.styles || e.style || {}, i = M(r), a = r.gap || "16px", s = R("id", e.attrs?.htmlId), c = e.attrs?.htmlClass ? ` ${e.attrs.htmlClass}` : "", l = e.id || `col-${Math.random().toString(36).substring(2, 9)}`;
885
+ P(t, l, r, "tablet", e.stylesTablet), P(t, l, r, "mobile", e.stylesMobile);
886
+ 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;";
887
+ 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}">`;
888
888
  let b = new Map(u.map((e) => [e.id, e])), x = new Map(d.map((e) => [e.id, e]));
889
889
  for (let r of g({
890
890
  ...e,
@@ -893,18 +893,18 @@ var ie = (g, _ = !1) => {
893
893
  })) {
894
894
  let e = b.get(r);
895
895
  if (e) {
896
- let r = e.attributes || {}, i = typeof r.htmlClassNames == "string" ? r.htmlClassNames : typeof r.htmlClass == "string" ? r.htmlClass : typeof r.className == "string" ? r.className : "", o = V("id", r.htmlId), s = V("class", i), c = e.style?.display, l = c === "inline-block" || c === "inline" || c === "inline-flex" ? `margin-bottom: ${a}; display: ${c}; vertical-align: top;` : `margin-bottom: ${a};`;
897
- L(t, e.id, e.style, "tablet", R(e, e.styleTablet)), L(t, e.id, e.style, "mobile", R(e, e.styleMobile)), f += `\n <div${o}${s} style="${l}">`, f += `\n ${ie(e, n)}`, f += "\n </div>";
896
+ let r = e.attributes || {}, i = typeof r.htmlClassNames == "string" ? r.htmlClassNames : typeof r.htmlClass == "string" ? r.htmlClass : typeof r.className == "string" ? r.className : "", o = R("id", r.htmlId), s = R("class", i), c = e.style?.display, l = c === "inline-block" || c === "inline" || c === "inline-flex" ? `margin-bottom: ${a}; display: ${c}; vertical-align: top;` : `margin-bottom: ${a};`;
897
+ P(t, e.id, e.style, "tablet", F(e, e.styleTablet)), P(t, e.id, e.style, "mobile", F(e, e.styleMobile)), h += `\n <div${o}${s} style="${l}">`, h += `\n ${ae(e, n)}`, h += "\n </div>";
898
898
  continue;
899
899
  }
900
900
  let i = x.get(r);
901
- i && (f += Z(i, t, n));
901
+ i && (h += X(i, t, n));
902
902
  }
903
- f += "\n </div>";
903
+ h += "\n </div>";
904
904
  }
905
- return f += "\n </div>", f;
905
+ return h += "\n </div>", h;
906
906
  };
907
- function ae(e) {
907
+ function Z(e) {
908
908
  let t = /* @__PURE__ */ new Set(), n = 0, r = (e) => {
909
909
  let r;
910
910
  do
@@ -971,26 +971,26 @@ var Q = (e, t) => {
971
971
  "ogImageUrl"
972
972
  ], s = {};
973
973
  for (let e of Object.keys(a)) o.includes(e) || (s[e] = a[e]);
974
- let c = P(s), l = typeof a.htmlTitle == "string" && a.htmlTitle.trim() ? a.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", u = V("id", a.htmlId), d = V("class", a.htmlClass), f = typeof a.customCss == "string" && a.customCss.trim() ? a.customCss.trim() : "", p = typeof a.customJs == "string" && a.customJs.trim() ? a.customJs.trim() : "", m = typeof a.favicon == "string" && a.favicon.trim() ? a.favicon.trim() : "", h = typeof a.metaDescription == "string" && a.metaDescription.trim() ? a.metaDescription.trim() : "", g = typeof a.ogImageUrl == "string" && a.ogImageUrl.trim() ? a.ogImageUrl.trim() : "", v = typeof a.contentMaxWidth == "string" && a.contentMaxWidth.trim() ? a.contentMaxWidth.trim() : "1200px", y = ae(Array.isArray(i.rows) ? i.rows : Array.isArray(r.rows) ? r.rows : Array.isArray(e.rows) ? e.rows : []), b = N(M(y, [a.fontFamily])), x = {
974
+ let c = M(s), l = typeof a.htmlTitle == "string" && a.htmlTitle.trim() ? a.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", u = R("id", a.htmlId), d = R("class", a.htmlClass), f = typeof a.customCss == "string" && a.customCss.trim() ? a.customCss.trim() : "", p = typeof a.customJs == "string" && a.customJs.trim() ? a.customJs.trim() : "", m = typeof a.favicon == "string" && a.favicon.trim() ? a.favicon.trim() : "", h = typeof a.metaDescription == "string" && a.metaDescription.trim() ? a.metaDescription.trim() : "", g = typeof a.ogImageUrl == "string" && a.ogImageUrl.trim() ? a.ogImageUrl.trim() : "", v = typeof a.contentMaxWidth == "string" && a.contentMaxWidth.trim() ? a.contentMaxWidth.trim() : "1200px", y = Z(Array.isArray(i.rows) ? i.rows : Array.isArray(r.rows) ? r.rows : Array.isArray(e.rows) ? e.rows : []), b = j(ne(y, [a.fontFamily])), x = {
975
975
  tablet: [],
976
976
  mobile: []
977
977
  }, S = "";
978
- for (let e of y) S += Z(e, x, n);
978
+ for (let e of y) S += X(e, x, n);
979
979
  let C = x.tablet.length ? `\n ${x.tablet.join("\n ")}` : "", w = x.mobile.length ? `\n ${x.mobile.join("\n ")}` : "", T = `<!DOCTYPE html>
980
980
  <html>
981
981
  <head>
982
982
  <meta charset="utf-8">
983
- <title>${B(l)}</title>
984
- ${h ? `<meta name="description" content="${B(h)}">` : ""}
985
- ${m ? `<link rel="icon" href="${B(m)}">` : ""}
983
+ <title>${L(l)}</title>
984
+ ${h ? `<meta name="description" content="${L(h)}">` : ""}
985
+ ${m ? `<link rel="icon" href="${L(m)}">` : ""}
986
986
  <meta property="og:type" content="website">
987
- <meta property="og:title" content="${B(l)}">
988
- ${h ? `<meta property="og:description" content="${B(h)}">` : ""}
989
- ${g ? `<meta property="og:image" content="${B(g)}">` : ""}
987
+ <meta property="og:title" content="${L(l)}">
988
+ ${h ? `<meta property="og:description" content="${L(h)}">` : ""}
989
+ ${g ? `<meta property="og:image" content="${L(g)}">` : ""}
990
990
  <meta name="twitter:card" content="${g ? "summary_large_image" : "summary"}">
991
- <meta name="twitter:title" content="${B(l)}">
992
- ${h ? `<meta name="twitter:description" content="${B(h)}">` : ""}
993
- ${g ? `<meta name="twitter:image" content="${B(g)}">` : ""}
991
+ <meta name="twitter:title" content="${L(l)}">
992
+ ${h ? `<meta name="twitter:description" content="${L(h)}">` : ""}
993
+ ${g ? `<meta name="twitter:image" content="${L(g)}">` : ""}
994
994
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
995
995
  ${b ? `<link rel="stylesheet" href="${b}">` : ""}
996
996
  ${S.includes("<opt-in-embed-form") ? `<script type="module" src="${_}"><\/script>` : ""}
@@ -1002,7 +1002,7 @@ var Q = (e, t) => {
1002
1002
  margin entirely, so the same -8px bleed would otherwise show as a permanent ~8px
1003
1003
  horizontal scrollbar with nothing to absorb it. Scoped to body, not any inner element,
1004
1004
  so it only ever suppresses that specific layout overflow -- never clips real content. */
1005
- body { margin: 0; overflow-x: hidden; font-family: ${A}; }
1005
+ body { margin: 0; overflow-x: hidden; font-family: ${k}; }
1006
1006
  .plexo-row {
1007
1007
  display: flex;
1008
1008
  flex-wrap: wrap;
@@ -1029,6 +1029,19 @@ var Q = (e, t) => {
1029
1029
  .plexo-col {
1030
1030
  width: 100% !important;
1031
1031
  max-width: 100% !important;
1032
+ }
1033
+ /* :not(:last-child) -- a stacked column's margin-bottom exists to space it apart from
1034
+ the sibling stacked below it; the LAST column in a row has no such sibling, so that
1035
+ same margin only ever adds unwanted trailing space after it. Ordinarily harmless (a
1036
+ page's next section still starts in roughly the right place), but a *single-column*
1037
+ row is 100% last-children -- every column in it picks up this trailing margin with
1038
+ literally nothing to justify it. Confirmed live: a header built from two single-
1039
+ column utility rows (each just carrying an injected <style> tag, otherwise 0-height)
1040
+ stacked 16px of pure margin apiece above the visible nav bar, and the nav bar's own
1041
+ single-column wrapper added a third 16px below it -- two of the exact "wide empty
1042
+ space above/below the header" gaps reported, with nothing in the row/column content
1043
+ itself explaining them. */
1044
+ .plexo-col:not(:last-child) {
1032
1045
  margin-bottom: var(--plexo-col-gap, 16px);
1033
1046
  }${w}
1034
1047
  }
@@ -1055,4 +1068,4 @@ function ce(e) {
1055
1068
  return e;
1056
1069
  }
1057
1070
  //#endregion
1058
- export { se as a, z as c, ce as d, k as f, Q as i, F as l, H as n, oe as o, L as r, j as s, A as t, $ as u };
1071
+ export { se as a, I as c, ce as d, ee as f, Q as i, N as l, z as n, oe as o, P as r, A as s, k as t, $ as u };
package/dist/compiler.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./compiler-gIBAClII.js";
1
+ import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./compiler-DFzrMJge.js";
2
2
  export { l as DEFAULT_BODY_FONT_FAMILY, a as FORM_NON_CSS_STYLE_KEYS, s as collectResponsiveRule, r as compileToHTML, e as compileToHTMLWithStrataAuto, o as compileToPlainText, c as convertSectionRowToPlexoRow, t as getFormDefaultStyle, i as getInlineStylesImportant, u as htmlToPlainText, n as injectStrataBundle };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { i as e, n as t, o as n, r, s as i, t as a } from "./sanitizeCompiledHtml-D3k1f2jT.js";
2
2
  import { S as o, _ as s, a as c, b as l, c as u, f as d, h as f, i as p, l as m, o as h, p as g, s as _, u as v, x as y, y as b } from "./iconSvgStatic-CGue7nyp.js";
3
- import { a as x, d as S, f as C, i as ee, o as te, u as w } from "./compiler-gIBAClII.js";
3
+ import { a as x, d as S, f as C, i as ee, o as te, u as w } from "./compiler-DFzrMJge.js";
4
4
  import { t as ne } from "./compilerClient-BIrZIgfG.js";
5
5
  import T, { createContext as E, createElement as re, forwardRef as ie, useCallback as ae, useContext as oe, useEffect as D, useImperativeHandle as se, useMemo as O, useRef as k, useState as A } from "react";
6
6
  import { DndContext as ce, DragOverlay as le, MeasuringStrategy as ue, PointerSensor as de, TouchSensor as fe, pointerWithin as pe, rectIntersection as me, useDraggable as j, useDroppable as he, useSensor as M, useSensors as ge } from "@dnd-kit/core";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@charisol/plexo-sdk",
3
3
  "private": false,
4
- "version": "1.4.32",
4
+ "version": "1.4.33",
5
5
  "description": "Plexo visual email and landing page builder SDK — drag-and-drop template editor with AI integration.",
6
6
  "keywords": [
7
7
  "email-builder",