@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,26 +1,28 @@
|
|
|
1
1
|
import { H as e, J as t, R as n, X as r, Y as i, Z as a, ot as o, rt as s, s as c } from "./vue.runtime.esm-bundler-CyqhBwpY.js";
|
|
2
|
-
import {
|
|
3
|
-
import { r as
|
|
4
|
-
import { a as
|
|
5
|
-
import { t as
|
|
2
|
+
import { M as l, Z as u, _ as d, a as f, l as p, p as m, s as h, u as g } from "./dist-DbUZvK04.js";
|
|
3
|
+
import { r as _ } from "./dist-BDuPwOyn.js";
|
|
4
|
+
import { a as v, o as y } from "./usePopoverPosition-DH7z3Ghm.js";
|
|
5
|
+
import { t as b } from "./createLucideIcon-BxY5yz5u.js";
|
|
6
6
|
//#region ../core/dist/index.js
|
|
7
|
-
function
|
|
7
|
+
function x(e) {
|
|
8
8
|
return e instanceof Error ? e : Error(String(e), { cause: e });
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function S(e, t) {
|
|
11
11
|
try {
|
|
12
12
|
t();
|
|
13
13
|
} catch (t) {
|
|
14
|
-
e?.(
|
|
14
|
+
e?.(x(t));
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function C(e) {
|
|
18
18
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
let n =
|
|
20
|
+
function w(t) {
|
|
21
|
+
let n = t.content ?? d(t.defaultFontFamily, t.templateDefaults);
|
|
22
|
+
p(n), g(n);
|
|
23
|
+
let a = i({
|
|
22
24
|
template: null,
|
|
23
|
-
content:
|
|
25
|
+
content: n,
|
|
24
26
|
selectedBlockId: null,
|
|
25
27
|
viewport: "desktop",
|
|
26
28
|
darkMode: !1,
|
|
@@ -29,35 +31,35 @@ function S(t) {
|
|
|
29
31
|
isSaving: !1,
|
|
30
32
|
isLoading: !1,
|
|
31
33
|
uiTheme: "auto"
|
|
32
|
-
}),
|
|
33
|
-
function
|
|
34
|
-
|
|
34
|
+
}), o = 0;
|
|
35
|
+
function s() {
|
|
36
|
+
a.isDirty = !0, o++;
|
|
35
37
|
}
|
|
36
|
-
let
|
|
37
|
-
get: () =>
|
|
38
|
+
let c = e({
|
|
39
|
+
get: () => a.content,
|
|
38
40
|
set: (e) => {
|
|
39
|
-
|
|
41
|
+
a.content = e, s();
|
|
40
42
|
}
|
|
41
|
-
}),
|
|
42
|
-
function
|
|
43
|
+
}), l = e(() => a.selectedBlockId ? u(a.content.blocks, a.selectedBlockId) : null);
|
|
44
|
+
function u(e, t) {
|
|
43
45
|
for (let n of e) {
|
|
44
46
|
if (n.id === t) return n;
|
|
45
47
|
if (n.type === "section") for (let e of n.children) {
|
|
46
|
-
let n =
|
|
48
|
+
let n = u(e, t);
|
|
47
49
|
if (n) return n;
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
return null;
|
|
51
53
|
}
|
|
52
|
-
function
|
|
53
|
-
if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n)
|
|
54
|
+
function f(e, t) {
|
|
55
|
+
if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) f(e, t);
|
|
54
56
|
}
|
|
55
|
-
function
|
|
57
|
+
function m(e, t, n = { blocks: e }) {
|
|
56
58
|
for (let r = 0; r < e.length; r++) {
|
|
57
59
|
let i = e[r];
|
|
58
60
|
if (i.id === t) return n;
|
|
59
61
|
if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
|
|
60
|
-
let n =
|
|
62
|
+
let n = m(i.children[e], t, {
|
|
61
63
|
blocks: i.children[e],
|
|
62
64
|
sectionId: i.id,
|
|
63
65
|
columnIndex: e
|
|
@@ -67,201 +69,205 @@ function S(t) {
|
|
|
67
69
|
}
|
|
68
70
|
return null;
|
|
69
71
|
}
|
|
70
|
-
function
|
|
72
|
+
function _(e) {
|
|
71
73
|
return t.lockedBlocks?.value.has(e) ?? !1;
|
|
72
74
|
}
|
|
73
|
-
function
|
|
74
|
-
let t =
|
|
75
|
+
function v(e) {
|
|
76
|
+
let t = m(a.content.blocks, e);
|
|
75
77
|
if (!t) return null;
|
|
76
|
-
let
|
|
77
|
-
return
|
|
78
|
+
let n = t.blocks.findIndex((t) => t.id === e);
|
|
79
|
+
return n === -1 ? null : {
|
|
78
80
|
targetSectionId: t.sectionId,
|
|
79
81
|
columnIndex: t.columnIndex,
|
|
80
|
-
index:
|
|
82
|
+
index: n
|
|
81
83
|
};
|
|
82
84
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
85
|
+
function y(e, t = !0) {
|
|
86
|
+
p(e), g(e), a.content = e, t && s();
|
|
85
87
|
}
|
|
86
|
-
function
|
|
87
|
-
e &&
|
|
88
|
+
function b(e) {
|
|
89
|
+
e && _(e) || (a.selectedBlockId = e);
|
|
88
90
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
91
|
+
function x(e) {
|
|
92
|
+
a.viewport = e;
|
|
91
93
|
}
|
|
92
|
-
function
|
|
93
|
-
|
|
94
|
+
function w(e) {
|
|
95
|
+
a.darkMode = e;
|
|
94
96
|
}
|
|
95
|
-
function
|
|
96
|
-
|
|
97
|
+
function T(e) {
|
|
98
|
+
a.uiTheme = e;
|
|
97
99
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
100
|
+
function E(e) {
|
|
101
|
+
a.previewMode = e, e && (a.selectedBlockId = null);
|
|
100
102
|
}
|
|
101
|
-
function
|
|
102
|
-
if (
|
|
103
|
-
let
|
|
104
|
-
|
|
103
|
+
function D(e, t) {
|
|
104
|
+
if (_(e)) return;
|
|
105
|
+
let n = u(a.content.blocks, e);
|
|
106
|
+
n && (Object.assign(n, t), s());
|
|
105
107
|
}
|
|
106
|
-
function
|
|
107
|
-
|
|
108
|
-
...
|
|
108
|
+
function O(e) {
|
|
109
|
+
a.content.settings = {
|
|
110
|
+
...a.content.settings,
|
|
109
111
|
...e
|
|
110
|
-
},
|
|
112
|
+
}, s();
|
|
111
113
|
}
|
|
112
|
-
function
|
|
113
|
-
|
|
114
|
+
function k(e, t, n = 0, r) {
|
|
115
|
+
let i = {
|
|
116
|
+
settings: a.content.settings,
|
|
117
|
+
blocks: [e]
|
|
118
|
+
};
|
|
119
|
+
if (p(i), g(i), !(t && e.type === "section")) {
|
|
114
120
|
if (t) {
|
|
115
|
-
if (
|
|
116
|
-
let
|
|
117
|
-
if (
|
|
118
|
-
if (
|
|
119
|
-
|
|
120
|
-
let t =
|
|
121
|
-
|
|
121
|
+
if (_(t)) return;
|
|
122
|
+
let i = u(a.content.blocks, t);
|
|
123
|
+
if (i && i.type === "section") {
|
|
124
|
+
if (n < 0 || n >= C(i.columns)) return;
|
|
125
|
+
i.children[n] = i.children[n] || [];
|
|
126
|
+
let t = i.children[n];
|
|
127
|
+
r !== void 0 && r < t.length ? t.splice(r, 0, e) : t.push(e);
|
|
122
128
|
}
|
|
123
|
-
} else
|
|
124
|
-
|
|
129
|
+
} else r !== void 0 && r < a.content.blocks.length ? a.content.blocks.splice(r, 0, e) : a.content.blocks.push(e);
|
|
130
|
+
s();
|
|
125
131
|
}
|
|
126
132
|
}
|
|
127
|
-
function
|
|
128
|
-
if (
|
|
129
|
-
let t =
|
|
133
|
+
function A(e) {
|
|
134
|
+
if (_(e)) return;
|
|
135
|
+
let t = m(a.content.blocks, e);
|
|
130
136
|
if (t) {
|
|
131
|
-
let
|
|
132
|
-
if (
|
|
133
|
-
let [e] = t.blocks.splice(
|
|
134
|
-
if (
|
|
137
|
+
let n = t.blocks.findIndex((t) => t.id === e);
|
|
138
|
+
if (n !== -1) {
|
|
139
|
+
let [e] = t.blocks.splice(n, 1);
|
|
140
|
+
if (a.selectedBlockId) {
|
|
135
141
|
let t = /* @__PURE__ */ new Set();
|
|
136
|
-
|
|
142
|
+
f(e, t), t.has(a.selectedBlockId) && (a.selectedBlockId = null);
|
|
137
143
|
}
|
|
138
|
-
|
|
144
|
+
s();
|
|
139
145
|
}
|
|
140
146
|
}
|
|
141
147
|
}
|
|
142
|
-
function
|
|
143
|
-
if (
|
|
144
|
-
let
|
|
145
|
-
if (!
|
|
146
|
-
let
|
|
147
|
-
if (
|
|
148
|
+
function j(e, t, n, r = 0) {
|
|
149
|
+
if (_(e) || n && _(n)) return;
|
|
150
|
+
let i = m(a.content.blocks, e);
|
|
151
|
+
if (!i) return;
|
|
152
|
+
let o = i.blocks.findIndex((t) => t.id === e);
|
|
153
|
+
if (o === -1 || n && i.blocks[o].type === "section") return;
|
|
148
154
|
let c;
|
|
149
|
-
if (
|
|
150
|
-
let e =
|
|
151
|
-
if (!e || e.type !== "section" ||
|
|
152
|
-
e.children[
|
|
153
|
-
} else c =
|
|
154
|
-
let [
|
|
155
|
-
c.splice(t, 0,
|
|
155
|
+
if (n) {
|
|
156
|
+
let e = u(a.content.blocks, n);
|
|
157
|
+
if (!e || e.type !== "section" || r < 0 || r >= C(e.columns)) return;
|
|
158
|
+
e.children[r] = e.children[r] || [], c = e.children[r];
|
|
159
|
+
} else c = a.content.blocks;
|
|
160
|
+
let [l] = i.blocks.splice(o, 1);
|
|
161
|
+
c.splice(t, 0, l), s();
|
|
156
162
|
}
|
|
157
|
-
function
|
|
158
|
-
|
|
163
|
+
function M() {
|
|
164
|
+
s();
|
|
159
165
|
}
|
|
160
|
-
function
|
|
161
|
-
throw new
|
|
166
|
+
function N(e, t) {
|
|
167
|
+
throw new h(`[Templatical] Templates: ${e} ${t}`);
|
|
162
168
|
}
|
|
163
|
-
function
|
|
164
|
-
|
|
169
|
+
function P(e) {
|
|
170
|
+
S(t.onError, e);
|
|
165
171
|
}
|
|
166
|
-
function
|
|
172
|
+
function F(e) {
|
|
167
173
|
let { templates: n } = t;
|
|
168
|
-
return n ||
|
|
174
|
+
return n || N(e, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
|
|
169
175
|
}
|
|
170
|
-
function
|
|
171
|
-
|
|
172
|
-
...
|
|
176
|
+
function I(e) {
|
|
177
|
+
a.template && (a.template = {
|
|
178
|
+
...a.template,
|
|
173
179
|
name: e
|
|
174
|
-
},
|
|
180
|
+
}, s());
|
|
175
181
|
}
|
|
176
|
-
async function
|
|
177
|
-
let
|
|
178
|
-
typeof
|
|
179
|
-
let
|
|
180
|
-
|
|
182
|
+
async function L(e) {
|
|
183
|
+
let n = F("create()"), { create: r } = n;
|
|
184
|
+
typeof r != "function" && N("create()", "is disabled by the provider — its `create` is `false`.");
|
|
185
|
+
let i;
|
|
186
|
+
a.isLoading = !0;
|
|
181
187
|
try {
|
|
182
|
-
e?.content && (
|
|
183
|
-
let t =
|
|
184
|
-
|
|
188
|
+
e?.content && (a.content = e.content);
|
|
189
|
+
let t = o;
|
|
190
|
+
i = await r(e?.name === void 0 ? { content: a.content } : {
|
|
185
191
|
name: e.name,
|
|
186
|
-
content:
|
|
187
|
-
}),
|
|
192
|
+
content: a.content
|
|
193
|
+
}), a.template = i, o === t && (a.isDirty = !1);
|
|
188
194
|
} catch (e) {
|
|
189
195
|
throw t.onError?.(e), e;
|
|
190
196
|
} finally {
|
|
191
|
-
|
|
197
|
+
a.isLoading = !1;
|
|
192
198
|
}
|
|
193
|
-
return
|
|
199
|
+
return P(() => n.onCreated?.(i)), i;
|
|
194
200
|
}
|
|
195
|
-
async function
|
|
196
|
-
let
|
|
197
|
-
|
|
201
|
+
async function R(e) {
|
|
202
|
+
let n = F("load()"), r;
|
|
203
|
+
a.isLoading = !0;
|
|
198
204
|
try {
|
|
199
|
-
|
|
205
|
+
r = await n.load(e), p(r.content), g(r.content), a.template = r, a.content = r.content, a.isDirty = !1;
|
|
200
206
|
} catch (e) {
|
|
201
207
|
throw t.onError?.(e), e;
|
|
202
208
|
} finally {
|
|
203
|
-
|
|
209
|
+
a.isLoading = !1;
|
|
204
210
|
}
|
|
205
|
-
return
|
|
206
|
-
}
|
|
207
|
-
async function
|
|
208
|
-
let
|
|
209
|
-
typeof
|
|
210
|
-
let
|
|
211
|
-
|
|
212
|
-
let s =
|
|
213
|
-
name:
|
|
214
|
-
content:
|
|
211
|
+
return P(() => n.onLoaded?.(r)), r;
|
|
212
|
+
}
|
|
213
|
+
async function z(e = "api") {
|
|
214
|
+
let n = F("save()"), { save: r } = n;
|
|
215
|
+
typeof r != "function" && N("save()", "is disabled by the provider — its `save` is `false`.");
|
|
216
|
+
let i = a.template;
|
|
217
|
+
i || N("save()", "has no template loaded. Call create() or load() first.");
|
|
218
|
+
let s = i.name === void 0 ? { content: a.content } : {
|
|
219
|
+
name: i.name,
|
|
220
|
+
content: a.content
|
|
215
221
|
}, c;
|
|
216
|
-
|
|
222
|
+
a.isSaving = !0;
|
|
217
223
|
try {
|
|
218
|
-
let e =
|
|
219
|
-
if (c = await i
|
|
220
|
-
let e =
|
|
221
|
-
|
|
224
|
+
let e = o;
|
|
225
|
+
if (c = await r(i.id, s), a.template?.id === i.id) {
|
|
226
|
+
let e = a.template.name;
|
|
227
|
+
a.template = e === i.name ? c : {
|
|
222
228
|
...c,
|
|
223
229
|
name: e
|
|
224
230
|
};
|
|
225
231
|
}
|
|
226
|
-
|
|
232
|
+
o === e && (a.isDirty = !1);
|
|
227
233
|
} catch (e) {
|
|
228
234
|
throw t.onError?.(e), e;
|
|
229
235
|
} finally {
|
|
230
|
-
|
|
236
|
+
a.isSaving = !1;
|
|
231
237
|
}
|
|
232
|
-
return
|
|
238
|
+
return P(() => n.onSaved?.(c, { trigger: e })), c;
|
|
233
239
|
}
|
|
234
|
-
function
|
|
235
|
-
return
|
|
240
|
+
function B() {
|
|
241
|
+
return a.template?.id !== void 0;
|
|
236
242
|
}
|
|
237
243
|
return {
|
|
238
|
-
state: r(
|
|
239
|
-
content:
|
|
240
|
-
selectedBlock:
|
|
241
|
-
isBlockLocked:
|
|
242
|
-
setContent:
|
|
243
|
-
selectBlock:
|
|
244
|
-
setViewport:
|
|
245
|
-
setDarkMode:
|
|
246
|
-
setUiTheme:
|
|
247
|
-
setPreviewMode:
|
|
248
|
-
updateBlock:
|
|
249
|
-
updateSettings:
|
|
250
|
-
addBlock:
|
|
251
|
-
removeBlock:
|
|
252
|
-
moveBlock:
|
|
253
|
-
markDirty:
|
|
254
|
-
findBlockLocation:
|
|
255
|
-
setName:
|
|
256
|
-
create:
|
|
257
|
-
load:
|
|
258
|
-
save:
|
|
259
|
-
hasTemplate:
|
|
244
|
+
state: r(a),
|
|
245
|
+
content: c,
|
|
246
|
+
selectedBlock: l,
|
|
247
|
+
isBlockLocked: _,
|
|
248
|
+
setContent: y,
|
|
249
|
+
selectBlock: b,
|
|
250
|
+
setViewport: x,
|
|
251
|
+
setDarkMode: w,
|
|
252
|
+
setUiTheme: T,
|
|
253
|
+
setPreviewMode: E,
|
|
254
|
+
updateBlock: D,
|
|
255
|
+
updateSettings: O,
|
|
256
|
+
addBlock: k,
|
|
257
|
+
removeBlock: A,
|
|
258
|
+
moveBlock: j,
|
|
259
|
+
markDirty: M,
|
|
260
|
+
findBlockLocation: v,
|
|
261
|
+
setName: I,
|
|
262
|
+
create: L,
|
|
263
|
+
load: R,
|
|
264
|
+
save: z,
|
|
265
|
+
hasTemplate: B
|
|
260
266
|
};
|
|
261
267
|
}
|
|
262
|
-
var
|
|
263
|
-
function
|
|
264
|
-
let { content: n, setContent: r, isRemoteOperation: i, maxSize: o =
|
|
268
|
+
var T = 50, E = 300, D = 1500;
|
|
269
|
+
function O(t) {
|
|
270
|
+
let { content: n, setContent: r, isRemoteOperation: i, maxSize: o = T } = t, s = a([]), c = a([]), l = a(!1), d = null, f = null, p = e(() => s.value.length > 0), m = e(() => c.value.length > 0);
|
|
265
271
|
function h() {
|
|
266
272
|
return u(n.value);
|
|
267
273
|
}
|
|
@@ -279,21 +285,21 @@ function E(t) {
|
|
|
279
285
|
if (f && f.blockId === e) {
|
|
280
286
|
clearTimeout(f.timeoutId), f.timeoutId = setTimeout(() => {
|
|
281
287
|
f = null;
|
|
282
|
-
},
|
|
288
|
+
}, E);
|
|
283
289
|
return;
|
|
284
290
|
}
|
|
285
291
|
_(), g(h()), c.value = [], f = {
|
|
286
292
|
blockId: e,
|
|
287
293
|
timeoutId: setTimeout(() => {
|
|
288
294
|
f = null;
|
|
289
|
-
},
|
|
295
|
+
}, E)
|
|
290
296
|
};
|
|
291
297
|
}
|
|
292
298
|
}
|
|
293
299
|
function b() {
|
|
294
300
|
l.value = !0, d && clearTimeout(d), d = setTimeout(() => {
|
|
295
301
|
l.value = !1, d = null;
|
|
296
|
-
},
|
|
302
|
+
}, D);
|
|
297
303
|
}
|
|
298
304
|
function x() {
|
|
299
305
|
if (s.value.length === 0) return;
|
|
@@ -307,11 +313,11 @@ function E(t) {
|
|
|
307
313
|
let e = c.value.pop();
|
|
308
314
|
s.value.push(h()), r(e, !0), b();
|
|
309
315
|
}
|
|
310
|
-
function
|
|
316
|
+
function C() {
|
|
311
317
|
s.value = [], c.value = [], _();
|
|
312
318
|
}
|
|
313
|
-
function
|
|
314
|
-
|
|
319
|
+
function w() {
|
|
320
|
+
C(), d &&= (clearTimeout(d), null);
|
|
315
321
|
}
|
|
316
322
|
return {
|
|
317
323
|
canUndo: p,
|
|
@@ -321,11 +327,11 @@ function E(t) {
|
|
|
321
327
|
redo: S,
|
|
322
328
|
record: v,
|
|
323
329
|
recordDebounced: y,
|
|
324
|
-
clear:
|
|
325
|
-
destroy:
|
|
330
|
+
clear: C,
|
|
331
|
+
destroy: w
|
|
326
332
|
};
|
|
327
333
|
}
|
|
328
|
-
function
|
|
334
|
+
function k(e) {
|
|
329
335
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
330
336
|
...e,
|
|
331
337
|
id: l(),
|
|
@@ -341,7 +347,7 @@ function D(e) {
|
|
|
341
347
|
id: l()
|
|
342
348
|
})));
|
|
343
349
|
}
|
|
344
|
-
function
|
|
350
|
+
function A(e) {
|
|
345
351
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
346
352
|
function o(n, r, a) {
|
|
347
353
|
let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = m(n, o);
|
|
@@ -349,9 +355,9 @@ function O(e) {
|
|
|
349
355
|
}
|
|
350
356
|
function s(e, n, r) {
|
|
351
357
|
let o = JSON.parse(JSON.stringify(e));
|
|
352
|
-
if (o.id = l(),
|
|
358
|
+
if (o.id = l(), k(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
353
359
|
let t = JSON.parse(JSON.stringify(e));
|
|
354
|
-
return t.id = l(),
|
|
360
|
+
return t.id = l(), k(t), t;
|
|
355
361
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
356
362
|
else {
|
|
357
363
|
let i = a?.(e.id) ?? null;
|
|
@@ -372,9 +378,9 @@ function O(e) {
|
|
|
372
378
|
updateBlockProperty: u
|
|
373
379
|
};
|
|
374
380
|
}
|
|
375
|
-
var
|
|
376
|
-
function
|
|
377
|
-
let { content: t, isDirty: n, onChange: r, debounce: i =
|
|
381
|
+
var j = 2e3;
|
|
382
|
+
function M(e) {
|
|
383
|
+
let { content: t, isDirty: n, onChange: r, debounce: i = j, enabled: a = !0 } = e, s = null, c = !1;
|
|
378
384
|
function l() {
|
|
379
385
|
return typeof a == "function" ? a() : a;
|
|
380
386
|
}
|
|
@@ -409,7 +415,7 @@ function A(e) {
|
|
|
409
415
|
destroy: g
|
|
410
416
|
};
|
|
411
417
|
}
|
|
412
|
-
function
|
|
418
|
+
function N(t) {
|
|
413
419
|
let n = i(/* @__PURE__ */ new Set()), r = e(() => n.size > 0);
|
|
414
420
|
function a(e) {
|
|
415
421
|
return n.has(e);
|
|
@@ -427,7 +433,7 @@ function j(t) {
|
|
|
427
433
|
hasHiddenBlocks: r
|
|
428
434
|
};
|
|
429
435
|
}
|
|
430
|
-
function
|
|
436
|
+
function P(t) {
|
|
431
437
|
let n = a(!1), r = a(!1), i = e(() => !!t.definition.value?.dataSource), o = e(() => i.value && !t.block.value.dataSourceFetched);
|
|
432
438
|
async function s() {
|
|
433
439
|
let e = t.definition.value;
|
|
@@ -457,7 +463,7 @@ function M(t) {
|
|
|
457
463
|
needsFetch: o
|
|
458
464
|
};
|
|
459
465
|
}
|
|
460
|
-
function
|
|
466
|
+
function F(e, t) {
|
|
461
467
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
462
468
|
e.addBlock = (r, i, a, o) => {
|
|
463
469
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -471,7 +477,7 @@ function N(e, t) {
|
|
|
471
477
|
t.record(), o(e);
|
|
472
478
|
};
|
|
473
479
|
}
|
|
474
|
-
function
|
|
480
|
+
function I(e) {
|
|
475
481
|
let { provider: t } = e, n = a([]), r = a(!1), i = c(() => {
|
|
476
482
|
let e = /* @__PURE__ */ new Set();
|
|
477
483
|
for (let t of n.value) {
|
|
@@ -487,12 +493,12 @@ function P(e) {
|
|
|
487
493
|
return l.value && e.canDelete !== !1;
|
|
488
494
|
}
|
|
489
495
|
function f(e, t) {
|
|
490
|
-
throw new
|
|
496
|
+
throw new h(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
|
|
491
497
|
}
|
|
492
|
-
function
|
|
493
|
-
|
|
498
|
+
function p(t) {
|
|
499
|
+
S(e.onError, t);
|
|
494
500
|
}
|
|
495
|
-
async function
|
|
501
|
+
async function m(i) {
|
|
496
502
|
r.value = !0;
|
|
497
503
|
try {
|
|
498
504
|
n.value = await t.list(i);
|
|
@@ -514,7 +520,7 @@ function P(e) {
|
|
|
514
520
|
name: r,
|
|
515
521
|
content: i
|
|
516
522
|
});
|
|
517
|
-
return n.value = [e, ...n.value],
|
|
523
|
+
return n.value = [e, ...n.value], p(() => t.onCreated?.(e)), e;
|
|
518
524
|
} catch (t) {
|
|
519
525
|
throw e.onError?.(t), t;
|
|
520
526
|
}
|
|
@@ -526,7 +532,7 @@ function P(e) {
|
|
|
526
532
|
o && o.canUpdate === !1 && f("update", `not permitted for entry "${r}"`);
|
|
527
533
|
try {
|
|
528
534
|
let e = await a(r, i);
|
|
529
|
-
return n.value = n.value.map((t) => t.id === r ? e : t),
|
|
535
|
+
return n.value = n.value.map((t) => t.id === r ? e : t), p(() => t.onUpdated?.(e)), e;
|
|
530
536
|
} catch (t) {
|
|
531
537
|
throw e.onError?.(t), t;
|
|
532
538
|
}
|
|
@@ -537,7 +543,7 @@ function P(e) {
|
|
|
537
543
|
let a = n.value.find((e) => e.id === r) ?? null;
|
|
538
544
|
a && a.canDelete === !1 && f("delete", `not permitted for entry "${r}"`);
|
|
539
545
|
try {
|
|
540
|
-
await i(r), n.value = n.value.filter((e) => e.id !== r), a &&
|
|
546
|
+
await i(r), n.value = n.value.filter((e) => e.id !== r), a && p(() => t.onDeleted?.(a));
|
|
541
547
|
} catch (t) {
|
|
542
548
|
throw e.onError?.(t), t;
|
|
543
549
|
}
|
|
@@ -551,15 +557,15 @@ function P(e) {
|
|
|
551
557
|
canDelete: l,
|
|
552
558
|
canUpdateBlock: u,
|
|
553
559
|
canDeleteBlock: d,
|
|
554
|
-
load:
|
|
560
|
+
load: m,
|
|
555
561
|
create: g,
|
|
556
562
|
update: _,
|
|
557
563
|
remove: v
|
|
558
564
|
};
|
|
559
565
|
}
|
|
560
|
-
var
|
|
561
|
-
function
|
|
562
|
-
let t = e.key ??
|
|
566
|
+
var L = "templatical:saved-blocks";
|
|
567
|
+
function R(e = {}) {
|
|
568
|
+
let t = e.key ?? L;
|
|
563
569
|
function n() {
|
|
564
570
|
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.");
|
|
565
571
|
return localStorage;
|
|
@@ -610,9 +616,9 @@ function I(e = {}) {
|
|
|
610
616
|
}
|
|
611
617
|
};
|
|
612
618
|
}
|
|
613
|
-
var
|
|
614
|
-
function
|
|
615
|
-
let t = e.key ??
|
|
619
|
+
var z = "templatical:media", B = 50;
|
|
620
|
+
function V(e = {}) {
|
|
621
|
+
let t = e.key ?? z;
|
|
616
622
|
function n() {
|
|
617
623
|
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.");
|
|
618
624
|
return localStorage;
|
|
@@ -649,7 +655,7 @@ function z(e = {}) {
|
|
|
649
655
|
let t = r(), n = e?.search?.trim().toLowerCase(), i = n ? t.filter((e) => {
|
|
650
656
|
let t = e.filename?.toLowerCase() ?? "", r = e.alt?.toLowerCase() ?? "";
|
|
651
657
|
return t.includes(n) || r.includes(n);
|
|
652
|
-
}) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o +
|
|
658
|
+
}) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o + B), c = { items: s }, l = o + s.length;
|
|
653
659
|
return l < i.length && (c.nextCursor = String(l)), c;
|
|
654
660
|
},
|
|
655
661
|
async create(e) {
|
|
@@ -689,18 +695,18 @@ function z(e = {}) {
|
|
|
689
695
|
storage: !1
|
|
690
696
|
};
|
|
691
697
|
}
|
|
692
|
-
function
|
|
698
|
+
function H(e) {
|
|
693
699
|
let { provider: t, getTemplateId: n } = e, r = a([]), i = a(!1), o = a(void 0), s = a(!1), l = /* @__PURE__ */ new Map(), u = c(() => typeof t.create == "function"), d = c(() => typeof t.restore == "function");
|
|
694
700
|
function f(e) {
|
|
695
701
|
let t = n();
|
|
696
|
-
if (!t) throw new
|
|
702
|
+
if (!t) throw new h(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
|
|
697
703
|
return t;
|
|
698
704
|
}
|
|
699
|
-
function
|
|
700
|
-
throw new
|
|
705
|
+
function p(e) {
|
|
706
|
+
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.`);
|
|
701
707
|
}
|
|
702
|
-
function
|
|
703
|
-
|
|
708
|
+
function m(t) {
|
|
709
|
+
S(e.onError, t);
|
|
704
710
|
}
|
|
705
711
|
async function g(n) {
|
|
706
712
|
let a = f("list");
|
|
@@ -730,18 +736,18 @@ function B(e) {
|
|
|
730
736
|
}
|
|
731
737
|
async function y(n, i) {
|
|
732
738
|
let { create: a } = t;
|
|
733
|
-
typeof a != "function" &&
|
|
739
|
+
typeof a != "function" && p("create");
|
|
734
740
|
let o = f("create");
|
|
735
741
|
try {
|
|
736
742
|
let e = await a(o, n, i);
|
|
737
|
-
return r.value = [e, ...r.value],
|
|
743
|
+
return r.value = [e, ...r.value], m(() => t.onCreated?.(e)), e;
|
|
738
744
|
} catch (t) {
|
|
739
745
|
throw e.onError?.(t), t;
|
|
740
746
|
}
|
|
741
747
|
}
|
|
742
|
-
async function
|
|
748
|
+
async function b(n) {
|
|
743
749
|
let { restore: r } = t;
|
|
744
|
-
typeof r != "function" &&
|
|
750
|
+
typeof r != "function" && p("restore");
|
|
745
751
|
let i = f("restore"), a;
|
|
746
752
|
s.value = !0;
|
|
747
753
|
try {
|
|
@@ -751,7 +757,7 @@ function B(e) {
|
|
|
751
757
|
} finally {
|
|
752
758
|
s.value = !1;
|
|
753
759
|
}
|
|
754
|
-
return
|
|
760
|
+
return m(() => t.onRestored?.(a)), a;
|
|
755
761
|
}
|
|
756
762
|
return {
|
|
757
763
|
nextCursor: o,
|
|
@@ -764,29 +770,29 @@ function B(e) {
|
|
|
764
770
|
peekContent: _,
|
|
765
771
|
resolveContent: v,
|
|
766
772
|
create: y,
|
|
767
|
-
restore:
|
|
773
|
+
restore: b
|
|
768
774
|
};
|
|
769
775
|
}
|
|
770
|
-
function
|
|
771
|
-
let { provider: t, getTemplateId: n, getUser: r } = e, i = a([]), o = a(!1), s = a(!1), l = c(() => typeof t.create == "function"), u = c(() => typeof t.update == "function"), d = c(() => typeof t.delete == "function"), f = c(() => typeof t.setResolved == "function"),
|
|
776
|
+
function U(e) {
|
|
777
|
+
let { provider: t, getTemplateId: n, getUser: r } = e, i = a([]), o = a(!1), s = a(!1), l = c(() => typeof t.create == "function"), u = c(() => typeof t.update == "function"), d = c(() => typeof t.delete == "function"), f = c(() => typeof t.setResolved == "function"), p = c(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), m = c(() => i.value.filter((e) => !e.resolvedAt).length), g = c(() => {
|
|
772
778
|
let e = /* @__PURE__ */ new Map();
|
|
773
779
|
for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
|
|
774
780
|
return e;
|
|
775
781
|
});
|
|
776
782
|
function _(e) {
|
|
777
783
|
let t = n();
|
|
778
|
-
if (!t) throw new
|
|
784
|
+
if (!t) throw new h(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
|
|
779
785
|
return t;
|
|
780
786
|
}
|
|
781
787
|
function v(e) {
|
|
782
788
|
let t = r();
|
|
783
|
-
if (!t) throw new
|
|
789
|
+
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.`);
|
|
784
790
|
return t;
|
|
785
791
|
}
|
|
786
|
-
function
|
|
787
|
-
throw new
|
|
792
|
+
function y(e) {
|
|
793
|
+
throw new h(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
788
794
|
}
|
|
789
|
-
function
|
|
795
|
+
function b(e) {
|
|
790
796
|
for (let t of i.value) {
|
|
791
797
|
if (t.id === e) return t;
|
|
792
798
|
for (let n of t.replies ?? []) if (n.id === e) return n;
|
|
@@ -798,11 +804,11 @@ function V(e) {
|
|
|
798
804
|
return t !== null && e.author.id === t.id;
|
|
799
805
|
}
|
|
800
806
|
function w(t) {
|
|
801
|
-
let n =
|
|
807
|
+
let n = x(t);
|
|
802
808
|
throw e.onError?.(n), n;
|
|
803
809
|
}
|
|
804
810
|
function T(t) {
|
|
805
|
-
|
|
811
|
+
S(e.onError, t);
|
|
806
812
|
}
|
|
807
813
|
function E(e, t, n) {
|
|
808
814
|
return [
|
|
@@ -835,7 +841,7 @@ function V(e) {
|
|
|
835
841
|
return !D(i.value[t], n) && (i.value = E(i.value, t, n), !0);
|
|
836
842
|
}
|
|
837
843
|
function k(e, t) {
|
|
838
|
-
let n =
|
|
844
|
+
let n = b(e), r = t ?? n?.parentId ?? null;
|
|
839
845
|
return r ? i.value = i.value.map((t) => t.id === r ? {
|
|
840
846
|
...t,
|
|
841
847
|
replies: (t.replies ?? []).filter((t) => t.id !== e)
|
|
@@ -854,7 +860,7 @@ function V(e) {
|
|
|
854
860
|
}
|
|
855
861
|
async function j(e) {
|
|
856
862
|
let { create: n } = t;
|
|
857
|
-
typeof n != "function" &&
|
|
863
|
+
typeof n != "function" && y("create");
|
|
858
864
|
let r = _("create");
|
|
859
865
|
v("create"), s.value = !0;
|
|
860
866
|
try {
|
|
@@ -868,7 +874,7 @@ function V(e) {
|
|
|
868
874
|
}
|
|
869
875
|
async function M(e, n) {
|
|
870
876
|
let { update: r } = t;
|
|
871
|
-
typeof r != "function" &&
|
|
877
|
+
typeof r != "function" && y("update");
|
|
872
878
|
let i = _("update");
|
|
873
879
|
v("update"), s.value = !0;
|
|
874
880
|
try {
|
|
@@ -882,10 +888,10 @@ function V(e) {
|
|
|
882
888
|
}
|
|
883
889
|
async function N(e) {
|
|
884
890
|
let { delete: n } = t;
|
|
885
|
-
typeof n != "function" &&
|
|
891
|
+
typeof n != "function" && y("delete");
|
|
886
892
|
let r = _("delete");
|
|
887
893
|
v("delete");
|
|
888
|
-
let i =
|
|
894
|
+
let i = b(e);
|
|
889
895
|
s.value = !0;
|
|
890
896
|
try {
|
|
891
897
|
await n(r, e), k(e), i && T(() => t.onDeleted?.(i, { origin: "local" }));
|
|
@@ -897,7 +903,7 @@ function V(e) {
|
|
|
897
903
|
}
|
|
898
904
|
async function P(e, n) {
|
|
899
905
|
let { setResolved: r } = t;
|
|
900
|
-
typeof r != "function" &&
|
|
906
|
+
typeof r != "function" && y("setResolved");
|
|
901
907
|
let i = _("setResolved");
|
|
902
908
|
v("setResolved"), s.value = !0;
|
|
903
909
|
try {
|
|
@@ -927,22 +933,22 @@ function V(e) {
|
|
|
927
933
|
canUpdate: u,
|
|
928
934
|
canDelete: d,
|
|
929
935
|
canResolve: f,
|
|
930
|
-
totalCount:
|
|
931
|
-
unresolvedCount:
|
|
936
|
+
totalCount: p,
|
|
937
|
+
unresolvedCount: m,
|
|
932
938
|
commentCountByBlock: g,
|
|
933
939
|
load: A,
|
|
934
940
|
create: j,
|
|
935
941
|
update: M,
|
|
936
942
|
remove: N,
|
|
937
943
|
setResolved: P,
|
|
938
|
-
find:
|
|
944
|
+
find: b,
|
|
939
945
|
isOwn: C,
|
|
940
946
|
applyRemoteCreate: F,
|
|
941
947
|
applyRemoteUpdate: I,
|
|
942
948
|
applyRemoteDelete: L
|
|
943
949
|
};
|
|
944
950
|
}
|
|
945
|
-
function
|
|
951
|
+
function W(e) {
|
|
946
952
|
let { comments: r, provider: i, getTemplateId: a } = e, { subscribe: o } = i;
|
|
947
953
|
if (typeof o != "function") return;
|
|
948
954
|
let s = null;
|
|
@@ -965,18 +971,18 @@ function H(e) {
|
|
|
965
971
|
}
|
|
966
972
|
//#endregion
|
|
967
973
|
//#region src/utils/blockTypeLabels.ts
|
|
968
|
-
function
|
|
974
|
+
function G(e, t) {
|
|
969
975
|
return t.blocks[e] ?? e;
|
|
970
976
|
}
|
|
971
|
-
function
|
|
972
|
-
if (e.type !== "custom") return
|
|
977
|
+
function K(e, t, n = []) {
|
|
978
|
+
if (e.type !== "custom") return G(e.type, t);
|
|
973
979
|
let { customType: r } = e;
|
|
974
980
|
return n.find((e) => e.type === r)?.name ?? r;
|
|
975
981
|
}
|
|
976
982
|
//#endregion
|
|
977
983
|
//#region src/utils/resolveFieldColors.ts
|
|
978
|
-
function
|
|
979
|
-
let n =
|
|
984
|
+
function q(e, t) {
|
|
985
|
+
let n = y({ presets: e.presets }, v), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
|
|
980
986
|
return {
|
|
981
987
|
presets: r ? t.presets : n.presets,
|
|
982
988
|
allowCustom: t.allowCustom !== !1 && i,
|
|
@@ -986,7 +992,7 @@ function G(e, t) {
|
|
|
986
992
|
allowCustomIgnored: e.allowCustom === !0 && t.allowCustom === !1
|
|
987
993
|
};
|
|
988
994
|
}
|
|
989
|
-
var
|
|
995
|
+
var J = b({
|
|
990
996
|
name: "code",
|
|
991
997
|
size: 24,
|
|
992
998
|
node: [["path", {
|
|
@@ -996,7 +1002,7 @@ var K = v({
|
|
|
996
1002
|
d: "m8 6-6 6 6 6",
|
|
997
1003
|
key: "ppft3o"
|
|
998
1004
|
}]]
|
|
999
|
-
}),
|
|
1005
|
+
}), Y = b({
|
|
1000
1006
|
name: "image",
|
|
1001
1007
|
size: 24,
|
|
1002
1008
|
node: [
|
|
@@ -1020,14 +1026,14 @@ var K = v({
|
|
|
1020
1026
|
key: "1xmnt7"
|
|
1021
1027
|
}]
|
|
1022
1028
|
]
|
|
1023
|
-
}),
|
|
1029
|
+
}), X = b({
|
|
1024
1030
|
name: "navigation",
|
|
1025
1031
|
size: 24,
|
|
1026
1032
|
node: [["polygon", {
|
|
1027
1033
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
1028
1034
|
key: "1ltx0t"
|
|
1029
1035
|
}]]
|
|
1030
|
-
}),
|
|
1036
|
+
}), Z = b({
|
|
1031
1037
|
name: "share-2",
|
|
1032
1038
|
size: 24,
|
|
1033
1039
|
node: [
|
|
@@ -1064,7 +1070,7 @@ var K = v({
|
|
|
1064
1070
|
key: "1n3mei"
|
|
1065
1071
|
}]
|
|
1066
1072
|
]
|
|
1067
|
-
}),
|
|
1073
|
+
}), Q = b({
|
|
1068
1074
|
name: "table",
|
|
1069
1075
|
size: 24,
|
|
1070
1076
|
node: [
|
|
@@ -1089,13 +1095,13 @@ var K = v({
|
|
|
1089
1095
|
key: "5xshup"
|
|
1090
1096
|
}]
|
|
1091
1097
|
]
|
|
1092
|
-
}),
|
|
1093
|
-
function
|
|
1094
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || s(r), { isOverDropZone: a } =
|
|
1098
|
+
}), $ = "image/";
|
|
1099
|
+
function ee(e) {
|
|
1100
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || s(r), { isOverDropZone: a } = _(t, {
|
|
1095
1101
|
preventDefaultForUnhandled: !0,
|
|
1096
1102
|
onDrop: (e) => {
|
|
1097
1103
|
if (!i()) return;
|
|
1098
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
1104
|
+
let t = (e ?? []).filter((e) => e.type.startsWith($));
|
|
1099
1105
|
t.length > 0 && n([t[0]]);
|
|
1100
1106
|
}
|
|
1101
1107
|
});
|
|
@@ -1103,11 +1109,11 @@ function Q(e) {
|
|
|
1103
1109
|
}
|
|
1104
1110
|
//#endregion
|
|
1105
1111
|
//#region src/constants/socialIcons.ts
|
|
1106
|
-
var
|
|
1112
|
+
var te = f, ne = {
|
|
1107
1113
|
small: 24,
|
|
1108
1114
|
medium: 32,
|
|
1109
1115
|
large: 48
|
|
1110
|
-
},
|
|
1116
|
+
}, re = [
|
|
1111
1117
|
"facebook",
|
|
1112
1118
|
"twitter",
|
|
1113
1119
|
"instagram",
|
|
@@ -1127,4 +1133,4 @@ var $ = d, ee = {
|
|
|
1127
1133
|
"behance"
|
|
1128
1134
|
];
|
|
1129
1135
|
//#endregion
|
|
1130
|
-
export {
|
|
1136
|
+
export { O as C, H as E, w as S, I as T, A as _, Q as a, N as b, Y as c, K as d, G as f, M as g, R as h, ee as i, J as l, V as m, te as n, Z as o, j as p, re as r, X as s, ne as t, q as u, W as v, F as w, P as x, U as y };
|