@charisol/plexo-sdk 1.4.6 → 1.4.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@charisol/plexo-sdk",
3
3
  "private": false,
4
- "version": "1.4.6",
4
+ "version": "1.4.7",
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",
@@ -1,261 +0,0 @@
1
- import { d as e, f as t, g as n, h as r, j as i, k as a, m as o, o as s, p as c, t as l, u, v as d, y as f } from "./iconSvgStatic-CBYk07ko.js";
2
- //#region src/utilities/instrumentation.ts
3
- var p = "plexo-node", m = "plexo-row", h = "plexo-col";
4
- function g(e) {
5
- return `plexo-node-${e}`;
6
- }
7
- //#endregion
8
- //#region src/utilities/compilerClient.ts
9
- var _ = "https://cdn.jsdelivr.net/npm/@charisol/plexo-sdk@latest/dist/social-icons", v = /* @__PURE__ */ new Set([
10
- "selectable",
11
- "draggable",
12
- "duplicatable",
13
- "deletable",
14
- "hideable",
15
- "locked"
16
- ]), y = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), b = (e = {}) => Object.entries(e).filter(([, e]) => e != null && String(e).trim() !== "").map(([e, t]) => `${e.replace(/([A-Z])/g, "-$1").toLowerCase()}:${String(t)};`).join(""), x = (...e) => e.map((e) => String(e ?? "").trim()).filter(Boolean).join(" "), S = (e, t, n, r) => n ? x(e, p, g(t), r) : e, C = (e, t, n) => {
17
- let r = S("", e, t, n);
18
- return r ? ` css-class="${y(r)}"` : "";
19
- }, w = (e, t, n) => {
20
- let r = S("", e, t, n);
21
- return r ? ` class="${y(r)}"` : "";
22
- }, T = (e, t) => {
23
- let n = { ...e.attributes || {} };
24
- if (t === "email") for (let e of v) delete n[e];
25
- return n;
26
- }, E = (e, t, n) => {
27
- let r = T(e, t), i = b(e.style || {}), a = S(x(r.htmlClassNames, r.htmlClass, r.validationClass, r.validationClassName), e.id, t === "landing_page" && n), o = y(r.name || r.fieldName || "field"), s = y(r.placeholder || ""), c = r.required ? " required" : "";
28
- if (t === "email") return `<mj-table${C(e.id, n)}><tr><td style="padding:10px 12px;border:1px solid #d1d5db;border-radius:6px;color:#64748b;${i}">${s || o}</td></tr></mj-table>`;
29
- let l = y(r.inputType || r.type || (e.type === "input" ? r.kind || "text" : e.type)), u = r.htmlId ? ` id="${y(r.htmlId)}"` : "", d = a ? ` class="${y(a)}"` : "";
30
- return e.type === "textarea" ? `<textarea${u}${d} name="${o}" placeholder="${s}" style="${i}"${c}>${y(r.value || "")}</textarea>` : e.type === "select" ? `<select${u}${d} name="${o}" style="${i}"${c}>${(r.options || []).map((e) => `<option value="${y(e.value)}">${y(e.label)}</option>`).join("")}</select>` : `<input${u}${d} type="${l}" name="${o}" placeholder="${s}" value="${y(r.value || "")}" style="${i}"${c} />`;
31
- }, D = (e, t, n) => {
32
- let r = T(e, t), i = b(e.style || {}), a = S(x(r.htmlClassNames, r.htmlClass), e.id, t === "landing_page" && n), o = r.htmlId ? ` id="${y(r.htmlId)}"` : "", s = a ? ` class="${y(a)}"` : "", c = y(r.actionUrl || r.action || "#"), l = y(r.method || "POST"), u = r.fields || [], d = y(r.submitLabel || "Submit");
33
- return t === "email" ? `<mj-table${C(e.id, n)}><tr><td style="${i}"><table role="presentation" width="100%">${u.map((e) => `<tr><td style="padding:8px 0;font-family:Arial,sans-serif;color:#334155;"><strong>${y(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;">${y(e.placeholder || "") || "&nbsp;"}</span></td></tr>`).join("")}<tr><td style="padding-top:12px;"><a href="${y(r.href || r.submitHref || "#")}" style="display:inline-block;padding:10px 16px;background:#0f172a;color:#ffffff;text-decoration:none;border-radius:6px;">${d}</a></td></tr></table></td></tr></mj-table>` : `<form${o}${s} action="${c}" method="${l}" style="${i}">${u.map((t) => E({
34
- id: `${e.id}-${String(t.name || t.label || "field")}`,
35
- type: t.kind === "textarea" || t.kind === "select" ? t.kind : "input",
36
- style: {
37
- ...e.style || {},
38
- ...t.style || {}
39
- },
40
- attributes: t
41
- }, "landing_page", n)).join("")}<button type="submit">${d}</button></form>`;
42
- }, O = [], k = !1, A = 148, j = [
43
- ["borderRadius", "border-radius"],
44
- ["borderWidth", "border-width"],
45
- ["borderStyle", "border-style"],
46
- ["borderColor", "border-color"],
47
- ["boxShadow", "box-shadow"]
48
- ], M = (e, t, n = []) => {
49
- let r = [...j.filter(([t]) => e[t]).map(([t, n]) => `${n}: ${y(String(e[t]))}`), ...n];
50
- if (r.length === 0) return "";
51
- let i = `plexo-extra-style-${t}`;
52
- return O.push(`.${i} { ${r.join("; ")}; }`), i;
53
- }, N = (e = {}, t = {}) => {
54
- let n = ["padding=\"0\""], r = e.fontSize || t.fontSize, i = e.fontWeight || t.fontWeight;
55
- return r && n.push(`font-size="${y(String(r))}"`), i && n.push(`font-weight="${y(String(i))}"`), e.color && n.push(`color="${y(String(e.color))}"`), e.fontFamily && n.push(`font-family="${y(String(e.fontFamily))}"`), e.lineHeight && n.push(`line-height="${y(String(e.lineHeight))}"`), e.letterSpacing && n.push(`letter-spacing="${y(String(e.letterSpacing))}"`), n.join(" ");
56
- }, P = (e = {}) => {
57
- let t = e.backgroundColor || e.background;
58
- return t ? ` background-color="${y(String(t))}"` : "";
59
- }, F = (e, t, n) => {
60
- if (e[t]) return String(e[t]);
61
- let [r, i, a, o] = n;
62
- if (e[r] || e[i] || e[a] || e[o]) return `${e[r] || "0px"} ${e[i] || "0px"} ${e[a] || "0px"} ${e[o] || "0px"}`;
63
- }, I = (e = {}) => {
64
- let t = [];
65
- e.backgroundColor && t.push(`background-color="${y(String(e.backgroundColor))}"`), e.color && t.push(`color="${y(String(e.color))}"`), e.fontSize && t.push(`font-size="${y(String(e.fontSize))}"`), e.fontWeight && t.push(`font-weight="${y(String(e.fontWeight))}"`), e.fontFamily && t.push(`font-family="${y(String(e.fontFamily))}"`), e.lineHeight && t.push(`line-height="${y(String(e.lineHeight))}"`), e.letterSpacing && t.push(`letter-spacing="${y(String(e.letterSpacing))}"`), e.textAlign && t.push(`align="${y(String(e.textAlign))}"`);
66
- let n = F(e, "borderRadius", [
67
- "borderTopLeftRadius",
68
- "borderTopRightRadius",
69
- "borderBottomRightRadius",
70
- "borderBottomLeftRadius"
71
- ]);
72
- return n && t.push(`border-radius="${y(n)}"`), t.join(" ");
73
- }, L = (i, d, f) => {
74
- let p = T(i, d), m = b(i.style || {}), h = p.htmlId ? ` id="${y(p.htmlId)}"` : "", g = x(p.htmlClassNames, p.htmlClass, d === "landing_page" && p.hideOnMobile ? "hidden md:block" : ""), v = d === "landing_page" ? S(g, i.id, f) : g, k = v ? ` class="${y(v)}"` : "", A = typeof p.customCss == "string" && p.customCss.trim() ? p.customCss.trim() : "", j = A && d === "landing_page" ? `<style>${A}</style>` : "";
75
- if (i.type === "form_container") return `${j}${D(i, d, f)}`;
76
- if (i.type === "input" || i.type === "select" || i.type === "textarea") return `${j}${E(i, d, f)}`;
77
- if (d === "email") {
78
- if (i.type === "button") {
79
- let e = y(p.href || "#"), t = y(p.text || "Button"), n = s(i).width, r = n === "auto" ? "" : ` width="${y(n)}"`, a = i.style || {}, o = I(a), c = F(a, "padding", [
80
- "paddingTop",
81
- "paddingRight",
82
- "paddingBottom",
83
- "paddingLeft"
84
- ]) || "10px 16px";
85
- return `<mj-button href="${e}" css-class="${S(p.hideOnDesktop ? "desktop-hide" : "", i.id, f)}" padding="0" inner-padding="${y(c)}"${r}${o ? ` ${o}` : ""}>${t}</mj-button>`;
86
- }
87
- if (i.type === "image") {
88
- let e = u(i), t = e.width && e.width !== "100%" ? ` width="${y(e.width)}"` : "", n = e.height && e.height !== "auto" ? ` height="${y(e.height)}"` : "", r = C(i.id, f);
89
- return `<mj-image src="${y(p.src || "")}" alt="${y(p.alt || "")}"${t}${n}${r} />`;
90
- }
91
- if (i.type === "social") {
92
- let e = t(i);
93
- if (!e.length) return "";
94
- let n = i.style || {}, r = n.textAlign === "center" ? "center" : n.textAlign === "right" ? "flex-end" : "flex-start", o = n.iconSpacing || "8px", s = F(n, "padding", [
95
- "paddingTop",
96
- "paddingRight",
97
- "paddingBottom",
98
- "paddingLeft"
99
- ]) || "8px", c = F(n, "margin", [
100
- "marginTop",
101
- "marginRight",
102
- "marginBottom",
103
- "marginLeft"
104
- ]), l = (e) => e === "square" ? "14px" : "9999px", u = e.map((e) => {
105
- let t = `<img src="${`${_}/${a[e.provider] ? e.provider : "fallback"}.png`}" alt="" width="${parseInt(e.size, 10) || 36}" style="display:block;width:60%;height:60%;border:0;" />`;
106
- return `<a href="${y(e.url)}" style="display:inline-flex;align-items:center;justify-content:center;width:${y(e.size)};height:${y(e.size)};background-color:${y(e.backgroundColor)};border-radius:${l(e.iconType)};text-decoration:none;">${t}</a>`;
107
- }).join(""), d = `display:flex;flex-wrap:wrap;justify-content:${r};gap:${y(String(o))};padding:${y(s)};${c ? `margin:${y(c)};` : ""}`;
108
- return `<mj-raw><tr><td style="font-size:16px;"><div${w(i.id, f)} style="${d}">${u}</div></td></tr></mj-raw>`;
109
- }
110
- if (i.type === "menu") {
111
- let t = e(i);
112
- return `<mj-navbar hamburger="hamburger"${C(i.id, f)}>${t.map((e) => `<mj-navbar-link href="${y(e.href)}">${y(e.label)}</mj-navbar-link>`).join("")}</mj-navbar>`;
113
- }
114
- if (i.type === "table") {
115
- let e = c(i), t = i.style || {}, n = `${t.borderWidth || "1px"} ${t.borderStyle || "solid"} ${t.borderColor || "#cbd5e1"}`, r = (r, a, o, s) => {
116
- let c = s ? "th" : "td", l = s ? t.headerBgColor || "#f8fafc" : e.striped && a % 2 == 1 ? "#f8fafc" : t.contentBgColor || "#ffffff", u = s ? t.headerTextColor || "#1e293b" : t.contentTextColor || "#475569";
117
- return `<tr>${r.map((e, r) => {
118
- let a = f ? ` data-plexo-cell="${y(i.id)}|${o}-${r}"` : "";
119
- return `<${c}${a} style="padding: ${t.cellPadding || "8px"}; border: ${n}; background-color: ${l}; color: ${u};">${y(e) || "&nbsp;"}</${c}>`;
120
- }).join("")}</tr>`;
121
- }, a = +!!e.enableHeader, o = e.enableFooter ? e.cells.length - 1 : e.cells.length, s = e.enableHeader && e.cells.length > 0 ? `<thead>${r(e.cells[0], 0, 0, !0)}</thead>` : "", l = e.cells.slice(a, Math.max(a, o)).map((e, t) => r(e, t, a + t, !1)).join(""), u = e.enableFooter && e.cells.length > a ? `<tfoot>${r(e.cells[e.cells.length - 1], e.cells.length - 1, e.cells.length - 1, !1)}</tfoot>` : "";
122
- return `<mj-table${C(i.id, f)}><table role="presentation" style="border-collapse: collapse; width: 100%;">${s}<tbody>${l}</tbody>${u}</table></mj-table>`;
123
- }
124
- if (i.type === "video") {
125
- let e = n(p.videoUrl), t = p.linkType === "email" ? `mailto:${p.href || ""}` : p.href || p.videoUrl || "#", r = C(i.id, f);
126
- return `<mj-image src="${y(e.thumbnailUrl)}" href="${y(t)}" alt="${y(p.alt || "Video preview")}"${r} />`;
127
- }
128
- if (i.type === "timer") {
129
- let e = r(p.targetDate, p.timezone), t = p.showLabels !== !1;
130
- return `<mj-text align="center"${C(i.id, f)}><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 ${y(p.targetDate || "")}</div>` : ""}</mj-text>`;
131
- }
132
- if (i.type === "carousel") {
133
- let e = Array.isArray(p.images) ? p.images : [], t = C(i.id, f);
134
- return e.length === 0 ? `<mj-text align="center"${t}>No images in carousel</mj-text>` : `<mj-carousel${t}>${e.map((e) => `<mj-carousel-image src="${y(e.src)}" alt="${y(e.alt || "")}" />`).join("")}</mj-carousel>`;
135
- }
136
- if (i.type === "icon") {
137
- let e = parseInt(String(p.iconSize || 48), 10) || 48, t = i.style?.color || "#1e293b", n = l(p.iconName, e, t);
138
- return `<mj-text align="center"${C(i.id, f)}>${n}</mj-text>`;
139
- }
140
- let d = S(p.hideOnDesktop ? "desktop-hide" : "", i.id, f);
141
- if (i.type === "heading" || i.type === "paragraph" || i.type === "text") {
142
- let e = i.type === "heading" ? {
143
- fontSize: "24px",
144
- fontWeight: "700"
145
- } : { fontSize: "14px" }, t = i.style || {}, n = N(t, e), r = o(i).autoWidth, a = String(p.boxAlign || "left"), s = /* @__PURE__ */ new Set([
146
- "fontSize",
147
- "fontWeight",
148
- "color",
149
- "fontFamily",
150
- "lineHeight",
151
- "letterSpacing",
152
- "textAlign"
153
- ]), c = Object.entries(t).filter(([e, t]) => !s.has(e) && e !== "width" && t != null && t !== "").map(([e, t]) => `${e.replace(/([A-Z])/g, "-$1").toLowerCase()}: ${y(String(t))}`);
154
- r ? c.push("display: inline-block") : t.width && c.push(`width: ${y(String(t.width))}`), t.height && c.push("overflow: hidden"), (t.textAlign || a !== "left") && c.push(`text-align: ${y(String(t.textAlign || "left"))} !important`);
155
- let l = "";
156
- c.length > 0 && (l = `plexo-textbox-${i.id}`, O.push(`.${l} > div { ${c.join("; ")}; }`));
157
- let u = x(l, d);
158
- return `<mj-text${n ? ` ${n}` : ""} align="${y(a)}" css-class="${u}">${p.text || ""}</mj-text>`;
159
- }
160
- if (i.type === "spacer") {
161
- let e = i.style?.height || "24px", t = C(i.id, f);
162
- return `<mj-spacer height="${y(String(e))}"${t} />`;
163
- }
164
- if (i.type === "divider") {
165
- let e = i.style || {}, t = C(i.id, f);
166
- return `<mj-divider border-width="${y(String(e.borderWidth || "1px"))}" border-style="${y(String(e.borderStyle || "solid"))}" border-color="${y(String(e.borderColor || "#334155"))}"${t} />`;
167
- }
168
- return i.type === "card" ? `<mj-text css-class="${d}"><strong style="display:block;margin-bottom:8px;">${y(p.title || "Card Title")}</strong><span style="font-size:14px;color:#64748b;">${y(p.description || "Card description.")}</span></mj-text>` : i.type === "html" ? `<mj-text css-class="${d}">${p.htmlContent || p.text || ""}</mj-text>` : `<mj-text${h}${k} css-class="${d}">${y(p.text || p.htmlContent || "")}</mj-text>`;
169
- }
170
- if (i.type === "heading" || i.type === "paragraph" || i.type === "text") {
171
- let e = i.style || {}, t = o(i).autoWidth, n = String(p.boxAlign || "left"), r = b(t ? Object.fromEntries(Object.entries(e).filter(([e]) => e !== "width")) : e), a = t || !!e.width, s = a ? "display:inline-block;" : "", c = i.type === "heading" ? "h2" : "p", l = i.type === "heading" ? "Heading" : "", u = `${j}<${c}${h}${k} style="${s}${r}">${y(p.text || l)}</${c}>`;
172
- return a ? `<div style="text-align:${y(n)};">${u}</div>` : u;
173
- }
174
- switch (i.type) {
175
- case "button": return `${j}<a${h}${k} href="${y(p.href || "#")}" style="${m}">${y(p.text || "Button")}</a>`;
176
- case "image": return `${j}<img${h}${k} src="${y(p.src || "")}" alt="${y(p.alt || "")}" style="${m}" />`;
177
- case "html": return `${j}<div${h}${k} style="${m}">${String(p.htmlContent || "")}</div>`;
178
- case "social": {
179
- let e = i.style || {}, n = t(i), r = e.textAlign === "center" ? "center" : e.textAlign === "right" ? "flex-end" : "flex-start";
180
- return `${j}<div${h}${k} style="${b({
181
- padding: e.padding,
182
- margin: e.margin,
183
- display: "flex",
184
- flexWrap: "wrap",
185
- gap: e.iconSpacing || "8px",
186
- justifyContent: r
187
- })}">${n.map((e) => {
188
- let t = `${_}/${a[e.provider] ? e.provider : "fallback"}.png`, n = b({
189
- width: e.size,
190
- height: e.size,
191
- padding: "8px",
192
- borderRadius: e.iconType === "square" ? "14px" : "9999px",
193
- backgroundColor: e.backgroundColor,
194
- display: "inline-flex",
195
- alignItems: "center",
196
- justifyContent: "center",
197
- overflow: "hidden"
198
- }), r = `<img src="${y(t)}" alt="" width="${parseInt(e.size, 10) || 36}" style="display:block;width:60%;height:60%;border:0;" />`;
199
- return `<a href="${y(e.url)}" style="${n}text-decoration:none;">${r}</a>`;
200
- }).join("")}</div>`;
201
- }
202
- case "menu": {
203
- let t = i.style || {}, n = e(i), r = t.textAlign === "center" ? "center" : t.textAlign === "right" ? "flex-end" : "flex-start";
204
- return `${j}<div${h}${k} style="${b({
205
- ...t,
206
- display: "flex",
207
- flexWrap: "wrap",
208
- gap: "16px",
209
- justifyContent: r
210
- })}">${n.map((e) => `<a href="${y(e.href)}" style="text-decoration:none;color:inherit;font-weight:${y(String(t.fontWeight || 600))};">${y(e.label)}</a>`).join("")}</div>`;
211
- }
212
- case "blog_title":
213
- case "blog_content":
214
- case "blog_featured_image":
215
- case "blog_date":
216
- case "blog_author":
217
- case "blog_categories":
218
- case "blog_comments":
219
- case "blog_post_list": return `${j}<div${h}${k} data-plexo-blog-${i.type.replace(/^blog_/, "").replace(/_([a-z])/g, (e, t) => t.toUpperCase())}="true"${p.prefix ? ` data-plexo-blog-prefix="${y(p.prefix)}"` : ""} style="${m}"></div>`;
220
- case "product":
221
- case "booking":
222
- case "shop_grid":
223
- case "cart_summary":
224
- case "checkout_flow":
225
- case "order_confirmation":
226
- case "order_tracking": return `${j}<div${h}${k} data-plexo-commerce-${i.type.replace(/_([a-z])/g, (e, t) => t.toUpperCase())}="true"${p.productId ? ` data-plexo-product-id="${y(p.productId)}"` : ""}${p.serviceId ? ` data-plexo-service-id="${y(p.serviceId)}"` : ""} style="${m}"></div>`;
227
- default: return `${j}<div${h}${k} style="${m}">${y(p.text || "")}</div>`;
228
- }
229
- }, R = (e, t, n) => {
230
- if (t === "email") {
231
- let r = new Map(e.elements.map((e) => [e.id, e])), a = new Map((Array.isArray(e.nestedRows) ? e.nestedRows : []).map((e) => [e.id, e])), o = i(e).map((e) => {
232
- let i = r.get(e);
233
- if (i) return L(i, t, n);
234
- let o = a.get(e);
235
- return o ? `<mj-raw><tr><td style="font-size:16px;">${z(o, "landing_page", n)}</td></tr></mj-raw>` : "";
236
- }).join(""), s = P(e.styles || {}), c = e.elements.length === 0 && (!Array.isArray(e.nestedRows) || e.nestedRows.length === 0), l = x(k && c ? M({}, e.id, [`min-height: ${A}px`]) : "", S("", e.id, n, h)), u = l ? ` css-class="${y(l)}"` : "";
237
- return `<mj-column width="${y(e.width || "100%")}" padding="0"${s}${u}>${o}</mj-column>`;
238
- }
239
- let r = b(e.styles || {}), a = new Map(e.elements.map((e) => [e.id, e])), o = new Map((Array.isArray(e.nestedRows) ? e.nestedRows : []).map((e) => [e.id, e])), s = i(e).map((e) => {
240
- let r = a.get(e);
241
- if (r) return L(r, t, n);
242
- let i = o.get(e);
243
- return i ? z(i, t, n) : "";
244
- }).join(""), c = w(e.id, n, h), l = e.elements.length === 0 && (!Array.isArray(e.nestedRows) || e.nestedRows.length === 0), u = k && l ? `min-height: ${A}px;` : "";
245
- return `<div${c} style="width:${y(e.width || "100%")};${u}${r}">${s}</div>`;
246
- }, z = (e, t, n) => {
247
- if (t === "email") return `<mj-section css-class="${S(e.style?.hideOnDesktop ? "desktop-hide" : "", e.id, n, m)}"${P(e.style || {})} padding="0">${e.columns.map((e) => R(e, t, n)).join("")}</mj-section>`;
248
- let r = b(e.style || {}), i = e.columns.map((e) => R(e, t, n)).join("");
249
- return `<section${w(e.id, n, m)} style="display:flex;flex-wrap:wrap;${r}">${i}</section>`;
250
- }, B = (e, t, n) => {
251
- let r = n?.instrument ?? !1;
252
- O = [], k = n?.canvasEditorPadding ?? !1;
253
- let i = (e.body?.rows || []).map((e) => z(e, t, r)).join(""), a = b(e.body?.style || {});
254
- if (t === "email") {
255
- let t = O.length > 0 ? ` ${O.join(" ")}` : "", n = d(f(e.body?.rows, [e.body?.style?.fontFamily]));
256
- return `<mjml><mj-head>${n ? `<mj-font name="PlexoGoogleFonts" href="${y(n)}" />` : ""}<mj-style>.desktop-hide { display:none !important; max-height:0; overflow:hidden; }${t}</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>${i}</mj-body></mjml>`.replace(/<span[^>]*data-merge-val="([^"]*)"[^>]*>[\s\S]*?<\/span>/gi, "$1");
257
- }
258
- return `<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /></head><body style="${a}"><main>${i}</main></body></html>`;
259
- };
260
- //#endregion
261
- export { B as t };
@@ -1,17 +0,0 @@
1
- /**
2
- * Recursively walks a template's rows/columns/elements (including nested rows) and
3
- * collects every distinct `style.fontFamily` value in use, plus any extra values
4
- * passed in (e.g. the document/body-level font family).
5
- */
6
- export declare function collectFontFamilyValues(rows: any[] | undefined, extra?: Array<string | undefined>): Set<string>;
7
- /**
8
- * Builds a single batched Google Fonts stylesheet URL for whichever of the given
9
- * `font-family` CSS values correspond to an entry in GOOGLE_FONTS_LIST (system
10
- * fallbacks like `sans-serif` are skipped since they need no download).
11
- *
12
- * Uses the legacy `css?family=` endpoint rather than `css2` on purpose: it silently
13
- * drops weight requests a family doesn't actually offer instead of 400ing the whole
14
- * batched request, which matters here since GOOGLE_FONTS_LIST spans ~80 families
15
- * (some display/handwriting fonts only ship a single 400 weight) requested together.
16
- */
17
- export declare function buildGoogleFontsHref(fontFamilyValues: Iterable<string>): string | null;