@charisol/plexo-sdk 1.1.14 → 1.1.16
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-1K7XytEa.js → compiler-Dr4lNAM3.js} +213 -213
- package/dist/compiler.js +1 -1
- package/dist/compilerClient.js +57 -57
- package/dist/components/icons.d.ts +65 -66
- package/dist/{iconSvgStatic-CUYMC8Am.js → iconSvgStatic-D04qA352.js} +66 -48
- package/dist/index.js +14897 -14880
- package/dist/utilities/elementResolvers.d.ts +17 -4
- package/dist/utilities/strataTokenMapping.d.ts +1 -1
- package/package.json +1 -1
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-
|
|
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-Dr4lNAM3.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 };
|
package/dist/compilerClient.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as e, g as t, h as n, m as r, o as i, p as a, t as o, u as s, x as c, y as l } from "./iconSvgStatic-D04qA352.js";
|
|
2
2
|
//#region src/utilities/compilerClient.ts
|
|
3
3
|
var u = "https://cdn.jsdelivr.net/npm/@charisol/plexo-sdk@latest/dist/social-icons", d = /* @__PURE__ */ new Set([
|
|
4
4
|
"selectable",
|
|
@@ -47,86 +47,86 @@ var u = "https://cdn.jsdelivr.net/npm/@charisol/plexo-sdk@latest/dist/social-ico
|
|
|
47
47
|
"borderBottomLeftRadius"
|
|
48
48
|
]);
|
|
49
49
|
return n && t.push(`border-radius="${f(n)}"`), t.join(" ");
|
|
50
|
-
}, S = (
|
|
51
|
-
let y = h(
|
|
52
|
-
if (
|
|
53
|
-
if (
|
|
50
|
+
}, S = (c, d) => {
|
|
51
|
+
let y = h(c, d), S = p(c.style || {}), C = y.htmlId ? ` id="${f(y.htmlId)}"` : "", w = m(y.htmlClassNames, y.htmlClass, d === "landing_page" && y.hideOnMobile ? "hidden md:block" : ""), T = w ? ` class="${f(w)}"` : "", E = typeof y.customCss == "string" && y.customCss.trim() ? y.customCss.trim() : "", D = E && d === "landing_page" ? `<style>${E}</style>` : "";
|
|
52
|
+
if (c.type === "form_container") return `${D}${_(c, d)}`;
|
|
53
|
+
if (c.type === "input" || c.type === "select" || c.type === "textarea") return `${D}${g(c, d)}`;
|
|
54
54
|
if (d === "email") {
|
|
55
|
-
if (
|
|
56
|
-
let
|
|
55
|
+
if (c.type === "button") {
|
|
56
|
+
let e = f(y.href || "#"), t = f(y.text || "Button"), n = i(c).width, r = n === "auto" ? "" : ` width="${f(n)}"`, a = c.style || {}, o = x(a), s = b(a, "padding", [
|
|
57
57
|
"paddingTop",
|
|
58
58
|
"paddingRight",
|
|
59
59
|
"paddingBottom",
|
|
60
60
|
"paddingLeft"
|
|
61
61
|
]) || "10px 16px";
|
|
62
|
-
return `<mj-button href="${
|
|
62
|
+
return `<mj-button href="${e}" css-class="${y.hideOnDesktop ? "desktop-hide" : ""}" padding="0" inner-padding="${f(s)}"${r}${o ? ` ${o}` : ""}>${t}</mj-button>`;
|
|
63
63
|
}
|
|
64
|
-
if (
|
|
65
|
-
let e =
|
|
66
|
-
return `<mj-image src="${f(y.src || "")}" alt="${f(y.alt || "")}"${
|
|
64
|
+
if (c.type === "image") {
|
|
65
|
+
let e = s(c), t = e.width && e.width !== "100%" ? ` width="${f(e.width)}"` : "", n = e.height && e.height !== "auto" ? ` height="${f(e.height)}"` : "";
|
|
66
|
+
return `<mj-image src="${f(y.src || "")}" alt="${f(y.alt || "")}"${t}${n} />`;
|
|
67
67
|
}
|
|
68
|
-
if (
|
|
69
|
-
let e =
|
|
68
|
+
if (c.type === "social") {
|
|
69
|
+
let e = a(c);
|
|
70
70
|
if (!e.length) return "";
|
|
71
|
-
let
|
|
71
|
+
let t = c.style || {}, n = t.textAlign === "center" ? "center" : t.textAlign === "right" ? "flex-end" : "flex-start", r = t.iconSpacing || "8px", i = b(t, "padding", [
|
|
72
72
|
"paddingTop",
|
|
73
73
|
"paddingRight",
|
|
74
74
|
"paddingBottom",
|
|
75
75
|
"paddingLeft"
|
|
76
|
-
]) || "8px",
|
|
76
|
+
]) || "8px", o = b(t, "margin", [
|
|
77
77
|
"marginTop",
|
|
78
78
|
"marginRight",
|
|
79
79
|
"marginBottom",
|
|
80
80
|
"marginLeft"
|
|
81
|
-
]),
|
|
81
|
+
]), s = (e) => e === "square" ? "14px" : "9999px", d = e.map((e) => {
|
|
82
82
|
let t = `<img src="${`${u}/${l[e.provider] ? e.provider : "fallback"}.png`}" alt="" width="${parseInt(e.size, 10) || 36}" style="display:block;width:60%;height:60%;border:0;" />`;
|
|
83
|
-
return `<a href="${f(e.url)}" style="display:inline-flex;align-items:center;justify-content:center;width:${f(e.size)};height:${f(e.size)};background-color:${f(e.backgroundColor)};border-radius:${
|
|
83
|
+
return `<a href="${f(e.url)}" style="display:inline-flex;align-items:center;justify-content:center;width:${f(e.size)};height:${f(e.size)};background-color:${f(e.backgroundColor)};border-radius:${s(e.iconType)};text-decoration:none;">${t}</a>`;
|
|
84
84
|
}).join("");
|
|
85
|
-
return `<mj-raw><div style="${`display:flex;flex-wrap:wrap;justify-content:${
|
|
85
|
+
return `<mj-raw><div style="${`display:flex;flex-wrap:wrap;justify-content:${n};gap:${f(String(r))};padding:${f(i)};${o ? `margin:${f(o)};` : ""}`}">${d}</div></mj-raw>`;
|
|
86
86
|
}
|
|
87
|
-
if (
|
|
88
|
-
if (
|
|
89
|
-
let e =
|
|
90
|
-
let o = a ? "th" : "td", s = a ?
|
|
91
|
-
return `<tr>${
|
|
87
|
+
if (c.type === "menu") return `<mj-navbar hamburger="hamburger">${e(c).map((e) => `<mj-navbar-link href="${f(e.href)}">${f(e.label)}</mj-navbar-link>`).join("")}</mj-navbar>`;
|
|
88
|
+
if (c.type === "table") {
|
|
89
|
+
let e = r(c), t = c.style || {}, n = `${t.borderWidth || "1px"} ${t.borderStyle || "solid"} ${t.borderColor || "#cbd5e1"}`, i = (r, i, a) => {
|
|
90
|
+
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";
|
|
91
|
+
return `<tr>${r.map((e) => `<${o} style="padding: ${t.cellPadding || "8px"}; border: ${n}; background-color: ${s}; color: ${c};">${f(e) || " "}</${o}>`).join("")}</tr>`;
|
|
92
92
|
}, a = +!!e.enableHeader, o = e.enableFooter ? e.cells.length - 1 : e.cells.length;
|
|
93
93
|
return `<mj-table><table role="presentation" style="border-collapse: collapse; width: 100%;">${e.enableHeader && e.cells.length > 0 ? `<thead>${i(e.cells[0], 0, !0)}</thead>` : ""}<tbody>${e.cells.slice(a, Math.max(a, o)).map((e, t) => i(e, t, !1)).join("")}</tbody>${e.enableFooter && e.cells.length > a ? `<tfoot>${i(e.cells[e.cells.length - 1], e.cells.length - 1, !1)}</tfoot>` : ""}</table></mj-table>`;
|
|
94
94
|
}
|
|
95
|
-
if (
|
|
96
|
-
let e =
|
|
97
|
-
return `<mj-image src="${f(e.thumbnailUrl)}" href="${f(
|
|
95
|
+
if (c.type === "video") {
|
|
96
|
+
let e = t(y.videoUrl), n = y.linkType === "email" ? `mailto:${y.href || ""}` : y.href || y.videoUrl || "#";
|
|
97
|
+
return `<mj-image src="${f(e.thumbnailUrl)}" href="${f(n)}" alt="${f(y.alt || "Video preview")}" />`;
|
|
98
98
|
}
|
|
99
|
-
if (
|
|
100
|
-
let e =
|
|
99
|
+
if (c.type === "timer") {
|
|
100
|
+
let e = n(y.targetDate), t = y.showLabels !== !1;
|
|
101
101
|
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 ${f(y.targetDate || "")}</div>` : ""}</mj-text>`;
|
|
102
102
|
}
|
|
103
|
-
if (
|
|
103
|
+
if (c.type === "carousel") {
|
|
104
104
|
let e = Array.isArray(y.images) ? y.images : [];
|
|
105
105
|
return e.length === 0 ? "<mj-text align=\"center\">No images in carousel</mj-text>" : `<mj-carousel>${e.map((e) => `<mj-carousel-image src="${f(e.src)}" alt="${f(e.alt || "")}" />`).join("")}</mj-carousel>`;
|
|
106
106
|
}
|
|
107
|
-
if (
|
|
108
|
-
let e = parseInt(String(y.iconSize || 48), 10) || 48,
|
|
109
|
-
return `<mj-text align="center">${
|
|
107
|
+
if (c.type === "icon") {
|
|
108
|
+
let e = parseInt(String(y.iconSize || 48), 10) || 48, t = c.style?.color || "#1e293b";
|
|
109
|
+
return `<mj-text align="center">${o(y.iconName, e, t)}</mj-text>`;
|
|
110
110
|
}
|
|
111
111
|
let d = y.hideOnDesktop ? "desktop-hide" : "";
|
|
112
|
-
if (
|
|
113
|
-
let e =
|
|
112
|
+
if (c.type === "heading" || c.type === "paragraph" || c.type === "text") {
|
|
113
|
+
let e = c.type === "heading" ? {
|
|
114
114
|
fontSize: "24px",
|
|
115
115
|
fontWeight: "700"
|
|
116
|
-
} : { fontSize: "14px" },
|
|
117
|
-
return `<mj-text${
|
|
116
|
+
} : { fontSize: "14px" }, t = v(c.style || {}, e);
|
|
117
|
+
return `<mj-text${t ? ` ${t}` : ""} css-class="${d}">${y.text || ""}</mj-text>`;
|
|
118
118
|
}
|
|
119
|
-
if (
|
|
120
|
-
let e =
|
|
119
|
+
if (c.type === "spacer") {
|
|
120
|
+
let e = c.style?.height || "24px";
|
|
121
121
|
return `<mj-spacer height="${f(String(e))}" />`;
|
|
122
122
|
}
|
|
123
|
-
if (
|
|
124
|
-
let e =
|
|
123
|
+
if (c.type === "divider") {
|
|
124
|
+
let e = c.style || {};
|
|
125
125
|
return `<mj-divider border-width="${f(String(e.borderWidth || "1px"))}" border-style="${f(String(e.borderStyle || "solid"))}" border-color="${f(String(e.borderColor || "#334155"))}" />`;
|
|
126
126
|
}
|
|
127
|
-
return
|
|
127
|
+
return c.type === "card" ? `<mj-text css-class="${d}"><strong style="display:block;margin-bottom:8px;">${f(y.title || "Card Title")}</strong><span style="font-size:14px;color:#64748b;">${f(y.description || "Card description.")}</span></mj-text>` : c.type === "html" ? `<mj-text css-class="${d}">${y.htmlContent || y.text || ""}</mj-text>` : `<mj-text${C}${T} css-class="${d}">${f(y.text || y.htmlContent || "")}</mj-text>`;
|
|
128
128
|
}
|
|
129
|
-
switch (
|
|
129
|
+
switch (c.type) {
|
|
130
130
|
case "heading": return `${D}<h2${C}${T} style="${S}">${f(y.text || "Heading")}</h2>`;
|
|
131
131
|
case "paragraph":
|
|
132
132
|
case "text": return `${D}<p${C}${T} style="${S}">${f(y.text || "")}</p>`;
|
|
@@ -140,26 +140,26 @@ var u = "https://cdn.jsdelivr.net/npm/@charisol/plexo-sdk@latest/dist/social-ico
|
|
|
140
140
|
case "blog_author":
|
|
141
141
|
case "blog_categories":
|
|
142
142
|
case "blog_comments":
|
|
143
|
-
case "blog_post_list": return `${D}<div${C}${T} data-plexo-blog-${
|
|
143
|
+
case "blog_post_list": return `${D}<div${C}${T} data-plexo-blog-${c.type.replace(/^blog_/, "").replace(/_([a-z])/g, (e, t) => t.toUpperCase())}="true"${y.prefix ? ` data-plexo-blog-prefix="${f(y.prefix)}"` : ""} style="${S}"></div>`;
|
|
144
144
|
default: return `${D}<div${C}${T} style="${S}">${f(y.text || "")}</div>`;
|
|
145
145
|
}
|
|
146
|
-
}, C = (e,
|
|
147
|
-
if (
|
|
148
|
-
let
|
|
149
|
-
let
|
|
150
|
-
if (
|
|
151
|
-
let a =
|
|
146
|
+
}, C = (e, t) => {
|
|
147
|
+
if (t === "email") {
|
|
148
|
+
let n = new Map(e.elements.map((e) => [e.id, e])), r = new Map((Array.isArray(e.nestedRows) ? e.nestedRows : []).map((e) => [e.id, e])), i = c(e).map((e) => {
|
|
149
|
+
let i = n.get(e);
|
|
150
|
+
if (i) return S(i, t);
|
|
151
|
+
let a = r.get(e);
|
|
152
152
|
return a ? `<mj-raw>${w(a, "landing_page")}</mj-raw>` : "";
|
|
153
|
-
}).join(""),
|
|
154
|
-
return `<mj-column width="${f(e.width || "100%")}"${
|
|
153
|
+
}).join(""), a = y(e.styles || {});
|
|
154
|
+
return `<mj-column width="${f(e.width || "100%")}"${a}>${i}</mj-column>`;
|
|
155
155
|
}
|
|
156
|
-
let
|
|
157
|
-
let
|
|
158
|
-
if (
|
|
159
|
-
let
|
|
160
|
-
return
|
|
156
|
+
let n = p(e.styles || {}), r = new Map(e.elements.map((e) => [e.id, e])), i = new Map((Array.isArray(e.nestedRows) ? e.nestedRows : []).map((e) => [e.id, e])), a = c(e).map((e) => {
|
|
157
|
+
let n = r.get(e);
|
|
158
|
+
if (n) return S(n, t);
|
|
159
|
+
let a = i.get(e);
|
|
160
|
+
return a ? w(a, t) : "";
|
|
161
161
|
}).join("");
|
|
162
|
-
return `<div style="width:${f(e.width || "100%")};${
|
|
162
|
+
return `<div style="width:${f(e.width || "100%")};${n}">${a}</div>`;
|
|
163
163
|
}, w = (e, t) => t === "email" ? `<mj-section css-class="${e.style?.hideOnDesktop ? "desktop-hide" : ""}"${y(e.style || {})}>${e.columns.map((e) => C(e, t)).join("")}</mj-section>` : `<section style="display:flex;flex-wrap:wrap;${p(e.style || {})}">${e.columns.map((e) => C(e, t)).join("")}</section>`, T = (e, t) => {
|
|
164
164
|
let n = (e.body?.rows || []).map((e) => w(e, t)).join(""), r = p(e.body?.style || {});
|
|
165
165
|
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"> </mj-text></mj-column></mj-section>${n}</mj-body></mjml>`.replace(/<span[^>]*data-merge-val="([^"]*)"[^>]*>[\s\S]*?<\/span>/gi, "$1") : `<!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>`;
|
|
@@ -1,70 +1,69 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export declare const normalizeSocialProvider: (provider: string) => string;
|
|
3
|
-
export declare const renderSocialIcon: (provider: string, className?: string) =>
|
|
2
|
+
export declare const renderSocialIcon: (provider: string, className?: string) => import("react").JSX.Element;
|
|
4
3
|
export declare const isElementHiddenForView: (attrs: Record<string, any>, deviceView: "desktop" | "tablet" | "mobile" | "custom") => boolean;
|
|
5
4
|
export declare const ICONS: {
|
|
6
|
-
heading:
|
|
7
|
-
paragraph:
|
|
8
|
-
button:
|
|
9
|
-
image:
|
|
10
|
-
divider:
|
|
11
|
-
spacer:
|
|
12
|
-
carousel:
|
|
13
|
-
video:
|
|
14
|
-
social:
|
|
15
|
-
menu:
|
|
16
|
-
html:
|
|
17
|
-
table:
|
|
18
|
-
timer:
|
|
19
|
-
form:
|
|
20
|
-
accordion:
|
|
21
|
-
columns:
|
|
22
|
-
icon:
|
|
23
|
-
row1:
|
|
24
|
-
row2:
|
|
25
|
-
row3:
|
|
26
|
-
contentTab:
|
|
27
|
-
blocksTab:
|
|
28
|
-
bodyTab:
|
|
29
|
-
imagesTab:
|
|
30
|
-
uploadsTab:
|
|
31
|
-
auditTab:
|
|
32
|
-
designTab:
|
|
33
|
-
jsonTab:
|
|
34
|
-
htmlTab:
|
|
35
|
-
plainTab:
|
|
36
|
-
desktop:
|
|
37
|
-
tablet:
|
|
38
|
-
mobile:
|
|
39
|
-
custom:
|
|
40
|
-
trash:
|
|
41
|
-
copy:
|
|
42
|
-
close:
|
|
43
|
-
undo:
|
|
44
|
-
redo:
|
|
45
|
-
eye:
|
|
46
|
-
chevronDown:
|
|
47
|
-
chevronUp:
|
|
48
|
-
alignLeft:
|
|
49
|
-
alignCenter:
|
|
50
|
-
alignRight:
|
|
51
|
-
alignJustify:
|
|
52
|
-
chevron:
|
|
53
|
-
sun:
|
|
54
|
-
moon:
|
|
55
|
-
search:
|
|
56
|
-
alertCircle:
|
|
57
|
-
arrowRight:
|
|
58
|
-
link:
|
|
59
|
-
accessibility:
|
|
60
|
-
settings:
|
|
61
|
-
strataTab:
|
|
62
|
-
blogTitle:
|
|
63
|
-
blogContent:
|
|
64
|
-
blogFeaturedImage:
|
|
65
|
-
blogDate:
|
|
66
|
-
blogAuthor:
|
|
67
|
-
blogCategories:
|
|
68
|
-
blogComments:
|
|
69
|
-
blogPostList:
|
|
5
|
+
heading: import("react").JSX.Element;
|
|
6
|
+
paragraph: import("react").JSX.Element;
|
|
7
|
+
button: import("react").JSX.Element;
|
|
8
|
+
image: import("react").JSX.Element;
|
|
9
|
+
divider: import("react").JSX.Element;
|
|
10
|
+
spacer: import("react").JSX.Element;
|
|
11
|
+
carousel: import("react").JSX.Element;
|
|
12
|
+
video: import("react").JSX.Element;
|
|
13
|
+
social: import("react").JSX.Element;
|
|
14
|
+
menu: import("react").JSX.Element;
|
|
15
|
+
html: import("react").JSX.Element;
|
|
16
|
+
table: import("react").JSX.Element;
|
|
17
|
+
timer: import("react").JSX.Element;
|
|
18
|
+
form: import("react").JSX.Element;
|
|
19
|
+
accordion: import("react").JSX.Element;
|
|
20
|
+
columns: import("react").JSX.Element;
|
|
21
|
+
icon: import("react").JSX.Element;
|
|
22
|
+
row1: import("react").JSX.Element;
|
|
23
|
+
row2: import("react").JSX.Element;
|
|
24
|
+
row3: import("react").JSX.Element;
|
|
25
|
+
contentTab: import("react").JSX.Element;
|
|
26
|
+
blocksTab: import("react").JSX.Element;
|
|
27
|
+
bodyTab: import("react").JSX.Element;
|
|
28
|
+
imagesTab: import("react").JSX.Element;
|
|
29
|
+
uploadsTab: import("react").JSX.Element;
|
|
30
|
+
auditTab: import("react").JSX.Element;
|
|
31
|
+
designTab: import("react").JSX.Element;
|
|
32
|
+
jsonTab: import("react").JSX.Element;
|
|
33
|
+
htmlTab: import("react").JSX.Element;
|
|
34
|
+
plainTab: import("react").JSX.Element;
|
|
35
|
+
desktop: import("react").JSX.Element;
|
|
36
|
+
tablet: import("react").JSX.Element;
|
|
37
|
+
mobile: import("react").JSX.Element;
|
|
38
|
+
custom: import("react").JSX.Element;
|
|
39
|
+
trash: import("react").JSX.Element;
|
|
40
|
+
copy: import("react").JSX.Element;
|
|
41
|
+
close: import("react").JSX.Element;
|
|
42
|
+
undo: import("react").JSX.Element;
|
|
43
|
+
redo: import("react").JSX.Element;
|
|
44
|
+
eye: import("react").JSX.Element;
|
|
45
|
+
chevronDown: import("react").JSX.Element;
|
|
46
|
+
chevronUp: import("react").JSX.Element;
|
|
47
|
+
alignLeft: import("react").JSX.Element;
|
|
48
|
+
alignCenter: import("react").JSX.Element;
|
|
49
|
+
alignRight: import("react").JSX.Element;
|
|
50
|
+
alignJustify: import("react").JSX.Element;
|
|
51
|
+
chevron: import("react").JSX.Element;
|
|
52
|
+
sun: import("react").JSX.Element;
|
|
53
|
+
moon: import("react").JSX.Element;
|
|
54
|
+
search: import("react").JSX.Element;
|
|
55
|
+
alertCircle: import("react").JSX.Element;
|
|
56
|
+
arrowRight: import("react").JSX.Element;
|
|
57
|
+
link: import("react").JSX.Element;
|
|
58
|
+
accessibility: import("react").JSX.Element;
|
|
59
|
+
settings: import("react").JSX.Element;
|
|
60
|
+
strataTab: import("react").JSX.Element;
|
|
61
|
+
blogTitle: import("react").JSX.Element;
|
|
62
|
+
blogContent: import("react").JSX.Element;
|
|
63
|
+
blogFeaturedImage: import("react").JSX.Element;
|
|
64
|
+
blogDate: import("react").JSX.Element;
|
|
65
|
+
blogAuthor: import("react").JSX.Element;
|
|
66
|
+
blogCategories: import("react").JSX.Element;
|
|
67
|
+
blogComments: import("react").JSX.Element;
|
|
68
|
+
blogPostList: import("react").JSX.Element;
|
|
70
69
|
};
|
|
@@ -220,17 +220,17 @@ function i(e) {
|
|
|
220
220
|
//#endregion
|
|
221
221
|
//#region src/utilities/elementResolvers.ts
|
|
222
222
|
var a = (e) => e === "twitter" ? "x" : e, o = (e, t = "currentColor") => `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="${t}" d="${n[a(e)]?.path || "M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z"}"/></svg>`;
|
|
223
|
-
function s(e) {
|
|
224
|
-
let
|
|
225
|
-
return
|
|
226
|
-
let
|
|
223
|
+
function s(e, t) {
|
|
224
|
+
let n = e.attributes || {}, r = e.style || {}, o = Array.isArray(n.links) ? n.links : [], s = n.colorMode === "branded", c = s || !!t?.forceBrandedColor;
|
|
225
|
+
return o.filter((e) => e && typeof e == "object").map((e) => {
|
|
226
|
+
let t = a(String(e.provider || ""));
|
|
227
227
|
return {
|
|
228
|
-
provider:
|
|
228
|
+
provider: t,
|
|
229
229
|
url: typeof e.url == "string" && e.url.trim() ? e.url : "#",
|
|
230
|
-
color:
|
|
231
|
-
backgroundColor:
|
|
232
|
-
size: e.size ||
|
|
233
|
-
iconType: (e.iconType ||
|
|
230
|
+
color: c ? i(t) : e.color || r.iconColor || "#475569",
|
|
231
|
+
backgroundColor: s ? "transparent" : e.backgroundColor || r.iconBackgroundColor || "#f8fafc",
|
|
232
|
+
size: e.size || r.iconSize || "36px",
|
|
233
|
+
iconType: (e.iconType || n.iconType) === "square" ? "square" : "circle"
|
|
234
234
|
};
|
|
235
235
|
});
|
|
236
236
|
}
|
|
@@ -298,8 +298,26 @@ function h(e) {
|
|
|
298
298
|
return t = n, n;
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
function g(e) {
|
|
302
|
+
let t = {};
|
|
303
|
+
for (let n of e) {
|
|
304
|
+
let e = n.name || n.id || "field";
|
|
305
|
+
t[e] = (t[e] || 0) + 1;
|
|
306
|
+
}
|
|
307
|
+
let n = {};
|
|
308
|
+
return e.map((e) => {
|
|
309
|
+
let r = e.name || e.id || "field";
|
|
310
|
+
if (t[r] <= 1) return e;
|
|
311
|
+
n[r] = (n[r] || 0) + 1;
|
|
312
|
+
let i = n[r] === 1 ? r : `${r}-${n[r]}`;
|
|
313
|
+
return {
|
|
314
|
+
...e,
|
|
315
|
+
name: i
|
|
316
|
+
};
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
var _ = (e) => String(Math.max(0, e)).padStart(2, "0");
|
|
320
|
+
function v(e, t, n = Date.now()) {
|
|
303
321
|
let r = e ? Date.parse(e) : NaN, i = Number.isNaN(r) ? n : r, a = i - n;
|
|
304
322
|
if (a <= 0) return {
|
|
305
323
|
days: "00",
|
|
@@ -311,31 +329,31 @@ function _(e, t, n = Date.now()) {
|
|
|
311
329
|
};
|
|
312
330
|
let o = Math.floor(a / 1e3), s = Math.floor(o / 86400), c = Math.floor(o % 86400 / 3600), l = Math.floor(o % 3600 / 60), u = o % 60;
|
|
313
331
|
return {
|
|
314
|
-
days:
|
|
315
|
-
hours:
|
|
316
|
-
minutes:
|
|
317
|
-
seconds:
|
|
332
|
+
days: _(s),
|
|
333
|
+
hours: _(c),
|
|
334
|
+
minutes: _(l),
|
|
335
|
+
seconds: _(u),
|
|
318
336
|
isExpired: !1,
|
|
319
337
|
targetTimestamp: i
|
|
320
338
|
};
|
|
321
339
|
}
|
|
322
|
-
var
|
|
340
|
+
var y = [
|
|
323
341
|
"youtube.com",
|
|
324
342
|
"www.youtube.com",
|
|
325
343
|
"youtu.be",
|
|
326
344
|
"m.youtube.com"
|
|
327
345
|
];
|
|
328
|
-
function
|
|
346
|
+
function b(e) {
|
|
329
347
|
return e.hostname === "youtu.be" ? e.pathname.slice(1).split("/")[0] || null : e.pathname.startsWith("/embed/") ? e.pathname.slice(7).split("/")[0] || null : e.pathname.startsWith("/shorts/") ? e.pathname.slice(8).split("/")[0] || null : e.searchParams.get("v");
|
|
330
348
|
}
|
|
331
|
-
function
|
|
349
|
+
function x(e) {
|
|
332
350
|
let t = e.pathname.match(/(\d+)/);
|
|
333
351
|
return t ? t[1] : null;
|
|
334
352
|
}
|
|
335
|
-
var
|
|
336
|
-
function
|
|
353
|
+
var S = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22640%22%20height%3D%22360%22%20viewBox%3D%220%200%20640%20360%22%3E%3Crect%20width%3D%22640%22%20height%3D%22360%22%20fill%3D%22%230f172a%22%2F%3E%3Ccircle%20cx%3D%22320%22%20cy%3D%22180%22%20r%3D%2248%22%20fill%3D%22%23ffffff%22%20opacity%3D%220.9%22%2F%3E%3Cpath%20d%3D%22M304%20156%20L356%20180%20L304%20204%20Z%22%20fill%3D%22%230f172a%22%2F%3E%3C%2Fsvg%3E";
|
|
354
|
+
function C(e) {
|
|
337
355
|
if (!e || typeof e != "string") return {
|
|
338
|
-
thumbnailUrl:
|
|
356
|
+
thumbnailUrl: S,
|
|
339
357
|
provider: "unknown"
|
|
340
358
|
};
|
|
341
359
|
let t;
|
|
@@ -343,34 +361,34 @@ function S(e) {
|
|
|
343
361
|
t = new URL(e);
|
|
344
362
|
} catch {
|
|
345
363
|
return {
|
|
346
|
-
thumbnailUrl:
|
|
364
|
+
thumbnailUrl: S,
|
|
347
365
|
provider: "unknown"
|
|
348
366
|
};
|
|
349
367
|
}
|
|
350
|
-
if (
|
|
351
|
-
let e =
|
|
368
|
+
if (y.includes(t.hostname)) {
|
|
369
|
+
let e = b(t);
|
|
352
370
|
if (e) return {
|
|
353
371
|
thumbnailUrl: `https://img.youtube.com/vi/${e}/hqdefault.jpg`,
|
|
354
372
|
provider: "youtube"
|
|
355
373
|
};
|
|
356
374
|
}
|
|
357
375
|
if (t.hostname === "vimeo.com" || t.hostname === "www.vimeo.com" || t.hostname === "player.vimeo.com") {
|
|
358
|
-
let e =
|
|
376
|
+
let e = x(t);
|
|
359
377
|
if (e) return {
|
|
360
378
|
thumbnailUrl: `https://vumbnail.com/${e}.jpg`,
|
|
361
379
|
provider: "vimeo"
|
|
362
380
|
};
|
|
363
381
|
}
|
|
364
382
|
return {
|
|
365
|
-
thumbnailUrl:
|
|
383
|
+
thumbnailUrl: S,
|
|
366
384
|
provider: "unknown"
|
|
367
385
|
};
|
|
368
386
|
}
|
|
369
|
-
function
|
|
387
|
+
function w(e, t) {
|
|
370
388
|
let n = e || "Star", r = n.replace(/[-_]([a-z0-9])/gi, (e, t) => t.toUpperCase()).replace(/^\w/, (e) => e.toUpperCase()), i = n.toLowerCase().replace(/[-_]/g, "");
|
|
371
389
|
return t.includes(n) ? n : t.includes(r) ? r : t.includes(`${r}Icon`) ? `${r}Icon` : t.find((e) => e.toLowerCase().replace(/[-_]/g, "") === i) || "HelpCircle";
|
|
372
390
|
}
|
|
373
|
-
function
|
|
391
|
+
function T(e) {
|
|
374
392
|
let t = e.attributes || {}, n = Math.max(1, Number(t.rowCount) || 2), r = Math.max(1, Number(t.colCount) || 2), i = Array.isArray(t.cells) ? t.cells : [], a = [];
|
|
375
393
|
for (let e = 0; e < n; e++) {
|
|
376
394
|
let t = Array.isArray(i[e]) ? i[e] : [], n = [];
|
|
@@ -386,29 +404,29 @@ function w(e) {
|
|
|
386
404
|
striped: !!t.striped
|
|
387
405
|
};
|
|
388
406
|
}
|
|
389
|
-
var
|
|
390
|
-
function
|
|
391
|
-
let r = n <
|
|
407
|
+
var E = 8;
|
|
408
|
+
function D(e, t, n) {
|
|
409
|
+
let r = n < E && Array.isArray(e?.children) ? e.children : [];
|
|
392
410
|
return {
|
|
393
411
|
id: typeof e?.id == "string" && e.id ? e.id : `item-${t}`,
|
|
394
412
|
title: typeof e?.title == "string" && e.title.trim() ? e.title : `Item ${t + 1}`,
|
|
395
413
|
content: typeof e?.content == "string" ? e.content : "",
|
|
396
414
|
defaultOpen: !!e?.defaultOpen,
|
|
397
|
-
children: r.map((e, t) =>
|
|
415
|
+
children: r.map((e, t) => D(e, t, n + 1))
|
|
398
416
|
};
|
|
399
417
|
}
|
|
400
|
-
function
|
|
418
|
+
function O(e, t) {
|
|
401
419
|
if (t !== "multi") {
|
|
402
420
|
let t = !1;
|
|
403
421
|
for (let n of e) n.defaultOpen && (t ? n.defaultOpen = !1 : t = !0);
|
|
404
422
|
}
|
|
405
|
-
for (let n of e)
|
|
423
|
+
for (let n of e) O(n.children, t);
|
|
406
424
|
}
|
|
407
|
-
function
|
|
408
|
-
let t = e.attributes || {}, n = t.mode === "multi" ? "multi" : "single", r = (Array.isArray(t.items) ? t.items : []).map((e, t) =>
|
|
409
|
-
return
|
|
425
|
+
function k(e) {
|
|
426
|
+
let t = e.attributes || {}, n = t.mode === "multi" ? "multi" : "single", r = (Array.isArray(t.items) ? t.items : []).map((e, t) => D(e, t, 0));
|
|
427
|
+
return O(r, n), r;
|
|
410
428
|
}
|
|
411
|
-
function
|
|
429
|
+
function A(e, t, n) {
|
|
412
430
|
let r = JSON.parse(JSON.stringify(Array.isArray(e) ? e : [])), i = (e, t) => {
|
|
413
431
|
let [r, ...a] = t;
|
|
414
432
|
if (e[r]) {
|
|
@@ -426,7 +444,7 @@ function k(e, t, n) {
|
|
|
426
444
|
}
|
|
427
445
|
//#endregion
|
|
428
446
|
//#region src/utilities/iconSvgStatic.ts
|
|
429
|
-
var
|
|
447
|
+
var j = {
|
|
430
448
|
"a-arrow-down": [
|
|
431
449
|
["path", { d: "m14 12 4 4 4-4" }],
|
|
432
450
|
["path", { d: "M18 16V7" }],
|
|
@@ -15246,18 +15264,18 @@ var A = {
|
|
|
15246
15264
|
y2: "11"
|
|
15247
15265
|
}]
|
|
15248
15266
|
]
|
|
15249
|
-
},
|
|
15250
|
-
function
|
|
15267
|
+
}, M = "circle-help";
|
|
15268
|
+
function N(e) {
|
|
15251
15269
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
15252
15270
|
}
|
|
15253
|
-
function
|
|
15254
|
-
let t = e || "HelpCircle", n =
|
|
15255
|
-
if (
|
|
15271
|
+
function P(e) {
|
|
15272
|
+
let t = e || "HelpCircle", n = N(t.replace(/^\w/, (e) => e.toUpperCase()));
|
|
15273
|
+
if (j[n]) return n;
|
|
15256
15274
|
let r = t.toLowerCase().replace(/[-_\s]/g, "");
|
|
15257
|
-
return Object.keys(
|
|
15275
|
+
return Object.keys(j).find((e) => e.replace(/-/g, "") === r) || M;
|
|
15258
15276
|
}
|
|
15259
|
-
function
|
|
15260
|
-
return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${n}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${(
|
|
15277
|
+
function F(e, t, n) {
|
|
15278
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${n}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${(j[P(e)] || j[M] || []).map(([e, t]) => `<${e} ${Object.entries(t).map(([e, t]) => `${e}="${String(t)}"`).join(" ")}></${e}>`).join("")}</svg>`;
|
|
15261
15279
|
}
|
|
15262
15280
|
//#endregion
|
|
15263
|
-
export {
|
|
15281
|
+
export { t as S, A as _, u as a, i as b, h as c, w as d, c as f, C as g, v as h, k as i, p as l, T as m, g as n, d as o, s as p, o as r, f as s, F as t, l as u, r as v, e as x, n as y };
|