@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,27 +1,29 @@
|
|
|
1
1
|
import { B as e, Q as t, W as n, X as r, Y as i, Z as a, f as o, ot as s, rt as c } from "./draggable-IB4x6w2O.js";
|
|
2
|
-
import {
|
|
3
|
-
import { r as
|
|
4
|
-
import { a as
|
|
2
|
+
import { D as l, K as u, S as d, T as f, W as p, dt as m, t as h, x as g } from "./src-DveVYoWS.js";
|
|
3
|
+
import { r as _ } from "./dist-CXB2_kBa.js";
|
|
4
|
+
import { a as v, o as y } from "./usePopoverPosition-BJRvAb-h.js";
|
|
5
5
|
//#region ../core/src/error-reporting.ts
|
|
6
|
-
function
|
|
6
|
+
function b(e) {
|
|
7
7
|
return e instanceof Error ? e : Error(String(e), { cause: e });
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function x(e, t) {
|
|
10
10
|
try {
|
|
11
11
|
t();
|
|
12
12
|
} catch (t) {
|
|
13
|
-
e?.(
|
|
13
|
+
e?.(b(t));
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region ../core/src/editor.ts
|
|
18
|
-
function
|
|
18
|
+
function S(e) {
|
|
19
19
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
let t =
|
|
21
|
+
function C(e) {
|
|
22
|
+
let t = e.content ?? u(e.defaultFontFamily, e.templateDefaults);
|
|
23
|
+
g(t), d(t);
|
|
24
|
+
let i = r({
|
|
23
25
|
template: null,
|
|
24
|
-
content:
|
|
26
|
+
content: t,
|
|
25
27
|
selectedBlockId: null,
|
|
26
28
|
viewport: "desktop",
|
|
27
29
|
darkMode: !1,
|
|
@@ -30,35 +32,35 @@ function x(e) {
|
|
|
30
32
|
isSaving: !1,
|
|
31
33
|
isLoading: !1,
|
|
32
34
|
uiTheme: "auto"
|
|
33
|
-
}),
|
|
34
|
-
function
|
|
35
|
-
|
|
35
|
+
}), o = 0;
|
|
36
|
+
function s() {
|
|
37
|
+
i.isDirty = !0, o++;
|
|
36
38
|
}
|
|
37
|
-
let
|
|
38
|
-
get: () =>
|
|
39
|
+
let c = n({
|
|
40
|
+
get: () => i.content,
|
|
39
41
|
set: (e) => {
|
|
40
|
-
|
|
42
|
+
i.content = e, s();
|
|
41
43
|
}
|
|
42
|
-
}),
|
|
43
|
-
function
|
|
44
|
+
}), l = n(() => i.selectedBlockId ? f(i.content.blocks, i.selectedBlockId) : null);
|
|
45
|
+
function f(e, t) {
|
|
44
46
|
for (let n of e) {
|
|
45
47
|
if (n.id === t) return n;
|
|
46
48
|
if (n.type === "section") for (let e of n.children) {
|
|
47
|
-
let n =
|
|
49
|
+
let n = f(e, t);
|
|
48
50
|
if (n) return n;
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
return null;
|
|
52
54
|
}
|
|
53
|
-
function
|
|
54
|
-
if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n)
|
|
55
|
+
function p(e, t) {
|
|
56
|
+
if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) p(e, t);
|
|
55
57
|
}
|
|
56
|
-
function
|
|
58
|
+
function m(e, t, n = { blocks: e }) {
|
|
57
59
|
for (let r = 0; r < e.length; r++) {
|
|
58
60
|
let i = e[r];
|
|
59
61
|
if (i.id === t) return n;
|
|
60
62
|
if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
|
|
61
|
-
let n =
|
|
63
|
+
let n = m(i.children[e], t, {
|
|
62
64
|
blocks: i.children[e],
|
|
63
65
|
sectionId: i.id,
|
|
64
66
|
columnIndex: e
|
|
@@ -68,235 +70,239 @@ function x(e) {
|
|
|
68
70
|
}
|
|
69
71
|
return null;
|
|
70
72
|
}
|
|
71
|
-
function
|
|
73
|
+
function _(t) {
|
|
72
74
|
return e.lockedBlocks?.value.has(t) ?? !1;
|
|
73
75
|
}
|
|
74
|
-
function
|
|
75
|
-
let
|
|
76
|
-
if (!
|
|
77
|
-
let
|
|
78
|
-
return
|
|
79
|
-
targetSectionId:
|
|
80
|
-
columnIndex:
|
|
81
|
-
index:
|
|
76
|
+
function v(e) {
|
|
77
|
+
let t = m(i.content.blocks, e);
|
|
78
|
+
if (!t) return null;
|
|
79
|
+
let n = t.blocks.findIndex((t) => t.id === e);
|
|
80
|
+
return n === -1 ? null : {
|
|
81
|
+
targetSectionId: t.sectionId,
|
|
82
|
+
columnIndex: t.columnIndex,
|
|
83
|
+
index: n
|
|
82
84
|
};
|
|
83
85
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
+
function y(e, t = !0) {
|
|
87
|
+
g(e), d(e), i.content = e, t && s();
|
|
86
88
|
}
|
|
87
|
-
function
|
|
88
|
-
e &&
|
|
89
|
+
function b(e) {
|
|
90
|
+
e && _(e) || (i.selectedBlockId = e);
|
|
89
91
|
}
|
|
90
|
-
function
|
|
91
|
-
|
|
92
|
+
function C(e) {
|
|
93
|
+
i.viewport = e;
|
|
92
94
|
}
|
|
93
|
-
function
|
|
94
|
-
|
|
95
|
+
function w(e) {
|
|
96
|
+
i.darkMode = e;
|
|
95
97
|
}
|
|
96
|
-
function
|
|
97
|
-
|
|
98
|
+
function T(e) {
|
|
99
|
+
i.uiTheme = e;
|
|
98
100
|
}
|
|
99
|
-
function
|
|
100
|
-
|
|
101
|
+
function E(e) {
|
|
102
|
+
i.previewMode = e, e && (i.selectedBlockId = null);
|
|
101
103
|
}
|
|
102
|
-
function
|
|
103
|
-
if (
|
|
104
|
-
let
|
|
105
|
-
|
|
104
|
+
function D(e, t) {
|
|
105
|
+
if (_(e)) return;
|
|
106
|
+
let n = f(i.content.blocks, e);
|
|
107
|
+
n && (Object.assign(n, t), s());
|
|
106
108
|
}
|
|
107
|
-
function
|
|
108
|
-
|
|
109
|
-
...
|
|
109
|
+
function O(e) {
|
|
110
|
+
i.content.settings = {
|
|
111
|
+
...i.content.settings,
|
|
110
112
|
...e
|
|
111
|
-
},
|
|
113
|
+
}, s();
|
|
112
114
|
}
|
|
113
|
-
function
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
function k(e, t, n = 0, r) {
|
|
116
|
+
let a = {
|
|
117
|
+
settings: i.content.settings,
|
|
118
|
+
blocks: [e]
|
|
119
|
+
};
|
|
120
|
+
if (g(a), d(a), !(t && e.type === "section")) {
|
|
121
|
+
if (t) {
|
|
122
|
+
if (_(t)) return;
|
|
123
|
+
let a = f(i.content.blocks, t);
|
|
118
124
|
if (a && a.type === "section") {
|
|
119
|
-
if (
|
|
120
|
-
a.children[
|
|
121
|
-
let t = a.children[
|
|
122
|
-
|
|
125
|
+
if (n < 0 || n >= S(a.columns)) return;
|
|
126
|
+
a.children[n] = a.children[n] || [];
|
|
127
|
+
let t = a.children[n];
|
|
128
|
+
r !== void 0 && r < t.length ? t.splice(r, 0, e) : t.push(e);
|
|
123
129
|
}
|
|
124
|
-
} else
|
|
125
|
-
|
|
130
|
+
} else r !== void 0 && r < i.content.blocks.length ? i.content.blocks.splice(r, 0, e) : i.content.blocks.push(e);
|
|
131
|
+
s();
|
|
126
132
|
}
|
|
127
133
|
}
|
|
128
|
-
function
|
|
129
|
-
if (
|
|
130
|
-
let
|
|
131
|
-
if (
|
|
132
|
-
let
|
|
133
|
-
if (
|
|
134
|
-
let [e] =
|
|
135
|
-
if (
|
|
136
|
-
let
|
|
137
|
-
|
|
134
|
+
function A(e) {
|
|
135
|
+
if (_(e)) return;
|
|
136
|
+
let t = m(i.content.blocks, e);
|
|
137
|
+
if (t) {
|
|
138
|
+
let n = t.blocks.findIndex((t) => t.id === e);
|
|
139
|
+
if (n !== -1) {
|
|
140
|
+
let [e] = t.blocks.splice(n, 1);
|
|
141
|
+
if (i.selectedBlockId) {
|
|
142
|
+
let t = /* @__PURE__ */ new Set();
|
|
143
|
+
p(e, t), t.has(i.selectedBlockId) && (i.selectedBlockId = null);
|
|
138
144
|
}
|
|
139
|
-
|
|
145
|
+
s();
|
|
140
146
|
}
|
|
141
147
|
}
|
|
142
148
|
}
|
|
143
|
-
function
|
|
144
|
-
if (
|
|
145
|
-
let a =
|
|
149
|
+
function j(e, t, n, r = 0) {
|
|
150
|
+
if (_(e) || n && _(n)) return;
|
|
151
|
+
let a = m(i.content.blocks, e);
|
|
146
152
|
if (!a) return;
|
|
147
|
-
let
|
|
148
|
-
if (
|
|
153
|
+
let o = a.blocks.findIndex((t) => t.id === e);
|
|
154
|
+
if (o === -1 || n && a.blocks[o].type === "section") return;
|
|
149
155
|
let c;
|
|
150
|
-
if (
|
|
151
|
-
let e =
|
|
152
|
-
if (!e || e.type !== "section" ||
|
|
153
|
-
e.children[
|
|
154
|
-
} else c =
|
|
155
|
-
let [
|
|
156
|
-
c.splice(
|
|
156
|
+
if (n) {
|
|
157
|
+
let e = f(i.content.blocks, n);
|
|
158
|
+
if (!e || e.type !== "section" || r < 0 || r >= S(e.columns)) return;
|
|
159
|
+
e.children[r] = e.children[r] || [], c = e.children[r];
|
|
160
|
+
} else c = i.content.blocks;
|
|
161
|
+
let [l] = a.blocks.splice(o, 1);
|
|
162
|
+
c.splice(t, 0, l), s();
|
|
157
163
|
}
|
|
158
|
-
function
|
|
159
|
-
|
|
164
|
+
function M() {
|
|
165
|
+
s();
|
|
160
166
|
}
|
|
161
|
-
function
|
|
162
|
-
throw new
|
|
167
|
+
function N(e, t) {
|
|
168
|
+
throw new h(`[Templatical] Templates: ${e} ${t}`);
|
|
163
169
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
170
|
+
function P(t) {
|
|
171
|
+
x(e.onError, t);
|
|
166
172
|
}
|
|
167
|
-
function
|
|
173
|
+
function F(t) {
|
|
168
174
|
let { templates: n } = e;
|
|
169
|
-
return n ||
|
|
175
|
+
return n || N(t, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
|
|
170
176
|
}
|
|
171
|
-
function
|
|
172
|
-
|
|
173
|
-
...
|
|
177
|
+
function I(e) {
|
|
178
|
+
i.template && (i.template = {
|
|
179
|
+
...i.template,
|
|
174
180
|
name: e
|
|
175
|
-
},
|
|
181
|
+
}, s());
|
|
176
182
|
}
|
|
177
|
-
async function
|
|
178
|
-
let
|
|
179
|
-
typeof
|
|
180
|
-
let
|
|
181
|
-
|
|
183
|
+
async function L(t) {
|
|
184
|
+
let n = F("create()"), { create: r } = n;
|
|
185
|
+
typeof r != "function" && N("create()", "is disabled by the provider — its `create` is `false`.");
|
|
186
|
+
let a;
|
|
187
|
+
i.isLoading = !0;
|
|
182
188
|
try {
|
|
183
|
-
|
|
184
|
-
let e =
|
|
185
|
-
|
|
186
|
-
name:
|
|
187
|
-
content:
|
|
188
|
-
}),
|
|
189
|
+
t?.content && (i.content = t.content);
|
|
190
|
+
let e = o;
|
|
191
|
+
a = await r(t?.name === void 0 ? { content: i.content } : {
|
|
192
|
+
name: t.name,
|
|
193
|
+
content: i.content
|
|
194
|
+
}), i.template = a, o === e && (i.isDirty = !1);
|
|
189
195
|
} catch (t) {
|
|
190
196
|
throw e.onError?.(t), t;
|
|
191
197
|
} finally {
|
|
192
|
-
|
|
198
|
+
i.isLoading = !1;
|
|
193
199
|
}
|
|
194
|
-
return
|
|
200
|
+
return P(() => n.onCreated?.(a)), a;
|
|
195
201
|
}
|
|
196
|
-
async function
|
|
197
|
-
let
|
|
198
|
-
|
|
202
|
+
async function R(t) {
|
|
203
|
+
let n = F("load()"), r;
|
|
204
|
+
i.isLoading = !0;
|
|
199
205
|
try {
|
|
200
|
-
|
|
206
|
+
r = await n.load(t), g(r.content), d(r.content), i.template = r, i.content = r.content, i.isDirty = !1;
|
|
201
207
|
} catch (t) {
|
|
202
208
|
throw e.onError?.(t), t;
|
|
203
209
|
} finally {
|
|
204
|
-
|
|
210
|
+
i.isLoading = !1;
|
|
205
211
|
}
|
|
206
|
-
return
|
|
207
|
-
}
|
|
208
|
-
async function
|
|
209
|
-
let
|
|
210
|
-
typeof
|
|
211
|
-
let
|
|
212
|
-
|
|
213
|
-
let s =
|
|
214
|
-
name:
|
|
215
|
-
content:
|
|
212
|
+
return P(() => n.onLoaded?.(r)), r;
|
|
213
|
+
}
|
|
214
|
+
async function z(t = "api") {
|
|
215
|
+
let n = F("save()"), { save: r } = n;
|
|
216
|
+
typeof r != "function" && N("save()", "is disabled by the provider — its `save` is `false`.");
|
|
217
|
+
let a = i.template;
|
|
218
|
+
a || N("save()", "has no template loaded. Call create() or load() first.");
|
|
219
|
+
let s = a.name === void 0 ? { content: i.content } : {
|
|
220
|
+
name: a.name,
|
|
221
|
+
content: i.content
|
|
216
222
|
}, c;
|
|
217
|
-
|
|
223
|
+
i.isSaving = !0;
|
|
218
224
|
try {
|
|
219
|
-
let e =
|
|
220
|
-
if (c = await a
|
|
221
|
-
let e =
|
|
222
|
-
|
|
225
|
+
let e = o;
|
|
226
|
+
if (c = await r(a.id, s), i.template?.id === a.id) {
|
|
227
|
+
let e = i.template.name;
|
|
228
|
+
i.template = e === a.name ? c : {
|
|
223
229
|
...c,
|
|
224
230
|
name: e
|
|
225
231
|
};
|
|
226
232
|
}
|
|
227
|
-
|
|
233
|
+
o === e && (i.isDirty = !1);
|
|
228
234
|
} catch (t) {
|
|
229
235
|
throw e.onError?.(t), t;
|
|
230
236
|
} finally {
|
|
231
|
-
|
|
237
|
+
i.isSaving = !1;
|
|
232
238
|
}
|
|
233
|
-
return
|
|
239
|
+
return P(() => n.onSaved?.(c, { trigger: t })), c;
|
|
234
240
|
}
|
|
235
|
-
function
|
|
236
|
-
return
|
|
241
|
+
function B() {
|
|
242
|
+
return i.template?.id !== void 0;
|
|
237
243
|
}
|
|
238
244
|
return {
|
|
239
|
-
state: a(
|
|
240
|
-
content:
|
|
241
|
-
selectedBlock:
|
|
242
|
-
isBlockLocked:
|
|
243
|
-
setContent:
|
|
244
|
-
selectBlock:
|
|
245
|
-
setViewport:
|
|
246
|
-
setDarkMode:
|
|
247
|
-
setUiTheme:
|
|
248
|
-
setPreviewMode:
|
|
249
|
-
updateBlock:
|
|
250
|
-
updateSettings:
|
|
251
|
-
addBlock:
|
|
252
|
-
removeBlock:
|
|
253
|
-
moveBlock:
|
|
254
|
-
markDirty:
|
|
255
|
-
findBlockLocation:
|
|
256
|
-
setName:
|
|
257
|
-
create:
|
|
258
|
-
load:
|
|
259
|
-
save:
|
|
260
|
-
hasTemplate:
|
|
245
|
+
state: a(i),
|
|
246
|
+
content: c,
|
|
247
|
+
selectedBlock: l,
|
|
248
|
+
isBlockLocked: _,
|
|
249
|
+
setContent: y,
|
|
250
|
+
selectBlock: b,
|
|
251
|
+
setViewport: C,
|
|
252
|
+
setDarkMode: w,
|
|
253
|
+
setUiTheme: T,
|
|
254
|
+
setPreviewMode: E,
|
|
255
|
+
updateBlock: D,
|
|
256
|
+
updateSettings: O,
|
|
257
|
+
addBlock: k,
|
|
258
|
+
removeBlock: A,
|
|
259
|
+
moveBlock: j,
|
|
260
|
+
markDirty: M,
|
|
261
|
+
findBlockLocation: v,
|
|
262
|
+
setName: I,
|
|
263
|
+
create: L,
|
|
264
|
+
load: R,
|
|
265
|
+
save: z,
|
|
266
|
+
hasTemplate: B
|
|
261
267
|
};
|
|
262
268
|
}
|
|
263
269
|
//#endregion
|
|
264
270
|
//#region ../core/src/history.ts
|
|
265
|
-
var
|
|
266
|
-
function
|
|
267
|
-
let { content: r, setContent: i, isRemoteOperation: a, maxSize: o =
|
|
271
|
+
var w = 50, T = 300, E = 1500;
|
|
272
|
+
function D(e) {
|
|
273
|
+
let { content: r, setContent: i, isRemoteOperation: a, maxSize: o = w } = e, s = t([]), c = t([]), l = t(!1), u = null, d = null, p = n(() => s.value.length > 0), m = n(() => c.value.length > 0);
|
|
268
274
|
function h() {
|
|
269
|
-
return
|
|
275
|
+
return f(r.value);
|
|
270
276
|
}
|
|
271
277
|
function g(e) {
|
|
272
278
|
s.value.push(e), s.value.length > o && s.value.splice(0, s.value.length - o);
|
|
273
279
|
}
|
|
274
280
|
function _() {
|
|
275
|
-
|
|
281
|
+
d &&= (clearTimeout(d.timeoutId), null);
|
|
276
282
|
}
|
|
277
283
|
function v() {
|
|
278
284
|
a?.() || (_(), g(h()), c.value = []);
|
|
279
285
|
}
|
|
280
286
|
function y(e) {
|
|
281
287
|
if (!a?.()) {
|
|
282
|
-
if (
|
|
283
|
-
clearTimeout(
|
|
284
|
-
|
|
285
|
-
},
|
|
288
|
+
if (d && d.blockId === e) {
|
|
289
|
+
clearTimeout(d.timeoutId), d.timeoutId = setTimeout(() => {
|
|
290
|
+
d = null;
|
|
291
|
+
}, T);
|
|
286
292
|
return;
|
|
287
293
|
}
|
|
288
|
-
_(), g(h()), c.value = [],
|
|
294
|
+
_(), g(h()), c.value = [], d = {
|
|
289
295
|
blockId: e,
|
|
290
296
|
timeoutId: setTimeout(() => {
|
|
291
|
-
|
|
292
|
-
},
|
|
297
|
+
d = null;
|
|
298
|
+
}, T)
|
|
293
299
|
};
|
|
294
300
|
}
|
|
295
301
|
}
|
|
296
302
|
function b() {
|
|
297
303
|
l.value = !0, u && clearTimeout(u), u = setTimeout(() => {
|
|
298
304
|
l.value = !1, u = null;
|
|
299
|
-
},
|
|
305
|
+
}, E);
|
|
300
306
|
}
|
|
301
307
|
function x() {
|
|
302
308
|
if (s.value.length === 0) return;
|
|
@@ -304,59 +310,59 @@ function T(e) {
|
|
|
304
310
|
let e = s.value.pop();
|
|
305
311
|
c.value.push(h()), i(e, !0), b();
|
|
306
312
|
}
|
|
307
|
-
function
|
|
313
|
+
function S() {
|
|
308
314
|
if (c.value.length === 0) return;
|
|
309
315
|
_();
|
|
310
316
|
let e = c.value.pop();
|
|
311
317
|
s.value.push(h()), i(e, !0), b();
|
|
312
318
|
}
|
|
313
|
-
function
|
|
319
|
+
function C() {
|
|
314
320
|
s.value = [], c.value = [], _();
|
|
315
321
|
}
|
|
316
322
|
function D() {
|
|
317
|
-
|
|
323
|
+
C(), u &&= (clearTimeout(u), null);
|
|
318
324
|
}
|
|
319
325
|
return {
|
|
320
326
|
canUndo: p,
|
|
321
327
|
canRedo: m,
|
|
322
328
|
isNavigating: l,
|
|
323
329
|
undo: x,
|
|
324
|
-
redo:
|
|
330
|
+
redo: S,
|
|
325
331
|
record: v,
|
|
326
332
|
recordDebounced: y,
|
|
327
|
-
clear:
|
|
333
|
+
clear: C,
|
|
328
334
|
destroy: D
|
|
329
335
|
};
|
|
330
336
|
}
|
|
331
337
|
//#endregion
|
|
332
338
|
//#region ../core/src/block-actions.ts
|
|
333
|
-
function
|
|
339
|
+
function O(e) {
|
|
334
340
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
335
341
|
...e,
|
|
336
|
-
id:
|
|
342
|
+
id: p(),
|
|
337
343
|
cells: e.cells.map((e) => ({
|
|
338
344
|
...e,
|
|
339
|
-
id:
|
|
345
|
+
id: p()
|
|
340
346
|
}))
|
|
341
347
|
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
342
348
|
...e,
|
|
343
|
-
id:
|
|
349
|
+
id: p()
|
|
344
350
|
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
345
351
|
...e,
|
|
346
|
-
id:
|
|
352
|
+
id: p()
|
|
347
353
|
})));
|
|
348
354
|
}
|
|
349
|
-
function
|
|
355
|
+
function k(e) {
|
|
350
356
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
351
357
|
function o(n, r, a) {
|
|
352
|
-
let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s =
|
|
358
|
+
let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = l(n, o);
|
|
353
359
|
return t(s, r, a), i(s.id), s;
|
|
354
360
|
}
|
|
355
361
|
function s(e, n, r) {
|
|
356
362
|
let o = JSON.parse(JSON.stringify(e));
|
|
357
|
-
if (o.id =
|
|
363
|
+
if (o.id = p(), O(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
358
364
|
let t = JSON.parse(JSON.stringify(e));
|
|
359
|
-
return t.id =
|
|
365
|
+
return t.id = p(), O(t), t;
|
|
360
366
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
361
367
|
else {
|
|
362
368
|
let i = a?.(e.id) ?? null;
|
|
@@ -367,21 +373,21 @@ function D(e) {
|
|
|
367
373
|
function c(e) {
|
|
368
374
|
n(e);
|
|
369
375
|
}
|
|
370
|
-
function
|
|
376
|
+
function u(e, t, n) {
|
|
371
377
|
r(e, { [t]: n });
|
|
372
378
|
}
|
|
373
379
|
return {
|
|
374
380
|
createAndAddBlock: o,
|
|
375
381
|
duplicateBlock: s,
|
|
376
382
|
deleteBlock: c,
|
|
377
|
-
updateBlockProperty:
|
|
383
|
+
updateBlockProperty: u
|
|
378
384
|
};
|
|
379
385
|
}
|
|
380
386
|
//#endregion
|
|
381
387
|
//#region ../core/src/auto-save.ts
|
|
382
|
-
var
|
|
383
|
-
function
|
|
384
|
-
let { content: t, isDirty: n, onChange: r, debounce: i =
|
|
388
|
+
var A = 2e3;
|
|
389
|
+
function j(e) {
|
|
390
|
+
let { content: t, isDirty: n, onChange: r, debounce: i = A, enabled: a = !0 } = e, o = null, c = !1;
|
|
385
391
|
function l() {
|
|
386
392
|
return typeof a == "function" ? a() : a;
|
|
387
393
|
}
|
|
@@ -418,7 +424,7 @@ function k(e) {
|
|
|
418
424
|
}
|
|
419
425
|
//#endregion
|
|
420
426
|
//#region ../core/src/condition-preview.ts
|
|
421
|
-
function
|
|
427
|
+
function M(e) {
|
|
422
428
|
let t = r(/* @__PURE__ */ new Set()), i = n(() => t.size > 0);
|
|
423
429
|
function a(e) {
|
|
424
430
|
return t.has(e);
|
|
@@ -438,7 +444,7 @@ function A(e) {
|
|
|
438
444
|
}
|
|
439
445
|
//#endregion
|
|
440
446
|
//#region ../core/src/data-source-fetch.ts
|
|
441
|
-
function
|
|
447
|
+
function N(e) {
|
|
442
448
|
let r = t(!1), i = t(!1), a = n(() => !!e.definition.value?.dataSource), o = n(() => a.value && !e.block.value.dataSourceFetched);
|
|
443
449
|
async function s() {
|
|
444
450
|
let t = e.definition.value;
|
|
@@ -470,7 +476,7 @@ function j(e) {
|
|
|
470
476
|
}
|
|
471
477
|
//#endregion
|
|
472
478
|
//#region ../core/src/history-interceptor.ts
|
|
473
|
-
function
|
|
479
|
+
function P(e, t) {
|
|
474
480
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
475
481
|
e.addBlock = (r, i, a, o) => {
|
|
476
482
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -486,7 +492,7 @@ function M(e, t) {
|
|
|
486
492
|
}
|
|
487
493
|
//#endregion
|
|
488
494
|
//#region ../core/src/saved-blocks.ts
|
|
489
|
-
function
|
|
495
|
+
function F(e) {
|
|
490
496
|
let { provider: n } = e, r = t([]), i = t(!1), a = o(() => {
|
|
491
497
|
let e = /* @__PURE__ */ new Set();
|
|
492
498
|
for (let t of r.value) {
|
|
@@ -502,12 +508,12 @@ function N(e) {
|
|
|
502
508
|
return l.value && e.canDelete !== !1;
|
|
503
509
|
}
|
|
504
510
|
function f(e, t) {
|
|
505
|
-
throw new
|
|
511
|
+
throw new h(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
|
|
506
512
|
}
|
|
507
|
-
function
|
|
508
|
-
|
|
513
|
+
function p(t) {
|
|
514
|
+
x(e.onError, t);
|
|
509
515
|
}
|
|
510
|
-
async function
|
|
516
|
+
async function m(t) {
|
|
511
517
|
i.value = !0;
|
|
512
518
|
try {
|
|
513
519
|
r.value = await n.list(t);
|
|
@@ -529,7 +535,7 @@ function N(e) {
|
|
|
529
535
|
name: t,
|
|
530
536
|
content: i
|
|
531
537
|
});
|
|
532
|
-
return r.value = [e, ...r.value],
|
|
538
|
+
return r.value = [e, ...r.value], p(() => n.onCreated?.(e)), e;
|
|
533
539
|
} catch (t) {
|
|
534
540
|
throw e.onError?.(t), t;
|
|
535
541
|
}
|
|
@@ -541,7 +547,7 @@ function N(e) {
|
|
|
541
547
|
o && o.canUpdate === !1 && f("update", `not permitted for entry "${t}"`);
|
|
542
548
|
try {
|
|
543
549
|
let e = await a(t, i);
|
|
544
|
-
return r.value = r.value.map((n) => n.id === t ? e : n),
|
|
550
|
+
return r.value = r.value.map((n) => n.id === t ? e : n), p(() => n.onUpdated?.(e)), e;
|
|
545
551
|
} catch (t) {
|
|
546
552
|
throw e.onError?.(t), t;
|
|
547
553
|
}
|
|
@@ -552,7 +558,7 @@ function N(e) {
|
|
|
552
558
|
let a = r.value.find((e) => e.id === t) ?? null;
|
|
553
559
|
a && a.canDelete === !1 && f("delete", `not permitted for entry "${t}"`);
|
|
554
560
|
try {
|
|
555
|
-
await i(t), r.value = r.value.filter((e) => e.id !== t), a &&
|
|
561
|
+
await i(t), r.value = r.value.filter((e) => e.id !== t), a && p(() => n.onDeleted?.(a));
|
|
556
562
|
} catch (t) {
|
|
557
563
|
throw e.onError?.(t), t;
|
|
558
564
|
}
|
|
@@ -566,7 +572,7 @@ function N(e) {
|
|
|
566
572
|
canDelete: l,
|
|
567
573
|
canUpdateBlock: u,
|
|
568
574
|
canDeleteBlock: d,
|
|
569
|
-
load:
|
|
575
|
+
load: m,
|
|
570
576
|
create: g,
|
|
571
577
|
update: _,
|
|
572
578
|
remove: v
|
|
@@ -574,9 +580,9 @@ function N(e) {
|
|
|
574
580
|
}
|
|
575
581
|
//#endregion
|
|
576
582
|
//#region ../core/src/saved-blocks-local.ts
|
|
577
|
-
var
|
|
578
|
-
function
|
|
579
|
-
let t = e.key ??
|
|
583
|
+
var I = "templatical:saved-blocks";
|
|
584
|
+
function L(e = {}) {
|
|
585
|
+
let t = e.key ?? I;
|
|
580
586
|
function n() {
|
|
581
587
|
if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
|
|
582
588
|
return localStorage;
|
|
@@ -601,7 +607,7 @@ function F(e = {}) {
|
|
|
601
607
|
},
|
|
602
608
|
async create(e) {
|
|
603
609
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
|
|
604
|
-
id:
|
|
610
|
+
id: p(),
|
|
605
611
|
name: e.name,
|
|
606
612
|
content: e.content,
|
|
607
613
|
...e.category ? { category: e.category } : {},
|
|
@@ -629,9 +635,9 @@ function F(e = {}) {
|
|
|
629
635
|
}
|
|
630
636
|
//#endregion
|
|
631
637
|
//#region ../core/src/media-local.ts
|
|
632
|
-
var
|
|
633
|
-
function
|
|
634
|
-
let t = e.key ??
|
|
638
|
+
var R = "templatical:media", z = 50;
|
|
639
|
+
function B(e = {}) {
|
|
640
|
+
let t = e.key ?? R;
|
|
635
641
|
function n() {
|
|
636
642
|
if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with localStorage. Supply your own MediaProvider for server-side or non-browser use.");
|
|
637
643
|
return localStorage;
|
|
@@ -668,12 +674,12 @@ function R(e = {}) {
|
|
|
668
674
|
let t = r(), n = e?.search?.trim().toLowerCase(), i = n ? t.filter((e) => {
|
|
669
675
|
let t = e.filename?.toLowerCase() ?? "", r = e.alt?.toLowerCase() ?? "";
|
|
670
676
|
return t.includes(n) || r.includes(n);
|
|
671
|
-
}) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o +
|
|
677
|
+
}) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o + z), c = { items: s }, l = o + s.length;
|
|
672
678
|
return l < i.length && (c.nextCursor = String(l)), c;
|
|
673
679
|
},
|
|
674
680
|
async create(e) {
|
|
675
681
|
let t = await a(e.file), n = (/* @__PURE__ */ new Date()).toISOString(), o = {
|
|
676
|
-
id:
|
|
682
|
+
id: p(),
|
|
677
683
|
url: t,
|
|
678
684
|
filename: e.filename || e.file.name,
|
|
679
685
|
createdAt: n,
|
|
@@ -710,18 +716,18 @@ function R(e = {}) {
|
|
|
710
716
|
}
|
|
711
717
|
//#endregion
|
|
712
718
|
//#region ../core/src/version-history.ts
|
|
713
|
-
function
|
|
719
|
+
function V(e) {
|
|
714
720
|
let { provider: n, getTemplateId: r } = e, i = t([]), a = t(!1), s = t(void 0), c = t(!1), l = /* @__PURE__ */ new Map(), u = o(() => typeof n.create == "function"), d = o(() => typeof n.restore == "function");
|
|
715
721
|
function f(e) {
|
|
716
722
|
let t = r();
|
|
717
|
-
if (!t) throw new
|
|
723
|
+
if (!t) throw new h(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
|
|
718
724
|
return t;
|
|
719
725
|
}
|
|
720
|
-
function
|
|
721
|
-
throw new
|
|
726
|
+
function p(e) {
|
|
727
|
+
throw new h(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
722
728
|
}
|
|
723
|
-
function
|
|
724
|
-
|
|
729
|
+
function m(t) {
|
|
730
|
+
x(e.onError, t);
|
|
725
731
|
}
|
|
726
732
|
async function g(t) {
|
|
727
733
|
let r = f("list");
|
|
@@ -749,20 +755,20 @@ function z(e) {
|
|
|
749
755
|
throw e.onError?.(t), t;
|
|
750
756
|
}
|
|
751
757
|
}
|
|
752
|
-
async function
|
|
758
|
+
async function y(t, r) {
|
|
753
759
|
let { create: a } = n;
|
|
754
|
-
typeof a != "function" &&
|
|
760
|
+
typeof a != "function" && p("create");
|
|
755
761
|
let o = f("create");
|
|
756
762
|
try {
|
|
757
763
|
let e = await a(o, t, r);
|
|
758
|
-
return i.value = [e, ...i.value],
|
|
764
|
+
return i.value = [e, ...i.value], m(() => n.onCreated?.(e)), e;
|
|
759
765
|
} catch (t) {
|
|
760
766
|
throw e.onError?.(t), t;
|
|
761
767
|
}
|
|
762
768
|
}
|
|
763
|
-
async function
|
|
769
|
+
async function b(t) {
|
|
764
770
|
let { restore: r } = n;
|
|
765
|
-
typeof r != "function" &&
|
|
771
|
+
typeof r != "function" && p("restore");
|
|
766
772
|
let i = f("restore"), a;
|
|
767
773
|
c.value = !0;
|
|
768
774
|
try {
|
|
@@ -772,7 +778,7 @@ function z(e) {
|
|
|
772
778
|
} finally {
|
|
773
779
|
c.value = !1;
|
|
774
780
|
}
|
|
775
|
-
return
|
|
781
|
+
return m(() => n.onRestored?.(a)), a;
|
|
776
782
|
}
|
|
777
783
|
return {
|
|
778
784
|
nextCursor: s,
|
|
@@ -784,30 +790,30 @@ function z(e) {
|
|
|
784
790
|
load: g,
|
|
785
791
|
peekContent: _,
|
|
786
792
|
resolveContent: v,
|
|
787
|
-
create:
|
|
788
|
-
restore:
|
|
793
|
+
create: y,
|
|
794
|
+
restore: b
|
|
789
795
|
};
|
|
790
796
|
}
|
|
791
797
|
//#endregion
|
|
792
798
|
//#region ../core/src/comments.ts
|
|
793
|
-
function
|
|
794
|
-
let { provider: n, getTemplateId: r, getUser: i } = e, a = t([]), s = t(!1), c = t(!1), l = o(() => typeof n.create == "function"), u = o(() => typeof n.update == "function"), d = o(() => typeof n.delete == "function"), f = o(() => typeof n.setResolved == "function"),
|
|
799
|
+
function H(e) {
|
|
800
|
+
let { provider: n, getTemplateId: r, getUser: i } = e, a = t([]), s = t(!1), c = t(!1), l = o(() => typeof n.create == "function"), u = o(() => typeof n.update == "function"), d = o(() => typeof n.delete == "function"), f = o(() => typeof n.setResolved == "function"), p = o(() => a.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), m = o(() => a.value.filter((e) => !e.resolvedAt).length), g = o(() => {
|
|
795
801
|
let e = /* @__PURE__ */ new Map();
|
|
796
802
|
for (let t of a.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
|
|
797
803
|
return e;
|
|
798
804
|
});
|
|
799
805
|
function _(e) {
|
|
800
806
|
let t = r();
|
|
801
|
-
if (!t) throw new
|
|
807
|
+
if (!t) throw new h(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
|
|
802
808
|
return t;
|
|
803
809
|
}
|
|
804
|
-
function
|
|
810
|
+
function v(e) {
|
|
805
811
|
let t = i();
|
|
806
|
-
if (!t) throw new
|
|
812
|
+
if (!t) throw new h(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
|
|
807
813
|
return t;
|
|
808
814
|
}
|
|
809
|
-
function
|
|
810
|
-
throw new
|
|
815
|
+
function y(e) {
|
|
816
|
+
throw new h(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
811
817
|
}
|
|
812
818
|
function S(e) {
|
|
813
819
|
for (let t of a.value) {
|
|
@@ -821,11 +827,11 @@ function B(e) {
|
|
|
821
827
|
return t !== null && e.author.id === t.id;
|
|
822
828
|
}
|
|
823
829
|
function w(t) {
|
|
824
|
-
let n =
|
|
830
|
+
let n = b(t);
|
|
825
831
|
throw e.onError?.(n), n;
|
|
826
832
|
}
|
|
827
833
|
function T(t) {
|
|
828
|
-
|
|
834
|
+
x(e.onError, t);
|
|
829
835
|
}
|
|
830
836
|
function E(e, t, n) {
|
|
831
837
|
return [
|
|
@@ -877,9 +883,9 @@ function B(e) {
|
|
|
877
883
|
}
|
|
878
884
|
async function j(e) {
|
|
879
885
|
let { create: t } = n;
|
|
880
|
-
typeof t != "function" &&
|
|
886
|
+
typeof t != "function" && y("create");
|
|
881
887
|
let r = _("create");
|
|
882
|
-
|
|
888
|
+
v("create"), c.value = !0;
|
|
883
889
|
try {
|
|
884
890
|
let i = await t(r, e);
|
|
885
891
|
return O(i), T(() => n.onCreated?.(i, { origin: "local" })), i;
|
|
@@ -891,9 +897,9 @@ function B(e) {
|
|
|
891
897
|
}
|
|
892
898
|
async function M(e, t) {
|
|
893
899
|
let { update: r } = n;
|
|
894
|
-
typeof r != "function" &&
|
|
900
|
+
typeof r != "function" && y("update");
|
|
895
901
|
let i = _("update");
|
|
896
|
-
|
|
902
|
+
v("update"), c.value = !0;
|
|
897
903
|
try {
|
|
898
904
|
let a = await r(i, e, t);
|
|
899
905
|
return O(a), T(() => n.onUpdated?.(a, { origin: "local" })), a;
|
|
@@ -905,9 +911,9 @@ function B(e) {
|
|
|
905
911
|
}
|
|
906
912
|
async function N(e) {
|
|
907
913
|
let { delete: t } = n;
|
|
908
|
-
typeof t != "function" &&
|
|
914
|
+
typeof t != "function" && y("delete");
|
|
909
915
|
let r = _("delete");
|
|
910
|
-
|
|
916
|
+
v("delete");
|
|
911
917
|
let i = S(e);
|
|
912
918
|
c.value = !0;
|
|
913
919
|
try {
|
|
@@ -920,9 +926,9 @@ function B(e) {
|
|
|
920
926
|
}
|
|
921
927
|
async function P(e, t) {
|
|
922
928
|
let { setResolved: r } = n;
|
|
923
|
-
typeof r != "function" &&
|
|
929
|
+
typeof r != "function" && y("setResolved");
|
|
924
930
|
let i = _("setResolved");
|
|
925
|
-
|
|
931
|
+
v("setResolved"), c.value = !0;
|
|
926
932
|
try {
|
|
927
933
|
let a = await r(i, e, t);
|
|
928
934
|
return O(a), T(() => (a.resolvedAt ? n.onResolved : n.onUnresolved)?.(a, { origin: "local" })), a;
|
|
@@ -950,8 +956,8 @@ function B(e) {
|
|
|
950
956
|
canUpdate: u,
|
|
951
957
|
canDelete: d,
|
|
952
958
|
canResolve: f,
|
|
953
|
-
totalCount:
|
|
954
|
-
unresolvedCount:
|
|
959
|
+
totalCount: p,
|
|
960
|
+
unresolvedCount: m,
|
|
955
961
|
commentCountByBlock: g,
|
|
956
962
|
load: A,
|
|
957
963
|
create: j,
|
|
@@ -965,7 +971,7 @@ function B(e) {
|
|
|
965
971
|
applyRemoteDelete: L
|
|
966
972
|
};
|
|
967
973
|
}
|
|
968
|
-
function
|
|
974
|
+
function U(t) {
|
|
969
975
|
let { comments: n, provider: r, getTemplateId: a } = t, { subscribe: o } = r;
|
|
970
976
|
if (typeof o != "function") return;
|
|
971
977
|
let s = null;
|
|
@@ -988,18 +994,18 @@ function V(t) {
|
|
|
988
994
|
}
|
|
989
995
|
//#endregion
|
|
990
996
|
//#region src/utils/blockTypeLabels.ts
|
|
991
|
-
function
|
|
997
|
+
function W(e, t) {
|
|
992
998
|
return t.blocks[e] ?? e;
|
|
993
999
|
}
|
|
994
|
-
function
|
|
995
|
-
if (e.type !== "custom") return
|
|
1000
|
+
function G(e, t, n = []) {
|
|
1001
|
+
if (e.type !== "custom") return W(e.type, t);
|
|
996
1002
|
let { customType: r } = e;
|
|
997
1003
|
return n.find((e) => e.type === r)?.name ?? r;
|
|
998
1004
|
}
|
|
999
1005
|
//#endregion
|
|
1000
1006
|
//#region src/utils/resolveFieldColors.ts
|
|
1001
|
-
function
|
|
1002
|
-
let n =
|
|
1007
|
+
function K(e, t) {
|
|
1008
|
+
let n = y({ presets: e.presets }, v), r = n.presets.length === 0;
|
|
1003
1009
|
return {
|
|
1004
1010
|
presets: r ? t.presets : n.presets,
|
|
1005
1011
|
allowCustom: t.allowCustom === !1 ? !1 : e.allowCustom ?? t.allowCustom,
|
|
@@ -1011,13 +1017,13 @@ function W(e, t) {
|
|
|
1011
1017
|
}
|
|
1012
1018
|
//#endregion
|
|
1013
1019
|
//#region src/composables/useImageDrop.ts
|
|
1014
|
-
var
|
|
1015
|
-
function
|
|
1016
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || c(r), { isOverDropZone: a } =
|
|
1020
|
+
var q = "image/";
|
|
1021
|
+
function J(e) {
|
|
1022
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || c(r), { isOverDropZone: a } = _(t, {
|
|
1017
1023
|
preventDefaultForUnhandled: !0,
|
|
1018
1024
|
onDrop: (e) => {
|
|
1019
1025
|
if (!i()) return;
|
|
1020
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
1026
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(q));
|
|
1021
1027
|
t.length > 0 && n([t[0]]);
|
|
1022
1028
|
}
|
|
1023
1029
|
});
|
|
@@ -1025,11 +1031,11 @@ function K(e) {
|
|
|
1025
1031
|
}
|
|
1026
1032
|
//#endregion
|
|
1027
1033
|
//#region src/constants/socialIcons.ts
|
|
1028
|
-
var
|
|
1034
|
+
var Y = m, X = {
|
|
1029
1035
|
small: 24,
|
|
1030
1036
|
medium: 32,
|
|
1031
1037
|
large: 48
|
|
1032
|
-
},
|
|
1038
|
+
}, Z = [
|
|
1033
1039
|
"facebook",
|
|
1034
1040
|
"twitter",
|
|
1035
1041
|
"instagram",
|
|
@@ -1049,6 +1055,6 @@ var q = f, J = {
|
|
|
1049
1055
|
"behance"
|
|
1050
1056
|
];
|
|
1051
1057
|
//#endregion
|
|
1052
|
-
export {
|
|
1058
|
+
export { A as _, K as a, D as b, U as c, B as d, L as f, M as g, N as h, J as i, H as l, P as m, Y as n, G as o, F as p, Z as r, W as s, X as t, V as u, j as v, C as x, k as y };
|
|
1053
1059
|
|
|
1054
|
-
//# sourceMappingURL=socialIcons-
|
|
1060
|
+
//# sourceMappingURL=socialIcons-BvYNMn1G.js.map
|