@templatical/editor 0.39.4 → 0.40.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/dist/{AiChatSidebar-5qqrS6uy.js → AiChatSidebar-a8TPBAl2.js} +3 -3
- package/dist/{AiFeatureMenu-BBO_Ojlp.js → AiFeatureMenu-CbgDjLqk.js} +3 -3
- package/dist/{BlockIssueBadge-D5oGxOQP.js → BlockIssueBadge-D8KsGWY6.js} +2 -2
- package/dist/BlockPreviewCanvas-XNV83YGg.js +133 -0
- package/dist/{CloudHeaderExtras-Cg6uF-yQ.js → CloudHeaderExtras-C-tbLyfE.js} +2 -2
- package/dist/{CloudPanels-D1Gg4qrG.js → CloudPanels-DnWDrgnQ.js} +4 -4
- package/dist/{CollaboratorBar-Cmn0LccS.js → CollaboratorBar-DUmeCkyD.js} +2 -2
- package/dist/{CommentsPanel-twNhYUqZ.js → CommentsPanel-9k1q-79y.js} +1 -1
- package/dist/{CommentsSidebar-DDO0Qx8U.js → CommentsSidebar-Bc7nORmD.js} +2 -2
- package/dist/{CountdownBlock-DSvbf3qU.js → CountdownBlock-C6R-hn7D.js} +1 -1
- package/dist/{CountdownToolbar-nvHxu8Gu.js → CountdownToolbar-DkC-qSgq.js} +4 -4
- package/dist/{DesignReferenceSidebar-C8ohNhOd.js → DesignReferenceSidebar-OoiYJAKS.js} +3 -3
- package/dist/{IssuesPanel-Ck0EGoV5.js → IssuesPanel-Dnns3O9z.js} +3 -3
- package/dist/{LogicTagInsertButton-D8IwH-9Z.js → LogicTagInsertButton-BimKobaG.js} +67 -67
- package/dist/{MergeTagInput-QI-5KG2R.js → MergeTagInput-DqpVzhy7.js} +1 -1
- package/dist/{MergeTagModeToggle-D793Bj_E.js → MergeTagModeToggle-BkIiAgpQ.js} +4 -4
- package/dist/{ParagraphEditor-D6FRxr8Y.js → ParagraphEditor-D67Cqh-T.js} +19 -19
- package/dist/{RestoreVersionDialog--b0qfNaK.js → RestoreVersionDialog-BaKDuPCX.js} +2 -2
- package/dist/{RichTextEditorContent-BC5UTVnb.js → RichTextEditorContent-AEtfKvLz.js} +5 -5
- package/dist/{SaveBlockDialog-C0BdEGeL.js → SaveBlockDialog-BxkI52fN.js} +8 -8
- package/dist/{SavedBlocksBrowserModal-BzDgXtr4.js → SavedBlocksBrowserModal-C4_25Kvn.js} +6 -6
- package/dist/{SavedBlocksPanels-DN-bDZzy.js → SavedBlocksPanels-DQ0w9G1O.js} +1 -1
- package/dist/{SavedBlocksPickBar-pEi9Et8Q.js → SavedBlocksPickBar-CtH-sfxh.js} +2 -2
- package/dist/{TemplateScoringPanel-B1wcfE0w.js → TemplateScoringPanel-Cs0TGtRF.js} +3 -3
- package/dist/{TemplateSettings-C_5leDdF.js → TemplateSettings-BD1WNP4C.js} +7 -7
- package/dist/{TestEmailModal-maM8SLBV.js → TestEmailModal-DZi58FU9.js} +70 -65
- package/dist/{TestEmailPanel-8iAZYpCK.js → TestEmailPanel-D__9Wvgz.js} +1 -1
- package/dist/{TitleEditor-L26QXwna.js → TitleEditor-v5p89Djs.js} +9 -9
- package/dist/{ToggleSwitch-JvQ_CmI1.js → ToggleSwitch-CJfQ8u57.js} +1 -1
- package/dist/{Toolbar-B2kDLFhn.js → Toolbar-C7SjilzH.js} +540 -525
- package/dist/{TplModal-DVMS_nAn.js → TplModal-B8uLyoXE.js} +3 -3
- package/dist/{VersionHistoryMenu-BVQityes.js → VersionHistoryMenu-b0A8mS2_.js} +2 -2
- package/dist/{VersionHistoryPanels-D8f8KvKX.js → VersionHistoryPanels-DfNrRT6y.js} +1 -1
- package/dist/{VersionPreviewBanner-BaMSgA1O.js → VersionPreviewBanner-xB9r83r0.js} +1 -1
- package/dist/WrapperBlock-yGmKw0T-.js +34 -0
- package/dist/{blockTypeIcons-CdXugKyV.js → blockTypeIcons-B0Bq1WT1.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-Bqeygp1_.js → ca-Ckgw9yd0.js} +1 -0
- package/dist/cdn/chunks/{AiChatSidebar-ctfIU4i0.js → AiChatSidebar-mKImUXi6.js} +7 -7
- package/dist/cdn/chunks/{AiChatSidebar-ctfIU4i0.js.map → AiChatSidebar-mKImUXi6.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-ByygdH_9.js → AiFeatureMenu-23HCL517.js} +4 -4
- package/dist/cdn/chunks/{AiFeatureMenu-ByygdH_9.js.map → AiFeatureMenu-23HCL517.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-9hHpaXb9.js → BlockIssueBadge-DS1pUf5g.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-9hHpaXb9.js.map → BlockIssueBadge-DS1pUf5g.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-DObWyQfh.js +135 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-DObWyQfh.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-BxsMpvVr.js → CloudHeaderExtras-DOB_uWpt.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-BxsMpvVr.js.map → CloudHeaderExtras-DOB_uWpt.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DmxmqAS_.js → CloudPanels-DcAn5QW7.js} +5 -5
- package/dist/cdn/chunks/{CloudPanels-DmxmqAS_.js.map → CloudPanels-DcAn5QW7.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-B8ttqAqX.js → CollaboratorBar-C0M8c2Vv.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-B8ttqAqX.js.map → CollaboratorBar-C0M8c2Vv.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-C8ibhaiK.js → CommentsPanel-BtAGZfF6.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-C8ibhaiK.js.map → CommentsPanel-BtAGZfF6.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CybWfZ3V.js → CommentsSidebar-Ws07MXYj.js} +3 -3
- package/dist/cdn/chunks/{CommentsSidebar-CybWfZ3V.js.map → CommentsSidebar-Ws07MXYj.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DdC8Lg5F.js → CountdownBlock-sVDjKkRw.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-DdC8Lg5F.js.map → CountdownBlock-sVDjKkRw.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DRESXiVD.js → CountdownToolbar-Bu93WiS8.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-DRESXiVD.js.map → CountdownToolbar-Bu93WiS8.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-CtaoY-hl.js → DesignReferenceSidebar-BlSdh5B7.js} +4 -4
- package/dist/cdn/chunks/{DesignReferenceSidebar-CtaoY-hl.js.map → DesignReferenceSidebar-BlSdh5B7.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-C6RlIxoi.js → IssuesPanel-CKkv9z9g.js} +4 -4
- package/dist/cdn/chunks/{IssuesPanel-C6RlIxoi.js.map → IssuesPanel-CKkv9z9g.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-DpyPozop.js → LogicTagInsertButton-CHc1yZ9v.js} +165 -165
- package/dist/cdn/chunks/{LogicTagInsertButton-DpyPozop.js.map → LogicTagInsertButton-CHc1yZ9v.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-ERJr7bP_.js → MergeTagInput--qTYfCWk.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-ERJr7bP_.js.map → MergeTagInput--qTYfCWk.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-n3nvSNeQ.js → MergeTagModeToggle-CdWIGo3Q.js} +5 -5
- package/dist/cdn/chunks/{MergeTagModeToggle-n3nvSNeQ.js.map → MergeTagModeToggle-CdWIGo3Q.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-R2ph_UOo.js → ParagraphEditor-BilbVtrG.js} +17 -17
- package/dist/cdn/chunks/{ParagraphEditor-R2ph_UOo.js.map → ParagraphEditor-BilbVtrG.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-C-dwbb7T.js → RestoreVersionDialog-Q-a44Vjv.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog-C-dwbb7T.js.map → RestoreVersionDialog-Q-a44Vjv.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-Ch5zeyZ7.js → RichTextEditorContent-Fzuu9pLP.js} +6 -6
- package/dist/cdn/chunks/{RichTextEditorContent-Ch5zeyZ7.js.map → RichTextEditorContent-Fzuu9pLP.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-C_BPjVv6.js → SaveBlockDialog-DeW_M6kh.js} +9 -9
- package/dist/cdn/chunks/{SaveBlockDialog-C_BPjVv6.js.map → SaveBlockDialog-DeW_M6kh.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CrrGEfFb.js → SavedBlocksBrowserModal-BzQWibKG.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CrrGEfFb.js.map → SavedBlocksBrowserModal-BzQWibKG.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-DfTaMPAr.js → SavedBlocksPanels-Ce1RePjk.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-DfTaMPAr.js.map → SavedBlocksPanels-Ce1RePjk.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DziwHYSu.js → SavedBlocksPickBar-DIDl6xfy.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-DziwHYSu.js.map → SavedBlocksPickBar-DIDl6xfy.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-CR6RG6dZ.js → TemplateScoringPanel-d_Ppowsq.js} +49 -49
- package/dist/cdn/chunks/{TemplateScoringPanel-CR6RG6dZ.js.map → TemplateScoringPanel-d_Ppowsq.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-DjXiiiNr.js → TemplateSettings-Dr5OJ0Gi.js} +8 -8
- package/dist/cdn/chunks/{TemplateSettings-DjXiiiNr.js.map → TemplateSettings-Dr5OJ0Gi.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DId9Og-N.js → TestEmailModal-CWTmaJuT.js} +56 -51
- package/dist/cdn/chunks/TestEmailModal-CWTmaJuT.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-B8LwXmeX.js → TestEmailPanel-BdYsVHXA.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-B8LwXmeX.js.map → TestEmailPanel-BdYsVHXA.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-C7KMzX1e.js → TitleEditor-pJeeZ-PX.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-C7KMzX1e.js.map → TitleEditor-pJeeZ-PX.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-CDy8OfcB.js → ToggleSwitch-0dGCYnRY.js} +2 -2
- package/dist/cdn/chunks/{ToggleSwitch-CDy8OfcB.js.map → ToggleSwitch-0dGCYnRY.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-DqFhWxgW.js → Toolbar-BsiHW9gY.js} +493 -478
- package/dist/cdn/chunks/{Toolbar-DqFhWxgW.js.map → Toolbar-BsiHW9gY.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-BKqDFLq3.js → TplModal-CEuGD7pt.js} +4 -4
- package/dist/cdn/chunks/{TplModal-BKqDFLq3.js.map → TplModal-CEuGD7pt.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-Dij1pTEb.js → VersionHistoryMenu-B3-hNu9c.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryMenu-Dij1pTEb.js.map → VersionHistoryMenu-B3-hNu9c.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DcCFFDK6.js → VersionHistoryPanels-C1yck5gT.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-DcCFFDK6.js.map → VersionHistoryPanels-C1yck5gT.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-Df3FVlig.js → VersionPreviewBanner-PzVQSBJE.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-Df3FVlig.js.map → VersionPreviewBanner-PzVQSBJE.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-DGkbmj06.js +36 -0
- package/dist/cdn/chunks/WrapperBlock-DGkbmj06.js.map +1 -0
- package/dist/cdn/chunks/{ca-Bqeygp1_.js → ca-Ckgw9yd0.js} +2 -1
- package/dist/cdn/chunks/ca-Ckgw9yd0.js.map +1 -0
- package/dist/cdn/chunks/{cloud-eaXyxZ8l.js → cloud-CIT4yPp4.js} +2 -2
- package/dist/cdn/chunks/{cloud-eaXyxZ8l.js.map → cloud-CIT4yPp4.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-D5bXzcTe.js → createCloudRuntime-COUxbPvd.js} +49 -40
- package/dist/cdn/chunks/createCloudRuntime-COUxbPvd.js.map +1 -0
- package/dist/cdn/chunks/{de-CY6SlqBx.js → de-D4dweQw8.js} +2 -1
- package/dist/cdn/chunks/de-D4dweQw8.js.map +1 -0
- package/dist/{en-8V-2kDcp.js → cdn/chunks/en-VE7R7NyL.js} +3 -0
- package/dist/cdn/chunks/en-VE7R7NyL.js.map +1 -0
- package/dist/{es-Cmn1rT3l.js → cdn/chunks/es-B9OhP8H3.js} +3 -0
- package/dist/cdn/chunks/es-B9OhP8H3.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Bhu8UEE5.js → extensions-CafoGF65.js} +5 -5
- package/dist/cdn/chunks/{extensions-Bhu8UEE5.js.map → extensions-CafoGF65.js.map} +1 -1
- package/dist/cdn/chunks/{fr-2yDa4zXM.js → fr-wrXhIi00.js} +2 -1
- package/dist/cdn/chunks/fr-wrXhIi00.js.map +1 -0
- package/dist/cdn/chunks/keys-DCWeHkSF.js +12 -0
- package/dist/cdn/chunks/keys-DCWeHkSF.js.map +1 -0
- package/dist/{nl-Bzk2zRI8.js → cdn/chunks/nl-DeFatKJe.js} +3 -0
- package/dist/cdn/chunks/nl-DeFatKJe.js.map +1 -0
- package/dist/cdn/chunks/preRenderCustomBlocks-Dpj-_cOj.js +21 -0
- package/dist/cdn/chunks/preRenderCustomBlocks-Dpj-_cOj.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-DqtSCTUi.js → pt-BR-Bh1J8ey6.js} +2 -1
- package/dist/cdn/chunks/pt-BR-Bh1J8ey6.js.map +1 -0
- package/dist/cdn/chunks/{socialIcons-9VrG8X3m.js → socialIcons-BvYNMn1G.js} +264 -258
- package/dist/cdn/chunks/socialIcons-BvYNMn1G.js.map +1 -0
- package/dist/cdn/chunks/{src-CqYYKcCI.js → src-CbGCES0u.js} +175 -168
- package/dist/cdn/chunks/src-CbGCES0u.js.map +1 -0
- package/dist/cdn/chunks/{src-CaNsA_WX.js → src-Cnc5E71L.js} +258 -247
- package/dist/cdn/chunks/src-Cnc5E71L.js.map +1 -0
- package/dist/cdn/chunks/{src-Dwgq7hf4.js → src-DveVYoWS.js} +281 -181
- package/dist/cdn/chunks/src-DveVYoWS.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-C09JcFS0.js → useCloudI18n-CrjWbpbu.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-C09JcFS0.js.map → useCloudI18n-CrjWbpbu.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CXYI14ux.js → useEditorCore-CQraU2s_.js} +421 -408
- package/dist/cdn/chunks/useEditorCore-CQraU2s_.js.map +1 -0
- package/dist/cdn/chunks/{useEditorRoot-DFx2fXJP.js → useEditorRoot-CshefZLP.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-DFx2fXJP.js.map → useEditorRoot-CshefZLP.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DTZ9sIcv.js → useI18n-CyO_Nmca.js} +2 -2
- package/dist/cdn/chunks/{useI18n-DTZ9sIcv.js.map → useI18n-CyO_Nmca.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-E2V0Xdcb.js → useLogicTag-DF7-l66G.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-E2V0Xdcb.js.map → useLogicTag-DF7-l66G.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-BE8oDoha.js → useMergeTag-DbIHw4NG.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-BE8oDoha.js.map → useMergeTag-DbIHw4NG.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-gB9q-ql7.js → usePopoverPosition-BJRvAb-h.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-gB9q-ql7.js.map → usePopoverPosition-BJRvAb-h.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CtTXwmiU.js → useScrollToBlock-DgHZJvID.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-CtTXwmiU.js.map → useScrollToBlock-DgHZJvID.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +484 -460
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-C9xWZXhg.js → cloud-DsqqUfzh.js} +1 -1
- package/dist/{createCloudRuntime-BGd5--Bq.js → createCloudRuntime-iLflkYzP.js} +47 -38
- package/dist/{de-CY6SlqBx.js → de-D4dweQw8.js} +1 -0
- package/dist/{dist-tGkjkX-v.js → dist-DbUZvK04.js} +277 -176
- package/dist/{cdn/chunks/en-8V-2kDcp.js → en-VE7R7NyL.js} +1 -2
- package/dist/{cdn/chunks/es-Cmn1rT3l.js → es-B9OhP8H3.js} +1 -2
- package/dist/{extensions-DRN-elXT.js → extensions-DDhjuVKy.js} +4 -4
- package/dist/{fr-2yDa4zXM.js → fr-wrXhIi00.js} +1 -0
- package/dist/index.d.ts +65 -0
- package/dist/keys-CDqfZIRt.js +10 -0
- package/dist/{cdn/chunks/nl-Bzk2zRI8.js → nl-DeFatKJe.js} +1 -2
- package/dist/preRenderCustomBlocks-BBSqQgke.js +19 -0
- package/dist/{pt-BR-DqtSCTUi.js → pt-BR-Bh1J8ey6.js} +1 -0
- package/dist/{socialIcons-DkGcpEwC.js → socialIcons-O7PZCW2P.js} +245 -239
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +520 -496
- package/dist/{useCloudI18n-D1iedlP3.js → useCloudI18n-DpEsiLeR.js} +1 -1
- package/dist/{useEditorCore-BUVbQgwb.js → useEditorCore-Dt_VWNqX.js} +817 -804
- package/dist/{useEditorRoot-BOxn5EfP.js → useEditorRoot-CkB_5d0h.js} +1 -1
- package/dist/{useI18n-Ds_-druD.js → useI18n-B_CdcBwG.js} +1 -1
- package/dist/{useLogicTag-DoHfc08B.js → useLogicTag-D9pvgxQR.js} +3 -3
- package/dist/{useMergeTag-DXyum3kG.js → useMergeTag-BaVFPdlq.js} +5 -5
- package/dist/{usePopoverPosition-Du-Ah8E9.js → usePopoverPosition-DH7z3Ghm.js} +1 -1
- package/dist/{useScrollToBlock-DXQYPCnJ.js → useScrollToBlock-Dj4v3rxr.js} +1 -1
- package/package.json +7 -7
- package/dist/BlockPreviewCanvas-BMC16_QU.js +0 -131
- package/dist/cdn/chunks/BlockPreviewCanvas-DeS7Sa--.js +0 -133
- package/dist/cdn/chunks/BlockPreviewCanvas-DeS7Sa--.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-DId9Og-N.js.map +0 -1
- package/dist/cdn/chunks/ca-Bqeygp1_.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-D5bXzcTe.js.map +0 -1
- package/dist/cdn/chunks/de-CY6SlqBx.js.map +0 -1
- package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js +0 -8
- package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js.map +0 -1
- package/dist/cdn/chunks/en-8V-2kDcp.js.map +0 -1
- package/dist/cdn/chunks/es-Cmn1rT3l.js.map +0 -1
- package/dist/cdn/chunks/fr-2yDa4zXM.js.map +0 -1
- package/dist/cdn/chunks/keys-dJbD1QPs.js +0 -12
- package/dist/cdn/chunks/keys-dJbD1QPs.js.map +0 -1
- package/dist/cdn/chunks/nl-Bzk2zRI8.js.map +0 -1
- package/dist/cdn/chunks/preRenderCustomBlocks-Bdpiiw4A.js +0 -23
- package/dist/cdn/chunks/preRenderCustomBlocks-Bdpiiw4A.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DqtSCTUi.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-9VrG8X3m.js.map +0 -1
- package/dist/cdn/chunks/src-CaNsA_WX.js.map +0 -1
- package/dist/cdn/chunks/src-CqYYKcCI.js.map +0 -1
- package/dist/cdn/chunks/src-Dwgq7hf4.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CXYI14ux.js.map +0 -1
- package/dist/emailFrameWidth-BmFCN2dp.js +0 -6
- package/dist/keys-BdoSgsz9.js +0 -10
- package/dist/preRenderCustomBlocks-DFXH54Zr.js +0 -21
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as e, G as t,
|
|
1
|
+
import { $ as e, G as t, Q as n, S as r, X as i, Z as a, at as o, b as s, ct as c, et as l, ft as u, lt as d, nt as f, ot as p, pt as m, rt as h, st as g, tt as _, ut as v, v as y, x as ee, y as b } from "./src-DveVYoWS.js";
|
|
2
2
|
//#endregion
|
|
3
3
|
//#region ../renderer/src/render-context.ts
|
|
4
|
-
var
|
|
4
|
+
var x = `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.40.0",
|
|
8
8
|
bugs: "https://github.com/templatical/sdk/issues",
|
|
9
9
|
dependencies: { "@templatical/types": "workspace:*" },
|
|
10
10
|
devDependencies: {
|
|
@@ -42,7 +42,7 @@ var v = `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`, S = {
|
|
46
46
|
arial: "Arial, sans-serif",
|
|
47
47
|
helvetica: "Helvetica, sans-serif",
|
|
48
48
|
georgia: "Georgia, serif",
|
|
@@ -51,7 +51,7 @@ var v = `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
|
+
}, C = class e {
|
|
55
55
|
containerWidth;
|
|
56
56
|
customFonts;
|
|
57
57
|
defaultFallbackFont;
|
|
@@ -60,7 +60,7 @@ var v = `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 = x, 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 v = `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 S[e.toLowerCase()] || e;
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region ../renderer/src/visibility.ts
|
|
79
|
-
function
|
|
79
|
+
function w(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 T(e, t = []) {
|
|
84
|
+
let n = [E(e), ...t].filter((e) => e !== "").join(" ");
|
|
85
85
|
return n === "" ? "" : ` css-class="${n}"`;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function E(e) {
|
|
88
88
|
let t = e.visibility;
|
|
89
89
|
if (!t) return "";
|
|
90
90
|
let n = [];
|
|
@@ -92,35 +92,35 @@ function C(e) {
|
|
|
92
92
|
}
|
|
93
93
|
//#endregion
|
|
94
94
|
//#region ../renderer/src/unrenderable.ts
|
|
95
|
-
var
|
|
96
|
-
function
|
|
95
|
+
var D = "templatical:unrenderable-block";
|
|
96
|
+
function O(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 k(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><!-- ${D} type="${O(e.type)}" id="${O(e.id)}" --></mj-raw>`;
|
|
101
101
|
}
|
|
102
102
|
//#endregion
|
|
103
103
|
//#region ../renderer/src/escape.ts
|
|
104
|
-
var
|
|
104
|
+
var A = {
|
|
105
105
|
"&": "&",
|
|
106
106
|
"<": "<",
|
|
107
107
|
">": ">",
|
|
108
108
|
"\"": """,
|
|
109
109
|
"'": "'"
|
|
110
|
-
},
|
|
111
|
-
function
|
|
112
|
-
return e === "" ? "" : e.replace(
|
|
110
|
+
}, j = /[&<>"']/g;
|
|
111
|
+
function M(e) {
|
|
112
|
+
return e === "" ? "" : e.replace(j, (e) => A[e] ?? e);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
return e === "" ? "" : e.replace(
|
|
114
|
+
function N(e) {
|
|
115
|
+
return e === "" ? "" : e.replace(j, (e) => A[e] ?? e);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
return e === "" ? "" :
|
|
117
|
+
function P(e) {
|
|
118
|
+
return e === "" ? "" : N(e).replace(/[;{}\r\n]/g, "");
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
return e === "" ? "" :
|
|
120
|
+
function F(e) {
|
|
121
|
+
return e === "" ? "" : te(e, (e) => I(e, "data-merge-tag") ?? I(e, "data-logic-merge-tag"));
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function te(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 ee(e, t) {
|
|
|
133
133
|
n += e.substring(r, i + 5), r = i + 5;
|
|
134
134
|
continue;
|
|
135
135
|
}
|
|
136
|
-
let o =
|
|
136
|
+
let o = y(e, i + 5);
|
|
137
137
|
if (o === -1) {
|
|
138
138
|
n += e.substring(r);
|
|
139
139
|
break;
|
|
@@ -152,31 +152,31 @@ function ee(e, t) {
|
|
|
152
152
|
}
|
|
153
153
|
return n;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
return
|
|
155
|
+
function I(e, t) {
|
|
156
|
+
return b(e, t);
|
|
157
157
|
}
|
|
158
158
|
//#endregion
|
|
159
159
|
//#region ../renderer/src/padding.ts
|
|
160
|
-
function
|
|
160
|
+
function L(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 R(e, t) {
|
|
166
166
|
return e ? ` ${t === "native" ? "background-color" : "container-background-color"}="${e}"` : "";
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function z(e) {
|
|
169
169
|
return typeof e != "number" || !Number.isFinite(e) || e <= 0 ? "" : ` height="${e}px"`;
|
|
170
170
|
}
|
|
171
171
|
//#endregion
|
|
172
172
|
//#region ../renderer/src/rich-text.ts
|
|
173
|
-
var
|
|
174
|
-
function
|
|
175
|
-
return `${
|
|
173
|
+
var B = "tpl-rich-text";
|
|
174
|
+
function V(e) {
|
|
175
|
+
return `${B}-${e}`;
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
let n =
|
|
179
|
-
let t = `.${
|
|
177
|
+
function ne(e, t = "ltr") {
|
|
178
|
+
let n = m, r = `.${B}`, i = [...new Set(e)].sort((e, t) => e - t).flatMap((e) => {
|
|
179
|
+
let t = `.${V(e)}`;
|
|
180
180
|
return [`${t} p { margin: 0 0 ${e}px; }`, `${t} p:last-child { margin-bottom: 0; }`];
|
|
181
181
|
}), a = t === "rtl" ? "padding-right" : "padding-left";
|
|
182
182
|
return [
|
|
@@ -185,40 +185,41 @@ function te(e, t = "ltr") {
|
|
|
185
185
|
`${r} li { margin: ${n.listItemMarginY}px 0; }`
|
|
186
186
|
].join("\n ");
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
return e ??
|
|
188
|
+
function H(e) {
|
|
189
|
+
return e ?? m.paragraphGap;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
let t = [
|
|
193
|
-
if (e.type === "paragraph" && t.push(
|
|
191
|
+
function re(e) {
|
|
192
|
+
let t = [m.paragraphGap], n = (e) => {
|
|
193
|
+
if (e.type === "paragraph" && t.push(H(e.paragraphSpacing)), h(e)) for (let t of e.children) for (let e of t) n(e);
|
|
194
|
+
else if (v(e)) for (let t of e.children) n(t);
|
|
194
195
|
};
|
|
195
196
|
for (let t of e) n(t);
|
|
196
197
|
return t;
|
|
197
198
|
}
|
|
198
199
|
//#endregion
|
|
199
200
|
//#region ../renderer/src/renderers/title.ts
|
|
200
|
-
function
|
|
201
|
-
if (
|
|
202
|
-
let n =
|
|
201
|
+
function ie(e, t) {
|
|
202
|
+
if (w(e)) return "";
|
|
203
|
+
let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = ae(F(e.content)), a = u[e.level] ?? u[2], o = e.color ? `\n color="${N(e.color)}"` : "", s = e.textAlign, c = oe(e.fontFamily, t), l = T(e, [B, V(H(void 0))]), d = `h${u[e.level] ? e.level : 2}`;
|
|
203
204
|
return `<mj-text
|
|
204
205
|
font-size="${a}px"${o}
|
|
205
206
|
align="${s}"
|
|
206
207
|
line-height="1.3"
|
|
207
208
|
padding="${n}"${r}${c}${l}
|
|
208
|
-
><${
|
|
209
|
+
><${d} style="margin:0;font-size:inherit;color:inherit;line-height:inherit">${i}</${d}></mj-text>`;
|
|
209
210
|
}
|
|
210
|
-
function
|
|
211
|
+
function ae(e) {
|
|
211
212
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
212
213
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
213
214
|
}
|
|
214
|
-
function
|
|
215
|
+
function oe(e, t) {
|
|
215
216
|
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
216
217
|
}
|
|
217
218
|
//#endregion
|
|
218
219
|
//#region ../renderer/src/renderers/paragraph.ts
|
|
219
|
-
function
|
|
220
|
-
if (
|
|
221
|
-
let n =
|
|
220
|
+
function se(e, t) {
|
|
221
|
+
if (w(e) || e.content.replace(/<\/?p\b[^<>]*>/gi, "").trim() === "") return "";
|
|
222
|
+
let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = F(e.content), a = T(e, [B, V(H(e.paragraphSpacing))]);
|
|
222
223
|
return `<mj-text
|
|
223
224
|
line-height="1.5"${t.contentDirection === "rtl" ? "\n align=\"right\"" : ""}
|
|
224
225
|
padding="${n}"${r}${a}
|
|
@@ -226,14 +227,14 @@ function oe(e, t) {
|
|
|
226
227
|
}
|
|
227
228
|
//#endregion
|
|
228
229
|
//#region ../renderer/src/renderers/image.ts
|
|
229
|
-
function
|
|
230
|
-
if (
|
|
231
|
-
let n =
|
|
232
|
-
e.linkUrl && (c = ` href="${
|
|
233
|
-
let l =
|
|
230
|
+
function ce(e, t) {
|
|
231
|
+
if (w(e) || e.src === "") return "";
|
|
232
|
+
let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = e.width === "full" ? t.containerWidth + "px" : e.width + "px", a = z(e.height), o = T(e), s = e.borderRadius && e.borderRadius > 0 ? ` border-radius="${e.borderRadius}px"` : "", c = "";
|
|
233
|
+
e.linkUrl && (c = ` href="${N(e.linkUrl)}"`, e.linkOpenInNewTab && (c += " target=\"_blank\" rel=\"noopener\""));
|
|
234
|
+
let l = N(e.src), u = e.decorative === !0;
|
|
234
235
|
return `<mj-image
|
|
235
236
|
src="${l}"
|
|
236
|
-
alt="${u ? "" :
|
|
237
|
+
alt="${u ? "" : N(e.alt)}"
|
|
237
238
|
width="${i}"${a}
|
|
238
239
|
align="${e.align}"
|
|
239
240
|
padding="${n}"${r}${s}${c}${o}${u ? " role=\"presentation\"" : ""}
|
|
@@ -241,9 +242,9 @@ function B(e, t) {
|
|
|
241
242
|
}
|
|
242
243
|
//#endregion
|
|
243
244
|
//#region ../renderer/src/renderers/button.ts
|
|
244
|
-
function
|
|
245
|
-
if (
|
|
246
|
-
let n =
|
|
245
|
+
function le(e, t) {
|
|
246
|
+
if (w(e)) return "";
|
|
247
|
+
let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = L(e.buttonPadding), a = e.url === "" ? "" : N(e.url), o = a === "" ? "" : ` href="${a}"`, s = N(e.backgroundColor), c = N(e.textColor), l = e.fontSize, u = e.borderRadius, d = M(e.text), f = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", p = U(e.fontFamily, t), m = W(e.width), h = T(e);
|
|
247
248
|
return `<mj-button${o}${f}
|
|
248
249
|
background-color="${s}"
|
|
249
250
|
color="${c}"
|
|
@@ -255,48 +256,48 @@ function V(e, t) {
|
|
|
255
256
|
padding="${n}"${r}${p}${m}${h}
|
|
256
257
|
>${d}</mj-button>`;
|
|
257
258
|
}
|
|
258
|
-
function
|
|
259
|
+
function U(e, t) {
|
|
259
260
|
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
260
261
|
}
|
|
261
|
-
function
|
|
262
|
+
function W(e) {
|
|
262
263
|
return e === void 0 ? "" : ` width="${e === "full" ? "100%" : `${e}px`}"`;
|
|
263
264
|
}
|
|
264
265
|
//#endregion
|
|
265
266
|
//#region ../renderer/src/renderers/divider.ts
|
|
266
|
-
function
|
|
267
|
-
if (
|
|
268
|
-
let n =
|
|
267
|
+
function ue(e, t) {
|
|
268
|
+
if (w(e)) return "";
|
|
269
|
+
let n = L(e.styles.padding), r = e.styles.backgroundColor ? ` container-background-color="${N(e.styles.backgroundColor)}"` : "", i = e.width === "full" ? "100%" : e.width + "px";
|
|
269
270
|
return `<mj-divider
|
|
270
271
|
border-width="${e.thickness}px"
|
|
271
272
|
border-style="${e.lineStyle}"
|
|
272
|
-
border-color="${
|
|
273
|
+
border-color="${N(e.color)}"
|
|
273
274
|
width="${i}"
|
|
274
|
-
padding="${n}"${r}${
|
|
275
|
+
padding="${n}"${r}${T(e)}
|
|
275
276
|
/>`;
|
|
276
277
|
}
|
|
277
278
|
//#endregion
|
|
278
279
|
//#region ../renderer/src/renderers/spacer.ts
|
|
279
|
-
function
|
|
280
|
-
return
|
|
280
|
+
function de(e, t) {
|
|
281
|
+
return w(e) ? "" : `<mj-spacer height="${e.height}px" padding="0"${e.styles.backgroundColor ? ` container-background-color="${N(e.styles.backgroundColor)}"` : ""}${T(e)} />`;
|
|
281
282
|
}
|
|
282
283
|
//#endregion
|
|
283
284
|
//#region ../renderer/src/renderers/html.ts
|
|
284
|
-
function
|
|
285
|
-
if (
|
|
285
|
+
function fe(e, t) {
|
|
286
|
+
if (w(e) || !t.allowHtmlBlocks) return "";
|
|
286
287
|
let n = e.content;
|
|
287
288
|
if (n === "") return "";
|
|
288
|
-
let r =
|
|
289
|
-
return `<mj-text padding="${
|
|
289
|
+
let r = T(e);
|
|
290
|
+
return `<mj-text padding="${L(e.styles.padding)}"${R(e.styles.backgroundColor, "container")}${r}>
|
|
290
291
|
${n}
|
|
291
292
|
</mj-text>`;
|
|
292
293
|
}
|
|
293
294
|
//#endregion
|
|
294
295
|
//#region ../renderer/src/renderers/social.ts
|
|
295
|
-
function
|
|
296
|
-
if (
|
|
296
|
+
function pe(e, t) {
|
|
297
|
+
if (w(e)) return "";
|
|
297
298
|
let n = e.icons;
|
|
298
299
|
if (n.length === 0) return "";
|
|
299
|
-
let r =
|
|
300
|
+
let r = L(e.styles.padding), i = e.styles.backgroundColor ? ` container-background-color="${N(e.styles.backgroundColor)}"` : "", a = T(e), o = e.align, s = e.iconSize, c = e.iconStyle, l = e.spacing, u;
|
|
300
301
|
switch (s) {
|
|
301
302
|
case "small":
|
|
302
303
|
u = 24;
|
|
@@ -327,83 +328,83 @@ function q(e, t) {
|
|
|
327
328
|
padding="${r}"${i}${a}
|
|
328
329
|
>
|
|
329
330
|
${n.map((e, n) => {
|
|
330
|
-
let r = e.platform, i =
|
|
331
|
+
let r = e.platform, i = N(e.url), a = `${t.socialIconsBaseUrl}/${c}/${r}.png`, o = n === f - 1 ? 0 : l;
|
|
331
332
|
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>`;
|
|
332
333
|
}).join("\n")}
|
|
333
334
|
</mj-social>`;
|
|
334
335
|
}
|
|
335
336
|
//#endregion
|
|
336
337
|
//#region ../renderer/src/renderers/menu.ts
|
|
337
|
-
function
|
|
338
|
-
if (
|
|
339
|
-
let n =
|
|
338
|
+
function me(e, t) {
|
|
339
|
+
if (w(e) || e.items.length === 0) return "";
|
|
340
|
+
let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = T(e), a = _e(e.fontFamily, t), o = e.textAlign;
|
|
340
341
|
return `<mj-text
|
|
341
|
-
font-size="${e.fontSize}px"${e.color ? `\n color="${
|
|
342
|
+
font-size="${e.fontSize}px"${e.color ? `\n color="${N(e.color)}"` : ""}
|
|
342
343
|
align="${o}"
|
|
343
344
|
line-height="1.5"
|
|
344
345
|
padding="${n}"${r}${a}${i}
|
|
345
|
-
>${
|
|
346
|
+
>${he(e)}</mj-text>`;
|
|
346
347
|
}
|
|
347
|
-
function
|
|
348
|
-
let t = e.items, n =
|
|
349
|
-
for (let e = 0; e < s; e++) o.push(
|
|
348
|
+
function he(e) {
|
|
349
|
+
let t = e.items, n = M(e.separator), r = P(e.separatorColor), i = e.spacing, a = e.linkColor ?? e.color, o = [], s = t.length;
|
|
350
|
+
for (let e = 0; e < s; e++) o.push(ge(t[e], a)), e < s - 1 && o.push(`<span style="color: ${r}; padding: 0 ${i}px;">${n}</span>`);
|
|
350
351
|
return o.join("");
|
|
351
352
|
}
|
|
352
|
-
function
|
|
353
|
-
let n =
|
|
354
|
-
return i && o.unshift(`color: ${
|
|
353
|
+
function ge(e, t) {
|
|
354
|
+
let n = M(e.text), r = N(e.url), i = e.color ?? t, a = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", o = ["text-decoration: none"];
|
|
355
|
+
return i && o.unshift(`color: ${P(i)}`), e.bold && o.push("font-weight: bold"), e.underline && o.push("text-decoration: underline"), `<a href="${r}" style="${o.join("; ")}"${a}>${n}</a>`;
|
|
355
356
|
}
|
|
356
|
-
function
|
|
357
|
+
function _e(e, t) {
|
|
357
358
|
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
358
359
|
}
|
|
359
360
|
//#endregion
|
|
360
361
|
//#region ../renderer/src/renderers/table.ts
|
|
361
|
-
function
|
|
362
|
-
if (
|
|
363
|
-
let n =
|
|
362
|
+
function ve(e, t) {
|
|
363
|
+
if (w(e) || e.rows.length === 0) return "";
|
|
364
|
+
let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = T(e), a = Se(e.fontFamily, t);
|
|
364
365
|
return `<mj-text
|
|
365
|
-
font-size="${e.fontSize}px"${e.color ? `\n color="${
|
|
366
|
+
font-size="${e.fontSize}px"${e.color ? `\n color="${N(e.color)}"` : ""}
|
|
366
367
|
align="${e.textAlign}"
|
|
367
368
|
line-height="1.5"
|
|
368
369
|
padding="${n}"${r}${a}${i}
|
|
369
|
-
>${
|
|
370
|
+
>${ye(e)}</mj-text>`;
|
|
370
371
|
}
|
|
371
|
-
function
|
|
372
|
-
let t =
|
|
372
|
+
function ye(e) {
|
|
373
|
+
let t = P(e.borderColor), n = e.borderWidth, r = "";
|
|
373
374
|
for (let i = 0; i < e.rows.length; i++) {
|
|
374
375
|
let a = e.rows[i];
|
|
375
|
-
r +=
|
|
376
|
+
r += be(a, e, e.hasHeaderRow && i === 0, t, n);
|
|
376
377
|
}
|
|
377
378
|
return `<table style="width: 100%; border-collapse: collapse;">${r}</table>`;
|
|
378
379
|
}
|
|
379
|
-
function
|
|
380
|
+
function be(e, t, n, r, i) {
|
|
380
381
|
let a = "";
|
|
381
|
-
for (let o of e.cells) a +=
|
|
382
|
+
for (let o of e.cells) a += xe(o, t, n, r, i);
|
|
382
383
|
return `<tr>${a}</tr>`;
|
|
383
384
|
}
|
|
384
|
-
function
|
|
385
|
+
function xe(e, t, n, r, i) {
|
|
385
386
|
let a = t.cellPadding, o = [`border: ${i}px solid ${r}`, `padding: ${a}px`];
|
|
386
|
-
n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${
|
|
387
|
-
let s = o.join("; "), c =
|
|
387
|
+
n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${P(t.headerBackgroundColor)}`));
|
|
388
|
+
let s = o.join("; "), c = M(F(e.content)), l = n ? "th" : "td";
|
|
388
389
|
return `<${l} style="${s}">${c}</${l}>`;
|
|
389
390
|
}
|
|
390
|
-
function
|
|
391
|
+
function Se(e, t) {
|
|
391
392
|
return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
|
|
392
393
|
}
|
|
393
394
|
//#endregion
|
|
394
395
|
//#region ../renderer/src/renderers/custom.ts
|
|
395
|
-
function
|
|
396
|
-
if (
|
|
396
|
+
function Ce(e, t) {
|
|
397
|
+
if (w(e)) return "";
|
|
397
398
|
let n = t.customBlockHtml.get(e.id) ?? e.renderedHtml;
|
|
398
399
|
if (!n || n === "") return "";
|
|
399
|
-
let r =
|
|
400
|
-
return `<mj-text padding="${
|
|
400
|
+
let r = T(e);
|
|
401
|
+
return `<mj-text padding="${L(e.styles.padding)}"${R(e.styles.backgroundColor, "container")}${r}>
|
|
401
402
|
${n}
|
|
402
403
|
</mj-text>`;
|
|
403
404
|
}
|
|
404
405
|
//#endregion
|
|
405
406
|
//#region ../renderer/src/columns.ts
|
|
406
|
-
function
|
|
407
|
+
function G(e) {
|
|
407
408
|
switch (e) {
|
|
408
409
|
case "2": return ["50%", "50%"];
|
|
409
410
|
case "3": return [
|
|
@@ -416,7 +417,7 @@ function J(e) {
|
|
|
416
417
|
default: return ["100%"];
|
|
417
418
|
}
|
|
418
419
|
}
|
|
419
|
-
function
|
|
420
|
+
function K(e, t) {
|
|
420
421
|
switch (e) {
|
|
421
422
|
case "2": return [t * .5, t * .5];
|
|
422
423
|
case "3": return [
|
|
@@ -431,7 +432,7 @@ function Y(e, t) {
|
|
|
431
432
|
}
|
|
432
433
|
//#endregion
|
|
433
434
|
//#region ../renderer/src/display-condition.ts
|
|
434
|
-
function
|
|
435
|
+
function q(e, t) {
|
|
435
436
|
if (t === "") return "";
|
|
436
437
|
let n = e.displayCondition;
|
|
437
438
|
return n ? `<mj-raw>${n.before}</mj-raw>
|
|
@@ -440,28 +441,28 @@ function X(e, t) {
|
|
|
440
441
|
}
|
|
441
442
|
//#endregion
|
|
442
443
|
//#region ../renderer/src/renderers/section.ts
|
|
443
|
-
function
|
|
444
|
-
if (
|
|
445
|
-
let r = e.columns, i =
|
|
446
|
-
for (let e = 0; e <
|
|
447
|
-
let r =
|
|
448
|
-
|
|
449
|
-
${
|
|
444
|
+
function we(e, t, n) {
|
|
445
|
+
if (w(e)) return "";
|
|
446
|
+
let r = e.columns, i = G(r), a = K(r, t.containerWidth), o = L(e.styles.padding), s = R(e.styles.backgroundColor, "native"), c = T(e), l = e.borderRadius && e.borderRadius > 0 ? ` border-radius="${e.borderRadius}px"` : "", u = e.children, d = [];
|
|
447
|
+
for (let e = 0; e < u.length; e++) {
|
|
448
|
+
let r = u[e], o = i[e] ?? "100%", s = Math.floor(a[e] ?? t.containerWidth), c = Te(r, t.allowHtmlBlocks).filter((e) => !h(e)), l = t.withContainerWidth(s), f = c.map((e) => q(e, n(e, l))).filter((e) => e !== "").join("\n");
|
|
449
|
+
d.push(`<mj-column width="${o}">
|
|
450
|
+
${f === "" ? "<mj-text> </mj-text>" : f}
|
|
450
451
|
</mj-column>`);
|
|
451
452
|
}
|
|
452
|
-
let
|
|
453
|
-
return `<mj-section${s} padding="${o}"${
|
|
454
|
-
${e.stackOnMobile === !1 &&
|
|
455
|
-
${
|
|
456
|
-
</mj-group>` :
|
|
453
|
+
let f = d.join("\n"), p = t.contentDirection === "rtl" ? " direction=\"rtl\"" : "";
|
|
454
|
+
return `<mj-section${s} padding="${o}"${l}${c}${p}>
|
|
455
|
+
${e.stackOnMobile === !1 && d.length > 1 ? `<mj-group${p}>
|
|
456
|
+
${f}
|
|
457
|
+
</mj-group>` : f}
|
|
457
458
|
</mj-section>`;
|
|
458
459
|
}
|
|
459
|
-
function
|
|
460
|
+
function Te(e, t) {
|
|
460
461
|
return t ? e : e.filter((e) => e.type !== "html");
|
|
461
462
|
}
|
|
462
463
|
//#endregion
|
|
463
464
|
//#region ../renderer/src/renderers/video.ts
|
|
464
|
-
function
|
|
465
|
+
function Ee(e, t) {
|
|
465
466
|
if (t) return t;
|
|
466
467
|
if (!e) return null;
|
|
467
468
|
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})/]) {
|
|
@@ -471,93 +472,98 @@ function ye(e, t) {
|
|
|
471
472
|
let n = e.match(/vimeo\.com\/(?:video\/)?(\d+)/);
|
|
472
473
|
return n ? `https://vumbnail.com/${n[1]}.jpg` : null;
|
|
473
474
|
}
|
|
474
|
-
function
|
|
475
|
-
if (
|
|
476
|
-
let n =
|
|
475
|
+
function De(e, t) {
|
|
476
|
+
if (w(e)) return "";
|
|
477
|
+
let n = Ee(e.url, e.thumbnailUrl);
|
|
477
478
|
if (!n) return "";
|
|
478
|
-
let r =
|
|
479
|
+
let r = L(e.styles.padding), i = R(e.styles.backgroundColor, "container"), a = e.width === "full" ? t.containerWidth + "px" : e.width + "px", o = z(e.height), s = T(e);
|
|
479
480
|
return `<mj-image
|
|
480
|
-
src="${
|
|
481
|
-
alt="${
|
|
481
|
+
src="${N(n)}"
|
|
482
|
+
alt="${N(e.alt)}"
|
|
482
483
|
width="${a}"${o}
|
|
483
484
|
align="${e.align}"
|
|
484
485
|
padding="${r}"
|
|
485
|
-
href="${
|
|
486
|
+
href="${N(e.url)}"
|
|
486
487
|
target="_blank"
|
|
487
488
|
rel="noopener"${i}${s}
|
|
488
489
|
/>`;
|
|
489
490
|
}
|
|
490
491
|
//#endregion
|
|
491
492
|
//#region ../renderer/src/renderers/index.ts
|
|
492
|
-
function
|
|
493
|
-
let
|
|
494
|
-
return
|
|
493
|
+
function J(t, r) {
|
|
494
|
+
let s = r.blockRenderers[t.type];
|
|
495
|
+
return s ? s(t, r) : h(t) ? we(t, r, J) : c(t) ? ie(t, r) : f(t) ? se(t, r) : l(t) ? ce(t, r) : i(t) ? le(t, r) : n(t) ? ue(t, r) : p(t) ? de(t, r) : e(t) ? fe(t, r) : o(t) ? pe(t, r) : _(t) ? me(t, r) : g(t) ? ve(t, r) : d(t) ? De(t, r) : a(t) ? Ce(t, r) : w(t) ? "" : k(t);
|
|
495
496
|
}
|
|
496
497
|
//#endregion
|
|
497
498
|
//#region ../renderer/src/index.ts
|
|
498
|
-
async function
|
|
499
|
-
let n =
|
|
500
|
-
return `<mjml lang="${
|
|
501
|
-
<mj-head>${
|
|
499
|
+
async function Oe(e, n) {
|
|
500
|
+
let i = n?.layout ? s(n.layout, e) : (ee(e), r(e), e), a = n?.customFonts ?? [], o = n?.defaultFallbackFont ?? "Arial, sans-serif", c = n?.allowHtmlBlocks ?? !0, l = Z(n?.socialIconsBaseUrl ?? x), u = await Me(i, n?.renderCustomBlock), d = Ne(i, n?.getCustomBlockStylesheet), f = t(i.settings), p = new C(i.settings.width, a, o, c, u, l, n?.blockRenderers ?? {}, f), m = Q(i.blocks, c), h = p.resolveFontFamily(i.settings.fontFamily), g = i.settings.backgroundColor, _ = i.settings.textColor ? ` color="${N(i.settings.textColor)}"` : "", v = i.settings.linkColor ? P(i.settings.linkColor) : "inherit", y = i.settings.linkUnderline ? "underline" : "none", b = m.map((e) => Y(e, p)).filter((e) => e !== "").join("\n"), S = je(a), w = Ae(i.settings.preheaderText);
|
|
501
|
+
return `<mjml lang="${N(i.settings.locale)}" dir="${N(f)}">
|
|
502
|
+
<mj-head>${w}
|
|
502
503
|
<mj-attributes>
|
|
503
|
-
<mj-all font-family="${
|
|
504
|
-
<mj-text font-size="14px"${
|
|
504
|
+
<mj-all font-family="${h}" />
|
|
505
|
+
<mj-text font-size="14px"${_} />
|
|
505
506
|
<mj-section padding="0" />
|
|
506
507
|
<mj-column padding="0" />
|
|
507
508
|
<mj-image fluid-on-mobile="true" />
|
|
508
|
-
</mj-attributes>${
|
|
509
|
+
</mj-attributes>${S}
|
|
509
510
|
<mj-style inline="inline">
|
|
510
|
-
${
|
|
511
|
+
${ne(re(m), f)}
|
|
511
512
|
</mj-style>
|
|
512
513
|
<mj-style>
|
|
513
|
-
a { color: ${
|
|
514
|
+
a { color: ${v}; text-decoration: ${y}; }
|
|
514
515
|
@media only screen and (max-width: 480px) {
|
|
515
516
|
.tpl-hide-mobile { display: none !important; mso-hide: all !important; }
|
|
516
517
|
}
|
|
517
518
|
@media only screen and (min-width: 481px) {
|
|
518
519
|
.tpl-hide-desktop { display: none !important; mso-hide: all !important; }
|
|
519
520
|
}
|
|
520
|
-
</mj-style>${
|
|
521
|
+
</mj-style>${Pe(d)}
|
|
521
522
|
</mj-head>
|
|
522
|
-
<mj-body width="${
|
|
523
|
-
${
|
|
523
|
+
<mj-body width="${p.containerWidth}px" background-color="${g}">
|
|
524
|
+
${b}
|
|
524
525
|
</mj-body>
|
|
525
526
|
</mjml>`;
|
|
526
527
|
}
|
|
527
|
-
function
|
|
528
|
-
if (
|
|
529
|
-
|
|
530
|
-
|
|
528
|
+
function Y(e, t) {
|
|
529
|
+
if (v(e)) return q(e, X(Q(e.children, t.allowHtmlBlocks).map((e) => Y(e, t)).filter((e) => e !== "").join("\n"), {
|
|
530
|
+
backgroundColor: e.styles.backgroundColor,
|
|
531
|
+
padding: e.styles.padding,
|
|
532
|
+
borderRadius: e.borderRadius
|
|
533
|
+
}));
|
|
534
|
+
if (h(e)) {
|
|
535
|
+
let n = J(e, t);
|
|
536
|
+
return q(e, e.wrapper && n !== "" ? X(n, e.wrapper) : n);
|
|
531
537
|
}
|
|
532
|
-
return
|
|
538
|
+
return q(e, ke(J(e, t), t.contentDirection));
|
|
533
539
|
}
|
|
534
|
-
function
|
|
535
|
-
return `<mj-wrapper${
|
|
540
|
+
function X(e, t) {
|
|
541
|
+
return `<mj-wrapper${R(t.backgroundColor, "native")}${` padding="${t.padding ? L(t.padding) : "0"}"`}${t.borderRadius && t.borderRadius > 0 ? ` border-radius="${t.borderRadius}px"` : ""}>
|
|
536
542
|
${e}
|
|
537
543
|
</mj-wrapper>`;
|
|
538
544
|
}
|
|
539
|
-
function
|
|
545
|
+
function ke(e, t) {
|
|
540
546
|
return e === "" ? "" : `<mj-section${t === "rtl" ? " direction=\"rtl\"" : ""}>
|
|
541
547
|
<mj-column>
|
|
542
548
|
${e}
|
|
543
549
|
</mj-column>
|
|
544
550
|
</mj-section>`;
|
|
545
551
|
}
|
|
546
|
-
function
|
|
552
|
+
function Z(e) {
|
|
547
553
|
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
548
554
|
}
|
|
549
|
-
function
|
|
555
|
+
function Ae(e) {
|
|
550
556
|
if (!e) return "";
|
|
551
557
|
let t = e.trim();
|
|
552
|
-
return t === "" ? "" : `\n <mj-preview>${
|
|
558
|
+
return t === "" ? "" : `\n <mj-preview>${M(t)}</mj-preview>`;
|
|
553
559
|
}
|
|
554
|
-
function
|
|
555
|
-
return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${
|
|
560
|
+
function je(e) {
|
|
561
|
+
return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${N(e.name)}" href="${N(e.url)}" />`).join("");
|
|
556
562
|
}
|
|
557
|
-
function
|
|
563
|
+
function Q(e, t) {
|
|
558
564
|
return t ? e : e.filter((e) => e.type !== "html");
|
|
559
565
|
}
|
|
560
|
-
async function
|
|
566
|
+
async function Me(e, t) {
|
|
561
567
|
let n = /* @__PURE__ */ new Map();
|
|
562
568
|
if (!t) return n;
|
|
563
569
|
let r = [];
|
|
@@ -568,14 +574,15 @@ async function Oe(e, t) {
|
|
|
568
574
|
}
|
|
569
575
|
function $(e, t) {
|
|
570
576
|
for (let n of e) {
|
|
571
|
-
if (
|
|
577
|
+
if (a(n)) {
|
|
572
578
|
t.push(n);
|
|
573
579
|
continue;
|
|
574
580
|
}
|
|
575
|
-
if (
|
|
581
|
+
if (h(n)) for (let e of n.children) $(e, t);
|
|
582
|
+
else v(n) && $(n.children, t);
|
|
576
583
|
}
|
|
577
584
|
}
|
|
578
|
-
function
|
|
585
|
+
function Ne(e, t) {
|
|
579
586
|
if (!t) return [];
|
|
580
587
|
let n = [];
|
|
581
588
|
if ($(e.blocks, n), n.length === 0) return [];
|
|
@@ -590,10 +597,10 @@ function ke(e, t) {
|
|
|
590
597
|
}
|
|
591
598
|
return a;
|
|
592
599
|
}
|
|
593
|
-
function
|
|
600
|
+
function Pe(e) {
|
|
594
601
|
return e.length === 0 ? "" : e.map((e) => `\n <mj-style>\n${e}\n </mj-style>`).join("");
|
|
595
602
|
}
|
|
596
603
|
//#endregion
|
|
597
|
-
export {
|
|
604
|
+
export { x as DEFAULT_SOCIAL_ICONS_BASE_URL, B as RICH_TEXT_CSS_CLASS, C as RenderContext, D as UNRENDERABLE_MARKER_PREFIX, F as convertMergeTagsToValues, N as escapeAttr, M as escapeHtml, T as getCssClassAttr, E as getCssClasses, G as getWidthPercentages, K as getWidthPixels, w as isHiddenOnAll, J as renderBlock, Oe as renderToMjml, k as renderUnrenderableBlock, H as resolveParagraphGap, V as richTextGapClass, L as toPaddingString };
|
|
598
605
|
|
|
599
|
-
//# sourceMappingURL=src-
|
|
606
|
+
//# sourceMappingURL=src-CbGCES0u.js.map
|