@charisol/plexo-sdk 1.4.16 → 1.4.17
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-CHtTI8Yn.js → compiler-D9cZiMRQ.js} +22 -11
- package/dist/compiler.js +1 -1
- package/dist/index.js +25 -3
- package/dist/{mjmlBrowser-CpKNB3HB.js → mjmlBrowser-DQvN8hjF.js} +1 -1
- package/dist/sanitize.js +1 -1
- package/dist/{sanitizeCompiledHtml-DoiJcfDC.js → sanitizeCompiledHtml-BDiv8Bkr.js} +1 -1
- package/package.json +1 -1
|
@@ -886,22 +886,33 @@ var q = (g) => {
|
|
|
886
886
|
"customJs",
|
|
887
887
|
"textColor",
|
|
888
888
|
"favicon",
|
|
889
|
-
"contentMaxWidth"
|
|
889
|
+
"contentMaxWidth",
|
|
890
|
+
"metaDescription",
|
|
891
|
+
"ogImageUrl"
|
|
890
892
|
], s = {};
|
|
891
893
|
for (let e of Object.keys(a)) o.includes(e) || (s[e] = a[e]);
|
|
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",
|
|
894
|
+
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() : "", _ = typeof a.contentMaxWidth == "string" && a.contentMaxWidth.trim() ? a.contentMaxWidth.trim() : "1200px", v = Array.isArray(i.rows) ? i.rows : Array.isArray(r.rows) ? r.rows : Array.isArray(e.rows) ? e.rows : [], y = N(M(v, [a.fontFamily])), b = {
|
|
893
895
|
tablet: [],
|
|
894
896
|
mobile: []
|
|
895
|
-
},
|
|
896
|
-
for (let e of
|
|
897
|
-
let
|
|
897
|
+
}, x = "";
|
|
898
|
+
for (let e of v) x += J(e, b, n);
|
|
899
|
+
let S = b.tablet.length ? `\n ${b.tablet.join("\n ")}` : "", C = b.mobile.length ? `\n ${b.mobile.join("\n ")}` : "", w = `<!DOCTYPE html>
|
|
898
900
|
<html>
|
|
899
901
|
<head>
|
|
900
902
|
<meta charset="utf-8">
|
|
901
903
|
<title>${B(l)}</title>
|
|
904
|
+
${h ? `<meta name="description" content="${B(h)}">` : ""}
|
|
902
905
|
${m ? `<link rel="icon" href="${B(m)}">` : ""}
|
|
906
|
+
<meta property="og:type" content="website">
|
|
907
|
+
<meta property="og:title" content="${B(l)}">
|
|
908
|
+
${h ? `<meta property="og:description" content="${B(h)}">` : ""}
|
|
909
|
+
${g ? `<meta property="og:image" content="${B(g)}">` : ""}
|
|
910
|
+
<meta name="twitter:card" content="${g ? "summary_large_image" : "summary"}">
|
|
911
|
+
<meta name="twitter:title" content="${B(l)}">
|
|
912
|
+
${h ? `<meta name="twitter:description" content="${B(h)}">` : ""}
|
|
913
|
+
${g ? `<meta name="twitter:image" content="${B(g)}">` : ""}
|
|
903
914
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
904
|
-
${
|
|
915
|
+
${y ? `<link rel="stylesheet" href="${y}">` : ""}
|
|
905
916
|
<style>
|
|
906
917
|
/* .plexo-row's own -8px side margins (below) are a gutter-cancelling trick that's always
|
|
907
918
|
harmless under the default max-width wrapper -- centered on any viewport wider than
|
|
@@ -918,7 +929,7 @@ var q = (g) => {
|
|
|
918
929
|
/* Tablet: auto-scaled fonts/heights/spacing (see utilities/responsiveDefaults.ts) and
|
|
919
930
|
any explicit per-element styleTablet/stylesTablet override — columns stay side by
|
|
920
931
|
side at this width. */
|
|
921
|
-
@media (min-width: 769px) and (max-width: 1024px) {${
|
|
932
|
+
@media (min-width: 769px) and (max-width: 1024px) {${S}
|
|
922
933
|
}
|
|
923
934
|
@media (max-width: 768px) {
|
|
924
935
|
.plexo-row {
|
|
@@ -928,17 +939,17 @@ var q = (g) => {
|
|
|
928
939
|
width: 100% !important;
|
|
929
940
|
max-width: 100% !important;
|
|
930
941
|
margin-bottom: var(--plexo-col-gap, 16px);
|
|
931
|
-
}${
|
|
942
|
+
}${C}
|
|
932
943
|
}
|
|
933
944
|
</style>
|
|
934
945
|
${f ? `<style>\n${f}\n </style>` : ""}
|
|
935
946
|
</head>
|
|
936
947
|
<body${u}${d} style="${c}">
|
|
937
|
-
<div style="max-width: ${
|
|
938
|
-
return
|
|
948
|
+
<div style="max-width: ${_}; margin: 0 auto; width: 100%;">`;
|
|
949
|
+
return w += x, w += `\n </div>
|
|
939
950
|
${p ? ` <script>\n${p}\n <\/script>` : ""}
|
|
940
951
|
</body>
|
|
941
|
-
</html>`,
|
|
952
|
+
</html>`, w = w.replace(/<span[^>]*data-merge-val="([^"]*)"[^>]*>[\s\S]*?<\/span>/gi, "$1"), w;
|
|
942
953
|
};
|
|
943
954
|
function X(e) {
|
|
944
955
|
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-D9cZiMRQ.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-BDiv8Bkr.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-D9cZiMRQ.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";
|
|
@@ -1895,7 +1895,7 @@ async function Tt(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-DQvN8hjF.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
|
|
@@ -9860,6 +9860,28 @@ var gd = ({ activeTab: e, setActiveTab: t, showSaveButton: n, isSavingLayout: r,
|
|
|
9860
9860
|
className: "text-[8.5px] text-slate-500 block leading-normal mt-0.5",
|
|
9861
9861
|
children: "Sets the HTML <title> tag in the exported page."
|
|
9862
9862
|
}),
|
|
9863
|
+
/* @__PURE__ */ F("div", {
|
|
9864
|
+
className: "mt-3",
|
|
9865
|
+
children: [/* @__PURE__ */ P(d, {
|
|
9866
|
+
label: "Meta Description",
|
|
9867
|
+
value: e.body.style.metaDescription || "",
|
|
9868
|
+
onChange: (e) => t({ metaDescription: e })
|
|
9869
|
+
}), /* @__PURE__ */ P("span", {
|
|
9870
|
+
className: "text-[8.5px] text-slate-500 block leading-normal mt-0.5",
|
|
9871
|
+
children: "Shown under the page title in search results and link previews (Slack, WhatsApp, iMessage). Aim for one or two sentences."
|
|
9872
|
+
})]
|
|
9873
|
+
}),
|
|
9874
|
+
/* @__PURE__ */ F("div", {
|
|
9875
|
+
className: "mt-3",
|
|
9876
|
+
children: [/* @__PURE__ */ P(d, {
|
|
9877
|
+
label: "Social Share Image URL",
|
|
9878
|
+
value: e.body.style.ogImageUrl || "",
|
|
9879
|
+
onChange: (e) => t({ ogImageUrl: e })
|
|
9880
|
+
}), /* @__PURE__ */ P("span", {
|
|
9881
|
+
className: "text-[8.5px] text-slate-500 block leading-normal mt-0.5",
|
|
9882
|
+
children: "The image shown when this page is shared — social apps and chat previews. A wide image (1200×630) works best."
|
|
9883
|
+
})]
|
|
9884
|
+
}),
|
|
9863
9885
|
/* @__PURE__ */ F("div", {
|
|
9864
9886
|
className: "flex items-center gap-2 mt-3 mb-1",
|
|
9865
9887
|
children: [e.body.style.favicon ? /* @__PURE__ */ P("img", {
|
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-BDiv8Bkr.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.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.g.circle.rect.line.polyline.polygon.ellipse.defs.lineargradient.radialgradient.stop.clippath.use.text.tspan".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.cx.cy.r.rx.ry.x1.y1.x2.y2.points.transform.stroke-width.stroke-linecap.stroke-linejoin.stroke-dasharray.opacity.stop-color.stop-opacity.offset.clip-path.gradientunits.preserveaspectratio.text-anchor.dominant-baseline.font-size.letter-spacing.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.g.circle.rect.line.polyline.polygon.ellipse.defs.lineargradient.radialgradient.stop.clippath.use.text.tspan".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.property.cx.cy.r.rx.ry.x1.y1.x2.y2.points.transform.stroke-width.stroke-linecap.stroke-linejoin.stroke-dasharray.opacity.stop-color.stop-opacity.offset.clip-path.gradientunits.preserveaspectratio.text-anchor.dominant-baseline.font-size.letter-spacing.data-*".split("."), sr = [
|
|
5047
5047
|
"javascript:",
|
|
5048
5048
|
"vbscript:",
|
|
5049
5049
|
"data:"
|
package/package.json
CHANGED