@templatical/editor 0.40.0 → 0.42.0
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 +1 -1
- package/dist/{AiChatSidebar-a8TPBAl2.js → AiChatSidebar-DqSoJAXx.js} +1 -1
- package/dist/{AiFeatureMenu-CbgDjLqk.js → AiFeatureMenu-CoBvE72q.js} +1 -1
- package/dist/{BlockPreviewCanvas-XNV83YGg.js → BlockPreviewCanvas-W6-MRpWz.js} +33 -33
- package/dist/{CloudHeaderExtras-C-tbLyfE.js → CloudHeaderExtras-AbsNuL9T.js} +1 -1
- package/dist/{CloudPanels-DnWDrgnQ.js → CloudPanels-BNL6rSeB.js} +2 -2
- package/dist/{CollaboratorBar-DUmeCkyD.js → CollaboratorBar-DlZ-wOL_.js} +1 -1
- package/dist/{CountdownToolbar-DkC-qSgq.js → CountdownToolbar-Bnq25sR-.js} +3 -3
- package/dist/{DesignReferenceSidebar-OoiYJAKS.js → DesignReferenceSidebar-Cl5eE8Kn.js} +1 -1
- package/dist/{LogicTagInsertButton-BimKobaG.js → LogicTagInsertButton-SI6irEtn.js} +243 -219
- package/dist/{MediaEditModal-BFWmufJK.js → MediaEditModal-C-InB-H2.js} +1 -1
- package/dist/{MediaPanels-BmDda5rY.js → MediaPanels-CTosUpeo.js} +1 -1
- package/dist/{MergeTagInput-DqpVzhy7.js → MergeTagInput-BMQGNh1k.js} +1 -1
- package/dist/{MergeTagModeToggle-BkIiAgpQ.js → MergeTagModeToggle-Cm9s-w6o.js} +1 -1
- package/dist/{ParagraphEditor-D67Cqh-T.js → ParagraphEditor-CnBPQCVo.js} +19 -19
- package/dist/{RestoreVersionDialog-BaKDuPCX.js → RestoreVersionDialog-B13whpxH.js} +1 -1
- package/dist/{RichTextEditorContent-AEtfKvLz.js → RichTextEditorContent-DOvhgc-7.js} +3 -3
- package/dist/{SaveBlockDialog-BxkI52fN.js → SaveBlockDialog-b5yrQfoN.js} +5 -5
- package/dist/{SavedBlocksBrowserModal-C4_25Kvn.js → SavedBlocksBrowserModal-DpqK4Zqp.js} +4 -4
- package/dist/{SavedBlocksPanels-DQ0w9G1O.js → SavedBlocksPanels-C2wURIlT.js} +1 -1
- package/dist/{SavedBlocksPickBar-CtH-sfxh.js → SavedBlocksPickBar-Bx9_SXVA.js} +1 -1
- package/dist/{TemplateSettings-BD1WNP4C.js → TemplateSettings-Gn9ps1R6.js} +3 -3
- package/dist/{TestEmailModal-DZi58FU9.js → TestEmailModal-DaIaklcg.js} +5 -5
- package/dist/{TestEmailPanel-D__9Wvgz.js → TestEmailPanel-CKSvzakC.js} +1 -1
- package/dist/{TitleEditor-v5p89Djs.js → TitleEditor-C66Jk73n.js} +7 -7
- package/dist/{ToggleSwitch-CJfQ8u57.js → ToggleSwitch-BqttX9lY.js} +1 -1
- package/dist/{Toolbar-C7SjilzH.js → Toolbar-DVsKYQaC.js} +846 -553
- package/dist/{TplModal-B8uLyoXE.js → TplModal-DRQln7xH.js} +2 -2
- package/dist/{VersionHistoryPanels-DfNrRT6y.js → VersionHistoryPanels-Df5WjNah.js} +1 -1
- package/dist/{WrapperBlock-yGmKw0T-.js → WrapperBlock-B0cUORGz.js} +4 -4
- package/dist/{blockTypeIcons-B0Bq1WT1.js → blockTypeIcons-DfQNZnl7.js} +1 -1
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-Ckgw9yd0.js → ca--zGWn9AU.js} +14 -0
- package/dist/cdn/chunks/{AiChatSidebar-mKImUXi6.js → AiChatSidebar-DD17BwXn.js} +10 -10
- package/dist/cdn/chunks/{AiChatSidebar-mKImUXi6.js.map → AiChatSidebar-DD17BwXn.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-23HCL517.js → AiFeatureMenu-Di381OsL.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-23HCL517.js.map → AiFeatureMenu-Di381OsL.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DS1pUf5g.js → BlockIssueBadge-BR_N3nRh.js} +2 -2
- package/dist/cdn/chunks/{BlockIssueBadge-DS1pUf5g.js.map → BlockIssueBadge-BR_N3nRh.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-DObWyQfh.js → BlockPreviewCanvas-BXpcAiiY.js} +28 -28
- package/dist/cdn/chunks/{BlockPreviewCanvas-DObWyQfh.js.map → BlockPreviewCanvas-BXpcAiiY.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DOB_uWpt.js → CloudHeaderExtras-BEM2eWfF.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-DOB_uWpt.js.map → CloudHeaderExtras-BEM2eWfF.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DcAn5QW7.js → CloudPanels-D7nK1-bm.js} +4 -4
- package/dist/cdn/chunks/{CloudPanels-DcAn5QW7.js.map → CloudPanels-D7nK1-bm.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-C0M8c2Vv.js → CollaboratorBar-D1SUwahw.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-C0M8c2Vv.js.map → CollaboratorBar-D1SUwahw.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-BtAGZfF6.js → CommentsPanel-qsLMAlJU.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-BtAGZfF6.js.map → CommentsPanel-qsLMAlJU.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-Ws07MXYj.js → CommentsSidebar-CTwEE-s_.js} +16 -16
- package/dist/cdn/chunks/{CommentsSidebar-Ws07MXYj.js.map → CommentsSidebar-CTwEE-s_.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Bu93WiS8.js → CountdownToolbar-BJTcnIQ-.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-Bu93WiS8.js.map → CountdownToolbar-BJTcnIQ-.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-BlSdh5B7.js → DesignReferenceSidebar-Dl3eEGtS.js} +9 -9
- package/dist/cdn/chunks/{DesignReferenceSidebar-BlSdh5B7.js.map → DesignReferenceSidebar-Dl3eEGtS.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CKkv9z9g.js → IssuesPanel-L9Gq_T8n.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-CKkv9z9g.js.map → IssuesPanel-L9Gq_T8n.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-CHc1yZ9v.js → LogicTagInsertButton-3pIbVE9p.js} +250 -226
- package/dist/cdn/chunks/LogicTagInsertButton-3pIbVE9p.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-CZBZviu2.js → MediaEditModal-rTjYl-fV.js} +2 -2
- package/dist/cdn/chunks/{MediaEditModal-CZBZviu2.js.map → MediaEditModal-rTjYl-fV.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-Bq5b-XJM.js → MediaPanels-DMXRQVqg.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-Bq5b-XJM.js.map → MediaPanels-DMXRQVqg.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput--qTYfCWk.js → MergeTagInput-JcBzr77a.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput--qTYfCWk.js.map → MergeTagInput-JcBzr77a.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-CdWIGo3Q.js → MergeTagModeToggle-CYmueXS2.js} +10 -10
- package/dist/cdn/chunks/{MergeTagModeToggle-CdWIGo3Q.js.map → MergeTagModeToggle-CYmueXS2.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BilbVtrG.js → ParagraphEditor-DbjFDnYm.js} +39 -39
- package/dist/cdn/chunks/{ParagraphEditor-BilbVtrG.js.map → ParagraphEditor-DbjFDnYm.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-Q-a44Vjv.js → RestoreVersionDialog-pANCWcce.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog-Q-a44Vjv.js.map → RestoreVersionDialog-pANCWcce.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-Fzuu9pLP.js → RichTextEditorContent-BtM1or8A.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-Fzuu9pLP.js.map → RichTextEditorContent-BtM1or8A.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-DeW_M6kh.js → SaveBlockDialog-CGM3mrGj.js} +38 -38
- package/dist/cdn/chunks/{SaveBlockDialog-DeW_M6kh.js.map → SaveBlockDialog-CGM3mrGj.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BzQWibKG.js → SavedBlocksBrowserModal-C6Z8AvtD.js} +10 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BzQWibKG.js.map → SavedBlocksBrowserModal-C6Z8AvtD.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-Ce1RePjk.js → SavedBlocksPanels-DNwKmnhp.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-Ce1RePjk.js.map → SavedBlocksPanels-DNwKmnhp.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DIDl6xfy.js → SavedBlocksPickBar-D2p1ufB4.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-DIDl6xfy.js.map → SavedBlocksPickBar-D2p1ufB4.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-d_Ppowsq.js → TemplateScoringPanel-BDB4RErx.js} +19 -19
- package/dist/cdn/chunks/{TemplateScoringPanel-d_Ppowsq.js.map → TemplateScoringPanel-BDB4RErx.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-Dr5OJ0Gi.js → TemplateSettings-DVN1t3yF.js} +9 -9
- package/dist/cdn/chunks/{TemplateSettings-Dr5OJ0Gi.js.map → TemplateSettings-DVN1t3yF.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-CWTmaJuT.js → TestEmailModal-DZBCmBtT.js} +7 -7
- package/dist/cdn/chunks/{TestEmailModal-CWTmaJuT.js.map → TestEmailModal-DZBCmBtT.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BdYsVHXA.js → TestEmailPanel-1ibwYCUl.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-BdYsVHXA.js.map → TestEmailPanel-1ibwYCUl.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-pJeeZ-PX.js → TitleEditor-BRl2qKbd.js} +13 -13
- package/dist/cdn/chunks/{TitleEditor-pJeeZ-PX.js.map → TitleEditor-BRl2qKbd.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-0dGCYnRY.js → ToggleSwitch-niSL2uog.js} +2 -2
- package/dist/cdn/chunks/{ToggleSwitch-0dGCYnRY.js.map → ToggleSwitch-niSL2uog.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-BsiHW9gY.js → Toolbar-tTl0P-rr.js} +814 -566
- package/dist/cdn/chunks/Toolbar-tTl0P-rr.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-CEuGD7pt.js → TplModal-C_eIPykE.js} +3 -3
- package/dist/cdn/chunks/{TplModal-CEuGD7pt.js.map → TplModal-C_eIPykE.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-B3-hNu9c.js → VersionHistoryMenu-Ww57XAzj.js} +7 -7
- package/dist/cdn/chunks/{VersionHistoryMenu-B3-hNu9c.js.map → VersionHistoryMenu-Ww57XAzj.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-C1yck5gT.js → VersionHistoryPanels-w0EG_qVW.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-C1yck5gT.js.map → VersionHistoryPanels-w0EG_qVW.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-PzVQSBJE.js → VersionPreviewBanner-Bbd4C-AN.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-PzVQSBJE.js.map → VersionPreviewBanner-Bbd4C-AN.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-DGkbmj06.js → WrapperBlock-Ch4KeMIb.js} +4 -4
- package/dist/cdn/chunks/{WrapperBlock-DGkbmj06.js.map → WrapperBlock-Ch4KeMIb.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-CyPXFh7L.js +21 -0
- package/dist/cdn/chunks/{blockTypeIcons-raBjStuv.js.map → blockTypeIcons-CyPXFh7L.js.map} +1 -1
- package/dist/cdn/chunks/{ca-Ckgw9yd0.js → ca--zGWn9AU.js} +15 -1
- package/dist/cdn/chunks/ca--zGWn9AU.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CIT4yPp4.js → cloud-De-eh1u6.js} +2 -2
- package/dist/cdn/chunks/{cloud-CIT4yPp4.js.map → cloud-De-eh1u6.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-COUxbPvd.js → createCloudRuntime-DsaUaWvr.js} +3 -3
- package/dist/cdn/chunks/{createCloudRuntime-COUxbPvd.js.map → createCloudRuntime-DsaUaWvr.js.map} +1 -1
- package/dist/cdn/chunks/{de-D4dweQw8.js → de-BRNLKcDl.js} +15 -1
- package/dist/cdn/chunks/de-BRNLKcDl.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-zxvWz8R6.js → editor-modal-BdI0iA5r.js} +89 -88
- package/dist/cdn/chunks/{editor-modal-zxvWz8R6.js.map → editor-modal-BdI0iA5r.js.map} +1 -1
- package/dist/cdn/chunks/en-Cs-nw16K.js +2 -0
- package/dist/{en-VE7R7NyL.js → cdn/chunks/en-JJjqHMjy.js} +16 -0
- package/dist/cdn/chunks/en-JJjqHMjy.js.map +1 -0
- package/dist/cdn/chunks/{es-B9OhP8H3.js → es-BIh8BxV9.js} +15 -1
- package/dist/cdn/chunks/es-BIh8BxV9.js.map +1 -0
- package/dist/cdn/chunks/{extensions-CafoGF65.js → extensions-DK_9-6Bd.js} +4 -4
- package/dist/cdn/chunks/{extensions-CafoGF65.js.map → extensions-DK_9-6Bd.js.map} +1 -1
- package/dist/{fr-wrXhIi00.js → cdn/chunks/fr-C5VUZogP.js} +16 -0
- package/dist/cdn/chunks/fr-C5VUZogP.js.map +1 -0
- package/dist/cdn/chunks/{icons-BKkJ-5xF.js → icons-Bad3WZ3G.js} +49 -8
- package/dist/cdn/chunks/icons-Bad3WZ3G.js.map +1 -0
- package/dist/cdn/chunks/ja-DhlWUfke.js +94 -0
- package/dist/cdn/chunks/ja-DhlWUfke.js.map +1 -0
- package/dist/cdn/chunks/ja-x5JYxaCW.js +639 -0
- package/dist/cdn/chunks/ja-x5JYxaCW.js.map +1 -0
- package/dist/cdn/chunks/{nl-DeFatKJe.js → nl-UXxFyXV6.js} +15 -1
- package/dist/cdn/chunks/{nl-DeFatKJe.js.map → nl-UXxFyXV6.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dpj-_cOj.js → preRenderCustomBlocks-h4ZFBKbD.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dpj-_cOj.js.map → preRenderCustomBlocks-h4ZFBKbD.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-Bh1J8ey6.js → pt-BR-DHm3SP6W.js} +15 -1
- package/dist/cdn/chunks/pt-BR-DHm3SP6W.js.map +1 -0
- package/dist/cdn/chunks/{socialIcons-BvYNMn1G.js → socialIcons-ZOCwCCyn.js} +3 -3
- package/dist/cdn/chunks/{socialIcons-BvYNMn1G.js.map → socialIcons-ZOCwCCyn.js.map} +1 -1
- package/dist/cdn/chunks/{src-DveVYoWS.js → src-BR3I3gOW.js} +265 -224
- package/dist/cdn/chunks/src-BR3I3gOW.js.map +1 -0
- package/dist/cdn/chunks/{src-CbGCES0u.js → src-BxoLKnkl.js} +178 -165
- package/dist/cdn/chunks/src-BxoLKnkl.js.map +1 -0
- package/dist/cdn/chunks/{src-Cnc5E71L.js → src-fZSLjhjy.js} +12 -12
- package/dist/cdn/chunks/{src-Cnc5E71L.js.map → src-fZSLjhjy.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CQraU2s_.js → useEditorCore-yd40TFKy.js} +467 -446
- package/dist/cdn/chunks/useEditorCore-yd40TFKy.js.map +1 -0
- package/dist/cdn/chunks/{useLogicTag-DF7-l66G.js → useLogicTag-J_i_hvZg.js} +2 -2
- package/dist/cdn/chunks/{useLogicTag-DF7-l66G.js.map → useLogicTag-J_i_hvZg.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-DbIHw4NG.js → useMergeTag-C5MyHYxJ.js} +2 -2
- package/dist/cdn/chunks/{useMergeTag-DbIHw4NG.js.map → useMergeTag-C5MyHYxJ.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BJRvAb-h.js → usePopoverPosition-DGXjXKjM.js} +25 -12
- package/dist/cdn/chunks/usePopoverPosition-DGXjXKjM.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +64 -64
- package/dist/{cloud-DsqqUfzh.js → cloud-AO_X8T9g.js} +1 -1
- package/dist/{createCloudRuntime-iLflkYzP.js → createCloudRuntime-D641nhri.js} +2 -2
- package/dist/{de-D4dweQw8.js → de-BRNLKcDl.js} +14 -0
- package/dist/{dist-DbUZvK04.js → dist-iLUVPysa.js} +263 -222
- package/dist/{editor-modal-Czq1I8oC.js → editor-modal-qzmEVcIk.js} +3 -2
- package/dist/en-1tgLzB8q.js +2 -0
- package/dist/{cdn/chunks/en-VE7R7NyL.js → en-JJjqHMjy.js} +14 -2
- package/dist/{es-B9OhP8H3.js → es-BIh8BxV9.js} +14 -0
- package/dist/{extensions-DDhjuVKy.js → extensions-DoT2-_pz.js} +11 -11
- package/dist/{cdn/chunks/fr-wrXhIi00.js → fr-C5VUZogP.js} +14 -2
- package/dist/ja-DhlWUfke.js +92 -0
- package/dist/ja-x5JYxaCW.js +637 -0
- package/dist/{nl-DeFatKJe.js → nl-UXxFyXV6.js} +14 -0
- package/dist/{preRenderCustomBlocks-BBSqQgke.js → preRenderCustomBlocks-CTstI3Q-.js} +4 -4
- package/dist/{pt-BR-Bh1J8ey6.js → pt-BR-DHm3SP6W.js} +14 -0
- package/dist/{socialIcons-O7PZCW2P.js → socialIcons-CACVa6m_.js} +46 -46
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +109 -109
- package/dist/{useEditorCore-Dt_VWNqX.js → useEditorCore-LyNoGs0m.js} +902 -881
- package/dist/{useLogicTag-D9pvgxQR.js → useLogicTag-BaH8gey0.js} +1 -1
- package/dist/{useMergeTag-BaVFPdlq.js → useMergeTag-Cyad1yBE.js} +1 -1
- package/dist/{usePopoverPosition-DH7z3Ghm.js → usePopoverPosition-BYmd-lhR.js} +24 -11
- package/package.json +8 -8
- package/dist/cdn/chunks/LogicTagInsertButton-CHc1yZ9v.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-BsiHW9gY.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-raBjStuv.js +0 -21
- package/dist/cdn/chunks/ca-Ckgw9yd0.js.map +0 -1
- package/dist/cdn/chunks/de-D4dweQw8.js.map +0 -1
- package/dist/cdn/chunks/en-BcQ9ovQu.js +0 -2
- package/dist/cdn/chunks/en-VE7R7NyL.js.map +0 -1
- package/dist/cdn/chunks/es-B9OhP8H3.js.map +0 -1
- package/dist/cdn/chunks/fr-wrXhIi00.js.map +0 -1
- package/dist/cdn/chunks/icons-BKkJ-5xF.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-Bh1J8ey6.js.map +0 -1
- package/dist/cdn/chunks/src-CbGCES0u.js.map +0 -1
- package/dist/cdn/chunks/src-DveVYoWS.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CQraU2s_.js.map +0 -1
- package/dist/cdn/chunks/usePopoverPosition-BJRvAb-h.js.map +0 -1
- package/dist/en-DQqmtndQ.js +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as e, G as t, Q as n, S as r, X as i, Z as a,
|
|
1
|
+
import { $ as e, G as t, Q as n, S as r, X as i, Z as a, _t as o, at as s, b as c, ct as l, et as u, ht as d, lt as f, mt as p, nt as m, ot as h, rt as g, st as _, tt as v, ut as y, v as b, vt as x, x as ee, y as S } from "./src-BR3I3gOW.js";
|
|
2
2
|
//#endregion
|
|
3
3
|
//#region ../renderer/src/render-context.ts
|
|
4
|
-
var
|
|
4
|
+
var C = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
|
|
5
5
|
name: "@templatical/renderer",
|
|
6
6
|
description: "Render Templatical email templates to MJML",
|
|
7
|
-
version: "0.
|
|
7
|
+
version: "0.42.0",
|
|
8
8
|
bugs: "https://github.com/templatical/sdk/issues",
|
|
9
9
|
dependencies: { "@templatical/types": "workspace:*" },
|
|
10
10
|
devDependencies: {
|
|
@@ -42,7 +42,7 @@ var x = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
|
|
|
42
42
|
},
|
|
43
43
|
type: "module",
|
|
44
44
|
types: "./dist/index.d.ts"
|
|
45
|
-
}.version}/assets/social`,
|
|
45
|
+
}.version}/assets/social`, te = {
|
|
46
46
|
arial: "Arial, sans-serif",
|
|
47
47
|
helvetica: "Helvetica, sans-serif",
|
|
48
48
|
georgia: "Georgia, serif",
|
|
@@ -51,7 +51,7 @@ var x = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
|
|
|
51
51
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
52
52
|
"courier new": "'Courier New', monospace",
|
|
53
53
|
tahoma: "Tahoma, sans-serif"
|
|
54
|
-
},
|
|
54
|
+
}, w = class e {
|
|
55
55
|
containerWidth;
|
|
56
56
|
customFonts;
|
|
57
57
|
defaultFallbackFont;
|
|
@@ -60,7 +60,7 @@ var x = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
|
|
|
60
60
|
socialIconsBaseUrl;
|
|
61
61
|
blockRenderers;
|
|
62
62
|
contentDirection;
|
|
63
|
-
constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a =
|
|
63
|
+
constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a = C, o = {}, s = "ltr") {
|
|
64
64
|
this.containerWidth = e, this.customFonts = t, this.defaultFallbackFont = n, this.allowHtmlBlocks = r, this.customBlockHtml = i, this.socialIconsBaseUrl = a, this.blockRenderers = o, this.contentDirection = s;
|
|
65
65
|
}
|
|
66
66
|
withContainerWidth(t) {
|
|
@@ -71,20 +71,20 @@ var x = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
|
|
|
71
71
|
let e = t.fallback ?? this.defaultFallbackFont;
|
|
72
72
|
return `'${t.name}', ${e}`;
|
|
73
73
|
}
|
|
74
|
-
return
|
|
74
|
+
return te[e.toLowerCase()] || e;
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region ../renderer/src/visibility.ts
|
|
79
|
-
function
|
|
79
|
+
function T(e) {
|
|
80
80
|
let t = e.visibility;
|
|
81
81
|
return t ? !t.desktop && !t.mobile : !1;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
let n = [
|
|
83
|
+
function E(e, t = []) {
|
|
84
|
+
let n = [D(e), ...t].filter((e) => e !== "").join(" ");
|
|
85
85
|
return n === "" ? "" : ` css-class="${n}"`;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function D(e) {
|
|
88
88
|
let t = e.visibility;
|
|
89
89
|
if (!t) return "";
|
|
90
90
|
let n = [];
|
|
@@ -92,35 +92,35 @@ function E(e) {
|
|
|
92
92
|
}
|
|
93
93
|
//#endregion
|
|
94
94
|
//#region ../renderer/src/unrenderable.ts
|
|
95
|
-
var
|
|
96
|
-
function
|
|
95
|
+
var O = "templatical:unrenderable-block";
|
|
96
|
+
function k(e) {
|
|
97
97
|
return e.replace(/[<>]/g, "").replace(/-{2,}/g, "-");
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
return console.warn(`[Templatical] No renderer for block type "${e.type}" (id: ${e.id}). A placeholder comment was emitted in its place. Pass a \`blockRenderers\` entry for this type to render it.`), `<mj-raw><!-- ${
|
|
99
|
+
function A(e) {
|
|
100
|
+
return console.warn(`[Templatical] No renderer for block type "${e.type}" (id: ${e.id}). A placeholder comment was emitted in its place. Pass a \`blockRenderers\` entry for this type to render it.`), `<mj-raw><!-- ${O} type="${k(e.type)}" id="${k(e.id)}" --></mj-raw>`;
|
|
101
101
|
}
|
|
102
102
|
//#endregion
|
|
103
103
|
//#region ../renderer/src/escape.ts
|
|
104
|
-
var
|
|
104
|
+
var j = {
|
|
105
105
|
"&": "&",
|
|
106
106
|
"<": "<",
|
|
107
107
|
">": ">",
|
|
108
108
|
"\"": """,
|
|
109
109
|
"'": "'"
|
|
110
|
-
},
|
|
111
|
-
function M(e) {
|
|
112
|
-
return e === "" ? "" : e.replace(j, (e) => A[e] ?? e);
|
|
113
|
-
}
|
|
110
|
+
}, M = /[&<>"']/g;
|
|
114
111
|
function N(e) {
|
|
115
|
-
return e === "" ? "" : e.replace(
|
|
112
|
+
return e === "" ? "" : e.replace(M, (e) => j[e] ?? e);
|
|
116
113
|
}
|
|
117
114
|
function P(e) {
|
|
118
|
-
return e === "" ? "" :
|
|
115
|
+
return e === "" ? "" : e.replace(M, (e) => j[e] ?? e);
|
|
119
116
|
}
|
|
120
117
|
function F(e) {
|
|
121
|
-
return e === "" ? "" :
|
|
118
|
+
return e === "" ? "" : P(e).replace(/[;{}\r\n]/g, "");
|
|
122
119
|
}
|
|
123
|
-
function
|
|
120
|
+
function I(e) {
|
|
121
|
+
return e === "" ? "" : ne(e, (e) => L(e, "data-merge-tag") ?? L(e, "data-logic-merge-tag"));
|
|
122
|
+
}
|
|
123
|
+
function ne(e, t) {
|
|
124
124
|
let n = "", r = 0;
|
|
125
125
|
for (; r < e.length;) {
|
|
126
126
|
let i = e.indexOf("<span", r);
|
|
@@ -133,7 +133,7 @@ function te(e, t) {
|
|
|
133
133
|
n += e.substring(r, i + 5), r = i + 5;
|
|
134
134
|
continue;
|
|
135
135
|
}
|
|
136
|
-
let o =
|
|
136
|
+
let o = b(e, i + 5);
|
|
137
137
|
if (o === -1) {
|
|
138
138
|
n += e.substring(r);
|
|
139
139
|
break;
|
|
@@ -152,31 +152,38 @@ function te(e, t) {
|
|
|
152
152
|
}
|
|
153
153
|
return n;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
return
|
|
155
|
+
function L(e, t) {
|
|
156
|
+
return S(e, t);
|
|
157
157
|
}
|
|
158
158
|
//#endregion
|
|
159
159
|
//#region ../renderer/src/padding.ts
|
|
160
|
-
function
|
|
160
|
+
function R(e) {
|
|
161
161
|
return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
|
|
162
162
|
}
|
|
163
163
|
//#endregion
|
|
164
164
|
//#region ../renderer/src/utils.ts
|
|
165
|
-
function
|
|
165
|
+
function z(e, t) {
|
|
166
166
|
return e ? ` ${t === "native" ? "background-color" : "container-background-color"}="${e}"` : "";
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function B(e) {
|
|
169
169
|
return typeof e != "number" || !Number.isFinite(e) || e <= 0 ? "" : ` height="${e}px"`;
|
|
170
170
|
}
|
|
171
|
+
function V(e) {
|
|
172
|
+
return Object.entries(o(e)).map(([e, t]) => ` ${e}="${F(t)}"`).join("");
|
|
173
|
+
}
|
|
174
|
+
function H(e) {
|
|
175
|
+
let t = x(e);
|
|
176
|
+
return t === null ? "" : ` border-radius="${t}"`;
|
|
177
|
+
}
|
|
171
178
|
//#endregion
|
|
172
179
|
//#region ../renderer/src/rich-text.ts
|
|
173
|
-
var
|
|
174
|
-
function
|
|
175
|
-
return `${
|
|
180
|
+
var U = "tpl-rich-text";
|
|
181
|
+
function W(e) {
|
|
182
|
+
return `${U}-${e}`;
|
|
176
183
|
}
|
|
177
|
-
function
|
|
178
|
-
let n =
|
|
179
|
-
let t = `.${
|
|
184
|
+
function re(e, t = "ltr") {
|
|
185
|
+
let n = d, r = `.${U}`, i = [...new Set(e)].sort((e, t) => e - t).flatMap((e) => {
|
|
186
|
+
let t = `.${W(e)}`;
|
|
180
187
|
return [`${t} p { margin: 0 0 ${e}px; }`, `${t} p:last-child { margin-bottom: 0; }`];
|
|
181
188
|
}), a = t === "rtl" ? "padding-right" : "padding-left";
|
|
182
189
|
return [
|
|
@@ -185,41 +192,41 @@ function ne(e, t = "ltr") {
|
|
|
185
192
|
`${r} li { margin: ${n.listItemMarginY}px 0; }`
|
|
186
193
|
].join("\n ");
|
|
187
194
|
}
|
|
188
|
-
function
|
|
189
|
-
return e ??
|
|
195
|
+
function G(e) {
|
|
196
|
+
return e ?? d.paragraphGap;
|
|
190
197
|
}
|
|
191
|
-
function
|
|
192
|
-
let t = [
|
|
193
|
-
if (e.type === "paragraph" && t.push(
|
|
194
|
-
else if (
|
|
198
|
+
function ie(e) {
|
|
199
|
+
let t = [d.paragraphGap], n = (e) => {
|
|
200
|
+
if (e.type === "paragraph" && t.push(G(e.paragraphSpacing)), g(e)) for (let t of e.children) for (let e of t) n(e);
|
|
201
|
+
else if (y(e)) for (let t of e.children) n(t);
|
|
195
202
|
};
|
|
196
203
|
for (let t of e) n(t);
|
|
197
204
|
return t;
|
|
198
205
|
}
|
|
199
206
|
//#endregion
|
|
200
207
|
//#region ../renderer/src/renderers/title.ts
|
|
201
|
-
function
|
|
202
|
-
if (
|
|
203
|
-
let n =
|
|
208
|
+
function ae(e, t) {
|
|
209
|
+
if (T(e)) return "";
|
|
210
|
+
let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = oe(I(e.content)), a = p[e.level] ?? p[2], o = e.color ? `\n color="${P(e.color)}"` : "", s = e.textAlign, c = se(e.fontFamily, t), l = E(e, [U, W(G(void 0))]), u = `h${p[e.level] ? e.level : 2}`;
|
|
204
211
|
return `<mj-text
|
|
205
212
|
font-size="${a}px"${o}
|
|
206
213
|
align="${s}"
|
|
207
214
|
line-height="1.3"
|
|
208
215
|
padding="${n}"${r}${c}${l}
|
|
209
|
-
><${
|
|
216
|
+
><${u} style="margin:0;font-size:inherit;color:inherit;line-height:inherit">${i}</${u}></mj-text>`;
|
|
210
217
|
}
|
|
211
|
-
function
|
|
218
|
+
function oe(e) {
|
|
212
219
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
213
220
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
214
221
|
}
|
|
215
|
-
function
|
|
222
|
+
function se(e, t) {
|
|
216
223
|
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
217
224
|
}
|
|
218
225
|
//#endregion
|
|
219
226
|
//#region ../renderer/src/renderers/paragraph.ts
|
|
220
|
-
function
|
|
221
|
-
if (
|
|
222
|
-
let n =
|
|
227
|
+
function ce(e, t) {
|
|
228
|
+
if (T(e) || e.content.replace(/<\/?p\b[^<>]*>/gi, "").trim() === "") return "";
|
|
229
|
+
let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = I(e.content), a = E(e, [U, W(G(e.paragraphSpacing))]);
|
|
223
230
|
return `<mj-text
|
|
224
231
|
line-height="1.5"${t.contentDirection === "rtl" ? "\n align=\"right\"" : ""}
|
|
225
232
|
padding="${n}"${r}${a}
|
|
@@ -227,77 +234,83 @@ function se(e, t) {
|
|
|
227
234
|
}
|
|
228
235
|
//#endregion
|
|
229
236
|
//#region ../renderer/src/renderers/image.ts
|
|
230
|
-
function
|
|
231
|
-
if (
|
|
232
|
-
let n =
|
|
233
|
-
e.linkUrl && (
|
|
234
|
-
let
|
|
237
|
+
function le(e, t) {
|
|
238
|
+
if (T(e) || e.src === "") return "";
|
|
239
|
+
let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = e.width === "full" ? t.containerWidth + "px" : e.width + "px", a = B(e.height), o = E(e), s = H(e.borderRadius), c = V(e.border), l = "";
|
|
240
|
+
e.linkUrl && (l = ` href="${P(e.linkUrl)}"`, e.linkOpenInNewTab && (l += " target=\"_blank\" rel=\"noopener\""));
|
|
241
|
+
let u = P(e.src), d = e.decorative === !0;
|
|
235
242
|
return `<mj-image
|
|
236
|
-
src="${
|
|
237
|
-
alt="${
|
|
243
|
+
src="${u}"
|
|
244
|
+
alt="${d ? "" : P(e.alt)}"
|
|
238
245
|
width="${i}"${a}
|
|
239
246
|
align="${e.align}"
|
|
240
|
-
padding="${n}"${r}${s}${
|
|
247
|
+
padding="${n}"${r}${c}${s}${l}${o}${d ? " role=\"presentation\"" : ""}
|
|
241
248
|
/>`;
|
|
242
249
|
}
|
|
243
250
|
//#endregion
|
|
244
251
|
//#region ../renderer/src/renderers/button.ts
|
|
245
|
-
function
|
|
246
|
-
if (
|
|
247
|
-
let n =
|
|
252
|
+
function ue(e, t) {
|
|
253
|
+
if (T(e)) return "";
|
|
254
|
+
let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = R(e.buttonPadding), a = e.url === "" ? "" : P(e.url), o = a === "" ? "" : ` href="${a}"`, s = de(e.backgroundColor), c = P(e.textColor), l = e.fontSize, u = pe(e.borderRadius), d = N(e.text), f = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", p = fe(e.fontFamily, t), m = me(e.width), h = E(e);
|
|
248
255
|
return `<mj-button${o}${f}
|
|
249
256
|
background-color="${s}"
|
|
250
257
|
color="${c}"
|
|
251
258
|
font-size="${l}px"
|
|
252
259
|
font-weight="bold"
|
|
253
|
-
border-radius="${u}
|
|
260
|
+
border-radius="${u}"${V(e.border)}
|
|
254
261
|
inner-padding="${i}"
|
|
255
262
|
align="${e.align ?? "center"}"
|
|
256
263
|
padding="${n}"${r}${p}${m}${h}
|
|
257
264
|
>${d}</mj-button>`;
|
|
258
265
|
}
|
|
259
|
-
function
|
|
266
|
+
function de(e) {
|
|
267
|
+
return e.trim() === "" ? "transparent" : P(e);
|
|
268
|
+
}
|
|
269
|
+
function fe(e, t) {
|
|
260
270
|
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
261
271
|
}
|
|
262
|
-
function
|
|
272
|
+
function pe(e) {
|
|
273
|
+
return typeof e == "number" ? `${e}px` : x(e) ?? "0px";
|
|
274
|
+
}
|
|
275
|
+
function me(e) {
|
|
263
276
|
return e === void 0 ? "" : ` width="${e === "full" ? "100%" : `${e}px`}"`;
|
|
264
277
|
}
|
|
265
278
|
//#endregion
|
|
266
279
|
//#region ../renderer/src/renderers/divider.ts
|
|
267
|
-
function
|
|
268
|
-
if (
|
|
269
|
-
let n =
|
|
280
|
+
function he(e, t) {
|
|
281
|
+
if (T(e)) return "";
|
|
282
|
+
let n = R(e.styles.padding), r = e.styles.backgroundColor ? ` container-background-color="${P(e.styles.backgroundColor)}"` : "", i = e.width === "full" ? "100%" : e.width + "px";
|
|
270
283
|
return `<mj-divider
|
|
271
284
|
border-width="${e.thickness}px"
|
|
272
285
|
border-style="${e.lineStyle}"
|
|
273
|
-
border-color="${
|
|
286
|
+
border-color="${P(e.color)}"
|
|
274
287
|
width="${i}"
|
|
275
|
-
padding="${n}"${r}${
|
|
288
|
+
padding="${n}"${r}${E(e)}
|
|
276
289
|
/>`;
|
|
277
290
|
}
|
|
278
291
|
//#endregion
|
|
279
292
|
//#region ../renderer/src/renderers/spacer.ts
|
|
280
|
-
function
|
|
281
|
-
return
|
|
293
|
+
function ge(e, t) {
|
|
294
|
+
return T(e) ? "" : `<mj-spacer height="${e.height}px" padding="0"${e.styles.backgroundColor ? ` container-background-color="${P(e.styles.backgroundColor)}"` : ""}${E(e)} />`;
|
|
282
295
|
}
|
|
283
296
|
//#endregion
|
|
284
297
|
//#region ../renderer/src/renderers/html.ts
|
|
285
|
-
function
|
|
286
|
-
if (
|
|
298
|
+
function _e(e, t) {
|
|
299
|
+
if (T(e) || !t.allowHtmlBlocks) return "";
|
|
287
300
|
let n = e.content;
|
|
288
301
|
if (n === "") return "";
|
|
289
|
-
let r =
|
|
290
|
-
return `<mj-text padding="${
|
|
302
|
+
let r = E(e);
|
|
303
|
+
return `<mj-text padding="${R(e.styles.padding)}"${z(e.styles.backgroundColor, "container")}${r}>
|
|
291
304
|
${n}
|
|
292
305
|
</mj-text>`;
|
|
293
306
|
}
|
|
294
307
|
//#endregion
|
|
295
308
|
//#region ../renderer/src/renderers/social.ts
|
|
296
|
-
function
|
|
297
|
-
if (
|
|
309
|
+
function ve(e, t) {
|
|
310
|
+
if (T(e)) return "";
|
|
298
311
|
let n = e.icons;
|
|
299
312
|
if (n.length === 0) return "";
|
|
300
|
-
let r =
|
|
313
|
+
let r = R(e.styles.padding), i = e.styles.backgroundColor ? ` container-background-color="${P(e.styles.backgroundColor)}"` : "", a = E(e), o = e.align, s = e.iconSize, c = e.iconStyle, l = e.spacing, u;
|
|
301
314
|
switch (s) {
|
|
302
315
|
case "small":
|
|
303
316
|
u = 24;
|
|
@@ -328,83 +341,83 @@ function pe(e, t) {
|
|
|
328
341
|
padding="${r}"${i}${a}
|
|
329
342
|
>
|
|
330
343
|
${n.map((e, n) => {
|
|
331
|
-
let r = e.platform, i =
|
|
344
|
+
let r = e.platform, i = P(e.url), a = `${t.socialIconsBaseUrl}/${c}/${r}.png`, o = n === f - 1 ? 0 : l;
|
|
332
345
|
return `<mj-social-element src="${a}" href="${i}" icon-size="${u}px" padding="0 ${o}px 0 0" border-radius="${d}" background-color="transparent"></mj-social-element>`;
|
|
333
346
|
}).join("\n")}
|
|
334
347
|
</mj-social>`;
|
|
335
348
|
}
|
|
336
349
|
//#endregion
|
|
337
350
|
//#region ../renderer/src/renderers/menu.ts
|
|
338
|
-
function
|
|
339
|
-
if (
|
|
340
|
-
let n =
|
|
351
|
+
function ye(e, t) {
|
|
352
|
+
if (T(e) || e.items.length === 0) return "";
|
|
353
|
+
let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = E(e), a = Se(e.fontFamily, t), o = e.textAlign;
|
|
341
354
|
return `<mj-text
|
|
342
|
-
font-size="${e.fontSize}px"${e.color ? `\n color="${
|
|
355
|
+
font-size="${e.fontSize}px"${e.color ? `\n color="${P(e.color)}"` : ""}
|
|
343
356
|
align="${o}"
|
|
344
357
|
line-height="1.5"
|
|
345
358
|
padding="${n}"${r}${a}${i}
|
|
346
|
-
>${
|
|
359
|
+
>${be(e)}</mj-text>`;
|
|
347
360
|
}
|
|
348
|
-
function
|
|
349
|
-
let t = e.items, n =
|
|
350
|
-
for (let e = 0; e < s; e++) o.push(
|
|
361
|
+
function be(e) {
|
|
362
|
+
let t = e.items, n = N(e.separator), r = F(e.separatorColor), i = e.spacing, a = e.linkColor ?? e.color, o = [], s = t.length;
|
|
363
|
+
for (let e = 0; e < s; e++) o.push(xe(t[e], a)), e < s - 1 && o.push(`<span style="color: ${r}; padding: 0 ${i}px;">${n}</span>`);
|
|
351
364
|
return o.join("");
|
|
352
365
|
}
|
|
353
|
-
function
|
|
354
|
-
let n =
|
|
355
|
-
return i && o.unshift(`color: ${
|
|
366
|
+
function xe(e, t) {
|
|
367
|
+
let n = N(e.text), r = P(e.url), i = e.color ?? t, a = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", o = ["text-decoration: none"];
|
|
368
|
+
return i && o.unshift(`color: ${F(i)}`), e.bold && o.push("font-weight: bold"), e.underline && o.push("text-decoration: underline"), `<a href="${r}" style="${o.join("; ")}"${a}>${n}</a>`;
|
|
356
369
|
}
|
|
357
|
-
function
|
|
370
|
+
function Se(e, t) {
|
|
358
371
|
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
359
372
|
}
|
|
360
373
|
//#endregion
|
|
361
374
|
//#region ../renderer/src/renderers/table.ts
|
|
362
|
-
function
|
|
363
|
-
if (
|
|
364
|
-
let n =
|
|
375
|
+
function Ce(e, t) {
|
|
376
|
+
if (T(e) || e.rows.length === 0) return "";
|
|
377
|
+
let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = E(e), a = De(e.fontFamily, t);
|
|
365
378
|
return `<mj-text
|
|
366
|
-
font-size="${e.fontSize}px"${e.color ? `\n color="${
|
|
379
|
+
font-size="${e.fontSize}px"${e.color ? `\n color="${P(e.color)}"` : ""}
|
|
367
380
|
align="${e.textAlign}"
|
|
368
381
|
line-height="1.5"
|
|
369
382
|
padding="${n}"${r}${a}${i}
|
|
370
|
-
>${
|
|
383
|
+
>${we(e)}</mj-text>`;
|
|
371
384
|
}
|
|
372
|
-
function
|
|
373
|
-
let t =
|
|
385
|
+
function we(e) {
|
|
386
|
+
let t = F(e.borderColor), n = e.borderWidth, r = "";
|
|
374
387
|
for (let i = 0; i < e.rows.length; i++) {
|
|
375
388
|
let a = e.rows[i];
|
|
376
|
-
r +=
|
|
389
|
+
r += Te(a, e, e.hasHeaderRow && i === 0, t, n);
|
|
377
390
|
}
|
|
378
391
|
return `<table style="width: 100%; border-collapse: collapse;">${r}</table>`;
|
|
379
392
|
}
|
|
380
|
-
function
|
|
393
|
+
function Te(e, t, n, r, i) {
|
|
381
394
|
let a = "";
|
|
382
|
-
for (let o of e.cells) a +=
|
|
395
|
+
for (let o of e.cells) a += Ee(o, t, n, r, i);
|
|
383
396
|
return `<tr>${a}</tr>`;
|
|
384
397
|
}
|
|
385
|
-
function
|
|
398
|
+
function Ee(e, t, n, r, i) {
|
|
386
399
|
let a = t.cellPadding, o = [`border: ${i}px solid ${r}`, `padding: ${a}px`];
|
|
387
|
-
n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${
|
|
388
|
-
let s = o.join("; "), c =
|
|
400
|
+
n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${F(t.headerBackgroundColor)}`));
|
|
401
|
+
let s = o.join("; "), c = N(I(e.content)), l = n ? "th" : "td";
|
|
389
402
|
return `<${l} style="${s}">${c}</${l}>`;
|
|
390
403
|
}
|
|
391
|
-
function
|
|
404
|
+
function De(e, t) {
|
|
392
405
|
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
393
406
|
}
|
|
394
407
|
//#endregion
|
|
395
408
|
//#region ../renderer/src/renderers/custom.ts
|
|
396
|
-
function
|
|
397
|
-
if (
|
|
409
|
+
function Oe(e, t) {
|
|
410
|
+
if (T(e)) return "";
|
|
398
411
|
let n = t.customBlockHtml.get(e.id) ?? e.renderedHtml;
|
|
399
412
|
if (!n || n === "") return "";
|
|
400
|
-
let r =
|
|
401
|
-
return `<mj-text padding="${
|
|
413
|
+
let r = E(e);
|
|
414
|
+
return `<mj-text padding="${R(e.styles.padding)}"${z(e.styles.backgroundColor, "container")}${r}>
|
|
402
415
|
${n}
|
|
403
416
|
</mj-text>`;
|
|
404
417
|
}
|
|
405
418
|
//#endregion
|
|
406
419
|
//#region ../renderer/src/columns.ts
|
|
407
|
-
function
|
|
420
|
+
function K(e) {
|
|
408
421
|
switch (e) {
|
|
409
422
|
case "2": return ["50%", "50%"];
|
|
410
423
|
case "3": return [
|
|
@@ -417,7 +430,7 @@ function G(e) {
|
|
|
417
430
|
default: return ["100%"];
|
|
418
431
|
}
|
|
419
432
|
}
|
|
420
|
-
function
|
|
433
|
+
function q(e, t) {
|
|
421
434
|
switch (e) {
|
|
422
435
|
case "2": return [t * .5, t * .5];
|
|
423
436
|
case "3": return [
|
|
@@ -432,7 +445,7 @@ function K(e, t) {
|
|
|
432
445
|
}
|
|
433
446
|
//#endregion
|
|
434
447
|
//#region ../renderer/src/display-condition.ts
|
|
435
|
-
function
|
|
448
|
+
function J(e, t) {
|
|
436
449
|
if (t === "") return "";
|
|
437
450
|
let n = e.displayCondition;
|
|
438
451
|
return n ? `<mj-raw>${n.before}</mj-raw>
|
|
@@ -441,28 +454,28 @@ function q(e, t) {
|
|
|
441
454
|
}
|
|
442
455
|
//#endregion
|
|
443
456
|
//#region ../renderer/src/renderers/section.ts
|
|
444
|
-
function
|
|
445
|
-
if (
|
|
446
|
-
let r = e.columns, i =
|
|
447
|
-
for (let e = 0; e <
|
|
448
|
-
let r =
|
|
449
|
-
|
|
450
|
-
${
|
|
457
|
+
function ke(e, t, n) {
|
|
458
|
+
if (T(e)) return "";
|
|
459
|
+
let r = e.columns, i = K(r), a = q(r, t.containerWidth), o = R(e.styles.padding), s = z(e.styles.backgroundColor, "native"), c = E(e), l = H(e.borderRadius), u = V(e.border), d = e.children, f = [];
|
|
460
|
+
for (let e = 0; e < d.length; e++) {
|
|
461
|
+
let r = d[e], o = i[e] ?? "100%", s = Math.floor(a[e] ?? t.containerWidth), c = Ae(r, t.allowHtmlBlocks).filter((e) => !g(e)), l = t.withContainerWidth(s), u = c.map((e) => J(e, n(e, l))).filter((e) => e !== "").join("\n");
|
|
462
|
+
f.push(`<mj-column width="${o}">
|
|
463
|
+
${u === "" ? "<mj-text> </mj-text>" : u}
|
|
451
464
|
</mj-column>`);
|
|
452
465
|
}
|
|
453
|
-
let
|
|
454
|
-
return `<mj-section${s} padding="${o}"${l}${c}${
|
|
455
|
-
${e.stackOnMobile === !1 &&
|
|
456
|
-
${
|
|
457
|
-
</mj-group>` :
|
|
466
|
+
let p = f.join("\n"), m = t.contentDirection === "rtl" ? " direction=\"rtl\"" : "";
|
|
467
|
+
return `<mj-section${s} padding="${o}"${u}${l}${c}${m}>
|
|
468
|
+
${e.stackOnMobile === !1 && f.length > 1 ? `<mj-group${m}>
|
|
469
|
+
${p}
|
|
470
|
+
</mj-group>` : p}
|
|
458
471
|
</mj-section>`;
|
|
459
472
|
}
|
|
460
|
-
function
|
|
473
|
+
function Ae(e, t) {
|
|
461
474
|
return t ? e : e.filter((e) => e.type !== "html");
|
|
462
475
|
}
|
|
463
476
|
//#endregion
|
|
464
477
|
//#region ../renderer/src/renderers/video.ts
|
|
465
|
-
function
|
|
478
|
+
function je(e, t) {
|
|
466
479
|
if (t) return t;
|
|
467
480
|
if (!e) return null;
|
|
468
481
|
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})/]) {
|
|
@@ -472,43 +485,43 @@ function Ee(e, t) {
|
|
|
472
485
|
let n = e.match(/vimeo\.com\/(?:video\/)?(\d+)/);
|
|
473
486
|
return n ? `https://vumbnail.com/${n[1]}.jpg` : null;
|
|
474
487
|
}
|
|
475
|
-
function
|
|
476
|
-
if (
|
|
477
|
-
let n =
|
|
488
|
+
function Me(e, t) {
|
|
489
|
+
if (T(e)) return "";
|
|
490
|
+
let n = je(e.url, e.thumbnailUrl);
|
|
478
491
|
if (!n) return "";
|
|
479
|
-
let r =
|
|
492
|
+
let r = R(e.styles.padding), i = z(e.styles.backgroundColor, "container"), a = e.width === "full" ? t.containerWidth + "px" : e.width + "px", o = B(e.height), s = E(e);
|
|
480
493
|
return `<mj-image
|
|
481
|
-
src="${
|
|
482
|
-
alt="${
|
|
494
|
+
src="${P(n)}"
|
|
495
|
+
alt="${P(e.alt)}"
|
|
483
496
|
width="${a}"${o}
|
|
484
497
|
align="${e.align}"
|
|
485
498
|
padding="${r}"
|
|
486
|
-
href="${
|
|
499
|
+
href="${P(e.url)}"
|
|
487
500
|
target="_blank"
|
|
488
501
|
rel="noopener"${i}${s}
|
|
489
502
|
/>`;
|
|
490
503
|
}
|
|
491
504
|
//#endregion
|
|
492
505
|
//#region ../renderer/src/renderers/index.ts
|
|
493
|
-
function
|
|
494
|
-
let
|
|
495
|
-
return
|
|
506
|
+
function Y(t, r) {
|
|
507
|
+
let o = r.blockRenderers[t.type];
|
|
508
|
+
return o ? o(t, r) : g(t) ? ke(t, r, Y) : l(t) ? ae(t, r) : m(t) ? ce(t, r) : u(t) ? le(t, r) : i(t) ? ue(t, r) : n(t) ? he(t, r) : h(t) ? ge(t, r) : e(t) ? _e(t, r) : s(t) ? ve(t, r) : v(t) ? ye(t, r) : _(t) ? Ce(t, r) : f(t) ? Me(t, r) : a(t) ? Oe(t, r) : T(t) ? "" : A(t);
|
|
496
509
|
}
|
|
497
510
|
//#endregion
|
|
498
511
|
//#region ../renderer/src/index.ts
|
|
499
|
-
async function
|
|
500
|
-
let i = n?.layout ?
|
|
501
|
-
return `<mjml lang="${
|
|
502
|
-
<mj-head>${
|
|
512
|
+
async function Ne(e, n) {
|
|
513
|
+
let i = n?.layout ? c(n.layout, e) : (ee(e), r(e), e), a = n?.customFonts ?? [], o = n?.defaultFallbackFont ?? "Arial, sans-serif", s = n?.allowHtmlBlocks ?? !0, l = Fe(n?.socialIconsBaseUrl ?? C), u = await Re(i, n?.renderCustomBlock), d = ze(i, n?.getCustomBlockStylesheet), f = t(i.settings), p = new w(i.settings.width, a, o, s, u, l, n?.blockRenderers ?? {}, f), m = Q(i.blocks, s), h = p.resolveFontFamily(i.settings.fontFamily), g = i.settings.backgroundColor, _ = i.settings.textColor ? ` color="${P(i.settings.textColor)}"` : "", v = i.settings.linkColor ? F(i.settings.linkColor) : "inherit", y = i.settings.linkUnderline ? "underline" : "none", b = m.map((e) => X(e, p)).filter((e) => e !== "").join("\n"), x = Le(a), S = Ie(i.settings.preheaderText);
|
|
514
|
+
return `<mjml lang="${P(i.settings.locale)}" dir="${P(f)}">
|
|
515
|
+
<mj-head>${S}
|
|
503
516
|
<mj-attributes>
|
|
504
517
|
<mj-all font-family="${h}" />
|
|
505
518
|
<mj-text font-size="14px"${_} />
|
|
506
519
|
<mj-section padding="0" />
|
|
507
520
|
<mj-column padding="0" />
|
|
508
521
|
<mj-image fluid-on-mobile="true" />
|
|
509
|
-
</mj-attributes>${
|
|
522
|
+
</mj-attributes>${x}
|
|
510
523
|
<mj-style inline="inline">
|
|
511
|
-
${
|
|
524
|
+
${re(ie(m), f)}
|
|
512
525
|
</mj-style>
|
|
513
526
|
<mj-style>
|
|
514
527
|
a { color: ${v}; text-decoration: ${y}; }
|
|
@@ -518,52 +531,52 @@ async function Oe(e, n) {
|
|
|
518
531
|
@media only screen and (min-width: 481px) {
|
|
519
532
|
.tpl-hide-desktop { display: none !important; mso-hide: all !important; }
|
|
520
533
|
}
|
|
521
|
-
</mj-style>${
|
|
534
|
+
</mj-style>${Be(d)}
|
|
522
535
|
</mj-head>
|
|
523
536
|
<mj-body width="${p.containerWidth}px" background-color="${g}">
|
|
524
537
|
${b}
|
|
525
538
|
</mj-body>
|
|
526
539
|
</mjml>`;
|
|
527
540
|
}
|
|
528
|
-
function
|
|
529
|
-
if (
|
|
541
|
+
function X(e, t) {
|
|
542
|
+
if (y(e)) return J(e, Z(Q(e.children, t.allowHtmlBlocks).map((e) => X(e, t)).filter((e) => e !== "").join("\n"), {
|
|
530
543
|
backgroundColor: e.styles.backgroundColor,
|
|
531
544
|
padding: e.styles.padding,
|
|
532
545
|
borderRadius: e.borderRadius
|
|
533
546
|
}));
|
|
534
|
-
if (
|
|
535
|
-
let n =
|
|
536
|
-
return
|
|
547
|
+
if (g(e)) {
|
|
548
|
+
let n = Y(e, t);
|
|
549
|
+
return J(e, e.wrapper && n !== "" ? Z(n, e.wrapper) : n);
|
|
537
550
|
}
|
|
538
|
-
return
|
|
551
|
+
return J(e, Pe(Y(e, t), t.contentDirection));
|
|
539
552
|
}
|
|
540
|
-
function
|
|
541
|
-
return `<mj-wrapper${
|
|
553
|
+
function Z(e, t) {
|
|
554
|
+
return `<mj-wrapper${z(t.backgroundColor, "native")}${` padding="${t.padding ? R(t.padding) : "0"}"`}${H(t.borderRadius)}>
|
|
542
555
|
${e}
|
|
543
556
|
</mj-wrapper>`;
|
|
544
557
|
}
|
|
545
|
-
function
|
|
558
|
+
function Pe(e, t) {
|
|
546
559
|
return e === "" ? "" : `<mj-section${t === "rtl" ? " direction=\"rtl\"" : ""}>
|
|
547
560
|
<mj-column>
|
|
548
561
|
${e}
|
|
549
562
|
</mj-column>
|
|
550
563
|
</mj-section>`;
|
|
551
564
|
}
|
|
552
|
-
function
|
|
565
|
+
function Fe(e) {
|
|
553
566
|
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
554
567
|
}
|
|
555
|
-
function
|
|
568
|
+
function Ie(e) {
|
|
556
569
|
if (!e) return "";
|
|
557
570
|
let t = e.trim();
|
|
558
|
-
return t === "" ? "" : `\n <mj-preview>${
|
|
571
|
+
return t === "" ? "" : `\n <mj-preview>${N(t)}</mj-preview>`;
|
|
559
572
|
}
|
|
560
|
-
function
|
|
561
|
-
return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${
|
|
573
|
+
function Le(e) {
|
|
574
|
+
return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${P(e.name)}" href="${P(e.url)}" />`).join("");
|
|
562
575
|
}
|
|
563
576
|
function Q(e, t) {
|
|
564
577
|
return t ? e : e.filter((e) => e.type !== "html");
|
|
565
578
|
}
|
|
566
|
-
async function
|
|
579
|
+
async function Re(e, t) {
|
|
567
580
|
let n = /* @__PURE__ */ new Map();
|
|
568
581
|
if (!t) return n;
|
|
569
582
|
let r = [];
|
|
@@ -578,11 +591,11 @@ function $(e, t) {
|
|
|
578
591
|
t.push(n);
|
|
579
592
|
continue;
|
|
580
593
|
}
|
|
581
|
-
if (
|
|
582
|
-
else
|
|
594
|
+
if (g(n)) for (let e of n.children) $(e, t);
|
|
595
|
+
else y(n) && $(n.children, t);
|
|
583
596
|
}
|
|
584
597
|
}
|
|
585
|
-
function
|
|
598
|
+
function ze(e, t) {
|
|
586
599
|
if (!t) return [];
|
|
587
600
|
let n = [];
|
|
588
601
|
if ($(e.blocks, n), n.length === 0) return [];
|
|
@@ -597,10 +610,10 @@ function Ne(e, t) {
|
|
|
597
610
|
}
|
|
598
611
|
return a;
|
|
599
612
|
}
|
|
600
|
-
function
|
|
613
|
+
function Be(e) {
|
|
601
614
|
return e.length === 0 ? "" : e.map((e) => `\n <mj-style>\n${e}\n </mj-style>`).join("");
|
|
602
615
|
}
|
|
603
616
|
//#endregion
|
|
604
|
-
export {
|
|
617
|
+
export { C as DEFAULT_SOCIAL_ICONS_BASE_URL, U as RICH_TEXT_CSS_CLASS, w as RenderContext, O as UNRENDERABLE_MARKER_PREFIX, I as convertMergeTagsToValues, P as escapeAttr, N as escapeHtml, E as getCssClassAttr, D as getCssClasses, K as getWidthPercentages, q as getWidthPixels, T as isHiddenOnAll, Y as renderBlock, Ne as renderToMjml, A as renderUnrenderableBlock, G as resolveParagraphGap, W as richTextGapClass, R as toPaddingString };
|
|
605
618
|
|
|
606
|
-
//# sourceMappingURL=src-
|
|
619
|
+
//# sourceMappingURL=src-BxoLKnkl.js.map
|