@templatical/editor 0.41.0 → 0.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-a8TPBAl2.js → AiChatSidebar-DOCvzGBe.js} +8 -8
- package/dist/{AiFeatureMenu-CroDMqRG.js → AiFeatureMenu-CfijAx4G.js} +4 -4
- package/dist/{BlockIssueBadge-D8KsGWY6.js → BlockIssueBadge-BJ3A6mqh.js} +2 -2
- package/dist/{BlockPreviewCanvas-Z9SZIgfA.js → BlockPreviewCanvas-DggfBaoJ.js} +33 -33
- package/dist/{CloudHeaderExtras-CVqHeqc6.js → CloudHeaderExtras-dFbdqBr5.js} +2 -2
- package/dist/{CloudPanels-CmEpQUJB.js → CloudPanels-DmMxhzzZ.js} +4 -4
- package/dist/{CollaboratorBar-AIQC9fEF.js → CollaboratorBar-XXk1tOC5.js} +2 -2
- package/dist/{CommentsPanel-9k1q-79y.js → CommentsPanel-CGEhbjx0.js} +1 -1
- package/dist/{CommentsSidebar-Bc7nORmD.js → CommentsSidebar-CUpst9ou.js} +10 -10
- package/dist/{CountdownToolbar-DkC-qSgq.js → CountdownToolbar-B1a_UIuB.js} +3 -3
- package/dist/{DesignReferenceSidebar-OoiYJAKS.js → DesignReferenceSidebar-DkAmsBgM.js} +6 -6
- package/dist/{IssuesPanel-Dnns3O9z.js → IssuesPanel-lTpsCV4a.js} +5 -5
- package/dist/{LogicTagInsertButton-BimKobaG.js → LogicTagInsertButton-B5YymR4U.js} +243 -219
- package/dist/{MediaEditModal-C-InB-H2.js → MediaEditModal-B1X8qtJb.js} +1 -1
- package/dist/{MediaPanels-CTosUpeo.js → MediaPanels-DO30L1KS.js} +1 -1
- package/dist/{MergeTagInput-DqpVzhy7.js → MergeTagInput-B0M_-X0K.js} +1 -1
- package/dist/{MergeTagModeToggle-BkIiAgpQ.js → MergeTagModeToggle-B-8W1tK7.js} +4 -4
- package/dist/{ParagraphEditor-DaZ03d1U.js → ParagraphEditor-BhhpXgoO.js} +35 -35
- package/dist/{RestoreVersionDialog-DHb1mPoF.js → RestoreVersionDialog-DE8aqmdi.js} +3 -3
- package/dist/{RichTextEditorContent-AEtfKvLz.js → RichTextEditorContent-AaLAArA0.js} +5 -5
- package/dist/{SaveBlockDialog-hGwLDWfE.js → SaveBlockDialog-BJ-hEwLv.js} +8 -8
- package/dist/{SavedBlocksBrowserModal-C0lYVBFi.js → SavedBlocksBrowserModal-nLI8aAQ5.js} +9 -9
- package/dist/{SavedBlocksPanels-CaTbeVDv.js → SavedBlocksPanels-RnzUMUJI.js} +1 -1
- package/dist/{SavedBlocksPickBar-DR2afid2.js → SavedBlocksPickBar-D3QA3Tgy.js} +2 -2
- package/dist/{TemplateScoringPanel-Cs0TGtRF.js → TemplateScoringPanel-C6ellAcs.js} +11 -11
- package/dist/{TemplateSettings-BD1WNP4C.js → TemplateSettings-C_0qK-zs.js} +6 -6
- package/dist/{TestEmailModal-DqoosG1u.js → TestEmailModal-CnyxLhWJ.js} +7 -7
- package/dist/{TestEmailPanel-DpozqyHF.js → TestEmailPanel-BRisIL4G.js} +1 -1
- package/dist/{TitleEditor-BCBdZLt_.js → TitleEditor-lPITPzw6.js} +12 -12
- package/dist/{ToggleSwitch-CJfQ8u57.js → ToggleSwitch-CtZ6adlX.js} +1 -1
- package/dist/{Toolbar-C7SjilzH.js → Toolbar-B6dG5_IP.js} +847 -554
- package/dist/{TplModal-CVO-2KrU.js → TplModal-BiAf7tWe.js} +2 -2
- package/dist/{VersionHistoryMenu-b0A8mS2_.js → VersionHistoryMenu-DdspCRSA.js} +5 -5
- package/dist/{VersionHistoryPanels-BzF7dmwa.js → VersionHistoryPanels-C589Jm_B.js} +1 -1
- package/dist/{VersionPreviewBanner-xB9r83r0.js → VersionPreviewBanner-XUuLe36h.js} +1 -1
- package/dist/{WrapperBlock-BDjOn3fY.js → WrapperBlock-CVQ4t1tY.js} +4 -4
- package/dist/{blockTypeIcons-B0Bq1WT1.js → blockTypeIcons-Sg8SY1NQ.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/{cdn/chunks/ca-Ckgw9yd0.js → ca--zGWn9AU.js} +14 -2
- package/dist/cdn/chunks/{AiChatSidebar-mKImUXi6.js → AiChatSidebar-DiG-EQ-E.js} +8 -8
- package/dist/cdn/chunks/AiChatSidebar-DiG-EQ-E.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu-Cx3qdStQ.js → AiFeatureMenu-BXSPgOzA.js} +5 -5
- package/dist/cdn/chunks/AiFeatureMenu-BXSPgOzA.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-DS1pUf5g.js → BlockIssueBadge-ChQ0mPf5.js} +2 -2
- package/dist/cdn/chunks/BlockIssueBadge-ChQ0mPf5.js.map +1 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-D31TNib3.js → BlockPreviewCanvas-CMmv1FTA.js} +28 -28
- package/dist/cdn/chunks/BlockPreviewCanvas-CMmv1FTA.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-0zdlKiq7.js → CloudHeaderExtras-yvFz2_e-.js} +3 -3
- package/dist/cdn/chunks/CloudHeaderExtras-yvFz2_e-.js.map +1 -0
- package/dist/cdn/chunks/{CloudPanels-DPh71yOO.js → CloudPanels-DpKck9Na.js} +4 -4
- package/dist/cdn/chunks/CloudPanels-DpKck9Na.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-lCZU8qkg.js → CollaboratorBar-Clm1ZVXQ.js} +3 -3
- package/dist/cdn/chunks/CollaboratorBar-Clm1ZVXQ.js.map +1 -0
- package/dist/cdn/chunks/{CommentsPanel-BtAGZfF6.js → CommentsPanel-CjhxGMjL.js} +2 -2
- package/dist/cdn/chunks/CommentsPanel-CjhxGMjL.js.map +1 -0
- package/dist/cdn/chunks/{CommentsSidebar-Ws07MXYj.js → CommentsSidebar-D9bqMnlt.js} +16 -16
- package/dist/cdn/chunks/CommentsSidebar-D9bqMnlt.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock-sVDjKkRw.js.map +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Bu93WiS8.js → CountdownToolbar-CIRx5w1U.js} +4 -4
- package/dist/cdn/chunks/CountdownToolbar-CIRx5w1U.js.map +1 -0
- package/dist/cdn/chunks/{DesignReferenceSidebar-BlSdh5B7.js → DesignReferenceSidebar-C1-SbE_R.js} +9 -9
- package/dist/cdn/chunks/DesignReferenceSidebar-C1-SbE_R.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-CKkv9z9g.js → IssuesPanel-qKY6UDd-.js} +8 -8
- package/dist/cdn/chunks/IssuesPanel-qKY6UDd-.js.map +1 -0
- package/dist/cdn/chunks/LoadingTrack-_7DH_5aw.js.map +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-CHc1yZ9v.js → LogicTagInsertButton-CItDS_U1.js} +250 -226
- package/dist/cdn/chunks/LogicTagInsertButton-CItDS_U1.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-Cw9MhjVz.js → MediaEditModal-CzUtXkpk.js} +2 -2
- package/dist/cdn/chunks/MediaEditModal-CzUtXkpk.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-FD_aX3H5.js → MediaPanels-DOLsh7WC.js} +2 -2
- package/dist/cdn/chunks/MediaPanels-DOLsh7WC.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagInput--qTYfCWk.js → MergeTagInput-B33u3nxj.js} +2 -2
- package/dist/cdn/chunks/MergeTagInput-B33u3nxj.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagModeToggle-CdWIGo3Q.js → MergeTagModeToggle-Bz1CH3NT.js} +10 -10
- package/dist/cdn/chunks/MergeTagModeToggle-Bz1CH3NT.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-w2qEZTkM.js → ParagraphEditor-J74SIn-m.js} +51 -51
- package/dist/cdn/chunks/ParagraphEditor-J74SIn-m.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-cnWVN3nX.js → RestoreVersionDialog-CFE7jqDB.js} +3 -3
- package/dist/cdn/chunks/RestoreVersionDialog-CFE7jqDB.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-Fzuu9pLP.js → RichTextEditorContent-dOg1xFqv.js} +5 -5
- package/dist/cdn/chunks/RichTextEditorContent-dOg1xFqv.js.map +1 -0
- package/dist/cdn/chunks/{SaveBlockDialog-jxQtKnVs.js → SaveBlockDialog-DZOmDCC8.js} +38 -38
- package/dist/cdn/chunks/SaveBlockDialog-DZOmDCC8.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DpXWf4Pi.js → SavedBlocksBrowserModal-B43H5zKA.js} +10 -10
- package/dist/cdn/chunks/SavedBlocksBrowserModal-B43H5zKA.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-B-ASmf1P.js → SavedBlocksPanels-uTSb2xO_.js} +2 -2
- package/dist/cdn/chunks/SavedBlocksPanels-uTSb2xO_.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPickBar-CEFIQ8Nd.js → SavedBlocksPickBar-BUvmGqHK.js} +3 -3
- package/dist/cdn/chunks/SavedBlocksPickBar-BUvmGqHK.js.map +1 -0
- package/dist/cdn/chunks/{TemplateScoringPanel-d_Ppowsq.js → TemplateScoringPanel-ebsrVge3.js} +19 -19
- package/dist/cdn/chunks/TemplateScoringPanel-ebsrVge3.js.map +1 -0
- package/dist/cdn/chunks/{TemplateSettings-Dr5OJ0Gi.js → TemplateSettings-BaEVdUTM.js} +9 -9
- package/dist/cdn/chunks/TemplateSettings-BaEVdUTM.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-CrjzVw8e.js → TestEmailModal-ide7UP_H.js} +7 -7
- package/dist/cdn/chunks/TestEmailModal-ide7UP_H.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-k9vdulTu.js → TestEmailPanel-Cqdsnufx.js} +2 -2
- package/dist/cdn/chunks/TestEmailPanel-Cqdsnufx.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-laILWfKh.js → TitleEditor-CoFzxLPA.js} +16 -16
- package/dist/cdn/chunks/TitleEditor-CoFzxLPA.js.map +1 -0
- package/dist/cdn/chunks/{ToggleSwitch-0dGCYnRY.js → ToggleSwitch-D-8dCEbI.js} +2 -2
- package/dist/cdn/chunks/ToggleSwitch-D-8dCEbI.js.map +1 -0
- package/dist/cdn/chunks/{Toolbar-BsiHW9gY.js → Toolbar-BDzhrmGV.js} +814 -566
- package/dist/cdn/chunks/Toolbar-BDzhrmGV.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-D8DoPbFa.js → TplModal-mLMmolQp.js} +3 -3
- package/dist/cdn/chunks/TplModal-mLMmolQp.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-B3-hNu9c.js → VersionHistoryMenu-C_bBKOYU.js} +7 -7
- package/dist/cdn/chunks/VersionHistoryMenu-C_bBKOYU.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-zw1AtzGN.js → VersionHistoryPanels-B9LwOKxm.js} +2 -2
- package/dist/cdn/chunks/VersionHistoryPanels-B9LwOKxm.js.map +1 -0
- package/dist/cdn/chunks/{VersionPreviewBanner-PzVQSBJE.js → VersionPreviewBanner-CKyrcgxJ.js} +2 -2
- package/dist/cdn/chunks/VersionPreviewBanner-CKyrcgxJ.js.map +1 -0
- package/dist/cdn/chunks/{WrapperBlock-CpRvfAV0.js → WrapperBlock-DI8vSvTO.js} +4 -4
- package/dist/cdn/chunks/WrapperBlock-DI8vSvTO.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-CdfCfqHE.js +21 -0
- package/dist/cdn/chunks/blockTypeIcons-CdfCfqHE.js.map +1 -0
- package/dist/{ca-Ckgw9yd0.js → cdn/chunks/ca--zGWn9AU.js} +16 -0
- package/dist/cdn/chunks/ca--zGWn9AU.js.map +1 -0
- package/dist/cdn/chunks/ca-BTf1Zbqb.js.map +1 -1
- package/dist/cdn/chunks/{cloud-CIT4yPp4.js → cloud-De-eh1u6.js} +2 -2
- package/dist/cdn/chunks/cloud-De-eh1u6.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-COUxbPvd.js → createCloudRuntime-DsaUaWvr.js} +3 -3
- package/dist/cdn/chunks/createCloudRuntime-DsaUaWvr.js.map +1 -0
- package/dist/cdn/chunks/{de-D4dweQw8.js → de-BRNLKcDl.js} +15 -1
- package/dist/cdn/chunks/de-BRNLKcDl.js.map +1 -0
- package/dist/cdn/chunks/de-mMY5yQJu.js.map +1 -1
- package/dist/cdn/chunks/de-xzrh9PA3.js.map +1 -1
- package/dist/cdn/chunks/dist-BRZhN8qJ.js.map +1 -1
- package/dist/cdn/chunks/dist-CXB2_kBa.js.map +1 -1
- package/dist/cdn/chunks/draggable-IB4x6w2O.js.map +1 -1
- package/dist/cdn/chunks/{editor-modal-CKu8HhiB.js → editor-modal-CZQArGNj.js} +88 -88
- package/dist/cdn/chunks/editor-modal-CZQArGNj.js.map +1 -0
- package/dist/cdn/chunks/emojiData-6m0DBh7O.js.map +1 -1
- package/dist/cdn/chunks/en-9unxBjV8.js +2 -0
- package/dist/cdn/chunks/en-ChVeGQBY.js.map +1 -1
- package/dist/{en-VE7R7NyL.js → cdn/chunks/en-JJjqHMjy.js} +16 -0
- package/dist/cdn/chunks/en-JJjqHMjy.js.map +1 -0
- package/dist/cdn/chunks/{es-B9OhP8H3.js → es-BIh8BxV9.js} +15 -1
- package/dist/cdn/chunks/es-BIh8BxV9.js.map +1 -0
- package/dist/cdn/chunks/es-BT4LSpE2.js.map +1 -1
- package/dist/cdn/chunks/{extensions-CafoGF65.js → extensions-Dy251lPd.js} +5 -5
- package/dist/cdn/chunks/extensions-Dy251lPd.js.map +1 -0
- package/dist/cdn/chunks/formatAbsoluteDateTime-DMmop3C-.js.map +1 -1
- package/dist/cdn/chunks/formatRelativeTime-CtUU-QZ8.js.map +1 -1
- package/dist/{fr-wrXhIi00.js → cdn/chunks/fr-C5VUZogP.js} +16 -0
- package/dist/cdn/chunks/fr-C5VUZogP.js.map +1 -0
- package/dist/cdn/chunks/fr-CI7OJoql.js.map +1 -1
- package/dist/cdn/chunks/htmlparser-ClUZ6waR.js.map +1 -1
- package/dist/cdn/chunks/{icons-BKkJ-5xF.js → icons-CQnjugjy.js} +86 -45
- package/dist/cdn/chunks/icons-CQnjugjy.js.map +1 -0
- package/dist/cdn/chunks/ja-DhlWUfke.js.map +1 -1
- package/dist/cdn/chunks/{ja-fKnVWXHC.js → ja-x5JYxaCW.js} +15 -1
- package/dist/cdn/chunks/ja-x5JYxaCW.js.map +1 -0
- package/dist/cdn/chunks/keys-DCWeHkSF.js.map +1 -1
- package/dist/cdn/chunks/liquid.browser-BypTT2oc.js.map +1 -1
- package/dist/cdn/chunks/logger-ByvdoAwq.js.map +1 -1
- package/dist/cdn/chunks/nl-D8y5OWGB.js.map +1 -1
- package/dist/cdn/chunks/{nl-DeFatKJe.js → nl-UXxFyXV6.js} +15 -1
- package/dist/cdn/chunks/nl-UXxFyXV6.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dpj-_cOj.js → preRenderCustomBlocks-h4ZFBKbD.js} +2 -2
- package/dist/cdn/chunks/preRenderCustomBlocks-h4ZFBKbD.js.map +1 -0
- package/dist/cdn/chunks/pt-BR-CoCwRUi0.js.map +1 -1
- package/dist/{pt-BR-Bh1J8ey6.js → cdn/chunks/pt-BR-DHm3SP6W.js} +16 -0
- package/dist/cdn/chunks/pt-BR-DHm3SP6W.js.map +1 -0
- package/dist/cdn/chunks/pt-BR-DMCbUBvJ.js.map +1 -1
- package/dist/cdn/chunks/pusher-BbIHJKf3.js.map +1 -1
- package/dist/cdn/chunks/readableTextColor-f8Kykfnh.js.map +1 -1
- package/dist/cdn/chunks/{socialIcons-BvYNMn1G.js → socialIcons-ZOCwCCyn.js} +3 -3
- package/dist/cdn/chunks/socialIcons-ZOCwCCyn.js.map +1 -0
- package/dist/cdn/chunks/{src-DveVYoWS.js → src-BR3I3gOW.js} +265 -224
- package/dist/cdn/chunks/src-BR3I3gOW.js.map +1 -0
- package/dist/cdn/chunks/{src-Cnc5E71L.js → src-fZSLjhjy.js} +12 -12
- package/dist/cdn/chunks/src-fZSLjhjy.js.map +1 -0
- package/dist/cdn/chunks/{src-L6HEdwFn.js → src-nhIF5-mf.js} +179 -166
- package/dist/cdn/chunks/src-nhIF5-mf.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-C_YAPdQS.js.map +1 -1
- package/dist/cdn/chunks/templateSettingsFields-YCFVBVYh.js.map +1 -1
- package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +1 -1
- package/dist/cdn/chunks/{tiptap-DhLuKyDc.js → tiptap-D1u8JIUW.js} +1916 -1917
- package/dist/cdn/chunks/tiptap-D1u8JIUW.js.map +1 -0
- package/dist/cdn/chunks/useAliveFlag-DAlQLbM2.js.map +1 -1
- package/dist/cdn/chunks/useCloudI18n-CrjWbpbu.js.map +1 -1
- package/dist/cdn/chunks/{useEditorCore-DZmtKwJh.js → useEditorCore-D4kzTMtQ.js} +458 -446
- package/dist/cdn/chunks/useEditorCore-D4kzTMtQ.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-CshefZLP.js.map +1 -1
- package/dist/cdn/chunks/useI18n-CyO_Nmca.js.map +1 -1
- package/dist/cdn/chunks/{useLogicTag-DF7-l66G.js → useLogicTag-J_i_hvZg.js} +2 -2
- package/dist/cdn/chunks/useLogicTag-J_i_hvZg.js.map +1 -0
- package/dist/cdn/chunks/{useMergeTag-DbIHw4NG.js → useMergeTag-C5MyHYxJ.js} +2 -2
- package/dist/cdn/chunks/useMergeTag-C5MyHYxJ.js.map +1 -0
- package/dist/cdn/chunks/{usePopoverPosition-BJRvAb-h.js → usePopoverPosition-DGXjXKjM.js} +25 -12
- package/dist/cdn/chunks/usePopoverPosition-DGXjXKjM.js.map +1 -0
- package/dist/cdn/chunks/useScrollToBlock-DgHZJvID.js.map +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +493 -464
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-eqb2JhqU.js → check-BMx_TLAS.js} +1 -1
- package/dist/{chevron-down-Dkr-7Ywl.js → chevron-down-KZf5mh9_.js} +1 -1
- package/dist/{chevron-right-Bge4XF_B.js → chevron-right-BLZ60Vxw.js} +1 -1
- package/dist/{chevron-up-CQAyl0kC.js → chevron-up-B9ynB8eU.js} +1 -1
- package/dist/{circle-alert-CYgTHKWr.js → circle-alert-pjvFFDrF.js} +1 -1
- package/dist/{clock-BgSJZJP5.js → clock-CiiTBfF3.js} +1 -1
- package/dist/{cloud-DsqqUfzh.js → cloud-AO_X8T9g.js} +1 -1
- package/dist/{copy-mw6PVnOJ.js → copy-BF0_pQjH.js} +1 -1
- package/dist/{createCloudRuntime-iLflkYzP.js → createCloudRuntime-D641nhri.js} +2 -2
- package/dist/{createLucideIcon-BxY5yz5u.js → createLucideIcon-C2YOVVWx.js} +8 -8
- package/dist/{de-D4dweQw8.js → de-BRNLKcDl.js} +14 -0
- package/dist/{dist-CQSVro7b.js → dist-B0dkvy7z.js} +1 -1
- package/dist/{dist-BJM3eFyT.js → dist-BPWuzECC.js} +1 -1
- package/dist/{dist-EDkj3Ub1.js → dist-BUHovM4k.js} +1 -1
- package/dist/{dist-BmsLcnrO.js → dist-BwoEME8p.js} +1 -1
- package/dist/{dist-DerFNpDY.js → dist-C2Ge44fD.js} +760 -761
- package/dist/{dist-BdHF7nyq.js → dist-CIxmOOSG.js} +5 -5
- package/dist/{dist-wyXxj3R1.js → dist-CJ7RZARo.js} +1 -1
- package/dist/{dist-Bl4rxpX9.js → dist-CxmLZQso.js} +1 -1
- package/dist/{dist-DyrEOKEJ.js → dist-DRmafAUz.js} +1 -1
- package/dist/{dist-Djmzp6wi.js → dist-DdOAotfz.js} +1 -1
- package/dist/{dist-BxVnMgXZ.js → dist-W_ERo6c_.js} +1 -1
- package/dist/{dist-DbUZvK04.js → dist-iLUVPysa.js} +263 -222
- package/dist/{dist-DQbOebGW.js → dist-p-LkiWIQ.js} +1 -1
- package/dist/{editor-modal-qzmEVcIk.js → editor-modal-99FB40dl.js} +16 -16
- package/dist/en-BvOjRLiw.js +2 -0
- package/dist/{cdn/chunks/en-VE7R7NyL.js → en-JJjqHMjy.js} +14 -2
- package/dist/{es-B9OhP8H3.js → es-BIh8BxV9.js} +14 -0
- package/dist/{extensions-DDhjuVKy.js → extensions-DqQXxrvP.js} +13 -13
- package/dist/{eye-DphkRtAD.js → eye-RdXYgrQZ.js} +1 -1
- package/dist/{cdn/chunks/fr-wrXhIi00.js → fr-C5VUZogP.js} +14 -2
- package/dist/{image-up-Qi2BXD7T.js → image-up-BwdoReQt.js} +1 -1
- package/dist/{info-VSyAs02q.js → info-zFMSGrL1.js} +1 -1
- package/dist/{ja-fKnVWXHC.js → ja-x5JYxaCW.js} +14 -0
- package/dist/{link-CNuozGqD.js → link-D7orqFBT.js} +1 -1
- package/dist/{list-BA0I5Wmu.js → list-BGt4Pgxc.js} +1 -1
- package/dist/{loader-circle-z5eeqasv.js → loader-circle-BVBgkRGz.js} +1 -1
- package/dist/{message-circle-BsQ9hEup.js → message-circle-D8YLsarv.js} +1 -1
- package/dist/{nl-DeFatKJe.js → nl-UXxFyXV6.js} +14 -0
- package/dist/{package-OkXfuRoO.js → package-CuFvk0L5.js} +1 -1
- package/dist/{pencil-DFVFA7Dj.js → pencil-DRYbmZW7.js} +1 -1
- package/dist/{plus-D8bkVjZ7.js → plus-Dv0b3kh0.js} +1 -1
- package/dist/{preRenderCustomBlocks-BBSqQgke.js → preRenderCustomBlocks-CTstI3Q-.js} +4 -4
- package/dist/{cdn/chunks/pt-BR-Bh1J8ey6.js → pt-BR-DHm3SP6W.js} +14 -2
- package/dist/{refresh-cw-DPB7YFuz.js → refresh-cw-gYTIS5bJ.js} +1 -1
- package/dist/{search-C-dCgqIa.js → search-D84_Ki_a.js} +1 -1
- package/dist/{send-Cm2fy2zm.js → send-Cn-8_H_U.js} +1 -1
- package/dist/{shield-check-COgBYFDF.js → shield-check-BOoVWJtD.js} +1 -1
- package/dist/{smartphone-v0u_MOEV.js → smartphone-4Ej3PBw5.js} +1 -1
- package/dist/{socialIcons-O7PZCW2P.js → socialIcons-CzRJskEk.js} +47 -47
- package/dist/{sparkles-Ds0RF8Iu.js → sparkles-D3vnNe7O.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +432 -403
- package/dist/{text-align-start-DiavaIm6.js → text-align-start-Ci2h_Xly.js} +1 -1
- package/dist/{trash-DnOkfu2V.js → trash-wmi4UKvv.js} +1 -1
- package/dist/{triangle-alert-DGLAyXnh.js → triangle-alert-DJ0r2wmQ.js} +1 -1
- package/dist/{upload-BBDme2cy.js → upload-XMde-TXf.js} +1 -1
- package/dist/{useEditorCore-dcdHB_7H.js → useEditorCore-Dhit8Ygg.js} +894 -882
- package/dist/{useLogicTag-D9pvgxQR.js → useLogicTag-BaH8gey0.js} +1 -1
- package/dist/{useMergeTag-BaVFPdlq.js → useMergeTag-Cyad1yBE.js} +1 -1
- package/dist/{usePopoverPosition-DH7z3Ghm.js → usePopoverPosition-BYmd-lhR.js} +24 -11
- package/dist/{useScrollToBlock-Dj4v3rxr.js → useScrollToBlock-B4F7KCrf.js} +1 -1
- package/dist/{x-3BHV3Q6K.js → x-BWrtpVl-.js} +1 -1
- package/package.json +10 -10
- package/dist/cdn/chunks/AiChatSidebar-mKImUXi6.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-Cx3qdStQ.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-DS1pUf5g.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-D31TNib3.js.map +0 -1
- package/dist/cdn/chunks/CloudHeaderExtras-0zdlKiq7.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-DPh71yOO.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-lCZU8qkg.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-BtAGZfF6.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-Ws07MXYj.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-Bu93WiS8.js.map +0 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-BlSdh5B7.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-CKkv9z9g.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-CHc1yZ9v.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-Cw9MhjVz.js.map +0 -1
- package/dist/cdn/chunks/MediaPanels-FD_aX3H5.js.map +0 -1
- package/dist/cdn/chunks/MergeTagInput--qTYfCWk.js.map +0 -1
- package/dist/cdn/chunks/MergeTagModeToggle-CdWIGo3Q.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-w2qEZTkM.js.map +0 -1
- package/dist/cdn/chunks/RestoreVersionDialog-cnWVN3nX.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-Fzuu9pLP.js.map +0 -1
- package/dist/cdn/chunks/SaveBlockDialog-jxQtKnVs.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-DpXWf4Pi.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-B-ASmf1P.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPickBar-CEFIQ8Nd.js.map +0 -1
- package/dist/cdn/chunks/TemplateScoringPanel-d_Ppowsq.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-Dr5OJ0Gi.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-CrjzVw8e.js.map +0 -1
- package/dist/cdn/chunks/TestEmailPanel-k9vdulTu.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-laILWfKh.js.map +0 -1
- package/dist/cdn/chunks/ToggleSwitch-0dGCYnRY.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-BsiHW9gY.js.map +0 -1
- package/dist/cdn/chunks/TplModal-D8DoPbFa.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryMenu-B3-hNu9c.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryPanels-zw1AtzGN.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-PzVQSBJE.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-CpRvfAV0.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-raBjStuv.js +0 -21
- package/dist/cdn/chunks/blockTypeIcons-raBjStuv.js.map +0 -1
- package/dist/cdn/chunks/ca-Ckgw9yd0.js.map +0 -1
- package/dist/cdn/chunks/cloud-CIT4yPp4.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-COUxbPvd.js.map +0 -1
- package/dist/cdn/chunks/de-D4dweQw8.js.map +0 -1
- package/dist/cdn/chunks/editor-modal-CKu8HhiB.js.map +0 -1
- package/dist/cdn/chunks/en-DqzAdO8F.js +0 -2
- package/dist/cdn/chunks/en-VE7R7NyL.js.map +0 -1
- package/dist/cdn/chunks/es-B9OhP8H3.js.map +0 -1
- package/dist/cdn/chunks/extensions-CafoGF65.js.map +0 -1
- package/dist/cdn/chunks/fr-wrXhIi00.js.map +0 -1
- package/dist/cdn/chunks/icons-BKkJ-5xF.js.map +0 -1
- package/dist/cdn/chunks/ja-fKnVWXHC.js.map +0 -1
- package/dist/cdn/chunks/nl-DeFatKJe.js.map +0 -1
- package/dist/cdn/chunks/preRenderCustomBlocks-Dpj-_cOj.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-Bh1J8ey6.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-BvYNMn1G.js.map +0 -1
- package/dist/cdn/chunks/src-Cnc5E71L.js.map +0 -1
- package/dist/cdn/chunks/src-DveVYoWS.js.map +0 -1
- package/dist/cdn/chunks/src-L6HEdwFn.js.map +0 -1
- package/dist/cdn/chunks/tiptap-DhLuKyDc.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-DZmtKwJh.js.map +0 -1
- package/dist/cdn/chunks/useLogicTag-DF7-l66G.js.map +0 -1
- package/dist/cdn/chunks/useMergeTag-DbIHw4NG.js.map +0 -1
- package/dist/cdn/chunks/usePopoverPosition-BJRvAb-h.js.map +0 -1
- package/dist/en-1tgLzB8q.js +0 -2
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { A as e, B as t, E as n, F as r, H as i, I as a, K as o, N as s, P as c, Q as l, R as u, S as d, U as f, X as p, Y as m, at as h, b as g, c as _, ct as v, et as y, f as b, g as x, h as S, it as C, j as w, k as T, l as E, lt as D, m as O, p as k, q as A, rt as j, s as M, t as N, u as P, ut as F, w as I, x as L, y as R } from "./draggable-IB4x6w2O.js";
|
|
2
|
-
import { A as z, B, F as V, G as
|
|
3
|
-
import { a as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { a as
|
|
6
|
-
import { $ as
|
|
2
|
+
import { A as z, B, F as V, G as H, H as ee, I as te, J as ne, M as re, N as ie, O as ae, P as oe, R as se, T as ce, V as le, Y as ue, Z as de, _ as fe, _t as pe, a as me, b as he, d as ge, f as _e, g as ve, gt as ye, h as be, ht as xe, i as U, j as Se, k as Ce, l as we, m as Te, mt as Ee, n as De, o as Oe, p as ke, q as Ae, r as je, s as Me, u as Ne, ut as Pe, vt as W, z as Fe } from "./src-BR3I3gOW.js";
|
|
3
|
+
import { a as Ie, b as Le, g as Re, h as ze, i as Be, m as Ve, n as He, o as Ue, t as We, v as Ge, y as Ke } from "./socialIcons-ZOCwCCyn.js";
|
|
4
|
+
import { _ as qe, h as Je, v as Ye, y as Xe } from "./dist-BRZhN8qJ.js";
|
|
5
|
+
import { a as G, c as Ze, i as Qe } from "./dist-CXB2_kBa.js";
|
|
6
|
+
import { $ as $e, A as et, B as tt, C as nt, D as rt, E as it, F as K, G as at, H as ot, I as st, J as ct, K as lt, L as ut, M as dt, N as ft, O as q, P as pt, Q as J, R as mt, S as ht, T as gt, V as _t, X as vt, Y as yt, Z as bt, _ as xt, a as St, b as Ct, c as wt, d as Tt, f as Et, g as Y, h as Dt, j as Ot, k as kt, l as At, m as jt, n as Mt, o as Nt, p as Pt, q as Ft, r as It, s as Lt, v as Rt, w as zt, x as Bt, y as Vt, z as Ht } from "./keys-DCWeHkSF.js";
|
|
7
7
|
import "./timeouts-DHPZQ0G3.js";
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { i as
|
|
11
|
-
import { r as
|
|
12
|
-
import {
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
8
|
+
import { t as X } from "./useI18n-CyO_Nmca.js";
|
|
9
|
+
import { t as Z } from "./logger-ByvdoAwq.js";
|
|
10
|
+
import { i as Ut, r as Wt, s as Gt, t as Kt } from "./usePopoverPosition-DGXjXKjM.js";
|
|
11
|
+
import { r as qt, t as Jt } from "./templateSettingsFields-YCFVBVYh.js";
|
|
12
|
+
import { Bt as Yt, Dt as Xt, Et as Zt, U as Qt, Vt as $t, Z as en, at as tn, d as nn, f as rn, gt as an, j as on, kt as sn, nt as cn, o as ln, pt as un, s as dn, y as fn, yt as pn } from "./icons-CQnjugjy.js";
|
|
13
|
+
import { t as mn } from "./LoadingTrack-_7DH_5aw.js";
|
|
14
|
+
import { t as hn } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
15
|
+
import { t as gn } from "./useEditorRoot-CshefZLP.js";
|
|
16
16
|
import "./useCloudI18n-CrjWbpbu.js";
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
17
|
+
import { t as _n } from "./useMergeTag-C5MyHYxJ.js";
|
|
18
|
+
import { t as vn } from "./useLogicTag-J_i_hvZg.js";
|
|
19
|
+
import { t as yn } from "./useAliveFlag-DAlQLbM2.js";
|
|
20
20
|
//#region src/utils/activeEditorTracker.ts
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
let e = ++
|
|
24
|
-
return
|
|
21
|
+
var bn = /* @__PURE__ */ new Set(), Q = 0, xn = 0;
|
|
22
|
+
function Sn() {
|
|
23
|
+
let e = ++xn;
|
|
24
|
+
return bn.add(e), Q === 0 && (Q = e), {
|
|
25
25
|
id: e,
|
|
26
|
-
isActive: () =>
|
|
26
|
+
isActive: () => bn.size <= 1 || Q === e,
|
|
27
27
|
claim: () => {
|
|
28
28
|
Q = e;
|
|
29
29
|
},
|
|
30
30
|
dispose: () => {
|
|
31
|
-
if (
|
|
32
|
-
let e = Array.from(
|
|
31
|
+
if (bn.delete(e), Q === e) {
|
|
32
|
+
let e = Array.from(bn);
|
|
33
33
|
Q = e[e.length - 1] ?? 0;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -37,8 +37,8 @@ function yn() {
|
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/composables/usePreviewResolution.ts
|
|
40
|
-
var
|
|
41
|
-
function
|
|
40
|
+
var Cn = 500;
|
|
41
|
+
function wn(e) {
|
|
42
42
|
let n = typeof e.resolvePreview == "function", r = l(null), i = l(!1), a = l(!1), o = 0, s = null;
|
|
43
43
|
function c() {
|
|
44
44
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -49,13 +49,13 @@ function xn(e) {
|
|
|
49
49
|
let n = ++o;
|
|
50
50
|
i.value = !0;
|
|
51
51
|
let s = {
|
|
52
|
-
content:
|
|
52
|
+
content: ce(e.getContent()),
|
|
53
53
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
54
54
|
};
|
|
55
55
|
try {
|
|
56
56
|
let e = await t(s);
|
|
57
57
|
if (n !== o) return;
|
|
58
|
-
if (!
|
|
58
|
+
if (!De(e)) {
|
|
59
59
|
a.value = !0;
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
@@ -75,7 +75,7 @@ function xn(e) {
|
|
|
75
75
|
}
|
|
76
76
|
s = setTimeout(() => {
|
|
77
77
|
s = null, u();
|
|
78
|
-
},
|
|
78
|
+
}, Cn);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
return t(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
@@ -97,7 +97,7 @@ function xn(e) {
|
|
|
97
97
|
}
|
|
98
98
|
//#endregion
|
|
99
99
|
//#region src/composables/useImageUrlResolver.ts
|
|
100
|
-
function
|
|
100
|
+
function Tn(e) {
|
|
101
101
|
let t = p(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
102
102
|
function r(e) {
|
|
103
103
|
return t.get(e);
|
|
@@ -130,8 +130,8 @@ function Sn(e) {
|
|
|
130
130
|
lookup: a
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
let r = n(
|
|
133
|
+
function En(e) {
|
|
134
|
+
let r = n(Bt, null), i = b(e);
|
|
135
135
|
if (!r) return i;
|
|
136
136
|
let a;
|
|
137
137
|
function s() {
|
|
@@ -160,7 +160,7 @@ function Cn(e) {
|
|
|
160
160
|
}
|
|
161
161
|
//#endregion
|
|
162
162
|
//#region src/composables/useMergeTagPicker.ts
|
|
163
|
-
function
|
|
163
|
+
function Dn() {
|
|
164
164
|
let e = l(!1), t = l([]), n = l(null), r = null;
|
|
165
165
|
function i(i, a) {
|
|
166
166
|
if (r) {
|
|
@@ -191,7 +191,7 @@ function wn() {
|
|
|
191
191
|
}
|
|
192
192
|
//#endregion
|
|
193
193
|
//#region src/composables/useLogicTagPicker.ts
|
|
194
|
-
function
|
|
194
|
+
function On() {
|
|
195
195
|
let e = l(!1), t = l([]), n = l([]), r = null;
|
|
196
196
|
function i(i, a) {
|
|
197
197
|
if (r) {
|
|
@@ -222,17 +222,17 @@ function Tn() {
|
|
|
222
222
|
}
|
|
223
223
|
//#endregion
|
|
224
224
|
//#region src/composables/useTemplateLint.ts
|
|
225
|
-
function
|
|
225
|
+
function kn(e) {
|
|
226
226
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
let n = l([]), r = l(!1), i = l(!1), a = y(null), o =
|
|
228
|
+
function An(e) {
|
|
229
|
+
let n = l([]), r = l(!1), i = l(!1), a = y(null), o = kn(e.options), s = null, c = !1;
|
|
230
230
|
o || u();
|
|
231
231
|
async function u() {
|
|
232
232
|
try {
|
|
233
|
-
let t = await import("./src-
|
|
233
|
+
let t = await import("./src-fZSLjhjy.js");
|
|
234
234
|
if (c) return;
|
|
235
|
-
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s =
|
|
235
|
+
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s = Xe(e.content, d, {
|
|
236
236
|
debounce: e.debounce ?? 500,
|
|
237
237
|
deep: !0
|
|
238
238
|
});
|
|
@@ -267,7 +267,7 @@ function Dn(e) {
|
|
|
267
267
|
}
|
|
268
268
|
//#endregion
|
|
269
269
|
//#region src/composables/useKeyboardReorder.ts
|
|
270
|
-
function
|
|
270
|
+
function jn(e, t, n = []) {
|
|
271
271
|
let r = l(null), i = l(""), a = null;
|
|
272
272
|
function o(t) {
|
|
273
273
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -294,7 +294,7 @@ function On(e, t, n = []) {
|
|
|
294
294
|
let i = o(r);
|
|
295
295
|
if (!i) return "";
|
|
296
296
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
297
|
-
return a ?
|
|
297
|
+
return a ? Ue(a, t.t, n) : "";
|
|
298
298
|
}
|
|
299
299
|
function c(t, n) {
|
|
300
300
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -363,13 +363,13 @@ function On(e, t, n = []) {
|
|
|
363
363
|
}
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region src/composables/useUiTheme.ts
|
|
366
|
-
function
|
|
367
|
-
let t =
|
|
366
|
+
function Mn(e) {
|
|
367
|
+
let t = Ze("(prefers-color-scheme: dark)");
|
|
368
368
|
return { resolvedTheme: b(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
369
369
|
}
|
|
370
370
|
//#endregion
|
|
371
371
|
//#region src/composables/useThemeStyles.ts
|
|
372
|
-
var
|
|
372
|
+
var Nn = {
|
|
373
373
|
bg: "--tpl-bg",
|
|
374
374
|
bgElevated: "--tpl-bg-elevated",
|
|
375
375
|
bgHover: "--tpl-bg-hover",
|
|
@@ -393,10 +393,10 @@ var An = {
|
|
|
393
393
|
dangerLight: "--tpl-danger-light",
|
|
394
394
|
canvasBg: "--tpl-canvas-bg"
|
|
395
395
|
};
|
|
396
|
-
function
|
|
396
|
+
function Pn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
397
397
|
return { themeStyles: b(() => {
|
|
398
398
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
399
|
-
if (a) for (let [e, t] of Object.entries(
|
|
399
|
+
if (a) for (let [e, t] of Object.entries(Nn)) {
|
|
400
400
|
let n = a[e];
|
|
401
401
|
n && (r[t] = n);
|
|
402
402
|
}
|
|
@@ -405,7 +405,7 @@ function jn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
405
405
|
}
|
|
406
406
|
//#endregion
|
|
407
407
|
//#region src/composables/useBlockRegistry.ts
|
|
408
|
-
function
|
|
408
|
+
function Fn() {
|
|
409
409
|
let e = y(/* @__PURE__ */ new Map());
|
|
410
410
|
function t(t, n) {
|
|
411
411
|
e.value.set(t, n), C(e);
|
|
@@ -445,7 +445,7 @@ function Mn() {
|
|
|
445
445
|
strictFilters: !1
|
|
446
446
|
}).parseAndRender(t.template, e.fieldValues);
|
|
447
447
|
} catch (t) {
|
|
448
|
-
return
|
|
448
|
+
return Z.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
451
|
function c(t) {
|
|
@@ -463,9 +463,9 @@ function Mn() {
|
|
|
463
463
|
}
|
|
464
464
|
//#endregion
|
|
465
465
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
466
|
-
function
|
|
466
|
+
function In(e, t) {
|
|
467
467
|
return b(() => {
|
|
468
|
-
let n =
|
|
468
|
+
let n = Ln(e.value.blocks);
|
|
469
469
|
if (n.size === 0) return [];
|
|
470
470
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
471
471
|
for (let e of n) {
|
|
@@ -477,33 +477,33 @@ function Nn(e, t) {
|
|
|
477
477
|
return i;
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function Ln(e) {
|
|
481
481
|
let t = /* @__PURE__ */ new Set();
|
|
482
|
-
return
|
|
482
|
+
return Rn(e, t), t;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Rn(e, t) {
|
|
485
485
|
for (let n of e) {
|
|
486
|
-
if (
|
|
486
|
+
if (de(n)) {
|
|
487
487
|
t.add(n.customType);
|
|
488
488
|
continue;
|
|
489
489
|
}
|
|
490
490
|
if (n.type === "section") {
|
|
491
491
|
let e = n.children;
|
|
492
492
|
if (!e) continue;
|
|
493
|
-
for (let n of e)
|
|
494
|
-
} else
|
|
493
|
+
for (let n of e) Rn(n, t);
|
|
494
|
+
} else Pe(n) && Rn(n.children, t);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
//#endregion
|
|
498
498
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
499
|
-
var
|
|
499
|
+
var zn = [
|
|
500
500
|
{
|
|
501
501
|
type: "section",
|
|
502
|
-
createBlock:
|
|
502
|
+
createBlock: te
|
|
503
503
|
},
|
|
504
504
|
{
|
|
505
505
|
type: "title",
|
|
506
|
-
createBlock:
|
|
506
|
+
createBlock: le
|
|
507
507
|
},
|
|
508
508
|
{
|
|
509
509
|
type: "paragraph",
|
|
@@ -511,27 +511,27 @@ var In = [
|
|
|
511
511
|
},
|
|
512
512
|
{
|
|
513
513
|
type: "image",
|
|
514
|
-
createBlock:
|
|
514
|
+
createBlock: ie
|
|
515
515
|
},
|
|
516
516
|
{
|
|
517
517
|
type: "button",
|
|
518
|
-
createBlock:
|
|
518
|
+
createBlock: ae
|
|
519
519
|
},
|
|
520
520
|
{
|
|
521
521
|
type: "divider",
|
|
522
|
-
createBlock:
|
|
522
|
+
createBlock: Se
|
|
523
523
|
},
|
|
524
524
|
{
|
|
525
525
|
type: "video",
|
|
526
|
-
createBlock:
|
|
526
|
+
createBlock: ee
|
|
527
527
|
},
|
|
528
528
|
{
|
|
529
529
|
type: "social",
|
|
530
|
-
createBlock:
|
|
530
|
+
createBlock: se
|
|
531
531
|
},
|
|
532
532
|
{
|
|
533
533
|
type: "menu",
|
|
534
|
-
createBlock:
|
|
534
|
+
createBlock: oe
|
|
535
535
|
},
|
|
536
536
|
{
|
|
537
537
|
type: "table",
|
|
@@ -539,19 +539,19 @@ var In = [
|
|
|
539
539
|
},
|
|
540
540
|
{
|
|
541
541
|
type: "spacer",
|
|
542
|
-
createBlock:
|
|
542
|
+
createBlock: Fe
|
|
543
543
|
},
|
|
544
544
|
{
|
|
545
545
|
type: "html",
|
|
546
|
-
createBlock:
|
|
546
|
+
createBlock: re
|
|
547
547
|
},
|
|
548
548
|
{
|
|
549
549
|
type: "countdown",
|
|
550
|
-
createBlock:
|
|
550
|
+
createBlock: Ce
|
|
551
551
|
}
|
|
552
552
|
];
|
|
553
|
-
function
|
|
554
|
-
for (let n of
|
|
553
|
+
function Bn(e, t) {
|
|
554
|
+
for (let n of zn) {
|
|
555
555
|
let r = t[n.type];
|
|
556
556
|
r && e.registerBuiltIn(n.type, {
|
|
557
557
|
component: r,
|
|
@@ -561,33 +561,33 @@ function Ln(e, t) {
|
|
|
561
561
|
}
|
|
562
562
|
//#endregion
|
|
563
563
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
564
|
-
function
|
|
564
|
+
function Vn(e) {
|
|
565
565
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
566
566
|
}
|
|
567
567
|
//#endregion
|
|
568
568
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
569
|
-
function
|
|
569
|
+
function Hn(e) {
|
|
570
570
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
571
571
|
}
|
|
572
|
-
function
|
|
573
|
-
let r = new Set(e.map((e) =>
|
|
574
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
572
|
+
function Un(e, t, n) {
|
|
573
|
+
let r = new Set(e.map((e) => Wt(e))), i = [], a = (e, t) => {
|
|
574
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Wt(o)) && i.push(`${t}.${n}: ${o}`) : Hn(o) && a(o, `${t}.${n}`);
|
|
575
575
|
}, o = t;
|
|
576
|
-
for (let [e, t] of Object.entries(
|
|
576
|
+
for (let [e, t] of Object.entries(Ae)) {
|
|
577
577
|
let n = o?.[e];
|
|
578
578
|
a({
|
|
579
579
|
...t,
|
|
580
|
-
...
|
|
580
|
+
...Hn(n) ? n : {}
|
|
581
581
|
}, e);
|
|
582
582
|
}
|
|
583
583
|
return a({
|
|
584
|
-
...
|
|
584
|
+
...ne,
|
|
585
585
|
...n ?? {}
|
|
586
586
|
}, "template"), i;
|
|
587
587
|
}
|
|
588
588
|
//#endregion
|
|
589
589
|
//#region src/utils/localizedBlockDefaults.ts
|
|
590
|
-
function
|
|
590
|
+
function Wn(e) {
|
|
591
591
|
return {
|
|
592
592
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
593
593
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -596,59 +596,59 @@ function Vn(e) {
|
|
|
596
596
|
}
|
|
597
597
|
//#endregion
|
|
598
598
|
//#region src/i18n/index.ts
|
|
599
|
-
var
|
|
600
|
-
"./locales/ca.ts": () => import("./ca
|
|
601
|
-
"./locales/de.ts": () => import("./de-
|
|
602
|
-
"./locales/en.ts": () => import("./en-
|
|
603
|
-
"./locales/es.ts": () => import("./es-
|
|
604
|
-
"./locales/fr.ts": () => import("./fr-
|
|
605
|
-
"./locales/ja.ts": () => import("./ja-
|
|
606
|
-
"./locales/nl.ts": () => import("./nl-
|
|
607
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
608
|
-
}),
|
|
599
|
+
var Gn = /* #__PURE__ */ Object.assign({
|
|
600
|
+
"./locales/ca.ts": () => import("./ca--zGWn9AU.js"),
|
|
601
|
+
"./locales/de.ts": () => import("./de-BRNLKcDl.js"),
|
|
602
|
+
"./locales/en.ts": () => import("./en-JJjqHMjy.js"),
|
|
603
|
+
"./locales/es.ts": () => import("./es-BIh8BxV9.js"),
|
|
604
|
+
"./locales/fr.ts": () => import("./fr-C5VUZogP.js"),
|
|
605
|
+
"./locales/ja.ts": () => import("./ja-x5JYxaCW.js"),
|
|
606
|
+
"./locales/nl.ts": () => import("./nl-UXxFyXV6.js"),
|
|
607
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-DHm3SP6W.js")
|
|
608
|
+
}), Kn = /* #__PURE__ */ Object.assign({
|
|
609
609
|
"./locales/cloud/de.ts": () => import("./de-mMY5yQJu.js"),
|
|
610
610
|
"./locales/cloud/en.ts": () => import("./en-ChVeGQBY.js"),
|
|
611
611
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-CoCwRUi0.js")
|
|
612
612
|
});
|
|
613
|
-
function
|
|
613
|
+
function qn(e) {
|
|
614
614
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
615
615
|
}
|
|
616
|
-
var
|
|
617
|
-
function
|
|
616
|
+
var Jn = qn(Gn), Yn = qn(Kn);
|
|
617
|
+
function Xn(e) {
|
|
618
618
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
let n =
|
|
622
|
-
return t.find((e) =>
|
|
620
|
+
function Zn(e, t) {
|
|
621
|
+
let n = Xn(e);
|
|
622
|
+
return t.find((e) => Xn(e) === n);
|
|
623
623
|
}
|
|
624
|
-
function
|
|
625
|
-
return
|
|
624
|
+
function Qn(e) {
|
|
625
|
+
return Xn(e).split("-")[0];
|
|
626
626
|
}
|
|
627
|
-
function
|
|
628
|
-
return
|
|
627
|
+
function $n(e, t) {
|
|
628
|
+
return Zn(e, t) ?? Zn(Qn(e), t);
|
|
629
629
|
}
|
|
630
|
-
function
|
|
631
|
-
return
|
|
630
|
+
function er(e, t) {
|
|
631
|
+
return $n(e, t) ?? "en";
|
|
632
632
|
}
|
|
633
|
-
async function
|
|
634
|
-
let t =
|
|
633
|
+
async function tr(e) {
|
|
634
|
+
let t = Gn[`./locales/${er(e, Jn)}.ts`];
|
|
635
635
|
return (await t()).default;
|
|
636
636
|
}
|
|
637
|
-
async function
|
|
638
|
-
let t =
|
|
637
|
+
async function nr(e) {
|
|
638
|
+
let t = Kn[`./locales/cloud/${er(e, Yn)}.ts`];
|
|
639
639
|
return (await t()).default;
|
|
640
640
|
}
|
|
641
|
-
function
|
|
642
|
-
return
|
|
641
|
+
function rr(e) {
|
|
642
|
+
return $n(e, Jn) !== void 0;
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
return
|
|
644
|
+
function ir(e) {
|
|
645
|
+
return $n(e, Yn) !== void 0;
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
return [...
|
|
647
|
+
function ar() {
|
|
648
|
+
return [...Jn];
|
|
649
649
|
}
|
|
650
|
-
function
|
|
651
|
-
return [...
|
|
650
|
+
function or() {
|
|
651
|
+
return [...Yn];
|
|
652
652
|
}
|
|
653
653
|
//#endregion
|
|
654
654
|
//#region src/i18n/contentDefaults.ts
|
|
@@ -717,16 +717,16 @@ var $ = {
|
|
|
717
717
|
seconds: "秒",
|
|
718
718
|
expired: "このオファーは終了しました"
|
|
719
719
|
}
|
|
720
|
-
},
|
|
721
|
-
function
|
|
720
|
+
}, sr = new Map(Object.keys($).map((e) => [e.toLowerCase(), e]));
|
|
721
|
+
function cr(e) {
|
|
722
722
|
if (!e) return $.en;
|
|
723
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
723
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = sr.get(t);
|
|
724
724
|
if (n) return $[n];
|
|
725
|
-
let r =
|
|
725
|
+
let r = sr.get(Qn(t));
|
|
726
726
|
return r ? $[r] : $.en;
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
let t =
|
|
728
|
+
function lr(e) {
|
|
729
|
+
let t = cr(e);
|
|
730
730
|
return {
|
|
731
731
|
video: { alt: t.video },
|
|
732
732
|
countdown: {
|
|
@@ -740,9 +740,9 @@ function or(e) {
|
|
|
740
740
|
}
|
|
741
741
|
//#endregion
|
|
742
742
|
//#region src/utils/collectColorFieldIssues.ts
|
|
743
|
-
function
|
|
743
|
+
function ur(e, t) {
|
|
744
744
|
let n = [], r = (r, i) => {
|
|
745
|
-
let a =
|
|
745
|
+
let a = Ie(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
746
746
|
if (a.invalidPresets.length > 0 && n.push({
|
|
747
747
|
id: s("invalid-presets"),
|
|
748
748
|
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." : "")
|
|
@@ -753,8 +753,8 @@ function sr(e, t) {
|
|
|
753
753
|
id: s("allow-custom-ignored"),
|
|
754
754
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
755
755
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
756
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
757
|
-
e !== "" && !t.has(
|
|
756
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Wt(e)));
|
|
757
|
+
e !== "" && !t.has(Wt(e)) && n.push({
|
|
758
758
|
id: s("off-palette-default"),
|
|
759
759
|
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.`
|
|
760
760
|
});
|
|
@@ -766,7 +766,7 @@ function sr(e, t) {
|
|
|
766
766
|
}
|
|
767
767
|
//#endregion
|
|
768
768
|
//#region src/utils/keyboardShortcuts.ts
|
|
769
|
-
function
|
|
769
|
+
function dr(e) {
|
|
770
770
|
for (let t of e.composedPath()) {
|
|
771
771
|
if (!(t instanceof HTMLElement)) continue;
|
|
772
772
|
if (t.isContentEditable) return !0;
|
|
@@ -775,18 +775,18 @@ function cr(e) {
|
|
|
775
775
|
}
|
|
776
776
|
return !1;
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function fr(e, t) {
|
|
779
779
|
let n = e.metaKey || e.ctrlKey;
|
|
780
780
|
if (n && e.key.toLowerCase() === "s") {
|
|
781
781
|
e.preventDefault(), t.onSave?.();
|
|
782
782
|
return;
|
|
783
783
|
}
|
|
784
784
|
if (n && e.key.toLowerCase() === "z") {
|
|
785
|
-
if (
|
|
785
|
+
if (dr(e)) return;
|
|
786
786
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
787
787
|
return;
|
|
788
788
|
}
|
|
789
|
-
if (t.isPicking?.() && !
|
|
789
|
+
if (t.isPicking?.() && !dr(e)) {
|
|
790
790
|
if (e.key === "Escape") {
|
|
791
791
|
e.preventDefault(), t.onCancelPick?.();
|
|
792
792
|
return;
|
|
@@ -804,11 +804,57 @@ function lr(e, t) {
|
|
|
804
804
|
t.selectBlock(null);
|
|
805
805
|
return;
|
|
806
806
|
}
|
|
807
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
807
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !dr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
808
|
+
}
|
|
809
|
+
//#endregion
|
|
810
|
+
//#region src/utils/blockComponentResolver.ts
|
|
811
|
+
function pr(e) {
|
|
812
|
+
let t = { fontFamily: e.fontFamily };
|
|
813
|
+
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;
|
|
814
|
+
}
|
|
815
|
+
function mr(e, t, n) {
|
|
816
|
+
if (t) {
|
|
817
|
+
let n = t.getComponent(e);
|
|
818
|
+
if (n) return n;
|
|
819
|
+
}
|
|
820
|
+
return n[e.type] ?? null;
|
|
821
|
+
}
|
|
822
|
+
function hr(e) {
|
|
823
|
+
if (e.type === "wrapper") return {};
|
|
824
|
+
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
825
|
+
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
826
|
+
backgroundColor: n || "transparent"
|
|
827
|
+
};
|
|
828
|
+
if ((e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? xe.paragraphGap : xe.paragraphGap}px`), e.type === "section") {
|
|
829
|
+
let t = W(e.borderRadius);
|
|
830
|
+
t !== null && (r.borderRadius = t), Object.assign(r, gr(e.border));
|
|
831
|
+
}
|
|
832
|
+
return r;
|
|
833
|
+
}
|
|
834
|
+
function gr(e) {
|
|
835
|
+
let t = {};
|
|
836
|
+
for (let [n, r] of Object.entries(pe(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
837
|
+
return t;
|
|
838
|
+
}
|
|
839
|
+
function _r(e) {
|
|
840
|
+
if (e.type !== "section" || !e.wrapper) return null;
|
|
841
|
+
let t = e.wrapper, n = {};
|
|
842
|
+
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`);
|
|
843
|
+
let r = W(t.borderRadius);
|
|
844
|
+
return r !== null && (n.borderRadius = r), n;
|
|
845
|
+
}
|
|
846
|
+
function vr(e) {
|
|
847
|
+
if (e.type !== "wrapper") return null;
|
|
848
|
+
let t = {};
|
|
849
|
+
if (e.styles.backgroundColor && (t.backgroundColor = e.styles.backgroundColor), e.styles.padding) {
|
|
850
|
+
let n = e.styles.padding;
|
|
851
|
+
t.padding = `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`;
|
|
852
|
+
}
|
|
853
|
+
return e.borderRadius && e.borderRadius > 0 && (t.borderRadius = `${e.borderRadius}px`), t;
|
|
808
854
|
}
|
|
809
855
|
//#endregion
|
|
810
856
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
811
|
-
function
|
|
857
|
+
function yr(e, t, n, r = !1) {
|
|
812
858
|
if (!e) return [];
|
|
813
859
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
814
860
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -818,10 +864,10 @@ function ur(e, t, n, r = !1) {
|
|
|
818
864
|
});
|
|
819
865
|
let i = s[0];
|
|
820
866
|
if (_e(i, n)) {
|
|
821
|
-
let e = r ?
|
|
867
|
+
let e = r ? Me(i, t) : void 0;
|
|
822
868
|
a.push(e === void 0 ? {
|
|
823
869
|
type: "tag",
|
|
824
|
-
value:
|
|
870
|
+
value: Oe(i, t)
|
|
825
871
|
} : {
|
|
826
872
|
type: "text",
|
|
827
873
|
value: e
|
|
@@ -842,20 +888,20 @@ function ur(e, t, n, r = !1) {
|
|
|
842
888
|
}
|
|
843
889
|
//#endregion
|
|
844
890
|
//#region src/components/MergeTagPreviewText.vue
|
|
845
|
-
var
|
|
891
|
+
var br = d({
|
|
846
892
|
name: "MergeTagPreviewText",
|
|
847
893
|
props: { text: {
|
|
848
894
|
type: String,
|
|
849
895
|
required: !0
|
|
850
896
|
} },
|
|
851
897
|
setup(e) {
|
|
852
|
-
let t = n(
|
|
898
|
+
let t = n(q, K), r = n(pt, je.liquid), i = n(J, null), a = b(() => yr(e.text, t.value, r, i?.value ?? !1));
|
|
853
899
|
return () => a.value.map((e, t) => e.type === "tag" ? I("span", {
|
|
854
900
|
key: t,
|
|
855
901
|
class: "tpl-merge-tag-label"
|
|
856
902
|
}, e.value) : e.value);
|
|
857
903
|
}
|
|
858
|
-
}),
|
|
904
|
+
}), xr = ["href"], Sr = /* @__PURE__ */ d({
|
|
859
905
|
__name: "ButtonBlock",
|
|
860
906
|
props: {
|
|
861
907
|
block: {},
|
|
@@ -871,23 +917,23 @@ var dr = d({
|
|
|
871
917
|
fontSize: `${t.block.fontSize}px`,
|
|
872
918
|
fontWeight: "bold",
|
|
873
919
|
textDecoration: "none",
|
|
874
|
-
borderRadius: `${t.block.borderRadius}px
|
|
920
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : W(t.block.borderRadius) ?? "0px",
|
|
875
921
|
textAlign: "center"
|
|
876
922
|
};
|
|
877
|
-
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;
|
|
923
|
+
return Object.assign(e, gr(t.block.border)), 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;
|
|
878
924
|
}), r = b(() => ({ textAlign: t.block.align ?? "center" }));
|
|
879
925
|
return (t, i) => (s(), x("div", { style: D(r.value) }, [k("a", {
|
|
880
926
|
href: e.block.url || "#",
|
|
881
927
|
style: D(n.value),
|
|
882
928
|
class: "tpl:cursor-default",
|
|
883
929
|
onClick: i[0] ||= E(() => {}, ["prevent"])
|
|
884
|
-
}, [g(
|
|
930
|
+
}, [g(br, { text: e.block.text }, null, 8, ["text"])], 12, xr)], 4));
|
|
885
931
|
}
|
|
886
|
-
}),
|
|
932
|
+
}), Cr = ["innerHTML"], wr = [
|
|
887
933
|
"src",
|
|
888
934
|
"width",
|
|
889
935
|
"height"
|
|
890
|
-
],
|
|
936
|
+
], Tr = /* @__PURE__ */ d({
|
|
891
937
|
__name: "CustomBlockIcon",
|
|
892
938
|
props: {
|
|
893
939
|
icon: {},
|
|
@@ -903,24 +949,24 @@ var dr = d({
|
|
|
903
949
|
height: `${n.value}px`
|
|
904
950
|
}),
|
|
905
951
|
innerHTML: e.icon
|
|
906
|
-
}, null, 12,
|
|
952
|
+
}, null, 12, Cr)) : i.value ? (s(), x("img", {
|
|
907
953
|
key: 1,
|
|
908
954
|
src: e.icon,
|
|
909
955
|
width: n.value,
|
|
910
956
|
height: n.value,
|
|
911
957
|
class: "tpl:inline-block",
|
|
912
958
|
alt: ""
|
|
913
|
-
}, null, 8,
|
|
959
|
+
}, null, 8, wr)) : (s(), O(h(Yt), {
|
|
914
960
|
key: 2,
|
|
915
961
|
size: n.value,
|
|
916
962
|
"stroke-width": 1.5
|
|
917
963
|
}, null, 8, ["size"]));
|
|
918
964
|
}
|
|
919
|
-
}),
|
|
920
|
-
function
|
|
921
|
-
let r =
|
|
965
|
+
}), Er = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
966
|
+
function Dr(e, n) {
|
|
967
|
+
let r = gn(), i = null, a = null, o = null;
|
|
922
968
|
function s() {
|
|
923
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
969
|
+
return e.value ? Array.from(e.value.querySelectorAll(Er)).filter((e) => e.offsetParent !== null) : [];
|
|
924
970
|
}
|
|
925
971
|
function c(e) {
|
|
926
972
|
if (e.key !== "Tab") return;
|
|
@@ -935,7 +981,7 @@ function vr(e, n) {
|
|
|
935
981
|
o = null;
|
|
936
982
|
let t = s();
|
|
937
983
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
938
|
-
}), a =
|
|
984
|
+
}), a = G(e, "keydown", c);
|
|
939
985
|
}
|
|
940
986
|
function u(e = {}) {
|
|
941
987
|
let t = e.restoreFocus !== !1;
|
|
@@ -950,8 +996,8 @@ function vr(e, n) {
|
|
|
950
996
|
}
|
|
951
997
|
//#endregion
|
|
952
998
|
//#region src/composables/useEmoji.ts
|
|
953
|
-
function
|
|
954
|
-
let [e, n] =
|
|
999
|
+
function Or() {
|
|
1000
|
+
let [e, n] = Ye(!1), r = y([]), i = !1;
|
|
955
1001
|
m(() => {
|
|
956
1002
|
i = !0;
|
|
957
1003
|
}), t(e, async (e) => {
|
|
@@ -976,7 +1022,7 @@ function yr() {
|
|
|
976
1022
|
}
|
|
977
1023
|
//#endregion
|
|
978
1024
|
//#region src/composables/useFonts.ts
|
|
979
|
-
var
|
|
1025
|
+
var kr = [
|
|
980
1026
|
{
|
|
981
1027
|
value: "Arial",
|
|
982
1028
|
label: "Arial"
|
|
@@ -1005,7 +1051,7 @@ var br = [
|
|
|
1005
1051
|
value: "Courier New",
|
|
1006
1052
|
label: "Courier New"
|
|
1007
1053
|
}
|
|
1008
|
-
],
|
|
1054
|
+
], Ar = {
|
|
1009
1055
|
arial: "Arial, sans-serif",
|
|
1010
1056
|
helvetica: "Helvetica, sans-serif",
|
|
1011
1057
|
georgia: "Georgia, serif",
|
|
@@ -1013,23 +1059,23 @@ var br = [
|
|
|
1013
1059
|
verdana: "Verdana, sans-serif",
|
|
1014
1060
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1015
1061
|
"courier new": "'Courier New', monospace"
|
|
1016
|
-
},
|
|
1017
|
-
function
|
|
1018
|
-
if (e === void 0 || e === !0) return [...
|
|
1062
|
+
}, jr = "Arial, sans-serif";
|
|
1063
|
+
function Mr(e) {
|
|
1064
|
+
if (e === void 0 || e === !0) return [...kr];
|
|
1019
1065
|
if (e === !1) return [];
|
|
1020
1066
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1021
1067
|
for (let i of e) {
|
|
1022
|
-
let e = i.toLowerCase(), a =
|
|
1068
|
+
let e = i.toLowerCase(), a = kr.find((t) => t.value.toLowerCase() === e);
|
|
1023
1069
|
if (!a) {
|
|
1024
|
-
r.has(e) || (r.add(e),
|
|
1070
|
+
r.has(e) || (r.add(e), Z.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${kr.map((e) => e.value).join(", ")}.`));
|
|
1025
1071
|
continue;
|
|
1026
1072
|
}
|
|
1027
1073
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
1028
1074
|
}
|
|
1029
1075
|
return t;
|
|
1030
1076
|
}
|
|
1031
|
-
function
|
|
1032
|
-
let t = l(e?.customFonts ?? []), n = l(!1), r =
|
|
1077
|
+
function Nr(e) {
|
|
1078
|
+
let t = l(e?.customFonts ?? []), n = l(!1), r = Mr(e?.builtIns), i = b(() => e?.defaultFallback ?? jr), a = b(() => {
|
|
1033
1079
|
let e = [...r], n = t.value.map((e) => ({
|
|
1034
1080
|
value: e.name,
|
|
1035
1081
|
label: e.name,
|
|
@@ -1040,20 +1086,20 @@ function wr(e) {
|
|
|
1040
1086
|
function s(e) {
|
|
1041
1087
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1042
1088
|
}
|
|
1043
|
-
let c = e?.defaultFont ??
|
|
1044
|
-
s(c) ||
|
|
1089
|
+
let c = e?.defaultFont ?? jr.split(",")[0].trim();
|
|
1090
|
+
s(c) || Z.warn(`config.fonts: new templates seed "${c}", 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.`);
|
|
1045
1091
|
function u() {
|
|
1046
1092
|
if (e?.defaultFont && s(e.defaultFont)) {
|
|
1047
1093
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1048
1094
|
if (t) return t.value;
|
|
1049
1095
|
}
|
|
1050
|
-
return
|
|
1096
|
+
return jr;
|
|
1051
1097
|
}
|
|
1052
1098
|
let d = b(() => u());
|
|
1053
1099
|
function f(e) {
|
|
1054
1100
|
if (!e) return i.value;
|
|
1055
1101
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
1056
|
-
return n ? `'${n.name}', ${n.fallback ?? i.value}` :
|
|
1102
|
+
return n ? `'${n.name}', ${n.fallback ?? i.value}` : Ar[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1057
1103
|
}
|
|
1058
1104
|
let p = [], h = !1;
|
|
1059
1105
|
async function g() {
|
|
@@ -1069,7 +1115,7 @@ function wr(e) {
|
|
|
1069
1115
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1070
1116
|
});
|
|
1071
1117
|
} catch (t) {
|
|
1072
|
-
|
|
1118
|
+
Z.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1073
1119
|
}
|
|
1074
1120
|
});
|
|
1075
1121
|
await Promise.allSettled(e), !h && (n.value = !0);
|
|
@@ -1094,7 +1140,7 @@ function wr(e) {
|
|
|
1094
1140
|
}
|
|
1095
1141
|
//#endregion
|
|
1096
1142
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1097
|
-
function
|
|
1143
|
+
function Pr(e, t, n) {
|
|
1098
1144
|
return ge(e, n) ? {
|
|
1099
1145
|
type: "logicMergeTagNode",
|
|
1100
1146
|
attrs: {
|
|
@@ -1111,15 +1157,15 @@ function Tr(e, t, n) {
|
|
|
1111
1157
|
}
|
|
1112
1158
|
//#endregion
|
|
1113
1159
|
//#region src/utils/insertLogicTag.ts
|
|
1114
|
-
function
|
|
1160
|
+
function Fr(e) {
|
|
1115
1161
|
return "before" in e && "after" in e;
|
|
1116
1162
|
}
|
|
1117
|
-
function
|
|
1118
|
-
if (!
|
|
1119
|
-
e.chain().focus().insertContent(
|
|
1163
|
+
function Ir(e, t, n) {
|
|
1164
|
+
if (!Fr(t)) {
|
|
1165
|
+
e.chain().focus().insertContent(Pr(t.value, t.label, n)).run();
|
|
1120
1166
|
return;
|
|
1121
1167
|
}
|
|
1122
|
-
let r =
|
|
1168
|
+
let r = Pr(t.before, t.label, n), i = Pr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1123
1169
|
if (a !== o) {
|
|
1124
1170
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1125
1171
|
return;
|
|
@@ -1128,20 +1174,20 @@ function Dr(e, t, n) {
|
|
|
1128
1174
|
}
|
|
1129
1175
|
//#endregion
|
|
1130
1176
|
//#region src/utils/linkColorExtension.ts
|
|
1131
|
-
function
|
|
1177
|
+
function Lr(e) {
|
|
1132
1178
|
if (!e) return null;
|
|
1133
1179
|
let t = e.trim();
|
|
1134
1180
|
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;
|
|
1135
1181
|
}
|
|
1136
|
-
function
|
|
1182
|
+
function Rr(e) {
|
|
1137
1183
|
return e.extend({ addAttributes() {
|
|
1138
1184
|
return {
|
|
1139
1185
|
...this.parent?.(),
|
|
1140
1186
|
color: {
|
|
1141
1187
|
default: null,
|
|
1142
|
-
parseHTML: (e) =>
|
|
1188
|
+
parseHTML: (e) => Lr(Ut(e.style.color)),
|
|
1143
1189
|
renderHTML: (e) => {
|
|
1144
|
-
let t =
|
|
1190
|
+
let t = Lr(e.color);
|
|
1145
1191
|
return t ? { style: `color: ${t}` } : {};
|
|
1146
1192
|
}
|
|
1147
1193
|
}
|
|
@@ -1150,9 +1196,9 @@ function kr(e) {
|
|
|
1150
1196
|
}
|
|
1151
1197
|
//#endregion
|
|
1152
1198
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1153
|
-
function
|
|
1199
|
+
function zr(e, t = je.liquid) {
|
|
1154
1200
|
let n = l(!1), r = l(""), i = l(""), a = l(null);
|
|
1155
|
-
|
|
1201
|
+
Dr(a, n);
|
|
1156
1202
|
function o() {
|
|
1157
1203
|
let t = e.value?.getAttributes("link") ?? {};
|
|
1158
1204
|
r.value = t.href || "", i.value = t.color || "", n.value = !0;
|
|
@@ -1161,7 +1207,7 @@ function Ar(e, t = Ae.liquid) {
|
|
|
1161
1207
|
if (r.value) {
|
|
1162
1208
|
let t = d(r.value);
|
|
1163
1209
|
if (t !== null) {
|
|
1164
|
-
let n =
|
|
1210
|
+
let n = Lr(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1165
1211
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
1166
1212
|
}
|
|
1167
1213
|
}
|
|
@@ -1211,13 +1257,13 @@ function Ar(e, t = Ae.liquid) {
|
|
|
1211
1257
|
}
|
|
1212
1258
|
//#endregion
|
|
1213
1259
|
//#region src/composables/useRichTextEditor.ts
|
|
1214
|
-
function
|
|
1215
|
-
let i = n(
|
|
1260
|
+
function Br(r) {
|
|
1261
|
+
let i = n(Y, null), { mergeTags: a, canRequestMergeTag: o, isRequesting: s, requestMergeTag: c, syntax: u, autocomplete: d } = _n(), { canInsertLogicTag: f, isRequesting: p, requestLogicTag: m } = vn(), h = n(yt, null), g = (A(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", _ = we(u), v = y(null), b = () => H(i?.content?.value?.settings ?? { locale: "en" });
|
|
1216
1262
|
t(b, (e) => {
|
|
1217
1263
|
let t = v.value?.view.dom;
|
|
1218
1264
|
t && t.setAttribute("dir", e);
|
|
1219
1265
|
});
|
|
1220
|
-
let { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } =
|
|
1266
|
+
let { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = zr(v, u), { start: j, stop: M } = qe(() => v.value?.commands.focus("end"), 0, { immediate: !1 }), N = y(null), P = l(!0), F = l(null), I = !1;
|
|
1221
1267
|
async function L() {
|
|
1222
1268
|
F.value = null, P.value = !0;
|
|
1223
1269
|
try {
|
|
@@ -1248,7 +1294,7 @@ function jr(r) {
|
|
|
1248
1294
|
v.value = s, P.value = !1, j();
|
|
1249
1295
|
} catch (e) {
|
|
1250
1296
|
if (I) return;
|
|
1251
|
-
|
|
1297
|
+
Z.error(`[${r.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
|
|
1252
1298
|
}
|
|
1253
1299
|
}
|
|
1254
1300
|
function R() {
|
|
@@ -1266,7 +1312,7 @@ function jr(r) {
|
|
|
1266
1312
|
let i = t.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1267
1313
|
n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog") || i || r.onDone();
|
|
1268
1314
|
}
|
|
1269
|
-
|
|
1315
|
+
G(document, "mousedown", B), e(() => {
|
|
1270
1316
|
I = !0, z(), M(), v.value?.destroy();
|
|
1271
1317
|
});
|
|
1272
1318
|
async function V() {
|
|
@@ -1276,9 +1322,9 @@ function jr(r) {
|
|
|
1276
1322
|
value: e.value
|
|
1277
1323
|
}).run() : v.value?.commands.focus());
|
|
1278
1324
|
}
|
|
1279
|
-
async function
|
|
1325
|
+
async function ee() {
|
|
1280
1326
|
let e = await m();
|
|
1281
|
-
I || (e && v.value ?
|
|
1327
|
+
I || (e && v.value ? Ir(v.value, e, u) : v.value?.commands.focus());
|
|
1282
1328
|
}
|
|
1283
1329
|
return {
|
|
1284
1330
|
editor: v,
|
|
@@ -1302,14 +1348,14 @@ function jr(r) {
|
|
|
1302
1348
|
closeLinkDialog: O,
|
|
1303
1349
|
handleLinkKeydown: k,
|
|
1304
1350
|
handleAddMergeTag: V,
|
|
1305
|
-
handleAddLogicTag:
|
|
1351
|
+
handleAddLogicTag: ee
|
|
1306
1352
|
};
|
|
1307
1353
|
}
|
|
1308
1354
|
//#endregion
|
|
1309
1355
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1310
|
-
var
|
|
1311
|
-
function
|
|
1312
|
-
let t =
|
|
1356
|
+
var Vr = "(max-width: 767px)";
|
|
1357
|
+
function Hr(e) {
|
|
1358
|
+
let t = Ze(Vr);
|
|
1313
1359
|
return {
|
|
1314
1360
|
isSmallScreen: t,
|
|
1315
1361
|
showNotice: b(() => (j(e) ?? !0) && t.value)
|
|
@@ -1317,20 +1363,20 @@ function Nr(e) {
|
|
|
1317
1363
|
}
|
|
1318
1364
|
//#endregion
|
|
1319
1365
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1320
|
-
var
|
|
1366
|
+
var Ur = { class: "tpl:w-full" }, Wr = {
|
|
1321
1367
|
key: 0,
|
|
1322
1368
|
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)]"
|
|
1323
|
-
},
|
|
1369
|
+
}, Gr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Kr = {
|
|
1324
1370
|
key: 1,
|
|
1325
1371
|
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)]"
|
|
1326
|
-
},
|
|
1372
|
+
}, qr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Jr = {
|
|
1327
1373
|
key: 2,
|
|
1328
1374
|
class: "tpl:relative"
|
|
1329
|
-
},
|
|
1375
|
+
}, Yr = ["innerHTML"], Xr = {
|
|
1330
1376
|
key: 0,
|
|
1331
1377
|
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]",
|
|
1332
1378
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1333
|
-
},
|
|
1379
|
+
}, Zr = /* @__PURE__ */ d({
|
|
1334
1380
|
__name: "CustomBlock",
|
|
1335
1381
|
props: {
|
|
1336
1382
|
block: {},
|
|
@@ -1338,7 +1384,7 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1338
1384
|
},
|
|
1339
1385
|
emits: ["fetchData"],
|
|
1340
1386
|
setup(e, { emit: r }) {
|
|
1341
|
-
let i = e, a = r, { t: o } =
|
|
1387
|
+
let i = e, a = r, { t: o } = X(), c = n(Lt, null), u = l(""), d = l(!1), f = b(() => c?.getDefinition(i.block.customType)), p = b(() => !!f.value), m = b(() => i.block), { isFetching: _, fetch: v, needsFetch: y, hasDataSource: C } = ze({
|
|
1342
1388
|
definition: f,
|
|
1343
1389
|
block: m,
|
|
1344
1390
|
onUpdate: (e, t) => {
|
|
@@ -1347,10 +1393,10 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1347
1393
|
dataSourceFetched: t
|
|
1348
1394
|
});
|
|
1349
1395
|
}
|
|
1350
|
-
}), T = n(
|
|
1396
|
+
}), T = n(q, K), D = n(J, null), A = b(() => {
|
|
1351
1397
|
if (!D?.value) return i.block;
|
|
1352
1398
|
let e = {};
|
|
1353
|
-
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
1399
|
+
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? fe(n, T.value) : n;
|
|
1354
1400
|
return {
|
|
1355
1401
|
...i.block,
|
|
1356
1402
|
fieldValues: e
|
|
@@ -1367,17 +1413,17 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1367
1413
|
}
|
|
1368
1414
|
}
|
|
1369
1415
|
}
|
|
1370
|
-
let M =
|
|
1416
|
+
let M = Je(j, 150);
|
|
1371
1417
|
return w(() => {
|
|
1372
1418
|
j();
|
|
1373
1419
|
}), t(() => i.block.fieldValues, () => {
|
|
1374
1420
|
M();
|
|
1375
1421
|
}, { deep: !0 }), t(() => D?.value, () => {
|
|
1376
1422
|
M();
|
|
1377
|
-
}), (e, t) => (s(), x("div",
|
|
1423
|
+
}), (e, t) => (s(), x("div", Ur, [p.value ? d.value ? (s(), x("div", Kr, [g(h(nn), {
|
|
1378
1424
|
size: 24,
|
|
1379
1425
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1380
|
-
}), k("span",
|
|
1426
|
+
}), k("span", qr, F(h(o).customBlocks.renderError), 1)])) : (s(), x("div", Jr, [k("div", { innerHTML: u.value }, null, 8, Yr), h(C) && h(y) ? (s(), x("div", Xr, [h(_) ? (s(), O(mn, {
|
|
1381
1427
|
key: 1,
|
|
1382
1428
|
class: "tpl:w-48"
|
|
1383
1429
|
})) : (s(), x("button", {
|
|
@@ -1385,16 +1431,16 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1385
1431
|
type: "button",
|
|
1386
1432
|
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-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1387
1433
|
onClick: t[0] ||= E((...e) => h(v) && h(v)(...e), ["stop"])
|
|
1388
|
-
}, [f.value?.icon ? (s(), O(
|
|
1434
|
+
}, [f.value?.icon ? (s(), O(Tr, {
|
|
1389
1435
|
key: 0,
|
|
1390
1436
|
icon: f.value.icon,
|
|
1391
1437
|
size: 16
|
|
1392
|
-
}, null, 8, ["icon"])) : S("", !0), R(" " + F(f.value?.dataSource?.label || h(o).customBlocks.dataSource.fetchButton), 1)]))])) : S("", !0)])) : (s(), x("div",
|
|
1438
|
+
}, null, 8, ["icon"])) : S("", !0), R(" " + F(f.value?.dataSource?.label || h(o).customBlocks.dataSource.fetchButton), 1)]))])) : S("", !0)])) : (s(), x("div", Wr, [g(h(Qt), {
|
|
1393
1439
|
size: 24,
|
|
1394
1440
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1395
|
-
}), k("span",
|
|
1441
|
+
}), k("span", Gr, F(h(o).customBlocks.definitionNotFound), 1)]))]));
|
|
1396
1442
|
}
|
|
1397
|
-
}),
|
|
1443
|
+
}), Qr = { class: "tpl:w-full" }, $r = /* @__PURE__ */ d({
|
|
1398
1444
|
__name: "DividerBlock",
|
|
1399
1445
|
props: {
|
|
1400
1446
|
block: {},
|
|
@@ -1406,28 +1452,28 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1406
1452
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
1407
1453
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1408
1454
|
}));
|
|
1409
|
-
return (e, t) => (s(), x("div",
|
|
1455
|
+
return (e, t) => (s(), x("div", Qr, [k("hr", {
|
|
1410
1456
|
class: "tpl:m-0 tpl:border-none",
|
|
1411
1457
|
style: D(n.value)
|
|
1412
1458
|
}, null, 4)]));
|
|
1413
1459
|
}
|
|
1414
|
-
}),
|
|
1460
|
+
}), ei = { class: "tpl:w-full" }, ti = ["srcdoc", "title"], ni = {
|
|
1415
1461
|
key: 1,
|
|
1416
1462
|
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)]"
|
|
1417
|
-
},
|
|
1463
|
+
}, ri = {
|
|
1418
1464
|
key: 0,
|
|
1419
1465
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1420
|
-
},
|
|
1466
|
+
}, ii = {
|
|
1421
1467
|
key: 1,
|
|
1422
1468
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1423
|
-
},
|
|
1469
|
+
}, ai = /* @__PURE__ */ d({
|
|
1424
1470
|
__name: "HtmlBlock",
|
|
1425
1471
|
props: {
|
|
1426
1472
|
block: {},
|
|
1427
1473
|
viewport: {}
|
|
1428
1474
|
},
|
|
1429
1475
|
setup(r) {
|
|
1430
|
-
let i = r, { t: a } =
|
|
1476
|
+
let i = r, { t: a } = X(), o = n(Ct, !1), c = b(() => i.block.content.trim().length > 0), u = b(() => o && c.value), d = n(q, K), f = n(J, null), p = b(() => f?.value ? fe(i.block.content, d.value) : i.block.content), m = l(null), _ = l(60), v = null;
|
|
1431
1477
|
function y() {
|
|
1432
1478
|
let e = m.value?.contentDocument;
|
|
1433
1479
|
e && (_.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1441,7 +1487,7 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1441
1487
|
e || (v?.disconnect(), v = null);
|
|
1442
1488
|
}), e(() => {
|
|
1443
1489
|
v?.disconnect(), v = null;
|
|
1444
|
-
}), (e, t) => (s(), x("div",
|
|
1490
|
+
}), (e, t) => (s(), x("div", ei, [u.value ? (s(), x("iframe", {
|
|
1445
1491
|
key: 0,
|
|
1446
1492
|
ref_key: "iframeRef",
|
|
1447
1493
|
ref: m,
|
|
@@ -1451,22 +1497,22 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1451
1497
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1452
1498
|
style: D({ height: `${_.value}px` }),
|
|
1453
1499
|
onLoad: S
|
|
1454
|
-
}, null, 44,
|
|
1500
|
+
}, null, 44, ti)) : (s(), x("div", ni, [g(h(sn), {
|
|
1455
1501
|
size: 24,
|
|
1456
1502
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1457
|
-
}), c.value ? (s(), x("span",
|
|
1503
|
+
}), c.value ? (s(), x("span", ri, F(h(a).html.preview), 1)) : (s(), x("span", ii, F(h(a).html.empty), 1))]))]));
|
|
1458
1504
|
}
|
|
1459
|
-
}),
|
|
1505
|
+
}), oi = ["data-drop-enabled"], si = {
|
|
1460
1506
|
key: 0,
|
|
1461
1507
|
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)]",
|
|
1462
1508
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1463
|
-
},
|
|
1509
|
+
}, ci = ["href"], li = ["src", "alt"], ui = ["src", "alt"], di = {
|
|
1464
1510
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1465
1511
|
style: { opacity: "0.7" }
|
|
1466
|
-
},
|
|
1512
|
+
}, fi = ["href"], pi = ["src", "alt"], mi = ["src", "alt"], hi = {
|
|
1467
1513
|
key: 4,
|
|
1468
1514
|
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)]"
|
|
1469
|
-
},
|
|
1515
|
+
}, gi = ["aria-label"], _i = { key: 1 }, vi = /* @__PURE__ */ d({
|
|
1470
1516
|
__name: "ImageBlock",
|
|
1471
1517
|
props: {
|
|
1472
1518
|
block: {},
|
|
@@ -1474,7 +1520,7 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1474
1520
|
},
|
|
1475
1521
|
emits: ["update"],
|
|
1476
1522
|
setup(e, { emit: t }) {
|
|
1477
|
-
let r = e, i = t, { t: a } =
|
|
1523
|
+
let r = e, i = t, { t: a } = X(), { syntax: o } = _n(), c = n(ut, null), u = n(wt, null), d = b(() => !!c), f = yn();
|
|
1478
1524
|
async function p() {
|
|
1479
1525
|
let e = await c?.({ accept: ["images"] });
|
|
1480
1526
|
if (f.alive && e) {
|
|
@@ -1482,7 +1528,7 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1482
1528
|
e.alt && (t.alt = e.alt), i("update", t);
|
|
1483
1529
|
}
|
|
1484
1530
|
}
|
|
1485
|
-
let m = l(), _ = l(!1), v = b(() => (u?.value ?? !!c) && !_.value && !
|
|
1531
|
+
let m = l(), _ = l(!1), v = b(() => (u?.value ?? !!c) && !_.value && !A.value);
|
|
1486
1532
|
async function y(e) {
|
|
1487
1533
|
if (c) {
|
|
1488
1534
|
_.value = !0;
|
|
@@ -1501,22 +1547,26 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1501
1547
|
}
|
|
1502
1548
|
}
|
|
1503
1549
|
}
|
|
1504
|
-
let { isOver: C } =
|
|
1550
|
+
let { isOver: C } = Be({
|
|
1505
1551
|
target: m,
|
|
1506
1552
|
enabled: v,
|
|
1507
1553
|
onFiles: y
|
|
1508
1554
|
}), w = b(() => ({ textAlign: r.block.align })), T = b(() => {
|
|
1555
|
+
let e = r.block.border, t = ["left", "right"].map((t) => ye(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1556
|
+
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1557
|
+
}), O = b(() => {
|
|
1509
1558
|
let e = r.block.align;
|
|
1510
1559
|
return {
|
|
1511
1560
|
maxWidth: "100%",
|
|
1512
|
-
width: r.block.width === "full" ?
|
|
1561
|
+
width: r.block.width === "full" ? T.value : `${r.block.width}px`,
|
|
1513
1562
|
height: r.block.height ? `${r.block.height}px` : void 0,
|
|
1514
|
-
borderRadius: r.block.borderRadius
|
|
1563
|
+
borderRadius: W(r.block.borderRadius) ?? void 0,
|
|
1564
|
+
...gr(r.block.border),
|
|
1515
1565
|
display: "block",
|
|
1516
1566
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1517
1567
|
marginRight: e === "center" ? "auto" : void 0
|
|
1518
1568
|
};
|
|
1519
|
-
}),
|
|
1569
|
+
}), A = b(() => U(r.block.src, o)), j = En(() => A.value ? void 0 : r.block.src), M = En(() => A.value ? r.block.placeholderUrl : void 0);
|
|
1520
1570
|
return (t, n) => (s(), x("div", {
|
|
1521
1571
|
ref_key: "dropZoneRef",
|
|
1522
1572
|
ref: m,
|
|
@@ -1524,14 +1574,14 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1524
1574
|
"data-drop-enabled": v.value,
|
|
1525
1575
|
class: "tpl:relative tpl:w-full",
|
|
1526
1576
|
style: D(w.value)
|
|
1527
|
-
}, [v.value && (h(C) || _.value) ? (s(), x("div",
|
|
1577
|
+
}, [v.value && (h(C) || _.value) ? (s(), x("div", si, [_.value ? (s(), x(P, { key: 0 }, [g(h(tn), {
|
|
1528
1578
|
class: "tpl-spinner",
|
|
1529
1579
|
size: 20,
|
|
1530
1580
|
"stroke-width": 2
|
|
1531
|
-
}), R(" " + F(h(a).image.uploading), 1)], 64)) : (s(), x(P, { key: 1 }, [g(h(
|
|
1581
|
+
}), R(" " + F(h(a).image.uploading), 1)], 64)) : (s(), x(P, { key: 1 }, [g(h(dn), {
|
|
1532
1582
|
size: 20,
|
|
1533
1583
|
"stroke-width": 1.5
|
|
1534
|
-
}), R(" " + F(h(a).image.dropToUpload), 1)], 64))])) : S("", !0), e.block.src &&
|
|
1584
|
+
}), R(" " + F(h(a).image.dropToUpload), 1)], 64))])) : S("", !0), e.block.src && A.value && e.block.placeholderUrl ? (s(), x(P, { key: 1 }, [e.block.linkUrl ? (s(), x("a", {
|
|
1535
1585
|
key: 0,
|
|
1536
1586
|
href: e.block.linkUrl,
|
|
1537
1587
|
target: "_blank",
|
|
@@ -1540,25 +1590,25 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1540
1590
|
}, [k("img", {
|
|
1541
1591
|
class: "tpl:border-0",
|
|
1542
1592
|
loading: "lazy",
|
|
1543
|
-
src: h(
|
|
1593
|
+
src: h(M),
|
|
1544
1594
|
alt: e.block.alt || h(a).image.altTextPlaceholder,
|
|
1545
|
-
style: D(
|
|
1546
|
-
}, null, 12,
|
|
1595
|
+
style: D(O.value)
|
|
1596
|
+
}, null, 12, li)], 8, ci)) : (s(), x("img", {
|
|
1547
1597
|
key: 1,
|
|
1548
1598
|
class: "tpl:border-0",
|
|
1549
|
-
src: h(
|
|
1599
|
+
src: h(M),
|
|
1550
1600
|
alt: e.block.alt,
|
|
1551
|
-
style: D(
|
|
1552
|
-
}, null, 12,
|
|
1601
|
+
style: D(O.value)
|
|
1602
|
+
}, null, 12, ui))], 64)) : e.block.src && A.value ? (s(), x("div", {
|
|
1553
1603
|
key: 2,
|
|
1554
1604
|
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)]",
|
|
1555
|
-
style: D([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" },
|
|
1556
|
-
}, [g(h(
|
|
1605
|
+
style: D([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, O.value])
|
|
1606
|
+
}, [g(h(un), {
|
|
1557
1607
|
size: 32,
|
|
1558
1608
|
"stroke-width": 1.5,
|
|
1559
1609
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1560
1610
|
style: { opacity: "0.5" }
|
|
1561
|
-
}), k("span",
|
|
1611
|
+
}), k("span", di, [g(br, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), x(P, { key: 3 }, [e.block.linkUrl ? (s(), x("a", {
|
|
1562
1612
|
key: 0,
|
|
1563
1613
|
href: e.block.linkUrl,
|
|
1564
1614
|
target: "_blank",
|
|
@@ -1567,36 +1617,36 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1567
1617
|
}, [k("img", {
|
|
1568
1618
|
class: "tpl:border-0",
|
|
1569
1619
|
loading: "lazy",
|
|
1570
|
-
src: h(
|
|
1620
|
+
src: h(j),
|
|
1571
1621
|
alt: e.block.alt || h(a).image.altTextPlaceholder,
|
|
1572
|
-
style: D(
|
|
1573
|
-
}, null, 12,
|
|
1622
|
+
style: D(O.value)
|
|
1623
|
+
}, null, 12, pi)], 8, fi)) : (s(), x("img", {
|
|
1574
1624
|
key: 1,
|
|
1575
1625
|
class: "tpl:border-0",
|
|
1576
|
-
src: h(
|
|
1626
|
+
src: h(j),
|
|
1577
1627
|
alt: e.block.alt,
|
|
1578
|
-
style: D(
|
|
1579
|
-
}, null, 12,
|
|
1628
|
+
style: D(O.value)
|
|
1629
|
+
}, null, 12, mi))], 64)) : (s(), x("div", hi, [d.value ? (s(), x("button", {
|
|
1580
1630
|
key: 0,
|
|
1581
1631
|
"aria-label": h(a).image.browseMedia,
|
|
1582
1632
|
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:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1583
1633
|
onClick: E(p, ["stop"])
|
|
1584
|
-
}, [g(h(
|
|
1634
|
+
}, [g(h(un), {
|
|
1585
1635
|
size: 14,
|
|
1586
1636
|
"stroke-width": 1.5
|
|
1587
|
-
}), R(" " + F(h(a).image.browseMedia), 1)], 8,
|
|
1637
|
+
}), R(" " + F(h(a).image.browseMedia), 1)], 8, gi)) : (s(), x("span", _i, F(h(a).image.clickToAdd), 1))]))], 12, oi));
|
|
1588
1638
|
}
|
|
1589
|
-
}),
|
|
1639
|
+
}), yi = { class: "tpl:w-full" }, bi = ["href"], xi = {
|
|
1590
1640
|
key: 1,
|
|
1591
1641
|
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)]"
|
|
1592
|
-
},
|
|
1642
|
+
}, Si = /* @__PURE__ */ d({
|
|
1593
1643
|
__name: "MenuBlock",
|
|
1594
1644
|
props: {
|
|
1595
1645
|
block: {},
|
|
1596
1646
|
viewport: {}
|
|
1597
1647
|
},
|
|
1598
1648
|
setup(e) {
|
|
1599
|
-
let t = e, { t: n } =
|
|
1649
|
+
let t = e, { t: n } = X(), i = b(() => ({
|
|
1600
1650
|
display: "flex",
|
|
1601
1651
|
flexWrap: "wrap",
|
|
1602
1652
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1608,7 +1658,7 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1608
1658
|
function o(e) {
|
|
1609
1659
|
return e || t.block.linkColor || t.block.color;
|
|
1610
1660
|
}
|
|
1611
|
-
return (t, c) => (s(), x("div",
|
|
1661
|
+
return (t, c) => (s(), x("div", yi, [a.value ? (s(), x("div", {
|
|
1612
1662
|
key: 0,
|
|
1613
1663
|
style: D(i.value)
|
|
1614
1664
|
}, [(s(!0), x(P, null, r(e.block.items, (t, n) => (s(), x(P, { key: t.id }, [k("a", {
|
|
@@ -1620,15 +1670,15 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1620
1670
|
textDecoration: t.underline ? "underline" : "none"
|
|
1621
1671
|
}),
|
|
1622
1672
|
onClick: c[0] ||= E(() => {}, ["prevent"])
|
|
1623
|
-
}, [g(
|
|
1673
|
+
}, [g(br, { text: t.text || "..." }, null, 8, ["text"])], 12, bi), n < e.block.items.length - 1 ? (s(), x("span", {
|
|
1624
1674
|
key: 0,
|
|
1625
1675
|
style: D({
|
|
1626
1676
|
color: e.block.separatorColor,
|
|
1627
1677
|
padding: `0 ${e.block.spacing}px`
|
|
1628
1678
|
})
|
|
1629
|
-
}, F(e.block.separator), 5)) : S("", !0)], 64))), 128))], 4)) : (s(), x("div",
|
|
1679
|
+
}, F(e.block.separator), 5)) : S("", !0)], 64))), 128))], 4)) : (s(), x("div", xi, [g(h(en), { size: 16 }), k("span", null, F(h(n).menu.addLinks), 1)]))]));
|
|
1630
1680
|
}
|
|
1631
|
-
}),
|
|
1681
|
+
}), Ci = /* @__PURE__ */ new Set([
|
|
1632
1682
|
"http",
|
|
1633
1683
|
"https",
|
|
1634
1684
|
"mailto",
|
|
@@ -1638,7 +1688,7 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1638
1688
|
"sms",
|
|
1639
1689
|
"xmpp",
|
|
1640
1690
|
"cid"
|
|
1641
|
-
]),
|
|
1691
|
+
]), wi = /* @__PURE__ */ new Set([
|
|
1642
1692
|
"SCRIPT",
|
|
1643
1693
|
"STYLE",
|
|
1644
1694
|
"IFRAME",
|
|
@@ -1648,7 +1698,7 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1648
1698
|
"META",
|
|
1649
1699
|
"BASE",
|
|
1650
1700
|
"FORM"
|
|
1651
|
-
]),
|
|
1701
|
+
]), Ti = /* @__PURE__ */ new Set([
|
|
1652
1702
|
"href",
|
|
1653
1703
|
"xlink:href",
|
|
1654
1704
|
"formaction",
|
|
@@ -1657,16 +1707,16 @@ var Pr = { class: "tpl:w-full" }, Fr = {
|
|
|
1657
1707
|
"background",
|
|
1658
1708
|
"poster"
|
|
1659
1709
|
]);
|
|
1660
|
-
function
|
|
1710
|
+
function Ei(e, t) {
|
|
1661
1711
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1662
1712
|
if (!n || n.startsWith("#")) return !0;
|
|
1663
1713
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1664
1714
|
if (!r) return !0;
|
|
1665
1715
|
let i = r[1].toLowerCase();
|
|
1666
|
-
return
|
|
1716
|
+
return Ci.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1667
1717
|
}
|
|
1668
|
-
function
|
|
1669
|
-
if (
|
|
1718
|
+
function Di(e) {
|
|
1719
|
+
if (wi.has(e.tagName)) {
|
|
1670
1720
|
e.remove();
|
|
1671
1721
|
return;
|
|
1672
1722
|
}
|
|
@@ -1678,29 +1728,29 @@ function vi(e) {
|
|
|
1678
1728
|
e.removeAttribute(n);
|
|
1679
1729
|
continue;
|
|
1680
1730
|
}
|
|
1681
|
-
if (
|
|
1682
|
-
|
|
1731
|
+
if (Ti.has(t)) {
|
|
1732
|
+
Ei(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
1683
1733
|
continue;
|
|
1684
1734
|
}
|
|
1685
1735
|
if (t === "src") {
|
|
1686
|
-
|
|
1736
|
+
Ei(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
1687
1737
|
continue;
|
|
1688
1738
|
}
|
|
1689
1739
|
t === "srcdoc" && e.removeAttribute(n);
|
|
1690
1740
|
}
|
|
1691
1741
|
let n = Array.from(e.children);
|
|
1692
|
-
for (let e of n)
|
|
1742
|
+
for (let e of n) Di(e);
|
|
1693
1743
|
}
|
|
1694
|
-
function
|
|
1744
|
+
function Oi(e) {
|
|
1695
1745
|
if (typeof DOMParser > "u") return e;
|
|
1696
1746
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1697
|
-
for (let e of n)
|
|
1747
|
+
for (let e of n) Di(e);
|
|
1698
1748
|
return t.innerHTML;
|
|
1699
1749
|
}
|
|
1700
1750
|
//#endregion
|
|
1701
1751
|
//#region src/composables/useEditableTextBlock.ts
|
|
1702
|
-
function
|
|
1703
|
-
let t = n(
|
|
1752
|
+
function ki(e) {
|
|
1753
|
+
let t = n(q, K), r = n(J, null), { syntax: i } = _n(), a = b(() => r?.value ? ve(e(), t.value) : Te(e(), t.value)), o = b(() => Oi(ke(a.value, i))), s = l(!1), c = l(null), { top: u, left: d } = Qe(c), { toLocal: f } = Kt(), p = b(() => f({
|
|
1704
1754
|
top: u.value - 8,
|
|
1705
1755
|
left: d.value
|
|
1706
1756
|
}));
|
|
@@ -1721,14 +1771,14 @@ function bi(e) {
|
|
|
1721
1771
|
}
|
|
1722
1772
|
//#endregion
|
|
1723
1773
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1724
|
-
var
|
|
1774
|
+
var Ai = ["innerHTML"], ji = /* @__PURE__ */ d({
|
|
1725
1775
|
__name: "ParagraphBlock",
|
|
1726
1776
|
props: {
|
|
1727
1777
|
block: {},
|
|
1728
1778
|
viewport: {}
|
|
1729
1779
|
},
|
|
1730
1780
|
setup(e) {
|
|
1731
|
-
let t = e, n = L(() => import("./ParagraphEditor-
|
|
1781
|
+
let t = e, n = L(() => import("./ParagraphEditor-J74SIn-m.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = ki(() => t.block.content);
|
|
1732
1782
|
return (t, u) => (s(), x("div", {
|
|
1733
1783
|
ref_key: "blockRef",
|
|
1734
1784
|
ref: i,
|
|
@@ -1747,64 +1797,26 @@ var xi = ["innerHTML"], Si = /* @__PURE__ */ d({
|
|
|
1747
1797
|
key: 1,
|
|
1748
1798
|
class: "tpl-text-content tpl:outline-none",
|
|
1749
1799
|
innerHTML: h(o)
|
|
1750
|
-
}, null, 8,
|
|
1800
|
+
}, null, 8, Ai))], 544));
|
|
1751
1801
|
}
|
|
1752
|
-
})
|
|
1753
|
-
//#endregion
|
|
1754
|
-
//#region src/utils/blockComponentResolver.ts
|
|
1755
|
-
function Ci(e) {
|
|
1756
|
-
let t = { fontFamily: e.fontFamily };
|
|
1757
|
-
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;
|
|
1758
|
-
}
|
|
1759
|
-
function wi(e, t, n) {
|
|
1760
|
-
if (t) {
|
|
1761
|
-
let n = t.getComponent(e);
|
|
1762
|
-
if (n) return n;
|
|
1763
|
-
}
|
|
1764
|
-
return n[e.type] ?? null;
|
|
1765
|
-
}
|
|
1766
|
-
function Ti(e) {
|
|
1767
|
-
if (e.type === "wrapper") return {};
|
|
1768
|
-
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
1769
|
-
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
1770
|
-
backgroundColor: n || "transparent"
|
|
1771
|
-
};
|
|
1772
|
-
return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Oe.paragraphGap : Oe.paragraphGap}px`), e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
1773
|
-
}
|
|
1774
|
-
function Ei(e) {
|
|
1775
|
-
if (e.type !== "section" || !e.wrapper) return null;
|
|
1776
|
-
let t = e.wrapper, n = {};
|
|
1777
|
-
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;
|
|
1778
|
-
}
|
|
1779
|
-
function Di(e) {
|
|
1780
|
-
if (e.type !== "wrapper") return null;
|
|
1781
|
-
let t = {};
|
|
1782
|
-
if (e.styles.backgroundColor && (t.backgroundColor = e.styles.backgroundColor), e.styles.padding) {
|
|
1783
|
-
let n = e.styles.padding;
|
|
1784
|
-
t.padding = `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`;
|
|
1785
|
-
}
|
|
1786
|
-
return e.borderRadius && e.borderRadius > 0 && (t.borderRadius = `${e.borderRadius}px`), t;
|
|
1787
|
-
}
|
|
1788
|
-
//#endregion
|
|
1789
|
-
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
1790
|
-
var Oi = [
|
|
1802
|
+
}), Mi = [
|
|
1791
1803
|
"data-block-id",
|
|
1792
1804
|
"data-block-type",
|
|
1793
1805
|
"data-tpl-picked"
|
|
1794
|
-
],
|
|
1806
|
+
], Ni = ["aria-label"], Pi = [
|
|
1795
1807
|
"aria-label",
|
|
1796
1808
|
"aria-pressed",
|
|
1797
1809
|
"title"
|
|
1798
|
-
],
|
|
1810
|
+
], Fi = ["aria-label", "title"], Ii = ["aria-label", "title"], Li = ["aria-label", "title"], Ri = {
|
|
1799
1811
|
key: 1,
|
|
1800
1812
|
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"
|
|
1801
|
-
},
|
|
1813
|
+
}, zi = { 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 = {
|
|
1802
1814
|
key: 2,
|
|
1803
1815
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1804
|
-
},
|
|
1816
|
+
}, Vi = ["aria-label", "title"], Hi = {
|
|
1805
1817
|
key: 3,
|
|
1806
1818
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1807
|
-
},
|
|
1819
|
+
}, Ui = ["aria-label"], Wi = /*#__PURE__*/ hn(/* @__PURE__ */ d({
|
|
1808
1820
|
__name: "BlockWrapper",
|
|
1809
1821
|
props: {
|
|
1810
1822
|
block: {},
|
|
@@ -1816,7 +1828,7 @@ var Oi = [
|
|
|
1816
1828
|
},
|
|
1817
1829
|
emits: ["select"],
|
|
1818
1830
|
setup(e, { emit: t }) {
|
|
1819
|
-
let r = L(() => import("./BlockIssueBadge-
|
|
1831
|
+
let r = L(() => import("./BlockIssueBadge-ChQ0mPf5.js")), i = e, o = t, { t: c, format: u } = X(), d = n(ht, null), f = l(null), p = b(() => d?.liftedBlockId.value === i.block.id), m = b(() => p.value ? u(c.blockActions.dragLifted, { block: i.block.type }) : c.blockActions.drag);
|
|
1820
1832
|
async function _() {
|
|
1821
1833
|
await T(), f.value?.focus();
|
|
1822
1834
|
}
|
|
@@ -1842,20 +1854,20 @@ var Oi = [
|
|
|
1842
1854
|
let C = b(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), w = b(() => i.previewMode === !0 && C.value), O = b(() => i.viewport ? {
|
|
1843
1855
|
desktop: c.viewport.desktop,
|
|
1844
1856
|
mobile: c.viewport.mobile
|
|
1845
|
-
}[i.viewport] ?? i.viewport : ""), A = b(() => !!i.block.displayCondition), j = n(
|
|
1846
|
-
function
|
|
1857
|
+
}[i.viewport] ?? i.viewport : ""), A = b(() => !!i.block.displayCondition), j = n(St, null), M = n(Et, null), N = n(At, {}), P = b(() => N.savedBlocks?.isPicking.value === !0), I = b(() => !i.nested && N.savedBlocks?.isAvailable.value === !0 && N.savedBlocks?.canCreate.value === !0), z = b(() => i.isSelected && !P.value), B = b(() => N.comments?.getBlockCount(i.block.id) ?? 0), V = b(() => hr(i.block)), H = b(() => _r(i.block));
|
|
1858
|
+
function ee(e) {
|
|
1847
1859
|
i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), o("select"));
|
|
1848
1860
|
}
|
|
1849
|
-
function
|
|
1861
|
+
function te() {
|
|
1850
1862
|
j?.deleteBlock(i.block.id);
|
|
1851
1863
|
}
|
|
1852
|
-
function
|
|
1864
|
+
function ne() {
|
|
1853
1865
|
j?.duplicateBlock(i.block);
|
|
1854
1866
|
}
|
|
1855
|
-
function
|
|
1867
|
+
function re() {
|
|
1856
1868
|
N.savedBlocks?.startPicking(i.block.id);
|
|
1857
1869
|
}
|
|
1858
|
-
function
|
|
1870
|
+
function ie() {
|
|
1859
1871
|
M?.toggleBlock(i.block.id);
|
|
1860
1872
|
}
|
|
1861
1873
|
return (t, n) => w.value ? S("", !0) : (s(), x("div", {
|
|
@@ -1869,7 +1881,7 @@ var Oi = [
|
|
|
1869
1881
|
"data-block-id": e.block.id,
|
|
1870
1882
|
"data-block-type": e.block.type,
|
|
1871
1883
|
"data-tpl-picked": e.picked || void 0,
|
|
1872
|
-
onClick:
|
|
1884
|
+
onClick: ee
|
|
1873
1885
|
}, [
|
|
1874
1886
|
g(h(r), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
1875
1887
|
z.value ? (s(), x("div", {
|
|
@@ -1887,65 +1899,65 @@ var Oi = [
|
|
|
1887
1899
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1888
1900
|
title: h(c).blockActions.drag,
|
|
1889
1901
|
onKeydown: y
|
|
1890
|
-
}, [g(h(
|
|
1902
|
+
}, [g(h(an), {
|
|
1891
1903
|
size: 14,
|
|
1892
1904
|
"stroke-width": 1.5
|
|
1893
|
-
})], 40,
|
|
1905
|
+
})], 40, Pi),
|
|
1894
1906
|
k("button", {
|
|
1895
1907
|
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",
|
|
1896
1908
|
"aria-label": h(c).blockActions.duplicate,
|
|
1897
1909
|
title: h(c).blockActions.duplicate,
|
|
1898
|
-
onClick: E(
|
|
1899
|
-
}, [g(h(
|
|
1910
|
+
onClick: E(ne, ["stop"])
|
|
1911
|
+
}, [g(h(Xt), {
|
|
1900
1912
|
size: 14,
|
|
1901
1913
|
"stroke-width": 1.5
|
|
1902
|
-
})], 8,
|
|
1914
|
+
})], 8, Fi),
|
|
1903
1915
|
I.value ? (s(), x("button", {
|
|
1904
1916
|
key: 0,
|
|
1905
1917
|
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",
|
|
1906
1918
|
"aria-label": h(c).blockActions.saveAsBlock,
|
|
1907
1919
|
title: h(c).blockActions.saveAsBlock,
|
|
1908
|
-
onClick: E(
|
|
1909
|
-
}, [g(h(
|
|
1920
|
+
onClick: E(re, ["stop"])
|
|
1921
|
+
}, [g(h($t), {
|
|
1910
1922
|
size: 14,
|
|
1911
1923
|
"stroke-width": 1.5
|
|
1912
|
-
})], 8,
|
|
1924
|
+
})], 8, Ii)) : S("", !0),
|
|
1913
1925
|
k("button", {
|
|
1914
1926
|
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",
|
|
1915
1927
|
"aria-label": h(c).blockActions.delete,
|
|
1916
1928
|
title: h(c).blockActions.delete,
|
|
1917
|
-
onClick: E(
|
|
1918
|
-
}, [g(h(
|
|
1929
|
+
onClick: E(te, ["stop"])
|
|
1930
|
+
}, [g(h(rn), {
|
|
1919
1931
|
size: 14,
|
|
1920
1932
|
"stroke-width": 1.5
|
|
1921
|
-
})], 8,
|
|
1922
|
-
], 8,
|
|
1923
|
-
C.value ? (s(), x("div",
|
|
1933
|
+
})], 8, Li)
|
|
1934
|
+
], 8, Ni)) : S("", !0),
|
|
1935
|
+
C.value ? (s(), x("div", Ri, [k("span", zi, [g(h(Zt), {
|
|
1924
1936
|
size: 12,
|
|
1925
1937
|
"stroke-width": 1.5
|
|
1926
1938
|
}), R(" " + F(h(u)(h(c).blockActions.hiddenOnViewport, { viewport: O.value })), 1)])])) : S("", !0),
|
|
1927
|
-
A.value && !C.value ? (s(), x("div",
|
|
1939
|
+
A.value && !C.value ? (s(), x("div", Bi, [k("button", {
|
|
1928
1940
|
"data-testid": "condition-toggle",
|
|
1929
1941
|
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:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
1930
1942
|
"aria-label": h(c).blockActions.conditionToggle,
|
|
1931
1943
|
title: e.block.displayCondition?.label,
|
|
1932
|
-
onClick: E(
|
|
1933
|
-
}, [g(h(
|
|
1944
|
+
onClick: E(ie, ["stop"])
|
|
1945
|
+
}, [g(h(pn), {
|
|
1934
1946
|
size: 12,
|
|
1935
1947
|
"stroke-width": 2
|
|
1936
|
-
})], 8,
|
|
1937
|
-
B.value > 0 && !C.value ? (s(), x("div",
|
|
1948
|
+
})], 8, Vi)])) : S("", !0),
|
|
1949
|
+
B.value > 0 && !C.value ? (s(), x("div", Hi, [k("button", {
|
|
1938
1950
|
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:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
1939
1951
|
"aria-label": h(u)(h(c).blockActions.comments, { count: String(B.value) }),
|
|
1940
1952
|
onClick: n[0] ||= E((t) => h(N).comments?.openForBlock(e.block.id), ["stop"])
|
|
1941
|
-
}, [g(h(
|
|
1953
|
+
}, [g(h(cn), {
|
|
1942
1954
|
size: 12,
|
|
1943
1955
|
"stroke-width": 2.5
|
|
1944
|
-
}), R(" " + F(B.value), 1)], 8,
|
|
1945
|
-
|
|
1956
|
+
}), R(" " + F(B.value), 1)], 8, Ui)])) : S("", !0),
|
|
1957
|
+
H.value ? (s(), x("div", {
|
|
1946
1958
|
key: 4,
|
|
1947
1959
|
class: "tpl-section-wrapper",
|
|
1948
|
-
style: D(
|
|
1960
|
+
style: D(H.value)
|
|
1949
1961
|
}, [k("div", {
|
|
1950
1962
|
class: "tpl-block-content",
|
|
1951
1963
|
style: D(V.value)
|
|
@@ -1954,31 +1966,31 @@ var Oi = [
|
|
|
1954
1966
|
class: "tpl-block-content",
|
|
1955
1967
|
style: D(V.value)
|
|
1956
1968
|
}, [a(t.$slots, "default", {}, void 0, !0)], 4))
|
|
1957
|
-
], 10,
|
|
1969
|
+
], 10, Mi));
|
|
1958
1970
|
}
|
|
1959
1971
|
}), [["__scopeId", "data-v-2c239048"]]);
|
|
1960
1972
|
//#endregion
|
|
1961
1973
|
//#region src/utils/unwrapParagraph.ts
|
|
1962
|
-
function
|
|
1974
|
+
function Gi(e) {
|
|
1963
1975
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
1964
1976
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
1965
1977
|
}
|
|
1966
1978
|
//#endregion
|
|
1967
1979
|
//#region src/components/blocks/TitleBlock.vue
|
|
1968
|
-
var
|
|
1980
|
+
var Ki = /* @__PURE__ */ d({
|
|
1969
1981
|
__name: "TitleBlock",
|
|
1970
1982
|
props: {
|
|
1971
1983
|
block: {},
|
|
1972
1984
|
viewport: {}
|
|
1973
1985
|
},
|
|
1974
1986
|
setup(e) {
|
|
1975
|
-
let t = e, n = L(() => import("./TitleEditor-
|
|
1987
|
+
let t = e, n = L(() => import("./TitleEditor-CoFzxLPA.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = ki(() => t.block.content), d = b(() => {
|
|
1976
1988
|
let e = {
|
|
1977
|
-
fontSize: `${
|
|
1989
|
+
fontSize: `${Ee[t.block.level]}px`,
|
|
1978
1990
|
textAlign: t.block.textAlign
|
|
1979
1991
|
};
|
|
1980
1992
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1981
|
-
}), f = b(() => `h${t.block.level}`), p = b(() =>
|
|
1993
|
+
}), f = b(() => `h${t.block.level}`), p = b(() => Gi(o.value));
|
|
1982
1994
|
return (t, o) => (s(), x("div", {
|
|
1983
1995
|
ref_key: "blockRef",
|
|
1984
1996
|
ref: i,
|
|
@@ -2004,16 +2016,16 @@ var Hi = /* @__PURE__ */ d({
|
|
|
2004
2016
|
});
|
|
2005
2017
|
//#endregion
|
|
2006
2018
|
//#region src/utils/sectionColumnDrop.ts
|
|
2007
|
-
function
|
|
2019
|
+
function qi(e) {
|
|
2008
2020
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2009
2021
|
}
|
|
2010
2022
|
//#endregion
|
|
2011
2023
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2012
|
-
var
|
|
2024
|
+
var Ji = { class: "tpl:w-full" }, Yi = {
|
|
2013
2025
|
key: 0,
|
|
2014
2026
|
"data-testid": "section-drop-hint",
|
|
2015
2027
|
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)]"
|
|
2016
|
-
},
|
|
2028
|
+
}, Xi = /* @__PURE__ */ d({
|
|
2017
2029
|
__name: "SectionBlock",
|
|
2018
2030
|
props: {
|
|
2019
2031
|
block: {},
|
|
@@ -2021,13 +2033,13 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2021
2033
|
},
|
|
2022
2034
|
setup(e) {
|
|
2023
2035
|
let t = {
|
|
2024
|
-
title:
|
|
2025
|
-
paragraph:
|
|
2026
|
-
image:
|
|
2027
|
-
button:
|
|
2028
|
-
divider:
|
|
2029
|
-
custom:
|
|
2030
|
-
}, a = e, { t: o } =
|
|
2036
|
+
title: Ki,
|
|
2037
|
+
paragraph: ji,
|
|
2038
|
+
image: vi,
|
|
2039
|
+
button: Sr,
|
|
2040
|
+
divider: $r,
|
|
2041
|
+
custom: Zr
|
|
2042
|
+
}, a = e, { t: o } = X(), c = $e(Y, "SectionBlock"), l = n(Et, null), d = n(Lt, null), p = n(At, {}), m = n(It, null);
|
|
2031
2043
|
function _(e) {
|
|
2032
2044
|
let t = p.savedBlocks;
|
|
2033
2045
|
if (t?.isPicking.value) {
|
|
@@ -2062,7 +2074,7 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2062
2074
|
r[e] = n, c.updateBlock(a.block.id, { children: r });
|
|
2063
2075
|
}
|
|
2064
2076
|
function A(e) {
|
|
2065
|
-
return
|
|
2077
|
+
return mr(e, d, t);
|
|
2066
2078
|
}
|
|
2067
2079
|
function j(e, t) {
|
|
2068
2080
|
e.type === "custom" && c.updateBlock(e.id, {
|
|
@@ -2070,7 +2082,7 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2070
2082
|
dataSourceFetched: t.dataSourceFetched
|
|
2071
2083
|
});
|
|
2072
2084
|
}
|
|
2073
|
-
return (t, n) => (s(), x("div",
|
|
2085
|
+
return (t, n) => (s(), x("div", Ji, [k("div", { class: v(["tpl:flex tpl:gap-0", { "tpl:flex-col": w.value }]) }, [(s(!0), x(P, null, r(C.value, (t, n) => (s(), x("div", {
|
|
2074
2086
|
key: n,
|
|
2075
2087
|
class: v(["tpl:relative tpl:min-h-[60px] tpl:rounded", T(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
2076
2088
|
style: D({ width: w.value ? "100%" : y.value[n] })
|
|
@@ -2079,7 +2091,7 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2079
2091
|
group: {
|
|
2080
2092
|
name: "blocks",
|
|
2081
2093
|
pull: !0,
|
|
2082
|
-
put: (e, t, n) => h(
|
|
2094
|
+
put: (e, t, n) => h(qi)(n)
|
|
2083
2095
|
},
|
|
2084
2096
|
animation: 150,
|
|
2085
2097
|
"ghost-class": "tpl-ghost",
|
|
@@ -2092,7 +2104,7 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2092
2104
|
class: "tpl:min-h-[60px]",
|
|
2093
2105
|
"onUpdate:modelValue": (e) => E(n, e)
|
|
2094
2106
|
}, {
|
|
2095
|
-
default: i(() => [(s(!0), x(P, null, r(T(n), (t) => f((s(), x("div", { key: t.id }, [g(
|
|
2107
|
+
default: i(() => [(s(!0), x(P, null, r(T(n), (t) => f((s(), x("div", { key: t.id }, [g(Wi, {
|
|
2096
2108
|
block: t,
|
|
2097
2109
|
"is-selected": h(c).state.selectedBlockId === t.id,
|
|
2098
2110
|
viewport: e.viewport,
|
|
@@ -2124,13 +2136,13 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2124
2136
|
"model-value",
|
|
2125
2137
|
"group",
|
|
2126
2138
|
"onUpdate:modelValue"
|
|
2127
|
-
]), T(n).length === 0 ? (s(), x("div",
|
|
2139
|
+
]), T(n).length === 0 ? (s(), x("div", Yi, [k("span", null, F(h(o).section.dropHere), 1)])) : S("", !0)], 6))), 128))], 2)]));
|
|
2128
2140
|
}
|
|
2129
|
-
}),
|
|
2141
|
+
}), Zi = [
|
|
2130
2142
|
"width",
|
|
2131
2143
|
"height",
|
|
2132
2144
|
"fill"
|
|
2133
|
-
],
|
|
2145
|
+
], Qi = ["d"], $i = /* @__PURE__ */ d({
|
|
2134
2146
|
__name: "SocialIconSvg",
|
|
2135
2147
|
props: {
|
|
2136
2148
|
platform: {},
|
|
@@ -2138,7 +2150,7 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2138
2150
|
iconSize: {}
|
|
2139
2151
|
},
|
|
2140
2152
|
setup(e) {
|
|
2141
|
-
let t = e, n = b(() =>
|
|
2153
|
+
let t = e, n = b(() => He[t.platform]), r = b(() => We[t.iconSize]), i = b(() => {
|
|
2142
2154
|
let e = {
|
|
2143
2155
|
display: "inline-flex",
|
|
2144
2156
|
alignItems: "center",
|
|
@@ -2182,25 +2194,25 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2182
2194
|
viewBox: "0 0 24 24",
|
|
2183
2195
|
fill: o.value,
|
|
2184
2196
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2185
|
-
}, [k("path", { d: n.value.path }, null, 8,
|
|
2197
|
+
}, [k("path", { d: n.value.path }, null, 8, Qi)], 8, Zi))], 4));
|
|
2186
2198
|
}
|
|
2187
|
-
}),
|
|
2199
|
+
}), ea = { class: "tpl:w-full" }, ta = ["href"], na = {
|
|
2188
2200
|
key: 1,
|
|
2189
2201
|
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)]"
|
|
2190
|
-
},
|
|
2202
|
+
}, ra = /* @__PURE__ */ d({
|
|
2191
2203
|
__name: "SocialIconsBlock",
|
|
2192
2204
|
props: {
|
|
2193
2205
|
block: {},
|
|
2194
2206
|
viewport: {}
|
|
2195
2207
|
},
|
|
2196
2208
|
setup(e) {
|
|
2197
|
-
let t = e, { t: n } =
|
|
2209
|
+
let t = e, { t: n } = X(), i = b(() => ({
|
|
2198
2210
|
display: "flex",
|
|
2199
2211
|
flexWrap: "wrap",
|
|
2200
2212
|
gap: `${t.block.spacing}px`,
|
|
2201
2213
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
2202
2214
|
})), a = b(() => t.block.icons.length > 0);
|
|
2203
|
-
return (t, o) => (s(), x("div",
|
|
2215
|
+
return (t, o) => (s(), x("div", ea, [a.value ? (s(), x("div", {
|
|
2204
2216
|
key: 0,
|
|
2205
2217
|
style: D(i.value)
|
|
2206
2218
|
}, [(s(!0), x(P, null, r(e.block.icons, (t) => (s(), x("a", {
|
|
@@ -2208,7 +2220,7 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2208
2220
|
href: t.url || "#",
|
|
2209
2221
|
class: "tpl:cursor-default",
|
|
2210
2222
|
onClick: o[0] ||= E(() => {}, ["prevent"])
|
|
2211
|
-
}, [g(
|
|
2223
|
+
}, [g($i, {
|
|
2212
2224
|
platform: t.platform,
|
|
2213
2225
|
"icon-style": e.block.iconStyle,
|
|
2214
2226
|
"icon-size": e.block.iconSize
|
|
@@ -2216,44 +2228,44 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2216
2228
|
"platform",
|
|
2217
2229
|
"icon-style",
|
|
2218
2230
|
"icon-size"
|
|
2219
|
-
])], 8,
|
|
2231
|
+
])], 8, ta))), 128))], 4)) : (s(), x("div", na, [g(h(on), { size: 16 }), k("span", null, F(h(n).social.addIcons), 1)]))]));
|
|
2220
2232
|
}
|
|
2221
|
-
}),
|
|
2233
|
+
}), ia = { class: "tpl:w-full" }, aa = {
|
|
2222
2234
|
key: 0,
|
|
2223
2235
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
2224
2236
|
style: {
|
|
2225
2237
|
"background-color": "var(--tpl-bg-hover)",
|
|
2226
2238
|
color: "var(--tpl-text-dim)"
|
|
2227
2239
|
}
|
|
2228
|
-
},
|
|
2240
|
+
}, oa = /* @__PURE__ */ d({
|
|
2229
2241
|
__name: "SpacerBlock",
|
|
2230
2242
|
props: {
|
|
2231
2243
|
block: {},
|
|
2232
2244
|
viewport: {}
|
|
2233
2245
|
},
|
|
2234
2246
|
setup(e) {
|
|
2235
|
-
let t = e, n =
|
|
2247
|
+
let t = e, n = $e(Y, "SpacerBlock"), r = b(() => ({
|
|
2236
2248
|
height: `${t.block.height}px`,
|
|
2237
2249
|
minHeight: `${t.block.height}px`,
|
|
2238
2250
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
2239
2251
|
}));
|
|
2240
|
-
return (t, i) => (s(), x("div",
|
|
2252
|
+
return (t, i) => (s(), x("div", ia, [k("div", {
|
|
2241
2253
|
style: D(r.value),
|
|
2242
2254
|
class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !h(n).state.previewMode }])
|
|
2243
|
-
}, [h(n).state.previewMode ? S("", !0) : (s(), x("span",
|
|
2255
|
+
}, [h(n).state.previewMode ? S("", !0) : (s(), x("span", aa, F(e.block.height) + "px ", 1))], 6)]));
|
|
2244
2256
|
}
|
|
2245
|
-
}),
|
|
2257
|
+
}), sa = { class: "tpl:w-full" }, ca = { key: 0 }, la = [
|
|
2246
2258
|
"aria-label",
|
|
2247
2259
|
"data-placeholder",
|
|
2248
2260
|
"onBlur"
|
|
2249
|
-
],
|
|
2261
|
+
], ua = [
|
|
2250
2262
|
"aria-label",
|
|
2251
2263
|
"data-placeholder",
|
|
2252
2264
|
"onBlur"
|
|
2253
|
-
],
|
|
2265
|
+
], da = {
|
|
2254
2266
|
key: 1,
|
|
2255
2267
|
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)]"
|
|
2256
|
-
},
|
|
2268
|
+
}, fa = /*#__PURE__*/ hn(/* @__PURE__ */ d({
|
|
2257
2269
|
__name: "TableBlock",
|
|
2258
2270
|
props: {
|
|
2259
2271
|
block: {},
|
|
@@ -2267,7 +2279,7 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2267
2279
|
updated(e, t) {
|
|
2268
2280
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
2269
2281
|
}
|
|
2270
|
-
}, n = e, { t: i } =
|
|
2282
|
+
}, n = e, { t: i } = X(), a = $e(Y, "TableBlock"), o = b(() => n.block.rows.length > 0), c = b(() => {
|
|
2271
2283
|
let e = {
|
|
2272
2284
|
width: "100%",
|
|
2273
2285
|
borderCollapse: "collapse",
|
|
@@ -2298,11 +2310,11 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2298
2310
|
} : n);
|
|
2299
2311
|
a.updateBlock(n.block.id, { rows: o });
|
|
2300
2312
|
}
|
|
2301
|
-
return (e, n) => (s(), x("div",
|
|
2313
|
+
return (e, n) => (s(), x("div", sa, [o.value ? (s(), x("table", {
|
|
2302
2314
|
key: 0,
|
|
2303
2315
|
style: D(c.value),
|
|
2304
2316
|
class: "tpl-table-editable"
|
|
2305
|
-
}, [d.value ? (s(), x("thead",
|
|
2317
|
+
}, [d.value ? (s(), x("thead", ca, [k("tr", null, [(s(!0), x(P, null, r(d.value.cells, (e) => f((s(), x("th", {
|
|
2306
2318
|
key: e.id,
|
|
2307
2319
|
style: D(u.value),
|
|
2308
2320
|
"aria-label": h(i).table.cellPlaceholder,
|
|
@@ -2311,7 +2323,7 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2311
2323
|
onBlur: (t) => v(d.value.id, e.id, t),
|
|
2312
2324
|
onKeydown: n[0] ||= _(E((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2313
2325
|
onClick: E(m, ["stop"])
|
|
2314
|
-
}, null, 44,
|
|
2326
|
+
}, null, 44, la)), [[t, e.content]])), 128))])])) : S("", !0), k("tbody", null, [(s(!0), x(P, null, r(p.value, (e) => (s(), x("tr", { key: e.id }, [(s(!0), x(P, null, r(e.cells, (r) => f((s(), x("td", {
|
|
2315
2327
|
key: r.id,
|
|
2316
2328
|
style: D(l.value),
|
|
2317
2329
|
"aria-label": h(i).table.cellPlaceholder,
|
|
@@ -2320,9 +2332,9 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2320
2332
|
onBlur: (t) => v(e.id, r.id, t),
|
|
2321
2333
|
onKeydown: n[1] ||= _(E((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2322
2334
|
onClick: E(m, ["stop"])
|
|
2323
|
-
}, null, 44,
|
|
2335
|
+
}, null, 44, ua)), [[t, r.content]])), 128))]))), 128))])], 4)) : (s(), x("div", da, [g(h(fn), { size: 16 }), k("span", null, F(h(i).table.empty), 1)]))]));
|
|
2324
2336
|
}
|
|
2325
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
2337
|
+
}), [["__scopeId", "data-v-963ac422"]]), pa = /* @__PURE__ */ d({
|
|
2326
2338
|
__name: "VideoPlayButton",
|
|
2327
2339
|
props: { hoverEffect: {
|
|
2328
2340
|
type: Boolean,
|
|
@@ -2340,7 +2352,7 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2340
2352
|
});
|
|
2341
2353
|
//#endregion
|
|
2342
2354
|
//#region src/utils/videoThumbnail.ts
|
|
2343
|
-
function
|
|
2355
|
+
function ma(e) {
|
|
2344
2356
|
if (!e) return {
|
|
2345
2357
|
platform: "unknown",
|
|
2346
2358
|
videoId: null,
|
|
@@ -2372,25 +2384,25 @@ function ua(e) {
|
|
|
2372
2384
|
thumbnailUrl: null
|
|
2373
2385
|
};
|
|
2374
2386
|
}
|
|
2375
|
-
function
|
|
2376
|
-
return t ||
|
|
2387
|
+
function ha(e, t) {
|
|
2388
|
+
return t || ma(e).thumbnailUrl;
|
|
2377
2389
|
}
|
|
2378
2390
|
//#endregion
|
|
2379
2391
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2380
|
-
var
|
|
2392
|
+
var ga = ["src", "alt"], _a = {
|
|
2381
2393
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2382
2394
|
style: { opacity: "0.7" }
|
|
2383
|
-
},
|
|
2395
|
+
}, va = ["href"], ya = ["src", "alt"], ba = ["src", "alt"], xa = {
|
|
2384
2396
|
key: 3,
|
|
2385
2397
|
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)]"
|
|
2386
|
-
},
|
|
2398
|
+
}, Sa = /* @__PURE__ */ d({
|
|
2387
2399
|
__name: "VideoBlock",
|
|
2388
2400
|
props: {
|
|
2389
2401
|
block: {},
|
|
2390
2402
|
viewport: {}
|
|
2391
2403
|
},
|
|
2392
2404
|
setup(e) {
|
|
2393
|
-
let t = e, { t: n } =
|
|
2405
|
+
let t = e, { t: n } = X(), { syntax: r } = _n(), i = b(() => U(t.block.url, r) || U(t.block.thumbnailUrl, r)), a = En(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = En(() => i.value ? t.block.placeholderUrl : void 0), c = b(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : ha(t.block.url)), l = b(() => ({ textAlign: t.block.align })), u = b(() => {
|
|
2394
2406
|
let e = t.block.align;
|
|
2395
2407
|
return {
|
|
2396
2408
|
maxWidth: "100%",
|
|
@@ -2400,7 +2412,7 @@ var fa = ["src", "alt"], pa = {
|
|
|
2400
2412
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2401
2413
|
marginRight: e === "center" ? "auto" : void 0
|
|
2402
2414
|
};
|
|
2403
|
-
}), d = b(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = b(() =>
|
|
2415
|
+
}), d = b(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = b(() => U(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
2404
2416
|
return (t, r) => (s(), x("div", {
|
|
2405
2417
|
class: "tpl:w-full",
|
|
2406
2418
|
style: D(l.value)
|
|
@@ -2413,16 +2425,16 @@ var fa = ["src", "alt"], pa = {
|
|
|
2413
2425
|
src: h(o),
|
|
2414
2426
|
alt: e.block.alt,
|
|
2415
2427
|
style: D(d.value)
|
|
2416
|
-
}, null, 12,
|
|
2428
|
+
}, null, 12, ga), g(pa)], 4)) : i.value ? (s(), x("div", {
|
|
2417
2429
|
key: 1,
|
|
2418
2430
|
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)]",
|
|
2419
2431
|
style: D([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
2420
|
-
}, [g(h(
|
|
2432
|
+
}, [g(h(ln), {
|
|
2421
2433
|
size: 36,
|
|
2422
2434
|
"stroke-width": 1.5,
|
|
2423
2435
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2424
2436
|
style: { opacity: "0.5" }
|
|
2425
|
-
}), k("span",
|
|
2437
|
+
}), k("span", _a, [g(br, { text: f.value }, null, 8, ["text"])])], 4)) : c.value ? (s(), x(P, { key: 2 }, [e.block.url ? (s(), x("a", {
|
|
2426
2438
|
key: 0,
|
|
2427
2439
|
href: e.block.url,
|
|
2428
2440
|
target: "_blank",
|
|
@@ -2435,7 +2447,7 @@ var fa = ["src", "alt"], pa = {
|
|
|
2435
2447
|
src: c.value,
|
|
2436
2448
|
alt: e.block.alt,
|
|
2437
2449
|
style: D(d.value)
|
|
2438
|
-
}, null, 12,
|
|
2450
|
+
}, null, 12, ya), g(pa, { "hover-effect": "" })], 12, va)) : (s(), x("div", {
|
|
2439
2451
|
key: 1,
|
|
2440
2452
|
class: "tpl:relative tpl:inline-block",
|
|
2441
2453
|
style: D(u.value)
|
|
@@ -2444,54 +2456,54 @@ var fa = ["src", "alt"], pa = {
|
|
|
2444
2456
|
src: c.value,
|
|
2445
2457
|
alt: e.block.alt,
|
|
2446
2458
|
style: D(d.value)
|
|
2447
|
-
}, null, 12,
|
|
2459
|
+
}, null, 12, ba), g(pa)], 4))], 64)) : (s(), x("div", xa, [g(h(ln), {
|
|
2448
2460
|
size: 40,
|
|
2449
2461
|
"stroke-width": 1.5,
|
|
2450
2462
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
2451
2463
|
}), k("span", null, F(h(n).video.addVideo), 1)]))], 4));
|
|
2452
2464
|
}
|
|
2453
|
-
}),
|
|
2454
|
-
section:
|
|
2455
|
-
title:
|
|
2456
|
-
paragraph:
|
|
2457
|
-
image:
|
|
2458
|
-
button:
|
|
2459
|
-
divider:
|
|
2460
|
-
video:
|
|
2461
|
-
social:
|
|
2462
|
-
menu:
|
|
2463
|
-
table:
|
|
2464
|
-
spacer:
|
|
2465
|
-
html:
|
|
2465
|
+
}), Ca = {
|
|
2466
|
+
section: Xi,
|
|
2467
|
+
title: Ki,
|
|
2468
|
+
paragraph: ji,
|
|
2469
|
+
image: vi,
|
|
2470
|
+
button: Sr,
|
|
2471
|
+
divider: $r,
|
|
2472
|
+
video: Sa,
|
|
2473
|
+
social: ra,
|
|
2474
|
+
menu: Si,
|
|
2475
|
+
table: fa,
|
|
2476
|
+
spacer: oa,
|
|
2477
|
+
html: ai,
|
|
2466
2478
|
countdown: L(() => import("./CountdownBlock-sVDjKkRw.js"))
|
|
2467
2479
|
};
|
|
2468
|
-
function
|
|
2469
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } =
|
|
2480
|
+
function wa(e) {
|
|
2481
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = X(i), d = b(() => ue(ue(ue(Wn(i), lr(n.content.value.settings?.locale)), H(n.content.value.settings) === "rtl" ? {
|
|
2470
2482
|
title: { textAlign: "right" },
|
|
2471
2483
|
table: { textAlign: "right" }
|
|
2472
2484
|
} : {}), r.blockDefaults ?? {}));
|
|
2473
2485
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
2474
|
-
let { resolvedTheme: f } =
|
|
2486
|
+
let { resolvedTheme: f } = Mn(b(() => n.state.uiTheme)), p = l(r.theme ?? {}), { themeStyles: h } = Pn({
|
|
2475
2487
|
themeOverrides: p,
|
|
2476
2488
|
resolvedTheme: f,
|
|
2477
2489
|
extraStyles: () => ({
|
|
2478
2490
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
2479
2491
|
...e.themeExtraStyles?.()
|
|
2480
2492
|
})
|
|
2481
|
-
}), g =
|
|
2493
|
+
}), g = Le({
|
|
2482
2494
|
content: n.content,
|
|
2483
2495
|
setContent: (e, t) => n.setContent(e, t),
|
|
2484
2496
|
...e.historyOptions
|
|
2485
2497
|
});
|
|
2486
|
-
|
|
2487
|
-
let _ =
|
|
2498
|
+
Ve(n, g);
|
|
2499
|
+
let _ = Ke({
|
|
2488
2500
|
addBlock: n.addBlock,
|
|
2489
2501
|
removeBlock: n.removeBlock,
|
|
2490
2502
|
updateBlock: n.updateBlock,
|
|
2491
2503
|
selectBlock: n.selectBlock,
|
|
2492
2504
|
findBlockLocation: n.findBlockLocation,
|
|
2493
2505
|
blockDefaults: () => d.value
|
|
2494
|
-
}), v =
|
|
2506
|
+
}), v = Re(n), x = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Ge({
|
|
2495
2507
|
content: n.content,
|
|
2496
2508
|
isDirty: () => n.state.isDirty,
|
|
2497
2509
|
...e.autoSaveOptions
|
|
@@ -2499,30 +2511,30 @@ function ba(e) {
|
|
|
2499
2511
|
x && (S = t(g.isNavigating, (e) => {
|
|
2500
2512
|
e ? x.pause() : x.resume();
|
|
2501
2513
|
}));
|
|
2502
|
-
let C =
|
|
2514
|
+
let C = jn(n, {
|
|
2503
2515
|
t: s,
|
|
2504
2516
|
format: u
|
|
2505
|
-
}, r.customBlocks ?? []), w =
|
|
2506
|
-
if (w.allowCustomIgnored &&
|
|
2507
|
-
let e =
|
|
2508
|
-
e.length > 0 &&
|
|
2509
|
-
}
|
|
2510
|
-
let T =
|
|
2511
|
-
for (let e of T.unknown)
|
|
2512
|
-
let E =
|
|
2513
|
-
|
|
2517
|
+
}, r.customBlocks ?? []), w = Gt(r.colors);
|
|
2518
|
+
if (w.allowCustomIgnored && Z.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), w.invalidPresets.length > 0 && Z.warn(`config.colors.presets skipped invalid entries: ${w.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), w.allowCustom === !1) {
|
|
2519
|
+
let e = Un(w.presets, r.blockDefaults, r.templateDefaults);
|
|
2520
|
+
e.length > 0 && Z.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.`);
|
|
2521
|
+
}
|
|
2522
|
+
let T = qt(r.templateSettings);
|
|
2523
|
+
for (let e of T.unknown) Z.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${Jt.join(", ")}) — skipping it.`);
|
|
2524
|
+
let E = Fn();
|
|
2525
|
+
Bn(E, Ca);
|
|
2514
2526
|
let D = /* @__PURE__ */ new Set();
|
|
2515
2527
|
function O(e) {
|
|
2516
2528
|
for (let t of e) {
|
|
2517
|
-
E.registerCustom(t,
|
|
2518
|
-
for (let e of
|
|
2529
|
+
E.registerCustom(t, Zr);
|
|
2530
|
+
for (let e of ur(t, w)) D.has(e.id) || (D.add(e.id), Z.warn(e.message));
|
|
2519
2531
|
}
|
|
2520
2532
|
}
|
|
2521
2533
|
r.customBlocks?.length && O(r.customBlocks);
|
|
2522
|
-
let k =
|
|
2534
|
+
let k = Sn();
|
|
2523
2535
|
if (o() && m(k.dispose), e.containerEl) {
|
|
2524
2536
|
let t = e.containerEl;
|
|
2525
|
-
|
|
2537
|
+
G(document, "pointerdown", (e) => {
|
|
2526
2538
|
let n = t.value;
|
|
2527
2539
|
n && (e.composedPath?.() ?? []).includes(n) && k.claim();
|
|
2528
2540
|
}, { capture: !0 });
|
|
@@ -2536,7 +2548,7 @@ function ba(e) {
|
|
|
2536
2548
|
x?.flush();
|
|
2537
2549
|
}
|
|
2538
2550
|
function j(t) {
|
|
2539
|
-
k.isActive() &&
|
|
2551
|
+
k.isActive() && fr(t, {
|
|
2540
2552
|
history: g,
|
|
2541
2553
|
selectBlock: (e) => n.selectBlock(e),
|
|
2542
2554
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -2548,21 +2560,21 @@ function ba(e) {
|
|
|
2548
2560
|
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
2549
2561
|
});
|
|
2550
2562
|
}
|
|
2551
|
-
|
|
2563
|
+
G(document, "keydown", j);
|
|
2552
2564
|
let M = l(null);
|
|
2553
|
-
c(
|
|
2565
|
+
c(xt, e.editorRoot ?? document), c(tt, M), c(yt, i), c(Y, n), c(Vt, g), c(St, _), c(Et, v), c(Rt, a), c(ct, h), c(bt, f), c(Nt, d), c(vt, r.locale), c(Lt, E), c(Pt, r.customBlocks ?? []), c(Ht, r.paletteBlocks), c(Ct, Vn(r.htmlBlockPreview)), c(nt, r.layout), c(at, r.sectionWrapper), c(Tt, w), c(Ft, T.fields), c(jt, In(n.content, E));
|
|
2554
2566
|
let N = be(r.mergeTags?.syntax), P = y(r.mergeTags?.tags ?? []);
|
|
2555
2567
|
function F(e) {
|
|
2556
2568
|
if (!Array.isArray(e)) {
|
|
2557
|
-
|
|
2569
|
+
Z.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
2558
2570
|
return;
|
|
2559
2571
|
}
|
|
2560
2572
|
P.value = e;
|
|
2561
2573
|
}
|
|
2562
|
-
c(
|
|
2563
|
-
let I = l(
|
|
2564
|
-
c(
|
|
2565
|
-
let L =
|
|
2574
|
+
c(q, P), c(pt, N), c(mt, r.mergeTags?.onRequest ?? null), c(kt, r.mergeTags?.autocomplete !== !1), c(ft, r.mergeTags?.showRawValue !== !1);
|
|
2575
|
+
let I = l(Ne(r.mergeTags?.tags ?? []));
|
|
2576
|
+
c(dt, I);
|
|
2577
|
+
let L = wn({
|
|
2566
2578
|
resolvePreview: r.resolvePreview,
|
|
2567
2579
|
getContent: () => {
|
|
2568
2580
|
let e = n.content.value;
|
|
@@ -2570,19 +2582,19 @@ function ba(e) {
|
|
|
2570
2582
|
},
|
|
2571
2583
|
isActive: () => n.state.previewMode
|
|
2572
2584
|
});
|
|
2573
|
-
c(
|
|
2585
|
+
c(_t, L), c(ot, r.resolvePreview);
|
|
2574
2586
|
let R = b(() => !(n.state.previewMode && L.isConfigured));
|
|
2575
|
-
c(
|
|
2576
|
-
let z =
|
|
2577
|
-
c(
|
|
2578
|
-
let B =
|
|
2587
|
+
c(It, R);
|
|
2588
|
+
let z = Dn();
|
|
2589
|
+
c(et, z), c(Ot, l(!1)), c(rt, l(!1)), c(gt, r.logicTags?.tags ?? []), c(zt, r.logicTags?.pairs ?? []), c(st, r.logicTags?.onRequest ?? null), c(it, On()), c(ut, r.onRequestMedia ?? null), c(wt, r.canDropMedia ?? null), c(Bt, r.resolveImageUrl ? Tn(r.resolveImageUrl) : null), c(Dt, r.displayConditions?.conditions ?? []), c(Mt, r.displayConditions?.allowCustom ?? !1), c(At, e.capabilities ?? {}), c(ht, C);
|
|
2590
|
+
let B = kn(r.lint) ? null : An({
|
|
2579
2591
|
content: n.content,
|
|
2580
2592
|
options: r.lint ?? {},
|
|
2581
2593
|
updateBlock: n.updateBlock,
|
|
2582
2594
|
updateSettings: n.updateSettings,
|
|
2583
2595
|
removeBlock: n.removeBlock
|
|
2584
2596
|
});
|
|
2585
|
-
c(
|
|
2597
|
+
c(lt, B);
|
|
2586
2598
|
function V() {
|
|
2587
2599
|
S?.(), B?.destroy(), x?.destroy(), g.destroy();
|
|
2588
2600
|
}
|
|
@@ -2609,6 +2621,6 @@ function ba(e) {
|
|
|
2609
2621
|
};
|
|
2610
2622
|
}
|
|
2611
2623
|
//#endregion
|
|
2612
|
-
export {
|
|
2624
|
+
export { ir as A, hr as C, Qn as D, mr as E, nr as M, tr as N, or as O, wn as P, Sr as S, vr as T, Rr as _, ra as a, Dr as b, Wi as c, vi as d, ai as f, Br as g, Hr as h, oa as i, rr as j, ar as k, ji as l, Zr as m, Sa as n, Xi as o, $r as p, fa as r, Ki as s, wa as t, Si as u, Nr as v, pr as w, Tr as x, Or as y };
|
|
2613
2625
|
|
|
2614
|
-
//# sourceMappingURL=useEditorCore-
|
|
2626
|
+
//# sourceMappingURL=useEditorCore-D4kzTMtQ.js.map
|