@charisol/plexo-sdk 1.0.37 → 1.0.39

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/dist/compiler.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./compiler-BHUlR0D2.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./compiler-CogJrihV.js";
2
2
  export { c as DEFAULT_BODY_FONT_FAMILY, i as FORM_NON_CSS_STYLE_KEYS, o as collectResponsiveRule, n as compileToHTML, e as compileToHTMLWithStrataAuto, a as compileToPlainText, s as convertSectionRowToPlexoRow, t as getFormDefaultStyle, r as getInlineStylesImportant, l as injectStrataBundle };
@@ -1,8 +1,6 @@
1
- import { a as e, c as t, d as n, f as r, l as i, o as a, p as o, s, t as c, u as l } from "./elementResolvers-qyNepC_f.js";
2
- import * as u from "react";
3
- import { renderToStaticMarkup as d } from "react-dom/server";
1
+ import { d as e, f as t, l as n, p as r, r as i, s as a, t as o, u as s } from "./iconSvgStatic-DOyb-nIf.js";
4
2
  //#region src/utilities/compilerClient.ts
5
- var f = {
3
+ var c = {
6
4
  facebook: "facebook",
7
5
  x: "twitter",
8
6
  twitter: "twitter",
@@ -10,25 +8,25 @@ var f = {
10
8
  instagram: "instagram",
11
9
  youtube: "youtube",
12
10
  pinterest: "pinterest"
13
- }, p = /* @__PURE__ */ new Set([
11
+ }, l = /* @__PURE__ */ new Set([
14
12
  "selectable",
15
13
  "draggable",
16
14
  "duplicatable",
17
15
  "deletable",
18
16
  "hideable",
19
17
  "locked"
20
- ]), m = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), h = (e = {}) => Object.entries(e).filter(([, e]) => e != null && String(e).trim() !== "").map(([e, t]) => `${e.replace(/([A-Z])/g, "-$1").toLowerCase()}:${String(t)};`).join(""), g = (...e) => e.map((e) => String(e ?? "").trim()).filter(Boolean).join(" "), _ = (e, t) => {
18
+ ]), u = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), d = (e = {}) => Object.entries(e).filter(([, e]) => e != null && String(e).trim() !== "").map(([e, t]) => `${e.replace(/([A-Z])/g, "-$1").toLowerCase()}:${String(t)};`).join(""), f = (...e) => e.map((e) => String(e ?? "").trim()).filter(Boolean).join(" "), p = (e, t) => {
21
19
  let n = { ...e.attributes || {} };
22
- if (t === "email") for (let e of p) delete n[e];
20
+ if (t === "email") for (let e of l) delete n[e];
23
21
  return n;
24
- }, v = (e, t) => {
25
- let n = _(e, t), r = h(e.style || {}), i = g(n.htmlClassNames, n.htmlClass, n.validationClass, n.validationClassName), a = m(n.name || n.fieldName || "field"), o = m(n.placeholder || ""), s = n.required ? " required" : "";
22
+ }, m = (e, t) => {
23
+ let n = p(e, t), r = d(e.style || {}), i = f(n.htmlClassNames, n.htmlClass, n.validationClass, n.validationClassName), a = u(n.name || n.fieldName || "field"), o = u(n.placeholder || ""), s = n.required ? " required" : "";
26
24
  if (t === "email") return `<mj-table><tr><td style="padding:10px 12px;border:1px solid #d1d5db;border-radius:6px;color:#64748b;${r}">${o || a}</td></tr></mj-table>`;
27
- let c = m(n.inputType || n.type || (e.type === "input" ? n.kind || "text" : e.type)), l = n.htmlId ? ` id="${m(n.htmlId)}"` : "", u = i ? ` class="${m(i)}"` : "";
28
- return e.type === "textarea" ? `<textarea${l}${u} name="${a}" placeholder="${o}" style="${r}"${s}>${m(n.value || "")}</textarea>` : e.type === "select" ? `<select${l}${u} name="${a}" style="${r}"${s}>${(n.options || []).map((e) => `<option value="${m(e.value)}">${m(e.label)}</option>`).join("")}</select>` : `<input${l}${u} type="${c}" name="${a}" placeholder="${o}" value="${m(n.value || "")}" style="${r}"${s} />`;
29
- }, y = (e, t) => {
30
- let n = _(e, t), r = h(e.style || {}), i = g(n.htmlClassNames, n.htmlClass), a = n.htmlId ? ` id="${m(n.htmlId)}"` : "", o = i ? ` class="${m(i)}"` : "", s = m(n.actionUrl || n.action || "#"), c = m(n.method || "POST"), l = n.fields || [], u = m(n.submitLabel || "Submit");
31
- return t === "email" ? `<mj-table><tr><td style="${r}"><table role="presentation" width="100%">${l.map((e) => `<tr><td style="padding:8px 0;font-family:Arial,sans-serif;color:#334155;"><strong>${m(e.label || e.name || "Field")}</strong><br/><span style="display:inline-block;margin-top:4px;padding:10px 12px;border:1px solid #d1d5db;border-radius:6px;color:#64748b;">${m(e.placeholder || "") || "&nbsp;"}</span></td></tr>`).join("")}<tr><td style="padding-top:12px;"><a href="${m(n.href || n.submitHref || "#")}" style="display:inline-block;padding:10px 16px;background:#0f172a;color:#ffffff;text-decoration:none;border-radius:6px;">${u}</a></td></tr></table></td></tr></mj-table>` : `<form${a}${o} action="${s}" method="${c}" style="${r}">${l.map((t) => v({
25
+ let c = u(n.inputType || n.type || (e.type === "input" ? n.kind || "text" : e.type)), l = n.htmlId ? ` id="${u(n.htmlId)}"` : "", m = i ? ` class="${u(i)}"` : "";
26
+ return e.type === "textarea" ? `<textarea${l}${m} name="${a}" placeholder="${o}" style="${r}"${s}>${u(n.value || "")}</textarea>` : e.type === "select" ? `<select${l}${m} name="${a}" style="${r}"${s}>${(n.options || []).map((e) => `<option value="${u(e.value)}">${u(e.label)}</option>`).join("")}</select>` : `<input${l}${m} type="${c}" name="${a}" placeholder="${o}" value="${u(n.value || "")}" style="${r}"${s} />`;
27
+ }, h = (e, t) => {
28
+ let n = p(e, t), r = d(e.style || {}), i = f(n.htmlClassNames, n.htmlClass), a = n.htmlId ? ` id="${u(n.htmlId)}"` : "", o = i ? ` class="${u(i)}"` : "", s = u(n.actionUrl || n.action || "#"), c = u(n.method || "POST"), l = n.fields || [], h = u(n.submitLabel || "Submit");
29
+ return t === "email" ? `<mj-table><tr><td style="${r}"><table role="presentation" width="100%">${l.map((e) => `<tr><td style="padding:8px 0;font-family:Arial,sans-serif;color:#334155;"><strong>${u(e.label || e.name || "Field")}</strong><br/><span style="display:inline-block;margin-top:4px;padding:10px 12px;border:1px solid #d1d5db;border-radius:6px;color:#64748b;">${u(e.placeholder || "") || "&nbsp;"}</span></td></tr>`).join("")}<tr><td style="padding-top:12px;"><a href="${u(n.href || n.submitHref || "#")}" style="display:inline-block;padding:10px 16px;background:#0f172a;color:#ffffff;text-decoration:none;border-radius:6px;">${h}</a></td></tr></table></td></tr></mj-table>` : `<form${a}${o} action="${s}" method="${c}" style="${r}">${l.map((t) => m({
32
30
  id: `${e.id}-${String(t.name || t.label || "field")}`,
33
31
  type: t.kind === "textarea" || t.kind === "select" ? t.kind : "input",
34
32
  style: {
@@ -36,72 +34,88 @@ var f = {
36
34
  ...t.style || {}
37
35
  },
38
36
  attributes: t
39
- }, "landing_page")).join("")}<button type="submit">${u}</button></form>`;
40
- }, b = (p, b) => {
41
- let x = _(p, b), S = h(p.style || {}), C = x.htmlId ? ` id="${m(x.htmlId)}"` : "", w = g(x.htmlClassNames, x.htmlClass, b === "landing_page" && x.hideOnMobile ? "hidden md:block" : ""), T = w ? ` class="${m(w)}"` : "", E = typeof x.customCss == "string" && x.customCss.trim() ? x.customCss.trim() : "", D = E && b === "landing_page" ? `<style>${E}</style>` : "";
42
- if (p.type === "form_container") return `${D}${y(p, b)}`;
43
- if (p.type === "input" || p.type === "select" || p.type === "textarea") return `${D}${v(p, b)}`;
44
- if (b === "email") {
45
- if (p.type === "button") {
46
- let e = m(x.href || "#"), t = m(x.text || "Button"), n = c(p).width, r = n === "auto" ? "" : ` width="${m(n)}"`;
47
- return `<mj-button href="${e}" css-class="${x.hideOnDesktop ? "desktop-hide" : ""}" padding="0" inner-padding="10px 16px"${r}>${t}</mj-button>`;
37
+ }, "landing_page")).join("")}<button type="submit">${h}</button></form>`;
38
+ }, g = (e = {}, t = {}) => {
39
+ let n = [], r = e.fontSize || t.fontSize, i = e.fontWeight || t.fontWeight;
40
+ return r && n.push(`font-size="${u(String(r))}"`), i && n.push(`font-weight="${u(String(i))}"`), e.color && n.push(`color="${u(String(e.color))}"`), e.fontFamily && n.push(`font-family="${u(String(e.fontFamily))}"`), e.lineHeight && n.push(`line-height="${u(String(e.lineHeight))}"`), e.letterSpacing && n.push(`letter-spacing="${u(String(e.letterSpacing))}"`), e.textAlign && n.push(`align="${u(String(e.textAlign))}"`), e.backgroundColor && n.push(`container-background-color="${u(String(e.backgroundColor))}"`), n.join(" ");
41
+ }, _ = (l, _) => {
42
+ let v = p(l, _), y = d(l.style || {}), b = v.htmlId ? ` id="${u(v.htmlId)}"` : "", x = f(v.htmlClassNames, v.htmlClass, _ === "landing_page" && v.hideOnMobile ? "hidden md:block" : ""), S = x ? ` class="${u(x)}"` : "", C = typeof v.customCss == "string" && v.customCss.trim() ? v.customCss.trim() : "", w = C && _ === "landing_page" ? `<style>${C}</style>` : "";
43
+ if (l.type === "form_container") return `${w}${h(l, _)}`;
44
+ if (l.type === "input" || l.type === "select" || l.type === "textarea") return `${w}${m(l, _)}`;
45
+ if (_ === "email") {
46
+ if (l.type === "button") {
47
+ let e = u(v.href || "#"), t = u(v.text || "Button"), n = i(l).width, r = n === "auto" ? "" : ` width="${u(n)}"`;
48
+ return `<mj-button href="${e}" css-class="${v.hideOnDesktop ? "desktop-hide" : ""}" padding="0" inner-padding="10px 16px"${r}>${t}</mj-button>`;
49
+ }
50
+ if (l.type === "image") {
51
+ let e = a(l), t = e.width && e.width !== "100%" ? ` width="${u(e.width)}"` : "", n = e.height && e.height !== "auto" ? ` height="${u(e.height)}"` : "";
52
+ return `<mj-image src="${u(v.src || "")}" alt="${u(v.alt || "")}"${t}${n} />`;
53
+ }
54
+ if (l.type === "social") {
55
+ let e = s(l), t = e.filter((e) => c[e.provider]), n = e.filter((e) => !c[e.provider]);
56
+ return `${t.length ? `<mj-social font-size="13px" icon-size="30px" mode="horizontal">${t.map((e) => `<mj-social-element name="${c[e.provider]}" href="${u(e.url)}" background-color="${u(e.backgroundColor)}" color="${u(e.color)}"></mj-social-element>`).join("")}</mj-social>` : ""}${n.length ? `<mj-text align="center">${n.map((e) => `<a href="${u(e.url)}" style="color: ${u(e.color)}; text-decoration: none; margin: 0 6px;">${u(e.provider)}</a>`).join("")}</mj-text>` : ""}`;
48
57
  }
49
- if (p.type === "image") {
50
- let t = e(p), n = t.width && t.width !== "100%" ? ` width="${m(t.width)}"` : "", r = t.height && t.height !== "auto" ? ` height="${m(t.height)}"` : "";
51
- return `<mj-image src="${m(x.src || "")}" alt="${m(x.alt || "")}"${n}${r} />`;
58
+ if (l.type === "menu") return `<mj-navbar hamburger="hamburger">${n(l).map((e) => `<mj-navbar-link href="${u(e.href)}">${u(e.label)}</mj-navbar-link>`).join("")}</mj-navbar>`;
59
+ if (l.type === "table") {
60
+ let t = e(l), n = l.style || {}, r = `${n.borderWidth || "1px"} ${n.borderStyle || "solid"} ${n.borderColor || "#cbd5e1"}`, i = (e, i, a) => {
61
+ let o = a ? "th" : "td", s = a ? n.headerBgColor || "#f8fafc" : t.striped && i % 2 == 1 ? "#f8fafc" : n.contentBgColor || "#ffffff", c = a ? n.headerTextColor || "#1e293b" : n.contentTextColor || "#475569";
62
+ return `<tr>${e.map((e) => `<${o} style="padding: ${n.cellPadding || "8px"}; border: ${r}; background-color: ${s}; color: ${c};">${u(e) || "&nbsp;"}</${o}>`).join("")}</tr>`;
63
+ }, a = +!!t.enableHeader, o = t.enableFooter ? t.cells.length - 1 : t.cells.length;
64
+ return `<mj-table><table role="presentation" style="border-collapse: collapse; width: 100%;">${t.enableHeader && t.cells.length > 0 ? `<thead>${i(t.cells[0], 0, !0)}</thead>` : ""}<tbody>${t.cells.slice(a, Math.max(a, o)).map((e, t) => i(e, t, !1)).join("")}</tbody>${t.enableFooter && t.cells.length > a ? `<tfoot>${i(t.cells[t.cells.length - 1], t.cells.length - 1, !1)}</tfoot>` : ""}</table></mj-table>`;
52
65
  }
53
- if (p.type === "social") {
54
- let e = t(p), n = e.filter((e) => f[e.provider]), r = e.filter((e) => !f[e.provider]);
55
- return `${n.length ? `<mj-social font-size="13px" icon-size="30px" mode="horizontal">${n.map((e) => `<mj-social-element name="${f[e.provider]}" href="${m(e.url)}" background-color="${m(e.backgroundColor)}" color="${m(e.color)}"></mj-social-element>`).join("")}</mj-social>` : ""}${r.length ? `<mj-text align="center">${r.map((e) => `<a href="${m(e.url)}" style="color: ${m(e.color)}; text-decoration: none; margin: 0 6px;">${m(e.provider)}</a>`).join("")}</mj-text>` : ""}`;
66
+ if (l.type === "video") {
67
+ let e = r(v.videoUrl), t = v.linkType === "email" ? `mailto:${v.href || ""}` : v.href || v.videoUrl || "#";
68
+ return `<mj-image src="${u(e.thumbnailUrl)}" href="${u(t)}" alt="${u(v.alt || "Video preview")}" />`;
56
69
  }
57
- if (p.type === "menu") return `<mj-navbar hamburger="hamburger">${s(p).map((e) => `<mj-navbar-link href="${m(e.href)}">${m(e.label)}</mj-navbar-link>`).join("")}</mj-navbar>`;
58
- if (p.type === "table") {
59
- let e = i(p), t = p.style || {}, n = `${t.borderWidth || "1px"} ${t.borderStyle || "solid"} ${t.borderColor || "#cbd5e1"}`, r = (r, i, a) => {
60
- let o = a ? "th" : "td", s = a ? t.headerBgColor || "#f8fafc" : e.striped && i % 2 == 1 ? "#f8fafc" : t.contentBgColor || "#ffffff", c = a ? t.headerTextColor || "#1e293b" : t.contentTextColor || "#475569";
61
- return `<tr>${r.map((e) => `<${o} style="padding: ${t.cellPadding || "8px"}; border: ${n}; background-color: ${s}; color: ${c};">${m(e) || "&nbsp;"}</${o}>`).join("")}</tr>`;
62
- }, a = +!!e.enableHeader, o = e.enableFooter ? e.cells.length - 1 : e.cells.length;
63
- return `<mj-table><table role="presentation" style="border-collapse: collapse; width: 100%;">${e.enableHeader && e.cells.length > 0 ? `<thead>${r(e.cells[0], 0, !0)}</thead>` : ""}<tbody>${e.cells.slice(a, Math.max(a, o)).map((e, t) => r(e, t, !1)).join("")}</tbody>${e.enableFooter && e.cells.length > a ? `<tfoot>${r(e.cells[e.cells.length - 1], e.cells.length - 1, !1)}</tfoot>` : ""}</table></mj-table>`;
70
+ if (l.type === "timer") {
71
+ let e = t(v.targetDate), n = v.showLabels !== !1;
72
+ return `<mj-text align="center"><div style="font-size: 28px; font-weight: 800;">${e.days}d ${e.hours}h ${e.minutes}m ${e.seconds}s</div>${n ? `<div style="font-size: 12px; color: #64748b;">Countdown to ${u(v.targetDate || "")}</div>` : ""}</mj-text>`;
64
73
  }
65
- if (p.type === "video") {
66
- let e = n(x.videoUrl), t = x.linkType === "email" ? `mailto:${x.href || ""}` : x.href || x.videoUrl || "#";
67
- return `<mj-image src="${m(e.thumbnailUrl)}" href="${m(t)}" alt="${m(x.alt || "Video preview")}" />`;
74
+ if (l.type === "carousel") {
75
+ let e = Array.isArray(v.images) ? v.images : [];
76
+ return e.length === 0 ? "<mj-text align=\"center\">No images in carousel</mj-text>" : `<mj-carousel>${e.map((e) => `<mj-carousel-image src="${u(e.src)}" alt="${u(e.alt || "")}" />`).join("")}</mj-carousel>`;
68
77
  }
69
- if (p.type === "timer") {
70
- let e = l(x.targetDate), t = x.showLabels !== !1;
71
- return `<mj-text align="center"><div style="font-size: 28px; font-weight: 800;">${e.days}d ${e.hours}h ${e.minutes}m ${e.seconds}s</div>${t ? `<div style="font-size: 12px; color: #64748b;">Countdown to ${m(x.targetDate || "")}</div>` : ""}</mj-text>`;
78
+ if (l.type === "icon") {
79
+ let e = parseInt(String(v.iconSize || 48), 10) || 48, t = l.style?.color || "#1e293b";
80
+ return `<mj-text align="center">${o(v.iconName, e, t)}</mj-text>`;
72
81
  }
73
- if (p.type === "carousel") {
74
- let e = Array.isArray(x.images) ? x.images : [];
75
- return e.length === 0 ? "<mj-text align=\"center\">No images in carousel</mj-text>" : `<mj-carousel>${e.map((e) => `<mj-carousel-image src="${m(e.src)}" alt="${m(e.alt || "")}" />`).join("")}</mj-carousel>`;
82
+ let d = v.hideOnDesktop ? "desktop-hide" : "";
83
+ if (l.type === "heading" || l.type === "paragraph" || l.type === "text") {
84
+ let e = l.type === "heading" ? {
85
+ fontSize: "24px",
86
+ fontWeight: "700"
87
+ } : { fontSize: "14px" }, t = g(l.style || {}, e);
88
+ return `<mj-text${t ? ` ${t}` : ""} css-class="${d}">${u(v.text || "")}</mj-text>`;
76
89
  }
77
- if (p.type === "icon") {
78
- let e = r[a(x.iconName, Object.keys(r))] || o, t = parseInt(String(x.iconSize || 48), 10) || 48, n = p.style?.color || "#1e293b";
79
- return `<mj-text align="center">${d(u.createElement(e, {
80
- size: t,
81
- color: n
82
- }))}</mj-text>`;
90
+ if (l.type === "spacer") {
91
+ let e = l.style?.height || "24px";
92
+ return `<mj-spacer height="${u(String(e))}" />`;
83
93
  }
84
- return `<mj-text${C}${T} css-class="${x.hideOnDesktop ? "desktop-hide" : ""}">${m(x.text || x.htmlContent || "")}</mj-text>`;
94
+ if (l.type === "divider") {
95
+ let e = l.style || {};
96
+ return `<mj-divider border-width="${u(String(e.borderWidth || "1px"))}" border-style="${u(String(e.borderStyle || "solid"))}" border-color="${u(String(e.borderColor || "#334155"))}" />`;
97
+ }
98
+ return l.type === "card" ? `<mj-text css-class="${d}"><strong style="display:block;margin-bottom:8px;">${u(v.title || "Card Title")}</strong><span style="font-size:14px;color:#64748b;">${u(v.description || "Card description.")}</span></mj-text>` : l.type === "html" ? `<mj-text css-class="${d}">${v.htmlContent || v.text || ""}</mj-text>` : `<mj-text${b}${S} css-class="${d}">${u(v.text || v.htmlContent || "")}</mj-text>`;
85
99
  }
86
- switch (p.type) {
87
- case "heading": return `${D}<h2${C}${T} style="${S}">${m(x.text || "Heading")}</h2>`;
100
+ switch (l.type) {
101
+ case "heading": return `${w}<h2${b}${S} style="${y}">${u(v.text || "Heading")}</h2>`;
88
102
  case "paragraph":
89
- case "text": return `${D}<p${C}${T} style="${S}">${m(x.text || "")}</p>`;
90
- case "button": return `${D}<a${C}${T} href="${m(x.href || "#")}" style="${S}">${m(x.text || "Button")}</a>`;
91
- case "image": return `${D}<img${C}${T} src="${m(x.src || "")}" alt="${m(x.alt || "")}" style="${S}" />`;
92
- case "html": return `${D}<div${C}${T} style="${S}">${String(x.htmlContent || "")}</div>`;
93
- default: return `${D}<div${C}${T} style="${S}">${m(x.text || "")}</div>`;
103
+ case "text": return `${w}<p${b}${S} style="${y}">${u(v.text || "")}</p>`;
104
+ case "button": return `${w}<a${b}${S} href="${u(v.href || "#")}" style="${y}">${u(v.text || "Button")}</a>`;
105
+ case "image": return `${w}<img${b}${S} src="${u(v.src || "")}" alt="${u(v.alt || "")}" style="${y}" />`;
106
+ case "html": return `${w}<div${b}${S} style="${y}">${String(v.htmlContent || "")}</div>`;
107
+ default: return `${w}<div${b}${S} style="${y}">${u(v.text || "")}</div>`;
94
108
  }
95
- }, x = (e, t) => {
109
+ }, v = (e, t) => {
96
110
  if (t === "email") {
97
- let n = e.elements.map((e) => b(e, t)).join("");
98
- return `<mj-column width="${m(e.width || "100%")}">${n}</mj-column>`;
111
+ let n = e.elements.map((e) => _(e, t)).join("");
112
+ return `<mj-column width="${u(e.width || "100%")}">${n}</mj-column>`;
99
113
  }
100
- let n = h(e.styles || {}), r = e.elements.map((e) => b(e, t)).join(""), i = (Array.isArray(e.nestedRows) ? e.nestedRows : []).map((e) => S(e, t)).join("");
101
- return `<div style="width:${m(e.width || "100%")};${n}">${r}${i}</div>`;
102
- }, S = (e, t) => t === "email" ? `<mj-section css-class="${e.style?.hideOnDesktop ? "desktop-hide" : ""}">${e.columns.map((e) => x(e, t)).join("")}</mj-section>` : `<section style="display:flex;flex-wrap:wrap;${h(e.style || {})}">${e.columns.map((e) => x(e, t)).join("")}</section>`, C = (e, t) => {
103
- let n = (e.body?.rows || []).map((e) => S(e, t)).join(""), r = h(e.body?.style || {});
104
- return t === "email" ? `<mjml><mj-head><mj-style>.desktop-hide { display:none !important; max-height:0; overflow:hidden; }</mj-style></mj-head><mj-body><mj-section><mj-column><mj-wrapper css-class="email-root" padding="0"><mj-text css-class="preheader" padding="0" font-size="1px" color="#ffffff">&nbsp;</mj-text></mj-wrapper></mj-column></mj-section>${n}</mj-body></mjml>` : `<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /></head><body style="${r}"><main>${n}</main></body></html>`;
114
+ let n = d(e.styles || {}), r = e.elements.map((e) => _(e, t)).join(""), i = (Array.isArray(e.nestedRows) ? e.nestedRows : []).map((e) => y(e, t)).join("");
115
+ return `<div style="width:${u(e.width || "100%")};${n}">${r}${i}</div>`;
116
+ }, y = (e, t) => t === "email" ? `<mj-section css-class="${e.style?.hideOnDesktop ? "desktop-hide" : ""}">${e.columns.map((e) => v(e, t)).join("")}</mj-section>` : `<section style="display:flex;flex-wrap:wrap;${d(e.style || {})}">${e.columns.map((e) => v(e, t)).join("")}</section>`, b = (e, t) => {
117
+ let n = (e.body?.rows || []).map((e) => y(e, t)).join(""), r = d(e.body?.style || {});
118
+ return t === "email" ? `<mjml><mj-head><mj-style>.desktop-hide { display:none !important; max-height:0; overflow:hidden; }</mj-style></mj-head><mj-body><mj-section><mj-column><mj-text css-class="preheader" padding="0" font-size="1px" color="#ffffff">&nbsp;</mj-text></mj-column></mj-section>${n}</mj-body></mjml>` : `<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /></head><body style="${r}"><main>${n}</main></body></html>`;
105
119
  };
106
120
  //#endregion
107
- export { C as parseJsonToTargetFormat };
121
+ export { b as parseJsonToTargetFormat };
@@ -17,6 +17,7 @@ export declare const ICONS: {
17
17
  table: React.JSX.Element;
18
18
  timer: React.JSX.Element;
19
19
  form: React.JSX.Element;
20
+ accordion: React.JSX.Element;
20
21
  columns: React.JSX.Element;
21
22
  icon: React.JSX.Element;
22
23
  row1: React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const AccordionPropertiesAccordion: React.FC<any>;
@@ -14,6 +14,7 @@ interface BodyGlobalSettingsTabProps {
14
14
  Toggle: React.ComponentType<any>;
15
15
  InlineTextInput: React.ComponentType<any>;
16
16
  InlineTextArea: React.ComponentType<any>;
17
+ SpacingControls: React.ComponentType<any>;
17
18
  disableImageUpload?: boolean;
18
19
  onOpenImageLibrary?: (tab: 'images' | 'uploads', target: any) => void;
19
20
  }