@aswin.dev/editor 0.7.0 → 0.7.1
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/README.md +3 -3
- package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-COL6Wm7p.js} +37 -37
- package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DWGPVtvC.js} +68 -68
- package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-duUFSfDf.js} +22 -22
- package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-Qs6HtXid.js} +12 -12
- package/dist/CloudEditor-CFldoCOb.js +1207 -0
- package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bw-lbt61.js} +21 -21
- package/dist/CommentsSidebar-BaD5F53-.js +436 -0
- package/dist/CountdownBlock-DaYGxKqo.js +92 -0
- package/dist/CountdownToolbar-Dg4F8MTk.js +210 -0
- package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-BSH7uNP_.js} +58 -58
- package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-Ba2pfF57.js} +2 -2
- package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-6phxZSKI.js} +80 -80
- package/dist/ModulePreviewCanvas-BW8L3eQX.js +108 -0
- package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-BpUzQOJt.js} +87 -87
- package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DNSzAB-I.js} +182 -182
- package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CrqPQdnk.js} +38 -38
- package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-zMQTpez7.js} +28 -28
- package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-Do-A5rYU.js} +45 -50
- package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-CS7o62zS.js} +75 -75
- package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-DGj_9V1u.js} +28 -28
- package/dist/{TitleEditor-fStSADI-.js → TitleEditor-C7IDnAoS.js} +68 -68
- package/dist/{TplModal-BwSfxIHf.js → TplModal-BAsVzcTb.js} +14 -14
- package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
- package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-C6LDKvmd.js} +19 -5
- package/dist/bundle-stats.json +7 -7
- package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
- package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
- package/dist/chevron-right-BqCptpdp.js +10 -0
- package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
- package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
- package/dist/{cloud-DEk_b4CR.js → cloud-6ZmAvF0j.js} +485 -427
- package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
- package/dist/{de-Brqvgr43.js → de-DWcgp-7T.js} +209 -1
- package/dist/{dist-BaQIYPsn.js → dist-BUzw1buG.js} +1 -1
- package/dist/{dist-DjviJBCi.js → dist-BZyY-SS4.js} +1 -1
- package/dist/{dist-D6uC2xhi.js → dist-BadNx4qo.js} +1 -1
- package/dist/{dist-aRzjfSRN.js → dist-BesOh2mk.js} +1 -1
- package/dist/{dist-D90y8dvT.js → dist-Bz3M4RXG.js} +3 -3
- package/dist/dist-C04s_fLA.js +563 -0
- package/dist/{dist-DDJIWTRY.js → dist-C3T2AKtB.js} +1 -1
- package/dist/{dist-BFawx6IS.js → dist-C9ckKEZL.js} +51 -51
- package/dist/{dist-us-RpCWN.js → dist-CBItRG-Z.js} +1 -1
- package/dist/{dist-wzMIGj-D.js → dist-COSzWQUs.js} +1 -1
- package/dist/dist-CivF9P8b.js +382 -0
- package/dist/{dist-Cp0zXPAD.js → dist-DtiDUrX-.js} +1 -1
- package/dist/{dist-KoBJjK1G.js → dist-Dzt5foyL.js} +1 -1
- package/dist/{en-WDVp87TE.js → en-Cxd4fhNm.js} +209 -1
- package/dist/{extensions-CUcl9Ok4.js → extensions-D__hOlV1.js} +106 -106
- package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
- package/dist/index.d.ts +88 -11
- package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
- package/dist/keys-CvX8D-8C.js +10 -0
- package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
- package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
- package/dist/pencil-BZJPNYWR.js +10 -0
- package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
- package/dist/{scan-line-D0vcUekt.js → scan-line-CzfFJO1o.js} +1 -1
- package/dist/{send-DH4oDQqC.js → send-D2eSo4GH.js} +1 -1
- package/dist/{shield-check-CfJgs2Hd.js → shield-check-jkpgcC0-.js} +1 -1
- package/dist/{sparkles-CvRXGqFs.js → sparkles-Chm5CZfb.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styleConstants-34eUKPOZ.js +55 -0
- package/dist/styles-B4tjX5SP.js +5224 -0
- package/dist/templatical-editor.js +189 -126
- package/dist/{text-align-start-BT9VUDxK.js → text-align-start-CzBnJsW8.js} +1 -1
- package/dist/{trash-2-DbP2Y6t2.js → trash-2-CtK2apEH.js} +1 -1
- package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-KpDVNbpn.js} +1 -1
- package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-DOKSZql1.js} +2 -2
- package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-wslttMH-.js} +2425 -2250
- package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
- package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-DX0XG5V9.js} +5 -5
- package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
- package/dist/{x-u2oVmjN_.js → x-BkaOMosX.js} +1 -1
- package/package.json +10 -10
- package/dist/CloudEditor-BCz1ZTYC.js +0 -1172
- package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
- package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
- package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
- package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
- package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +0 -97
- package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +0 -59
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
- package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +0 -33
- package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +0 -51
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
- package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +0 -423
- package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +0 -544
- package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +0 -106
- package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +0 -119
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +0 -171
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
- package/dist/cdn/chunks/de-Ce-LbJ2J.js +0 -89
- package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +0 -1
- package/dist/cdn/chunks/de-D8CnZxV9.js +0 -523
- package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
- package/dist/cdn/chunks/de-RQrZR56a.js +0 -209
- package/dist/cdn/chunks/de-RQrZR56a.js.map +0 -1
- package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
- package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +0 -19
- package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +0 -1
- package/dist/cdn/chunks/en-8FHaQv4V.js +0 -523
- package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
- package/dist/cdn/chunks/en-Bl1ecfRF.js +0 -209
- package/dist/cdn/chunks/en-Bl1ecfRF.js.map +0 -1
- package/dist/cdn/chunks/en-DiCWK5fG.js +0 -89
- package/dist/cdn/chunks/en-DiCWK5fG.js.map +0 -1
- package/dist/cdn/chunks/extensions-DIxF31tA.js +0 -598
- package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
- package/dist/cdn/chunks/features-DEMb13KS.js +0 -6814
- package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
- package/dist/cdn/chunks/icons-CsLTcirh.js +0 -700
- package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +0 -3279
- package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +0 -1
- package/dist/cdn/chunks/media-library-CVaNvhpM.js +0 -6014
- package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
- package/dist/cdn/chunks/pusher-CDbNlZBE.js +0 -2508
- package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +0 -1
- package/dist/cdn/chunks/quality-BaBfc54_.js +0 -1456
- package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +0 -32
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +0 -1
- package/dist/cdn/chunks/renderer-CUxvx7ro.js +0 -548
- package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
- package/dist/cdn/chunks/src-CRaqN-p8.js +0 -497
- package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
- package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
- package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +0 -14654
- package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +0 -1
- package/dist/cdn/editor.css +0 -2
- package/dist/cdn/editor.js +0 -250
- package/dist/cdn/editor.js.map +0 -1
- package/dist/dist-B1IR0bpH.js +0 -326
- package/dist/dist-DJmnUmW9.js +0 -362
- package/dist/keys-ciNfSSGj.js +0 -10
- package/dist/styleConstants-fWzlIIwN.js +0 -55
- package/dist/styles-DEXEkBvg.js +0 -3176
- /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-BVAJ4lgT.js} +0 -0
- /package/dist/{de-DCaaCE5s.js → de-GOtR9DwW.js} +0 -0
- /package/dist/{dist-iLBdeBDR.js → dist-DXa1uAMh.js} +0 -0
- /package/dist/{emojiData-PQyVa4bU.js → emojiData-DrBuvEoP.js} +0 -0
- /package/dist/{en-DXCyK4-X.js → en-dFFQVzNn.js} +0 -0
- /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-BhhO8yCl.js} +0 -0
- /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-BvCyLQII.js} +0 -0
- /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-DVuzNX1y.js} +0 -0
|
@@ -1,548 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./rolldown-runtime-BNuo_Jkg.js";
|
|
2
|
-
import { An as t, Cn as n, Dn as r, En as i, Mn as a, Nn as o, On as s, Pn as c, Sn as l, Tn as u, jn as d, kn as f, wn as p, xn as m } from "./features-DEMb13KS.js";
|
|
3
|
-
//#region ../renderer/src/render-context.ts
|
|
4
|
-
var h = {
|
|
5
|
-
arial: "Arial, sans-serif",
|
|
6
|
-
helvetica: "Helvetica, sans-serif",
|
|
7
|
-
georgia: "Georgia, serif",
|
|
8
|
-
"times new roman": "'Times New Roman', serif",
|
|
9
|
-
verdana: "Verdana, sans-serif",
|
|
10
|
-
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
11
|
-
"courier new": "'Courier New', monospace",
|
|
12
|
-
tahoma: "Tahoma, sans-serif"
|
|
13
|
-
}, g = class e {
|
|
14
|
-
constructor(e, t, n, r, i = /* @__PURE__ */ new Map()) {
|
|
15
|
-
this.containerWidth = e, this.customFonts = t, this.defaultFallbackFont = n, this.allowHtmlBlocks = r, this.customBlockHtml = i;
|
|
16
|
-
}
|
|
17
|
-
withContainerWidth(t) {
|
|
18
|
-
return new e(t, this.customFonts, this.defaultFallbackFont, this.allowHtmlBlocks, this.customBlockHtml);
|
|
19
|
-
}
|
|
20
|
-
resolveFontFamily(e) {
|
|
21
|
-
for (let t of this.customFonts) if (t.name.toLowerCase() === e.toLowerCase()) {
|
|
22
|
-
let e = t.fallback ?? this.defaultFallbackFont;
|
|
23
|
-
return `'${t.name}', ${e}`;
|
|
24
|
-
}
|
|
25
|
-
return h[e.toLowerCase()] || e;
|
|
26
|
-
}
|
|
27
|
-
}, _ = {
|
|
28
|
-
"&": "&",
|
|
29
|
-
"<": "<",
|
|
30
|
-
">": ">",
|
|
31
|
-
"\"": """,
|
|
32
|
-
"'": "'"
|
|
33
|
-
}, v = /[&<>"']/g;
|
|
34
|
-
function y(e) {
|
|
35
|
-
return e === "" ? "" : e.replace(v, (e) => _[e] ?? e);
|
|
36
|
-
}
|
|
37
|
-
function b(e) {
|
|
38
|
-
return e === "" ? "" : e.replace(v, (e) => _[e] ?? e);
|
|
39
|
-
}
|
|
40
|
-
function x(e) {
|
|
41
|
-
return e === "" ? "" : b(e).replace(/[;{}\r\n]/g, "");
|
|
42
|
-
}
|
|
43
|
-
function S(e) {
|
|
44
|
-
if (e === "") return "";
|
|
45
|
-
let t = e.replace(/<span[^>]*\bdata-merge-tag="([^"]*)"[^>]*>.*?<\/span>/gs, "$1");
|
|
46
|
-
return t = t.replace(/<span[^>]*\bdata-logic-merge-tag="([^"]*)"[^>]*>.*?<\/span>/gs, "$1"), t;
|
|
47
|
-
}
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region ../renderer/src/padding.ts
|
|
50
|
-
function C(e) {
|
|
51
|
-
return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
|
|
52
|
-
}
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region ../renderer/src/utils.ts
|
|
55
|
-
function w(e, t) {
|
|
56
|
-
return e ? ` ${t === "native" ? "background-color" : "container-background-color"}="${e}"` : "";
|
|
57
|
-
}
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region ../renderer/src/visibility.ts
|
|
60
|
-
function T(e) {
|
|
61
|
-
let t = e.visibility;
|
|
62
|
-
return t ? !t.desktop && !t.tablet && !t.mobile : !1;
|
|
63
|
-
}
|
|
64
|
-
function E(e) {
|
|
65
|
-
let t = D(e);
|
|
66
|
-
return t === "" ? "" : ` css-class="${t}"`;
|
|
67
|
-
}
|
|
68
|
-
function D(e) {
|
|
69
|
-
let t = e.visibility;
|
|
70
|
-
if (!t) return "";
|
|
71
|
-
let n = [];
|
|
72
|
-
return t.desktop || n.push("tpl-hide-desktop"), t.tablet || n.push("tpl-hide-tablet"), t.mobile || n.push("tpl-hide-mobile"), n.join(" ");
|
|
73
|
-
}
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region ../renderer/src/renderers/title.ts
|
|
76
|
-
function O(e, t) {
|
|
77
|
-
if (T(e)) return "";
|
|
78
|
-
let n = C(e.styles.padding), r = w(e.styles.backgroundColor, "container"), i = k(S(e.content)), a = c[e.level] ?? c[2], o = b(e.color), s = e.textAlign, l = ee(e.fontFamily, t), u = E(e), d = `h${c[e.level] ? e.level : 2}`;
|
|
79
|
-
return `<mj-text
|
|
80
|
-
font-size="${a}px"
|
|
81
|
-
color="${o}"
|
|
82
|
-
align="${s}"
|
|
83
|
-
line-height="1.3"
|
|
84
|
-
padding="${n}"${r}${l}${u}
|
|
85
|
-
><${d} style="margin:0;font-size:inherit;color:inherit;line-height:inherit">${i}</${d}></mj-text>`;
|
|
86
|
-
}
|
|
87
|
-
function k(e) {
|
|
88
|
-
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
89
|
-
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
90
|
-
}
|
|
91
|
-
function ee(e, t) {
|
|
92
|
-
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
93
|
-
}
|
|
94
|
-
//#endregion
|
|
95
|
-
//#region ../renderer/src/renderers/paragraph.ts
|
|
96
|
-
function te(e, t) {
|
|
97
|
-
if (T(e) || e.content.replace(/<\/?p[^>]*>/gi, "").trim() === "") return "";
|
|
98
|
-
let n = C(e.styles.padding), r = w(e.styles.backgroundColor, "container"), i = S(e.content);
|
|
99
|
-
return `<mj-text
|
|
100
|
-
line-height="1.5"
|
|
101
|
-
padding="${n}"${r}${E(e)}
|
|
102
|
-
>${i}</mj-text>`;
|
|
103
|
-
}
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region ../renderer/src/renderers/image.ts
|
|
106
|
-
function ne(e, t) {
|
|
107
|
-
if (T(e) || e.src === "") return "";
|
|
108
|
-
let n = C(e.styles.padding), r = w(e.styles.backgroundColor, "container"), i = e.width === "full" ? t.containerWidth + "px" : e.width + "px", a = E(e), o = "";
|
|
109
|
-
e.linkUrl && (o = ` href="${b(e.linkUrl)}"`, e.linkOpenInNewTab && (o += " target=\"_blank\" rel=\"noopener\""));
|
|
110
|
-
let s = b(e.src), c = e.decorative === !0;
|
|
111
|
-
return `<mj-image
|
|
112
|
-
src="${s}"
|
|
113
|
-
alt="${c ? "" : b(e.alt)}"
|
|
114
|
-
width="${i}"
|
|
115
|
-
align="${e.align}"
|
|
116
|
-
padding="${n}"${r}${o}${a}${c ? " role=\"presentation\"" : ""}
|
|
117
|
-
/>`;
|
|
118
|
-
}
|
|
119
|
-
//#endregion
|
|
120
|
-
//#region ../renderer/src/renderers/button.ts
|
|
121
|
-
function re(e, t) {
|
|
122
|
-
if (T(e)) return "";
|
|
123
|
-
let n = C(e.styles.padding), r = w(e.styles.backgroundColor, "container"), i = C(e.buttonPadding), a = e.url === "" ? "" : b(e.url), o = a === "" ? "" : ` href="${a}"`, s = b(e.backgroundColor), c = b(e.textColor), l = e.fontSize, u = e.borderRadius, d = y(e.text);
|
|
124
|
-
return `<mj-button${o}${e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : ""}
|
|
125
|
-
background-color="${s}"
|
|
126
|
-
color="${c}"
|
|
127
|
-
font-size="${l}px"
|
|
128
|
-
font-weight="bold"
|
|
129
|
-
border-radius="${u}px"
|
|
130
|
-
inner-padding="${i}"
|
|
131
|
-
padding="${n}"${r}${A(e.fontFamily, t)}${E(e)}
|
|
132
|
-
>${d}</mj-button>`;
|
|
133
|
-
}
|
|
134
|
-
function A(e, t) {
|
|
135
|
-
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
136
|
-
}
|
|
137
|
-
//#endregion
|
|
138
|
-
//#region ../renderer/src/renderers/divider.ts
|
|
139
|
-
function j(e, t) {
|
|
140
|
-
if (T(e)) return "";
|
|
141
|
-
let n = C(e.styles.padding), r = e.styles.backgroundColor ? ` container-background-color="${b(e.styles.backgroundColor)}"` : "", i = e.width === "full" ? "100%" : e.width + "px";
|
|
142
|
-
return `<mj-divider
|
|
143
|
-
border-width="${e.thickness}px"
|
|
144
|
-
border-style="${e.lineStyle}"
|
|
145
|
-
border-color="${b(e.color)}"
|
|
146
|
-
width="${i}"
|
|
147
|
-
padding="${n}"${r}${E(e)}
|
|
148
|
-
/>`;
|
|
149
|
-
}
|
|
150
|
-
//#endregion
|
|
151
|
-
//#region ../renderer/src/renderers/spacer.ts
|
|
152
|
-
function M(e, t) {
|
|
153
|
-
return T(e) ? "" : `<mj-spacer height="${e.height}px" padding="0"${e.styles.backgroundColor ? ` container-background-color="${b(e.styles.backgroundColor)}"` : ""}${E(e)} />`;
|
|
154
|
-
}
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region ../renderer/src/renderers/html.ts
|
|
157
|
-
function N(e, t) {
|
|
158
|
-
if (T(e) || !t.allowHtmlBlocks) return "";
|
|
159
|
-
let n = e.content;
|
|
160
|
-
return n === "" ? "" : `<mj-text${E(e)}>
|
|
161
|
-
${n}
|
|
162
|
-
</mj-text>`;
|
|
163
|
-
}
|
|
164
|
-
//#endregion
|
|
165
|
-
//#region ../renderer/src/social-icons.ts
|
|
166
|
-
var P = {
|
|
167
|
-
facebook: {
|
|
168
|
-
path: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z",
|
|
169
|
-
color: "#1877F2"
|
|
170
|
-
},
|
|
171
|
-
twitter: {
|
|
172
|
-
path: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z",
|
|
173
|
-
color: "#000000"
|
|
174
|
-
},
|
|
175
|
-
instagram: {
|
|
176
|
-
path: "M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z",
|
|
177
|
-
color: "#E4405F"
|
|
178
|
-
},
|
|
179
|
-
linkedin: {
|
|
180
|
-
path: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",
|
|
181
|
-
color: "#0A66C2"
|
|
182
|
-
},
|
|
183
|
-
youtube: {
|
|
184
|
-
path: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z",
|
|
185
|
-
color: "#FF0000"
|
|
186
|
-
},
|
|
187
|
-
tiktok: {
|
|
188
|
-
path: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z",
|
|
189
|
-
color: "#000000"
|
|
190
|
-
},
|
|
191
|
-
pinterest: {
|
|
192
|
-
path: "M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738.098.119.112.224.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12 0-6.628-5.373-12-12-12z",
|
|
193
|
-
color: "#BD081C"
|
|
194
|
-
},
|
|
195
|
-
email: {
|
|
196
|
-
path: "M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z",
|
|
197
|
-
color: "#6B7280"
|
|
198
|
-
},
|
|
199
|
-
whatsapp: {
|
|
200
|
-
path: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z",
|
|
201
|
-
color: "#25D366"
|
|
202
|
-
},
|
|
203
|
-
telegram: {
|
|
204
|
-
path: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z",
|
|
205
|
-
color: "#26A5E4"
|
|
206
|
-
},
|
|
207
|
-
discord: {
|
|
208
|
-
path: "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189z",
|
|
209
|
-
color: "#5865F2"
|
|
210
|
-
},
|
|
211
|
-
snapchat: {
|
|
212
|
-
path: "M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146 1.124.347 2.317.535 3.554.535 6.627 0 12.017-5.373 12.017-12.001C24.034 5.367 18.644 0 12.017 0z",
|
|
213
|
-
color: "#FFFC00"
|
|
214
|
-
},
|
|
215
|
-
reddit: {
|
|
216
|
-
path: "M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z",
|
|
217
|
-
color: "#FF4500"
|
|
218
|
-
},
|
|
219
|
-
github: {
|
|
220
|
-
path: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",
|
|
221
|
-
color: "#181717"
|
|
222
|
-
},
|
|
223
|
-
dribbble: {
|
|
224
|
-
path: "M12 24C5.385 24 0 18.615 0 12S5.385 0 12 0s12 5.385 12 12-5.385 12-12 12zm10.12-10.358c-.35-.11-3.17-.953-6.384-.438 1.34 3.684 1.887 6.684 1.992 7.308 2.3-1.555 3.936-4.02 4.392-6.87zm-6.115 7.808c-.153-.9-.75-4.032-2.19-7.77l-.066.02c-5.79 2.015-7.86 6.025-8.04 6.4 1.73 1.358 3.92 2.166 6.29 2.166 1.42 0 2.77-.29 4-.814zm-11.62-2.58c.232-.4 3.045-5.055 8.332-6.765.135-.045.27-.084.405-.12-.26-.585-.54-1.167-.832-1.74C7.17 11.775 2.206 11.71 1.756 11.7l-.004.312c0 2.633.998 5.037 2.634 6.855zm-2.42-8.955c.46.008 4.683.026 9.477-1.248-1.698-3.018-3.53-5.558-3.8-5.928-2.868 1.35-5.01 3.99-5.676 7.17zM9.6 2.052c.282.38 2.145 2.914 3.822 6 3.645-1.365 5.19-3.44 5.373-3.702-1.81-1.61-4.19-2.586-6.795-2.586-.825 0-1.63.1-2.4.285zm10.335 3.483c-.218.29-1.935 2.493-5.724 4.04.24.49.47.985.68 1.486.08.18.15.36.22.53 3.41-.43 6.8.26 7.14.33-.02-2.42-.88-4.64-2.31-6.38z",
|
|
225
|
-
color: "#EA4C89"
|
|
226
|
-
},
|
|
227
|
-
behance: {
|
|
228
|
-
path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z",
|
|
229
|
-
color: "#1769FF"
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
function F(e, t, n) {
|
|
233
|
-
let r = P[e], i = r?.path ?? "", a = r?.color ?? "#6B7280";
|
|
234
|
-
if (i === "") return "";
|
|
235
|
-
let o = t === "outlined" ? a : "#ffffff", s;
|
|
236
|
-
switch (t) {
|
|
237
|
-
case "circle":
|
|
238
|
-
s = `<circle cx="12" cy="12" r="12" fill="${a}"/>`;
|
|
239
|
-
break;
|
|
240
|
-
case "rounded":
|
|
241
|
-
s = `<rect width="24" height="24" rx="6" fill="${a}"/>`;
|
|
242
|
-
break;
|
|
243
|
-
case "square":
|
|
244
|
-
s = `<rect width="24" height="24" rx="0" fill="${a}"/>`;
|
|
245
|
-
break;
|
|
246
|
-
case "outlined":
|
|
247
|
-
s = `<rect width="22" height="22" x="1" y="1" rx="3" fill="transparent" stroke="${a}" stroke-width="2"/>`;
|
|
248
|
-
break;
|
|
249
|
-
default:
|
|
250
|
-
s = `<rect width="24" height="24" rx="3" fill="${a}"/>`;
|
|
251
|
-
break;
|
|
252
|
-
}
|
|
253
|
-
let c = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="${n}" height="${n}">` + s + `<g transform="translate(4.8, 4.8) scale(0.6)"><path d="${i}" fill="${o}"/></g></svg>`;
|
|
254
|
-
return "data:image/svg+xml;base64," + btoa(c);
|
|
255
|
-
}
|
|
256
|
-
//#endregion
|
|
257
|
-
//#region ../renderer/src/renderers/social.ts
|
|
258
|
-
function I(e, t) {
|
|
259
|
-
if (T(e)) return "";
|
|
260
|
-
let n = e.icons;
|
|
261
|
-
if (n.length === 0) return "";
|
|
262
|
-
let r = C(e.styles.padding), i = e.styles.backgroundColor ? ` container-background-color="${b(e.styles.backgroundColor)}"` : "", a = E(e), o = e.align, s = e.iconSize, c = e.iconStyle, l = e.spacing, u;
|
|
263
|
-
switch (s) {
|
|
264
|
-
case "small":
|
|
265
|
-
u = 24;
|
|
266
|
-
break;
|
|
267
|
-
case "large":
|
|
268
|
-
u = 48;
|
|
269
|
-
break;
|
|
270
|
-
default:
|
|
271
|
-
u = 32;
|
|
272
|
-
break;
|
|
273
|
-
}
|
|
274
|
-
let d;
|
|
275
|
-
switch (c) {
|
|
276
|
-
case "circle":
|
|
277
|
-
d = "50%";
|
|
278
|
-
break;
|
|
279
|
-
case "rounded":
|
|
280
|
-
d = "8px";
|
|
281
|
-
break;
|
|
282
|
-
case "square":
|
|
283
|
-
d = "0";
|
|
284
|
-
break;
|
|
285
|
-
default:
|
|
286
|
-
d = "4px";
|
|
287
|
-
break;
|
|
288
|
-
}
|
|
289
|
-
let f = n.length;
|
|
290
|
-
return `<mj-social
|
|
291
|
-
mode="horizontal"
|
|
292
|
-
align="${o}"
|
|
293
|
-
icon-padding="0"
|
|
294
|
-
padding="${r}"${i}${a}
|
|
295
|
-
>
|
|
296
|
-
${n.map((e, t) => {
|
|
297
|
-
let n = e.platform, r = b(e.url), i = F(n, c, u), a = t === f - 1 ? 0 : l;
|
|
298
|
-
return `<mj-social-element src="${i}" href="${r}" icon-size="${u}px" padding="0 ${a}px 0 0" border-radius="${d}" background-color="transparent"></mj-social-element>`;
|
|
299
|
-
}).join("\n")}
|
|
300
|
-
</mj-social>`;
|
|
301
|
-
}
|
|
302
|
-
//#endregion
|
|
303
|
-
//#region ../renderer/src/renderers/menu.ts
|
|
304
|
-
function L(e, t) {
|
|
305
|
-
if (T(e) || e.items.length === 0) return "";
|
|
306
|
-
let n = C(e.styles.padding), r = w(e.styles.backgroundColor, "container"), i = E(e), a = B(e.fontFamily, t), o = e.textAlign;
|
|
307
|
-
return `<mj-text
|
|
308
|
-
font-size="${e.fontSize}px"
|
|
309
|
-
color="${b(e.color)}"
|
|
310
|
-
align="${o}"
|
|
311
|
-
line-height="1.5"
|
|
312
|
-
padding="${n}"${r}${a}${i}
|
|
313
|
-
>${R(e)}</mj-text>`;
|
|
314
|
-
}
|
|
315
|
-
function R(e) {
|
|
316
|
-
let t = e.items, n = y(e.separator), r = x(e.separatorColor), i = e.spacing, a = e.linkColor ?? e.color, o = [], s = t.length;
|
|
317
|
-
for (let e = 0; e < s; e++) o.push(z(t[e], a)), e < s - 1 && o.push(`<span style="color: ${r}; padding: 0 ${i}px;">${n}</span>`);
|
|
318
|
-
return o.join("");
|
|
319
|
-
}
|
|
320
|
-
function z(e, t) {
|
|
321
|
-
let n = y(e.text), r = b(e.url), i = x(e.color ?? t), a = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", o = [`color: ${i}`, "text-decoration: none"];
|
|
322
|
-
return e.bold && o.push("font-weight: bold"), e.underline && o.push("text-decoration: underline"), `<a href="${r}" style="${o.join("; ")}"${a}>${n}</a>`;
|
|
323
|
-
}
|
|
324
|
-
function B(e, t) {
|
|
325
|
-
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
326
|
-
}
|
|
327
|
-
//#endregion
|
|
328
|
-
//#region ../renderer/src/renderers/table.ts
|
|
329
|
-
function V(e, t) {
|
|
330
|
-
if (T(e) || e.rows.length === 0) return "";
|
|
331
|
-
let n = C(e.styles.padding), r = w(e.styles.backgroundColor, "container"), i = E(e), a = G(e.fontFamily, t);
|
|
332
|
-
return `<mj-text
|
|
333
|
-
font-size="${e.fontSize}px"
|
|
334
|
-
color="${b(e.color)}"
|
|
335
|
-
align="${e.textAlign}"
|
|
336
|
-
line-height="1.5"
|
|
337
|
-
padding="${n}"${r}${a}${i}
|
|
338
|
-
>${H(e)}</mj-text>`;
|
|
339
|
-
}
|
|
340
|
-
function H(e) {
|
|
341
|
-
let t = x(e.borderColor), n = e.borderWidth, r = "";
|
|
342
|
-
for (let i = 0; i < e.rows.length; i++) {
|
|
343
|
-
let a = e.rows[i];
|
|
344
|
-
r += U(a, e, e.hasHeaderRow && i === 0, t, n);
|
|
345
|
-
}
|
|
346
|
-
return `<table style="width: 100%; border-collapse: collapse;">${r}</table>`;
|
|
347
|
-
}
|
|
348
|
-
function U(e, t, n, r, i) {
|
|
349
|
-
let a = "";
|
|
350
|
-
for (let o of e.cells) a += W(o, t, n, r, i);
|
|
351
|
-
return `<tr>${a}</tr>`;
|
|
352
|
-
}
|
|
353
|
-
function W(e, t, n, r, i) {
|
|
354
|
-
let a = t.cellPadding, o = [`border: ${i}px solid ${r}`, `padding: ${a}px`];
|
|
355
|
-
n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${x(t.headerBackgroundColor)}`));
|
|
356
|
-
let s = o.join("; "), c = S(e.content), l = n ? "th" : "td";
|
|
357
|
-
return `<${l} style="${s}">${c}</${l}>`;
|
|
358
|
-
}
|
|
359
|
-
function G(e, t) {
|
|
360
|
-
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
361
|
-
}
|
|
362
|
-
//#endregion
|
|
363
|
-
//#region ../renderer/src/renderers/custom.ts
|
|
364
|
-
function ie(e, t) {
|
|
365
|
-
if (T(e)) return "";
|
|
366
|
-
let n = t.customBlockHtml.get(e.id) ?? e.renderedHtml;
|
|
367
|
-
if (!n || n === "") return "";
|
|
368
|
-
let r = E(e);
|
|
369
|
-
return `<mj-text${w(e.styles?.backgroundColor, "container")}${r}>
|
|
370
|
-
${n}
|
|
371
|
-
</mj-text>`;
|
|
372
|
-
}
|
|
373
|
-
//#endregion
|
|
374
|
-
//#region ../renderer/src/columns.ts
|
|
375
|
-
function K(e) {
|
|
376
|
-
switch (e) {
|
|
377
|
-
case "2": return ["50%", "50%"];
|
|
378
|
-
case "3": return [
|
|
379
|
-
"33.33%",
|
|
380
|
-
"33.33%",
|
|
381
|
-
"33.34%"
|
|
382
|
-
];
|
|
383
|
-
case "1-2": return ["33.33%", "66.67%"];
|
|
384
|
-
case "2-1": return ["66.67%", "33.33%"];
|
|
385
|
-
default: return ["100%"];
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
function q(e, t) {
|
|
389
|
-
switch (e) {
|
|
390
|
-
case "2": return [t * .5, t * .5];
|
|
391
|
-
case "3": return [
|
|
392
|
-
t / 3,
|
|
393
|
-
t / 3,
|
|
394
|
-
t / 3
|
|
395
|
-
];
|
|
396
|
-
case "1-2": return [t / 3, t * 2 / 3];
|
|
397
|
-
case "2-1": return [t * 2 / 3, t / 3];
|
|
398
|
-
default: return [t];
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
//#endregion
|
|
402
|
-
//#region ../renderer/src/renderers/section.ts
|
|
403
|
-
function J(e, t, n) {
|
|
404
|
-
if (T(e)) return "";
|
|
405
|
-
let r = e.columns, i = K(r), a = q(r, t.containerWidth), o = C(e.styles.padding), c = w(e.styles.backgroundColor, "native"), l = E(e), u = e.children, d = [];
|
|
406
|
-
for (let e = 0; e < u.length; e++) {
|
|
407
|
-
let r = u[e], o = i[e] ?? "100%", c = Math.floor(a[e] ?? t.containerWidth), l = Y(r, t.allowHtmlBlocks).filter((e) => !s(e)), f = t.withContainerWidth(c), p = l.map((e) => n(e, f)).filter((e) => e !== "").join("\n");
|
|
408
|
-
d.push(`<mj-column width="${o}">
|
|
409
|
-
${p === "" ? "<mj-text> </mj-text>" : p}
|
|
410
|
-
</mj-column>`);
|
|
411
|
-
}
|
|
412
|
-
return `<mj-section${c} padding="${o}"${l}>
|
|
413
|
-
${d.join("\n")}
|
|
414
|
-
</mj-section>`;
|
|
415
|
-
}
|
|
416
|
-
function Y(e, t) {
|
|
417
|
-
return t ? e : e.filter((e) => e.type !== "html");
|
|
418
|
-
}
|
|
419
|
-
//#endregion
|
|
420
|
-
//#region ../renderer/src/renderers/video.ts
|
|
421
|
-
function ae(e, t) {
|
|
422
|
-
if (t) return t;
|
|
423
|
-
if (!e) return null;
|
|
424
|
-
for (let t of [/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/, /youtube\.com\/shorts\/([a-zA-Z0-9_-]{11})/]) {
|
|
425
|
-
let n = e.match(t);
|
|
426
|
-
if (n) return `https://img.youtube.com/vi/${n[1]}/maxresdefault.jpg`;
|
|
427
|
-
}
|
|
428
|
-
let n = e.match(/vimeo\.com\/(?:video\/)?(\d+)/);
|
|
429
|
-
return n ? `https://vumbnail.com/${n[1]}.jpg` : null;
|
|
430
|
-
}
|
|
431
|
-
function oe(e, t) {
|
|
432
|
-
if (T(e)) return "";
|
|
433
|
-
let n = ae(e.url, e.thumbnailUrl);
|
|
434
|
-
if (!n) return "";
|
|
435
|
-
let r = C(e.styles.padding), i = w(e.styles.backgroundColor, "container"), a = e.width === "full" ? t.containerWidth + "px" : e.width + "px", o = E(e);
|
|
436
|
-
return `<mj-image
|
|
437
|
-
src="${b(n)}"
|
|
438
|
-
alt="${b(e.alt)}"
|
|
439
|
-
width="${a}"
|
|
440
|
-
align="${e.align}"
|
|
441
|
-
padding="${r}"
|
|
442
|
-
href="${b(e.url)}"
|
|
443
|
-
target="_blank"
|
|
444
|
-
rel="noopener"${i}${o}
|
|
445
|
-
/>`;
|
|
446
|
-
}
|
|
447
|
-
//#endregion
|
|
448
|
-
//#region ../renderer/src/renderers/index.ts
|
|
449
|
-
function X(e, c) {
|
|
450
|
-
return s(e) ? J(e, c, X) : a(e) ? O(e, c) : r(e) ? te(e, c) : u(e) ? ne(e, c) : m(e) ? re(e, c) : n(e) ? j(e, c) : t(e) ? M(e, c) : p(e) ? N(e, c) : f(e) ? I(e, c) : i(e) ? L(e, c) : d(e) ? V(e, c) : o(e) ? oe(e, c) : l(e) ? ie(e, c) : "";
|
|
451
|
-
}
|
|
452
|
-
//#endregion
|
|
453
|
-
//#region ../renderer/src/index.ts
|
|
454
|
-
var se = /* @__PURE__ */ e({
|
|
455
|
-
RenderContext: () => g,
|
|
456
|
-
SOCIAL_ICONS: () => P,
|
|
457
|
-
convertMergeTagsToValues: () => S,
|
|
458
|
-
escapeAttr: () => b,
|
|
459
|
-
escapeHtml: () => y,
|
|
460
|
-
generateSocialIconDataUri: () => F,
|
|
461
|
-
getCssClassAttr: () => E,
|
|
462
|
-
getCssClasses: () => D,
|
|
463
|
-
getWidthPercentages: () => K,
|
|
464
|
-
getWidthPixels: () => q,
|
|
465
|
-
isHiddenOnAll: () => T,
|
|
466
|
-
renderBlock: () => X,
|
|
467
|
-
renderToMjml: () => ce,
|
|
468
|
-
toPaddingString: () => C
|
|
469
|
-
});
|
|
470
|
-
async function ce(e, t) {
|
|
471
|
-
let n = t?.customFonts ?? [], r = t?.defaultFallbackFont ?? "Arial, sans-serif", i = t?.allowHtmlBlocks ?? !0, a = await pe(e, t?.renderCustomBlock), o = new g(e.settings.width, n, r, i, a), s = fe(e.blocks, i), c = o.resolveFontFamily(e.settings.fontFamily), l = e.settings.backgroundColor, u = s.map((e) => Z(e, o)).filter((e) => e !== "").join("\n"), d = de(n), f = ue(e.settings.preheaderText);
|
|
472
|
-
return `<mjml lang="${b(e.settings.locale)}">
|
|
473
|
-
<mj-head>${f}
|
|
474
|
-
<mj-attributes>
|
|
475
|
-
<mj-all font-family="${c}" />
|
|
476
|
-
<mj-text font-size="14px" />
|
|
477
|
-
<mj-section padding="0" />
|
|
478
|
-
<mj-column padding="0" />
|
|
479
|
-
<mj-image fluid-on-mobile="true" />
|
|
480
|
-
</mj-attributes>${d}
|
|
481
|
-
<mj-style>
|
|
482
|
-
a { color: inherit; text-decoration: none; }
|
|
483
|
-
@media only screen and (max-width: 480px) {
|
|
484
|
-
.tpl-hide-mobile { display: none !important; mso-hide: all !important; }
|
|
485
|
-
}
|
|
486
|
-
@media only screen and (min-width: 481px) and (max-width: 768px) {
|
|
487
|
-
.tpl-hide-tablet { display: none !important; mso-hide: all !important; }
|
|
488
|
-
}
|
|
489
|
-
@media only screen and (min-width: 769px) {
|
|
490
|
-
.tpl-hide-desktop { display: none !important; mso-hide: all !important; }
|
|
491
|
-
}
|
|
492
|
-
</mj-style>
|
|
493
|
-
</mj-head>
|
|
494
|
-
<mj-body width="${o.containerWidth}px" background-color="${l}">
|
|
495
|
-
${u}
|
|
496
|
-
</mj-body>
|
|
497
|
-
</mjml>`;
|
|
498
|
-
}
|
|
499
|
-
function Z(e, t) {
|
|
500
|
-
return s(e) ? Q(e, X(e, t)) : Q(e, le(X(e, t)));
|
|
501
|
-
}
|
|
502
|
-
function Q(e, t) {
|
|
503
|
-
if (t === "") return "";
|
|
504
|
-
let n = e.displayCondition;
|
|
505
|
-
return n ? `<mj-raw>${n.before}</mj-raw>
|
|
506
|
-
` + t + `
|
|
507
|
-
<mj-raw>${n.after}</mj-raw>` : t;
|
|
508
|
-
}
|
|
509
|
-
function le(e) {
|
|
510
|
-
return e === "" ? "" : `<mj-section>
|
|
511
|
-
<mj-column>
|
|
512
|
-
${e}
|
|
513
|
-
</mj-column>
|
|
514
|
-
</mj-section>`;
|
|
515
|
-
}
|
|
516
|
-
function ue(e) {
|
|
517
|
-
if (!e) return "";
|
|
518
|
-
let t = e.trim();
|
|
519
|
-
return t === "" ? "" : `\n <mj-preview>${y(t)}</mj-preview>`;
|
|
520
|
-
}
|
|
521
|
-
function de(e) {
|
|
522
|
-
return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${b(e.name)}" href="${b(e.url)}" />`).join("");
|
|
523
|
-
}
|
|
524
|
-
function fe(e, t) {
|
|
525
|
-
return t ? e : e.filter((e) => e.type !== "html");
|
|
526
|
-
}
|
|
527
|
-
async function pe(e, t) {
|
|
528
|
-
let n = /* @__PURE__ */ new Map();
|
|
529
|
-
if (!t) return n;
|
|
530
|
-
let r = [];
|
|
531
|
-
if ($(e.blocks, r), r.length === 0) return n;
|
|
532
|
-
let i = await Promise.all(r.map((e) => t(e)));
|
|
533
|
-
for (let e = 0; e < r.length; e++) n.set(r[e].id, i[e]);
|
|
534
|
-
return n;
|
|
535
|
-
}
|
|
536
|
-
function $(e, t) {
|
|
537
|
-
for (let n of e) {
|
|
538
|
-
if (l(n)) {
|
|
539
|
-
t.push(n);
|
|
540
|
-
continue;
|
|
541
|
-
}
|
|
542
|
-
if (s(n)) for (let e of n.children) $(e, t);
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
//#endregion
|
|
546
|
-
export { se as t };
|
|
547
|
-
|
|
548
|
-
//# sourceMappingURL=renderer-CUxvx7ro.js.map
|