@templatical/editor 0.24.0 → 0.25.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-Nq-jrGaf.js → AiChatSidebar-CIkS8DsO.js} +15 -15
- package/dist/{AiFeatureMenu-tg_zMKMK.js → AiFeatureMenu-Cji1LBJJ.js} +7 -7
- package/dist/{BlockIssueBadge-Bd94kIiw.js → BlockIssueBadge-BQiT0FML.js} +5 -5
- package/dist/{BlockPreviewCanvas-B34aMhHe.js → BlockPreviewCanvas-DAnwZofk.js} +11 -7
- package/dist/{CloudEditor-DjN_9Yso.js → CloudEditor-CXaft6Ej.js} +73 -71
- package/dist/{CollaboratorBar-Bhazzcg-.js → CollaboratorBar-BR-rL2wG.js} +4 -4
- package/dist/{ColorPicker-DXGrcJxJ.js → ColorPicker-B4ArSUhy.js} +7 -9
- package/dist/{CommentsSidebar-ku1kt10u.js → CommentsSidebar-Bm5GLDts.js} +16 -16
- package/dist/{CountdownBlock-CN9Lc23W.js → CountdownBlock-CIVAQDVu.js} +3 -3
- package/dist/{CountdownToolbar-VEsIyKV6.js → CountdownToolbar-DBmb3tlb.js} +4 -4
- package/dist/DesignReferenceSidebar-CnyJ8L-j.js +264 -0
- package/dist/{IssuesPanel-CEfzOpS_.js → IssuesPanel-D3XgmYCt.js} +8 -8
- package/dist/{LoadingTrack-KIcREPlS.js → LoadingTrack-XK_eeUdq.js} +1 -1
- package/dist/{MergeTagModeToggle-C3V2xGAg.js → MergeTagModeToggle-BK0fI3P2.js} +6 -6
- package/dist/{MergeTagSuggestion-Dn8ww9nV.js → MergeTagSuggestion-D0OHRv7L.js} +8 -12
- package/dist/{NumberWithSuffix-BGocZkj9.js → NumberWithSuffix-Cjj9UNIp.js} +2 -2
- package/dist/{ParagraphEditor-D-fz0kUb.js → ParagraphEditor-jGnbJEA2.js} +45 -45
- package/dist/{RichTextEditorContent-DydrqFts.js → RichTextEditorContent-DaaKdzjb.js} +8 -8
- package/dist/{SaveBlockDialog-BDDFbAWF.js → SaveBlockDialog-B3ngEldp.js} +12 -12
- package/dist/{SavedBlocksBrowserModal-Djik_fJh.js → SavedBlocksBrowserModal-DawN3XaB.js} +11 -11
- package/dist/{SavedBlocksPanels-CxemyPxL.js → SavedBlocksPanels-eDC9Y46N.js} +2 -2
- package/dist/{SavedBlocksPickBar-Dlhipmob.js → SavedBlocksPickBar-CQbbXmzj.js} +4 -4
- package/dist/{SnapshotHistory-DPbM4ons.js → SnapshotHistory-COxKtHM-.js} +10 -10
- package/dist/{TemplateScoringPanel-BFYgweDX.js → TemplateScoringPanel-bUuqOO1z.js} +16 -16
- package/dist/{TestEmailModal-IZfwgya-.js → TestEmailModal-CytkbZVQ.js} +89 -58
- package/dist/{TestEmailPanel-QEEx_PkN.js → TestEmailPanel-CHUY7VZn.js} +2 -2
- package/dist/{TitleEditor-BB4YlIBF.js → TitleEditor-aMR1bOyY.js} +13 -13
- package/dist/TplModal-fmYNYdyp.js +49 -0
- package/dist/{blockTypeIcons-Wzd7W_2x.js → blockTypeIcons-C6b9rg88.js} +26 -26
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-CO4nq6TX.js → ca-8Dvbwo50.js} +5 -0
- package/dist/cdn/chunks/{AiChatSidebar-CN-0DIuA.js → AiChatSidebar-bkBKpNgE.js} +9 -9
- package/dist/cdn/chunks/{AiChatSidebar-CN-0DIuA.js.map → AiChatSidebar-bkBKpNgE.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-B5pV6Iux.js → AiFeatureMenu-CI4SYTq2.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-B5pV6Iux.js.map → AiFeatureMenu-CI4SYTq2.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-aanOjeyi.js → BlockIssueBadge-CRnx8Dv9.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-aanOjeyi.js.map → BlockIssueBadge-CRnx8Dv9.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-Dc4F4HzY.js → BlockPreviewCanvas-CXCWhqbp.js} +13 -9
- package/dist/cdn/chunks/BlockPreviewCanvas-CXCWhqbp.js.map +1 -0
- package/dist/cdn/chunks/{CloudEditor-CeKaWWO5.js → CloudEditor-D-t7RyDh.js} +67 -65
- package/dist/cdn/chunks/CloudEditor-D-t7RyDh.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CEdKr0A2.js → CollaboratorBar-DcXYo47v.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-CEdKr0A2.js.map → CollaboratorBar-DcXYo47v.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-BckwEfcN.js → ColorPicker-_1O7YU2z.js} +8 -10
- package/dist/cdn/chunks/{ColorPicker-BckwEfcN.js.map → ColorPicker-_1O7YU2z.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-6PfpJKh-.js → CommentsSidebar-BEgLBYX-.js} +7 -7
- package/dist/cdn/chunks/{CommentsSidebar-6PfpJKh-.js.map → CommentsSidebar-BEgLBYX-.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CoBmvQKv.js → CountdownBlock-CPnQA44g.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-CoBmvQKv.js.map → CountdownBlock-CPnQA44g.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CdV8RTQu.js → CountdownToolbar-Cdo-30U4.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-CdV8RTQu.js.map → CountdownToolbar-Cdo-30U4.js.map} +1 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-DPqBr-ut.js +223 -0
- package/dist/cdn/chunks/{DesignReferenceSidebar-BjlaP69l.js.map → DesignReferenceSidebar-DPqBr-ut.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CkkEnhxZ.js → IssuesPanel-DoQWb23r.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-CkkEnhxZ.js.map → IssuesPanel-DoQWb23r.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-D-CW2tUa.js → LoadingTrack-G2tuXqCJ.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-D-CW2tUa.js.map → LoadingTrack-G2tuXqCJ.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DmtR300G.js → MergeTagModeToggle-CWuVC3MU.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-DmtR300G.js.map → MergeTagModeToggle-CWuVC3MU.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-Cvlkw_PM.js → MergeTagSuggestion-Ces5Ua78.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-Cvlkw_PM.js.map → MergeTagSuggestion-Ces5Ua78.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-BOcMN26z.js → NumberWithSuffix-DQ4sgvt5.js} +3 -3
- package/dist/cdn/chunks/{NumberWithSuffix-BOcMN26z.js.map → NumberWithSuffix-DQ4sgvt5.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CX1yks4N.js → ParagraphEditor-Uv5LPF3W.js} +131 -131
- package/dist/cdn/chunks/{ParagraphEditor-CX1yks4N.js.map → ParagraphEditor-Uv5LPF3W.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-z9s7qxs3.js → RichTextEditorContent-Bt3s09qY.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-z9s7qxs3.js.map → RichTextEditorContent-Bt3s09qY.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-D2CtW4lC.js → SaveBlockDialog-BAew6EFd.js} +10 -10
- package/dist/cdn/chunks/{SaveBlockDialog-D2CtW4lC.js.map → SaveBlockDialog-BAew6EFd.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DdUKJzzF.js → SavedBlocksBrowserModal-Dn4IJDJW.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DdUKJzzF.js.map → SavedBlocksBrowserModal-Dn4IJDJW.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-1kVbqdpc.js → SavedBlocksPanels-B62U5DYW.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-1kVbqdpc.js.map → SavedBlocksPanels-B62U5DYW.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar--noDJIyN.js → SavedBlocksPickBar-CyRKZg2T.js} +5 -5
- package/dist/cdn/chunks/{SavedBlocksPickBar--noDJIyN.js.map → SavedBlocksPickBar-CyRKZg2T.js.map} +1 -1
- package/dist/cdn/chunks/{SnapshotHistory-DFuNJRc9.js → SnapshotHistory-QQt0DKey.js} +7 -7
- package/dist/cdn/chunks/{SnapshotHistory-DFuNJRc9.js.map → SnapshotHistory-QQt0DKey.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-DG1dAjQk.js → TemplateScoringPanel-BwyCMcit.js} +67 -67
- package/dist/cdn/chunks/{TemplateScoringPanel-DG1dAjQk.js.map → TemplateScoringPanel-BwyCMcit.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-CiPfOn2v.js → TestEmailModal-B5UQkDJp.js} +89 -58
- package/dist/cdn/chunks/TestEmailModal-B5UQkDJp.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-saOfnpjz.js → TestEmailPanel-CvuBq4RA.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-saOfnpjz.js.map → TestEmailPanel-CvuBq4RA.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-08KM_VzZ.js → TitleEditor-B9W954u9.js} +13 -13
- package/dist/cdn/chunks/{TitleEditor-08KM_VzZ.js.map → TitleEditor-B9W954u9.js.map} +1 -1
- package/dist/cdn/chunks/TplModal-B8UsvWc8.js +50 -0
- package/dist/cdn/chunks/TplModal-B8UsvWc8.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-DvohkXqi.js → blockTypeIcons-B8s3_ahs.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-DvohkXqi.js.map → blockTypeIcons-B8s3_ahs.js.map} +1 -1
- package/dist/cdn/chunks/{ca-CO4nq6TX.js → ca-8Dvbwo50.js} +6 -1
- package/dist/cdn/chunks/{ca-CO4nq6TX.js.map → ca-8Dvbwo50.js.map} +1 -1
- package/dist/cdn/chunks/{cloud-C2I0P9qj.js → cloud-DOaGUdR0.js} +13 -17
- package/dist/cdn/chunks/{cloud-C2I0P9qj.js.map → cloud-DOaGUdR0.js.map} +1 -1
- package/dist/{de-CUeaFJph.js → cdn/chunks/de-CieSMCUp.js} +7 -0
- package/dist/cdn/chunks/{de-CUeaFJph.js.map → de-CieSMCUp.js.map} +1 -1
- package/dist/cdn/chunks/{dist-CxTt8FRE.js → dist-B8AX9np4.js} +16 -12
- package/dist/cdn/chunks/dist-B8AX9np4.js.map +1 -0
- package/dist/cdn/chunks/{dist-CiBEt0VR.js → dist-lZgXNk4G.js} +36 -20
- package/dist/cdn/chunks/dist-lZgXNk4G.js.map +1 -0
- package/dist/cdn/chunks/{draggable-D840DIZB.js → draggable-JcMTNF3U.js} +14 -15
- package/dist/cdn/chunks/{draggable-D840DIZB.js.map → draggable-JcMTNF3U.js.map} +1 -1
- package/dist/{en-zCYIPAL5.js → cdn/chunks/en-D0t_2Fq_.js} +7 -0
- package/dist/cdn/chunks/{en-zCYIPAL5.js.map → en-D0t_2Fq_.js.map} +1 -1
- package/dist/cdn/chunks/{es-BSiH7YkP.js → es-DwDoNuLM.js} +6 -1
- package/dist/cdn/chunks/{es-BSiH7YkP.js.map → es-DwDoNuLM.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-DBWF_lxx.js → extensions-5jgtarD-.js} +30 -26
- package/dist/cdn/chunks/{extensions-DBWF_lxx.js.map → extensions-5jgtarD-.js.map} +1 -1
- package/dist/{fr-DTVJ3det.js → cdn/chunks/fr-CSEEzv1_.js} +7 -0
- package/dist/cdn/chunks/{fr-DTVJ3det.js.map → fr-CSEEzv1_.js.map} +1 -1
- package/dist/cdn/chunks/{htmlparser-CZa2V5cF.js → htmlparser-CPhs2cYE.js} +3 -5
- package/dist/cdn/chunks/{htmlparser-CZa2V5cF.js.map → htmlparser-CPhs2cYE.js.map} +1 -1
- package/dist/cdn/chunks/{icons-Cqxvwgz7.js → icons-Cp4ZIJw-.js} +31 -31
- package/dist/cdn/chunks/{icons-Cqxvwgz7.js.map → icons-Cp4ZIJw-.js.map} +1 -1
- package/dist/cdn/chunks/keys-BxPCfHBH.js +12 -0
- package/dist/cdn/chunks/keys-BxPCfHBH.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-BJOEu6Cg.js → liquid.browser-CZaQe87t.js} +756 -718
- package/dist/cdn/chunks/liquid.browser-CZaQe87t.js.map +1 -0
- package/dist/cdn/chunks/{nl-BqSquFS3.js → nl-xyk1T2mA.js} +6 -1
- package/dist/cdn/chunks/{nl-BqSquFS3.js.map → nl-xyk1T2mA.js.map} +1 -1
- package/dist/{pt-BR-CMljK37h.js → cdn/chunks/pt-BR-yr6uOJgn.js} +7 -0
- package/dist/cdn/chunks/{pt-BR-CMljK37h.js.map → pt-BR-yr6uOJgn.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-R0v5p99W.js → pusher-kUlkqMvR.js} +21 -28
- package/dist/cdn/chunks/{pusher-R0v5p99W.js.map → pusher-kUlkqMvR.js.map} +1 -1
- package/dist/cdn/chunks/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
- package/dist/cdn/chunks/{src-YVsPFLNJ.js → src-B8W42vT-.js} +153 -153
- package/dist/cdn/chunks/{src-YVsPFLNJ.js.map → src-B8W42vT-.js.map} +1 -1
- package/dist/cdn/chunks/{src-C45kfA2t.js → src-C417zeUg.js} +22 -26
- package/dist/cdn/chunks/{src-C45kfA2t.js.map → src-C417zeUg.js.map} +1 -1
- package/dist/cdn/chunks/{src-BCJna-6p.js → src-CZjSXPYq.js} +9 -4
- package/dist/cdn/chunks/src-CZjSXPYq.js.map +1 -0
- package/dist/cdn/chunks/{src-XQmI_Xs1.js → src-Dpj0x27M.js} +523 -787
- package/dist/cdn/chunks/{src-XQmI_Xs1.js.map → src-Dpj0x27M.js.map} +1 -1
- package/dist/cdn/chunks/{styles-BohMfIBd.js → styles-DANwMzW2.js} +770 -751
- package/dist/cdn/chunks/styles-DANwMzW2.js.map +1 -0
- package/dist/cdn/chunks/timeouts-SsLMC4a3.js +6 -0
- package/dist/cdn/chunks/{timeouts-Bmi_yePw.js.map → timeouts-SsLMC4a3.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-DRKu__AX.js → tiptap-rsib432n.js} +132 -119
- package/dist/cdn/chunks/tiptap-rsib432n.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-aanU8uqB.js → useAliveFlag-CseYNikC.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-aanU8uqB.js.map → useAliveFlag-CseYNikC.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-Bem8DUjH.js → useCloudI18n-CjVzv11v.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-Bem8DUjH.js.map → useCloudI18n-CjVzv11v.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-B_vwuKdI.js → useEditorCore-DfW-thCr.js} +484 -411
- package/dist/cdn/chunks/useEditorCore-DfW-thCr.js.map +1 -0
- package/dist/cdn/chunks/{useI18n-graz19nI.js → useI18n-DniEFeIl.js} +3 -3
- package/dist/cdn/chunks/{useI18n-graz19nI.js.map → useI18n-DniEFeIl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-rTzAFMlr.js → useMergeTag-Bk9_f5cc.js} +7 -7
- package/dist/cdn/chunks/{useMergeTag-rTzAFMlr.js.map → useMergeTag-Bk9_f5cc.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BaFxLP3w.js → usePopoverPosition-C4xFJCJ2.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-BaFxLP3w.js.map → usePopoverPosition-C4xFJCJ2.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +24 -22
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BpQDKiPz.js → check-CIhIDh4h.js} +1 -1
- package/dist/{chevron-down-j8GrdTyz.js → chevron-down-CZ0m6G3s.js} +1 -1
- package/dist/{chevron-up-BACyVhyC.js → chevron-up-BH_tJLeb.js} +1 -1
- package/dist/{circle-alert-CgtE46ND.js → circle-alert-DkEXnGPV.js} +1 -1
- package/dist/{clock-BzKLLW5L.js → clock-BDIJZUET.js} +1 -1
- package/dist/{cloud-DsUct4Zq.js → cloud-BZn3jqoL.js} +10 -14
- package/dist/{createLucideIcon-JWHwTI6N.js → createLucideIcon-AEltGIse.js} +3 -3
- package/dist/{cdn/chunks/de-CUeaFJph.js → de-CieSMCUp.js} +5 -2
- package/dist/{dist-BAkGuPYm.js → dist-B6Px6GPj.js} +1 -1
- package/dist/{dist-9uhI32Q4.js → dist-BxbTVeY0.js} +1 -1
- package/dist/{dist-DWu9QWFl.js → dist-CIqhVQ1O.js} +5 -5
- package/dist/{dist-DPHqs0Yh.js → dist-CQ0fVBQ3.js} +8 -3
- package/dist/{dist-CkCVlKj_.js → dist-CRH880TV.js} +1 -1
- package/dist/{dist-ByJVlKWy.js → dist-CcQFPJMF.js} +116 -100
- package/dist/{dist-JXOq1hib.js → dist-CkPvZCld.js} +1 -1
- package/dist/{dist-IGetXrbO.js → dist-DSIgxp0v.js} +1 -1
- package/dist/{dist-DYv_Pttj.js → dist-DT1XnEnj.js} +33 -17
- package/dist/{dist-C_kAE1sC.js → dist-DX4x6mQ1.js} +3 -3
- package/dist/{dist-DFO896yT.js → dist-Dx71pluS.js} +16 -11
- package/dist/{dist-CQiAZlTt.js → dist-DyCHUyRR.js} +1 -1
- package/dist/{dist-BIYm-U9x.js → dist-iCEDH3cC.js} +1 -1
- package/dist/{dist-C5tigvDF.js → dist-nR6mxyqI.js} +1 -1
- package/dist/{cdn/chunks/en-zCYIPAL5.js → en-D0t_2Fq_.js} +5 -2
- package/dist/{es-BSiH7YkP.js → es-DwDoNuLM.js} +5 -0
- package/dist/{extensions-C0DXnYdA.js → extensions-BjvyU9Ea.js} +16 -12
- package/dist/{cdn/chunks/fr-DTVJ3det.js → fr-CSEEzv1_.js} +5 -2
- package/dist/{image-up-CQdtq8ge.js → image-up-8ktdYdaZ.js} +1 -1
- package/dist/index.d.ts +26 -0
- package/dist/{info-BUJBXoE6.js → info-CvrCgTLH.js} +1 -1
- package/dist/keys-BFPiNAIn.js +10 -0
- package/dist/{liquid.browser-DZLtv26k.js → liquid.browser-BECWFL5Z.js} +755 -717
- package/dist/{list-checks-BGHaCSD5.js → list-checks-yzGT93ZL.js} +1 -1
- package/dist/{loader-circle-C-Z6kgI6.js → loader-circle-B6euendB.js} +1 -1
- package/dist/{message-circle-CEm5qckV.js → message-circle-BMldLVcA.js} +1 -1
- package/dist/{nl-BqSquFS3.js → nl-xyk1T2mA.js} +5 -0
- package/dist/{pencil-DdwmkKLb.js → pencil-CkKkSd6N.js} +1 -1
- package/dist/{cdn/chunks/pt-BR-CMljK37h.js → pt-BR-yr6uOJgn.js} +5 -2
- package/dist/{refresh-cw-maKlg0dl.js → refresh-cw-fBPgB97G.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-GdMI8WqG.js → runtime-dom.esm-bundler-CBbDt7sw.js} +2 -2
- package/dist/{scan-line-BFgesTOY.js → scan-line-CRoEOUiK.js} +1 -1
- package/dist/{send-B70aQDrA.js → send-B9Tt2qBi.js} +1 -1
- package/dist/{shield-check-B7x5OKt5.js → shield-check-QfZkYeIo.js} +1 -1
- package/dist/{sparkles-DVlm1Ipp.js → sparkles-8UeMmZb8.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-BTTD0Je4.js → styles-C9GM-bBC.js} +913 -894
- package/dist/templatical-editor.js +96 -94
- package/dist/{text-align-start-Vay3Kvo2.js → text-align-start-Dn8uIheW.js} +1 -1
- package/dist/{trash-2-DE8CmxAG.js → trash-2-DDyvqj0E.js} +1 -1
- package/dist/{triangle-alert-Djg6IG8N.js → triangle-alert-B3PydLzl.js} +1 -1
- package/dist/{upload-BwwE0U6G.js → upload-hE8ItfyG.js} +2 -2
- package/dist/{useAliveFlag-C43EhZFY.js → useAliveFlag-AfoTE_AY.js} +1 -1
- package/dist/{useCloudI18n-DGr3b2SX.js → useCloudI18n-B2lItQ6O.js} +2 -2
- package/dist/{useEditorCore-DOrGex_t.js → useEditorCore-Ck_hBiGA.js} +986 -915
- package/dist/{useI18n-BhAejA-x.js → useI18n-C1KcdX_K.js} +2 -2
- package/dist/{useMergeTag-Ce95YIOO.js → useMergeTag-DHCwRMfH.js} +4 -4
- package/dist/{usePopoverPosition-vjKJaqJf.js → usePopoverPosition-ClnEh_Cp.js} +13 -13
- package/dist/{vue.runtime.esm-bundler-B0xoGkDv.js → vue.runtime.esm-bundler-Xpz-L9Fn.js} +27 -22
- package/dist/{x-CkD6A1iB.js → x-C4lETLDx.js} +1 -1
- package/package.json +12 -12
- package/dist/DesignReferenceSidebar-C4pTMzQE.js +0 -264
- package/dist/TplModal-DPH4vV8M.js +0 -49
- package/dist/cdn/chunks/BlockPreviewCanvas-Dc4F4HzY.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-CeKaWWO5.js.map +0 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-BjlaP69l.js +0 -223
- package/dist/cdn/chunks/TestEmailModal-CiPfOn2v.js.map +0 -1
- package/dist/cdn/chunks/TplModal-Cu4tBBnF.js +0 -50
- package/dist/cdn/chunks/TplModal-Cu4tBBnF.js.map +0 -1
- package/dist/cdn/chunks/dist-CiBEt0VR.js.map +0 -1
- package/dist/cdn/chunks/dist-CxTt8FRE.js.map +0 -1
- package/dist/cdn/chunks/keys-B5uoP9P7.js +0 -12
- package/dist/cdn/chunks/keys-B5uoP9P7.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +0 -1
- package/dist/cdn/chunks/src-BCJna-6p.js.map +0 -1
- package/dist/cdn/chunks/styles-BohMfIBd.js.map +0 -1
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js +0 -6
- package/dist/cdn/chunks/tiptap-DRKu__AX.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-B_vwuKdI.js.map +0 -1
- package/dist/keys-BVlG5Ozc.js +0 -10
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { $ as e, A as t, C as n, F as r, G as i, H as a, J as o, K as s, L as c, M as l, N as u, O as d, P as f, T as p, U as m, V as h, X as g, Y as _, Z as v, at as y, b, c as x, ct as S, f as C, g as w, h as T, it as E, k as D, l as O, m as k, nt as A, ot as j, p as M, rt as N, s as P, st as F, t as ee, u as I, v as L, x as R, y as z, z as B } from "./draggable-
|
|
2
|
-
import "./timeouts-
|
|
3
|
-
import {
|
|
4
|
-
import { _ as Re, h as ze, v as Be, y as Ve } from "./dist-
|
|
5
|
-
import { a as
|
|
6
|
-
import { A as
|
|
7
|
-
import { t as
|
|
8
|
-
import { a as
|
|
9
|
-
import { A as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import "./useCloudI18n-
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
1
|
+
import { $ as e, A as t, C as n, F as r, G as i, H as a, J as o, K as s, L as c, M as l, N as u, O as d, P as f, T as p, U as m, V as h, X as g, Y as _, Z as v, at as y, b, c as x, ct as S, f as C, g as w, h as T, it as E, k as D, l as O, m as k, nt as A, ot as j, p as M, rt as N, s as P, st as F, t as ee, u as I, v as L, x as R, y as z, z as B } from "./draggable-JcMTNF3U.js";
|
|
2
|
+
import "./timeouts-SsLMC4a3.js";
|
|
3
|
+
import { $ as te, A as ne, B as re, C as ie, D as ae, E as oe, F as V, I as se, L as ce, M as le, N as ue, O as de, P as fe, Q as pe, R as me, S as he, T as ge, _ as _e, a as ve, b as ye, d as be, f as xe, g as Se, h as Ce, i as H, j as we, k as Te, l as Ee, m as De, n as Oe, o as ke, p as Ae, r as je, s as Me, t as Ne, u as Pe, v as Fe, w as Ie, x as Le } from "./src-CZjSXPYq.js";
|
|
4
|
+
import { _ as Re, h as ze, v as Be, y as Ve } from "./dist-lZgXNk4G.js";
|
|
5
|
+
import { a as U, c as He, i as Ue, r as We } from "./dist-B8AX9np4.js";
|
|
6
|
+
import { A as Ge, B as Ke, C as qe, D as Je, E as W, F as Ye, G as Xe, H as Ze, I as Qe, L as $e, M as et, N as tt, O as nt, P as rt, S as it, T as at, U as ot, V as st, W as G, _ as ct, a as lt, b as ut, c as dt, f as ft, g as K, h as pt, j as mt, k as ht, m as gt, n as _t, o as vt, p as yt, r as bt, s as xt, u as St, v as Ct, w as wt, x as Tt, y as Et } from "./keys-BxPCfHBH.js";
|
|
7
|
+
import { t as q } from "./useI18n-DniEFeIl.js";
|
|
8
|
+
import { a as Dt, i as Ot, o as kt, r as J, t as At } from "./usePopoverPosition-C4xFJCJ2.js";
|
|
9
|
+
import { A as jt, Dt as Mt, H as Nt, Rt as Pt, Tt as Ft, X as It, _ as Lt, d as Rt, ft as zt, ht as Bt, it as Vt, o as Ht, s as Ut, tt as Wt, u as Gt, vt as Kt, wt as qt, zt as Jt } from "./icons-Cp4ZIJw-.js";
|
|
10
|
+
import { t as Yt } from "./LoadingTrack-G2tuXqCJ.js";
|
|
11
|
+
import { t as Xt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
12
|
+
import "./useCloudI18n-CjVzv11v.js";
|
|
13
|
+
import { t as Y } from "./useMergeTag-Bk9_f5cc.js";
|
|
14
|
+
import { t as Zt } from "./useAliveFlag-CseYNikC.js";
|
|
15
15
|
//#region ../core/src/editor.ts
|
|
16
|
-
function
|
|
16
|
+
function Qt(e) {
|
|
17
17
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function $t(e) {
|
|
20
20
|
let t = _({
|
|
21
|
-
content: e.content ??
|
|
21
|
+
content: e.content ?? se(e.defaultFontFamily, e.templateDefaults),
|
|
22
22
|
selectedBlockId: null,
|
|
23
23
|
viewport: "desktop",
|
|
24
24
|
darkMode: !1,
|
|
@@ -107,7 +107,7 @@ function Zt(e) {
|
|
|
107
107
|
if (s(n)) return;
|
|
108
108
|
let o = i(t.content.blocks, n);
|
|
109
109
|
if (o && o.type === "section") {
|
|
110
|
-
if (r < 0 || r >=
|
|
110
|
+
if (r < 0 || r >= Qt(o.columns)) return;
|
|
111
111
|
o.children[r] = o.children[r] || [];
|
|
112
112
|
let t = o.children[r];
|
|
113
113
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -140,7 +140,7 @@ function Zt(e) {
|
|
|
140
140
|
let u;
|
|
141
141
|
if (r) {
|
|
142
142
|
let e = i(t.content.blocks, r);
|
|
143
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
143
|
+
if (!e || e.type !== "section" || a < 0 || a >= Qt(e.columns)) return;
|
|
144
144
|
e.children[a] = e.children[a] || [], u = e.children[a];
|
|
145
145
|
} else u = t.content.blocks;
|
|
146
146
|
let [d] = c.blocks.splice(l, 1);
|
|
@@ -171,11 +171,11 @@ function Zt(e) {
|
|
|
171
171
|
}
|
|
172
172
|
//#endregion
|
|
173
173
|
//#region ../core/src/history.ts
|
|
174
|
-
var
|
|
175
|
-
function
|
|
176
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
174
|
+
var en = 50, tn = 300, nn = 1500;
|
|
175
|
+
function rn(e) {
|
|
176
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = en } = e, a = v([]), o = v([]), s = v(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
|
|
177
177
|
function f() {
|
|
178
|
-
return
|
|
178
|
+
return Fe(t.value);
|
|
179
179
|
}
|
|
180
180
|
function p(e) {
|
|
181
181
|
a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
|
|
@@ -191,21 +191,21 @@ function tn(e) {
|
|
|
191
191
|
if (l && l.blockId === e) {
|
|
192
192
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
193
193
|
l = null;
|
|
194
|
-
},
|
|
194
|
+
}, tn);
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
197
|
h(), p(f()), o.value = [], l = {
|
|
198
198
|
blockId: e,
|
|
199
199
|
timeoutId: setTimeout(() => {
|
|
200
200
|
l = null;
|
|
201
|
-
},
|
|
201
|
+
}, tn)
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
function y() {
|
|
206
206
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
207
207
|
s.value = !1, c = null;
|
|
208
|
-
},
|
|
208
|
+
}, nn);
|
|
209
209
|
}
|
|
210
210
|
function b() {
|
|
211
211
|
if (a.value.length === 0) return;
|
|
@@ -239,7 +239,7 @@ function tn(e) {
|
|
|
239
239
|
}
|
|
240
240
|
//#endregion
|
|
241
241
|
//#region ../core/src/block-actions.ts
|
|
242
|
-
function
|
|
242
|
+
function an(e) {
|
|
243
243
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
244
244
|
...e,
|
|
245
245
|
id: V(),
|
|
@@ -255,17 +255,17 @@ function nn(e) {
|
|
|
255
255
|
id: V()
|
|
256
256
|
})));
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function on(e) {
|
|
259
259
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
260
260
|
function o(n, r, a) {
|
|
261
|
-
let o =
|
|
261
|
+
let o = ye(n, e.blockDefaults);
|
|
262
262
|
return t(o, r, a), i(o.id), o;
|
|
263
263
|
}
|
|
264
264
|
function s(e, n, r) {
|
|
265
265
|
let o = JSON.parse(JSON.stringify(e));
|
|
266
|
-
if (o.id = V(),
|
|
266
|
+
if (o.id = V(), an(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
267
267
|
let t = JSON.parse(JSON.stringify(e));
|
|
268
|
-
return t.id = V(),
|
|
268
|
+
return t.id = V(), an(t), t;
|
|
269
269
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
270
270
|
else {
|
|
271
271
|
let i = a?.(e.id) ?? null;
|
|
@@ -288,7 +288,7 @@ function rn(e) {
|
|
|
288
288
|
}
|
|
289
289
|
//#endregion
|
|
290
290
|
//#region ../core/src/auto-save.ts
|
|
291
|
-
function
|
|
291
|
+
function sn(e) {
|
|
292
292
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
293
293
|
function c() {
|
|
294
294
|
return typeof a == "function" ? a() : a;
|
|
@@ -326,7 +326,7 @@ function an(e) {
|
|
|
326
326
|
}
|
|
327
327
|
//#endregion
|
|
328
328
|
//#region ../core/src/condition-preview.ts
|
|
329
|
-
function
|
|
329
|
+
function cn(e) {
|
|
330
330
|
let t = _(/* @__PURE__ */ new Set()), n = m(() => t.size > 0);
|
|
331
331
|
function r(e) {
|
|
332
332
|
return t.has(e);
|
|
@@ -346,7 +346,7 @@ function on(e) {
|
|
|
346
346
|
}
|
|
347
347
|
//#endregion
|
|
348
348
|
//#region ../core/src/data-source-fetch.ts
|
|
349
|
-
function
|
|
349
|
+
function ln(e) {
|
|
350
350
|
let t = v(!1), n = v(!1), r = m(() => !!e.definition.value?.dataSource), i = m(() => r.value && !e.block.value.dataSourceFetched);
|
|
351
351
|
async function a() {
|
|
352
352
|
let r = e.definition.value;
|
|
@@ -378,7 +378,7 @@ function sn(e) {
|
|
|
378
378
|
}
|
|
379
379
|
//#endregion
|
|
380
380
|
//#region ../core/src/history-interceptor.ts
|
|
381
|
-
function
|
|
381
|
+
function un(e, t) {
|
|
382
382
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
383
383
|
e.addBlock = (r, i, a, o) => {
|
|
384
384
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -394,7 +394,7 @@ function cn(e, t) {
|
|
|
394
394
|
}
|
|
395
395
|
//#endregion
|
|
396
396
|
//#region ../core/src/saved-blocks.ts
|
|
397
|
-
function
|
|
397
|
+
function dn(e) {
|
|
398
398
|
let { provider: t } = e, n = v([]), r = v(!1), i = C(() => {
|
|
399
399
|
let e = /* @__PURE__ */ new Set();
|
|
400
400
|
for (let t of n.value) {
|
|
@@ -410,7 +410,7 @@ function ln(e) {
|
|
|
410
410
|
return s.value && e.canDelete !== !1;
|
|
411
411
|
}
|
|
412
412
|
function u(e, t) {
|
|
413
|
-
throw new
|
|
413
|
+
throw new Ne(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
|
|
414
414
|
}
|
|
415
415
|
async function d(i) {
|
|
416
416
|
r.value = !0;
|
|
@@ -479,9 +479,9 @@ function ln(e) {
|
|
|
479
479
|
}
|
|
480
480
|
//#endregion
|
|
481
481
|
//#region ../core/src/saved-blocks-local.ts
|
|
482
|
-
var
|
|
483
|
-
function
|
|
484
|
-
let t = e.key ??
|
|
482
|
+
var fn = "templatical:saved-blocks";
|
|
483
|
+
function pn(e = {}) {
|
|
484
|
+
let t = e.key ?? fn;
|
|
485
485
|
function n() {
|
|
486
486
|
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.");
|
|
487
487
|
return localStorage;
|
|
@@ -534,26 +534,86 @@ function dn(e = {}) {
|
|
|
534
534
|
}
|
|
535
535
|
//#endregion
|
|
536
536
|
//#region src/utils/activeEditorTracker.ts
|
|
537
|
-
var
|
|
538
|
-
function
|
|
539
|
-
let e = ++
|
|
540
|
-
return
|
|
537
|
+
var X = /* @__PURE__ */ new Set(), Z = 0, mn = 0;
|
|
538
|
+
function hn() {
|
|
539
|
+
let e = ++mn;
|
|
540
|
+
return X.add(e), Z === 0 && (Z = e), {
|
|
541
541
|
id: e,
|
|
542
|
-
isActive: () =>
|
|
542
|
+
isActive: () => X.size <= 1 || Z === e,
|
|
543
543
|
claim: () => {
|
|
544
|
-
|
|
544
|
+
Z = e;
|
|
545
545
|
},
|
|
546
546
|
dispose: () => {
|
|
547
|
-
if (
|
|
548
|
-
let e = Array.from(
|
|
549
|
-
|
|
547
|
+
if (X.delete(e), Z === e) {
|
|
548
|
+
let e = Array.from(X);
|
|
549
|
+
Z = e[e.length - 1] ?? 0;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
//#endregion
|
|
555
|
+
//#region src/composables/usePreviewResolution.ts
|
|
556
|
+
var gn = 500;
|
|
557
|
+
function _n(e) {
|
|
558
|
+
let t = typeof e.resolvePreview == "function", n = v(null), r = v(!1), i = v(!1), a = 0, s = null;
|
|
559
|
+
function c() {
|
|
560
|
+
s !== null && (clearTimeout(s), s = null);
|
|
561
|
+
}
|
|
562
|
+
async function l() {
|
|
563
|
+
let t = e.resolvePreview;
|
|
564
|
+
if (!t) return;
|
|
565
|
+
let o = ++a;
|
|
566
|
+
r.value = !0;
|
|
567
|
+
let s = {
|
|
568
|
+
content: Fe(e.getContent()),
|
|
569
|
+
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
570
|
+
};
|
|
571
|
+
try {
|
|
572
|
+
let e = await t(s);
|
|
573
|
+
if (o !== a) return;
|
|
574
|
+
if (!Oe(e)) {
|
|
575
|
+
i.value = !0;
|
|
576
|
+
return;
|
|
550
577
|
}
|
|
578
|
+
n.value = e, i.value = !1;
|
|
579
|
+
} catch {
|
|
580
|
+
if (o !== a) return;
|
|
581
|
+
i.value = !0;
|
|
582
|
+
} finally {
|
|
583
|
+
o === a && (r.value = !1);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
function u() {
|
|
587
|
+
if (t) {
|
|
588
|
+
if (c(), n.value === null) {
|
|
589
|
+
l();
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
s = setTimeout(() => {
|
|
593
|
+
s = null, l();
|
|
594
|
+
}, gn);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
return B(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
598
|
+
if (!e) {
|
|
599
|
+
c(), a++, r.value = !1, n.value = null, i.value = !1;
|
|
600
|
+
return;
|
|
551
601
|
}
|
|
602
|
+
u();
|
|
603
|
+
}, { immediate: !0 }), o(() => {
|
|
604
|
+
c(), a++;
|
|
605
|
+
}), {
|
|
606
|
+
isConfigured: t,
|
|
607
|
+
content: C(() => n.value ?? e.getContent()),
|
|
608
|
+
isResolving: r,
|
|
609
|
+
isInitialResolve: C(() => r.value && n.value === null),
|
|
610
|
+
hasFailed: i,
|
|
611
|
+
supersedesSamples: C(() => t)
|
|
552
612
|
};
|
|
553
613
|
}
|
|
554
614
|
//#endregion
|
|
555
615
|
//#region src/composables/useImageUrlResolver.ts
|
|
556
|
-
function
|
|
616
|
+
function vn(e) {
|
|
557
617
|
let t = _(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
558
618
|
function r(e) {
|
|
559
619
|
return t.get(e);
|
|
@@ -586,8 +646,8 @@ function mn(e) {
|
|
|
586
646
|
lookup: a
|
|
587
647
|
};
|
|
588
648
|
}
|
|
589
|
-
function
|
|
590
|
-
let t = p(
|
|
649
|
+
function Q(e) {
|
|
650
|
+
let t = p(Tt, null), n = C(e);
|
|
591
651
|
if (!t) return n;
|
|
592
652
|
let r;
|
|
593
653
|
function a() {
|
|
@@ -616,7 +676,7 @@ function X(e) {
|
|
|
616
676
|
}
|
|
617
677
|
//#endregion
|
|
618
678
|
//#region src/composables/useMergeTagPicker.ts
|
|
619
|
-
function
|
|
679
|
+
function yn() {
|
|
620
680
|
let e = v(!1), t = v([]), n = null;
|
|
621
681
|
function r(r) {
|
|
622
682
|
if (n) {
|
|
@@ -646,7 +706,7 @@ function hn() {
|
|
|
646
706
|
}
|
|
647
707
|
//#endregion
|
|
648
708
|
//#region src/composables/useLogicTagPicker.ts
|
|
649
|
-
function
|
|
709
|
+
function bn() {
|
|
650
710
|
let e = v(!1), t = v([]), n = v([]), r = null;
|
|
651
711
|
function a(i, a) {
|
|
652
712
|
if (r) {
|
|
@@ -677,15 +737,15 @@ function gn() {
|
|
|
677
737
|
}
|
|
678
738
|
//#endregion
|
|
679
739
|
//#region src/composables/useTemplateLint.ts
|
|
680
|
-
function
|
|
740
|
+
function xn(e) {
|
|
681
741
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
682
742
|
}
|
|
683
|
-
function
|
|
684
|
-
let n = v([]), r = v(!1), i = v(!1), a = e(null), o =
|
|
743
|
+
function Sn(t) {
|
|
744
|
+
let n = v([]), r = v(!1), i = v(!1), a = e(null), o = xn(t.options), s = null, c = !1;
|
|
685
745
|
o || l();
|
|
686
746
|
async function l() {
|
|
687
747
|
try {
|
|
688
|
-
let e = await import("./src-
|
|
748
|
+
let e = await import("./src-B8W42vT-.js");
|
|
689
749
|
if (c) return;
|
|
690
750
|
a.value = { lintTemplate: e.lintTemplate }, r.value = !0, u(), s = Ve(t.content, u, {
|
|
691
751
|
debounce: t.debounce ?? 500,
|
|
@@ -722,17 +782,17 @@ function vn(t) {
|
|
|
722
782
|
}
|
|
723
783
|
//#endregion
|
|
724
784
|
//#region src/utils/blockTypeLabels.ts
|
|
725
|
-
function
|
|
785
|
+
function Cn(e, t) {
|
|
726
786
|
return t.blocks[e] ?? e;
|
|
727
787
|
}
|
|
728
|
-
function
|
|
729
|
-
if (e.type !== "custom") return
|
|
788
|
+
function wn(e, t, n = []) {
|
|
789
|
+
if (e.type !== "custom") return Cn(e.type, t);
|
|
730
790
|
let { customType: r } = e;
|
|
731
791
|
return n.find((e) => e.type === r)?.name ?? r;
|
|
732
792
|
}
|
|
733
793
|
//#endregion
|
|
734
794
|
//#region src/composables/useKeyboardReorder.ts
|
|
735
|
-
function
|
|
795
|
+
function Tn(e, t, n = []) {
|
|
736
796
|
let r = v(null), i = v(""), a = null;
|
|
737
797
|
function o(t) {
|
|
738
798
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -759,7 +819,7 @@ function xn(e, t, n = []) {
|
|
|
759
819
|
let i = o(r);
|
|
760
820
|
if (!i) return "";
|
|
761
821
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
762
|
-
return a ?
|
|
822
|
+
return a ? wn(a, t.t, n) : "";
|
|
763
823
|
}
|
|
764
824
|
function c(t, n) {
|
|
765
825
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -828,13 +888,13 @@ function xn(e, t, n = []) {
|
|
|
828
888
|
}
|
|
829
889
|
//#endregion
|
|
830
890
|
//#region src/composables/useUiTheme.ts
|
|
831
|
-
function
|
|
832
|
-
let t =
|
|
891
|
+
function En(e) {
|
|
892
|
+
let t = He("(prefers-color-scheme: dark)");
|
|
833
893
|
return { resolvedTheme: C(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
834
894
|
}
|
|
835
895
|
//#endregion
|
|
836
896
|
//#region src/composables/useThemeStyles.ts
|
|
837
|
-
var
|
|
897
|
+
var Dn = {
|
|
838
898
|
bg: "--tpl-bg",
|
|
839
899
|
bgElevated: "--tpl-bg-elevated",
|
|
840
900
|
bgHover: "--tpl-bg-hover",
|
|
@@ -858,10 +918,10 @@ var Cn = {
|
|
|
858
918
|
dangerLight: "--tpl-danger-light",
|
|
859
919
|
canvasBg: "--tpl-canvas-bg"
|
|
860
920
|
};
|
|
861
|
-
function
|
|
921
|
+
function On({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
862
922
|
return { themeStyles: C(() => {
|
|
863
923
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
864
|
-
if (a) for (let [e, t] of Object.entries(
|
|
924
|
+
if (a) for (let [e, t] of Object.entries(Dn)) {
|
|
865
925
|
let n = a[e];
|
|
866
926
|
n && (r[t] = n);
|
|
867
927
|
}
|
|
@@ -870,27 +930,27 @@ function wn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
870
930
|
}
|
|
871
931
|
//#endregion
|
|
872
932
|
//#region src/utils/logger.ts
|
|
873
|
-
var
|
|
874
|
-
function
|
|
933
|
+
var kn = "[Templatical]";
|
|
934
|
+
function An() {
|
|
875
935
|
return typeof process < "u" && !0;
|
|
876
936
|
}
|
|
877
|
-
var
|
|
937
|
+
var $ = {
|
|
878
938
|
warn(...e) {
|
|
879
|
-
console.warn(
|
|
939
|
+
console.warn(kn, ...e);
|
|
880
940
|
},
|
|
881
941
|
error(...e) {
|
|
882
|
-
console.error(
|
|
942
|
+
console.error(kn, ...e);
|
|
883
943
|
},
|
|
884
944
|
debug(...e) {
|
|
885
|
-
|
|
945
|
+
An() || console.debug(kn, ...e);
|
|
886
946
|
},
|
|
887
947
|
info(...e) {
|
|
888
|
-
|
|
948
|
+
An() || console.info(kn, ...e);
|
|
889
949
|
}
|
|
890
950
|
};
|
|
891
951
|
//#endregion
|
|
892
952
|
//#region src/composables/useBlockRegistry.ts
|
|
893
|
-
function
|
|
953
|
+
function jn() {
|
|
894
954
|
let t = e(/* @__PURE__ */ new Map());
|
|
895
955
|
function n(e, n) {
|
|
896
956
|
t.value.set(e, n), N(t);
|
|
@@ -899,7 +959,7 @@ function En() {
|
|
|
899
959
|
let r = `custom:${e.type}`;
|
|
900
960
|
t.value.set(r, {
|
|
901
961
|
component: n,
|
|
902
|
-
createBlock: () =>
|
|
962
|
+
createBlock: () => ie(e),
|
|
903
963
|
definition: e
|
|
904
964
|
}), N(t);
|
|
905
965
|
}
|
|
@@ -924,13 +984,13 @@ function En() {
|
|
|
924
984
|
let t = o(e.customType);
|
|
925
985
|
if (!t) return s("Block definition not found");
|
|
926
986
|
try {
|
|
927
|
-
let { Liquid: n } = await import("./liquid.browser-
|
|
987
|
+
let { Liquid: n } = await import("./liquid.browser-CZaQe87t.js");
|
|
928
988
|
return await new n({
|
|
929
989
|
strictVariables: !1,
|
|
930
990
|
strictFilters: !1
|
|
931
991
|
}).parseAndRender(t.template, e.fieldValues);
|
|
932
992
|
} catch (t) {
|
|
933
|
-
return
|
|
993
|
+
return $.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
934
994
|
}
|
|
935
995
|
}
|
|
936
996
|
function l(e) {
|
|
@@ -948,9 +1008,9 @@ function En() {
|
|
|
948
1008
|
}
|
|
949
1009
|
//#endregion
|
|
950
1010
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
951
|
-
function
|
|
1011
|
+
function Mn(e, t) {
|
|
952
1012
|
return C(() => {
|
|
953
|
-
let n =
|
|
1013
|
+
let n = Nn(e.value.blocks);
|
|
954
1014
|
if (n.size === 0) return [];
|
|
955
1015
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
956
1016
|
for (let e of n) {
|
|
@@ -962,81 +1022,81 @@ function Dn(e, t) {
|
|
|
962
1022
|
return i;
|
|
963
1023
|
});
|
|
964
1024
|
}
|
|
965
|
-
function
|
|
1025
|
+
function Nn(e) {
|
|
966
1026
|
let t = /* @__PURE__ */ new Set();
|
|
967
|
-
return
|
|
1027
|
+
return Pn(e, t), t;
|
|
968
1028
|
}
|
|
969
|
-
function
|
|
1029
|
+
function Pn(e, t) {
|
|
970
1030
|
for (let n of e) {
|
|
971
|
-
if (
|
|
1031
|
+
if (re(n)) {
|
|
972
1032
|
t.add(n.customType);
|
|
973
1033
|
continue;
|
|
974
1034
|
}
|
|
975
1035
|
if (n.type === "section") {
|
|
976
1036
|
let e = n.children;
|
|
977
1037
|
if (!e) continue;
|
|
978
|
-
for (let n of e)
|
|
1038
|
+
for (let n of e) Pn(n, t);
|
|
979
1039
|
}
|
|
980
1040
|
}
|
|
981
1041
|
}
|
|
982
1042
|
//#endregion
|
|
983
1043
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
984
|
-
var
|
|
1044
|
+
var Fn = [
|
|
985
1045
|
{
|
|
986
1046
|
type: "section",
|
|
987
|
-
createBlock:
|
|
1047
|
+
createBlock: Te
|
|
988
1048
|
},
|
|
989
1049
|
{
|
|
990
1050
|
type: "title",
|
|
991
|
-
createBlock:
|
|
1051
|
+
createBlock: ue
|
|
992
1052
|
},
|
|
993
1053
|
{
|
|
994
1054
|
type: "paragraph",
|
|
995
|
-
createBlock:
|
|
1055
|
+
createBlock: de
|
|
996
1056
|
},
|
|
997
1057
|
{
|
|
998
1058
|
type: "image",
|
|
999
|
-
createBlock:
|
|
1059
|
+
createBlock: oe
|
|
1000
1060
|
},
|
|
1001
1061
|
{
|
|
1002
1062
|
type: "button",
|
|
1003
|
-
createBlock:
|
|
1063
|
+
createBlock: Le
|
|
1004
1064
|
},
|
|
1005
1065
|
{
|
|
1006
1066
|
type: "divider",
|
|
1007
|
-
createBlock:
|
|
1067
|
+
createBlock: Ie
|
|
1008
1068
|
},
|
|
1009
1069
|
{
|
|
1010
1070
|
type: "video",
|
|
1011
|
-
createBlock:
|
|
1071
|
+
createBlock: fe
|
|
1012
1072
|
},
|
|
1013
1073
|
{
|
|
1014
1074
|
type: "social",
|
|
1015
|
-
createBlock:
|
|
1075
|
+
createBlock: ne
|
|
1016
1076
|
},
|
|
1017
1077
|
{
|
|
1018
1078
|
type: "menu",
|
|
1019
|
-
createBlock:
|
|
1079
|
+
createBlock: ae
|
|
1020
1080
|
},
|
|
1021
1081
|
{
|
|
1022
1082
|
type: "table",
|
|
1023
|
-
createBlock:
|
|
1083
|
+
createBlock: le
|
|
1024
1084
|
},
|
|
1025
1085
|
{
|
|
1026
1086
|
type: "spacer",
|
|
1027
|
-
createBlock:
|
|
1087
|
+
createBlock: we
|
|
1028
1088
|
},
|
|
1029
1089
|
{
|
|
1030
1090
|
type: "html",
|
|
1031
|
-
createBlock:
|
|
1091
|
+
createBlock: ge
|
|
1032
1092
|
},
|
|
1033
1093
|
{
|
|
1034
1094
|
type: "countdown",
|
|
1035
|
-
createBlock:
|
|
1095
|
+
createBlock: he
|
|
1036
1096
|
}
|
|
1037
1097
|
];
|
|
1038
|
-
function
|
|
1039
|
-
for (let n of
|
|
1098
|
+
function In(e, t) {
|
|
1099
|
+
for (let n of Fn) {
|
|
1040
1100
|
let r = t[n.type];
|
|
1041
1101
|
r && e.registerBuiltIn(n.type, {
|
|
1042
1102
|
component: r,
|
|
@@ -1046,34 +1106,34 @@ function jn(e, t) {
|
|
|
1046
1106
|
}
|
|
1047
1107
|
//#endregion
|
|
1048
1108
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
1049
|
-
function
|
|
1109
|
+
function Ln(e) {
|
|
1050
1110
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1051
1111
|
}
|
|
1052
1112
|
//#endregion
|
|
1053
1113
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
1054
|
-
function
|
|
1114
|
+
function Rn(e) {
|
|
1055
1115
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1056
1116
|
}
|
|
1057
|
-
function
|
|
1058
|
-
let r = new Set(e.map((e) =>
|
|
1059
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1117
|
+
function zn(e, t, n) {
|
|
1118
|
+
let r = new Set(e.map((e) => J(e))), i = [], a = (e, t) => {
|
|
1119
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(J(o)) && i.push(`${t}.${n}: ${o}`) : Rn(o) && a(o, `${t}.${n}`);
|
|
1060
1120
|
}, o = t;
|
|
1061
|
-
for (let [e, t] of Object.entries(
|
|
1121
|
+
for (let [e, t] of Object.entries(ce)) {
|
|
1062
1122
|
let n = o?.[e];
|
|
1063
1123
|
a({
|
|
1064
1124
|
...t,
|
|
1065
|
-
...
|
|
1125
|
+
...Rn(n) ? n : {}
|
|
1066
1126
|
}, e);
|
|
1067
1127
|
}
|
|
1068
1128
|
return a({
|
|
1069
|
-
...
|
|
1129
|
+
...me,
|
|
1070
1130
|
...n ?? {}
|
|
1071
1131
|
}, "template"), i;
|
|
1072
1132
|
}
|
|
1073
1133
|
//#endregion
|
|
1074
1134
|
//#region src/utils/resolveFieldColors.ts
|
|
1075
|
-
function
|
|
1076
|
-
let n =
|
|
1135
|
+
function Bn(e, t) {
|
|
1136
|
+
let n = kt({ presets: e.presets }, Dt), r = n.presets.length === 0;
|
|
1077
1137
|
return {
|
|
1078
1138
|
presets: r ? t.presets : n.presets,
|
|
1079
1139
|
allowCustom: t.allowCustom === !1 ? !1 : e.allowCustom ?? t.allowCustom,
|
|
@@ -1085,9 +1145,9 @@ function Fn(e, t) {
|
|
|
1085
1145
|
}
|
|
1086
1146
|
//#endregion
|
|
1087
1147
|
//#region src/utils/collectColorFieldIssues.ts
|
|
1088
|
-
function
|
|
1148
|
+
function Vn(e, t) {
|
|
1089
1149
|
let n = [], r = (r, i) => {
|
|
1090
|
-
let a =
|
|
1150
|
+
let a = Bn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1091
1151
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1092
1152
|
id: s("invalid-presets"),
|
|
1093
1153
|
message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
|
|
@@ -1098,8 +1158,8 @@ function In(e, t) {
|
|
|
1098
1158
|
id: s("allow-custom-ignored"),
|
|
1099
1159
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1100
1160
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1101
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1102
|
-
e !== "" && !t.has(
|
|
1161
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => J(e)));
|
|
1162
|
+
e !== "" && !t.has(J(e)) && n.push({
|
|
1103
1163
|
id: s("off-palette-default"),
|
|
1104
1164
|
message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
|
|
1105
1165
|
});
|
|
@@ -1111,7 +1171,7 @@ function In(e, t) {
|
|
|
1111
1171
|
}
|
|
1112
1172
|
//#endregion
|
|
1113
1173
|
//#region src/utils/keyboardShortcuts.ts
|
|
1114
|
-
function
|
|
1174
|
+
function Hn(e) {
|
|
1115
1175
|
for (let t of e.composedPath()) {
|
|
1116
1176
|
if (!(t instanceof HTMLElement)) continue;
|
|
1117
1177
|
if (t.isContentEditable) return !0;
|
|
@@ -1120,18 +1180,18 @@ function Ln(e) {
|
|
|
1120
1180
|
}
|
|
1121
1181
|
return !1;
|
|
1122
1182
|
}
|
|
1123
|
-
function
|
|
1183
|
+
function Un(e, t) {
|
|
1124
1184
|
let n = e.metaKey || e.ctrlKey;
|
|
1125
1185
|
if (n && e.key.toLowerCase() === "s") {
|
|
1126
1186
|
e.preventDefault(), t.onSave?.();
|
|
1127
1187
|
return;
|
|
1128
1188
|
}
|
|
1129
1189
|
if (n && e.key.toLowerCase() === "z") {
|
|
1130
|
-
if (
|
|
1190
|
+
if (Hn(e)) return;
|
|
1131
1191
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1132
1192
|
return;
|
|
1133
1193
|
}
|
|
1134
|
-
if (t.isPicking?.() && !
|
|
1194
|
+
if (t.isPicking?.() && !Hn(e)) {
|
|
1135
1195
|
if (e.key === "Escape") {
|
|
1136
1196
|
e.preventDefault(), t.onCancelPick?.();
|
|
1137
1197
|
return;
|
|
@@ -1149,11 +1209,11 @@ function Rn(e, t) {
|
|
|
1149
1209
|
t.selectBlock(null);
|
|
1150
1210
|
return;
|
|
1151
1211
|
}
|
|
1152
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1212
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Hn(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1153
1213
|
}
|
|
1154
1214
|
//#endregion
|
|
1155
1215
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
1156
|
-
function
|
|
1216
|
+
function Wn(e, t, n, r = !1) {
|
|
1157
1217
|
if (!e) return [];
|
|
1158
1218
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
1159
1219
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -1162,18 +1222,18 @@ function zn(e, t, n, r = !1) {
|
|
|
1162
1222
|
value: e.slice(o, s.index)
|
|
1163
1223
|
});
|
|
1164
1224
|
let i = s[0];
|
|
1165
|
-
if (
|
|
1166
|
-
let e = r ?
|
|
1225
|
+
if (xe(i, n)) {
|
|
1226
|
+
let e = r ? Me(i, t) : void 0;
|
|
1167
1227
|
a.push(e === void 0 ? {
|
|
1168
1228
|
type: "tag",
|
|
1169
|
-
value:
|
|
1229
|
+
value: ke(i, t)
|
|
1170
1230
|
} : {
|
|
1171
1231
|
type: "text",
|
|
1172
1232
|
value: e
|
|
1173
1233
|
});
|
|
1174
|
-
} else
|
|
1234
|
+
} else be(i, n) ? a.push({
|
|
1175
1235
|
type: "tag",
|
|
1176
|
-
value:
|
|
1236
|
+
value: ve(i, n)
|
|
1177
1237
|
}) : a.push({
|
|
1178
1238
|
type: "text",
|
|
1179
1239
|
value: i
|
|
@@ -1187,20 +1247,20 @@ function zn(e, t, n, r = !1) {
|
|
|
1187
1247
|
}
|
|
1188
1248
|
//#endregion
|
|
1189
1249
|
//#region src/components/MergeTagPreviewText.vue
|
|
1190
|
-
var
|
|
1250
|
+
var Gn = R({
|
|
1191
1251
|
name: "MergeTagPreviewText",
|
|
1192
1252
|
props: { text: {
|
|
1193
1253
|
type: String,
|
|
1194
1254
|
required: !0
|
|
1195
1255
|
} },
|
|
1196
1256
|
setup(e) {
|
|
1197
|
-
let t = p(
|
|
1257
|
+
let t = p(W, []), r = p(Ge, je.liquid), i = p(G, null), a = C(() => Wn(e.text, t, r, i?.value ?? !1));
|
|
1198
1258
|
return () => a.value.map((e, t) => e.type === "tag" ? n("span", {
|
|
1199
1259
|
key: t,
|
|
1200
1260
|
class: "tpl-merge-tag-label"
|
|
1201
1261
|
}, e.value) : e.value);
|
|
1202
1262
|
}
|
|
1203
|
-
}),
|
|
1263
|
+
}), Kn = { class: "tpl:text-center" }, qn = ["href"], Jn = /* @__PURE__ */ R({
|
|
1204
1264
|
__name: "ButtonBlock",
|
|
1205
1265
|
props: {
|
|
1206
1266
|
block: {},
|
|
@@ -1221,18 +1281,18 @@ var $ = R({
|
|
|
1221
1281
|
};
|
|
1222
1282
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
1223
1283
|
});
|
|
1224
|
-
return (t, r) => (l(), w("div",
|
|
1284
|
+
return (t, r) => (l(), w("div", Kn, [M("a", {
|
|
1225
1285
|
href: e.block.url || "#",
|
|
1226
1286
|
style: F(n.value),
|
|
1227
1287
|
class: "tpl:cursor-default",
|
|
1228
1288
|
onClick: r[0] ||= O(() => {}, ["prevent"])
|
|
1229
|
-
}, [z(
|
|
1289
|
+
}, [z(Gn, { text: e.block.text }, null, 8, ["text"])], 12, qn)]));
|
|
1230
1290
|
}
|
|
1231
|
-
}),
|
|
1291
|
+
}), Yn = ["innerHTML"], Xn = [
|
|
1232
1292
|
"src",
|
|
1233
1293
|
"width",
|
|
1234
1294
|
"height"
|
|
1235
|
-
],
|
|
1295
|
+
], Zn = /* @__PURE__ */ R({
|
|
1236
1296
|
__name: "CustomBlockIcon",
|
|
1237
1297
|
props: {
|
|
1238
1298
|
icon: {},
|
|
@@ -1248,14 +1308,14 @@ var $ = R({
|
|
|
1248
1308
|
height: `${n.value}px`
|
|
1249
1309
|
}),
|
|
1250
1310
|
innerHTML: e.icon
|
|
1251
|
-
}, null, 12,
|
|
1311
|
+
}, null, 12, Yn)) : i.value ? (l(), w("img", {
|
|
1252
1312
|
key: 1,
|
|
1253
1313
|
src: e.icon,
|
|
1254
1314
|
width: n.value,
|
|
1255
1315
|
height: n.value,
|
|
1256
1316
|
class: "tpl:inline-block",
|
|
1257
1317
|
alt: ""
|
|
1258
|
-
}, null, 8,
|
|
1318
|
+
}, null, 8, Xn)) : (l(), k(E(Pt), {
|
|
1259
1319
|
key: 2,
|
|
1260
1320
|
size: n.value,
|
|
1261
1321
|
"stroke-width": 1.5
|
|
@@ -1264,16 +1324,16 @@ var $ = R({
|
|
|
1264
1324
|
});
|
|
1265
1325
|
//#endregion
|
|
1266
1326
|
//#region src/composables/useEditorRoot.ts
|
|
1267
|
-
function
|
|
1268
|
-
return p(
|
|
1327
|
+
function Qn() {
|
|
1328
|
+
return p(ct, document) ?? document;
|
|
1269
1329
|
}
|
|
1270
1330
|
//#endregion
|
|
1271
1331
|
//#region src/composables/useFocusTrap.ts
|
|
1272
|
-
var
|
|
1273
|
-
function
|
|
1274
|
-
let n =
|
|
1332
|
+
var $n = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1333
|
+
function er(e, t) {
|
|
1334
|
+
let n = Qn(), r = null, i = null, a = null;
|
|
1275
1335
|
function s() {
|
|
1276
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1336
|
+
return e.value ? Array.from(e.value.querySelectorAll($n)).filter((e) => e.offsetParent !== null) : [];
|
|
1277
1337
|
}
|
|
1278
1338
|
function c(e) {
|
|
1279
1339
|
if (e.key !== "Tab") return;
|
|
@@ -1288,7 +1348,7 @@ function Jn(e, t) {
|
|
|
1288
1348
|
a = null;
|
|
1289
1349
|
let t = s();
|
|
1290
1350
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1291
|
-
}), i =
|
|
1351
|
+
}), i = U(e, "keydown", c);
|
|
1292
1352
|
}
|
|
1293
1353
|
function u(e = {}) {
|
|
1294
1354
|
let t = e.restoreFocus !== !1;
|
|
@@ -1303,7 +1363,7 @@ function Jn(e, t) {
|
|
|
1303
1363
|
}
|
|
1304
1364
|
//#endregion
|
|
1305
1365
|
//#region src/composables/useEmoji.ts
|
|
1306
|
-
function
|
|
1366
|
+
function tr() {
|
|
1307
1367
|
let [t, n] = Be(!1), r = e([]), i = !1;
|
|
1308
1368
|
o(() => {
|
|
1309
1369
|
i = !0;
|
|
@@ -1329,7 +1389,7 @@ function Yn() {
|
|
|
1329
1389
|
}
|
|
1330
1390
|
//#endregion
|
|
1331
1391
|
//#region src/composables/useDragDrop.ts
|
|
1332
|
-
function
|
|
1392
|
+
function nr(e) {
|
|
1333
1393
|
let { onBlockMove: t, onBlockAdd: n } = e, r = v(!1), i = v(null), a = v(null);
|
|
1334
1394
|
function o(e) {
|
|
1335
1395
|
r.value = !0, i.value = e;
|
|
@@ -1379,7 +1439,7 @@ function Xn(e) {
|
|
|
1379
1439
|
}
|
|
1380
1440
|
//#endregion
|
|
1381
1441
|
//#region src/composables/useFonts.ts
|
|
1382
|
-
var
|
|
1442
|
+
var rr = [
|
|
1383
1443
|
{
|
|
1384
1444
|
value: "Arial",
|
|
1385
1445
|
label: "Arial"
|
|
@@ -1408,7 +1468,7 @@ var Zn = [
|
|
|
1408
1468
|
value: "Courier New",
|
|
1409
1469
|
label: "Courier New"
|
|
1410
1470
|
}
|
|
1411
|
-
],
|
|
1471
|
+
], ir = {
|
|
1412
1472
|
arial: "Arial, sans-serif",
|
|
1413
1473
|
helvetica: "Helvetica, sans-serif",
|
|
1414
1474
|
georgia: "Georgia, serif",
|
|
@@ -1416,23 +1476,23 @@ var Zn = [
|
|
|
1416
1476
|
verdana: "Verdana, sans-serif",
|
|
1417
1477
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1418
1478
|
"courier new": "'Courier New', monospace"
|
|
1419
|
-
},
|
|
1420
|
-
function
|
|
1421
|
-
if (e === void 0 || e === !0) return [...
|
|
1479
|
+
}, ar = "Arial, sans-serif";
|
|
1480
|
+
function or(e) {
|
|
1481
|
+
if (e === void 0 || e === !0) return [...rr];
|
|
1422
1482
|
if (e === !1) return [];
|
|
1423
1483
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1424
1484
|
for (let i of e) {
|
|
1425
|
-
let e = i.toLowerCase(), a =
|
|
1485
|
+
let e = i.toLowerCase(), a = rr.find((t) => t.value.toLowerCase() === e);
|
|
1426
1486
|
if (!a) {
|
|
1427
|
-
r.has(e) || (r.add(e),
|
|
1487
|
+
r.has(e) || (r.add(e), $.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${rr.map((e) => e.value).join(", ")}.`));
|
|
1428
1488
|
continue;
|
|
1429
1489
|
}
|
|
1430
1490
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
1431
1491
|
}
|
|
1432
1492
|
return t;
|
|
1433
1493
|
}
|
|
1434
|
-
function
|
|
1435
|
-
let t = v(e?.customFonts ?? []), n = v(!0), r = v(!1), a =
|
|
1494
|
+
function sr(e) {
|
|
1495
|
+
let t = v(e?.customFonts ?? []), n = v(!0), r = v(!1), a = or(e?.builtIns), s = C(() => e?.defaultFallback ?? ar);
|
|
1436
1496
|
function c(e) {
|
|
1437
1497
|
n.value = e;
|
|
1438
1498
|
}
|
|
@@ -1449,26 +1509,26 @@ function tr(e) {
|
|
|
1449
1509
|
function u(e) {
|
|
1450
1510
|
return l.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1451
1511
|
}
|
|
1452
|
-
let d = e?.defaultFont ??
|
|
1453
|
-
u(d) ||
|
|
1512
|
+
let d = e?.defaultFont ?? ar.split(",")[0].trim();
|
|
1513
|
+
u(d) || $.warn(`config.fonts: new templates seed "${d}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
1454
1514
|
function f(e) {
|
|
1455
|
-
return
|
|
1515
|
+
return rr.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1456
1516
|
}
|
|
1457
1517
|
function p() {
|
|
1458
1518
|
if (e?.defaultFont) {
|
|
1459
|
-
if (!n.value && !f(e.defaultFont)) return
|
|
1519
|
+
if (!n.value && !f(e.defaultFont)) return ar;
|
|
1460
1520
|
if (u(e.defaultFont)) {
|
|
1461
1521
|
let t = l.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1462
1522
|
if (t) return t.value;
|
|
1463
1523
|
}
|
|
1464
1524
|
}
|
|
1465
|
-
return
|
|
1525
|
+
return ar;
|
|
1466
1526
|
}
|
|
1467
1527
|
let m = C(() => p());
|
|
1468
1528
|
function h(e) {
|
|
1469
1529
|
if (!e) return s.value;
|
|
1470
1530
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
1471
|
-
return n ? `'${n.name}', ${n.fallback ?? s.value}` :
|
|
1531
|
+
return n ? `'${n.name}', ${n.fallback ?? s.value}` : ir[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${s.value}`);
|
|
1472
1532
|
}
|
|
1473
1533
|
let g = [], _ = !1;
|
|
1474
1534
|
async function y() {
|
|
@@ -1484,7 +1544,7 @@ function tr(e) {
|
|
|
1484
1544
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1485
1545
|
});
|
|
1486
1546
|
} catch (t) {
|
|
1487
|
-
|
|
1547
|
+
$.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1488
1548
|
}
|
|
1489
1549
|
});
|
|
1490
1550
|
await Promise.allSettled(e), !_ && (r.value = !0);
|
|
@@ -1511,8 +1571,8 @@ function tr(e) {
|
|
|
1511
1571
|
}
|
|
1512
1572
|
//#endregion
|
|
1513
1573
|
//#region src/composables/useLogicTag.ts
|
|
1514
|
-
function
|
|
1515
|
-
let e = p(
|
|
1574
|
+
function cr() {
|
|
1575
|
+
let e = p(wt, []), t = p(qe, []), n = p(Ge, je.liquid), r = p(mt, null), i = p(at, null), a = v(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
|
|
1516
1576
|
async function c() {
|
|
1517
1577
|
if (r) {
|
|
1518
1578
|
a.value = !0;
|
|
@@ -1543,12 +1603,12 @@ function nr() {
|
|
|
1543
1603
|
}
|
|
1544
1604
|
//#endregion
|
|
1545
1605
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1546
|
-
function
|
|
1547
|
-
return
|
|
1606
|
+
function lr(e, t, n) {
|
|
1607
|
+
return be(e, n) ? {
|
|
1548
1608
|
type: "logicMergeTagNode",
|
|
1549
1609
|
attrs: {
|
|
1550
1610
|
value: e,
|
|
1551
|
-
keyword:
|
|
1611
|
+
keyword: ve(e, n)
|
|
1552
1612
|
}
|
|
1553
1613
|
} : {
|
|
1554
1614
|
type: "mergeTagNode",
|
|
@@ -1560,15 +1620,15 @@ function rr(e, t, n) {
|
|
|
1560
1620
|
}
|
|
1561
1621
|
//#endregion
|
|
1562
1622
|
//#region src/utils/insertLogicTag.ts
|
|
1563
|
-
function
|
|
1623
|
+
function ur(e) {
|
|
1564
1624
|
return "before" in e && "after" in e;
|
|
1565
1625
|
}
|
|
1566
|
-
function
|
|
1567
|
-
if (!
|
|
1568
|
-
e.chain().focus().insertContent(
|
|
1626
|
+
function dr(e, t, n) {
|
|
1627
|
+
if (!ur(t)) {
|
|
1628
|
+
e.chain().focus().insertContent(lr(t.value, t.label, n)).run();
|
|
1569
1629
|
return;
|
|
1570
1630
|
}
|
|
1571
|
-
let r =
|
|
1631
|
+
let r = lr(t.before, t.label, n), i = lr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1572
1632
|
if (a !== o) {
|
|
1573
1633
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1574
1634
|
return;
|
|
@@ -1577,20 +1637,20 @@ function ar(e, t, n) {
|
|
|
1577
1637
|
}
|
|
1578
1638
|
//#endregion
|
|
1579
1639
|
//#region src/utils/linkColorExtension.ts
|
|
1580
|
-
function
|
|
1640
|
+
function fr(e) {
|
|
1581
1641
|
if (!e) return null;
|
|
1582
1642
|
let t = e.trim();
|
|
1583
1643
|
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
1584
1644
|
}
|
|
1585
|
-
function
|
|
1645
|
+
function pr(e) {
|
|
1586
1646
|
return e.extend({ addAttributes() {
|
|
1587
1647
|
return {
|
|
1588
1648
|
...this.parent?.(),
|
|
1589
1649
|
color: {
|
|
1590
1650
|
default: null,
|
|
1591
|
-
parseHTML: (e) =>
|
|
1651
|
+
parseHTML: (e) => fr(Ot(e.style.color)),
|
|
1592
1652
|
renderHTML: (e) => {
|
|
1593
|
-
let t =
|
|
1653
|
+
let t = fr(e.color);
|
|
1594
1654
|
return t ? { style: `color: ${t}` } : {};
|
|
1595
1655
|
}
|
|
1596
1656
|
}
|
|
@@ -1599,9 +1659,9 @@ function sr(e) {
|
|
|
1599
1659
|
}
|
|
1600
1660
|
//#endregion
|
|
1601
1661
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1602
|
-
function
|
|
1662
|
+
function mr(e) {
|
|
1603
1663
|
let t = v(!1), n = v(""), r = v(""), i = v(null);
|
|
1604
|
-
|
|
1664
|
+
er(i, t);
|
|
1605
1665
|
function a() {
|
|
1606
1666
|
let i = e.value?.getAttributes("link") ?? {};
|
|
1607
1667
|
n.value = i.href || "", r.value = i.color || "", t.value = !0;
|
|
@@ -1610,7 +1670,7 @@ function cr(e) {
|
|
|
1610
1670
|
if (n.value) {
|
|
1611
1671
|
let t = c(n.value);
|
|
1612
1672
|
if (t !== null) {
|
|
1613
|
-
let n =
|
|
1673
|
+
let n = fr(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1614
1674
|
n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
|
|
1615
1675
|
}
|
|
1616
1676
|
}
|
|
@@ -1657,8 +1717,8 @@ function cr(e) {
|
|
|
1657
1717
|
}
|
|
1658
1718
|
//#endregion
|
|
1659
1719
|
//#region src/composables/useRichTextEditor.ts
|
|
1660
|
-
function
|
|
1661
|
-
let n = p(
|
|
1720
|
+
function hr(t) {
|
|
1721
|
+
let n = p(K, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: c, autocomplete: l } = Y(), { canInsertLogicTag: u, isRequesting: d, requestLogicTag: f } = cr(), m = p(Ze, null), h = (s(m) ? m.value : m)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", g = Ee(c), _ = e(null), { showLinkDialog: y, linkUrl: b, linkColor: x, linkDialogRef: S, openLinkDialog: C, insertLink: w, removeLink: T, closeLinkDialog: E, handleLinkKeydown: O } = mr(_), { start: k, stop: A } = Re(() => _.value?.commands.focus("end"), 0, { immediate: !1 }), j = e(null), M = v(!0), N = v(null), P = !1;
|
|
1662
1722
|
async function F() {
|
|
1663
1723
|
N.value = null, M.value = !0;
|
|
1664
1724
|
try {
|
|
@@ -1688,7 +1748,7 @@ function lr(t) {
|
|
|
1688
1748
|
_.value = s, M.value = !1, k();
|
|
1689
1749
|
} catch (e) {
|
|
1690
1750
|
if (P) return;
|
|
1691
|
-
|
|
1751
|
+
$.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), N.value = e instanceof Error ? e.message : "Failed to load editor", M.value = !1;
|
|
1692
1752
|
}
|
|
1693
1753
|
}
|
|
1694
1754
|
function ee() {
|
|
@@ -1706,7 +1766,7 @@ function lr(t) {
|
|
|
1706
1766
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1707
1767
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
|
|
1708
1768
|
}
|
|
1709
|
-
|
|
1769
|
+
U(document, "mousedown", L), D(() => {
|
|
1710
1770
|
P = !0, I(), A(), _.value?.destroy();
|
|
1711
1771
|
});
|
|
1712
1772
|
async function R() {
|
|
@@ -1718,7 +1778,7 @@ function lr(t) {
|
|
|
1718
1778
|
}
|
|
1719
1779
|
async function z() {
|
|
1720
1780
|
let e = await f();
|
|
1721
|
-
P || (e && _.value ?
|
|
1781
|
+
P || (e && _.value ? dr(_.value, e, c) : _.value?.commands.focus());
|
|
1722
1782
|
}
|
|
1723
1783
|
return {
|
|
1724
1784
|
editor: _,
|
|
@@ -1747,9 +1807,9 @@ function lr(t) {
|
|
|
1747
1807
|
}
|
|
1748
1808
|
//#endregion
|
|
1749
1809
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1750
|
-
var
|
|
1751
|
-
function
|
|
1752
|
-
let t =
|
|
1810
|
+
var gr = "(max-width: 767px)";
|
|
1811
|
+
function _r(e) {
|
|
1812
|
+
let t = He(gr);
|
|
1753
1813
|
return {
|
|
1754
1814
|
isSmallScreen: t,
|
|
1755
1815
|
showNotice: C(() => (A(e) ?? !0) && t.value)
|
|
@@ -1757,20 +1817,20 @@ function dr(e) {
|
|
|
1757
1817
|
}
|
|
1758
1818
|
//#endregion
|
|
1759
1819
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1760
|
-
var
|
|
1820
|
+
var vr = { class: "tpl:w-full" }, yr = {
|
|
1761
1821
|
key: 0,
|
|
1762
1822
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
1763
|
-
},
|
|
1823
|
+
}, br = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, xr = {
|
|
1764
1824
|
key: 1,
|
|
1765
1825
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
1766
|
-
},
|
|
1826
|
+
}, Sr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Cr = {
|
|
1767
1827
|
key: 2,
|
|
1768
1828
|
class: "tpl:relative"
|
|
1769
|
-
},
|
|
1829
|
+
}, wr = ["innerHTML"], Tr = {
|
|
1770
1830
|
key: 0,
|
|
1771
1831
|
class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
|
|
1772
1832
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1773
|
-
},
|
|
1833
|
+
}, Er = /* @__PURE__ */ R({
|
|
1774
1834
|
__name: "CustomBlock",
|
|
1775
1835
|
props: {
|
|
1776
1836
|
block: {},
|
|
@@ -1778,7 +1838,7 @@ var fr = { class: "tpl:w-full" }, pr = {
|
|
|
1778
1838
|
},
|
|
1779
1839
|
emits: ["fetchData"],
|
|
1780
1840
|
setup(e, { emit: n }) {
|
|
1781
|
-
let r = e, i = n, { t: a } =
|
|
1841
|
+
let r = e, i = n, { t: a } = q(), o = p(xt, null), s = v(""), c = v(!1), u = C(() => o?.getDefinition(r.block.customType)), d = C(() => !!u.value), { isFetching: f, fetch: m, needsFetch: h, hasDataSource: g } = ln({
|
|
1782
1842
|
definition: u,
|
|
1783
1843
|
block: C(() => r.block),
|
|
1784
1844
|
onUpdate: (e, t) => {
|
|
@@ -1787,10 +1847,10 @@ var fr = { class: "tpl:w-full" }, pr = {
|
|
|
1787
1847
|
dataSourceFetched: t
|
|
1788
1848
|
});
|
|
1789
1849
|
}
|
|
1790
|
-
}), _ = p(
|
|
1850
|
+
}), _ = p(W, []), y = p(G, null), b = C(() => {
|
|
1791
1851
|
if (!y?.value) return r.block;
|
|
1792
1852
|
let e = {};
|
|
1793
|
-
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
1853
|
+
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? _e(n, _) : n;
|
|
1794
1854
|
return {
|
|
1795
1855
|
...r.block,
|
|
1796
1856
|
fieldValues: e
|
|
@@ -1814,10 +1874,10 @@ var fr = { class: "tpl:w-full" }, pr = {
|
|
|
1814
1874
|
D();
|
|
1815
1875
|
}, { deep: !0 }), B(() => y?.value, () => {
|
|
1816
1876
|
D();
|
|
1817
|
-
}), (e, t) => (l(), w("div",
|
|
1877
|
+
}), (e, t) => (l(), w("div", vr, [d.value ? c.value ? (l(), w("div", xr, [z(E(Gt), {
|
|
1818
1878
|
size: 24,
|
|
1819
1879
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1820
|
-
}), M("span",
|
|
1880
|
+
}), M("span", Sr, S(E(a).customBlocks.renderError), 1)])) : (l(), w("div", Cr, [M("div", { innerHTML: s.value }, null, 8, wr), E(g) && E(h) ? (l(), w("div", Tr, [E(f) ? (l(), k(Yt, {
|
|
1821
1881
|
key: 1,
|
|
1822
1882
|
class: "tpl:w-48"
|
|
1823
1883
|
})) : (l(), w("button", {
|
|
@@ -1825,16 +1885,16 @@ var fr = { class: "tpl:w-full" }, pr = {
|
|
|
1825
1885
|
type: "button",
|
|
1826
1886
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1827
1887
|
onClick: t[0] ||= O((...e) => E(m) && E(m)(...e), ["stop"])
|
|
1828
|
-
}, [u.value?.icon ? (l(), k(
|
|
1888
|
+
}, [u.value?.icon ? (l(), k(Zn, {
|
|
1829
1889
|
key: 0,
|
|
1830
1890
|
icon: u.value.icon,
|
|
1831
1891
|
size: 16
|
|
1832
|
-
}, null, 8, ["icon"])) : T("", !0), L(" " + S(u.value?.dataSource?.label || E(a).customBlocks.dataSource.fetchButton), 1)]))])) : T("", !0)])) : (l(), w("div",
|
|
1892
|
+
}, null, 8, ["icon"])) : T("", !0), L(" " + S(u.value?.dataSource?.label || E(a).customBlocks.dataSource.fetchButton), 1)]))])) : T("", !0)])) : (l(), w("div", yr, [z(E(Nt), {
|
|
1833
1893
|
size: 24,
|
|
1834
1894
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1835
|
-
}), M("span",
|
|
1895
|
+
}), M("span", br, S(E(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1836
1896
|
}
|
|
1837
|
-
}),
|
|
1897
|
+
}), Dr = { class: "tpl:w-full" }, Or = /* @__PURE__ */ R({
|
|
1838
1898
|
__name: "DividerBlock",
|
|
1839
1899
|
props: {
|
|
1840
1900
|
block: {},
|
|
@@ -1846,28 +1906,28 @@ var fr = { class: "tpl:w-full" }, pr = {
|
|
|
1846
1906
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
1847
1907
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1848
1908
|
}));
|
|
1849
|
-
return (e, t) => (l(), w("div",
|
|
1909
|
+
return (e, t) => (l(), w("div", Dr, [M("hr", {
|
|
1850
1910
|
class: "tpl:m-0 tpl:border-none",
|
|
1851
1911
|
style: F(n.value)
|
|
1852
1912
|
}, null, 4)]));
|
|
1853
1913
|
}
|
|
1854
|
-
}),
|
|
1914
|
+
}), kr = { class: "tpl:w-full" }, Ar = ["srcdoc", "title"], jr = {
|
|
1855
1915
|
key: 1,
|
|
1856
1916
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
1857
|
-
},
|
|
1917
|
+
}, Mr = {
|
|
1858
1918
|
key: 0,
|
|
1859
1919
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1860
|
-
},
|
|
1920
|
+
}, Nr = {
|
|
1861
1921
|
key: 1,
|
|
1862
1922
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1863
|
-
},
|
|
1923
|
+
}, Pr = /* @__PURE__ */ R({
|
|
1864
1924
|
__name: "HtmlBlock",
|
|
1865
1925
|
props: {
|
|
1866
1926
|
block: {},
|
|
1867
1927
|
viewport: {}
|
|
1868
1928
|
},
|
|
1869
1929
|
setup(e) {
|
|
1870
|
-
let t = e, { t: n } =
|
|
1930
|
+
let t = e, { t: n } = q(), r = p(ut, !1), i = C(() => t.block.content.trim().length > 0), a = C(() => r && i.value), o = p(W, []), s = p(G, null), c = C(() => s?.value ? _e(t.block.content, o) : t.block.content), u = v(null), d = v(60), f = null;
|
|
1871
1931
|
function m() {
|
|
1872
1932
|
let e = u.value?.contentDocument;
|
|
1873
1933
|
e && (d.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1881,7 +1941,7 @@ var fr = { class: "tpl:w-full" }, pr = {
|
|
|
1881
1941
|
e || (f?.disconnect(), f = null);
|
|
1882
1942
|
}), D(() => {
|
|
1883
1943
|
f?.disconnect(), f = null;
|
|
1884
|
-
}), (e, t) => (l(), w("div",
|
|
1944
|
+
}), (e, t) => (l(), w("div", kr, [a.value ? (l(), w("iframe", {
|
|
1885
1945
|
key: 0,
|
|
1886
1946
|
ref_key: "iframeRef",
|
|
1887
1947
|
ref: u,
|
|
@@ -1891,18 +1951,18 @@ var fr = { class: "tpl:w-full" }, pr = {
|
|
|
1891
1951
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1892
1952
|
style: F({ height: `${d.value}px` }),
|
|
1893
1953
|
onLoad: h
|
|
1894
|
-
}, null, 44,
|
|
1954
|
+
}, null, 44, Ar)) : (l(), w("div", jr, [z(E(Mt), {
|
|
1895
1955
|
size: 24,
|
|
1896
1956
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1897
|
-
}), i.value ? (l(), w("span",
|
|
1957
|
+
}), i.value ? (l(), w("span", Mr, S(E(n).html.preview), 1)) : (l(), w("span", Nr, S(E(n).html.empty), 1))]))]));
|
|
1898
1958
|
}
|
|
1899
|
-
}),
|
|
1900
|
-
function
|
|
1901
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || A(r), { isOverDropZone: a } =
|
|
1959
|
+
}), Fr = "image/";
|
|
1960
|
+
function Ir(e) {
|
|
1961
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || A(r), { isOverDropZone: a } = We(t, {
|
|
1902
1962
|
preventDefaultForUnhandled: !0,
|
|
1903
1963
|
onDrop: (e) => {
|
|
1904
1964
|
if (!i()) return;
|
|
1905
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
1965
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(Fr));
|
|
1906
1966
|
t.length > 0 && n([t[0]]);
|
|
1907
1967
|
}
|
|
1908
1968
|
});
|
|
@@ -1910,17 +1970,17 @@ function Ar(e) {
|
|
|
1910
1970
|
}
|
|
1911
1971
|
//#endregion
|
|
1912
1972
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1913
|
-
var
|
|
1973
|
+
var Lr = {
|
|
1914
1974
|
key: 0,
|
|
1915
1975
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
1916
1976
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1917
|
-
},
|
|
1977
|
+
}, Rr = ["href"], zr = ["src", "alt"], Br = ["src", "alt"], Vr = {
|
|
1918
1978
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1919
1979
|
style: { opacity: "0.7" }
|
|
1920
|
-
},
|
|
1980
|
+
}, Hr = ["href"], Ur = ["src", "alt"], Wr = ["src", "alt"], Gr = {
|
|
1921
1981
|
key: 4,
|
|
1922
1982
|
class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
1923
|
-
},
|
|
1983
|
+
}, Kr = ["aria-label"], qr = { key: 1 }, Jr = /* @__PURE__ */ R({
|
|
1924
1984
|
__name: "ImageBlock",
|
|
1925
1985
|
props: {
|
|
1926
1986
|
block: {},
|
|
@@ -1928,7 +1988,7 @@ var jr = {
|
|
|
1928
1988
|
},
|
|
1929
1989
|
emits: ["update"],
|
|
1930
1990
|
setup(e, { emit: t }) {
|
|
1931
|
-
let n = e, r = t, { t: i } =
|
|
1991
|
+
let n = e, r = t, { t: i } = q(), { syntax: a } = Y(), o = p(et, null), s = C(() => !!o), c = Zt();
|
|
1932
1992
|
async function u() {
|
|
1933
1993
|
let e = await o?.({ accept: ["images"] });
|
|
1934
1994
|
if (c.alive && e) {
|
|
@@ -1955,7 +2015,7 @@ var jr = {
|
|
|
1955
2015
|
}
|
|
1956
2016
|
}
|
|
1957
2017
|
}
|
|
1958
|
-
let { isOver: g } =
|
|
2018
|
+
let { isOver: g } = Ir({
|
|
1959
2019
|
target: d,
|
|
1960
2020
|
enabled: m,
|
|
1961
2021
|
onFiles: h
|
|
@@ -1968,18 +2028,18 @@ var jr = {
|
|
|
1968
2028
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1969
2029
|
marginRight: e === "center" ? "auto" : void 0
|
|
1970
2030
|
};
|
|
1971
|
-
}), b = C(() =>
|
|
2031
|
+
}), b = C(() => H(n.block.src, a)), x = Q(() => b.value ? void 0 : n.block.src), D = Q(() => b.value ? n.block.placeholderUrl : void 0);
|
|
1972
2032
|
return (t, n) => (l(), w("div", {
|
|
1973
2033
|
ref_key: "dropZoneRef",
|
|
1974
2034
|
ref: d,
|
|
1975
2035
|
"data-testid": "image-drop-zone",
|
|
1976
2036
|
class: "tpl:relative tpl:w-full",
|
|
1977
2037
|
style: F(_.value)
|
|
1978
|
-
}, [m.value && (E(g) || f.value) ? (l(), w("div",
|
|
2038
|
+
}, [m.value && (E(g) || f.value) ? (l(), w("div", Lr, [f.value ? (l(), w(I, { key: 0 }, [z(E(Vt), {
|
|
1979
2039
|
class: "tpl-spinner",
|
|
1980
2040
|
size: 20,
|
|
1981
2041
|
"stroke-width": 2
|
|
1982
|
-
}), L(" " + S(E(i).image.uploading), 1)], 64)) : (l(), w(I, { key: 1 }, [z(E(
|
|
2042
|
+
}), L(" " + S(E(i).image.uploading), 1)], 64)) : (l(), w(I, { key: 1 }, [z(E(Ut), {
|
|
1983
2043
|
size: 20,
|
|
1984
2044
|
"stroke-width": 1.5
|
|
1985
2045
|
}), L(" " + S(E(i).image.dropToUpload), 1)], 64))])) : T("", !0), e.block.src && b.value && e.block.placeholderUrl ? (l(), w(I, { key: 1 }, [e.block.linkUrl ? (l(), w("a", {
|
|
@@ -1994,22 +2054,22 @@ var jr = {
|
|
|
1994
2054
|
src: E(D),
|
|
1995
2055
|
alt: e.block.alt || E(i).image.altTextPlaceholder,
|
|
1996
2056
|
style: F(y.value)
|
|
1997
|
-
}, null, 12,
|
|
2057
|
+
}, null, 12, zr)], 8, Rr)) : (l(), w("img", {
|
|
1998
2058
|
key: 1,
|
|
1999
2059
|
class: "tpl:border-0",
|
|
2000
2060
|
src: E(D),
|
|
2001
2061
|
alt: e.block.alt,
|
|
2002
2062
|
style: F(y.value)
|
|
2003
|
-
}, null, 12,
|
|
2063
|
+
}, null, 12, Br))], 64)) : e.block.src && b.value ? (l(), w("div", {
|
|
2004
2064
|
key: 2,
|
|
2005
2065
|
class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
2006
2066
|
style: F([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, y.value])
|
|
2007
|
-
}, [z(E(
|
|
2067
|
+
}, [z(E(zt), {
|
|
2008
2068
|
size: 32,
|
|
2009
2069
|
"stroke-width": 1.5,
|
|
2010
2070
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2011
2071
|
style: { opacity: "0.5" }
|
|
2012
|
-
}), M("span",
|
|
2072
|
+
}), M("span", Vr, [z(Gn, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (l(), w(I, { key: 3 }, [e.block.linkUrl ? (l(), w("a", {
|
|
2013
2073
|
key: 0,
|
|
2014
2074
|
href: e.block.linkUrl,
|
|
2015
2075
|
target: "_blank",
|
|
@@ -2021,33 +2081,33 @@ var jr = {
|
|
|
2021
2081
|
src: E(x),
|
|
2022
2082
|
alt: e.block.alt || E(i).image.altTextPlaceholder,
|
|
2023
2083
|
style: F(y.value)
|
|
2024
|
-
}, null, 12,
|
|
2084
|
+
}, null, 12, Ur)], 8, Hr)) : (l(), w("img", {
|
|
2025
2085
|
key: 1,
|
|
2026
2086
|
class: "tpl:border-0",
|
|
2027
2087
|
src: E(x),
|
|
2028
2088
|
alt: e.block.alt,
|
|
2029
2089
|
style: F(y.value)
|
|
2030
|
-
}, null, 12,
|
|
2090
|
+
}, null, 12, Wr))], 64)) : (l(), w("div", Gr, [s.value ? (l(), w("button", {
|
|
2031
2091
|
key: 0,
|
|
2032
2092
|
"aria-label": E(i).image.browseMedia,
|
|
2033
2093
|
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
2034
2094
|
onClick: O(u, ["stop"])
|
|
2035
|
-
}, [z(E(
|
|
2095
|
+
}, [z(E(zt), {
|
|
2036
2096
|
size: 14,
|
|
2037
2097
|
"stroke-width": 1.5
|
|
2038
|
-
}), L(" " + S(E(i).image.browseMedia), 1)], 8,
|
|
2098
|
+
}), L(" " + S(E(i).image.browseMedia), 1)], 8, Kr)) : (l(), w("span", qr, S(E(i).image.clickToAdd), 1))]))], 4));
|
|
2039
2099
|
}
|
|
2040
|
-
}),
|
|
2100
|
+
}), Yr = { class: "tpl:w-full" }, Xr = ["href"], Zr = {
|
|
2041
2101
|
key: 1,
|
|
2042
2102
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2043
|
-
},
|
|
2103
|
+
}, Qr = /* @__PURE__ */ R({
|
|
2044
2104
|
__name: "MenuBlock",
|
|
2045
2105
|
props: {
|
|
2046
2106
|
block: {},
|
|
2047
2107
|
viewport: {}
|
|
2048
2108
|
},
|
|
2049
2109
|
setup(e) {
|
|
2050
|
-
let t = e, { t: n } =
|
|
2110
|
+
let t = e, { t: n } = q(), r = C(() => ({
|
|
2051
2111
|
display: "flex",
|
|
2052
2112
|
flexWrap: "wrap",
|
|
2053
2113
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -2059,7 +2119,7 @@ var jr = {
|
|
|
2059
2119
|
function a(e) {
|
|
2060
2120
|
return e || t.block.linkColor || t.block.color;
|
|
2061
2121
|
}
|
|
2062
|
-
return (t, o) => (l(), w("div",
|
|
2122
|
+
return (t, o) => (l(), w("div", Yr, [i.value ? (l(), w("div", {
|
|
2063
2123
|
key: 0,
|
|
2064
2124
|
style: F(r.value)
|
|
2065
2125
|
}, [(l(!0), w(I, null, f(e.block.items, (t, n) => (l(), w(I, { key: t.id }, [M("a", {
|
|
@@ -2071,15 +2131,15 @@ var jr = {
|
|
|
2071
2131
|
textDecoration: t.underline ? "underline" : "none"
|
|
2072
2132
|
}),
|
|
2073
2133
|
onClick: o[0] ||= O(() => {}, ["prevent"])
|
|
2074
|
-
}, [z(
|
|
2134
|
+
}, [z(Gn, { text: t.text || "..." }, null, 8, ["text"])], 12, Xr), n < e.block.items.length - 1 ? (l(), w("span", {
|
|
2075
2135
|
key: 0,
|
|
2076
2136
|
style: F({
|
|
2077
2137
|
color: e.block.separatorColor,
|
|
2078
2138
|
padding: `0 ${e.block.spacing}px`
|
|
2079
2139
|
})
|
|
2080
|
-
}, S(e.block.separator), 5)) : T("", !0)], 64))), 128))], 4)) : (l(), w("div",
|
|
2140
|
+
}, S(e.block.separator), 5)) : T("", !0)], 64))), 128))], 4)) : (l(), w("div", Zr, [z(E(It), { size: 16 }), M("span", null, S(E(n).menu.addLinks), 1)]))]));
|
|
2081
2141
|
}
|
|
2082
|
-
}),
|
|
2142
|
+
}), $r = /* @__PURE__ */ new Set([
|
|
2083
2143
|
"http",
|
|
2084
2144
|
"https",
|
|
2085
2145
|
"mailto",
|
|
@@ -2089,7 +2149,7 @@ var jr = {
|
|
|
2089
2149
|
"sms",
|
|
2090
2150
|
"xmpp",
|
|
2091
2151
|
"cid"
|
|
2092
|
-
]),
|
|
2152
|
+
]), ei = /* @__PURE__ */ new Set([
|
|
2093
2153
|
"SCRIPT",
|
|
2094
2154
|
"STYLE",
|
|
2095
2155
|
"IFRAME",
|
|
@@ -2099,7 +2159,7 @@ var jr = {
|
|
|
2099
2159
|
"META",
|
|
2100
2160
|
"BASE",
|
|
2101
2161
|
"FORM"
|
|
2102
|
-
]),
|
|
2162
|
+
]), ti = /* @__PURE__ */ new Set([
|
|
2103
2163
|
"href",
|
|
2104
2164
|
"xlink:href",
|
|
2105
2165
|
"formaction",
|
|
@@ -2108,16 +2168,16 @@ var jr = {
|
|
|
2108
2168
|
"background",
|
|
2109
2169
|
"poster"
|
|
2110
2170
|
]);
|
|
2111
|
-
function
|
|
2171
|
+
function ni(e, t) {
|
|
2112
2172
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2113
2173
|
if (!n || n.startsWith("#")) return !0;
|
|
2114
2174
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
2115
2175
|
if (!r) return !0;
|
|
2116
2176
|
let i = r[1].toLowerCase();
|
|
2117
|
-
return
|
|
2177
|
+
return $r.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
2118
2178
|
}
|
|
2119
|
-
function
|
|
2120
|
-
if (
|
|
2179
|
+
function ri(e) {
|
|
2180
|
+
if (ei.has(e.tagName)) {
|
|
2121
2181
|
e.remove();
|
|
2122
2182
|
return;
|
|
2123
2183
|
}
|
|
@@ -2129,29 +2189,29 @@ function Zr(e) {
|
|
|
2129
2189
|
e.removeAttribute(n);
|
|
2130
2190
|
continue;
|
|
2131
2191
|
}
|
|
2132
|
-
if (
|
|
2133
|
-
|
|
2192
|
+
if (ti.has(t)) {
|
|
2193
|
+
ni(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
2134
2194
|
continue;
|
|
2135
2195
|
}
|
|
2136
2196
|
if (t === "src") {
|
|
2137
|
-
|
|
2197
|
+
ni(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
2138
2198
|
continue;
|
|
2139
2199
|
}
|
|
2140
2200
|
t === "srcdoc" && e.removeAttribute(n);
|
|
2141
2201
|
}
|
|
2142
2202
|
let n = Array.from(e.children);
|
|
2143
|
-
for (let e of n)
|
|
2203
|
+
for (let e of n) ri(e);
|
|
2144
2204
|
}
|
|
2145
|
-
function
|
|
2205
|
+
function ii(e) {
|
|
2146
2206
|
if (typeof DOMParser > "u") return e;
|
|
2147
2207
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
2148
|
-
for (let e of n)
|
|
2208
|
+
for (let e of n) ri(e);
|
|
2149
2209
|
return t.innerHTML;
|
|
2150
2210
|
}
|
|
2151
2211
|
//#endregion
|
|
2152
2212
|
//#region src/composables/useEditableTextBlock.ts
|
|
2153
|
-
function
|
|
2154
|
-
let t = p(
|
|
2213
|
+
function ai(e) {
|
|
2214
|
+
let t = p(W, []), n = p(G, null), { syntax: r } = Y(), i = C(() => n?.value ? Se(e(), t) : De(e(), t)), a = C(() => ii(Ae(i.value, r))), o = v(!1), s = v(null), { top: c, left: l } = Ue(s), { toLocal: u } = At(), d = C(() => u({
|
|
2155
2215
|
top: c.value - 8,
|
|
2156
2216
|
left: l.value
|
|
2157
2217
|
}));
|
|
@@ -2172,14 +2232,14 @@ function $r(e) {
|
|
|
2172
2232
|
}
|
|
2173
2233
|
//#endregion
|
|
2174
2234
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2175
|
-
var
|
|
2235
|
+
var oi = ["innerHTML"], si = /* @__PURE__ */ R({
|
|
2176
2236
|
__name: "ParagraphBlock",
|
|
2177
2237
|
props: {
|
|
2178
2238
|
block: {},
|
|
2179
2239
|
viewport: {}
|
|
2180
2240
|
},
|
|
2181
2241
|
setup(e) {
|
|
2182
|
-
let t = e, n = b(() => import("./ParagraphEditor-
|
|
2242
|
+
let t = e, n = b(() => import("./ParagraphEditor-Uv5LPF3W.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ai(() => t.block.content);
|
|
2183
2243
|
return (t, u) => (l(), w("div", {
|
|
2184
2244
|
ref_key: "blockRef",
|
|
2185
2245
|
ref: i,
|
|
@@ -2198,54 +2258,54 @@ var ei = ["innerHTML"], ti = /* @__PURE__ */ R({
|
|
|
2198
2258
|
key: 1,
|
|
2199
2259
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
|
|
2200
2260
|
innerHTML: E(o)
|
|
2201
|
-
}, null, 8,
|
|
2261
|
+
}, null, 8, oi))], 544));
|
|
2202
2262
|
}
|
|
2203
2263
|
});
|
|
2204
2264
|
//#endregion
|
|
2205
2265
|
//#region src/utils/blockComponentResolver.ts
|
|
2206
|
-
function
|
|
2266
|
+
function ci(e) {
|
|
2207
2267
|
let t = { fontFamily: e.fontFamily };
|
|
2208
2268
|
return e.textColor && (t.color = e.textColor), e.linkColor && (t["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (t["--tpl-doc-link-underline"] = "underline"), t;
|
|
2209
2269
|
}
|
|
2210
|
-
function
|
|
2270
|
+
function li(e, t, n) {
|
|
2211
2271
|
if (t) {
|
|
2212
2272
|
let n = t.getComponent(e);
|
|
2213
2273
|
if (n) return n;
|
|
2214
2274
|
}
|
|
2215
2275
|
return n[e.type] ?? null;
|
|
2216
2276
|
}
|
|
2217
|
-
function
|
|
2277
|
+
function ui(e) {
|
|
2218
2278
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2219
2279
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2220
2280
|
backgroundColor: n || "transparent"
|
|
2221
2281
|
};
|
|
2222
2282
|
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2223
2283
|
}
|
|
2224
|
-
function
|
|
2284
|
+
function di(e) {
|
|
2225
2285
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2226
2286
|
let t = e.wrapper, n = {};
|
|
2227
2287
|
return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
|
|
2228
2288
|
}
|
|
2229
2289
|
//#endregion
|
|
2230
2290
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2231
|
-
var
|
|
2291
|
+
var fi = [
|
|
2232
2292
|
"data-block-id",
|
|
2233
2293
|
"data-block-type",
|
|
2234
2294
|
"data-tpl-picked"
|
|
2235
|
-
],
|
|
2295
|
+
], pi = ["aria-label"], mi = [
|
|
2236
2296
|
"aria-label",
|
|
2237
2297
|
"aria-pressed",
|
|
2238
2298
|
"title"
|
|
2239
|
-
],
|
|
2299
|
+
], hi = ["aria-label", "title"], gi = ["aria-label", "title"], _i = ["aria-label", "title"], vi = {
|
|
2240
2300
|
key: 1,
|
|
2241
2301
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
2242
|
-
},
|
|
2302
|
+
}, yi = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, bi = {
|
|
2243
2303
|
key: 2,
|
|
2244
2304
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2245
|
-
},
|
|
2305
|
+
}, xi = ["aria-label", "title"], Si = {
|
|
2246
2306
|
key: 3,
|
|
2247
2307
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2248
|
-
},
|
|
2308
|
+
}, Ci = ["aria-label"], wi = /*#__PURE__*/ Xt(/* @__PURE__ */ R({
|
|
2249
2309
|
__name: "BlockWrapper",
|
|
2250
2310
|
props: {
|
|
2251
2311
|
block: {},
|
|
@@ -2257,7 +2317,7 @@ var oi = [
|
|
|
2257
2317
|
},
|
|
2258
2318
|
emits: ["select"],
|
|
2259
2319
|
setup(e, { emit: t }) {
|
|
2260
|
-
let n = b(() => import("./BlockIssueBadge-
|
|
2320
|
+
let n = b(() => import("./BlockIssueBadge-CRnx8Dv9.js")), i = e, a = t, { t: o, format: s } = q(), c = p(it, null), u = v(null), f = C(() => c?.liftedBlockId.value === i.block.id), m = C(() => f.value ? s(o.blockActions.dragLifted, { block: i.block.type }) : o.blockActions.drag);
|
|
2261
2321
|
async function h() {
|
|
2262
2322
|
await d(), u.value?.focus();
|
|
2263
2323
|
}
|
|
@@ -2283,13 +2343,13 @@ var oi = [
|
|
|
2283
2343
|
let _ = C(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), y = C(() => i.previewMode === !0 && _.value), x = C(() => i.viewport ? {
|
|
2284
2344
|
desktop: o.viewport.desktop,
|
|
2285
2345
|
mobile: o.viewport.mobile
|
|
2286
|
-
}[i.viewport] ?? i.viewport : ""), D = C(() => !!i.block.displayCondition), k = p(
|
|
2287
|
-
let e =
|
|
2346
|
+
}[i.viewport] ?? i.viewport : ""), D = C(() => !!i.block.displayCondition), k = p(lt, null), A = p(ft, null), N = p(dt, {}), P = C(() => N.savedBlocks?.isPicking.value === !0), ee = C(() => !i.nested && N.savedBlocks?.isAvailable.value === !0 && N.savedBlocks?.canCreate.value === !0), I = C(() => i.isSelected && !P.value), R = C(() => N.comments?.getBlockCount(i.block.id) ?? 0), B = C(() => {
|
|
2347
|
+
let e = ui(i.block), t = {
|
|
2288
2348
|
padding: e.padding,
|
|
2289
2349
|
backgroundColor: e.backgroundColor
|
|
2290
2350
|
};
|
|
2291
2351
|
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
2292
|
-
}), te = C(() =>
|
|
2352
|
+
}), te = C(() => di(i.block));
|
|
2293
2353
|
function ne(e) {
|
|
2294
2354
|
i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
|
|
2295
2355
|
}
|
|
@@ -2334,60 +2394,61 @@ var oi = [
|
|
|
2334
2394
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2335
2395
|
title: E(o).blockActions.drag,
|
|
2336
2396
|
onKeydown: g
|
|
2337
|
-
}, [z(E(
|
|
2397
|
+
}, [z(E(Bt), {
|
|
2338
2398
|
size: 14,
|
|
2339
2399
|
"stroke-width": 1.5
|
|
2340
|
-
})], 40,
|
|
2400
|
+
})], 40, mi),
|
|
2341
2401
|
M("button", {
|
|
2342
2402
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
2343
2403
|
"aria-label": E(o).blockActions.duplicate,
|
|
2344
2404
|
title: E(o).blockActions.duplicate,
|
|
2345
2405
|
onClick: O(ie, ["stop"])
|
|
2346
|
-
}, [z(E(
|
|
2406
|
+
}, [z(E(Ft), {
|
|
2347
2407
|
size: 14,
|
|
2348
2408
|
"stroke-width": 1.5
|
|
2349
|
-
})], 8,
|
|
2409
|
+
})], 8, hi),
|
|
2350
2410
|
ee.value ? (l(), w("button", {
|
|
2351
2411
|
key: 0,
|
|
2352
2412
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
2353
2413
|
"aria-label": E(o).blockActions.saveAsBlock,
|
|
2354
2414
|
title: E(o).blockActions.saveAsBlock,
|
|
2355
2415
|
onClick: O(ae, ["stop"])
|
|
2356
|
-
}, [z(E(
|
|
2416
|
+
}, [z(E(Jt), {
|
|
2357
2417
|
size: 14,
|
|
2358
2418
|
"stroke-width": 1.5
|
|
2359
|
-
})], 8,
|
|
2419
|
+
})], 8, gi)) : T("", !0),
|
|
2360
2420
|
M("button", {
|
|
2361
2421
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
2362
2422
|
"aria-label": E(o).blockActions.delete,
|
|
2363
2423
|
title: E(o).blockActions.delete,
|
|
2364
2424
|
onClick: O(re, ["stop"])
|
|
2365
|
-
}, [z(E(
|
|
2425
|
+
}, [z(E(Rt), {
|
|
2366
2426
|
size: 14,
|
|
2367
2427
|
"stroke-width": 1.5
|
|
2368
|
-
})], 8,
|
|
2369
|
-
], 8,
|
|
2370
|
-
_.value ? (l(), w("div",
|
|
2428
|
+
})], 8, _i)
|
|
2429
|
+
], 8, pi)) : T("", !0),
|
|
2430
|
+
_.value ? (l(), w("div", vi, [M("span", yi, [z(E(qt), {
|
|
2371
2431
|
size: 12,
|
|
2372
2432
|
"stroke-width": 1.5
|
|
2373
2433
|
}), L(" " + S(E(s)(E(o).blockActions.hiddenOnViewport, { viewport: x.value })), 1)])])) : T("", !0),
|
|
2374
|
-
D.value && !_.value ? (l(), w("div",
|
|
2434
|
+
D.value && !_.value ? (l(), w("div", bi, [M("button", {
|
|
2435
|
+
"data-testid": "condition-toggle",
|
|
2375
2436
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2376
2437
|
"aria-label": E(o).blockActions.conditionToggle,
|
|
2377
2438
|
title: e.block.displayCondition?.label,
|
|
2378
2439
|
onClick: O(oe, ["stop"])
|
|
2379
|
-
}, [z(E(
|
|
2440
|
+
}, [z(E(Kt), {
|
|
2380
2441
|
size: 12,
|
|
2381
2442
|
"stroke-width": 2
|
|
2382
|
-
})], 8,
|
|
2383
|
-
R.value > 0 && !_.value ? (l(), w("div",
|
|
2443
|
+
})], 8, xi)])) : T("", !0),
|
|
2444
|
+
R.value > 0 && !_.value ? (l(), w("div", Si, [M("button", {
|
|
2384
2445
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
2385
2446
|
"aria-label": E(s)(E(o).blockActions.comments, { count: String(R.value) }),
|
|
2386
2447
|
onClick: i[0] ||= O((t) => E(N).comments?.openForBlock(e.block.id), ["stop"])
|
|
2387
|
-
}, [z(E(
|
|
2448
|
+
}, [z(E(Wt), {
|
|
2388
2449
|
size: 12,
|
|
2389
2450
|
"stroke-width": 2.5
|
|
2390
|
-
}), L(" " + S(R.value), 1)], 8,
|
|
2451
|
+
}), L(" " + S(R.value), 1)], 8, Ci)])) : T("", !0),
|
|
2391
2452
|
te.value ? (l(), w("div", {
|
|
2392
2453
|
key: 4,
|
|
2393
2454
|
class: "tpl-section-wrapper",
|
|
@@ -2400,31 +2461,31 @@ var oi = [
|
|
|
2400
2461
|
class: "tpl-block-content",
|
|
2401
2462
|
style: F(B.value)
|
|
2402
2463
|
}, [r(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2403
|
-
], 10,
|
|
2464
|
+
], 10, fi));
|
|
2404
2465
|
}
|
|
2405
|
-
}), [["__scopeId", "data-v-
|
|
2466
|
+
}), [["__scopeId", "data-v-8e4583ee"]]);
|
|
2406
2467
|
//#endregion
|
|
2407
2468
|
//#region src/utils/unwrapParagraph.ts
|
|
2408
|
-
function
|
|
2469
|
+
function Ti(e) {
|
|
2409
2470
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2410
2471
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2411
2472
|
}
|
|
2412
2473
|
//#endregion
|
|
2413
2474
|
//#region src/components/blocks/TitleBlock.vue
|
|
2414
|
-
var
|
|
2475
|
+
var Ei = /* @__PURE__ */ R({
|
|
2415
2476
|
__name: "TitleBlock",
|
|
2416
2477
|
props: {
|
|
2417
2478
|
block: {},
|
|
2418
2479
|
viewport: {}
|
|
2419
2480
|
},
|
|
2420
2481
|
setup(e) {
|
|
2421
|
-
let t = e, n = b(() => import("./TitleEditor-
|
|
2482
|
+
let t = e, n = b(() => import("./TitleEditor-B9W954u9.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: u } = ai(() => t.block.content), d = C(() => {
|
|
2422
2483
|
let e = {
|
|
2423
|
-
fontSize: `${
|
|
2484
|
+
fontSize: `${te[t.block.level]}px`,
|
|
2424
2485
|
textAlign: t.block.textAlign
|
|
2425
2486
|
};
|
|
2426
2487
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2427
|
-
}), f = C(() => `h${t.block.level}`), p = C(() =>
|
|
2488
|
+
}), f = C(() => `h${t.block.level}`), p = C(() => Ti(o.value));
|
|
2428
2489
|
return (t, o) => (l(), w("div", {
|
|
2429
2490
|
ref_key: "blockRef",
|
|
2430
2491
|
ref: i,
|
|
@@ -2450,16 +2511,16 @@ var bi = /* @__PURE__ */ R({
|
|
|
2450
2511
|
});
|
|
2451
2512
|
//#endregion
|
|
2452
2513
|
//#region src/utils/sectionColumnDrop.ts
|
|
2453
|
-
function
|
|
2514
|
+
function Di(e) {
|
|
2454
2515
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2455
2516
|
}
|
|
2456
2517
|
//#endregion
|
|
2457
2518
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2458
|
-
var
|
|
2519
|
+
var Oi = { class: "tpl:w-full" }, ki = {
|
|
2459
2520
|
key: 0,
|
|
2460
2521
|
"data-testid": "section-drop-hint",
|
|
2461
2522
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
2462
|
-
},
|
|
2523
|
+
}, Ai = /* @__PURE__ */ R({
|
|
2463
2524
|
__name: "SectionBlock",
|
|
2464
2525
|
props: {
|
|
2465
2526
|
block: {},
|
|
@@ -2467,14 +2528,14 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2467
2528
|
},
|
|
2468
2529
|
setup(e) {
|
|
2469
2530
|
let t = {
|
|
2470
|
-
title:
|
|
2471
|
-
paragraph:
|
|
2472
|
-
image:
|
|
2473
|
-
button:
|
|
2474
|
-
divider:
|
|
2475
|
-
custom:
|
|
2476
|
-
}, n = e, { t: r } =
|
|
2477
|
-
function
|
|
2531
|
+
title: Ei,
|
|
2532
|
+
paragraph: si,
|
|
2533
|
+
image: Jr,
|
|
2534
|
+
button: Jn,
|
|
2535
|
+
divider: Or,
|
|
2536
|
+
custom: Er
|
|
2537
|
+
}, n = e, { t: r } = q(), i = Xe(K, "SectionBlock"), o = p(ft, null), s = p(xt, null), u = p(dt, {}), d = p(bt, null);
|
|
2538
|
+
function m(e) {
|
|
2478
2539
|
let t = u.savedBlocks;
|
|
2479
2540
|
if (t?.isPicking.value) {
|
|
2480
2541
|
t.togglePick(n.block.id);
|
|
@@ -2482,7 +2543,7 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2482
2543
|
}
|
|
2483
2544
|
i.selectBlock(e);
|
|
2484
2545
|
}
|
|
2485
|
-
let
|
|
2546
|
+
let g = C(() => {
|
|
2486
2547
|
switch (n.block.columns) {
|
|
2487
2548
|
case "2": return ["50%", "50%"];
|
|
2488
2549
|
case "3": return [
|
|
@@ -2494,38 +2555,38 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2494
2555
|
case "2-1": return ["66.67%", "33.33%"];
|
|
2495
2556
|
default: return ["100%"];
|
|
2496
2557
|
}
|
|
2497
|
-
}),
|
|
2498
|
-
let e =
|
|
2558
|
+
}), _ = C(() => {
|
|
2559
|
+
let e = g.value.length, t = [...n.block.children];
|
|
2499
2560
|
for (; t.length < e;) t.push([]);
|
|
2500
2561
|
return t.slice(0, e);
|
|
2501
|
-
}),
|
|
2502
|
-
function
|
|
2503
|
-
return
|
|
2562
|
+
}), v = C(() => n.viewport === "mobile" && n.block.stackOnMobile !== !1);
|
|
2563
|
+
function y(e) {
|
|
2564
|
+
return _.value[e] || [];
|
|
2504
2565
|
}
|
|
2505
|
-
function
|
|
2566
|
+
function b(e, t) {
|
|
2506
2567
|
let r = t.map((e) => JSON.parse(JSON.stringify(e))), a = [...n.block.children];
|
|
2507
2568
|
for (; a.length <= e;) a.push([]);
|
|
2508
2569
|
a[e] = r, i.updateBlock(n.block.id, { children: a });
|
|
2509
2570
|
}
|
|
2510
|
-
function
|
|
2511
|
-
return
|
|
2571
|
+
function x(e) {
|
|
2572
|
+
return li(e, s, t);
|
|
2512
2573
|
}
|
|
2513
|
-
function
|
|
2574
|
+
function D(e, t) {
|
|
2514
2575
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
2515
2576
|
fieldValues: t.fieldValues,
|
|
2516
2577
|
dataSourceFetched: t.dataSourceFetched
|
|
2517
2578
|
});
|
|
2518
2579
|
}
|
|
2519
|
-
return (t, n) => (l(), w("div",
|
|
2580
|
+
return (t, n) => (l(), w("div", Oi, [M("div", { class: j(["tpl:flex tpl:gap-0", { "tpl:flex-col": v.value }]) }, [(l(!0), w(I, null, f(_.value, (t, n) => (l(), w("div", {
|
|
2520
2581
|
key: n,
|
|
2521
|
-
class: j(["tpl:relative tpl:min-h-[60px] tpl:rounded",
|
|
2522
|
-
style: F({ width:
|
|
2582
|
+
class: j(["tpl:relative tpl:min-h-[60px] tpl:rounded", y(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
2583
|
+
style: F({ width: v.value ? "100%" : g.value[n] })
|
|
2523
2584
|
}, [z(E(ee), {
|
|
2524
|
-
"model-value":
|
|
2585
|
+
"model-value": y(n),
|
|
2525
2586
|
group: {
|
|
2526
2587
|
name: "blocks",
|
|
2527
2588
|
pull: !0,
|
|
2528
|
-
put: (e, t, n) => E(
|
|
2589
|
+
put: (e, t, n) => E(Di)(n)
|
|
2529
2590
|
},
|
|
2530
2591
|
animation: 150,
|
|
2531
2592
|
"ghost-class": "tpl-ghost",
|
|
@@ -2536,20 +2597,20 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2536
2597
|
"empty-insert-threshold": 20,
|
|
2537
2598
|
"force-fallback": !0,
|
|
2538
2599
|
class: "tpl:min-h-[60px]",
|
|
2539
|
-
"onUpdate:modelValue": (e) =>
|
|
2600
|
+
"onUpdate:modelValue": (e) => b(n, e)
|
|
2540
2601
|
}, {
|
|
2541
|
-
default: h(() => [(l(!0), w(I, null, f(
|
|
2602
|
+
default: h(() => [(l(!0), w(I, null, f(y(n), (t) => a((l(), w("div", { key: t.id }, [z(wi, {
|
|
2542
2603
|
block: t,
|
|
2543
2604
|
"is-selected": E(i).state.selectedBlockId === t.id,
|
|
2544
2605
|
viewport: e.viewport,
|
|
2545
2606
|
"preview-mode": E(i).state.previewMode,
|
|
2546
2607
|
nested: "",
|
|
2547
|
-
onSelect: (e) =>
|
|
2608
|
+
onSelect: (e) => m(t.id)
|
|
2548
2609
|
}, {
|
|
2549
|
-
default: h(() => [(l(), k(c(
|
|
2610
|
+
default: h(() => [(l(), k(c(x(t)), {
|
|
2550
2611
|
block: t,
|
|
2551
2612
|
viewport: e.viewport,
|
|
2552
|
-
onFetchData: (e) =>
|
|
2613
|
+
onFetchData: (e) => D(t, e),
|
|
2553
2614
|
onUpdate: (e) => E(i).updateBlock(t.id, e)
|
|
2554
2615
|
}, null, 40, [
|
|
2555
2616
|
"block",
|
|
@@ -2564,19 +2625,19 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2564
2625
|
"viewport",
|
|
2565
2626
|
"preview-mode",
|
|
2566
2627
|
"onSelect"
|
|
2567
|
-
])])), [[P, !E(o)?.isHidden(t.id)]])), 128))]),
|
|
2628
|
+
])])), [[P, E(d) === !1 || !E(o)?.isHidden(t.id)]])), 128))]),
|
|
2568
2629
|
_: 2
|
|
2569
2630
|
}, 1032, [
|
|
2570
2631
|
"model-value",
|
|
2571
2632
|
"group",
|
|
2572
2633
|
"onUpdate:modelValue"
|
|
2573
|
-
]),
|
|
2634
|
+
]), y(n).length === 0 ? (l(), w("div", ki, [M("span", null, S(E(r).section.dropHere), 1)])) : T("", !0)], 6))), 128))], 2)]));
|
|
2574
2635
|
}
|
|
2575
|
-
}),
|
|
2636
|
+
}), ji = pe, Mi = {
|
|
2576
2637
|
small: 24,
|
|
2577
2638
|
medium: 32,
|
|
2578
2639
|
large: 48
|
|
2579
|
-
},
|
|
2640
|
+
}, Ni = [
|
|
2580
2641
|
"facebook",
|
|
2581
2642
|
"twitter",
|
|
2582
2643
|
"instagram",
|
|
@@ -2594,11 +2655,11 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2594
2655
|
"github",
|
|
2595
2656
|
"dribbble",
|
|
2596
2657
|
"behance"
|
|
2597
|
-
],
|
|
2658
|
+
], Pi = [
|
|
2598
2659
|
"width",
|
|
2599
2660
|
"height",
|
|
2600
2661
|
"fill"
|
|
2601
|
-
],
|
|
2662
|
+
], Fi = ["d"], Ii = /* @__PURE__ */ R({
|
|
2602
2663
|
__name: "SocialIconSvg",
|
|
2603
2664
|
props: {
|
|
2604
2665
|
platform: {},
|
|
@@ -2606,7 +2667,7 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2606
2667
|
iconSize: {}
|
|
2607
2668
|
},
|
|
2608
2669
|
setup(e) {
|
|
2609
|
-
let t = e, n = C(() =>
|
|
2670
|
+
let t = e, n = C(() => ji[t.platform]), r = C(() => Mi[t.iconSize]), i = C(() => {
|
|
2610
2671
|
let e = {
|
|
2611
2672
|
display: "inline-flex",
|
|
2612
2673
|
alignItems: "center",
|
|
@@ -2650,25 +2711,25 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2650
2711
|
viewBox: "0 0 24 24",
|
|
2651
2712
|
fill: o.value,
|
|
2652
2713
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2653
|
-
}, [M("path", { d: n.value.path }, null, 8,
|
|
2714
|
+
}, [M("path", { d: n.value.path }, null, 8, Fi)], 8, Pi))], 4));
|
|
2654
2715
|
}
|
|
2655
|
-
}),
|
|
2716
|
+
}), Li = { class: "tpl:w-full" }, Ri = ["href"], zi = {
|
|
2656
2717
|
key: 1,
|
|
2657
2718
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2658
|
-
},
|
|
2719
|
+
}, Bi = /* @__PURE__ */ R({
|
|
2659
2720
|
__name: "SocialIconsBlock",
|
|
2660
2721
|
props: {
|
|
2661
2722
|
block: {},
|
|
2662
2723
|
viewport: {}
|
|
2663
2724
|
},
|
|
2664
2725
|
setup(e) {
|
|
2665
|
-
let t = e, { t: n } =
|
|
2726
|
+
let t = e, { t: n } = q(), r = C(() => ({
|
|
2666
2727
|
display: "flex",
|
|
2667
2728
|
flexWrap: "wrap",
|
|
2668
2729
|
gap: `${t.block.spacing}px`,
|
|
2669
2730
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
2670
2731
|
})), i = C(() => t.block.icons.length > 0);
|
|
2671
|
-
return (t, a) => (l(), w("div",
|
|
2732
|
+
return (t, a) => (l(), w("div", Li, [i.value ? (l(), w("div", {
|
|
2672
2733
|
key: 0,
|
|
2673
2734
|
style: F(r.value)
|
|
2674
2735
|
}, [(l(!0), w(I, null, f(e.block.icons, (t) => (l(), w("a", {
|
|
@@ -2676,7 +2737,7 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2676
2737
|
href: t.url || "#",
|
|
2677
2738
|
class: "tpl:cursor-default",
|
|
2678
2739
|
onClick: a[0] ||= O(() => {}, ["prevent"])
|
|
2679
|
-
}, [z(
|
|
2740
|
+
}, [z(Ii, {
|
|
2680
2741
|
platform: t.platform,
|
|
2681
2742
|
"icon-style": e.block.iconStyle,
|
|
2682
2743
|
"icon-size": e.block.iconSize
|
|
@@ -2684,44 +2745,44 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2684
2745
|
"platform",
|
|
2685
2746
|
"icon-style",
|
|
2686
2747
|
"icon-size"
|
|
2687
|
-
])], 8,
|
|
2748
|
+
])], 8, Ri))), 128))], 4)) : (l(), w("div", zi, [z(E(jt), { size: 16 }), M("span", null, S(E(n).social.addIcons), 1)]))]));
|
|
2688
2749
|
}
|
|
2689
|
-
}),
|
|
2750
|
+
}), Vi = { class: "tpl:w-full" }, Hi = {
|
|
2690
2751
|
key: 0,
|
|
2691
2752
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
2692
2753
|
style: {
|
|
2693
2754
|
"background-color": "var(--tpl-bg-hover)",
|
|
2694
2755
|
color: "var(--tpl-text-dim)"
|
|
2695
2756
|
}
|
|
2696
|
-
},
|
|
2757
|
+
}, Ui = /* @__PURE__ */ R({
|
|
2697
2758
|
__name: "SpacerBlock",
|
|
2698
2759
|
props: {
|
|
2699
2760
|
block: {},
|
|
2700
2761
|
viewport: {}
|
|
2701
2762
|
},
|
|
2702
2763
|
setup(e) {
|
|
2703
|
-
let t = e, n =
|
|
2764
|
+
let t = e, n = Xe(K, "SpacerBlock"), r = C(() => ({
|
|
2704
2765
|
height: `${t.block.height}px`,
|
|
2705
2766
|
minHeight: `${t.block.height}px`,
|
|
2706
2767
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
2707
2768
|
}));
|
|
2708
|
-
return (t, i) => (l(), w("div",
|
|
2769
|
+
return (t, i) => (l(), w("div", Vi, [M("div", {
|
|
2709
2770
|
style: F(r.value),
|
|
2710
2771
|
class: j(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !E(n).state.previewMode }])
|
|
2711
|
-
}, [E(n).state.previewMode ? T("", !0) : (l(), w("span",
|
|
2772
|
+
}, [E(n).state.previewMode ? T("", !0) : (l(), w("span", Hi, S(e.block.height) + "px ", 1))], 6)]));
|
|
2712
2773
|
}
|
|
2713
|
-
}),
|
|
2774
|
+
}), Wi = { class: "tpl:w-full" }, Gi = { key: 0 }, Ki = [
|
|
2714
2775
|
"aria-label",
|
|
2715
2776
|
"data-placeholder",
|
|
2716
2777
|
"onBlur"
|
|
2717
|
-
],
|
|
2778
|
+
], qi = [
|
|
2718
2779
|
"aria-label",
|
|
2719
2780
|
"data-placeholder",
|
|
2720
2781
|
"onBlur"
|
|
2721
|
-
],
|
|
2782
|
+
], Ji = {
|
|
2722
2783
|
key: 1,
|
|
2723
2784
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2724
|
-
},
|
|
2785
|
+
}, Yi = /*#__PURE__*/ Xt(/* @__PURE__ */ R({
|
|
2725
2786
|
__name: "TableBlock",
|
|
2726
2787
|
props: {
|
|
2727
2788
|
block: {},
|
|
@@ -2735,7 +2796,7 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2735
2796
|
updated(e, t) {
|
|
2736
2797
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
2737
2798
|
}
|
|
2738
|
-
}, n = e, { t: r } =
|
|
2799
|
+
}, n = e, { t: r } = q(), i = Xe(K, "TableBlock"), o = C(() => n.block.rows.length > 0), s = C(() => {
|
|
2739
2800
|
let e = {
|
|
2740
2801
|
width: "100%",
|
|
2741
2802
|
borderCollapse: "collapse",
|
|
@@ -2766,11 +2827,11 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2766
2827
|
} : n);
|
|
2767
2828
|
i.updateBlock(n.block.id, { rows: o });
|
|
2768
2829
|
}
|
|
2769
|
-
return (e, n) => (l(), w("div",
|
|
2830
|
+
return (e, n) => (l(), w("div", Wi, [o.value ? (l(), w("table", {
|
|
2770
2831
|
key: 0,
|
|
2771
2832
|
style: F(s.value),
|
|
2772
2833
|
class: "tpl-table-editable"
|
|
2773
|
-
}, [d.value ? (l(), w("thead",
|
|
2834
|
+
}, [d.value ? (l(), w("thead", Gi, [M("tr", null, [(l(!0), w(I, null, f(d.value.cells, (e) => a((l(), w("th", {
|
|
2774
2835
|
key: e.id,
|
|
2775
2836
|
style: F(u.value),
|
|
2776
2837
|
"aria-label": E(r).table.cellPlaceholder,
|
|
@@ -2779,7 +2840,7 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2779
2840
|
onBlur: (t) => h(d.value.id, e.id, t),
|
|
2780
2841
|
onKeydown: n[0] ||= x(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2781
2842
|
onClick: O(m, ["stop"])
|
|
2782
|
-
}, null, 44,
|
|
2843
|
+
}, null, 44, Ki)), [[t, e.content]])), 128))])])) : T("", !0), M("tbody", null, [(l(!0), w(I, null, f(p.value, (e) => (l(), w("tr", { key: e.id }, [(l(!0), w(I, null, f(e.cells, (i) => a((l(), w("td", {
|
|
2783
2844
|
key: i.id,
|
|
2784
2845
|
style: F(c.value),
|
|
2785
2846
|
"aria-label": E(r).table.cellPlaceholder,
|
|
@@ -2788,9 +2849,9 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2788
2849
|
onBlur: (t) => h(e.id, i.id, t),
|
|
2789
2850
|
onKeydown: n[1] ||= x(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2790
2851
|
onClick: O(m, ["stop"])
|
|
2791
|
-
}, null, 44,
|
|
2852
|
+
}, null, 44, qi)), [[t, i.content]])), 128))]))), 128))])], 4)) : (l(), w("div", Ji, [z(E(Lt), { size: 16 }), M("span", null, S(E(r).table.empty), 1)]))]));
|
|
2792
2853
|
}
|
|
2793
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
2854
|
+
}), [["__scopeId", "data-v-963ac422"]]), Xi = /* @__PURE__ */ R({
|
|
2794
2855
|
__name: "VideoPlayButton",
|
|
2795
2856
|
props: { hoverEffect: {
|
|
2796
2857
|
type: Boolean,
|
|
@@ -2808,7 +2869,7 @@ var Si = { class: "tpl:w-full" }, Ci = {
|
|
|
2808
2869
|
});
|
|
2809
2870
|
//#endregion
|
|
2810
2871
|
//#region src/utils/videoThumbnail.ts
|
|
2811
|
-
function
|
|
2872
|
+
function Zi(e) {
|
|
2812
2873
|
if (!e) return {
|
|
2813
2874
|
platform: "unknown",
|
|
2814
2875
|
videoId: null,
|
|
@@ -2840,25 +2901,25 @@ function Gi(e) {
|
|
|
2840
2901
|
thumbnailUrl: null
|
|
2841
2902
|
};
|
|
2842
2903
|
}
|
|
2843
|
-
function
|
|
2844
|
-
return t ||
|
|
2904
|
+
function Qi(e, t) {
|
|
2905
|
+
return t || Zi(e).thumbnailUrl;
|
|
2845
2906
|
}
|
|
2846
2907
|
//#endregion
|
|
2847
2908
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2848
|
-
var
|
|
2909
|
+
var $i = ["src", "alt"], ea = {
|
|
2849
2910
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2850
2911
|
style: { opacity: "0.7" }
|
|
2851
|
-
},
|
|
2912
|
+
}, ta = ["href"], na = ["src", "alt"], ra = ["src", "alt"], ia = {
|
|
2852
2913
|
key: 3,
|
|
2853
2914
|
class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
2854
|
-
},
|
|
2915
|
+
}, aa = /* @__PURE__ */ R({
|
|
2855
2916
|
__name: "VideoBlock",
|
|
2856
2917
|
props: {
|
|
2857
2918
|
block: {},
|
|
2858
2919
|
viewport: {}
|
|
2859
2920
|
},
|
|
2860
2921
|
setup(e) {
|
|
2861
|
-
let t = e, { t: n } =
|
|
2922
|
+
let t = e, { t: n } = q(), { syntax: r } = Y(), i = C(() => H(t.block.url, r) || H(t.block.thumbnailUrl, r)), a = Q(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Q(() => i.value ? t.block.placeholderUrl : void 0), s = C(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : Qi(t.block.url)), c = C(() => ({ textAlign: t.block.align })), u = C(() => {
|
|
2862
2923
|
let e = t.block.align;
|
|
2863
2924
|
return {
|
|
2864
2925
|
maxWidth: "100%",
|
|
@@ -2867,7 +2928,7 @@ var qi = ["src", "alt"], Ji = {
|
|
|
2867
2928
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2868
2929
|
marginRight: e === "center" ? "auto" : void 0
|
|
2869
2930
|
};
|
|
2870
|
-
}), d = C(() =>
|
|
2931
|
+
}), d = C(() => H(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
2871
2932
|
return (t, r) => (l(), w("div", {
|
|
2872
2933
|
class: "tpl:w-full",
|
|
2873
2934
|
style: F(c.value)
|
|
@@ -2879,16 +2940,16 @@ var qi = ["src", "alt"], Ji = {
|
|
|
2879
2940
|
class: "tpl:w-full tpl:border-0",
|
|
2880
2941
|
src: E(o),
|
|
2881
2942
|
alt: e.block.alt
|
|
2882
|
-
}, null, 8,
|
|
2943
|
+
}, null, 8, $i), z(Xi)], 4)) : i.value ? (l(), w("div", {
|
|
2883
2944
|
key: 1,
|
|
2884
2945
|
class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
2885
2946
|
style: F([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
2886
|
-
}, [z(E(
|
|
2947
|
+
}, [z(E(Ht), {
|
|
2887
2948
|
size: 36,
|
|
2888
2949
|
"stroke-width": 1.5,
|
|
2889
2950
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2890
2951
|
style: { opacity: "0.5" }
|
|
2891
|
-
}), M("span",
|
|
2952
|
+
}), M("span", ea, [z(Gn, { text: d.value }, null, 8, ["text"])])], 4)) : s.value ? (l(), w(I, { key: 2 }, [e.block.url ? (l(), w("a", {
|
|
2892
2953
|
key: 0,
|
|
2893
2954
|
href: e.block.url,
|
|
2894
2955
|
target: "_blank",
|
|
@@ -2900,7 +2961,7 @@ var qi = ["src", "alt"], Ji = {
|
|
|
2900
2961
|
class: "tpl:w-full tpl:border-0",
|
|
2901
2962
|
src: s.value,
|
|
2902
2963
|
alt: e.block.alt
|
|
2903
|
-
}, null, 8,
|
|
2964
|
+
}, null, 8, na), z(Xi, { "hover-effect": "" })], 12, ta)) : (l(), w("div", {
|
|
2904
2965
|
key: 1,
|
|
2905
2966
|
class: "tpl:relative tpl:inline-block",
|
|
2906
2967
|
style: F(u.value)
|
|
@@ -2908,48 +2969,48 @@ var qi = ["src", "alt"], Ji = {
|
|
|
2908
2969
|
class: "tpl:w-full tpl:border-0",
|
|
2909
2970
|
src: s.value,
|
|
2910
2971
|
alt: e.block.alt
|
|
2911
|
-
}, null, 8,
|
|
2972
|
+
}, null, 8, ra), z(Xi)], 4))], 64)) : (l(), w("div", ia, [z(E(Ht), {
|
|
2912
2973
|
size: 40,
|
|
2913
2974
|
"stroke-width": 1.5,
|
|
2914
2975
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
2915
2976
|
}), M("span", null, S(E(n).video.addVideo), 1)]))], 4));
|
|
2916
2977
|
}
|
|
2917
|
-
}),
|
|
2918
|
-
section:
|
|
2919
|
-
title:
|
|
2920
|
-
paragraph:
|
|
2921
|
-
image:
|
|
2922
|
-
button:
|
|
2923
|
-
divider:
|
|
2924
|
-
video:
|
|
2925
|
-
social:
|
|
2926
|
-
menu:
|
|
2927
|
-
table:
|
|
2928
|
-
spacer:
|
|
2929
|
-
html:
|
|
2930
|
-
countdown: b(() => import("./CountdownBlock-
|
|
2978
|
+
}), oa = {
|
|
2979
|
+
section: Ai,
|
|
2980
|
+
title: Ei,
|
|
2981
|
+
paragraph: si,
|
|
2982
|
+
image: Jr,
|
|
2983
|
+
button: Jn,
|
|
2984
|
+
divider: Or,
|
|
2985
|
+
video: aa,
|
|
2986
|
+
social: Bi,
|
|
2987
|
+
menu: Qr,
|
|
2988
|
+
table: Yi,
|
|
2989
|
+
spacer: Ui,
|
|
2990
|
+
html: Pr,
|
|
2991
|
+
countdown: b(() => import("./CountdownBlock-CPnQA44g.js"))
|
|
2931
2992
|
};
|
|
2932
|
-
function
|
|
2933
|
-
let { editor: t, config: n, translations: r, fontsManager: a } = e, { t: s, format: c } =
|
|
2993
|
+
function sa(e) {
|
|
2994
|
+
let { editor: t, config: n, translations: r, fontsManager: a } = e, { t: s, format: c } = q(r);
|
|
2934
2995
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
2935
|
-
let { resolvedTheme: l } =
|
|
2996
|
+
let { resolvedTheme: l } = En(C(() => t.state.uiTheme)), d = v(n.theme ?? {}), { themeStyles: f } = On({
|
|
2936
2997
|
themeOverrides: d,
|
|
2937
2998
|
resolvedTheme: l,
|
|
2938
2999
|
extraStyles: e.themeExtraStyles
|
|
2939
|
-
}), p =
|
|
3000
|
+
}), p = rn({
|
|
2940
3001
|
content: t.content,
|
|
2941
3002
|
setContent: (e, n) => t.setContent(e, n),
|
|
2942
3003
|
...e.historyOptions
|
|
2943
3004
|
});
|
|
2944
|
-
|
|
2945
|
-
let m =
|
|
3005
|
+
un(t, p);
|
|
3006
|
+
let m = on({
|
|
2946
3007
|
addBlock: t.addBlock,
|
|
2947
3008
|
removeBlock: t.removeBlock,
|
|
2948
3009
|
updateBlock: t.updateBlock,
|
|
2949
3010
|
selectBlock: t.selectBlock,
|
|
2950
3011
|
findBlockLocation: t.findBlockLocation,
|
|
2951
3012
|
blockDefaults: n.blockDefaults
|
|
2952
|
-
}), h =
|
|
3013
|
+
}), h = cn(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? sn({
|
|
2953
3014
|
content: t.content,
|
|
2954
3015
|
isDirty: () => t.state.isDirty,
|
|
2955
3016
|
...e.autoSaveOptions
|
|
@@ -2957,34 +3018,34 @@ function ta(e) {
|
|
|
2957
3018
|
g && (_ = B(p.isNavigating, (e) => {
|
|
2958
3019
|
e ? g.pause() : g.resume();
|
|
2959
3020
|
}));
|
|
2960
|
-
let y =
|
|
3021
|
+
let y = Tn(t, {
|
|
2961
3022
|
t: s,
|
|
2962
3023
|
format: c
|
|
2963
|
-
}, n.customBlocks ?? []), b =
|
|
2964
|
-
if (b.allowCustomIgnored &&
|
|
2965
|
-
let e =
|
|
2966
|
-
e.length > 0 &&
|
|
3024
|
+
}, n.customBlocks ?? []), b = kt(n.colors);
|
|
3025
|
+
if (b.allowCustomIgnored && $.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), b.invalidPresets.length > 0 && $.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
3026
|
+
let e = zn(b.presets, n.blockDefaults, n.templateDefaults);
|
|
3027
|
+
e.length > 0 && $.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
|
|
2967
3028
|
}
|
|
2968
|
-
let x =
|
|
2969
|
-
|
|
3029
|
+
let x = jn();
|
|
3030
|
+
In(x, oa);
|
|
2970
3031
|
let S = /* @__PURE__ */ new Set();
|
|
2971
3032
|
function w(e) {
|
|
2972
3033
|
for (let t of e) {
|
|
2973
|
-
x.registerCustom(t,
|
|
2974
|
-
for (let e of
|
|
3034
|
+
x.registerCustom(t, Er);
|
|
3035
|
+
for (let e of Vn(t, b)) S.has(e.id) || (S.add(e.id), $.warn(e.message));
|
|
2975
3036
|
}
|
|
2976
3037
|
}
|
|
2977
3038
|
n.customBlocks?.length && w(n.customBlocks);
|
|
2978
|
-
let T =
|
|
3039
|
+
let T = hn();
|
|
2979
3040
|
if (i() && o(T.dispose), e.containerEl) {
|
|
2980
3041
|
let t = e.containerEl;
|
|
2981
|
-
|
|
3042
|
+
U(document, "pointerdown", (e) => {
|
|
2982
3043
|
let n = t.value;
|
|
2983
3044
|
n && (e.composedPath?.() ?? []).includes(n) && T.claim();
|
|
2984
3045
|
}, { capture: !0 });
|
|
2985
3046
|
}
|
|
2986
3047
|
function E(r) {
|
|
2987
|
-
T.isActive() &&
|
|
3048
|
+
T.isActive() && Un(r, {
|
|
2988
3049
|
history: p,
|
|
2989
3050
|
selectBlock: (e) => t.selectBlock(e),
|
|
2990
3051
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -2996,23 +3057,33 @@ function ta(e) {
|
|
|
2996
3057
|
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
2997
3058
|
});
|
|
2998
3059
|
}
|
|
2999
|
-
|
|
3060
|
+
U(document, "keydown", E);
|
|
3000
3061
|
let D = v(null);
|
|
3001
|
-
u(
|
|
3002
|
-
let O =
|
|
3003
|
-
u(
|
|
3004
|
-
let k = v(
|
|
3005
|
-
u(
|
|
3006
|
-
let A = _n(
|
|
3062
|
+
u(ct, e.editorRoot ?? document), u(Ye, D), u(Ze, r), u(K, t), u(Et, p), u(lt, m), u(ft, h), u(Ct, a), u(st, f), u(ot, l), u(vt, n.blockDefaults), u(xt, x), u(yt, n.customBlocks ?? []), u(rt, n.paletteBlocks), u(ut, Ln(n.htmlBlockPreview)), u(St, b), u(gt, Mn(t.content, x));
|
|
3063
|
+
let O = Ce(n.mergeTags?.syntax);
|
|
3064
|
+
u(W, n.mergeTags?.tags ?? []), u(Ge, O), u(tt, n.mergeTags?.onRequest ?? null), u(Je, n.mergeTags?.autocomplete !== !1);
|
|
3065
|
+
let k = v(Pe(n.mergeTags?.tags ?? []));
|
|
3066
|
+
u(ht, k);
|
|
3067
|
+
let A = _n({
|
|
3068
|
+
resolvePreview: n.resolvePreview,
|
|
3069
|
+
getContent: () => t.content.value,
|
|
3070
|
+
isActive: () => t.state.previewMode
|
|
3071
|
+
});
|
|
3072
|
+
u(Qe, A), u($e, n.resolvePreview);
|
|
3073
|
+
let j = C(() => !(t.state.previewMode && A.isConfigured));
|
|
3074
|
+
u(bt, j);
|
|
3075
|
+
let M = yn();
|
|
3076
|
+
u(nt, M), u(wt, n.logicTags?.tags ?? []), u(qe, n.logicTags?.pairs ?? []), u(mt, n.logicTags?.onRequest ?? null), u(at, bn()), u(et, n.onRequestMedia ?? null), u(Tt, n.resolveImageUrl ? vn(n.resolveImageUrl) : null), u(pt, n.displayConditions?.conditions ?? []), u(_t, n.displayConditions?.allowCustom ?? !1), u(dt, e.capabilities ?? {}), u(it, y);
|
|
3077
|
+
let N = xn(n.lint) ? null : Sn({
|
|
3007
3078
|
content: t.content,
|
|
3008
3079
|
options: n.lint ?? {},
|
|
3009
3080
|
updateBlock: t.updateBlock,
|
|
3010
3081
|
updateSettings: t.updateSettings,
|
|
3011
3082
|
removeBlock: t.removeBlock
|
|
3012
3083
|
});
|
|
3013
|
-
u(
|
|
3014
|
-
function
|
|
3015
|
-
_?.(),
|
|
3084
|
+
u(Ke, N);
|
|
3085
|
+
function P() {
|
|
3086
|
+
_?.(), N?.destroy(), g?.destroy(), p.destroy();
|
|
3016
3087
|
}
|
|
3017
3088
|
return {
|
|
3018
3089
|
t: s,
|
|
@@ -3026,14 +3097,16 @@ function ta(e) {
|
|
|
3026
3097
|
themeOverrides: d,
|
|
3027
3098
|
registry: x,
|
|
3028
3099
|
keyboardReorder: y,
|
|
3029
|
-
templateLint:
|
|
3100
|
+
templateLint: N,
|
|
3030
3101
|
popoverRoot: D,
|
|
3031
3102
|
mergeTagSampleMode: k,
|
|
3103
|
+
previewResolution: A,
|
|
3104
|
+
appliesConditionFilter: j,
|
|
3032
3105
|
registerCustomBlocks: w,
|
|
3033
|
-
destroy:
|
|
3106
|
+
destroy: P
|
|
3034
3107
|
};
|
|
3035
3108
|
}
|
|
3036
3109
|
//#endregion
|
|
3037
|
-
export {
|
|
3110
|
+
export { Bn as A, cr as C, er as D, tr as E, pn as F, dn as I, ln as L, wn as M, Cn as N, Zn as O, _n as P, $t as R, pr as S, nr as T, Pr as _, Bi as a, _r as b, Ei as c, ci as d, li as f, Ir as g, Jr as h, Ui as i, $ as j, Jn as k, wi as l, Qr as m, aa as n, Ni as o, si as p, Yi as r, Ai as s, sa as t, ui as u, Or as v, sr as w, hr as x, Er as y };
|
|
3038
3111
|
|
|
3039
|
-
//# sourceMappingURL=useEditorCore-
|
|
3112
|
+
//# sourceMappingURL=useEditorCore-DfW-thCr.js.map
|