@charisol/plexo-sdk 1.4.7 → 1.4.9
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-DFybM5XW.js → compiler-DJJsUnb4.js} +12 -11
- package/dist/compiler.js +1 -1
- package/dist/index.js +3 -3
- package/dist/{mjmlBrowser-Cb23AZ33.js → mjmlBrowser-B-7fzT_I.js} +1 -1
- package/dist/sanitize.js +1 -1
- package/dist/{sanitizeCompiledHtml-BU82w6E-.js → sanitizeCompiledHtml-BxHVsbDG.js} +1 -1
- package/dist/utilities/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -885,22 +885,23 @@ var q = (g) => {
|
|
|
885
885
|
"customCss",
|
|
886
886
|
"customJs",
|
|
887
887
|
"textColor",
|
|
888
|
-
"favicon"
|
|
888
|
+
"favicon",
|
|
889
|
+
"contentMaxWidth"
|
|
889
890
|
], s = {};
|
|
890
891
|
for (let e of Object.keys(a)) o.includes(e) || (s[e] = a[e]);
|
|
891
|
-
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 = Array.isArray(i.rows) ? i.rows : Array.isArray(r.rows) ? r.rows : Array.isArray(e.rows) ? e.rows : [],
|
|
892
|
+
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.contentMaxWidth == "string" && a.contentMaxWidth.trim() ? a.contentMaxWidth.trim() : "1200px", g = Array.isArray(i.rows) ? i.rows : Array.isArray(r.rows) ? r.rows : Array.isArray(e.rows) ? e.rows : [], _ = N(M(g, [a.fontFamily])), v = {
|
|
892
893
|
tablet: [],
|
|
893
894
|
mobile: []
|
|
894
|
-
},
|
|
895
|
-
for (let e of
|
|
896
|
-
let
|
|
895
|
+
}, y = "";
|
|
896
|
+
for (let e of g) y += J(e, v, n);
|
|
897
|
+
let b = v.tablet.length ? `\n ${v.tablet.join("\n ")}` : "", x = v.mobile.length ? `\n ${v.mobile.join("\n ")}` : "", S = `<!DOCTYPE html>
|
|
897
898
|
<html>
|
|
898
899
|
<head>
|
|
899
900
|
<meta charset="utf-8">
|
|
900
901
|
<title>${B(l)}</title>
|
|
901
902
|
${m ? `<link rel="icon" href="${B(m)}">` : ""}
|
|
902
903
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
903
|
-
${
|
|
904
|
+
${_ ? `<link rel="stylesheet" href="${_}">` : ""}
|
|
904
905
|
<style>
|
|
905
906
|
body { margin: 0; font-family: ${k}; }
|
|
906
907
|
.plexo-row {
|
|
@@ -910,7 +911,7 @@ var q = (g) => {
|
|
|
910
911
|
/* Tablet: auto-scaled fonts/heights/spacing (see utilities/responsiveDefaults.ts) and
|
|
911
912
|
any explicit per-element styleTablet/stylesTablet override — columns stay side by
|
|
912
913
|
side at this width. */
|
|
913
|
-
@media (min-width: 769px) and (max-width: 1024px) {${
|
|
914
|
+
@media (min-width: 769px) and (max-width: 1024px) {${b}
|
|
914
915
|
}
|
|
915
916
|
@media (max-width: 768px) {
|
|
916
917
|
.plexo-row {
|
|
@@ -920,17 +921,17 @@ var q = (g) => {
|
|
|
920
921
|
width: 100% !important;
|
|
921
922
|
max-width: 100% !important;
|
|
922
923
|
margin-bottom: var(--plexo-col-gap, 16px);
|
|
923
|
-
}${
|
|
924
|
+
}${x}
|
|
924
925
|
}
|
|
925
926
|
</style>
|
|
926
927
|
${f ? `<style>\n${f}\n </style>` : ""}
|
|
927
928
|
</head>
|
|
928
929
|
<body${u}${d} style="${c}">
|
|
929
|
-
<div style="max-width:
|
|
930
|
-
return
|
|
930
|
+
<div style="max-width: ${h}; margin: 0 auto; width: 100%;">`;
|
|
931
|
+
return S += y, S += `\n </div>
|
|
931
932
|
${p ? ` <script>\n${p}\n <\/script>` : ""}
|
|
932
933
|
</body>
|
|
933
|
-
</html>`,
|
|
934
|
+
</html>`, S = S.replace(/<span[^>]*data-merge-val="([^"]*)"[^>]*>[\s\S]*?<\/span>/gi, "$1"), S;
|
|
934
935
|
};
|
|
935
936
|
function X(e) {
|
|
936
937
|
return e.replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
|
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-
|
|
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-DJJsUnb4.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
|
-
import { i as e, n as t, o as n, r, s as i, t as a } from "./sanitizeCompiledHtml-
|
|
1
|
+
import { i as e, n as t, o as n, r, s as i, t as a } from "./sanitizeCompiledHtml-BxHVsbDG.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-
|
|
3
|
+
import { a as x, d as S, f as C, i as ee, o as te, u as w } from "./compiler-DJJsUnb4.js";
|
|
4
4
|
import { t as ne } from "./compilerClient-DNKp-n6N.js";
|
|
5
5
|
import T, { createContext as re, createElement as ie, forwardRef as ae, useCallback as oe, useContext as se, useEffect as E, useImperativeHandle as ce, useMemo as D, useRef as O, useState as k } from "react";
|
|
6
6
|
import { DndContext as le, DragOverlay as ue, MeasuringStrategy as de, PointerSensor as fe, TouchSensor as pe, pointerWithin as me, rectIntersection as he, useDraggable as A, useDroppable as ge, useSensor as j, useSensors as _e } from "@dnd-kit/core";
|
|
@@ -1895,7 +1895,7 @@ async function Et(e, t) {
|
|
|
1895
1895
|
let n = ne(e, "email", {
|
|
1896
1896
|
instrument: !0,
|
|
1897
1897
|
canvasEditorPadding: !0
|
|
1898
|
-
}), { compileMjmlInBrowser: i } = await import("./mjmlBrowser-
|
|
1898
|
+
}), { compileMjmlInBrowser: i } = await import("./mjmlBrowser-B-7fzT_I.js"), { html: a, errors: o } = i(n, { validationLevel: "soft" });
|
|
1899
1899
|
return {
|
|
1900
1900
|
html: a,
|
|
1901
1901
|
error: o.length > 0 ? o.map((e) => e.message ?? e.formattedMessage ?? "Unknown MJML error").join("; ") : null
|
package/dist/sanitize.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./sanitizeCompiledHtml-
|
|
1
|
+
import { n as e, r as t, t as n } from "./sanitizeCompiledHtml-BxHVsbDG.js";
|
|
2
2
|
export { n as ALLOWED_ATTR, e as ALLOWED_TAGS, t as sanitizeCompiledHtml };
|
|
@@ -5043,7 +5043,7 @@ function ir(e) {
|
|
|
5043
5043
|
}
|
|
5044
5044
|
return n.join("; ");
|
|
5045
5045
|
}
|
|
5046
|
-
var ar = /* @__PURE__ */ "html.head.body.title.meta.style.div.span.p.h1.h2.h3.h4.h5.h6.a.img.button.svg.path.table.thead.tbody.tr.th.td.hr.br.ul.ol.li.section.article.main.header.footer.aside".split("."), or = /* @__PURE__ */ "href.src.alt.class.id.style.title.target.rel.width.height.align.valign.cellpadding.cellspacing.border.viewbox.fill.stroke.d.xmlns.charset.name.content.lang.data-*".split("."), sr = [
|
|
5046
|
+
var ar = /* @__PURE__ */ "html.head.body.title.meta.style.link.div.span.p.h1.h2.h3.h4.h5.h6.a.img.button.svg.path.table.thead.tbody.tr.th.td.hr.br.ul.ol.li.section.article.main.header.footer.aside".split("."), or = /* @__PURE__ */ "href.src.alt.class.id.style.title.target.rel.width.height.align.valign.cellpadding.cellspacing.border.viewbox.fill.stroke.d.xmlns.charset.name.content.lang.data-*".split("."), sr = [
|
|
5047
5047
|
"javascript:",
|
|
5048
5048
|
"vbscript:",
|
|
5049
5049
|
"data:"
|
|
@@ -3,6 +3,10 @@ export interface TemplateStyles {
|
|
|
3
3
|
padding?: string;
|
|
4
4
|
/** URL of the favicon rendered as <link rel="icon"> on the exported page (see compileToHTML). */
|
|
5
5
|
favicon?: string;
|
|
6
|
+
/** Overrides the compiled page's outer content-column max-width (default '1200px') — set
|
|
7
|
+
* to 'none' (or any wider value) for a genuinely full-bleed layout, where a row's own
|
|
8
|
+
* background can reach the screen edges. See compileToHTML's contentMaxWidth. */
|
|
9
|
+
contentMaxWidth?: string;
|
|
6
10
|
[key: string]: string | number | undefined;
|
|
7
11
|
}
|
|
8
12
|
export interface RowStyles {
|
package/package.json
CHANGED