@templatical/editor 0.20.0 → 0.21.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 +1 -0
- package/dist/{AiChatSidebar-ChrE6pUq.js → AiChatSidebar-K_AehWc-.js} +9 -9
- package/dist/{AiFeatureMenu-DkQ9HhQ6.js → AiFeatureMenu-CcqQDHzJ.js} +6 -6
- package/dist/{BlockIssueBadge-B4QjePax.js → BlockIssueBadge-Dmj9rVra.js} +4 -4
- package/dist/{CloudEditor-CfX-aMiV.js → CloudEditor-Dnww6og-.js} +263 -315
- package/dist/{CollaboratorBar-DTibhQ1j.js → CollaboratorBar-Bj4NZiie.js} +3 -3
- package/dist/{ColorPicker-4vDYhdGe.js → ColorPicker-s9GHXjZs.js} +4 -4
- package/dist/CommentsSidebar-DvNEdugN.js +435 -0
- package/dist/CountdownBlock-J_Q9JRQM.js +91 -0
- package/dist/{CountdownToolbar-D7yQqnA2.js → CountdownToolbar-DPRcv3Fu.js} +3 -4
- package/dist/{DesignReferenceSidebar-DnO6ZdwS.js → DesignReferenceSidebar-DNmK3dxp.js} +8 -8
- package/dist/{IssuesPanel-X_vkNGrs.js → IssuesPanel-CEnEGFtd.js} +7 -7
- package/dist/{MergeTagSuggestion-DCuaSOPQ.js → MergeTagSuggestion-DMe4rqn0.js} +2 -2
- package/dist/NumberWithSuffix-CCPN_oCh.js +121 -0
- package/dist/{ParagraphEditor-C5ixOIYb.js → ParagraphEditor--_zWfxps.js} +47 -47
- package/dist/{RichTextEditorContent-DwhDnMsG.js → RichTextEditorContent-FbnWsh46.js} +6 -6
- package/dist/SaveBlockDialog-CYIEHABH.js +264 -0
- package/dist/SavedBlockPreviewCanvas-2-mzAnZE.js +109 -0
- package/dist/SavedBlocksBrowserModal-D5V5yF_3.js +323 -0
- package/dist/SavedBlocksPanels-Dff38YXu.js +36 -0
- package/dist/SavedBlocksPickBar-rB6iyji6.js +52 -0
- package/dist/{SnapshotHistory-DaVueFv6.js → SnapshotHistory-FtzDq8f0.js} +8 -8
- package/dist/{TemplateScoringPanel-B0UHoTLx.js → TemplateScoringPanel-ifGGGWs5.js} +14 -14
- package/dist/{TestEmailModal-BkauxF7j.js → TestEmailModal-DL2O1H8M.js} +4 -4
- package/dist/{TitleEditor-n6WDVDjW.js → TitleEditor-CPda5lh-.js} +11 -11
- package/dist/{TplModal-BDDyvT-C.js → TplModal-C7Koj5gM.js} +3 -3
- package/dist/{blockTypeIcons-4D0aFXNg.js → blockTypeIcons-CgwECCut.js} +6 -6
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-DbWoy4rG.js → ca-BBgad6y5.js} +50 -5
- package/dist/cdn/chunks/AiChatSidebar-A1CuWGY0.js +203 -0
- package/dist/cdn/chunks/AiChatSidebar-A1CuWGY0.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu-CIBHAGSz.js → AiFeatureMenu-Duwg413F.js} +12 -8
- package/dist/cdn/chunks/{AiFeatureMenu-CIBHAGSz.js.map → AiFeatureMenu-Duwg413F.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-CxMiLo3p.js → BlockIssueBadge-Da4yR-mh.js} +7 -5
- package/dist/cdn/chunks/{BlockIssueBadge-CxMiLo3p.js.map → BlockIssueBadge-Da4yR-mh.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CEa3Xgqh.js → CloudEditor-B3hqbwfP.js} +275 -318
- package/dist/cdn/chunks/CloudEditor-B3hqbwfP.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-Bk1gD02G.js → CollaboratorBar-BS3rJy6-.js} +7 -6
- package/dist/cdn/chunks/{CollaboratorBar-Bk1gD02G.js.map → CollaboratorBar-BS3rJy6-.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-ll8pynws.js → ColorPicker-DZSzZ5ZP.js} +168 -164
- package/dist/cdn/chunks/{ColorPicker-ll8pynws.js.map → ColorPicker-DZSzZ5ZP.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-DHdRiGPX.js +412 -0
- package/dist/cdn/chunks/CommentsSidebar-DHdRiGPX.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock-Bffpoppw.js +93 -0
- package/dist/cdn/chunks/{CountdownBlock-eGUE7hhw.js.map → CountdownBlock-Bffpoppw.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C1bkSjUR.js → CountdownToolbar-DAnmIZjq.js} +4 -5
- package/dist/cdn/chunks/{CountdownToolbar-C1bkSjUR.js.map → CountdownToolbar-DAnmIZjq.js.map} +1 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-Dre99DTH.js +223 -0
- package/dist/cdn/chunks/DesignReferenceSidebar-Dre99DTH.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-Csasylf_.js → IssuesPanel-D80JedOj.js} +11 -10
- package/dist/cdn/chunks/{IssuesPanel-Csasylf_.js.map → IssuesPanel-D80JedOj.js.map} +1 -1
- package/dist/cdn/chunks/LoadingTrack-D-CW2tUa.js +12 -0
- package/dist/cdn/chunks/LoadingTrack-D-CW2tUa.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js → MergeTagSuggestion-D7TsECll.js} +2 -2
- package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js.map → MergeTagSuggestion-D7TsECll.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-CjlVNIEe.js +123 -0
- package/dist/cdn/chunks/NumberWithSuffix-CjlVNIEe.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-v0_XEL-v.js → ParagraphEditor-CtaRa1vr.js} +90 -85
- package/dist/cdn/chunks/{ParagraphEditor-v0_XEL-v.js.map → ParagraphEditor-CtaRa1vr.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-NQExNsaV.js → RichTextEditorContent-BbdgJqWM.js} +9 -6
- package/dist/cdn/chunks/{RichTextEditorContent-NQExNsaV.js.map → RichTextEditorContent-BbdgJqWM.js.map} +1 -1
- package/dist/cdn/chunks/SaveBlockDialog-Bb3fdUEZ.js +263 -0
- package/dist/cdn/chunks/SaveBlockDialog-Bb3fdUEZ.js.map +1 -0
- package/dist/cdn/chunks/SavedBlockPreviewCanvas-DZOMgNsz.js +111 -0
- package/dist/cdn/chunks/SavedBlockPreviewCanvas-DZOMgNsz.js.map +1 -0
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CeUWcPv0.js +322 -0
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CeUWcPv0.js.map +1 -0
- package/dist/cdn/chunks/SavedBlocksPanels-D-pA_wfk.js +38 -0
- package/dist/cdn/chunks/SavedBlocksPanels-D-pA_wfk.js.map +1 -0
- package/dist/cdn/chunks/SavedBlocksPickBar-1rf1KpqS.js +54 -0
- package/dist/cdn/chunks/SavedBlocksPickBar-1rf1KpqS.js.map +1 -0
- package/dist/cdn/chunks/SnapshotHistory-Bf1uovti.js +121 -0
- package/dist/cdn/chunks/SnapshotHistory-Bf1uovti.js.map +1 -0
- package/dist/cdn/chunks/TemplateScoringPanel-CTk8WwxU.js +231 -0
- package/dist/cdn/chunks/TemplateScoringPanel-CTk8WwxU.js.map +1 -0
- package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js +96 -0
- package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-CS-_MzYs.js → TitleEditor-BJ7LFykI.js} +18 -15
- package/dist/cdn/chunks/{TitleEditor-CS-_MzYs.js.map → TitleEditor-BJ7LFykI.js.map} +1 -1
- package/dist/cdn/chunks/TplModal-CH9RzKF7.js +50 -0
- package/dist/cdn/chunks/TplModal-CH9RzKF7.js.map +1 -0
- package/dist/cdn/chunks/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/cdn/chunks/blockTypeIcons-etMMQoVv.js +21 -0
- package/dist/cdn/chunks/{blockTypeIcons-B0Hjh42a.js.map → blockTypeIcons-etMMQoVv.js.map} +1 -1
- package/dist/{ca-DbWoy4rG.js → cdn/chunks/ca-BBgad6y5.js} +52 -3
- package/dist/cdn/chunks/ca-BBgad6y5.js.map +1 -0
- package/dist/cdn/chunks/cloud-BJlbXGTJ.js +1787 -0
- package/dist/cdn/chunks/cloud-BJlbXGTJ.js.map +1 -0
- package/dist/{de-CTYXVU9v.js → cdn/chunks/de-Bw6fB5JU.js} +2 -24
- package/dist/cdn/chunks/{de-CTYXVU9v.js.map → de-Bw6fB5JU.js.map} +1 -1
- package/dist/cdn/chunks/{de-CgGOnerg.js → de-D7WbpFBR.js} +50 -3
- package/dist/cdn/chunks/de-D7WbpFBR.js.map +1 -0
- package/dist/cdn/chunks/dist-CiBEt0VR.js +163 -0
- package/dist/cdn/chunks/dist-CiBEt0VR.js.map +1 -0
- package/dist/cdn/chunks/dist-CxTt8FRE.js +403 -0
- package/dist/cdn/chunks/dist-CxTt8FRE.js.map +1 -0
- package/dist/{en-DrUV9xth.js → cdn/chunks/en-BrZ0uGK2.js} +51 -2
- package/dist/cdn/chunks/en-BrZ0uGK2.js.map +1 -0
- package/dist/{en-BtmIaJeb.js → cdn/chunks/en-DAdHJz7h.js} +2 -24
- package/dist/cdn/chunks/{en-BtmIaJeb.js.map → en-DAdHJz7h.js.map} +1 -1
- package/dist/{es-DwbKjU7q.js → cdn/chunks/es-tLSLysPs.js} +51 -2
- package/dist/cdn/chunks/es-tLSLysPs.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Di3hdIRT.js → extensions-ZX2oarW6.js} +28 -26
- package/dist/cdn/chunks/{extensions-Di3hdIRT.js.map → extensions-ZX2oarW6.js.map} +1 -1
- package/dist/cdn/chunks/formatRelativeTime-CtUU-QZ8.js +12 -0
- package/dist/cdn/chunks/formatRelativeTime-CtUU-QZ8.js.map +1 -0
- package/dist/cdn/chunks/htmlparser-CZa2V5cF.js +1008 -0
- package/dist/cdn/chunks/htmlparser-CZa2V5cF.js.map +1 -0
- package/dist/cdn/chunks/icons-CYWw8Xfp.js +1190 -0
- package/dist/cdn/chunks/icons-CYWw8Xfp.js.map +1 -0
- package/dist/cdn/chunks/keys-D7kUmfpE.js +12 -0
- package/dist/cdn/chunks/keys-D7kUmfpE.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +50 -3
- package/dist/cdn/chunks/pt-BR-BWFokdTU.js.map +1 -0
- package/dist/{pt-BR-B2ZvFlRL.js → cdn/chunks/pt-BR-w2sGzHNX.js} +2 -24
- package/dist/cdn/chunks/{pt-BR-B2ZvFlRL.js.map → pt-BR-w2sGzHNX.js.map} +1 -1
- package/dist/cdn/chunks/src-BKI1x1k7.js +546 -0
- package/dist/cdn/chunks/src-BKI1x1k7.js.map +1 -0
- package/dist/cdn/chunks/src-CM0gCvAS.js +1176 -0
- package/dist/cdn/chunks/src-CM0gCvAS.js.map +1 -0
- package/dist/cdn/chunks/{media-library-yYAkAagU.js → src-D6F_3XkE.js} +1754 -1252
- package/dist/cdn/chunks/src-D6F_3XkE.js.map +1 -0
- package/dist/cdn/chunks/{renderer-DpBGiXOg.js → src-DYji-wXB.js} +117 -133
- package/dist/cdn/chunks/src-DYji-wXB.js.map +1 -0
- package/dist/cdn/chunks/{styles-DHSmjlpX.js → styles-DMOEiSX9.js} +1448 -1354
- package/dist/cdn/chunks/styles-DMOEiSX9.js.map +1 -0
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js +6 -0
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-C2indasq.js → tiptap-BMZ-OENR.js} +2012 -1863
- package/dist/cdn/chunks/tiptap-BMZ-OENR.js.map +1 -0
- package/dist/cdn/chunks/useAliveFlag-aanU8uqB.js +12 -0
- package/dist/cdn/chunks/useAliveFlag-aanU8uqB.js.map +1 -0
- package/dist/cdn/chunks/useCloudI18n-BjNENqkM.js +25 -0
- package/dist/cdn/chunks/useCloudI18n-BjNENqkM.js.map +1 -0
- package/dist/cdn/chunks/useEditorCore-BA6mspzD.js +3019 -0
- package/dist/cdn/chunks/useEditorCore-BA6mspzD.js.map +1 -0
- package/dist/cdn/chunks/useI18n-8Wd7G-cq.js +19 -0
- package/dist/cdn/chunks/useI18n-8Wd7G-cq.js.map +1 -0
- package/dist/cdn/chunks/useMergeTag-C7G31KV-.js +46 -0
- package/dist/cdn/chunks/useMergeTag-C7G31KV-.js.map +1 -0
- package/dist/cdn/chunks/usePopoverPosition-Bx0QewTv.js +61 -0
- package/dist/cdn/chunks/usePopoverPosition-Bx0QewTv.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +132 -120
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Bl4J_tYV.js → check-BpQDKiPz.js} +1 -1
- package/dist/{chevron-down-COEcl2iP.js → chevron-down-j8GrdTyz.js} +1 -1
- package/dist/chevron-up-BACyVhyC.js +7 -0
- package/dist/{circle-alert-CvHi5etc.js → circle-alert-CgtE46ND.js} +1 -1
- package/dist/{clock-CZZw62e8.js → clock-BzKLLW5L.js} +1 -1
- package/dist/{cloud-B-RebwxI.js → cloud-Du7mnkz2.js} +19 -47
- package/dist/{createLucideIcon-_peTZQtY.js → createLucideIcon-JWHwTI6N.js} +2 -2
- package/dist/{cdn/chunks/de-CTYXVU9v.js → de-Bw6fB5JU.js} +0 -26
- package/dist/{de-CgGOnerg.js → de-D7WbpFBR.js} +49 -2
- package/dist/{dist-CgTKuIUN.js → dist-BEpCh2mG.js} +1158 -1125
- package/dist/{dist-Cx7IUM7J.js → dist-BgPYC_8-.js} +14 -6
- package/dist/{dist-BKKo5wPC.js → dist-BkM8A17N.js} +2 -2
- package/dist/{dist-CcX5sLpz.js → dist-BuNDAAVp.js} +361 -256
- package/dist/{dist-COSN3oDJ.js → dist-CBzCU-a-.js} +2 -2
- package/dist/{dist-YSCPD13F.js → dist-CDO52Rxy.js} +2 -2
- package/dist/{dist-Dk5AdwoQ.js → dist-CrjzhIxB.js} +2 -2
- package/dist/{dist-DXAZUjj3.js → dist-CtcgoC_R.js} +2 -2
- package/dist/{dist-D6M5FAY7.js → dist-CuXha2_7.js} +2 -2
- package/dist/dist-CweLDZrs.js +5 -0
- package/dist/dist-DOsdqAEZ.js +5 -0
- package/dist/{dist-8TKf-Jpg.js → dist-DYClLqy8.js} +6 -3
- package/dist/{cdn/chunks/en-DrUV9xth.js → en-BrZ0uGK2.js} +49 -4
- package/dist/{cdn/chunks/en-BtmIaJeb.js → en-DAdHJz7h.js} +0 -26
- package/dist/{cdn/chunks/es-DwbKjU7q.js → es-tLSLysPs.js} +49 -4
- package/dist/{extensions-BCA9pyer.js → extensions-ClY5Sh7S.js} +5 -5
- package/dist/{image-up-D26rNdfX.js → image-up-CQdtq8ge.js} +1 -1
- package/dist/index.d.ts +81 -4
- package/dist/{info-CE3JSTqk.js → info-BUJBXoE6.js} +1 -1
- package/dist/{keys-DFaIbGR8.js → keys-CHPcp-Nz.js} +2 -2
- package/dist/{list-checks-BQsLrtBB.js → list-checks-BGHaCSD5.js} +1 -1
- package/dist/{loader-circle-s9Rh5lLd.js → loader-circle-C-Z6kgI6.js} +1 -1
- package/dist/{message-circle-CI62d690.js → message-circle-CEm5qckV.js} +1 -1
- package/dist/pencil-DdwmkKLb.js +10 -0
- package/dist/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +49 -2
- package/dist/{cdn/chunks/pt-BR-B2ZvFlRL.js → pt-BR-w2sGzHNX.js} +0 -26
- package/dist/{refresh-cw-DlYfl65Y.js → refresh-cw-maKlg0dl.js} +1 -1
- package/dist/{scan-line-CHadrYVb.js → scan-line-BFgesTOY.js} +1 -1
- package/dist/{send-CbP40otC.js → send-B70aQDrA.js} +1 -1
- package/dist/{shield-check-Bnj9aRoJ.js → shield-check-B7x5OKt5.js} +1 -1
- package/dist/{sparkles-CncWT57a.js → sparkles-DVlm1Ipp.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-DkF_-uX8.js → styles-PcOPXvLO.js} +1235 -1151
- package/dist/templatical-editor.js +134 -125
- package/dist/{text-align-start-B458vzYw.js → text-align-start-Vay3Kvo2.js} +1 -1
- package/dist/{trash-2-DO0yjSU1.js → trash-2-DE8CmxAG.js} +1 -1
- package/dist/{triangle-alert-C18_ima6.js → triangle-alert-Djg6IG8N.js} +1 -1
- package/dist/{upload-DsCd2zTR.js → upload-BwwE0U6G.js} +1 -1
- package/dist/{useCloudI18n-PCDOC2kz.js → useCloudI18n-BmiygEM4.js} +1 -1
- package/dist/{useEditorCore-kKUemYY6.js → useEditorCore-CT1slufs.js} +997 -817
- package/dist/{useI18n-BNMzZTM5.js → useI18n-D2L9Mkik.js} +1 -1
- package/dist/{useMergeTag-DfEY0eK5.js → useMergeTag-BTdDq5DC.js} +1 -1
- package/dist/{usePopoverPosition-F9STHRIr.js → usePopoverPosition-BO2LNy5n.js} +1 -1
- package/dist/{x-BCFQuE_q.js → x-CkD6A1iB.js} +1 -1
- package/package.json +21 -21
- package/dist/CommentsSidebar-D-o5Stlg.js +0 -442
- package/dist/CountdownBlock-Bn5w7C-p.js +0 -92
- package/dist/ModuleBrowserModal-AJt--JPh.js +0 -202
- package/dist/ModulePreviewCanvas-BKYOcVCh.js +0 -106
- package/dist/NumberWithSuffix-Bf3rNxza.js +0 -89
- package/dist/SaveModuleDialog-B4QX9eiv.js +0 -125
- package/dist/ToggleSwitch-DUNuUPsZ.js +0 -37
- package/dist/cdn/chunks/CloudEditor-CEa3Xgqh.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-eGUE7hhw.js +0 -93
- package/dist/cdn/chunks/ModuleBrowserModal-DznWWtBI.js +0 -198
- package/dist/cdn/chunks/ModuleBrowserModal-DznWWtBI.js.map +0 -1
- package/dist/cdn/chunks/ModulePreviewCanvas-D-h7fr87.js +0 -107
- package/dist/cdn/chunks/ModulePreviewCanvas-D-h7fr87.js.map +0 -1
- package/dist/cdn/chunks/NumberWithSuffix-Dt-0odUN.js +0 -91
- package/dist/cdn/chunks/NumberWithSuffix-Dt-0odUN.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-BpFhTi-k.js +0 -120
- package/dist/cdn/chunks/SaveModuleDialog-BpFhTi-k.js.map +0 -1
- package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js +0 -39
- package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-B0Hjh42a.js +0 -22
- package/dist/cdn/chunks/ca-DbWoy4rG.js.map +0 -1
- package/dist/cdn/chunks/de-CgGOnerg.js.map +0 -1
- package/dist/cdn/chunks/en-DrUV9xth.js.map +0 -1
- package/dist/cdn/chunks/es-DwbKjU7q.js.map +0 -1
- package/dist/cdn/chunks/features-CLIZ7Q-Y.js +0 -7657
- package/dist/cdn/chunks/features-CLIZ7Q-Y.js.map +0 -1
- package/dist/cdn/chunks/icons-GX40Qm2W.js +0 -690
- package/dist/cdn/chunks/icons-GX40Qm2W.js.map +0 -1
- package/dist/cdn/chunks/media-library-yYAkAagU.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-Bcc5Tjed.js.map +0 -1
- package/dist/cdn/chunks/quality-DffYv9j5.js +0 -2180
- package/dist/cdn/chunks/quality-DffYv9j5.js.map +0 -1
- package/dist/cdn/chunks/renderer-DpBGiXOg.js.map +0 -1
- package/dist/cdn/chunks/src-9K6uFiuK.js +0 -509
- package/dist/cdn/chunks/src-9K6uFiuK.js.map +0 -1
- package/dist/cdn/chunks/styles-DHSmjlpX.js.map +0 -1
- package/dist/cdn/chunks/tiptap-C2indasq.js.map +0 -1
- package/dist/dist-BDVm2MrW.js +0 -5
- package/dist/dist-DbekZDmJ.js +0 -5
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $n as t, Gn as n, Hn as r, Jn as i, Kn as a, Qn as o, Un as s, Wn as c, Xn as l, Yn as u, Zn as d, er as f, qn as p, tr as m } from "./features-CLIZ7Q-Y.js";
|
|
1
|
+
import { B as e, F as t, G as n, H as r, I as i, J as a, K as o, L as s, P as c, R as l, U as u, V as d, W as f, z as p } from "./src-BKI1x1k7.js";
|
|
3
2
|
//#endregion
|
|
4
3
|
//#region ../renderer/src/render-context.ts
|
|
5
|
-
var
|
|
4
|
+
var m = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
|
|
6
5
|
name: "@templatical/renderer",
|
|
7
6
|
description: "Render Templatical email templates to MJML",
|
|
8
|
-
version: "0.
|
|
7
|
+
version: "0.21.1",
|
|
9
8
|
bugs: "https://github.com/templatical/sdk/issues",
|
|
10
9
|
dependencies: { "@templatical/types": "workspace:*" },
|
|
11
10
|
devDependencies: {
|
|
@@ -43,7 +42,7 @@ var h = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
|
|
|
43
42
|
},
|
|
44
43
|
type: "module",
|
|
45
44
|
types: "./dist/index.d.ts"
|
|
46
|
-
}.version}/assets/social`,
|
|
45
|
+
}.version}/assets/social`, h = {
|
|
47
46
|
arial: "Arial, sans-serif",
|
|
48
47
|
helvetica: "Helvetica, sans-serif",
|
|
49
48
|
georgia: "Georgia, serif",
|
|
@@ -52,14 +51,14 @@ var h = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
|
|
|
52
51
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
53
52
|
"courier new": "'Courier New', monospace",
|
|
54
53
|
tahoma: "Tahoma, sans-serif"
|
|
55
|
-
},
|
|
54
|
+
}, g = class e {
|
|
56
55
|
containerWidth;
|
|
57
56
|
customFonts;
|
|
58
57
|
defaultFallbackFont;
|
|
59
58
|
allowHtmlBlocks;
|
|
60
59
|
customBlockHtml;
|
|
61
60
|
socialIconsBaseUrl;
|
|
62
|
-
constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a =
|
|
61
|
+
constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a = m) {
|
|
63
62
|
this.containerWidth = e, this.customFonts = t, this.defaultFallbackFont = n, this.allowHtmlBlocks = r, this.customBlockHtml = i, this.socialIconsBaseUrl = a;
|
|
64
63
|
}
|
|
65
64
|
withContainerWidth(t) {
|
|
@@ -70,28 +69,28 @@ var h = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
|
|
|
70
69
|
let e = t.fallback ?? this.defaultFallbackFont;
|
|
71
70
|
return `'${t.name}', ${e}`;
|
|
72
71
|
}
|
|
73
|
-
return
|
|
72
|
+
return h[e.toLowerCase()] || e;
|
|
74
73
|
}
|
|
75
|
-
},
|
|
74
|
+
}, _ = {
|
|
76
75
|
"&": "&",
|
|
77
76
|
"<": "<",
|
|
78
77
|
">": ">",
|
|
79
78
|
"\"": """,
|
|
80
79
|
"'": "'"
|
|
81
|
-
},
|
|
80
|
+
}, v = /[&<>"']/g;
|
|
81
|
+
function y(e) {
|
|
82
|
+
return e === "" ? "" : e.replace(v, (e) => _[e] ?? e);
|
|
83
|
+
}
|
|
82
84
|
function b(e) {
|
|
83
|
-
return e === "" ? "" : e.replace(
|
|
85
|
+
return e === "" ? "" : e.replace(v, (e) => _[e] ?? e);
|
|
84
86
|
}
|
|
85
87
|
function x(e) {
|
|
86
|
-
return e === "" ? "" : e.replace(
|
|
88
|
+
return e === "" ? "" : b(e).replace(/[;{}\r\n]/g, "");
|
|
87
89
|
}
|
|
88
90
|
function S(e) {
|
|
89
|
-
return e === "" ? "" :
|
|
90
|
-
}
|
|
91
|
-
function C(e) {
|
|
92
|
-
return e === "" ? "" : w(e, (e) => T(e, "data-merge-tag") ?? T(e, "data-logic-merge-tag"));
|
|
91
|
+
return e === "" ? "" : C(e, (e) => w(e, "data-merge-tag") ?? w(e, "data-logic-merge-tag"));
|
|
93
92
|
}
|
|
94
|
-
function
|
|
93
|
+
function C(e, t) {
|
|
95
94
|
let n = "", r = 0;
|
|
96
95
|
for (; r < e.length;) {
|
|
97
96
|
let i = e.indexOf("<span", r);
|
|
@@ -123,31 +122,31 @@ function w(e, t) {
|
|
|
123
122
|
}
|
|
124
123
|
return n;
|
|
125
124
|
}
|
|
126
|
-
function
|
|
125
|
+
function w(e, t) {
|
|
127
126
|
let n = RegExp(`(?:^|\\s)${t}="([^"<>]*)"`).exec(e);
|
|
128
127
|
return n ? n[1] : null;
|
|
129
128
|
}
|
|
130
129
|
//#endregion
|
|
131
130
|
//#region ../renderer/src/padding.ts
|
|
132
|
-
function
|
|
131
|
+
function T(e) {
|
|
133
132
|
return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
|
|
134
133
|
}
|
|
135
134
|
//#endregion
|
|
136
135
|
//#region ../renderer/src/utils.ts
|
|
137
|
-
function
|
|
136
|
+
function E(e, t) {
|
|
138
137
|
return e ? ` ${t === "native" ? "background-color" : "container-background-color"}="${e}"` : "";
|
|
139
138
|
}
|
|
140
139
|
//#endregion
|
|
141
140
|
//#region ../renderer/src/visibility.ts
|
|
142
|
-
function
|
|
141
|
+
function D(e) {
|
|
143
142
|
let t = e.visibility;
|
|
144
143
|
return t ? !t.desktop && !t.mobile : !1;
|
|
145
144
|
}
|
|
146
|
-
function
|
|
147
|
-
let t =
|
|
145
|
+
function O(e) {
|
|
146
|
+
let t = k(e);
|
|
148
147
|
return t === "" ? "" : ` css-class="${t}"`;
|
|
149
148
|
}
|
|
150
|
-
function
|
|
149
|
+
function k(e) {
|
|
151
150
|
let t = e.visibility;
|
|
152
151
|
if (!t) return "";
|
|
153
152
|
let n = [];
|
|
@@ -155,43 +154,43 @@ function A(e) {
|
|
|
155
154
|
}
|
|
156
155
|
//#endregion
|
|
157
156
|
//#region ../renderer/src/renderers/title.ts
|
|
158
|
-
function
|
|
159
|
-
if (
|
|
160
|
-
let n =
|
|
157
|
+
function A(e, t) {
|
|
158
|
+
if (D(e)) return "";
|
|
159
|
+
let n = T(e.styles.padding), r = E(e.styles.backgroundColor, "container"), i = j(S(e.content)), o = a[e.level] ?? a[2], s = e.color ? `\n color="${b(e.color)}"` : "", c = e.textAlign, l = ee(e.fontFamily, t), u = O(e), d = `h${a[e.level] ? e.level : 2}`;
|
|
161
160
|
return `<mj-text
|
|
162
|
-
font-size="${
|
|
163
|
-
align="${
|
|
161
|
+
font-size="${o}px"${s}
|
|
162
|
+
align="${c}"
|
|
164
163
|
line-height="1.3"
|
|
165
|
-
padding="${n}"${r}${
|
|
166
|
-
><${
|
|
164
|
+
padding="${n}"${r}${l}${u}
|
|
165
|
+
><${d} style="margin:0;font-size:inherit;color:inherit;line-height:inherit">${i}</${d}></mj-text>`;
|
|
167
166
|
}
|
|
168
|
-
function
|
|
167
|
+
function j(e) {
|
|
169
168
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
170
169
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
171
170
|
}
|
|
172
|
-
function
|
|
171
|
+
function ee(e, t) {
|
|
173
172
|
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
174
173
|
}
|
|
175
174
|
//#endregion
|
|
176
175
|
//#region ../renderer/src/renderers/paragraph.ts
|
|
177
|
-
function
|
|
178
|
-
if (
|
|
179
|
-
let n =
|
|
176
|
+
function te(e, t) {
|
|
177
|
+
if (D(e) || e.content.replace(/<\/?p\b[^<>]*>/gi, "").trim() === "") return "";
|
|
178
|
+
let n = T(e.styles.padding), r = E(e.styles.backgroundColor, "container"), i = S(e.content);
|
|
180
179
|
return `<mj-text
|
|
181
180
|
line-height="1.5"
|
|
182
|
-
padding="${n}"${r}${
|
|
181
|
+
padding="${n}"${r}${O(e)}
|
|
183
182
|
>${i}</mj-text>`;
|
|
184
183
|
}
|
|
185
184
|
//#endregion
|
|
186
185
|
//#region ../renderer/src/renderers/image.ts
|
|
187
|
-
function
|
|
188
|
-
if (
|
|
189
|
-
let n =
|
|
190
|
-
e.linkUrl && (o = ` href="${
|
|
191
|
-
let s =
|
|
186
|
+
function ne(e, t) {
|
|
187
|
+
if (D(e) || e.src === "") return "";
|
|
188
|
+
let n = T(e.styles.padding), r = E(e.styles.backgroundColor, "container"), i = e.width === "full" ? t.containerWidth + "px" : e.width + "px", a = O(e), o = "";
|
|
189
|
+
e.linkUrl && (o = ` href="${b(e.linkUrl)}"`, e.linkOpenInNewTab && (o += " target=\"_blank\" rel=\"noopener\""));
|
|
190
|
+
let s = b(e.src), c = e.decorative === !0;
|
|
192
191
|
return `<mj-image
|
|
193
192
|
src="${s}"
|
|
194
|
-
alt="${c ? "" :
|
|
193
|
+
alt="${c ? "" : b(e.alt)}"
|
|
195
194
|
width="${i}"
|
|
196
195
|
align="${e.align}"
|
|
197
196
|
padding="${n}"${r}${o}${a}${c ? " role=\"presentation\"" : ""}
|
|
@@ -200,8 +199,8 @@ function re(e, t) {
|
|
|
200
199
|
//#endregion
|
|
201
200
|
//#region ../renderer/src/renderers/button.ts
|
|
202
201
|
function M(e, t) {
|
|
203
|
-
if (
|
|
204
|
-
let n =
|
|
202
|
+
if (D(e)) return "";
|
|
203
|
+
let n = T(e.styles.padding), r = E(e.styles.backgroundColor, "container"), i = T(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);
|
|
205
204
|
return `<mj-button${o}${e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : ""}
|
|
206
205
|
background-color="${s}"
|
|
207
206
|
color="${c}"
|
|
@@ -209,7 +208,7 @@ function M(e, t) {
|
|
|
209
208
|
font-weight="bold"
|
|
210
209
|
border-radius="${u}px"
|
|
211
210
|
inner-padding="${i}"
|
|
212
|
-
padding="${n}"${r}${N(e.fontFamily, t)}${P(e.width)}${
|
|
211
|
+
padding="${n}"${r}${N(e.fontFamily, t)}${P(e.width)}${O(e)}
|
|
213
212
|
>${d}</mj-button>`;
|
|
214
213
|
}
|
|
215
214
|
function N(e, t) {
|
|
@@ -221,39 +220,39 @@ function P(e) {
|
|
|
221
220
|
//#endregion
|
|
222
221
|
//#region ../renderer/src/renderers/divider.ts
|
|
223
222
|
function F(e, t) {
|
|
224
|
-
if (
|
|
225
|
-
let n =
|
|
223
|
+
if (D(e)) return "";
|
|
224
|
+
let n = T(e.styles.padding), r = e.styles.backgroundColor ? ` container-background-color="${b(e.styles.backgroundColor)}"` : "", i = e.width === "full" ? "100%" : e.width + "px";
|
|
226
225
|
return `<mj-divider
|
|
227
226
|
border-width="${e.thickness}px"
|
|
228
227
|
border-style="${e.lineStyle}"
|
|
229
|
-
border-color="${
|
|
228
|
+
border-color="${b(e.color)}"
|
|
230
229
|
width="${i}"
|
|
231
|
-
padding="${n}"${r}${
|
|
230
|
+
padding="${n}"${r}${O(e)}
|
|
232
231
|
/>`;
|
|
233
232
|
}
|
|
234
233
|
//#endregion
|
|
235
234
|
//#region ../renderer/src/renderers/spacer.ts
|
|
236
235
|
function I(e, t) {
|
|
237
|
-
return
|
|
236
|
+
return D(e) ? "" : `<mj-spacer height="${e.height}px" padding="0"${e.styles.backgroundColor ? ` container-background-color="${b(e.styles.backgroundColor)}"` : ""}${O(e)} />`;
|
|
238
237
|
}
|
|
239
238
|
//#endregion
|
|
240
239
|
//#region ../renderer/src/renderers/html.ts
|
|
241
240
|
function L(e, t) {
|
|
242
|
-
if (
|
|
241
|
+
if (D(e) || !t.allowHtmlBlocks) return "";
|
|
243
242
|
let n = e.content;
|
|
244
243
|
if (n === "") return "";
|
|
245
|
-
let r =
|
|
246
|
-
return `<mj-text padding="${
|
|
244
|
+
let r = O(e);
|
|
245
|
+
return `<mj-text padding="${T(e.styles.padding)}"${E(e.styles.backgroundColor, "container")}${r}>
|
|
247
246
|
${n}
|
|
248
247
|
</mj-text>`;
|
|
249
248
|
}
|
|
250
249
|
//#endregion
|
|
251
250
|
//#region ../renderer/src/renderers/social.ts
|
|
252
251
|
function R(e, t) {
|
|
253
|
-
if (
|
|
252
|
+
if (D(e)) return "";
|
|
254
253
|
let n = e.icons;
|
|
255
254
|
if (n.length === 0) return "";
|
|
256
|
-
let r =
|
|
255
|
+
let r = T(e.styles.padding), i = e.styles.backgroundColor ? ` container-background-color="${b(e.styles.backgroundColor)}"` : "", a = O(e), o = e.align, s = e.iconSize, c = e.iconStyle, l = e.spacing, u;
|
|
257
256
|
switch (s) {
|
|
258
257
|
case "small":
|
|
259
258
|
u = 24;
|
|
@@ -288,7 +287,7 @@ function R(e, t) {
|
|
|
288
287
|
padding="${r}"${i}${a}
|
|
289
288
|
>
|
|
290
289
|
${n.map((e, n) => {
|
|
291
|
-
let r = e.platform, i =
|
|
290
|
+
let r = e.platform, i = b(e.url), a = `${t.socialIconsBaseUrl}/${c}/${r}.png`, o = n === f - 1 ? 0 : l;
|
|
292
291
|
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>`;
|
|
293
292
|
}).join("\n")}
|
|
294
293
|
</mj-social>`;
|
|
@@ -296,23 +295,23 @@ ${n.map((e, n) => {
|
|
|
296
295
|
//#endregion
|
|
297
296
|
//#region ../renderer/src/renderers/menu.ts
|
|
298
297
|
function z(e, t) {
|
|
299
|
-
if (
|
|
300
|
-
let n =
|
|
298
|
+
if (D(e) || e.items.length === 0) return "";
|
|
299
|
+
let n = T(e.styles.padding), r = E(e.styles.backgroundColor, "container"), i = O(e), a = H(e.fontFamily, t), o = e.textAlign;
|
|
301
300
|
return `<mj-text
|
|
302
|
-
font-size="${e.fontSize}px"${e.color ? `\n color="${
|
|
301
|
+
font-size="${e.fontSize}px"${e.color ? `\n color="${b(e.color)}"` : ""}
|
|
303
302
|
align="${o}"
|
|
304
303
|
line-height="1.5"
|
|
305
304
|
padding="${n}"${r}${a}${i}
|
|
306
305
|
>${B(e)}</mj-text>`;
|
|
307
306
|
}
|
|
308
307
|
function B(e) {
|
|
309
|
-
let t = e.items, n =
|
|
308
|
+
let t = e.items, n = y(e.separator), r = x(e.separatorColor), i = e.spacing, a = e.linkColor ?? e.color, o = [], s = t.length;
|
|
310
309
|
for (let e = 0; e < s; e++) o.push(V(t[e], a)), e < s - 1 && o.push(`<span style="color: ${r}; padding: 0 ${i}px;">${n}</span>`);
|
|
311
310
|
return o.join("");
|
|
312
311
|
}
|
|
313
312
|
function V(e, t) {
|
|
314
|
-
let n =
|
|
315
|
-
return i && o.unshift(`color: ${
|
|
313
|
+
let n = y(e.text), r = b(e.url), i = e.color ?? t, a = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", o = ["text-decoration: none"];
|
|
314
|
+
return i && o.unshift(`color: ${x(i)}`), e.bold && o.push("font-weight: bold"), e.underline && o.push("text-decoration: underline"), `<a href="${r}" style="${o.join("; ")}"${a}>${n}</a>`;
|
|
316
315
|
}
|
|
317
316
|
function H(e, t) {
|
|
318
317
|
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
@@ -320,17 +319,17 @@ function H(e, t) {
|
|
|
320
319
|
//#endregion
|
|
321
320
|
//#region ../renderer/src/renderers/table.ts
|
|
322
321
|
function U(e, t) {
|
|
323
|
-
if (
|
|
324
|
-
let n =
|
|
322
|
+
if (D(e) || e.rows.length === 0) return "";
|
|
323
|
+
let n = T(e.styles.padding), r = E(e.styles.backgroundColor, "container"), i = O(e), a = q(e.fontFamily, t);
|
|
325
324
|
return `<mj-text
|
|
326
|
-
font-size="${e.fontSize}px"${e.color ? `\n color="${
|
|
325
|
+
font-size="${e.fontSize}px"${e.color ? `\n color="${b(e.color)}"` : ""}
|
|
327
326
|
align="${e.textAlign}"
|
|
328
327
|
line-height="1.5"
|
|
329
328
|
padding="${n}"${r}${a}${i}
|
|
330
329
|
>${W(e)}</mj-text>`;
|
|
331
330
|
}
|
|
332
331
|
function W(e) {
|
|
333
|
-
let t =
|
|
332
|
+
let t = x(e.borderColor), n = e.borderWidth, r = "";
|
|
334
333
|
for (let i = 0; i < e.rows.length; i++) {
|
|
335
334
|
let a = e.rows[i];
|
|
336
335
|
r += G(a, e, e.hasHeaderRow && i === 0, t, n);
|
|
@@ -344,8 +343,8 @@ function G(e, t, n, r, i) {
|
|
|
344
343
|
}
|
|
345
344
|
function K(e, t, n, r, i) {
|
|
346
345
|
let a = t.cellPadding, o = [`border: ${i}px solid ${r}`, `padding: ${a}px`];
|
|
347
|
-
n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${
|
|
348
|
-
let s = o.join("; "), c =
|
|
346
|
+
n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${x(t.headerBackgroundColor)}`));
|
|
347
|
+
let s = o.join("; "), c = y(S(e.content)), l = n ? "th" : "td";
|
|
349
348
|
return `<${l} style="${s}">${c}</${l}>`;
|
|
350
349
|
}
|
|
351
350
|
function q(e, t) {
|
|
@@ -353,12 +352,12 @@ function q(e, t) {
|
|
|
353
352
|
}
|
|
354
353
|
//#endregion
|
|
355
354
|
//#region ../renderer/src/renderers/custom.ts
|
|
356
|
-
function
|
|
357
|
-
if (
|
|
355
|
+
function re(e, t) {
|
|
356
|
+
if (D(e)) return "";
|
|
358
357
|
let n = t.customBlockHtml.get(e.id) ?? e.renderedHtml;
|
|
359
358
|
if (!n || n === "") return "";
|
|
360
|
-
let r =
|
|
361
|
-
return `<mj-text padding="${
|
|
359
|
+
let r = O(e);
|
|
360
|
+
return `<mj-text padding="${T(e.styles.padding)}"${E(e.styles.backgroundColor, "container")}${r}>
|
|
362
361
|
${n}
|
|
363
362
|
</mj-text>`;
|
|
364
363
|
}
|
|
@@ -401,11 +400,11 @@ function X(e, t) {
|
|
|
401
400
|
}
|
|
402
401
|
//#endregion
|
|
403
402
|
//#region ../renderer/src/renderers/section.ts
|
|
404
|
-
function
|
|
405
|
-
if (
|
|
406
|
-
let r = e.columns, i = J(r), a = Y(r, t.containerWidth), o =
|
|
407
|
-
for (let e = 0; e <
|
|
408
|
-
let r =
|
|
403
|
+
function ie(e, t, n) {
|
|
404
|
+
if (D(e)) return "";
|
|
405
|
+
let r = e.columns, i = J(r), a = Y(r, t.containerWidth), o = T(e.styles.padding), s = E(e.styles.backgroundColor, "native"), c = O(e), l = e.borderRadius && e.borderRadius > 0 ? ` border-radius="${e.borderRadius}px"` : "", u = e.children, f = [];
|
|
406
|
+
for (let e = 0; e < u.length; e++) {
|
|
407
|
+
let r = u[e], o = i[e] ?? "100%", s = Math.floor(a[e] ?? t.containerWidth), c = ae(r, t.allowHtmlBlocks).filter((e) => !d(e)), l = t.withContainerWidth(s), p = c.map((e) => X(e, n(e, l))).filter((e) => e !== "").join("\n");
|
|
409
408
|
f.push(`<mj-column width="${o}">
|
|
410
409
|
${p === "" ? "<mj-text> </mj-text>" : p}
|
|
411
410
|
</mj-column>`);
|
|
@@ -417,12 +416,12 @@ ${p}
|
|
|
417
416
|
</mj-group>` : p}
|
|
418
417
|
</mj-section>`;
|
|
419
418
|
}
|
|
420
|
-
function
|
|
419
|
+
function ae(e, t) {
|
|
421
420
|
return t ? e : e.filter((e) => e.type !== "html");
|
|
422
421
|
}
|
|
423
422
|
//#endregion
|
|
424
423
|
//#region ../renderer/src/renderers/video.ts
|
|
425
|
-
function
|
|
424
|
+
function oe(e, t) {
|
|
426
425
|
if (t) return t;
|
|
427
426
|
if (!e) return null;
|
|
428
427
|
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})/]) {
|
|
@@ -432,47 +431,32 @@ function se(e, t) {
|
|
|
432
431
|
let n = e.match(/vimeo\.com\/(?:video\/)?(\d+)/);
|
|
433
432
|
return n ? `https://vumbnail.com/${n[1]}.jpg` : null;
|
|
434
433
|
}
|
|
435
|
-
function
|
|
436
|
-
if (
|
|
437
|
-
let n =
|
|
434
|
+
function se(e, t) {
|
|
435
|
+
if (D(e)) return "";
|
|
436
|
+
let n = oe(e.url, e.thumbnailUrl);
|
|
438
437
|
if (!n) return "";
|
|
439
|
-
let r =
|
|
438
|
+
let r = T(e.styles.padding), i = E(e.styles.backgroundColor, "container"), a = e.width === "full" ? t.containerWidth + "px" : e.width + "px", o = O(e);
|
|
440
439
|
return `<mj-image
|
|
441
|
-
src="${
|
|
442
|
-
alt="${
|
|
440
|
+
src="${b(n)}"
|
|
441
|
+
alt="${b(e.alt)}"
|
|
443
442
|
width="${a}"
|
|
444
443
|
align="${e.align}"
|
|
445
444
|
padding="${r}"
|
|
446
|
-
href="${
|
|
445
|
+
href="${b(e.url)}"
|
|
447
446
|
target="_blank"
|
|
448
447
|
rel="noopener"${i}${o}
|
|
449
448
|
/>`;
|
|
450
449
|
}
|
|
451
450
|
//#endregion
|
|
452
451
|
//#region ../renderer/src/renderers/index.ts
|
|
453
|
-
function Z(
|
|
454
|
-
return
|
|
452
|
+
function Z(a, m) {
|
|
453
|
+
return d(a) ? ie(a, m, Z) : n(a) ? A(a, m) : e(a) ? te(a, m) : l(a) ? ne(a, m) : c(a) ? M(a, m) : i(a) ? F(a, m) : u(a) ? I(a, m) : s(a) ? L(a, m) : r(a) ? R(a, m) : p(a) ? z(a, m) : f(a) ? U(a, m) : o(a) ? se(a, m) : t(a) ? re(a, m) : "";
|
|
455
454
|
}
|
|
456
455
|
//#endregion
|
|
457
456
|
//#region ../renderer/src/index.ts
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
convertMergeTagsToValues: () => C,
|
|
462
|
-
escapeAttr: () => x,
|
|
463
|
-
escapeHtml: () => b,
|
|
464
|
-
getCssClassAttr: () => k,
|
|
465
|
-
getCssClasses: () => A,
|
|
466
|
-
getWidthPercentages: () => J,
|
|
467
|
-
getWidthPixels: () => Y,
|
|
468
|
-
isHiddenOnAll: () => O,
|
|
469
|
-
renderBlock: () => Z,
|
|
470
|
-
renderToMjml: () => ue,
|
|
471
|
-
toPaddingString: () => E
|
|
472
|
-
});
|
|
473
|
-
async function ue(e, t) {
|
|
474
|
-
let n = t?.customFonts ?? [], r = t?.defaultFallbackFont ?? "Arial, sans-serif", i = t?.allowHtmlBlocks ?? !0, a = me(t?.socialIconsBaseUrl ?? h), o = await _e(e, t?.renderCustomBlock), s = ve(e, t?.getCustomBlockStylesheet), c = new _(e.settings.width, n, r, i, o, a), l = ge(e.blocks, i), u = c.resolveFontFamily(e.settings.fontFamily), d = e.settings.backgroundColor, f = e.settings.textColor ? ` color="${x(e.settings.textColor)}"` : "", p = e.settings.linkColor ? S(e.settings.linkColor) : "inherit", m = e.settings.linkUnderline ? "underline" : "none", g = l.map((e) => de(e, c)).filter((e) => e !== "").join("\n"), v = he(n), y = Q(e.settings.preheaderText);
|
|
475
|
-
return `<mjml lang="${x(e.settings.locale)}">
|
|
457
|
+
async function ce(e, t) {
|
|
458
|
+
let n = t?.customFonts ?? [], r = t?.defaultFallbackFont ?? "Arial, sans-serif", i = t?.allowHtmlBlocks ?? !0, a = fe(t?.socialIconsBaseUrl ?? m), o = await he(e, t?.renderCustomBlock), s = ge(e, t?.getCustomBlockStylesheet), c = new g(e.settings.width, n, r, i, o, a), l = Q(e.blocks, i), u = c.resolveFontFamily(e.settings.fontFamily), d = e.settings.backgroundColor, f = e.settings.textColor ? ` color="${b(e.settings.textColor)}"` : "", p = e.settings.linkColor ? x(e.settings.linkColor) : "inherit", h = e.settings.linkUnderline ? "underline" : "none", _ = l.map((e) => le(e, c)).filter((e) => e !== "").join("\n"), v = me(n), y = pe(e.settings.preheaderText);
|
|
459
|
+
return `<mjml lang="${b(e.settings.locale)}">
|
|
476
460
|
<mj-head>${y}
|
|
477
461
|
<mj-attributes>
|
|
478
462
|
<mj-all font-family="${u}" />
|
|
@@ -482,54 +466,54 @@ async function ue(e, t) {
|
|
|
482
466
|
<mj-image fluid-on-mobile="true" />
|
|
483
467
|
</mj-attributes>${v}
|
|
484
468
|
<mj-style>
|
|
485
|
-
a { color: ${p}; text-decoration: ${
|
|
469
|
+
a { color: ${p}; text-decoration: ${h}; }
|
|
486
470
|
@media only screen and (max-width: 480px) {
|
|
487
471
|
.tpl-hide-mobile { display: none !important; mso-hide: all !important; }
|
|
488
472
|
}
|
|
489
473
|
@media only screen and (min-width: 481px) {
|
|
490
474
|
.tpl-hide-desktop { display: none !important; mso-hide: all !important; }
|
|
491
475
|
}
|
|
492
|
-
</mj-style>${
|
|
476
|
+
</mj-style>${_e(s)}
|
|
493
477
|
</mj-head>
|
|
494
478
|
<mj-body width="${c.containerWidth}px" background-color="${d}">
|
|
495
|
-
${
|
|
479
|
+
${_}
|
|
496
480
|
</mj-body>
|
|
497
481
|
</mjml>`;
|
|
498
482
|
}
|
|
499
|
-
function
|
|
500
|
-
if (
|
|
483
|
+
function le(e, t) {
|
|
484
|
+
if (d(e)) {
|
|
501
485
|
let n = Z(e, t);
|
|
502
|
-
return X(e, e.wrapper && n !== "" ?
|
|
486
|
+
return X(e, e.wrapper && n !== "" ? ue(n, e.wrapper) : n);
|
|
503
487
|
}
|
|
504
|
-
return X(e,
|
|
488
|
+
return X(e, de(Z(e, t)));
|
|
505
489
|
}
|
|
506
|
-
function
|
|
507
|
-
return `<mj-wrapper${
|
|
490
|
+
function ue(e, t) {
|
|
491
|
+
return `<mj-wrapper${E(t.backgroundColor, "native")}${` padding="${t.padding ? T(t.padding) : "0"}"`}${t.borderRadius && t.borderRadius > 0 ? ` border-radius="${t.borderRadius}px"` : ""}>
|
|
508
492
|
${e}
|
|
509
493
|
</mj-wrapper>`;
|
|
510
494
|
}
|
|
511
|
-
function
|
|
495
|
+
function de(e) {
|
|
512
496
|
return e === "" ? "" : `<mj-section>
|
|
513
497
|
<mj-column>
|
|
514
498
|
${e}
|
|
515
499
|
</mj-column>
|
|
516
500
|
</mj-section>`;
|
|
517
501
|
}
|
|
518
|
-
function
|
|
502
|
+
function fe(e) {
|
|
519
503
|
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
520
504
|
}
|
|
521
|
-
function
|
|
505
|
+
function pe(e) {
|
|
522
506
|
if (!e) return "";
|
|
523
507
|
let t = e.trim();
|
|
524
|
-
return t === "" ? "" : `\n <mj-preview>${
|
|
508
|
+
return t === "" ? "" : `\n <mj-preview>${y(t)}</mj-preview>`;
|
|
525
509
|
}
|
|
526
|
-
function
|
|
527
|
-
return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${
|
|
510
|
+
function me(e) {
|
|
511
|
+
return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${b(e.name)}" href="${b(e.url)}" />`).join("");
|
|
528
512
|
}
|
|
529
|
-
function
|
|
513
|
+
function Q(e, t) {
|
|
530
514
|
return t ? e : e.filter((e) => e.type !== "html");
|
|
531
515
|
}
|
|
532
|
-
async function
|
|
516
|
+
async function he(e, t) {
|
|
533
517
|
let n = /* @__PURE__ */ new Map();
|
|
534
518
|
if (!t) return n;
|
|
535
519
|
let r = [];
|
|
@@ -538,16 +522,16 @@ async function _e(e, t) {
|
|
|
538
522
|
for (let e = 0; e < r.length; e++) n.set(r[e].id, i[e]);
|
|
539
523
|
return n;
|
|
540
524
|
}
|
|
541
|
-
function $(e,
|
|
542
|
-
for (let
|
|
543
|
-
if (
|
|
544
|
-
|
|
525
|
+
function $(e, n) {
|
|
526
|
+
for (let r of e) {
|
|
527
|
+
if (t(r)) {
|
|
528
|
+
n.push(r);
|
|
545
529
|
continue;
|
|
546
530
|
}
|
|
547
|
-
if (
|
|
531
|
+
if (d(r)) for (let e of r.children) $(e, n);
|
|
548
532
|
}
|
|
549
533
|
}
|
|
550
|
-
function
|
|
534
|
+
function ge(e, t) {
|
|
551
535
|
if (!t) return [];
|
|
552
536
|
let n = [];
|
|
553
537
|
if ($(e.blocks, n), n.length === 0) return [];
|
|
@@ -562,10 +546,10 @@ function ve(e, t) {
|
|
|
562
546
|
}
|
|
563
547
|
return a;
|
|
564
548
|
}
|
|
565
|
-
function
|
|
549
|
+
function _e(e) {
|
|
566
550
|
return e.length === 0 ? "" : e.map((e) => `\n <mj-style>\n${e}\n </mj-style>`).join("");
|
|
567
551
|
}
|
|
568
552
|
//#endregion
|
|
569
|
-
export {
|
|
553
|
+
export { m as DEFAULT_SOCIAL_ICONS_BASE_URL, g as RenderContext, S as convertMergeTagsToValues, b as escapeAttr, y as escapeHtml, O as getCssClassAttr, k as getCssClasses, J as getWidthPercentages, Y as getWidthPixels, D as isHiddenOnAll, Z as renderBlock, ce as renderToMjml, T as toPaddingString };
|
|
570
554
|
|
|
571
|
-
//# sourceMappingURL=
|
|
555
|
+
//# sourceMappingURL=src-DYji-wXB.js.map
|