@templatical/editor 0.59.2 → 0.60.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/{AiAltTextPopover-BhWHOOKX.js → AiAltTextPopover-DSA1wiiW.js} +1 -1
- package/dist/{AiAltTextReview-CmW7pLmo.js → AiAltTextReview-B9-vfzCj.js} +1 -1
- package/dist/{AiChatPanel-CV0mCtad.js → AiChatPanel-DPoq2Til.js} +8 -8
- package/dist/{AiPanels-C8M7q_vM.js → AiPanels-UdfhAzzu.js} +1 -1
- package/dist/{AiRewriteMenu-DC2ZLH5L.js → AiRewriteMenu-BaeMlSEx.js} +8 -8
- package/dist/{BlockIssueBadge-B8sl9BM1.js → BlockIssueBadge-DQ_6NI4p.js} +2 -2
- package/dist/{BlockPreviewCanvas-yhOQAQhJ.js → BlockPreviewCanvas-DWDfih6j.js} +19 -44
- package/dist/{CloudPanels-CD0lsL0R.js → CloudPanels-ClHDM3ge.js} +3 -3
- package/dist/{CollaborationNotices-DrMrP73M.js → CollaborationNotices-PqWv0q8W.js} +1 -1
- package/dist/{CollaboratorBar-TsK872uC.js → CollaboratorBar-p-_PWqXW.js} +1 -1
- package/dist/{CommentsPanel-BX8JVrXU.js → CommentsPanel-BUo-YhSX.js} +1 -1
- package/dist/{CommentsSidebar-BUlseNwL.js → CommentsSidebar-D_Pz7FPz.js} +10 -10
- package/dist/{CountdownToolbar-dx3FVRjh.js → CountdownToolbar-DYFSFwkD.js} +4 -4
- package/dist/{IssuesPanel-BwnvXxBC.js → IssuesPanel-C7mBrK6a.js} +9 -9
- package/dist/{LanguageMenu-Cf5bKocE.js → LanguageMenu-f7js1FF8.js} +12 -12
- package/dist/{LocaleNotices-CGEp0pQ8.js → LocaleNotices-CAvDAawJ.js} +2 -2
- package/dist/{LogicTagInsertButton-BdDe-vrZ.js → LogicTagInsertButton-Clc3JTg_.js} +16 -16
- package/dist/{MediaEditModal-BWOqjEZN.js → MediaEditModal-YXOL0d_y.js} +1 -1
- package/dist/{MediaPanels-C-XrldMu.js → MediaPanels-VCv5epgs.js} +1 -1
- package/dist/{MergeTagInput-CTTi-eB0.js → MergeTagInput-B5a9noTB.js} +1 -1
- package/dist/{MergeTagModeToggle-Bd0svGQm.js → MergeTagModeToggle-D1r2aH5x.js} +4 -4
- package/dist/{MergeTagTextarea-DiahMV-3.js → MergeTagTextarea-CA9dPfMH.js} +5 -5
- package/dist/{ParagraphEditor-Db1cmj8Y.js → ParagraphEditor-ByzfpepN.js} +43 -43
- package/dist/{RestoreVersionDialog-DA1Z0q9Z.js → RestoreVersionDialog-Da5sTCFI.js} +3 -3
- package/dist/{RichTextEditorContent-CyO6e4ZG.js → RichTextEditorContent-gnRxu4-L.js} +4 -4
- package/dist/{SaveBlockDialog-D7SaFxa_.js → SaveBlockDialog-BM1Fki_2.js} +7 -7
- package/dist/{SavedBlocksBrowserModal-B5r3LWWG.js → SavedBlocksBrowserModal-DHOTdJKB.js} +9 -9
- package/dist/{SavedBlocksPanels-BH2f7jm-.js → SavedBlocksPanels-BJ2OM0cG.js} +1 -1
- package/dist/{SavedBlocksPickBar-B24TScw0.js → SavedBlocksPickBar-C4Bv1K_9.js} +2 -2
- package/dist/{TemplateSettings-CuN9Vkl_.js → TemplateSettings-DsaSsCC8.js} +8 -8
- package/dist/{TestEmailModal-C4DAaohi.js → TestEmailModal-CMo0cJik.js} +8 -8
- package/dist/{TestEmailPanel-DoMcVJSE.js → TestEmailPanel-B2OoOy9K.js} +1 -1
- package/dist/{TitleEditor-b5Pr_m9j.js → TitleEditor--gFbrR7V.js} +9 -9
- package/dist/{Toolbar-BOf7Y862.js → Toolbar-UXT03-Dc.js} +1003 -792
- package/dist/{TplModal-DAcXzBJh.js → TplModal-DkoyIwy1.js} +1 -1
- package/dist/{VersionHistoryMenu-TbIGteNi.js → VersionHistoryMenu-D-RCk3oB.js} +5 -5
- package/dist/{VersionHistoryPanels-Ia6ipOqG.js → VersionHistoryPanels-TzzRlmqK.js} +1 -1
- package/dist/{VersionPreviewBanner-CRfu6quf.js → VersionPreviewBanner-DMg2sw3V.js} +1 -1
- package/dist/{WrapperBlock-BZenrXM6.js → WrapperBlock-B4mdW2CP.js} +3 -3
- package/dist/{blockTypeIcons-DdYZy8yG.js → blockTypeIcons-MX-xQH_Z.js} +3 -3
- package/dist/bundle-stats.json +6 -6
- package/dist/{cdn/chunks/ca-YfIxwO1G.js → ca-C8N05sCU.js} +10 -4
- package/dist/cdn/chunks/{AiAltTextPopover-CcX_OMUU.js → AiAltTextPopover-BLNN_Pnd.js} +2 -2
- package/dist/cdn/chunks/AiAltTextPopover-BLNN_Pnd.js.map +1 -0
- package/dist/cdn/chunks/{AiAltTextReview-Dmm3h0jd.js → AiAltTextReview-Db8vSNpe.js} +2 -2
- package/dist/cdn/chunks/AiAltTextReview-Db8vSNpe.js.map +1 -0
- package/dist/cdn/chunks/{AiChatPanel-DV23DJ-2.js → AiChatPanel-cIT2haLo.js} +2 -2
- package/dist/cdn/chunks/AiChatPanel-cIT2haLo.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-CxhOpMAp.js → AiPanels-B4GG8w3J.js} +2 -2
- package/dist/cdn/chunks/AiPanels-B4GG8w3J.js.map +1 -0
- package/dist/cdn/chunks/{AiRewriteMenu-87-O514r.js → AiRewriteMenu-C34wZVcW.js} +6 -6
- package/dist/cdn/chunks/AiRewriteMenu-C34wZVcW.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-Dp06vQd3.js → BlockIssueBadge-C50pmOMZ.js} +2 -2
- package/dist/cdn/chunks/BlockIssueBadge-C50pmOMZ.js.map +1 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-DQGzUvZ5.js → BlockPreviewCanvas-CUOrwkWR.js} +20 -45
- package/dist/cdn/chunks/BlockPreviewCanvas-CUOrwkWR.js.map +1 -0
- package/dist/cdn/chunks/CloudHeaderExtras-Cd-ePldd.js.map +1 -1
- package/dist/cdn/chunks/{CloudPanels-D8fchoYt.js → CloudPanels-BAGDHObm.js} +3 -3
- package/dist/cdn/chunks/CloudPanels-BAGDHObm.js.map +1 -0
- package/dist/cdn/chunks/{CollaborationNotices-DNEs3g9B.js → CollaborationNotices-CTmjjbHv.js} +2 -2
- package/dist/cdn/chunks/CollaborationNotices-CTmjjbHv.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CN6XAlbn.js → CollaboratorBar-CzHjawjF.js} +2 -2
- package/dist/cdn/chunks/CollaboratorBar-CzHjawjF.js.map +1 -0
- package/dist/cdn/chunks/{CommentsPanel-CxZ1kFcK.js → CommentsPanel-Dh0_eRBe.js} +2 -2
- package/dist/cdn/chunks/CommentsPanel-Dh0_eRBe.js.map +1 -0
- package/dist/cdn/chunks/{CommentsSidebar-DCr2mV8b.js → CommentsSidebar-JxZ-O2mY.js} +2 -2
- package/dist/cdn/chunks/CommentsSidebar-JxZ-O2mY.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock--hlKE2aj.js.map +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CUTbVPPV.js → CountdownToolbar-BBiK9EaU.js} +5 -5
- package/dist/cdn/chunks/CountdownToolbar-BBiK9EaU.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-BhcSzwuL.js → IssuesPanel-BtAn12hl.js} +4 -4
- package/dist/cdn/chunks/IssuesPanel-BtAn12hl.js.map +1 -0
- package/dist/cdn/chunks/{LanguageMenu-6wGhkyFT.js → LanguageMenu-BDldm-Hp.js} +7 -7
- package/dist/cdn/chunks/LanguageMenu-BDldm-Hp.js.map +1 -0
- package/dist/cdn/chunks/{LocaleNotices-Br92Xueo.js → LocaleNotices-CzrNKR-N.js} +2 -2
- package/dist/cdn/chunks/LocaleNotices-CzrNKR-N.js.map +1 -0
- package/dist/cdn/chunks/{LogicTagInsertButton-r2EVUtDU.js → LogicTagInsertButton-B4wuPoMa.js} +5 -5
- package/dist/cdn/chunks/LogicTagInsertButton-B4wuPoMa.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-CfgN7Jyi.js → MediaEditModal-DJ2wxInt.js} +2 -2
- package/dist/cdn/chunks/MediaEditModal-DJ2wxInt.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-Cb5vsgb-.js → MediaPanels-BJawNjr9.js} +2 -2
- package/dist/cdn/chunks/MediaPanels-BJawNjr9.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagInput-Dh3N6CEV.js → MergeTagInput-DZD-p4nR.js} +2 -2
- package/dist/cdn/chunks/MergeTagInput-DZD-p4nR.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagModeToggle-D6u3hMrI.js → MergeTagModeToggle-DGuJCgqO.js} +3 -3
- package/dist/cdn/chunks/MergeTagModeToggle-DGuJCgqO.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagTextarea-BpVtpiNL.js → MergeTagTextarea-BRiaRBr_.js} +7 -7
- package/dist/cdn/chunks/MergeTagTextarea-BRiaRBr_.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-DGJmPAC1.js → ParagraphEditor-CPYQXRIc.js} +23 -23
- package/dist/cdn/chunks/ParagraphEditor-CPYQXRIc.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-D5qeCa0F.js → RestoreVersionDialog-NjbHial9.js} +3 -3
- package/dist/cdn/chunks/RestoreVersionDialog-NjbHial9.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DyGiXKKI.js → RichTextEditorContent-CtV0Q0SO.js} +4 -4
- package/dist/cdn/chunks/RichTextEditorContent-CtV0Q0SO.js.map +1 -0
- package/dist/cdn/chunks/{SaveBlockDialog-B0TJYxd8.js → SaveBlockDialog-BZqPkGrE.js} +6 -6
- package/dist/cdn/chunks/SaveBlockDialog-BZqPkGrE.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D8Ly7LrA.js → SavedBlocksBrowserModal-CqfyRtlX.js} +6 -6
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CqfyRtlX.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-Co1cbWR8.js → SavedBlocksPanels-BILHEdkP.js} +2 -2
- package/dist/cdn/chunks/SavedBlocksPanels-BILHEdkP.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPickBar-DNtVbpm-.js → SavedBlocksPickBar-C9NKqOEU.js} +3 -3
- package/dist/cdn/chunks/SavedBlocksPickBar-C9NKqOEU.js.map +1 -0
- package/dist/cdn/chunks/{TemplateSettings-BRc878ZF.js → TemplateSettings--_ZfbhnU.js} +6 -6
- package/dist/cdn/chunks/TemplateSettings--_ZfbhnU.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-CIui7VfS.js → TestEmailModal-CtfoV82K.js} +7 -7
- package/dist/cdn/chunks/TestEmailModal-CtfoV82K.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-vKvruW_r.js → TestEmailPanel-NK26SU2u.js} +2 -2
- package/dist/cdn/chunks/TestEmailPanel-NK26SU2u.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-BI-9Nnj3.js → TitleEditor-DXN_aOn0.js} +8 -8
- package/dist/cdn/chunks/TitleEditor-DXN_aOn0.js.map +1 -0
- package/dist/cdn/chunks/ToggleSwitch-C0w0srN_.js.map +1 -1
- package/dist/cdn/chunks/{Toolbar-CYnnArxv.js → Toolbar-HCxD4Ifc.js} +918 -707
- package/dist/cdn/chunks/Toolbar-HCxD4Ifc.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-B3nZeGWK.js → TplModal-DzHoLmGo.js} +2 -2
- package/dist/cdn/chunks/TplModal-DzHoLmGo.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-CMGfAKuV.js → VersionHistoryMenu-CVGlUPwS.js} +2 -2
- package/dist/cdn/chunks/VersionHistoryMenu-CVGlUPwS.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-Bb2ouQg7.js → VersionHistoryPanels-Du8sQry2.js} +2 -2
- package/dist/cdn/chunks/VersionHistoryPanels-Du8sQry2.js.map +1 -0
- package/dist/cdn/chunks/{VersionPreviewBanner-573UP-g4.js → VersionPreviewBanner-5RFz4AQx.js} +2 -2
- package/dist/cdn/chunks/VersionPreviewBanner-5RFz4AQx.js.map +1 -0
- package/dist/cdn/chunks/{WrapperBlock-DVu632LD.js → WrapperBlock-DTayPD6Q.js} +4 -4
- package/dist/cdn/chunks/WrapperBlock-DTayPD6Q.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-CGxNYHVA.js → blockTypeIcons-BOonB9gK.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-CGxNYHVA.js.map → blockTypeIcons-BOonB9gK.js.map} +1 -1
- package/dist/{ca-YfIxwO1G.js → cdn/chunks/ca-C8N05sCU.js} +12 -2
- package/dist/cdn/chunks/ca-C8N05sCU.js.map +1 -0
- package/dist/cdn/chunks/{composables-DY3anqHO.js → composables-BJBr8B4t.js} +611 -592
- package/dist/cdn/chunks/composables-BJBr8B4t.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-B5numxlW.js → createCloudRuntime-CUlw09ix.js} +3 -3
- package/dist/cdn/chunks/{createCloudRuntime-B5numxlW.js.map → createCloudRuntime-CUlw09ix.js.map} +1 -1
- package/dist/{da-CM6DCvRG.js → cdn/chunks/da-Dno_4nGy.js} +12 -2
- package/dist/cdn/chunks/da-Dno_4nGy.js.map +1 -0
- package/dist/{de-Dugz1zXC.js → cdn/chunks/de-DRR5JSkh.js} +12 -2
- package/dist/cdn/chunks/de-DRR5JSkh.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-CXSSZplR.js → editor-modal-BVM_0uoL.js} +4 -4
- package/dist/cdn/chunks/editor-modal-BVM_0uoL.js.map +1 -0
- package/dist/{en-BykoFuFY.js → cdn/chunks/en-DAcLbbpg.js} +12 -2
- package/dist/cdn/chunks/en-DAcLbbpg.js.map +1 -0
- package/dist/cdn/chunks/en-DlDEofnd.js +1 -0
- package/dist/{es-DaWsTkpj.js → cdn/chunks/es-BcEQLQxe.js} +12 -2
- package/dist/cdn/chunks/es-BcEQLQxe.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BWVlr8Ga.js → extensions-BPZirXpF.js} +5 -5
- package/dist/cdn/chunks/extensions-BPZirXpF.js.map +1 -0
- package/dist/{fr-DqwQHtJo.js → cdn/chunks/fr-CNQG7ESr.js} +12 -2
- package/dist/cdn/chunks/fr-CNQG7ESr.js.map +1 -0
- package/dist/cdn/chunks/{icons-C7vjUBLn.js → icons-CWEBTtbR.js} +23 -23
- package/dist/cdn/chunks/{icons-C7vjUBLn.js.map → icons-CWEBTtbR.js.map} +1 -1
- package/dist/cdn/chunks/{ja-BH4MS1Ye.js → ja-CMxWxqSH.js} +11 -3
- package/dist/cdn/chunks/ja-CMxWxqSH.js.map +1 -0
- package/dist/{nl-BQl1_UHv.js → cdn/chunks/nl-BjyYZDkC.js} +12 -2
- package/dist/cdn/chunks/nl-BjyYZDkC.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-Dw3rFvyd.js → normalizeMergeTagMarkup-CExCfSYI.js} +64 -64
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-Dw3rFvyd.js.map → normalizeMergeTagMarkup-CExCfSYI.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-BGtb8Xbp.js → preRenderCustomBlocks-BLVFtvl8.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-BGtb8Xbp.js.map → preRenderCustomBlocks-BLVFtvl8.js.map} +1 -1
- package/dist/{pt-BR-eyzmU9Vs.js → cdn/chunks/pt-BR-DC2A3C0v.js} +12 -2
- package/dist/cdn/chunks/pt-BR-DC2A3C0v.js.map +1 -0
- package/dist/cdn/chunks/{sanitizeHtml-CLRY8s2s.js → sanitizeHtml-Db0S2JVP.js} +2 -2
- package/dist/cdn/chunks/{sanitizeHtml-CLRY8s2s.js.map → sanitizeHtml-Db0S2JVP.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-kYhdXJ9P.js → socialIcons-WD1cjZDr.js} +495 -517
- package/dist/cdn/chunks/socialIcons-WD1cjZDr.js.map +1 -0
- package/dist/cdn/chunks/{src-DY2kMjoD.js → src-A0kzK-pR.js} +775 -667
- package/dist/cdn/chunks/src-A0kzK-pR.js.map +1 -0
- package/dist/cdn/chunks/src-C9opbQj_.js +684 -0
- package/dist/cdn/chunks/src-C9opbQj_.js.map +1 -0
- package/dist/cdn/chunks/{src-BmzzkUf7.js → src-edESkGqO.js} +708 -603
- package/dist/cdn/chunks/src-edESkGqO.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-B7gxx0aJ.js → tiptap-D9amDW4u.js} +1030 -1027
- package/dist/cdn/chunks/tiptap-D9amDW4u.js.map +1 -0
- package/dist/cdn/chunks/useLocalizedDisplay-Brdkp3KH.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-B5wMJLru.js.map → useLocalizedDisplay-Brdkp3KH.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-0wkSxy3z.js → useLogicTag-CKtQlJDa.js} +2 -2
- package/dist/cdn/chunks/{useLogicTag-0wkSxy3z.js.map → useLogicTag-CKtQlJDa.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-y3bX8M_6.js → useMergeTag-Dwy3U0PI.js} +2 -2
- package/dist/cdn/chunks/{useMergeTag-y3bX8M_6.js.map → useMergeTag-Dwy3U0PI.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-B42BKo9N.js → withCurrentFont-C4pIesdB.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-B42BKo9N.js.map → withCurrentFont-C4pIesdB.js.map} +1 -1
- package/dist/cdn/editor.js +109 -109
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-ErKdPXG6.js → check-C82yyyf1.js} +1 -1
- package/dist/{chevron-down-C_vv5fZE.js → chevron-down-BaBVjNbM.js} +1 -1
- package/dist/{chevron-right-Cw4GpjFA.js → chevron-right-DkS-bw8X.js} +1 -1
- package/dist/{chevron-up-uijYZoph.js → chevron-up-C1KzUIK4.js} +1 -1
- package/dist/{circle-exclamation-point-CIYHx5Tw.js → circle-exclamation-point-DsmqtTUQ.js} +1 -1
- package/dist/{clock-tnC1IvZk.js → clock-dpIs7vo0.js} +1 -1
- package/dist/{composables-CFTH0Nqb.js → composables-DjCuq6RV.js} +1399 -1380
- package/dist/{createCloudRuntime-BvWlm_38.js → createCloudRuntime-CiEo0wkr.js} +2 -2
- package/dist/{createLucideIcon-CssArtUe.js → createLucideIcon-BSam2AUu.js} +5 -5
- package/dist/{cdn/chunks/da-CM6DCvRG.js → da-Dno_4nGy.js} +10 -4
- package/dist/{cdn/chunks/de-Dugz1zXC.js → de-DRR5JSkh.js} +10 -4
- package/dist/dist-AyAOL8Bj.js +4 -0
- package/dist/{dist-BTUMr4Pb.js → dist-BNrGwgev.js} +2 -2
- package/dist/{dist-CsplpC_6.js → dist-BPVNNdTv.js} +2 -2
- package/dist/{dist-bWIkrMkM.js → dist-C7YLw60i.js} +2 -2
- package/dist/{dist-Clfx1JeL.js → dist-CBnAqr27.js} +2 -2
- package/dist/{dist-CkHJRChP.js → dist-COvAA64n.js} +2 -2
- package/dist/{dist-C-NRkFsp.js → dist-CuRjmtWu.js} +5 -5
- package/dist/{dist-HKEDfp__.js → dist-DG_AWt8v.js} +2 -2
- package/dist/{dist-CMo4K5So.js → dist-DX_IQgcU.js} +802 -696
- package/dist/{dist-DY3WbyCO.js → dist-DYtuc3jc.js} +2 -2
- package/dist/dist-DkPTWQuO.js +4 -0
- package/dist/{dist-DwpKFWF4.js → dist-DoWk1r7z.js} +77 -74
- package/dist/{dist-BlrlMP8f.js → dist-fDsB6dCL.js} +2 -2
- package/dist/{editor-modal-BWvxfSj8.js → editor-modal-odubnc9x.js} +15 -15
- package/dist/en-CAImT1hl.js +1 -0
- package/dist/{cdn/chunks/en-BykoFuFY.js → en-DAcLbbpg.js} +10 -4
- package/dist/{cdn/chunks/es-DaWsTkpj.js → es-BcEQLQxe.js} +10 -4
- package/dist/{extensions-BPVackEE.js → extensions-C7OLgMEj.js} +73 -73
- package/dist/{eye-DK4--qHk.js → eye-CxCHEszj.js} +1 -1
- package/dist/{cdn/chunks/fr-DqwQHtJo.js → fr-CNQG7ESr.js} +10 -4
- package/dist/{image-B5pJOw5Q.js → image-DvXPzqNd.js} +1 -1
- package/dist/index.d.ts +72 -13
- package/dist/{info-DKM0_thN.js → info-2KHWaZ2L.js} +1 -1
- package/dist/{ja-BH4MS1Ye.js → ja-CMxWxqSH.js} +10 -2
- package/dist/{link-BNgTZ_Sw.js → link-_OmrcJMv.js} +1 -1
- package/dist/{list-Bqynqm7o.js → list-Dekd7JE8.js} +1 -1
- package/dist/{loader-circle-BMc3fVpa.js → loader-circle-D_hT5mFS.js} +1 -1
- package/dist/{message-circle-D_TpvAJh.js → message-circle-DDbiG-jz.js} +1 -1
- package/dist/{cdn/chunks/nl-BQl1_UHv.js → nl-BjyYZDkC.js} +10 -4
- package/dist/{normalizeMergeTagMarkup-PQqrbfmt.js → normalizeMergeTagMarkup-Cv5Wvs5f.js} +45 -45
- package/dist/{package-D2fov5PU.js → package-cORUe57D.js} +1 -1
- package/dist/{pencil-BNdkJyfY.js → pencil-D67H4fxq.js} +1 -1
- package/dist/{plus-CWmBmMx-.js → plus-BpTZAx28.js} +1 -1
- package/dist/{preRenderCustomBlocks-Dg5GBNi2.js → preRenderCustomBlocks-6CLw2rP6.js} +3 -3
- package/dist/{cdn/chunks/pt-BR-eyzmU9Vs.js → pt-BR-DC2A3C0v.js} +10 -4
- package/dist/{refresh-cw-Ryg1j66N.js → refresh-cw-B4T0IFwI.js} +1 -1
- package/dist/{rotate-ccw-D8j7gXXv.js → rotate-ccw-BDQgjpuo.js} +1 -1
- package/dist/{sanitizeHtml-DVdfdxOz.js → sanitizeHtml-Ru5_-IbM.js} +6 -6
- package/dist/{search-CX2JkSHz.js → search-Dp9pkaVt.js} +1 -1
- package/dist/{send-BLR1b-p5.js → send-DO9GhgCH.js} +1 -1
- package/dist/{smartphone-Co8m0LLg.js → smartphone-CPW3I3hV.js} +1 -1
- package/dist/{socialIcons-DBHv_ntg.js → socialIcons-CPBiLTjY.js} +561 -583
- package/dist/{sparkles-Dc3Undp5.js → sparkles-CIBjNfij.js} +1 -1
- package/dist/{square-CPw_cyX8.js → square-3W65qrrH.js} +1 -1
- package/dist/templatical-editor.js +139 -139
- package/dist/{text-align-start-2VZGhCiK.js → text-align-start-Bs70tpRU.js} +1 -1
- package/dist/{trash-t6XXliVc.js → trash-CTzhAm1o.js} +1 -1
- package/dist/{triangle-exclamation-point-_YYWE2ZH.js → triangle-exclamation-point-D_13CuJY.js} +1 -1
- package/dist/{upload-BWYXWYHb.js → upload-DFxkP9MI.js} +1 -1
- package/dist/useLocalizedDisplay-DfiE-KjV.js +31 -0
- package/dist/{useLogicTag-CVOj0VUv.js → useLogicTag-K5CPoMTk.js} +1 -1
- package/dist/{useMergeTag-Bams_kam.js → useMergeTag-tsU_Sw2x.js} +3 -3
- package/dist/{useScrollToBlock-CwUQ_nKz.js → useScrollToBlock-194ePl4q.js} +1 -1
- package/dist/withCurrentFont-C-_IYTqP.js +18 -0
- package/dist/{x-CTKOxIyZ.js → x-D7L8mLHJ.js} +1 -1
- package/package.json +22 -22
- package/dist/cdn/chunks/AiAltTextPopover-CcX_OMUU.js.map +0 -1
- package/dist/cdn/chunks/AiAltTextReview-Dmm3h0jd.js.map +0 -1
- package/dist/cdn/chunks/AiChatPanel-DV23DJ-2.js.map +0 -1
- package/dist/cdn/chunks/AiPanels-CxhOpMAp.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-87-O514r.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-Dp06vQd3.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-DQGzUvZ5.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-D8fchoYt.js.map +0 -1
- package/dist/cdn/chunks/CollaborationNotices-DNEs3g9B.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-CN6XAlbn.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-CxZ1kFcK.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-DCr2mV8b.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-CUTbVPPV.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-BhcSzwuL.js.map +0 -1
- package/dist/cdn/chunks/LanguageMenu-6wGhkyFT.js.map +0 -1
- package/dist/cdn/chunks/LocaleNotices-Br92Xueo.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-r2EVUtDU.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-CfgN7Jyi.js.map +0 -1
- package/dist/cdn/chunks/MediaPanels-Cb5vsgb-.js.map +0 -1
- package/dist/cdn/chunks/MergeTagInput-Dh3N6CEV.js.map +0 -1
- package/dist/cdn/chunks/MergeTagModeToggle-D6u3hMrI.js.map +0 -1
- package/dist/cdn/chunks/MergeTagTextarea-BpVtpiNL.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DGJmPAC1.js.map +0 -1
- package/dist/cdn/chunks/RestoreVersionDialog-D5qeCa0F.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-DyGiXKKI.js.map +0 -1
- package/dist/cdn/chunks/SaveBlockDialog-B0TJYxd8.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-D8Ly7LrA.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-Co1cbWR8.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPickBar-DNtVbpm-.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-BRc878ZF.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-CIui7VfS.js.map +0 -1
- package/dist/cdn/chunks/TestEmailPanel-vKvruW_r.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BI-9Nnj3.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-CYnnArxv.js.map +0 -1
- package/dist/cdn/chunks/TplModal-B3nZeGWK.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryMenu-CMGfAKuV.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryPanels-Bb2ouQg7.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-573UP-g4.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-DVu632LD.js.map +0 -1
- package/dist/cdn/chunks/ca-YfIxwO1G.js.map +0 -1
- package/dist/cdn/chunks/composables-DY3anqHO.js.map +0 -1
- package/dist/cdn/chunks/da-CM6DCvRG.js.map +0 -1
- package/dist/cdn/chunks/de-Dugz1zXC.js.map +0 -1
- package/dist/cdn/chunks/editor-modal-CXSSZplR.js.map +0 -1
- package/dist/cdn/chunks/en-BykoFuFY.js.map +0 -1
- package/dist/cdn/chunks/en-DYMYt1TN.js +0 -1
- package/dist/cdn/chunks/es-DaWsTkpj.js.map +0 -1
- package/dist/cdn/chunks/extensions-BWVlr8Ga.js.map +0 -1
- package/dist/cdn/chunks/fr-DqwQHtJo.js.map +0 -1
- package/dist/cdn/chunks/ja-BH4MS1Ye.js.map +0 -1
- package/dist/cdn/chunks/nl-BQl1_UHv.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-eyzmU9Vs.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-kYhdXJ9P.js.map +0 -1
- package/dist/cdn/chunks/src-B7X7x_ST.js +0 -707
- package/dist/cdn/chunks/src-B7X7x_ST.js.map +0 -1
- package/dist/cdn/chunks/src-BmzzkUf7.js.map +0 -1
- package/dist/cdn/chunks/src-DY2kMjoD.js.map +0 -1
- package/dist/cdn/chunks/tiptap-B7gxx0aJ.js.map +0 -1
- package/dist/cdn/chunks/useLocalizedDisplay-B5wMJLru.js +0 -33
- package/dist/dist-CkIeJEsa.js +0 -4
- package/dist/dist-eAgG-nCb.js +0 -4
- package/dist/en-DvCaYqiR.js +0 -1
- package/dist/useLocalizedDisplay-CbFM0cCV.js +0 -31
- package/dist/withCurrentFont-y0O5kOLW.js +0 -18
|
@@ -3,30 +3,30 @@ import { A as i, B as a, C as o, E as s, F as c, G as l, H as u, I as d, K as f,
|
|
|
3
3
|
import { t as te } from "./useEditorRoot-D0Lp2x4_.js";
|
|
4
4
|
import { t as G } from "./useI18n-DPg6rPbu.js";
|
|
5
5
|
import "./useCloudI18n-BTV9uu3c.js";
|
|
6
|
-
import { t as K } from "./useMergeTag-
|
|
7
|
-
import { _ as ne, h as q, v as
|
|
8
|
-
import { $ as
|
|
6
|
+
import { t as K } from "./useMergeTag-Dwy3U0PI.js";
|
|
7
|
+
import { _ as ne, h as q, v as J, y as re } from "./dist-BtWMy7UQ.js";
|
|
8
|
+
import { $ as ie, A as ae, An as Y, B as X, C as Z, D as Q, Dn as oe, E as se, En as ce, G as le, Gt as ue, H as de, I as fe, K as pe, Kt as me, L as he, Lt as ge, M as _e, Mn as ve, Mt as ye, N as be, O as xe, On as Se, P as Ce, Q as we, R as Te, Rt as Ee, S as De, T as Oe, Vt as ke, W as Ae, X as je, Y as Me, Yt as Ne, Z as Pe, a as Fe, at as Ie, b as Le, bn as Re, ct as ze, d as Be, et as Ve, ft as He, gt as Ue, hn as We, ht as Ge, i as Ke, it as qe, j as Je, jn as Ye, kn as Xe, ln as Ze, lt as Qe, mn as $e, mt as et, nt as tt, ot as nt, p as rt, q as it, rt as at, t as ot, tt as st, u as ct, ut as lt, w as ut, x as dt, xn as ft, y as pt, yt as mt, zt as ht } from "./src-A0kzK-pR.js";
|
|
9
9
|
import { t as $ } from "./logger-CqQTfJGx.js";
|
|
10
|
-
import { a as
|
|
11
|
-
import { n as
|
|
12
|
-
import { $ as
|
|
13
|
-
import { t as
|
|
14
|
-
import { B as
|
|
15
|
-
import { r as
|
|
16
|
-
import { r as
|
|
17
|
-
import { At as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import { m as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
10
|
+
import { a as gt, c as _t, i as vt, n as yt, o as bt, t as xt } from "./usePopoverPosition-CBp9uwjV.js";
|
|
11
|
+
import { n as St } from "./useLocalizedDisplay-Brdkp3KH.js";
|
|
12
|
+
import { $ as Ct, A as wt, B as Tt, C as Et, D as Dt, F as Ot, G as kt, H as At, I as jt, J as Mt, K as Nt, L as Pt, M as Ft, N as It, O as Lt, P as Rt, R as zt, S as Bt, T as Vt, U as Ht, V as Ut, W as Wt, X as Gt, Y as Kt, Z as qt, _ as Jt, a as Yt, at as Xt, b as Zt, c as Qt, ct as $t, d as en, et as tn, g as nn, h as rn, i as an, it as on, j as sn, k as cn, l as ln, lt as un, m as dn, nt as fn, ot as pn, p as mn, q as hn, r as gn, rt as _n, s as vn, st as yn, u as bn, ut as xn, v as Sn, w as Cn, x as wn, y as Tn, z as En } from "./keys-ywH4jHJ2.js";
|
|
13
|
+
import { t as Dn } from "./useLogicTag-CKtQlJDa.js";
|
|
14
|
+
import { B as On, C as kn, F as An, I as jn, P as Mn, R as Nn, T as Pn, _ as Fn, a as In, f as Ln, h as Rn, n as zn, o as Bn, t as Vn, u as Hn, v as Un, w as Wn, x as Gn, y as Kn, z as qn } from "./socialIcons-WD1cjZDr.js";
|
|
15
|
+
import { r as Jn, t as Yn } from "./templateSettingsFields-cjlP-jdw.js";
|
|
16
|
+
import { r as Xn, t as Zn } from "./sanitizeHtml-Db0S2JVP.js";
|
|
17
|
+
import { At as Qn, G as $n, Mt as er, Nt as tr, Ot as nr, St as rr, Ut as ir, V as ar, Wt as or, X as sr, _t as cr, d as lr, f as ur, k as dr, mt as fr, nt as pr, o as mr, y as hr, yt as gr } from "./icons-CWEBTtbR.js";
|
|
18
|
+
import { t as _r } from "./LoadingTrack-o-89hApJ.js";
|
|
19
|
+
import { t as vr } from "./languageName-DEEOhDWI.js";
|
|
20
|
+
import { t as yr } from "./plural-CyxrJXL1.js";
|
|
21
|
+
import { m as br, w as xr, x as Sr } from "./styleConstants-Br6CIRoS.js";
|
|
22
|
+
import { t as Cr } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
23
|
+
import { t as wr } from "./readableTextColor-BfZUGnVj.js";
|
|
24
24
|
// src/composables/useFocusTrap.ts
|
|
25
|
-
var
|
|
26
|
-
function
|
|
25
|
+
var Tr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
26
|
+
function Er(t, n) {
|
|
27
27
|
let r = te(), i = null, a = null, o = null;
|
|
28
28
|
function s() {
|
|
29
|
-
return t.value ? Array.from(t.value.querySelectorAll(
|
|
29
|
+
return t.value ? Array.from(t.value.querySelectorAll(Tr)).filter((e) => e.offsetParent !== null) : [];
|
|
30
30
|
}
|
|
31
31
|
function c(e) {
|
|
32
32
|
if (e.key !== "Tab") return;
|
|
@@ -55,8 +55,8 @@ function wr(t, n) {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
// src/composables/useEmoji.ts
|
|
58
|
-
function
|
|
59
|
-
let [e, t] =
|
|
58
|
+
function Dr() {
|
|
59
|
+
let [e, t] = J(!1), n = R([]), r = !1;
|
|
60
60
|
v(() => {
|
|
61
61
|
r = !0;
|
|
62
62
|
}), u(e, async (e) => {
|
|
@@ -80,7 +80,7 @@ function Tr() {
|
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
// src/composables/useBlockRegistry.ts
|
|
83
|
-
function
|
|
83
|
+
function Or() {
|
|
84
84
|
let e = R(/* @__PURE__ */ new Map());
|
|
85
85
|
function t(t, n) {
|
|
86
86
|
e.value.set(t, n), B(e);
|
|
@@ -89,7 +89,7 @@ function Er() {
|
|
|
89
89
|
let r = `custom:${t.type}`;
|
|
90
90
|
e.value.set(r, {
|
|
91
91
|
component: n,
|
|
92
|
-
createBlock: () =>
|
|
92
|
+
createBlock: () => De(t),
|
|
93
93
|
definition: t
|
|
94
94
|
}), B(e);
|
|
95
95
|
}
|
|
@@ -114,7 +114,7 @@ function Er() {
|
|
|
114
114
|
let t = a(e.customType);
|
|
115
115
|
if (!t) return o("Block definition not found");
|
|
116
116
|
try {
|
|
117
|
-
return await
|
|
117
|
+
return await he(await import("./liquid.browser-rubac0VA.js")).parseAndRender(t.template, e.fieldValues);
|
|
118
118
|
} catch (t) {
|
|
119
119
|
return $.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
120
120
|
}
|
|
@@ -133,7 +133,7 @@ function Er() {
|
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
// src/composables/useFonts.ts
|
|
136
|
-
var
|
|
136
|
+
var kr = [
|
|
137
137
|
{
|
|
138
138
|
value: "Arial",
|
|
139
139
|
label: "Arial"
|
|
@@ -162,19 +162,19 @@ var Dr = [
|
|
|
162
162
|
value: "Courier New",
|
|
163
163
|
label: "Courier New"
|
|
164
164
|
}
|
|
165
|
-
],
|
|
166
|
-
function
|
|
167
|
-
if (e === void 0 || e === !0) return [...
|
|
165
|
+
], Ar = "Arial, sans-serif";
|
|
166
|
+
function jr(e) {
|
|
167
|
+
if (e === void 0 || e === !0) return [...kr];
|
|
168
168
|
if (e === !1) return [];
|
|
169
169
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
170
170
|
for (let i of e) {
|
|
171
|
-
let e = i.toLowerCase(), a =
|
|
172
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), $.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${
|
|
171
|
+
let e = i.toLowerCase(), a = kr.find((t) => t.value.toLowerCase() === e);
|
|
172
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), $.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${kr.map((e) => e.value).join(", ")}.`));
|
|
173
173
|
}
|
|
174
174
|
return t;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
let t = H(e?.customFonts ?? []), n = H(!1), r =
|
|
176
|
+
function Mr(e) {
|
|
177
|
+
let t = H(e?.customFonts ?? []), n = H(!1), r = jr(e?.builtIns), i = I(() => e?.defaultFallback ?? Ar), a = I(() => {
|
|
178
178
|
let e = [...r], n = t.value.map((e) => ({
|
|
179
179
|
value: e.name,
|
|
180
180
|
label: e.name,
|
|
@@ -185,14 +185,14 @@ function Ar(e) {
|
|
|
185
185
|
function o(e) {
|
|
186
186
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
187
187
|
}
|
|
188
|
-
let s = e?.defaultFont ??
|
|
188
|
+
let s = e?.defaultFont ?? Ar.split(",")[0].trim();
|
|
189
189
|
o(s) || $.warn(`config.fonts: new templates seed "${s}", 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.`);
|
|
190
190
|
function c() {
|
|
191
191
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
192
192
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
193
193
|
if (t) return t.value;
|
|
194
194
|
}
|
|
195
|
-
return
|
|
195
|
+
return Ar;
|
|
196
196
|
}
|
|
197
197
|
let l = I(() => c());
|
|
198
198
|
function u(e) {
|
|
@@ -239,7 +239,7 @@ function Ar(e) {
|
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
241
|
// src/composables/useThemeStyles.ts
|
|
242
|
-
var
|
|
242
|
+
var Nr = {
|
|
243
243
|
bg: "--tpl-bg",
|
|
244
244
|
bgElevated: "--tpl-bg-elevated",
|
|
245
245
|
bgHover: "--tpl-bg-hover",
|
|
@@ -263,10 +263,10 @@ var jr = {
|
|
|
263
263
|
dangerLight: "--tpl-danger-light",
|
|
264
264
|
canvasBg: "--tpl-canvas-bg"
|
|
265
265
|
};
|
|
266
|
-
function
|
|
266
|
+
function Pr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
267
267
|
return { themeStyles: I(() => {
|
|
268
268
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
269
|
-
if (a) for (let [e, t] of Object.entries(
|
|
269
|
+
if (a) for (let [e, t] of Object.entries(Nr)) {
|
|
270
270
|
let n = a[e];
|
|
271
271
|
n && (r[t] = n);
|
|
272
272
|
}
|
|
@@ -274,12 +274,12 @@ function Mr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
274
274
|
}) };
|
|
275
275
|
}
|
|
276
276
|
// src/utils/mergeTagNodeSpec.ts
|
|
277
|
-
function
|
|
278
|
-
return
|
|
277
|
+
function Fr(e, t, n) {
|
|
278
|
+
return Pe(e, n) ? {
|
|
279
279
|
type: "logicMergeTagNode",
|
|
280
280
|
attrs: {
|
|
281
281
|
value: e,
|
|
282
|
-
keyword:
|
|
282
|
+
keyword: le(e, n)
|
|
283
283
|
}
|
|
284
284
|
} : {
|
|
285
285
|
type: "mergeTagNode",
|
|
@@ -290,32 +290,32 @@ function Nr(e, t, n) {
|
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
292
|
// src/utils/insertLogicTag.ts
|
|
293
|
-
function
|
|
293
|
+
function Ir(e) {
|
|
294
294
|
return "before" in e && "after" in e;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
if (!
|
|
298
|
-
e.chain().focus().insertContent(
|
|
296
|
+
function Lr(e, t, n) {
|
|
297
|
+
if (!Ir(t)) {
|
|
298
|
+
e.chain().focus().insertContent(Fr(t.value, t.label, n)).run();
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
|
-
let r =
|
|
301
|
+
let r = Fr(t.before, t.label, n), i = Fr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
302
302
|
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
303
303
|
}
|
|
304
304
|
// src/utils/linkColorExtension.ts
|
|
305
|
-
function
|
|
305
|
+
function Rr(e) {
|
|
306
306
|
if (!e) return null;
|
|
307
307
|
let t = e.trim();
|
|
308
308
|
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;
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function zr(e) {
|
|
311
311
|
return e.extend({ addAttributes() {
|
|
312
312
|
return {
|
|
313
313
|
...this.parent?.(),
|
|
314
314
|
color: {
|
|
315
315
|
default: null,
|
|
316
|
-
parseHTML: (e) =>
|
|
316
|
+
parseHTML: (e) => Rr(bt(e.style.color)),
|
|
317
317
|
renderHTML: (e) => {
|
|
318
|
-
let t =
|
|
318
|
+
let t = Rr(e.color);
|
|
319
319
|
return t ? { style: `color: ${t}` } : {};
|
|
320
320
|
}
|
|
321
321
|
}
|
|
@@ -323,9 +323,9 @@ function Lr(e) {
|
|
|
323
323
|
} });
|
|
324
324
|
}
|
|
325
325
|
// src/composables/useRichTextLinkDialog.ts
|
|
326
|
-
function
|
|
326
|
+
function Br(e, t = de.liquid, n = () => !0) {
|
|
327
327
|
let r = H(!1), i = H(""), a = H(""), o = H(null);
|
|
328
|
-
|
|
328
|
+
Er(o, r);
|
|
329
329
|
function s() {
|
|
330
330
|
if (!n()) return;
|
|
331
331
|
let t = e.value?.getAttributes("link") ?? {};
|
|
@@ -336,7 +336,7 @@ function Rr(e, t = Q.liquid, n = () => !0) {
|
|
|
336
336
|
if (i.value) {
|
|
337
337
|
let t = d(i.value);
|
|
338
338
|
if (t !== null) {
|
|
339
|
-
let n =
|
|
339
|
+
let n = Rr(a.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
340
340
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -353,8 +353,8 @@ function Rr(e, t = Q.liquid, n = () => !0) {
|
|
|
353
353
|
if (t.startsWith("#")) return t;
|
|
354
354
|
if (t.startsWith("//")) return `https:${t}`;
|
|
355
355
|
if (l.test(t)) return t;
|
|
356
|
-
let n =
|
|
357
|
-
return n ?
|
|
356
|
+
let n = Be(t);
|
|
357
|
+
return n ? ct.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
|
|
358
358
|
}
|
|
359
359
|
function f() {
|
|
360
360
|
n() && (e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p());
|
|
@@ -378,13 +378,13 @@ function Rr(e, t = Q.liquid, n = () => !0) {
|
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
// src/composables/useRichTextEditor.ts
|
|
381
|
-
function
|
|
382
|
-
let n = g(
|
|
381
|
+
function Vr(t) {
|
|
382
|
+
let n = g(Sn, null), r = _t(), i = g(Kt, null), a = I(() => r.value && !i?.value), { mergeTags: o, canRequestMergeTag: s, isRequesting: c, requestMergeTag: l, syntax: d, autocomplete: f } = K(), { canInsertLogicTag: p, isRequesting: h, requestLogicTag: _ } = Dn(), v = g(Xt, null), y = (S(v) ? v.value : v)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", b = Me(d), x = R(null), C = n?.content ? St(n) : null, w = () => He(C?.settings.value ?? { locale: "en" });
|
|
383
383
|
u(w, (e) => {
|
|
384
384
|
let t = x.value?.view.dom;
|
|
385
385
|
t && t.setAttribute("dir", e);
|
|
386
386
|
});
|
|
387
|
-
let { showLinkDialog: T, linkUrl: E, linkColor: D, linkDialogRef: O, openLinkDialog: ee, insertLink: k, removeLink: A, closeLinkDialog: j, handleLinkKeydown: M } =
|
|
387
|
+
let { showLinkDialog: T, linkUrl: E, linkColor: D, linkDialogRef: O, openLinkDialog: ee, insertLink: k, removeLink: A, closeLinkDialog: j, handleLinkKeydown: M } = Br(x, d, () => a.value);
|
|
388
388
|
u(a, (e) => {
|
|
389
389
|
if (x.value?.setEditable(e, !1), !e) {
|
|
390
390
|
j();
|
|
@@ -452,10 +452,10 @@ function zr(t) {
|
|
|
452
452
|
value: e.value
|
|
453
453
|
}).run() : x.value?.commands.focus());
|
|
454
454
|
}
|
|
455
|
-
async function
|
|
455
|
+
async function J() {
|
|
456
456
|
if (!a.value) return;
|
|
457
457
|
let e = await _();
|
|
458
|
-
!B && a.value && (e && x.value ?
|
|
458
|
+
!B && a.value && (e && x.value ? Lr(x.value, e, d) : x.value?.commands.focus());
|
|
459
459
|
}
|
|
460
460
|
return {
|
|
461
461
|
editor: x,
|
|
@@ -480,29 +480,29 @@ function zr(t) {
|
|
|
480
480
|
closeLinkDialog: j,
|
|
481
481
|
handleLinkKeydown: M,
|
|
482
482
|
handleAddMergeTag: q,
|
|
483
|
-
handleAddLogicTag:
|
|
483
|
+
handleAddLogicTag: J
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
486
|
// src/utils/activeEditorTracker.ts
|
|
487
|
-
var
|
|
488
|
-
function
|
|
489
|
-
let e = ++
|
|
490
|
-
return
|
|
487
|
+
var Hr = /* @__PURE__ */ new Set(), Ur = 0, Wr = 0;
|
|
488
|
+
function Gr() {
|
|
489
|
+
let e = ++Wr;
|
|
490
|
+
return Hr.add(e), Ur === 0 && (Ur = e), {
|
|
491
491
|
id: e,
|
|
492
|
-
isActive: () =>
|
|
492
|
+
isActive: () => Hr.size <= 1 || Ur === e,
|
|
493
493
|
claim: () => {
|
|
494
|
-
|
|
494
|
+
Ur = e;
|
|
495
495
|
},
|
|
496
496
|
dispose: () => {
|
|
497
|
-
if (
|
|
498
|
-
let e = Array.from(
|
|
499
|
-
|
|
497
|
+
if (Hr.delete(e), Ur === e) {
|
|
498
|
+
let e = Array.from(Hr);
|
|
499
|
+
Ur = e[e.length - 1] ?? 0;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
};
|
|
503
503
|
}
|
|
504
504
|
// src/utils/resolveLintOptions.ts
|
|
505
|
-
function
|
|
505
|
+
function Kr(e) {
|
|
506
506
|
let t = e.contentLocale ?? e.content?.settings.locale;
|
|
507
507
|
return {
|
|
508
508
|
...e.lint,
|
|
@@ -511,8 +511,8 @@ function Wr(e) {
|
|
|
511
511
|
};
|
|
512
512
|
}
|
|
513
513
|
// src/composables/usePreviewResolution.ts
|
|
514
|
-
var
|
|
515
|
-
function
|
|
514
|
+
var qr = 500;
|
|
515
|
+
function Jr(e) {
|
|
516
516
|
let t = typeof e.resolvePreview == "function", n = H(null), r = H(!1), i = H(!1), a = H(!1), o = 0, s = null;
|
|
517
517
|
function c() {
|
|
518
518
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -523,7 +523,7 @@ function Kr(e) {
|
|
|
523
523
|
let c = ++o;
|
|
524
524
|
r.value = !0;
|
|
525
525
|
let l = {
|
|
526
|
-
content:
|
|
526
|
+
content: Re(e.getContent()),
|
|
527
527
|
surface: e.surface,
|
|
528
528
|
trigger: t,
|
|
529
529
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
@@ -531,7 +531,7 @@ function Kr(e) {
|
|
|
531
531
|
try {
|
|
532
532
|
let e = await s(l);
|
|
533
533
|
if (c !== o) return;
|
|
534
|
-
if (!
|
|
534
|
+
if (!ot(e)) {
|
|
535
535
|
i.value = !0, n.value = null;
|
|
536
536
|
return;
|
|
537
537
|
}
|
|
@@ -546,7 +546,7 @@ function Kr(e) {
|
|
|
546
546
|
function d(e) {
|
|
547
547
|
t && (c(), !a.value && e !== "recipient" ? l(e) : s = setTimeout(() => {
|
|
548
548
|
s = null, l(e);
|
|
549
|
-
},
|
|
549
|
+
}, qr));
|
|
550
550
|
}
|
|
551
551
|
function f() {
|
|
552
552
|
t && e.isActive() && (c(), l("refresh"));
|
|
@@ -579,7 +579,7 @@ function Kr(e) {
|
|
|
579
579
|
};
|
|
580
580
|
}
|
|
581
581
|
// src/composables/useMergeTagPicker.ts
|
|
582
|
-
function
|
|
582
|
+
function Yr() {
|
|
583
583
|
let e = H(!1), t = H([]), n = H(null), r = null;
|
|
584
584
|
function i(i, a) {
|
|
585
585
|
if (r) {
|
|
@@ -609,7 +609,7 @@ function qr() {
|
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
611
|
// src/composables/useLogicTagPicker.ts
|
|
612
|
-
function
|
|
612
|
+
function Xr() {
|
|
613
613
|
let e = H(!1), t = H([]), n = H([]), r = null;
|
|
614
614
|
function i(i, a) {
|
|
615
615
|
if (r) {
|
|
@@ -639,23 +639,23 @@ function Jr() {
|
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
641
|
// src/composables/useTemplateLint.ts
|
|
642
|
-
function
|
|
642
|
+
function Zr(e) {
|
|
643
643
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 && e.deliverability === !1 && e.compatibility === !1 && e.localization === !1 : !1;
|
|
644
644
|
}
|
|
645
|
-
var
|
|
646
|
-
function
|
|
645
|
+
var Qr = !1;
|
|
646
|
+
function $r(e) {
|
|
647
647
|
let t = H([]), n = H(0), r = H(-1), i = u(e.content, () => {
|
|
648
648
|
n.value++;
|
|
649
|
-
}, { deep: !0 }), a = H(!1), o = H(!1), s = R(null), c =
|
|
649
|
+
}, { deep: !0 }), a = H(!1), o = H(!1), s = R(null), c = Zr(e.options), l = null, d = !1;
|
|
650
650
|
c || f();
|
|
651
651
|
async function f() {
|
|
652
652
|
try {
|
|
653
|
-
let t = await import("./src-
|
|
653
|
+
let t = await import("./src-edESkGqO.js");
|
|
654
654
|
if (d) return;
|
|
655
|
-
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), l =
|
|
655
|
+
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), l = re(n, p, { debounce: e.debounce ?? 500 });
|
|
656
656
|
} catch {
|
|
657
657
|
if (d) return;
|
|
658
|
-
o.value = !0,
|
|
658
|
+
o.value = !0, Qr || (Qr = !0, $.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
661
|
function p() {
|
|
@@ -694,7 +694,7 @@ function Zr(e) {
|
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
696
|
// src/composables/useKeyboardReorder.ts
|
|
697
|
-
function
|
|
697
|
+
function ei(e, t, n = []) {
|
|
698
698
|
let r = H(null), i = H(""), a = null;
|
|
699
699
|
function o(t) {
|
|
700
700
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -721,7 +721,7 @@ function Qr(e, t, n = []) {
|
|
|
721
721
|
let i = o(r);
|
|
722
722
|
if (!i) return "";
|
|
723
723
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
724
|
-
return a ?
|
|
724
|
+
return a ? Kn(a, t.t, n) : "";
|
|
725
725
|
}
|
|
726
726
|
function c(t, n) {
|
|
727
727
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -789,14 +789,14 @@ function Qr(e, t, n = []) {
|
|
|
789
789
|
};
|
|
790
790
|
}
|
|
791
791
|
// src/composables/useUiTheme.ts
|
|
792
|
-
function
|
|
792
|
+
function ti(e) {
|
|
793
793
|
let n = t("(prefers-color-scheme: dark)");
|
|
794
794
|
return { resolvedTheme: I(() => e.value === "auto" ? n.value ? "dark" : "light" : e.value) };
|
|
795
795
|
}
|
|
796
796
|
// src/composables/useCustomBlockStylesheets.ts
|
|
797
|
-
function
|
|
797
|
+
function ni(e, t) {
|
|
798
798
|
return I(() => {
|
|
799
|
-
let n =
|
|
799
|
+
let n = ri(e.value.blocks);
|
|
800
800
|
if (n.size === 0) return [];
|
|
801
801
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
802
802
|
for (let e of n) {
|
|
@@ -808,59 +808,59 @@ function ei(e, t) {
|
|
|
808
808
|
return i;
|
|
809
809
|
});
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function ri(e) {
|
|
812
812
|
let t = /* @__PURE__ */ new Set();
|
|
813
|
-
return
|
|
813
|
+
return ii(e, t), t;
|
|
814
814
|
}
|
|
815
|
-
function
|
|
816
|
-
for (let n of e) if (
|
|
815
|
+
function ii(e, t) {
|
|
816
|
+
for (let n of e) if (mt(n)) t.add(n.customType);
|
|
817
817
|
else if (n.type === "section") {
|
|
818
818
|
let e = n.children;
|
|
819
819
|
if (!e) continue;
|
|
820
|
-
for (let n of e)
|
|
821
|
-
} else
|
|
820
|
+
for (let n of e) ii(n, t);
|
|
821
|
+
} else ye(n) && ii(n.children, t);
|
|
822
822
|
}
|
|
823
823
|
// src/utils/registerBuiltInBlocks.ts
|
|
824
|
-
var
|
|
824
|
+
var ai = [
|
|
825
825
|
{
|
|
826
826
|
type: "section",
|
|
827
|
-
createBlock:
|
|
827
|
+
createBlock: xe
|
|
828
828
|
},
|
|
829
829
|
{
|
|
830
830
|
type: "title",
|
|
831
|
-
createBlock:
|
|
831
|
+
createBlock: be
|
|
832
832
|
},
|
|
833
833
|
{
|
|
834
834
|
type: "paragraph",
|
|
835
|
-
createBlock:
|
|
835
|
+
createBlock: Q
|
|
836
836
|
},
|
|
837
837
|
{
|
|
838
838
|
type: "image",
|
|
839
|
-
createBlock:
|
|
839
|
+
createBlock: Oe
|
|
840
840
|
},
|
|
841
841
|
{
|
|
842
842
|
type: "button",
|
|
843
|
-
createBlock:
|
|
843
|
+
createBlock: Le
|
|
844
844
|
},
|
|
845
845
|
{
|
|
846
846
|
type: "divider",
|
|
847
|
-
createBlock:
|
|
847
|
+
createBlock: Z
|
|
848
848
|
},
|
|
849
849
|
{
|
|
850
850
|
type: "video",
|
|
851
|
-
createBlock:
|
|
851
|
+
createBlock: Ce
|
|
852
852
|
},
|
|
853
853
|
{
|
|
854
854
|
type: "social",
|
|
855
|
-
createBlock:
|
|
855
|
+
createBlock: ae
|
|
856
856
|
},
|
|
857
857
|
{
|
|
858
858
|
type: "menu",
|
|
859
|
-
createBlock:
|
|
859
|
+
createBlock: se
|
|
860
860
|
},
|
|
861
861
|
{
|
|
862
862
|
type: "table",
|
|
863
|
-
createBlock:
|
|
863
|
+
createBlock: _e
|
|
864
864
|
},
|
|
865
865
|
{
|
|
866
866
|
type: "spacer",
|
|
@@ -868,15 +868,15 @@ var ri = [
|
|
|
868
868
|
},
|
|
869
869
|
{
|
|
870
870
|
type: "html",
|
|
871
|
-
createBlock:
|
|
871
|
+
createBlock: ut
|
|
872
872
|
},
|
|
873
873
|
{
|
|
874
874
|
type: "countdown",
|
|
875
|
-
createBlock:
|
|
875
|
+
createBlock: dt
|
|
876
876
|
}
|
|
877
877
|
];
|
|
878
|
-
function
|
|
879
|
-
for (let n of
|
|
878
|
+
function oi(e, t) {
|
|
879
|
+
for (let n of ai) {
|
|
880
880
|
let r = t[n.type];
|
|
881
881
|
r && e.registerBuiltIn(n.type, {
|
|
882
882
|
component: r,
|
|
@@ -885,22 +885,22 @@ function ii(e, t) {
|
|
|
885
885
|
}
|
|
886
886
|
}
|
|
887
887
|
// src/utils/resolveHtmlBlockPreview.ts
|
|
888
|
-
function
|
|
888
|
+
function si(e) {
|
|
889
889
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
890
890
|
}
|
|
891
891
|
// src/utils/collectOffPaletteDefaults.ts
|
|
892
|
-
function
|
|
892
|
+
function ci(e) {
|
|
893
893
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
894
894
|
}
|
|
895
|
-
function
|
|
896
|
-
let r = new Set(e.map((e) =>
|
|
897
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
895
|
+
function li(e, t, n) {
|
|
896
|
+
let r = new Set(e.map((e) => gt(e))), i = [], a = (e, t) => {
|
|
897
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(gt(o)) && i.push(`${t}.${n}: ${o}`) : ci(o) && a(o, `${t}.${n}`);
|
|
898
898
|
}, o = t;
|
|
899
|
-
for (let [e, t] of Object.entries(
|
|
899
|
+
for (let [e, t] of Object.entries(et)) {
|
|
900
900
|
let n = o?.[e];
|
|
901
901
|
a({
|
|
902
902
|
...t,
|
|
903
|
-
...
|
|
903
|
+
...ci(n) ? n : {}
|
|
904
904
|
}, e);
|
|
905
905
|
}
|
|
906
906
|
return a({
|
|
@@ -909,7 +909,7 @@ function si(e, t, n) {
|
|
|
909
909
|
}, "template"), i;
|
|
910
910
|
}
|
|
911
911
|
// src/utils/localizedBlockDefaults.ts
|
|
912
|
-
function
|
|
912
|
+
function ui(e) {
|
|
913
913
|
return {
|
|
914
914
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
915
915
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -917,63 +917,63 @@ function ci(e) {
|
|
|
917
917
|
};
|
|
918
918
|
}
|
|
919
919
|
// src/i18n/index.ts
|
|
920
|
-
var
|
|
921
|
-
"./locales/ca.ts": () => import("./ca-
|
|
922
|
-
"./locales/da.ts": () => import("./da-
|
|
923
|
-
"./locales/de.ts": () => import("./de-
|
|
924
|
-
"./locales/en.ts": () => import("./en-
|
|
925
|
-
"./locales/es.ts": () => import("./es-
|
|
926
|
-
"./locales/fr.ts": () => import("./fr-
|
|
927
|
-
"./locales/ja.ts": () => import("./ja-
|
|
928
|
-
"./locales/nl.ts": () => import("./nl-
|
|
929
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
930
|
-
}),
|
|
920
|
+
var di = /* #__PURE__ */ Object.assign({
|
|
921
|
+
"./locales/ca.ts": () => import("./ca-C8N05sCU.js"),
|
|
922
|
+
"./locales/da.ts": () => import("./da-Dno_4nGy.js"),
|
|
923
|
+
"./locales/de.ts": () => import("./de-DRR5JSkh.js"),
|
|
924
|
+
"./locales/en.ts": () => import("./en-DAcLbbpg.js"),
|
|
925
|
+
"./locales/es.ts": () => import("./es-BcEQLQxe.js"),
|
|
926
|
+
"./locales/fr.ts": () => import("./fr-CNQG7ESr.js"),
|
|
927
|
+
"./locales/ja.ts": () => import("./ja-CMxWxqSH.js"),
|
|
928
|
+
"./locales/nl.ts": () => import("./nl-BjyYZDkC.js"),
|
|
929
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-DC2A3C0v.js")
|
|
930
|
+
}), fi = /* #__PURE__ */ Object.assign({
|
|
931
931
|
"./locales/cloud/de.ts": () => import("./de-6M4JoHoD.js"),
|
|
932
932
|
"./locales/cloud/en.ts": () => import("./en-FzUuJ8HW.js"),
|
|
933
933
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-Bp92Fc6J.js")
|
|
934
934
|
});
|
|
935
|
-
function
|
|
935
|
+
function pi(e) {
|
|
936
936
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
937
937
|
}
|
|
938
|
-
var
|
|
939
|
-
function
|
|
938
|
+
var mi = pi(di), hi = pi(fi);
|
|
939
|
+
function gi(e) {
|
|
940
940
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
941
941
|
}
|
|
942
|
-
function
|
|
943
|
-
let n =
|
|
944
|
-
return t.find((e) =>
|
|
942
|
+
function _i(e, t) {
|
|
943
|
+
let n = gi(e);
|
|
944
|
+
return t.find((e) => gi(e) === n);
|
|
945
945
|
}
|
|
946
|
-
function
|
|
947
|
-
return
|
|
946
|
+
function vi(e) {
|
|
947
|
+
return gi(e).split("-")[0];
|
|
948
948
|
}
|
|
949
|
-
function
|
|
950
|
-
return
|
|
949
|
+
function yi(e, t) {
|
|
950
|
+
return _i(e, t) ?? _i(vi(e), t);
|
|
951
951
|
}
|
|
952
|
-
function
|
|
953
|
-
return
|
|
952
|
+
function bi(e, t) {
|
|
953
|
+
return yi(e, t) ?? "en";
|
|
954
954
|
}
|
|
955
|
-
async function
|
|
956
|
-
let t =
|
|
955
|
+
async function xi(e) {
|
|
956
|
+
let t = di[`./locales/${bi(e, mi)}.ts`];
|
|
957
957
|
return (await t()).default;
|
|
958
958
|
}
|
|
959
|
-
async function
|
|
960
|
-
let t =
|
|
959
|
+
async function Si(e) {
|
|
960
|
+
let t = fi[`./locales/cloud/${bi(e, hi)}.ts`];
|
|
961
961
|
return (await t()).default;
|
|
962
962
|
}
|
|
963
|
-
function
|
|
964
|
-
return
|
|
963
|
+
function Ci(e) {
|
|
964
|
+
return yi(e, mi) !== void 0;
|
|
965
965
|
}
|
|
966
|
-
function
|
|
967
|
-
return
|
|
966
|
+
function wi(e) {
|
|
967
|
+
return yi(e, hi) !== void 0;
|
|
968
968
|
}
|
|
969
|
-
function
|
|
970
|
-
return [...
|
|
969
|
+
function Ti() {
|
|
970
|
+
return [...mi];
|
|
971
971
|
}
|
|
972
|
-
function
|
|
973
|
-
return [...
|
|
972
|
+
function Ei() {
|
|
973
|
+
return [...hi];
|
|
974
974
|
}
|
|
975
975
|
// src/i18n/contentDefaults.ts
|
|
976
|
-
var
|
|
976
|
+
var Di = {
|
|
977
977
|
en: {
|
|
978
978
|
video: "Video",
|
|
979
979
|
days: "Days",
|
|
@@ -1046,16 +1046,16 @@ var Ti = {
|
|
|
1046
1046
|
seconds: "Sekunder",
|
|
1047
1047
|
expired: "Dette tilbud er udløbet"
|
|
1048
1048
|
}
|
|
1049
|
-
},
|
|
1050
|
-
function
|
|
1051
|
-
if (!e) return
|
|
1052
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
1053
|
-
if (n) return
|
|
1054
|
-
let r =
|
|
1055
|
-
return r ?
|
|
1049
|
+
}, Oi = new Map(Object.keys(Di).map((e) => [e.toLowerCase(), e]));
|
|
1050
|
+
function ki(e) {
|
|
1051
|
+
if (!e) return Di.en;
|
|
1052
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = Oi.get(t);
|
|
1053
|
+
if (n) return Di[n];
|
|
1054
|
+
let r = Oi.get(vi(t));
|
|
1055
|
+
return r ? Di[r] : Di.en;
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1058
|
-
let t =
|
|
1057
|
+
function Ai(e) {
|
|
1058
|
+
let t = ki(e);
|
|
1059
1059
|
return {
|
|
1060
1060
|
video: { alt: t.video },
|
|
1061
1061
|
countdown: {
|
|
@@ -1068,9 +1068,9 @@ function Oi(e) {
|
|
|
1068
1068
|
};
|
|
1069
1069
|
}
|
|
1070
1070
|
// src/utils/collectColorFieldIssues.ts
|
|
1071
|
-
function
|
|
1071
|
+
function ji(e, t) {
|
|
1072
1072
|
let n = [], r = (r, i) => {
|
|
1073
|
-
let a =
|
|
1073
|
+
let a = Un(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1074
1074
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1075
1075
|
id: s("invalid-presets"),
|
|
1076
1076
|
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." : "")
|
|
@@ -1081,8 +1081,8 @@ function ki(e, t) {
|
|
|
1081
1081
|
id: s("allow-custom-ignored"),
|
|
1082
1082
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1083
1083
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1084
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1085
|
-
e !== "" && !t.has(
|
|
1084
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => gt(e)));
|
|
1085
|
+
e !== "" && !t.has(gt(e)) && n.push({
|
|
1086
1086
|
id: s("off-palette-default"),
|
|
1087
1087
|
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.`
|
|
1088
1088
|
});
|
|
@@ -1093,7 +1093,7 @@ function ki(e, t) {
|
|
|
1093
1093
|
return n;
|
|
1094
1094
|
}
|
|
1095
1095
|
// src/utils/keyboardShortcuts.ts
|
|
1096
|
-
function
|
|
1096
|
+
function Mi(e) {
|
|
1097
1097
|
for (let t of e.composedPath()) {
|
|
1098
1098
|
if (!(t instanceof HTMLElement)) continue;
|
|
1099
1099
|
if (t.isContentEditable) return !0;
|
|
@@ -1102,14 +1102,14 @@ function Ai(e) {
|
|
|
1102
1102
|
}
|
|
1103
1103
|
return !1;
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function Ni(e, t) {
|
|
1106
1106
|
let n = e.metaKey || e.ctrlKey;
|
|
1107
1107
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
1108
1108
|
else if (n && e.key.toLowerCase() === "z") {
|
|
1109
|
-
if (
|
|
1109
|
+
if (Mi(e)) return;
|
|
1110
1110
|
e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
|
|
1111
1111
|
} else {
|
|
1112
|
-
if (t.isPicking?.() && !
|
|
1112
|
+
if (t.isPicking?.() && !Mi(e)) {
|
|
1113
1113
|
if (e.key === "Escape") {
|
|
1114
1114
|
e.preventDefault(), t.onCancelPick?.();
|
|
1115
1115
|
return;
|
|
@@ -1123,129 +1123,129 @@ function ji(e, t) {
|
|
|
1123
1123
|
return;
|
|
1124
1124
|
}
|
|
1125
1125
|
}
|
|
1126
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1126
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Mi(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
1129
|
// src/utils/blockComponentResolver.ts
|
|
1130
|
-
function
|
|
1130
|
+
function Pi(e, t) {
|
|
1131
1131
|
let n = { fontFamily: t(e.fontFamily) };
|
|
1132
1132
|
return e.textColor && (n.color = e.textColor), e.linkColor && (n["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (n["--tpl-doc-link-underline"] = "underline"), n;
|
|
1133
1133
|
}
|
|
1134
|
-
function
|
|
1134
|
+
function Fi(e, t, n) {
|
|
1135
1135
|
if (t) {
|
|
1136
1136
|
let n = t.getComponent(e);
|
|
1137
1137
|
if (n) return n;
|
|
1138
1138
|
}
|
|
1139
1139
|
return n[e.type] ?? null;
|
|
1140
1140
|
}
|
|
1141
|
-
var
|
|
1142
|
-
function
|
|
1141
|
+
var Ii = "--tpl-block-bg-layer", Li = "--tpl-email-frame-width", Ri = "tpl-has-bg-image";
|
|
1142
|
+
function zi(e, t) {
|
|
1143
1143
|
if (t === null) return {};
|
|
1144
|
-
let n =
|
|
1144
|
+
let n = me(e);
|
|
1145
1145
|
if (n === null) return {};
|
|
1146
|
-
let r = t?.trim(), i = r ?
|
|
1146
|
+
let r = t?.trim(), i = r ? ue(r) : n.url;
|
|
1147
1147
|
return {
|
|
1148
1148
|
backgroundImage: `url("${i}")`,
|
|
1149
1149
|
backgroundSize: n.size,
|
|
1150
1150
|
backgroundPosition: n.position,
|
|
1151
1151
|
backgroundRepeat: n.repeat,
|
|
1152
|
-
[
|
|
1152
|
+
[Ii]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
1153
1153
|
};
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1156
|
-
return e &&
|
|
1155
|
+
function Bi(e) {
|
|
1156
|
+
return e && Ii in e ? Ri : void 0;
|
|
1157
1157
|
}
|
|
1158
|
-
var
|
|
1158
|
+
var Vi = {
|
|
1159
1159
|
top: "flex-start",
|
|
1160
1160
|
middle: "center",
|
|
1161
1161
|
bottom: "flex-end"
|
|
1162
1162
|
};
|
|
1163
|
-
function
|
|
1164
|
-
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${
|
|
1163
|
+
function Hi(e, t) {
|
|
1164
|
+
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${Ui(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
1165
1165
|
return {
|
|
1166
1166
|
display: "flex",
|
|
1167
1167
|
flexDirection: "column",
|
|
1168
|
-
justifyContent:
|
|
1168
|
+
justifyContent: Vi[e.verticalAlign],
|
|
1169
1169
|
boxSizing: "border-box",
|
|
1170
1170
|
...n
|
|
1171
1171
|
};
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function Ui(e, t) {
|
|
1174
1174
|
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function Wi(e, t = {}) {
|
|
1177
1177
|
if (e.type === "wrapper") return {};
|
|
1178
1178
|
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
1179
1179
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
1180
1180
|
backgroundColor: r || "transparent"
|
|
1181
1181
|
};
|
|
1182
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
1183
|
-
let n =
|
|
1182
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? oe.paragraphGap : oe.paragraphGap}px`), e.type === "section") {
|
|
1183
|
+
let n = ve(e.borderRadius);
|
|
1184
1184
|
n !== null && (i.borderRadius = n);
|
|
1185
|
-
let r =
|
|
1186
|
-
r?.applied && e.backgroundImage ? (Object.assign(i,
|
|
1185
|
+
let r = ke(e);
|
|
1186
|
+
r?.applied && e.backgroundImage ? (Object.assign(i, Hi(r, t.heroBoxWidth)), Object.assign(i, zi({
|
|
1187
1187
|
...e.backgroundImage,
|
|
1188
1188
|
size: "cover",
|
|
1189
1189
|
repeat: !1
|
|
1190
|
-
}, t.backgroundImageUrl))) : (Object.assign(i,
|
|
1190
|
+
}, t.backgroundImageUrl))) : (Object.assign(i, Ki(e.border)), Object.assign(i, zi(e.backgroundImage, t.backgroundImageUrl)));
|
|
1191
1191
|
}
|
|
1192
1192
|
return i;
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1195
|
-
return e.type === "section" ?
|
|
1196
|
-
backgroundImageUrl:
|
|
1194
|
+
function Gi(e, t, n, r) {
|
|
1195
|
+
return e.type === "section" ? Wi(e, {
|
|
1196
|
+
backgroundImageUrl: kn(t, e.backgroundImage, n),
|
|
1197
1197
|
heroBoxWidth: r
|
|
1198
|
-
}) :
|
|
1198
|
+
}) : Wi(e);
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1200
|
+
function Ki(e) {
|
|
1201
1201
|
let t = {};
|
|
1202
|
-
for (let [n, r] of Object.entries(
|
|
1202
|
+
for (let [n, r] of Object.entries(Ye(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1203
1203
|
return t;
|
|
1204
1204
|
}
|
|
1205
|
-
var
|
|
1205
|
+
var qi = {
|
|
1206
1206
|
width: "100cqw",
|
|
1207
1207
|
maxWidth: "none",
|
|
1208
1208
|
marginInline: "calc(50% - 50cqw)",
|
|
1209
1209
|
boxSizing: "border-box"
|
|
1210
1210
|
};
|
|
1211
|
-
function
|
|
1211
|
+
function Ji(e) {
|
|
1212
1212
|
return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
|
|
1213
1213
|
}
|
|
1214
|
-
function
|
|
1214
|
+
function Yi(e) {
|
|
1215
1215
|
let t = {
|
|
1216
1216
|
width: "var(--tpl-email-frame-width)",
|
|
1217
1217
|
maxWidth: "100%",
|
|
1218
1218
|
marginInline: "auto",
|
|
1219
1219
|
boxSizing: "border-box"
|
|
1220
1220
|
};
|
|
1221
|
-
return e && (t.padding =
|
|
1221
|
+
return e && (t.padding = Ji(e)), t;
|
|
1222
1222
|
}
|
|
1223
|
-
function
|
|
1223
|
+
function Xi(e, t = {}) {
|
|
1224
1224
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1225
1225
|
let n = e.wrapper, r = {};
|
|
1226
|
-
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding =
|
|
1227
|
-
let e =
|
|
1226
|
+
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = Ji(n.padding)), !n.fullWidth) {
|
|
1227
|
+
let e = ve(n.borderRadius);
|
|
1228
1228
|
e !== null && (r.borderRadius = e);
|
|
1229
1229
|
}
|
|
1230
|
-
return Object.assign(r,
|
|
1230
|
+
return Object.assign(r, zi(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, qi), r;
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1232
|
+
function Zi(e, t = {}) {
|
|
1233
1233
|
if (e.type !== "wrapper") return null;
|
|
1234
1234
|
let n = {};
|
|
1235
|
-
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding =
|
|
1235
|
+
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding = Ji(e.styles.padding)), !e.fullWidth && e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, zi(e.backgroundImage, t.backgroundImageUrl)), e.fullWidth && Object.assign(n, qi), n;
|
|
1236
1236
|
}
|
|
1237
1237
|
// src/utils/mergeTagLabelSegments.ts
|
|
1238
|
-
function
|
|
1238
|
+
function Qi(e, t, n, r = !1) {
|
|
1239
1239
|
if (!e) return [];
|
|
1240
1240
|
let i = [], a = 0;
|
|
1241
|
-
for (let o of
|
|
1241
|
+
for (let o of tt(e, n)) {
|
|
1242
1242
|
o.index > a && i.push({
|
|
1243
1243
|
type: "text",
|
|
1244
1244
|
value: e.slice(a, o.index)
|
|
1245
1245
|
});
|
|
1246
1246
|
let s = o.value;
|
|
1247
|
-
if (
|
|
1248
|
-
let e = r ?
|
|
1247
|
+
if (we(s, n)) {
|
|
1248
|
+
let e = r ? it(s, t) : void 0;
|
|
1249
1249
|
i.push(e === void 0 ? {
|
|
1250
1250
|
type: "tag",
|
|
1251
1251
|
value: pe(s, t)
|
|
@@ -1253,9 +1253,9 @@ function Xi(e, t, n, r = !1) {
|
|
|
1253
1253
|
type: "text",
|
|
1254
1254
|
value: e
|
|
1255
1255
|
});
|
|
1256
|
-
} else
|
|
1256
|
+
} else Pe(s, n) ? i.push({
|
|
1257
1257
|
type: "tag",
|
|
1258
|
-
value:
|
|
1258
|
+
value: le(s, n)
|
|
1259
1259
|
}) : i.push({
|
|
1260
1260
|
type: "text",
|
|
1261
1261
|
value: s
|
|
@@ -1268,27 +1268,27 @@ function Xi(e, t, n, r = !1) {
|
|
|
1268
1268
|
}), i;
|
|
1269
1269
|
}
|
|
1270
1270
|
// src/components/MergeTagPreviewText.vue
|
|
1271
|
-
var
|
|
1271
|
+
var $i = o({
|
|
1272
1272
|
name: "MergeTagPreviewText",
|
|
1273
1273
|
props: { text: {
|
|
1274
1274
|
type: String,
|
|
1275
1275
|
required: !0
|
|
1276
1276
|
} },
|
|
1277
1277
|
setup(e) {
|
|
1278
|
-
let t = g(
|
|
1278
|
+
let t = g(Rt, Ut), n = g(Tt, de.liquid), r = g(un, null), i = I(() => Qi(e.text, t.value, n, r?.value ?? !1));
|
|
1279
1279
|
return () => i.value.map((e, t) => e.type === "tag" ? s("span", {
|
|
1280
1280
|
key: t,
|
|
1281
1281
|
class: "tpl-merge-tag-label"
|
|
1282
1282
|
}, e.value) : e.value);
|
|
1283
1283
|
}
|
|
1284
|
-
}),
|
|
1284
|
+
}), ea = ["href"], ta = /* @__PURE__ */ o({
|
|
1285
1285
|
__name: "ButtonBlock",
|
|
1286
1286
|
props: {
|
|
1287
1287
|
block: {},
|
|
1288
1288
|
viewport: {}
|
|
1289
1289
|
},
|
|
1290
1290
|
setup(e) {
|
|
1291
|
-
let t = e, n =
|
|
1291
|
+
let t = e, n = xn(Zt, "ButtonBlock");
|
|
1292
1292
|
function r(e) {
|
|
1293
1293
|
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1294
1294
|
}
|
|
@@ -1299,33 +1299,33 @@ var Zi = o({
|
|
|
1299
1299
|
backgroundColor: t.block.backgroundColor,
|
|
1300
1300
|
color: t.block.textColor,
|
|
1301
1301
|
fontSize: `${t.block.fontSize}px`,
|
|
1302
|
-
lineHeight: String(
|
|
1302
|
+
lineHeight: String(Xe(t.block)),
|
|
1303
1303
|
fontWeight: r(t.block.fontWeight),
|
|
1304
1304
|
textDecoration: "none",
|
|
1305
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
1305
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : ve(t.block.borderRadius) ?? "0px",
|
|
1306
1306
|
textAlign: "center"
|
|
1307
1307
|
};
|
|
1308
|
-
return Object.assign(e,
|
|
1308
|
+
return Object.assign(e, Ki(t.block.border)), t.block.fontFamily && (e.fontFamily = n.resolveFontFamily(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") : typeof t.block.width == "string" && ft(t.block.width) !== null && (e.width = t.block.width, e.boxSizing = "border-box"), e;
|
|
1309
1309
|
}), a = I(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1310
1310
|
return (t, n) => (c(), w("div", { style: L(a.value) }, [N("a", {
|
|
1311
1311
|
href: e.block.url || "#",
|
|
1312
1312
|
style: L(i.value),
|
|
1313
1313
|
class: "tpl:cursor-default",
|
|
1314
1314
|
onClick: n[0] ||= M(() => {}, ["prevent"])
|
|
1315
|
-
}, [W(
|
|
1315
|
+
}, [W($i, { text: e.block.text }, null, 8, ["text"])], 12, ea)], 4));
|
|
1316
1316
|
}
|
|
1317
|
-
}),
|
|
1317
|
+
}), na = ["innerHTML"], ra = [
|
|
1318
1318
|
"src",
|
|
1319
1319
|
"width",
|
|
1320
1320
|
"height"
|
|
1321
|
-
],
|
|
1321
|
+
], ia = /* @__PURE__ */ o({
|
|
1322
1322
|
__name: "CustomBlockIcon",
|
|
1323
1323
|
props: {
|
|
1324
1324
|
icon: {},
|
|
1325
1325
|
size: {}
|
|
1326
1326
|
},
|
|
1327
1327
|
setup(e) {
|
|
1328
|
-
let t = e, n = I(() => t.size ?? 20), r = I(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = I(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = I(() => r.value ?
|
|
1328
|
+
let t = e, n = I(() => t.size ?? 20), r = I(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = I(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = I(() => r.value ? Xn(t.icon ?? "") : "");
|
|
1329
1329
|
return (t, o) => r.value ? (c(), w("span", {
|
|
1330
1330
|
key: 0,
|
|
1331
1331
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
@@ -1334,33 +1334,33 @@ var Zi = o({
|
|
|
1334
1334
|
height: `${n.value}px`
|
|
1335
1335
|
}),
|
|
1336
1336
|
innerHTML: a.value
|
|
1337
|
-
}, null, 12,
|
|
1337
|
+
}, null, 12, na)) : i.value ? (c(), w("img", {
|
|
1338
1338
|
key: 1,
|
|
1339
1339
|
src: e.icon,
|
|
1340
1340
|
width: n.value,
|
|
1341
1341
|
height: n.value,
|
|
1342
1342
|
class: "tpl:inline-block",
|
|
1343
1343
|
alt: ""
|
|
1344
|
-
}, null, 8,
|
|
1344
|
+
}, null, 8, ra)) : (c(), A(D(ir), {
|
|
1345
1345
|
key: 2,
|
|
1346
1346
|
size: n.value,
|
|
1347
1347
|
"stroke-width": 1.5
|
|
1348
1348
|
}, null, 8, ["size"]));
|
|
1349
1349
|
}
|
|
1350
|
-
}),
|
|
1350
|
+
}), aa = { class: "tpl:w-full" }, oa = {
|
|
1351
1351
|
key: 0,
|
|
1352
1352
|
class: "tpl:flex tpl:box-border 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)]"
|
|
1353
|
-
},
|
|
1353
|
+
}, sa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ca = {
|
|
1354
1354
|
key: 1,
|
|
1355
1355
|
class: "tpl:flex tpl:box-border 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)]"
|
|
1356
|
-
},
|
|
1356
|
+
}, la = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ua = {
|
|
1357
1357
|
key: 2,
|
|
1358
1358
|
class: "tpl:relative"
|
|
1359
|
-
},
|
|
1359
|
+
}, da = ["innerHTML"], fa = {
|
|
1360
1360
|
key: 0,
|
|
1361
1361
|
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]",
|
|
1362
1362
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1363
|
-
},
|
|
1363
|
+
}, pa = /* @__PURE__ */ o({
|
|
1364
1364
|
__name: "CustomBlock",
|
|
1365
1365
|
props: {
|
|
1366
1366
|
block: {},
|
|
@@ -1368,7 +1368,7 @@ var Zi = o({
|
|
|
1368
1368
|
},
|
|
1369
1369
|
emits: ["fetchData"],
|
|
1370
1370
|
setup(e, { emit: t }) {
|
|
1371
|
-
let n = e, r = t, { t: i } = G(), a = g(
|
|
1371
|
+
let n = e, r = t, { t: i } = G(), a = g(ln, null), o = H(""), s = I(() => Zn(o.value)), l = H(!1), d = I(() => a?.getDefinition(n.block.customType)), f = I(() => !!d.value), p = I(() => n.block), { isFetching: m, fetch: _, needsFetch: v, hasDataSource: y } = An({
|
|
1372
1372
|
definition: d,
|
|
1373
1373
|
block: p,
|
|
1374
1374
|
onUpdate: (e, t) => {
|
|
@@ -1377,10 +1377,10 @@ var Zi = o({
|
|
|
1377
1377
|
dataSourceFetched: t
|
|
1378
1378
|
});
|
|
1379
1379
|
}
|
|
1380
|
-
}), b = g(
|
|
1380
|
+
}), b = g(Rt, Ut), x = g(un, null), S = I(() => {
|
|
1381
1381
|
if (!x?.value) return n.block;
|
|
1382
1382
|
let e = {};
|
|
1383
|
-
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ?
|
|
1383
|
+
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? Ie(r, b.value) : r;
|
|
1384
1384
|
return {
|
|
1385
1385
|
...n.block,
|
|
1386
1386
|
fieldValues: e
|
|
@@ -1404,10 +1404,10 @@ var Zi = o({
|
|
|
1404
1404
|
E();
|
|
1405
1405
|
}, { deep: !0 }), u(() => x?.value, () => {
|
|
1406
1406
|
E();
|
|
1407
|
-
}), (e, t) => (c(), w("div",
|
|
1407
|
+
}), (e, t) => (c(), w("div", aa, [f.value ? l.value ? (c(), w("div", ca, [W(D(lr), {
|
|
1408
1408
|
size: 24,
|
|
1409
1409
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1410
|
-
}), N("span",
|
|
1410
|
+
}), N("span", la, P(D(i).customBlocks.renderError), 1)])) : (c(), w("div", ua, [N("div", { innerHTML: s.value }, null, 8, da), D(y) && D(v) ? (c(), w("div", fa, [D(m) ? (c(), A(_r, {
|
|
1411
1411
|
key: 1,
|
|
1412
1412
|
class: "tpl:w-48"
|
|
1413
1413
|
})) : (c(), w("button", {
|
|
@@ -1415,16 +1415,16 @@ var Zi = o({
|
|
|
1415
1415
|
type: "button",
|
|
1416
1416
|
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)]",
|
|
1417
1417
|
onClick: t[0] ||= M((...e) => D(_) && D(_)(...e), ["stop"])
|
|
1418
|
-
}, [d.value?.icon ? (c(), A(
|
|
1418
|
+
}, [d.value?.icon ? (c(), A(ia, {
|
|
1419
1419
|
key: 0,
|
|
1420
1420
|
icon: d.value.icon,
|
|
1421
1421
|
size: 16
|
|
1422
|
-
}, null, 8, ["icon"])) : k("", !0), T(" " + P(d.value?.dataSource?.label || D(i).customBlocks.dataSource.fetchButton), 1)]))])) : k("", !0)])) : (c(), w("div",
|
|
1422
|
+
}, null, 8, ["icon"])) : k("", !0), T(" " + P(d.value?.dataSource?.label || D(i).customBlocks.dataSource.fetchButton), 1)]))])) : k("", !0)])) : (c(), w("div", oa, [W(D(ar), {
|
|
1423
1423
|
size: 24,
|
|
1424
1424
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1425
|
-
}), N("span",
|
|
1425
|
+
}), N("span", sa, P(D(i).customBlocks.definitionNotFound), 1)]))]));
|
|
1426
1426
|
}
|
|
1427
|
-
}),
|
|
1427
|
+
}), ma = { class: "tpl:w-full" }, ha = /* @__PURE__ */ o({
|
|
1428
1428
|
__name: "DividerBlock",
|
|
1429
1429
|
props: {
|
|
1430
1430
|
block: {},
|
|
@@ -1436,28 +1436,28 @@ var Zi = o({
|
|
|
1436
1436
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1437
1437
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1438
1438
|
}));
|
|
1439
|
-
return (e, t) => (c(), w("div",
|
|
1439
|
+
return (e, t) => (c(), w("div", ma, [N("hr", {
|
|
1440
1440
|
class: "tpl:m-0 tpl:border-none",
|
|
1441
1441
|
style: L(n.value)
|
|
1442
1442
|
}, null, 4)]));
|
|
1443
1443
|
}
|
|
1444
|
-
}),
|
|
1444
|
+
}), ga = { class: "tpl:w-full" }, _a = ["srcdoc", "title"], va = {
|
|
1445
1445
|
key: 1,
|
|
1446
1446
|
class: "tpl:flex tpl:box-border 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)]"
|
|
1447
|
-
},
|
|
1447
|
+
}, ya = {
|
|
1448
1448
|
key: 0,
|
|
1449
1449
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1450
|
-
},
|
|
1450
|
+
}, ba = {
|
|
1451
1451
|
key: 1,
|
|
1452
1452
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1453
|
-
},
|
|
1453
|
+
}, xa = /* @__PURE__ */ o({
|
|
1454
1454
|
__name: "HtmlBlock",
|
|
1455
1455
|
props: {
|
|
1456
1456
|
block: {},
|
|
1457
1457
|
viewport: {}
|
|
1458
1458
|
},
|
|
1459
1459
|
setup(e) {
|
|
1460
|
-
let t = e, { t: n } = G(), r = g(
|
|
1460
|
+
let t = e, { t: n } = G(), r = g(Bt, !1), i = I(() => t.block.content.trim().length > 0), a = I(() => r && i.value), o = g(Rt, Ut), s = g(un, null), l = I(() => s?.value ? Ie(t.block.content, o.value) : t.block.content), d = H(null), f = H(60), p = null;
|
|
1461
1461
|
function h() {
|
|
1462
1462
|
let e = d.value?.contentDocument;
|
|
1463
1463
|
e && (f.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1471,7 +1471,7 @@ var Zi = o({
|
|
|
1471
1471
|
e || (p?.disconnect(), p = null);
|
|
1472
1472
|
}), m(() => {
|
|
1473
1473
|
p?.disconnect(), p = null;
|
|
1474
|
-
}), (e, t) => (c(), w("div",
|
|
1474
|
+
}), (e, t) => (c(), w("div", ga, [a.value ? (c(), w("iframe", {
|
|
1475
1475
|
key: 0,
|
|
1476
1476
|
ref_key: "iframeRef",
|
|
1477
1477
|
ref: d,
|
|
@@ -1481,18 +1481,18 @@ var Zi = o({
|
|
|
1481
1481
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1482
1482
|
style: L({ height: `${f.value}px` }),
|
|
1483
1483
|
onLoad: _
|
|
1484
|
-
}, null, 44,
|
|
1484
|
+
}, null, 44, _a)) : (c(), w("div", va, [W(D(er), {
|
|
1485
1485
|
size: 24,
|
|
1486
1486
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1487
|
-
}), i.value ? (c(), w("span",
|
|
1487
|
+
}), i.value ? (c(), w("span", ya, P(D(n).html.preview), 1)) : (c(), w("span", ba, P(D(n).html.empty), 1))]))]));
|
|
1488
1488
|
}
|
|
1489
|
-
}),
|
|
1489
|
+
}), Sa = ["data-drop-enabled"], Ca = ["href"], wa = ["src", "alt"], Ta = ["src", "alt"], Ea = {
|
|
1490
1490
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1491
1491
|
style: { opacity: "0.7" }
|
|
1492
|
-
},
|
|
1492
|
+
}, Da = ["href"], Oa = ["src", "alt"], ka = ["src", "alt"], Aa = {
|
|
1493
1493
|
key: 4,
|
|
1494
1494
|
class: "tpl:flex tpl:box-border 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)]"
|
|
1495
|
-
},
|
|
1495
|
+
}, ja = ["aria-label"], Ma = { key: 1 }, Na = /* @__PURE__ */ o({
|
|
1496
1496
|
__name: "ImageBlock",
|
|
1497
1497
|
props: {
|
|
1498
1498
|
block: {},
|
|
@@ -1500,20 +1500,20 @@ var Zi = o({
|
|
|
1500
1500
|
},
|
|
1501
1501
|
emits: ["update"],
|
|
1502
1502
|
setup(e, { emit: t }) {
|
|
1503
|
-
let n = e, r = t, { t: i } = G(), { syntax: a } = K(), o = I(() =>
|
|
1503
|
+
let n = e, r = t, { t: i } = G(), { syntax: a } = K(), o = I(() => Ae(n.block.src, a));
|
|
1504
1504
|
function s(e) {
|
|
1505
1505
|
let t = {
|
|
1506
1506
|
src: e.url,
|
|
1507
|
-
...
|
|
1507
|
+
...Rn(Fn(e.width, e.height))
|
|
1508
1508
|
};
|
|
1509
1509
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1510
1510
|
}
|
|
1511
|
-
let l = H(), { canBrowse: u, dropEnabled: d, isUploading: f, showOverlay: p, openMediaBrowser: m } =
|
|
1511
|
+
let l = H(), { canBrowse: u, dropEnabled: d, isUploading: f, showOverlay: p, openMediaBrowser: m } = Hn({
|
|
1512
1512
|
target: l,
|
|
1513
1513
|
blocked: o,
|
|
1514
1514
|
apply: s
|
|
1515
1515
|
}), h = I(() => ({ textAlign: n.block.align })), g = I(() => {
|
|
1516
|
-
let e = n.block.border, t = ["left", "right"].map((t) =>
|
|
1516
|
+
let e = n.block.border, t = ["left", "right"].map((t) => Y(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1517
1517
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1518
1518
|
}), _ = I(() => {
|
|
1519
1519
|
let e = n.block.align;
|
|
@@ -1521,13 +1521,13 @@ var Zi = o({
|
|
|
1521
1521
|
maxWidth: "100%",
|
|
1522
1522
|
width: n.block.width === "full" ? g.value : `${n.block.width}px`,
|
|
1523
1523
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1524
|
-
borderRadius:
|
|
1525
|
-
...
|
|
1524
|
+
borderRadius: ve(n.block.borderRadius) ?? void 0,
|
|
1525
|
+
...Ki(n.block.border),
|
|
1526
1526
|
display: "block",
|
|
1527
1527
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1528
1528
|
marginRight: e === "center" ? "auto" : void 0
|
|
1529
1529
|
};
|
|
1530
|
-
}), v =
|
|
1530
|
+
}), v = Pn(() => o.value ? void 0 : n.block.src), y = Pn(() => o.value ? n.block.placeholderUrl : void 0);
|
|
1531
1531
|
return (t, n) => (c(), w("div", {
|
|
1532
1532
|
ref_key: "dropZoneRef",
|
|
1533
1533
|
ref: l,
|
|
@@ -1535,7 +1535,7 @@ var Zi = o({
|
|
|
1535
1535
|
"data-drop-enabled": D(d),
|
|
1536
1536
|
class: "tpl:relative tpl:w-full",
|
|
1537
1537
|
style: L(h.value)
|
|
1538
|
-
}, [D(p) ? (c(), A(
|
|
1538
|
+
}, [D(p) ? (c(), A(Ln, {
|
|
1539
1539
|
key: 0,
|
|
1540
1540
|
uploading: D(f),
|
|
1541
1541
|
size: "canvas"
|
|
@@ -1551,22 +1551,22 @@ var Zi = o({
|
|
|
1551
1551
|
src: D(y),
|
|
1552
1552
|
alt: e.block.alt || D(i).image.altTextPlaceholder,
|
|
1553
1553
|
style: L(_.value)
|
|
1554
|
-
}, null, 12,
|
|
1554
|
+
}, null, 12, wa)], 8, Ca)) : (c(), w("img", {
|
|
1555
1555
|
key: 1,
|
|
1556
1556
|
class: "tpl:border-0",
|
|
1557
1557
|
src: D(y),
|
|
1558
1558
|
alt: e.block.alt,
|
|
1559
1559
|
style: L(_.value)
|
|
1560
|
-
}, null, 12,
|
|
1560
|
+
}, null, 12, Ta))], 64)) : e.block.src && o.value ? (c(), w("div", {
|
|
1561
1561
|
key: 2,
|
|
1562
1562
|
class: "tpl:!flex tpl:box-border 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)]",
|
|
1563
1563
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, _.value])
|
|
1564
|
-
}, [W(D(
|
|
1564
|
+
}, [W(D(cr), {
|
|
1565
1565
|
size: 32,
|
|
1566
1566
|
"stroke-width": 1.5,
|
|
1567
1567
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1568
1568
|
style: { opacity: "0.5" }
|
|
1569
|
-
}), N("span",
|
|
1569
|
+
}), N("span", Ea, [W($i, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (c(), w(U, { key: 3 }, [e.block.linkUrl ? (c(), w("a", {
|
|
1570
1570
|
key: 0,
|
|
1571
1571
|
href: e.block.linkUrl,
|
|
1572
1572
|
target: "_blank",
|
|
@@ -1578,33 +1578,33 @@ var Zi = o({
|
|
|
1578
1578
|
src: D(v),
|
|
1579
1579
|
alt: e.block.alt || D(i).image.altTextPlaceholder,
|
|
1580
1580
|
style: L(_.value)
|
|
1581
|
-
}, null, 12,
|
|
1581
|
+
}, null, 12, Oa)], 8, Da)) : (c(), w("img", {
|
|
1582
1582
|
key: 1,
|
|
1583
1583
|
class: "tpl:border-0",
|
|
1584
1584
|
src: D(v),
|
|
1585
1585
|
alt: e.block.alt,
|
|
1586
1586
|
style: L(_.value)
|
|
1587
|
-
}, null, 12,
|
|
1587
|
+
}, null, 12, ka))], 64)) : (c(), w("div", Aa, [D(u) ? (c(), w("button", {
|
|
1588
1588
|
key: 0,
|
|
1589
1589
|
"aria-label": D(i).image.browseMedia,
|
|
1590
1590
|
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)]",
|
|
1591
1591
|
onClick: n[2] ||= M((...e) => D(m) && D(m)(...e), ["stop"])
|
|
1592
|
-
}, [W(D(
|
|
1592
|
+
}, [W(D(cr), {
|
|
1593
1593
|
size: 14,
|
|
1594
1594
|
"stroke-width": 1.5
|
|
1595
|
-
}), T(" " + P(D(i).image.browseMedia), 1)], 8,
|
|
1595
|
+
}), T(" " + P(D(i).image.browseMedia), 1)], 8, ja)) : (c(), w("span", Ma, P(D(i).image.clickToAdd), 1))]))], 12, Sa));
|
|
1596
1596
|
}
|
|
1597
|
-
}),
|
|
1597
|
+
}), Pa = { class: "tpl:w-full" }, Fa = ["href"], Ia = {
|
|
1598
1598
|
key: 1,
|
|
1599
1599
|
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)]"
|
|
1600
|
-
},
|
|
1600
|
+
}, La = /* @__PURE__ */ o({
|
|
1601
1601
|
__name: "MenuBlock",
|
|
1602
1602
|
props: {
|
|
1603
1603
|
block: {},
|
|
1604
1604
|
viewport: {}
|
|
1605
1605
|
},
|
|
1606
1606
|
setup(e) {
|
|
1607
|
-
let t = e, { t: n } = G(), r =
|
|
1607
|
+
let t = e, { t: n } = G(), r = xn(Zt, "MenuBlock"), i = I(() => ({
|
|
1608
1608
|
display: "flex",
|
|
1609
1609
|
flexWrap: "wrap",
|
|
1610
1610
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1616,7 +1616,7 @@ var Zi = o({
|
|
|
1616
1616
|
function o(e) {
|
|
1617
1617
|
return e || t.block.linkColor || t.block.color;
|
|
1618
1618
|
}
|
|
1619
|
-
return (t, r) => (c(), w("div",
|
|
1619
|
+
return (t, r) => (c(), w("div", Pa, [a.value ? (c(), w("div", {
|
|
1620
1620
|
key: 0,
|
|
1621
1621
|
style: L(i.value)
|
|
1622
1622
|
}, [(c(!0), w(U, null, p(e.block.items, (t, n) => (c(), w(U, { key: t.id }, [N("a", {
|
|
@@ -1628,22 +1628,22 @@ var Zi = o({
|
|
|
1628
1628
|
textDecoration: t.underline ? "underline" : "none"
|
|
1629
1629
|
}),
|
|
1630
1630
|
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
1631
|
-
}, [W(
|
|
1631
|
+
}, [W($i, { text: t.text || "..." }, null, 8, ["text"])], 12, Fa), n < e.block.items.length - 1 ? (c(), w("span", {
|
|
1632
1632
|
key: 0,
|
|
1633
1633
|
style: L({
|
|
1634
1634
|
color: e.block.separatorColor,
|
|
1635
1635
|
padding: `0 ${e.block.spacing}px`
|
|
1636
1636
|
})
|
|
1637
|
-
}, P(e.block.separator), 5)) : k("", !0)], 64))), 128))], 4)) : (c(), w("div",
|
|
1637
|
+
}, P(e.block.separator), 5)) : k("", !0)], 64))), 128))], 4)) : (c(), w("div", Ia, [W(D(sr), { size: 16 }), N("span", null, P(D(n).menu.addLinks), 1)]))]));
|
|
1638
1638
|
}
|
|
1639
1639
|
});
|
|
1640
1640
|
// src/composables/useEditableTextBlock.ts
|
|
1641
|
-
function
|
|
1642
|
-
let t = g(
|
|
1641
|
+
function Ra(e) {
|
|
1642
|
+
let t = g(Rt, Ut), r = g(un, null), i = g(tn, null), a = g(Kt, null), { syntax: o } = K(), s = I(() => r?.value ? qe(e(), t.value) : Ve(e(), t.value)), c = I(() => i?.value ? nt(e(), t.value, o) : ie(s.value, o)), l = I(() => Fe(Zn(c.value))), d = H(!1);
|
|
1643
1643
|
u(() => a?.value, (e) => {
|
|
1644
1644
|
e && (d.value = !1);
|
|
1645
1645
|
});
|
|
1646
|
-
let f = H(null), { top: p, left: m } = n(f), { toLocal: h } =
|
|
1646
|
+
let f = H(null), { top: p, left: m } = n(f), { toLocal: h } = xt(), _ = I(() => h({
|
|
1647
1647
|
top: p.value - 8,
|
|
1648
1648
|
left: m.value
|
|
1649
1649
|
}));
|
|
@@ -1663,14 +1663,14 @@ function Ia(e) {
|
|
|
1663
1663
|
};
|
|
1664
1664
|
}
|
|
1665
1665
|
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1666
|
-
var
|
|
1666
|
+
var za = ["innerHTML"], Ba = /* @__PURE__ */ o({
|
|
1667
1667
|
__name: "ParagraphBlock",
|
|
1668
1668
|
props: {
|
|
1669
1669
|
block: {},
|
|
1670
1670
|
viewport: {}
|
|
1671
1671
|
},
|
|
1672
1672
|
setup(e) {
|
|
1673
|
-
let t = e, n = b(() => import("./ParagraphEditor-
|
|
1673
|
+
let t = e, n = b(() => import("./ParagraphEditor-CPYQXRIc.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: l } = Ra(() => t.block.content);
|
|
1674
1674
|
return (t, u) => (c(), w("div", {
|
|
1675
1675
|
ref_key: "blockRef",
|
|
1676
1676
|
ref: i,
|
|
@@ -1689,11 +1689,11 @@ var La = ["innerHTML"], Ra = /* @__PURE__ */ o({
|
|
|
1689
1689
|
key: 1,
|
|
1690
1690
|
class: "tpl-text-content tpl:outline-none",
|
|
1691
1691
|
innerHTML: D(o)
|
|
1692
|
-
}, null, 8,
|
|
1692
|
+
}, null, 8, za))], 544));
|
|
1693
1693
|
}
|
|
1694
1694
|
});
|
|
1695
1695
|
// src/utils/updateBlockList.ts
|
|
1696
|
-
function
|
|
1696
|
+
function Va(e, t, n, r = 0, i) {
|
|
1697
1697
|
let a = n ? e.content.value.blocks.find((e) => e.id === n) : void 0, o = n ? a?.type === "section" ? a.children[r] ?? [] : [] : e.content.value.blocks, s = t.map((e) => e.id);
|
|
1698
1698
|
if (o.some((e) => !s.includes(e.id))) return;
|
|
1699
1699
|
let c = t.filter((e) => !o.some((t) => t.id === e.id)), l, u = -1;
|
|
@@ -1706,19 +1706,19 @@ function za(e, t, n, r = 0, i) {
|
|
|
1706
1706
|
l && (e.findBlockLocation(l.id) ? e.moveBlock(l.id, u, n, r) : e.addBlock(JSON.parse(JSON.stringify(l)), n, r, u));
|
|
1707
1707
|
}
|
|
1708
1708
|
// src/utils/mergeTagTokens.ts
|
|
1709
|
-
function
|
|
1709
|
+
function Ha(e, t, n) {
|
|
1710
1710
|
let r = [], i = "\0MT";
|
|
1711
1711
|
for (; e.includes(i);) i += "_";
|
|
1712
|
-
let a = n === "html" ?
|
|
1712
|
+
let a = n === "html" ? ze(e, (e) => {
|
|
1713
1713
|
let t = r.push(e) - 1;
|
|
1714
1714
|
return `${i}${t}\u0000`;
|
|
1715
1715
|
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
1716
1716
|
start: e.index,
|
|
1717
1717
|
end: e.index + e[0].length
|
|
1718
|
-
})), s = [], c =
|
|
1718
|
+
})), s = [], c = at(a, t, "logic"), l = [], u = 0;
|
|
1719
1719
|
for (let e of ["logic", "value"]) {
|
|
1720
1720
|
let r = 0;
|
|
1721
|
-
for (let i of e === "logic" ? c :
|
|
1721
|
+
for (let i of e === "logic" ? c : at(a, t, "value")) {
|
|
1722
1722
|
let t = i.index, a = t + i.value.length;
|
|
1723
1723
|
for (; o[r]?.end <= t;) r++;
|
|
1724
1724
|
let c = o[r];
|
|
@@ -1734,51 +1734,51 @@ function Ba(e, t, n) {
|
|
|
1734
1734
|
}), s.push({
|
|
1735
1735
|
start: t,
|
|
1736
1736
|
end: a,
|
|
1737
|
-
value: n === "html" ?
|
|
1737
|
+
value: n === "html" ? Qe(i.value) : i.value
|
|
1738
1738
|
});
|
|
1739
1739
|
}
|
|
1740
1740
|
}
|
|
1741
1741
|
}
|
|
1742
1742
|
return [...r, ...s.map((e) => e.value)].sort();
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1745
|
-
return JSON.stringify(
|
|
1744
|
+
function Ua(e, t, n, r) {
|
|
1745
|
+
return JSON.stringify(Ha(e, n, r)) !== JSON.stringify(Ha(t, n, r));
|
|
1746
1746
|
}
|
|
1747
1747
|
// src/components/localization/LocaleStatusChip.vue?vue&type=script&setup=true&lang.ts
|
|
1748
|
-
var
|
|
1748
|
+
var Wa = [
|
|
1749
1749
|
"data-state",
|
|
1750
1750
|
"aria-label",
|
|
1751
1751
|
"title",
|
|
1752
1752
|
"aria-expanded",
|
|
1753
1753
|
"aria-controls",
|
|
1754
1754
|
"onKeydown"
|
|
1755
|
-
],
|
|
1755
|
+
], Ga = [
|
|
1756
1756
|
"aria-label",
|
|
1757
1757
|
"aria-labelledby",
|
|
1758
1758
|
"aria-describedby",
|
|
1759
1759
|
"onKeydown"
|
|
1760
|
-
],
|
|
1760
|
+
], Ka = ["id"], qa = ["id"], Ja = { class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:justify-end tpl:gap-2" }, Ya = ["disabled"], Xa = {
|
|
1761
1761
|
key: 0,
|
|
1762
1762
|
class: "tpl:m-0 tpl:mb-2 tpl:text-xs tpl:font-medium"
|
|
1763
|
-
},
|
|
1763
|
+
}, Za = {
|
|
1764
1764
|
key: 1,
|
|
1765
1765
|
class: "tpl:m-0"
|
|
1766
|
-
},
|
|
1766
|
+
}, Qa = { class: "tpl:m-0" }, $a = { class: "tpl:mt-2 tpl:mb-0 tpl:break-words tpl:text-[var(--tpl-chrome-text-muted)]" }, eo = {
|
|
1767
1767
|
key: 3,
|
|
1768
1768
|
class: "tpl:m-0"
|
|
1769
|
-
},
|
|
1769
|
+
}, to = {
|
|
1770
1770
|
key: 4,
|
|
1771
1771
|
class: "tpl:m-0"
|
|
1772
|
-
},
|
|
1772
|
+
}, no = {
|
|
1773
1773
|
key: 5,
|
|
1774
1774
|
class: "tpl:m-0"
|
|
1775
|
-
},
|
|
1775
|
+
}, ro = {
|
|
1776
1776
|
key: 6,
|
|
1777
1777
|
class: "tpl:m-0 tpl:list-none tpl:p-0"
|
|
1778
|
-
},
|
|
1778
|
+
}, io = ["onClick"], ao = {
|
|
1779
1779
|
key: 7,
|
|
1780
1780
|
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1781
|
-
},
|
|
1781
|
+
}, oo = ["data-testid", "disabled"], so = /*#__PURE__*/ Cr(/* @__PURE__ */ o({
|
|
1782
1782
|
__name: "LocaleStatusChip",
|
|
1783
1783
|
props: {
|
|
1784
1784
|
blockId: {},
|
|
@@ -1798,32 +1798,32 @@ var Ha = [
|
|
|
1798
1798
|
},
|
|
1799
1799
|
emits: ["target"],
|
|
1800
1800
|
setup(e, { emit: t }) {
|
|
1801
|
-
let n = e, r = t, i = g(
|
|
1801
|
+
let n = e, r = t, i = g(Sn, null), o = g(pn, null), s = g(Dt, null), l = g(yn, "en") ?? "en", { t: d, format: f } = G(), m = te(), h = yt(), { toLocal: v } = xt(), y = H(null), b = H(null), x = H(!1), S = H(!1), C = H(null), T = H(null), F = null, R = H({
|
|
1802
1802
|
top: 0,
|
|
1803
1803
|
left: 0
|
|
1804
1804
|
}), z = H({
|
|
1805
1805
|
maxHeight: 0,
|
|
1806
1806
|
maxWidth: 0
|
|
1807
|
-
}), B = `tpl-locale-popover-${
|
|
1807
|
+
}), B = `tpl-locale-popover-${fe()}`, V = I(() => vr(i?.activeLocale?.value ?? "")), W = I(() => vr(i?.content.value.settings.locale ?? "en"));
|
|
1808
1808
|
function K(e, t) {
|
|
1809
1809
|
switch (e) {
|
|
1810
1810
|
case "tags-differ": return d.localization.tagsDiffer;
|
|
1811
1811
|
case "hidden": return f(d.localization.hidden, { language: V.value });
|
|
1812
1812
|
case "changed": return f(d.localization.changed, { language: V.value });
|
|
1813
|
-
case "default-stale": return
|
|
1814
|
-
case "missing": return t === 1 ? d.localization.notTranslated :
|
|
1815
|
-
default: return t === 1 ? d.localization.outOfDate :
|
|
1813
|
+
case "default-stale": return yr(d.localization.staleLanguages, t, l);
|
|
1814
|
+
case "missing": return t === 1 ? d.localization.notTranslated : yr(d.localization.notTranslatedCount, t, l);
|
|
1815
|
+
default: return t === 1 ? d.localization.outOfDate : yr(d.localization.staleCount, t, l);
|
|
1816
1816
|
}
|
|
1817
1817
|
}
|
|
1818
|
-
let ne = I(() => K(n.state, n.count)), q = I(() => n.popoverState ?? n.state),
|
|
1819
|
-
function
|
|
1818
|
+
let ne = I(() => K(n.state, n.count)), q = I(() => n.popoverState ?? n.state), J = I(() => n.popoverCount ?? n.count), re = I(() => K(q.value, J.value)), ie = I(() => n.state === "hidden" ? nr : n.state === "changed" ? $n : n.state === "default-stale" ? fr : n.state === "stale" ? tr : lr), ae = I(() => q.value === "default-stale" || (q.value === "missing" || q.value === "stale") && J.value > 1), Y = I(() => n.editable && n.eligibleGaps && o?.isAvailable.value);
|
|
1819
|
+
function X(e = !1) {
|
|
1820
1820
|
x.value = !1, S.value = !1, F = null, e && y.value?.focus({ preventScroll: !0 });
|
|
1821
1821
|
}
|
|
1822
|
-
async function X() {
|
|
1823
|
-
if (x.value) return Y();
|
|
1824
|
-
h.value && (x.value = !0, await Z());
|
|
1825
|
-
}
|
|
1826
1822
|
async function Z() {
|
|
1823
|
+
if (x.value) return X();
|
|
1824
|
+
h.value && (x.value = !0, await Q());
|
|
1825
|
+
}
|
|
1826
|
+
async function Q() {
|
|
1827
1827
|
let e = h.value;
|
|
1828
1828
|
if (!e || !x.value) return;
|
|
1829
1829
|
let t = e.ownerDocument.defaultView, n = t?.visualViewport, r = n?.offsetTop ?? 0, i = n?.offsetLeft ?? 0, a = r + (n?.height ?? t?.innerHeight ?? 0), o = i + (n?.width ?? t?.innerWidth ?? 0), s = e.parentElement?.getBoundingClientRect(), c = Math.max(r, s?.height ? s.top : r) + 8, l = Math.max(i, s?.width ? s.left : i) + 8, u = Math.max(c, Math.min(a, s?.height ? s.bottom : a) - 8), d = Math.max(l, Math.min(o, s?.width ? s.right : o) - 8);
|
|
@@ -1843,53 +1843,53 @@ var Ha = [
|
|
|
1843
1843
|
}), await j(), x.value && (S.value ? T.value : b.value)?.focus({ preventScroll: !0 });
|
|
1844
1844
|
}
|
|
1845
1845
|
u(S, async () => {
|
|
1846
|
-
x.value && (await
|
|
1846
|
+
x.value && (await Q(), x.value && !S.value && C.value?.focus({ preventScroll: !0 }));
|
|
1847
1847
|
});
|
|
1848
|
-
function
|
|
1848
|
+
function oe(e) {
|
|
1849
1849
|
let t = e.composedPath();
|
|
1850
|
-
!t.includes(y.value) && !t.includes(b.value) &&
|
|
1850
|
+
!t.includes(y.value) && !t.includes(b.value) && X();
|
|
1851
1851
|
}
|
|
1852
|
-
function
|
|
1852
|
+
function se(e) {
|
|
1853
1853
|
if (e.composedPath().includes(b.value)) return;
|
|
1854
1854
|
let t = y.value?.getBoundingClientRect();
|
|
1855
|
-
t && F && t.top === F.top && t.right === F.right ||
|
|
1855
|
+
t && F && t.top === F.top && t.right === F.right || X();
|
|
1856
1856
|
}
|
|
1857
|
-
function
|
|
1858
|
-
m.removeEventListener("click",
|
|
1857
|
+
function ce() {
|
|
1858
|
+
m.removeEventListener("click", oe, !0), m.removeEventListener("scroll", se, !0);
|
|
1859
1859
|
}
|
|
1860
1860
|
u(x, (e) => {
|
|
1861
|
-
|
|
1861
|
+
ce(), e ? (m.addEventListener("click", oe, !0), m.addEventListener("scroll", se, !0)) : r("target", null);
|
|
1862
1862
|
}, { flush: "sync" }), u(q, () => {
|
|
1863
|
-
S.value = !1, x.value &&
|
|
1863
|
+
S.value = !1, x.value && Q();
|
|
1864
1864
|
}), u([
|
|
1865
1865
|
() => n.blockId,
|
|
1866
1866
|
() => n.state,
|
|
1867
1867
|
() => i?.activeLocale?.value,
|
|
1868
1868
|
() => i?.state.template?.id,
|
|
1869
1869
|
() => i?.loadVersion?.value
|
|
1870
|
-
], () =>
|
|
1871
|
-
let
|
|
1872
|
-
(x.value || h.value) && (r("target", e ?? null), x.value ||
|
|
1870
|
+
], () => X()), _(ce);
|
|
1871
|
+
let le = (e) => {
|
|
1872
|
+
(x.value || h.value) && (r("target", e ?? null), x.value || Z());
|
|
1873
1873
|
};
|
|
1874
1874
|
u(() => n.blockId, (e, t) => {
|
|
1875
|
-
t && s?.get(t) ===
|
|
1875
|
+
t && s?.get(t) === le && s.delete(t), s?.set(e, le);
|
|
1876
1876
|
}, { immediate: !0 }), _(() => {
|
|
1877
|
-
s?.get(n.blockId) ===
|
|
1877
|
+
s?.get(n.blockId) === le && s.delete(n.blockId);
|
|
1878
1878
|
});
|
|
1879
|
-
function
|
|
1880
|
-
i?.keepTranslations?.(n.blockId, n.stale),
|
|
1879
|
+
function ue() {
|
|
1880
|
+
i?.keepTranslations?.(n.blockId, n.stale), X(!0);
|
|
1881
1881
|
}
|
|
1882
|
-
function
|
|
1883
|
-
i?.resetLocaleFields?.(n.blockId, e),
|
|
1882
|
+
function de(e) {
|
|
1883
|
+
i?.resetLocaleFields?.(n.blockId, e), X(!0);
|
|
1884
1884
|
}
|
|
1885
1885
|
function pe() {
|
|
1886
|
-
i?.setBlockHidden?.(n.blockId, !1),
|
|
1886
|
+
i?.setBlockHidden?.(n.blockId, !1), X(!0);
|
|
1887
1887
|
}
|
|
1888
1888
|
function me(e) {
|
|
1889
|
-
i?.setActiveLocale?.(e),
|
|
1889
|
+
i?.setActiveLocale?.(e), X();
|
|
1890
1890
|
}
|
|
1891
1891
|
function he() {
|
|
1892
|
-
|
|
1892
|
+
Y.value && !o?.running.value && (q.value === "tags-differ" && n.replacesCurrent ? S.value = !0 : o?.translate({
|
|
1893
1893
|
only: q.value === "tags-differ" ? "all" : "gaps",
|
|
1894
1894
|
blockId: n.blockId
|
|
1895
1895
|
}));
|
|
@@ -1898,10 +1898,10 @@ var Ha = [
|
|
|
1898
1898
|
S.value = !1;
|
|
1899
1899
|
}
|
|
1900
1900
|
function _e() {
|
|
1901
|
-
S.value ? ge() :
|
|
1901
|
+
S.value ? ge() : X(!0);
|
|
1902
1902
|
}
|
|
1903
1903
|
function ve() {
|
|
1904
|
-
|
|
1904
|
+
Y.value && !o?.running.value && n.translationCount && (S.value = !1, o?.translate({
|
|
1905
1905
|
only: "all",
|
|
1906
1906
|
blockId: n.blockId
|
|
1907
1907
|
}));
|
|
@@ -1918,13 +1918,13 @@ var Ha = [
|
|
|
1918
1918
|
"aria-controls": x.value ? B : void 0,
|
|
1919
1919
|
"aria-haspopup": "dialog",
|
|
1920
1920
|
class: "tpl-locale-chip tpl:flex tpl:size-5 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:p-0 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:shadow-[var(--tpl-shadow-sm)] tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)] tpl:hover:focus-visible:shadow-[var(--tpl-ring),var(--tpl-shadow-sm)]",
|
|
1921
|
-
onClick: M(
|
|
1922
|
-
onKeydown: [E(M(
|
|
1923
|
-
}, [(c(), A(a(
|
|
1921
|
+
onClick: M(Z, ["stop"]),
|
|
1922
|
+
onKeydown: [E(M(Z, ["stop", "prevent"]), ["enter"]), E(M(_e, ["stop", "prevent"]), ["esc"])]
|
|
1923
|
+
}, [(c(), A(a(ie.value), {
|
|
1924
1924
|
size: 12,
|
|
1925
1925
|
"stroke-width": 2,
|
|
1926
1926
|
"aria-hidden": "true"
|
|
1927
|
-
}))], 40,
|
|
1927
|
+
}))], 40, Wa), D(h) && x.value ? (c(), A(ee, {
|
|
1928
1928
|
key: 0,
|
|
1929
1929
|
to: D(h)
|
|
1930
1930
|
}, [N("div", {
|
|
@@ -1932,7 +1932,7 @@ var Ha = [
|
|
|
1932
1932
|
ref_key: "popover",
|
|
1933
1933
|
ref: b,
|
|
1934
1934
|
role: "dialog",
|
|
1935
|
-
"aria-label": S.value ? void 0 :
|
|
1935
|
+
"aria-label": S.value ? void 0 : re.value,
|
|
1936
1936
|
"aria-labelledby": S.value ? `${B}-question` : void 0,
|
|
1937
1937
|
"aria-describedby": S.value ? `${B}-warning` : void 0,
|
|
1938
1938
|
tabindex: "-1",
|
|
@@ -1950,80 +1950,80 @@ var Ha = [
|
|
|
1950
1950
|
N("h3", {
|
|
1951
1951
|
id: `${B}-question`,
|
|
1952
1952
|
class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
1953
|
-
}, P(D(
|
|
1953
|
+
}, P(D(yr)(D(d).localization.translationConfirmation, e.translationCount ?? 0, D(l))), 9, Ka),
|
|
1954
1954
|
N("p", {
|
|
1955
1955
|
id: `${B}-warning`,
|
|
1956
1956
|
class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
|
|
1957
|
-
}, P(D(f)(D(d).localization.translationDescription, { language: V.value })), 9,
|
|
1958
|
-
N("div",
|
|
1957
|
+
}, P(D(f)(D(d).localization.translationDescription, { language: V.value })), 9, qa),
|
|
1958
|
+
N("div", Ja, [N("button", {
|
|
1959
1959
|
ref_key: "confirmationCancel",
|
|
1960
1960
|
ref: T,
|
|
1961
1961
|
type: "button",
|
|
1962
1962
|
"data-testid": "translation-confirm-cancel",
|
|
1963
|
-
class: O(D(
|
|
1963
|
+
class: O(D(xr)),
|
|
1964
1964
|
onClick: ge
|
|
1965
1965
|
}, P(D(d).localization.cancel), 3), N("button", {
|
|
1966
1966
|
type: "button",
|
|
1967
1967
|
"data-testid": "translation-confirm",
|
|
1968
|
-
class: O(D(
|
|
1969
|
-
disabled: !
|
|
1968
|
+
class: O(D(Sr)),
|
|
1969
|
+
disabled: !Y.value || !!D(o)?.running.value || !e.translationCount,
|
|
1970
1970
|
onClick: ve
|
|
1971
|
-
}, P(D(
|
|
1971
|
+
}, P(D(yr)(D(d).localization.translateAllFields, e.translationCount ?? 0, D(l))), 11, Ya)])
|
|
1972
1972
|
], 64)) : (c(), w(U, { key: 1 }, [
|
|
1973
|
-
|
|
1974
|
-
q.value === "missing" ? (c(), w("p",
|
|
1973
|
+
ae.value ? (c(), w("p", Xa, P(re.value), 1)) : k("", !0),
|
|
1974
|
+
q.value === "missing" ? (c(), w("p", Za, P(D(f)(D(d).localization.missingExplanation, { default: W.value })), 1)) : q.value === "stale" ? (c(), w(U, { key: 2 }, [N("p", Qa, P(D(f)(D(d).localization.staleExplanation, { default: W.value })), 1), N("p", $a, P(D(f)(D(d).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : q.value === "tags-differ" ? (c(), w("p", eo, P(D(f)(D(d).localization.tagsDifferExplanation, { default: W.value })), 1)) : q.value === "changed" ? (c(), w("p", to, P(D(yr)(D(d).localization.changedProperties, J.value, D(l), { default: W.value })), 1)) : q.value === "hidden" ? (c(), w("p", no, P(D(f)(D(d).localization.hiddenExplanation, { language: V.value })), 1)) : (c(), w("ul", ro, [(c(!0), w(U, null, p(e.staleLocales, (e) => (c(), w("li", {
|
|
1975
1975
|
key: e,
|
|
1976
1976
|
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
1977
|
-
}, [N("span", null, P(D(
|
|
1977
|
+
}, [N("span", null, P(D(vr)(e)), 1), N("button", {
|
|
1978
1978
|
type: "button",
|
|
1979
|
-
class: O(D(
|
|
1979
|
+
class: O(D(br)),
|
|
1980
1980
|
onClick: (t) => me(e)
|
|
1981
|
-
}, P(D(d).localization.open), 11,
|
|
1982
|
-
e.editable && q.value !== "default-stale" ? (c(), w("div",
|
|
1983
|
-
|
|
1981
|
+
}, P(D(d).localization.open), 11, io)]))), 128))])),
|
|
1982
|
+
e.editable && q.value !== "default-stale" ? (c(), w("div", ao, [
|
|
1983
|
+
Y.value && (q.value === "missing" || q.value === "stale" || q.value === "tags-differ") ? (c(), w("button", {
|
|
1984
1984
|
key: 0,
|
|
1985
1985
|
type: "button",
|
|
1986
1986
|
ref_key: "retranslate",
|
|
1987
1987
|
ref: C,
|
|
1988
1988
|
"data-testid": q.value === "missing" ? "locale-translate" : "locale-retranslate",
|
|
1989
|
-
class: O(D(
|
|
1989
|
+
class: O(D(xr)),
|
|
1990
1990
|
disabled: !!D(o)?.running.value,
|
|
1991
1991
|
onClick: he
|
|
1992
|
-
}, P(q.value === "missing" ? D(d).localization.translate : D(d).localization.retranslate), 11,
|
|
1992
|
+
}, P(q.value === "missing" ? D(d).localization.translate : D(d).localization.retranslate), 11, oo)) : k("", !0),
|
|
1993
1993
|
q.value === "stale" || q.value === "tags-differ" ? (c(), w(U, { key: 1 }, [q.value === "stale" ? (c(), w("button", {
|
|
1994
1994
|
key: 0,
|
|
1995
1995
|
type: "button",
|
|
1996
1996
|
"data-testid": "locale-keep",
|
|
1997
|
-
class: O(D(
|
|
1998
|
-
onClick:
|
|
1997
|
+
class: O(D(Y.value ? br : xr)),
|
|
1998
|
+
onClick: ue
|
|
1999
1999
|
}, P(D(d).localization.keep), 3)) : k("", !0), N("button", {
|
|
2000
2000
|
type: "button",
|
|
2001
2001
|
"data-testid": "locale-use-default",
|
|
2002
|
-
class: O(D(q.value === "tags-differ" && !
|
|
2003
|
-
onClick: n[0] ||= (t) =>
|
|
2002
|
+
class: O(D(q.value === "tags-differ" && !Y.value ? xr : br)),
|
|
2003
|
+
onClick: n[0] ||= (t) => de(q.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
|
|
2004
2004
|
}, P(D(f)(D(d).localization.useDefaultLanguage, { default: W.value })), 3)], 64)) : k("", !0),
|
|
2005
2005
|
q.value === "changed" ? (c(), w("button", {
|
|
2006
2006
|
key: 2,
|
|
2007
2007
|
type: "button",
|
|
2008
2008
|
"data-testid": "locale-reset",
|
|
2009
|
-
class: O(D(
|
|
2010
|
-
onClick: n[1] ||= (t) =>
|
|
2009
|
+
class: O(D(xr)),
|
|
2010
|
+
onClick: n[1] ||= (t) => de(e.setPaths)
|
|
2011
2011
|
}, P(D(d).localization.resetChanges), 3)) : k("", !0),
|
|
2012
2012
|
q.value === "hidden" ? (c(), w("button", {
|
|
2013
2013
|
key: 3,
|
|
2014
2014
|
type: "button",
|
|
2015
2015
|
"data-testid": "locale-show",
|
|
2016
|
-
class: O(D(
|
|
2016
|
+
class: O(D(xr)),
|
|
2017
2017
|
onClick: pe
|
|
2018
2018
|
}, P(D(d).localization.show), 3)) : k("", !0)
|
|
2019
2019
|
])) : k("", !0)
|
|
2020
|
-
], 64))], 44,
|
|
2020
|
+
], 64))], 44, Ga)], 8, ["to"])) : k("", !0)], 64));
|
|
2021
2021
|
}
|
|
2022
|
-
}), [["__scopeId", "data-v-3343ae7d"]]),
|
|
2022
|
+
}), [["__scopeId", "data-v-3343ae7d"]]), co = /* @__PURE__ */ o({
|
|
2023
2023
|
__name: "LocaleMarkers",
|
|
2024
2024
|
props: { block: {} },
|
|
2025
2025
|
setup(e) {
|
|
2026
|
-
let t = e, n = g(
|
|
2026
|
+
let t = e, n = g(Sn, null), r = g(Lt, void 0), i = g(rn, []), a = g(Tt, de.liquid), o = g(an, I(() => /* @__PURE__ */ new Set())), s = I(() => n?.activeLocale?.value), l = I(() => s.value ? t.block.l10n?.[s.value] : void 0), d = I(() => ({
|
|
2027
2027
|
blocks: [t.block.type === "section" || t.block.type === "wrapper" ? {
|
|
2028
2028
|
...t.block,
|
|
2029
2029
|
children: []
|
|
@@ -2032,14 +2032,14 @@ var Ha = [
|
|
|
2032
2032
|
locale: n.content.value.settings.locale,
|
|
2033
2033
|
locales: n.content.value.settings.locales
|
|
2034
2034
|
}
|
|
2035
|
-
})), f = I(() => n && s.value && !o.value.has(s.value) ?
|
|
2035
|
+
})), f = I(() => n && s.value && !o.value.has(s.value) ? Ze(d.value, s.value, i) : {
|
|
2036
2036
|
missing: [],
|
|
2037
2037
|
stale: [],
|
|
2038
2038
|
translated: []
|
|
2039
2039
|
}), p = I(() => f.value.stale.map((e) => e.slice(t.block.id.length + 1))), m = I(() => f.value.translated.flatMap((e) => {
|
|
2040
|
-
let n = e.slice(t.block.id.length + 1), r =
|
|
2041
|
-
return typeof r == "string" && i !== void 0 &&
|
|
2042
|
-
})), h = H(null), _ = I(() => n && s.value && !o.value.has(s.value) ?
|
|
2040
|
+
let n = e.slice(t.block.id.length + 1), r = $e(t.block, n), i = l.value?.text?.[n]?.value, o = t.block.type === "html" || Te[t.block.type]?.includes(n) ? "html" : "text";
|
|
2041
|
+
return typeof r == "string" && i !== void 0 && Ua(r, i, a, o) ? [n] : [];
|
|
2042
|
+
})), h = H(null), _ = I(() => n && s.value && !o.value.has(s.value) ? X(d.value, s.value, {
|
|
2043
2043
|
syntax: a,
|
|
2044
2044
|
definitions: i,
|
|
2045
2045
|
doNotTranslate: r?.doNotTranslate,
|
|
@@ -2049,9 +2049,9 @@ var Ha = [
|
|
|
2049
2049
|
let n = e.slice(t.block.id.length + 1);
|
|
2050
2050
|
return f.value.translated.includes(e) && !m.value.includes(n);
|
|
2051
2051
|
})), y = I(() => Object.keys(l.value?.set ?? {}).filter((e) => {
|
|
2052
|
-
let n = e.split("."), r = n.pop(), i = n.length ?
|
|
2053
|
-
return Array.isArray(i) ?
|
|
2054
|
-
})), b = I(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) &&
|
|
2052
|
+
let n = e.split("."), r = n.pop(), i = n.length ? $e(t.block, n.join(".")) : t.block;
|
|
2053
|
+
return Array.isArray(i) ? $e(i, r) !== void 0 : i !== void 0;
|
|
2054
|
+
})), b = I(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) && Ze(d.value, e, i).stale.length > 0) : []), x = I(() => s.value ? o.value.has(s.value) ? null : l.value?.hidden ? "hidden" : f.value.missing.length ? "missing" : p.value.length ? "stale" : m.value.length ? "tags-differ" : y.value.length ? "changed" : null : b.value.length ? "default-stale" : null);
|
|
2055
2055
|
function S(e) {
|
|
2056
2056
|
return e === "missing" ? f.value.missing.length : e === "stale" ? p.value.length : e === "tags-differ" ? m.value.length : e === "default-stale" ? b.value.length : y.value.length;
|
|
2057
2057
|
}
|
|
@@ -2060,12 +2060,12 @@ var Ha = [
|
|
|
2060
2060
|
h.value = null;
|
|
2061
2061
|
});
|
|
2062
2062
|
let E = I(() => {
|
|
2063
|
-
let e =
|
|
2063
|
+
let e = $e(t.block, p.value[0] ?? "");
|
|
2064
2064
|
if (typeof e != "string") return "";
|
|
2065
2065
|
let n = e.split(/<[^>]*>/).join("");
|
|
2066
2066
|
return Array.from(n).slice(0, 60).join("");
|
|
2067
2067
|
});
|
|
2068
|
-
return (t, n) => D(r) && x.value ? (c(), A(
|
|
2068
|
+
return (t, n) => D(r) && x.value ? (c(), A(so, {
|
|
2069
2069
|
key: 0,
|
|
2070
2070
|
"block-id": e.block.id,
|
|
2071
2071
|
state: x.value,
|
|
@@ -2099,21 +2099,21 @@ var Ha = [
|
|
|
2099
2099
|
"editable"
|
|
2100
2100
|
])) : k("", !0);
|
|
2101
2101
|
}
|
|
2102
|
-
}),
|
|
2102
|
+
}), lo = [
|
|
2103
2103
|
"data-block-id",
|
|
2104
2104
|
"data-block-type",
|
|
2105
2105
|
"data-tpl-picked"
|
|
2106
|
-
],
|
|
2106
|
+
], uo = ["aria-label"], fo = ["data-lock-holder"], po = ["aria-label"], mo = [
|
|
2107
2107
|
"aria-label",
|
|
2108
2108
|
"aria-pressed",
|
|
2109
2109
|
"title"
|
|
2110
|
-
],
|
|
2110
|
+
], ho = ["aria-label", "title"], go = ["aria-label", "title"], _o = ["aria-label", "title"], vo = {
|
|
2111
2111
|
key: 3,
|
|
2112
2112
|
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"
|
|
2113
|
-
},
|
|
2113
|
+
}, yo = { 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)]" }, bo = {
|
|
2114
2114
|
key: 4,
|
|
2115
2115
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2116
|
-
},
|
|
2116
|
+
}, xo = ["aria-label", "title"], So = /*#__PURE__*/ Cr(/* @__PURE__ */ o({
|
|
2117
2117
|
__name: "BlockWrapper",
|
|
2118
2118
|
props: {
|
|
2119
2119
|
block: {},
|
|
@@ -2126,33 +2126,33 @@ var Ha = [
|
|
|
2126
2126
|
},
|
|
2127
2127
|
emits: ["select"],
|
|
2128
2128
|
setup(t, { emit: n }) {
|
|
2129
|
-
let i = b(() => import("./BlockIssueBadge-
|
|
2129
|
+
let i = b(() => import("./BlockIssueBadge-C50pmOMZ.js")), a = t, o = I(() => a.displayBlock ?? a.block), s = n, { t: l, format: d } = G(), f = g(Cn, null), p = H(null), m = I(() => f?.liftedBlockId.value === a.block.id), h = I(() => m.value ? d(l.blockActions.dragLifted, { block: a.block.type }) : l.blockActions.drag);
|
|
2130
2130
|
async function _() {
|
|
2131
2131
|
await j(), p.value?.focus();
|
|
2132
2132
|
}
|
|
2133
2133
|
function v(e) {
|
|
2134
2134
|
f && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), m.value ? f.drop(a.block.id) : f.lift(a.block.id)) : m.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), f.cancel(), _()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), f.moveUp(a.block.id), _()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), f.moveDown(a.block.id), _())));
|
|
2135
2135
|
}
|
|
2136
|
-
let S = I(() => !a.viewport || !o.value.visibility ? !1 : o.value.visibility[a.viewport] === !1), C = I(() => !!(
|
|
2136
|
+
let S = I(() => !a.viewport || !o.value.visibility ? !1 : o.value.visibility[a.viewport] === !1), C = I(() => !!(ue?.activeLocale?.value && a.block.l10n?.[ue.activeLocale.value]?.hidden)), E = I(() => a.previewMode === !0 && (S.value || C.value)), ee = I(() => a.viewport ? {
|
|
2137
2137
|
desktop: l.viewport.desktop,
|
|
2138
2138
|
mobile: l.viewport.mobile
|
|
2139
|
-
}[a.viewport] ?? a.viewport : ""), F = I(() => !!o.value.displayCondition), R = g(
|
|
2139
|
+
}[a.viewport] ?? a.viewport : ""), F = I(() => !!o.value.displayCondition), R = g(vn, null), z = g(dn, null), B = g(en, {}), V = I(() => B.savedBlocks?.isPicking.value === !0), U = I(() => !a.nested && B.savedBlocks?.isAvailable.value === !0 && B.savedBlocks?.canCreate.value === !0), te = I(() => a.isSelected && !V.value), K = I(() => B.comments?.getBlockCount(a.block.id) ?? 0), ne = H(null), q = H(null), J = H(null), re = H(null), ie = H({
|
|
2140
2140
|
left: "calc(100% + 8px)",
|
|
2141
2141
|
top: "50%"
|
|
2142
|
-
}),
|
|
2143
|
-
function
|
|
2144
|
-
let e =
|
|
2142
|
+
}), ae = H(!1), Y = I(() => q.value ?? re.value), X = I(() => Y.value?.closest(".tpl-body"));
|
|
2143
|
+
function Z() {
|
|
2144
|
+
let e = ae.value, t = q.value, n = re.value, r = ne.value;
|
|
2145
2145
|
if (!t && !n || !r?.offsetWidth) return;
|
|
2146
|
-
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o =
|
|
2146
|
+
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = X.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
|
|
2147
2147
|
if (n?.offsetWidth) {
|
|
2148
2148
|
let t = l ? -4 - n.offsetWidth : r.offsetWidth + 4, i = t >= s + 4 && t + n.offsetWidth + 4 <= c;
|
|
2149
2149
|
if (e === i) {
|
|
2150
|
-
|
|
2150
|
+
ae.value = !i, j(Z);
|
|
2151
2151
|
return;
|
|
2152
2152
|
}
|
|
2153
2153
|
}
|
|
2154
2154
|
if (!t?.offsetWidth) return;
|
|
2155
|
-
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d =
|
|
2155
|
+
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d = J.value, f = Math.max(28, d?.offsetHeight ? d.offsetTop + d.offsetHeight + 4 : 0), p = Math.max(f + t.offsetHeight / 2, r.offsetHeight / 2), m = u < r.offsetWidth && p + t.offsetHeight / 2 <= r.offsetHeight + 8 ? `${p}px` : "50%";
|
|
2156
2156
|
if (u >= r.offsetWidth && n?.offsetWidth && !e && !l) {
|
|
2157
2157
|
let e = (n.getBoundingClientRect().bottom - i.top) / a + 4 + t.offsetHeight / 2;
|
|
2158
2158
|
e > r.offsetHeight / 2 && (m = `${e}px`);
|
|
@@ -2164,27 +2164,27 @@ var Ha = [
|
|
|
2164
2164
|
u = Math.max(s + 4, Math.min(n, c - t.offsetWidth - 4));
|
|
2165
2165
|
}
|
|
2166
2166
|
}
|
|
2167
|
-
(
|
|
2167
|
+
(ie.value.left !== `${u}px` || ie.value.top !== m) && (ie.value = {
|
|
2168
2168
|
left: `${u}px`,
|
|
2169
2169
|
top: m
|
|
2170
2170
|
});
|
|
2171
2171
|
}
|
|
2172
|
-
x(
|
|
2172
|
+
x(Z), r(I(() => Y.value ? [
|
|
2173
2173
|
ne.value,
|
|
2174
2174
|
q.value,
|
|
2175
|
+
J.value,
|
|
2175
2176
|
re.value,
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
})), he = I(() => Ji(o.value, { backgroundImageUrl: ue.value })), ge = I(() => {
|
|
2177
|
+
X.value
|
|
2178
|
+
].filter((e) => !!e) : []), Z), e(X, "scroll", Z, { passive: !0 });
|
|
2179
|
+
let Q = I(() => B.collaboration?.lockOf(a.block.id) ?? null), oe = I(() => Q.value?.holder.type === "guest" ? l.collaboration.guest : Q.value?.holder.name ?? ""), se = I(() => B.collaboration?.agentHighlightOf(a.block.id) ?? B.ai?.highlightOf(a.block.id) ?? null), ce = Wn(() => o.value.type === "section" ? o.value.backgroundImage : void 0), le = Wn(() => o.value.type === "section" ? o.value.wrapper?.backgroundImage : void 0), ue = g(Sn, null), de = ue ? St(ue) : null, fe = g(cn, null) ?? de?.content ?? null;
|
|
2180
|
+
u([() => ue?.activeLocale?.value, () => de && He(de.settings.value)], Z, { flush: "post" });
|
|
2181
|
+
let pe = g(Vt, void 0), me = I(() => Wi(o.value, {
|
|
2182
|
+
backgroundImageUrl: ce.value,
|
|
2183
|
+
heroBoxWidth: In(o.value) ? Bn(o.value, fe?.value, pe) : void 0
|
|
2184
|
+
})), he = I(() => Xi(o.value, { backgroundImageUrl: le.value })), ge = I(() => {
|
|
2185
2185
|
let e = o.value;
|
|
2186
2186
|
return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
|
|
2187
|
-
}), _e = I(() =>
|
|
2187
|
+
}), _e = I(() => Yi(ge.value?.wrapper?.padding));
|
|
2188
2188
|
function ve(e) {
|
|
2189
2189
|
a.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
|
|
2190
2190
|
}
|
|
@@ -2218,44 +2218,44 @@ var Ha = [
|
|
|
2218
2218
|
}, [
|
|
2219
2219
|
N("div", {
|
|
2220
2220
|
ref_key: "badgesElement",
|
|
2221
|
-
ref:
|
|
2221
|
+
ref: J,
|
|
2222
2222
|
class: "tpl-block-badges tpl:absolute tpl:top-1 tpl:inset-e-1 tpl:z-10 tpl:flex tpl:gap-1"
|
|
2223
2223
|
}, [
|
|
2224
2224
|
K.value > 0 && !S.value ? (c(), w("button", {
|
|
2225
2225
|
key: 0,
|
|
2226
2226
|
ref_key: "commentElement",
|
|
2227
|
-
ref:
|
|
2228
|
-
class: O(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 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)]",
|
|
2227
|
+
ref: re,
|
|
2228
|
+
class: O(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 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)]", ae.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
|
|
2229
2229
|
"aria-label": D(d)(D(l).blockActions.comments, { count: String(K.value) }),
|
|
2230
2230
|
onClick: n[0] ||= M((e) => D(B).comments?.openForBlock(t.block.id), ["stop"])
|
|
2231
|
-
}, [W(D(
|
|
2231
|
+
}, [W(D(pr), {
|
|
2232
2232
|
size: 12,
|
|
2233
2233
|
"stroke-width": 2.5
|
|
2234
|
-
}), T(" " + P(K.value), 1)], 10,
|
|
2234
|
+
}), T(" " + P(K.value), 1)], 10, uo)) : k("", !0),
|
|
2235
2235
|
W(D(i), { "block-id": t.block.id }, null, 8, ["block-id"]),
|
|
2236
|
-
t.previewMode ? k("", !0) : (c(), A(
|
|
2236
|
+
t.previewMode ? k("", !0) : (c(), A(co, {
|
|
2237
2237
|
key: 1,
|
|
2238
2238
|
block: t.block
|
|
2239
2239
|
}, null, 8, ["block"]))
|
|
2240
2240
|
], 512),
|
|
2241
|
-
|
|
2241
|
+
Q.value ? (c(), w("div", {
|
|
2242
2242
|
key: 0,
|
|
2243
2243
|
"data-testid": "block-lock",
|
|
2244
|
-
"data-lock-holder":
|
|
2244
|
+
"data-lock-holder": Q.value.holder.sessionId,
|
|
2245
2245
|
class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
2246
2246
|
style: L({
|
|
2247
|
-
outline: `2px solid ${
|
|
2247
|
+
outline: `2px solid ${Q.value.holder.color}`,
|
|
2248
2248
|
outlineOffset: "-1px"
|
|
2249
2249
|
})
|
|
2250
2250
|
}, [N("span", {
|
|
2251
2251
|
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
2252
2252
|
style: L({
|
|
2253
|
-
backgroundColor:
|
|
2254
|
-
color: D(
|
|
2253
|
+
backgroundColor: Q.value.holder.color,
|
|
2254
|
+
color: D(wr)(Q.value.holder.color)
|
|
2255
2255
|
})
|
|
2256
|
-
}, P(D(d)(D(l).collaboration.editing, { name:
|
|
2257
|
-
|
|
2258
|
-
key:
|
|
2256
|
+
}, P(D(d)(D(l).collaboration.editing, { name: oe.value })), 5)], 12, fo)) : k("", !0),
|
|
2257
|
+
se.value === null ? k("", !0) : (c(), w("div", {
|
|
2258
|
+
key: se.value,
|
|
2259
2259
|
"data-testid": "block-agent-highlight",
|
|
2260
2260
|
"aria-hidden": "true",
|
|
2261
2261
|
class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
|
|
@@ -2264,7 +2264,7 @@ var Ha = [
|
|
|
2264
2264
|
key: 2,
|
|
2265
2265
|
ref_key: "actionsElement",
|
|
2266
2266
|
ref: q,
|
|
2267
|
-
style: L(
|
|
2267
|
+
style: L(ie.value),
|
|
2268
2268
|
role: "toolbar",
|
|
2269
2269
|
"aria-label": D(l).blockActions.drag,
|
|
2270
2270
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:top-1/2 tpl:z-20 tpl:flex tpl:-translate-y-1/2 tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
@@ -2278,81 +2278,81 @@ var Ha = [
|
|
|
2278
2278
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2279
2279
|
title: D(l).blockActions.drag,
|
|
2280
2280
|
onKeydown: v
|
|
2281
|
-
}, [W(D(
|
|
2281
|
+
}, [W(D(gr), {
|
|
2282
2282
|
size: 14,
|
|
2283
2283
|
"stroke-width": 1.5
|
|
2284
|
-
})], 40,
|
|
2284
|
+
})], 40, mo),
|
|
2285
2285
|
N("button", {
|
|
2286
2286
|
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",
|
|
2287
2287
|
"aria-label": D(l).blockActions.duplicate,
|
|
2288
2288
|
title: D(l).blockActions.duplicate,
|
|
2289
2289
|
onClick: M(be, ["stop"])
|
|
2290
|
-
}, [W(D(
|
|
2290
|
+
}, [W(D(Qn), {
|
|
2291
2291
|
size: 14,
|
|
2292
2292
|
"stroke-width": 1.5
|
|
2293
|
-
})], 8,
|
|
2293
|
+
})], 8, ho),
|
|
2294
2294
|
U.value ? (c(), w("button", {
|
|
2295
2295
|
key: 0,
|
|
2296
2296
|
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",
|
|
2297
2297
|
"aria-label": D(l).blockActions.saveAsBlock,
|
|
2298
2298
|
title: D(l).blockActions.saveAsBlock,
|
|
2299
2299
|
onClick: M(xe, ["stop"])
|
|
2300
|
-
}, [W(D(
|
|
2300
|
+
}, [W(D(or), {
|
|
2301
2301
|
size: 14,
|
|
2302
2302
|
"stroke-width": 1.5
|
|
2303
|
-
})], 8,
|
|
2303
|
+
})], 8, go)) : k("", !0),
|
|
2304
2304
|
N("button", {
|
|
2305
2305
|
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",
|
|
2306
2306
|
"aria-label": D(l).blockActions.delete,
|
|
2307
2307
|
title: D(l).blockActions.delete,
|
|
2308
2308
|
onClick: M(ye, ["stop"])
|
|
2309
|
-
}, [W(D(
|
|
2309
|
+
}, [W(D(ur), {
|
|
2310
2310
|
size: 14,
|
|
2311
2311
|
"stroke-width": 1.5
|
|
2312
|
-
})], 8,
|
|
2313
|
-
], 12,
|
|
2314
|
-
S.value ? (c(), w("div",
|
|
2312
|
+
})], 8, _o)
|
|
2313
|
+
], 12, po)) : k("", !0),
|
|
2314
|
+
S.value ? (c(), w("div", vo, [N("span", yo, [W(D(nr), {
|
|
2315
2315
|
size: 12,
|
|
2316
2316
|
"stroke-width": 1.5
|
|
2317
2317
|
}), T(" " + P(D(d)(D(l).blockActions.hiddenOnViewport, { viewport: ee.value })), 1)])])) : k("", !0),
|
|
2318
|
-
F.value && !S.value ? (c(), w("div",
|
|
2318
|
+
F.value && !S.value ? (c(), w("div", bo, [N("button", {
|
|
2319
2319
|
"data-testid": "condition-toggle",
|
|
2320
2320
|
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)]",
|
|
2321
2321
|
"aria-label": D(l).blockActions.conditionToggle,
|
|
2322
2322
|
title: t.block.displayCondition?.label,
|
|
2323
2323
|
onClick: M(Se, ["stop"])
|
|
2324
|
-
}, [W(D(
|
|
2324
|
+
}, [W(D(rr), {
|
|
2325
2325
|
size: 12,
|
|
2326
2326
|
"stroke-width": 2
|
|
2327
|
-
})], 8,
|
|
2327
|
+
})], 8, xo)])) : k("", !0),
|
|
2328
2328
|
he.value ? (c(), w("div", {
|
|
2329
2329
|
key: 5,
|
|
2330
|
-
class: O(["tpl-section-wrapper tpl-email-surface", D(
|
|
2330
|
+
class: O(["tpl-section-wrapper tpl-email-surface", D(Bi)(he.value)]),
|
|
2331
2331
|
style: L(he.value)
|
|
2332
2332
|
}, [ge.value ? (c(), w("div", {
|
|
2333
2333
|
key: 0,
|
|
2334
2334
|
class: "tpl-band-frame",
|
|
2335
2335
|
style: L(_e.value)
|
|
2336
2336
|
}, [N("div", {
|
|
2337
|
-
class: O(["tpl-block-content tpl-email-surface", D(
|
|
2337
|
+
class: O(["tpl-block-content tpl-email-surface", D(Bi)(me.value)]),
|
|
2338
2338
|
style: L(me.value)
|
|
2339
2339
|
}, [y(e.$slots, "default", {}, void 0, !0)], 6)], 4)) : (c(), w("div", {
|
|
2340
2340
|
key: 1,
|
|
2341
|
-
class: O(["tpl-block-content tpl-email-surface", D(
|
|
2341
|
+
class: O(["tpl-block-content tpl-email-surface", D(Bi)(me.value)]),
|
|
2342
2342
|
style: L(me.value)
|
|
2343
2343
|
}, [y(e.$slots, "default", {}, void 0, !0)], 6))], 6)) : (c(), w("div", {
|
|
2344
2344
|
key: 6,
|
|
2345
|
-
class: O(["tpl-block-content tpl-email-surface", D(
|
|
2345
|
+
class: O(["tpl-block-content tpl-email-surface", D(Bi)(me.value)]),
|
|
2346
2346
|
style: L(me.value)
|
|
2347
2347
|
}, [y(e.$slots, "default", {}, void 0, !0)], 6))
|
|
2348
|
-
], 10,
|
|
2348
|
+
], 10, lo));
|
|
2349
2349
|
}
|
|
2350
2350
|
}), [["__scopeId", "data-v-872194d3"]]);
|
|
2351
2351
|
// src/utils/unwrapParagraph.ts
|
|
2352
|
-
function
|
|
2352
|
+
function Co(e) {
|
|
2353
2353
|
let t = /^\s*<p\b/.exec(e);
|
|
2354
2354
|
if (!t) return e;
|
|
2355
|
-
let n =
|
|
2355
|
+
let n = lt(e, t[0].length);
|
|
2356
2356
|
if (n === -1) return e;
|
|
2357
2357
|
let r = /<\/p>\s*$/.exec(e);
|
|
2358
2358
|
if (!r || r.index <= n) return e;
|
|
@@ -2360,22 +2360,22 @@ function xo(e) {
|
|
|
2360
2360
|
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2361
2361
|
}
|
|
2362
2362
|
// src/components/blocks/TitleBlock.vue
|
|
2363
|
-
var
|
|
2363
|
+
var wo = /* @__PURE__ */ o({
|
|
2364
2364
|
__name: "TitleBlock",
|
|
2365
2365
|
props: {
|
|
2366
2366
|
block: {},
|
|
2367
2367
|
viewport: {}
|
|
2368
2368
|
},
|
|
2369
2369
|
setup(e) {
|
|
2370
|
-
let t = e, n = b(() => import("./TitleEditor-
|
|
2370
|
+
let t = e, n = b(() => import("./TitleEditor-DXN_aOn0.js")), r = xn(Zt, "TitleBlock"), { isEditing: i, blockRef: o, toolbarPosition: s, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = Ra(() => t.block.content), f = I(() => {
|
|
2371
2371
|
let e = {
|
|
2372
|
-
fontSize: `${
|
|
2373
|
-
lineHeight: String(
|
|
2372
|
+
fontSize: `${ce[t.block.level]}px`,
|
|
2373
|
+
lineHeight: String(Se),
|
|
2374
2374
|
fontWeight: "700",
|
|
2375
2375
|
textAlign: t.block.textAlign
|
|
2376
2376
|
};
|
|
2377
2377
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
2378
|
-
}), p = I(() => `h${t.block.level}`), m = I(() =>
|
|
2378
|
+
}), p = I(() => `h${t.block.level}`), m = I(() => Zn(Co(l.value)));
|
|
2379
2379
|
return (t, r) => (c(), w("div", {
|
|
2380
2380
|
ref_key: "blockRef",
|
|
2381
2381
|
ref: o,
|
|
@@ -2401,14 +2401,14 @@ var So = /* @__PURE__ */ o({
|
|
|
2401
2401
|
innerHTML: m.value
|
|
2402
2402
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2403
2403
|
}
|
|
2404
|
-
}),
|
|
2405
|
-
function
|
|
2406
|
-
let n =
|
|
2407
|
-
n.color =
|
|
2408
|
-
let r =
|
|
2409
|
-
r.content = `<p style="text-align: center"><span style="color: ${
|
|
2410
|
-
let i =
|
|
2411
|
-
return i.align = "center",
|
|
2404
|
+
}), To = "hero", Eo = "#1f2937", Do = "#ffffff";
|
|
2405
|
+
function Oo(e, t) {
|
|
2406
|
+
let n = pt("title", e);
|
|
2407
|
+
n.color = Do, n.textAlign = "center";
|
|
2408
|
+
let r = pt("paragraph", e);
|
|
2409
|
+
r.content = `<p style="text-align: center"><span style="color: ${Do}">${ko(t)}</span></p>`;
|
|
2410
|
+
let i = pt("button", e);
|
|
2411
|
+
return i.align = "center", xe({
|
|
2412
2412
|
columns: "1",
|
|
2413
2413
|
children: [[
|
|
2414
2414
|
n,
|
|
@@ -2426,28 +2426,28 @@ function Eo(e, t) {
|
|
|
2426
2426
|
bottom: 48,
|
|
2427
2427
|
left: 24
|
|
2428
2428
|
},
|
|
2429
|
-
backgroundColor:
|
|
2429
|
+
backgroundColor: Eo
|
|
2430
2430
|
}
|
|
2431
2431
|
});
|
|
2432
2432
|
}
|
|
2433
|
-
function
|
|
2433
|
+
function ko(e) {
|
|
2434
2434
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2435
2435
|
}
|
|
2436
2436
|
// src/utils/sectionColumnDrop.ts
|
|
2437
|
-
var
|
|
2438
|
-
function
|
|
2439
|
-
return e.dataset.blockType !== "section" && !
|
|
2437
|
+
var Ao = /* @__PURE__ */ new Set(["section", To]);
|
|
2438
|
+
function jo(e) {
|
|
2439
|
+
return e.dataset.blockType !== "section" && !Ao.has(e.dataset.paletteType ?? "");
|
|
2440
2440
|
}
|
|
2441
2441
|
// src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2442
|
-
var
|
|
2442
|
+
var Mo = { class: "tpl:relative tpl:w-full" }, No = {
|
|
2443
2443
|
key: 0,
|
|
2444
2444
|
"data-testid": "hero-image-hint",
|
|
2445
2445
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-x-0 tpl:bottom-full tpl:mb-2 tpl:flex tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
2446
|
-
},
|
|
2446
|
+
}, Po = {
|
|
2447
2447
|
key: 0,
|
|
2448
2448
|
"data-testid": "section-drop-hint",
|
|
2449
2449
|
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)]"
|
|
2450
|
-
},
|
|
2450
|
+
}, Fo = /* @__PURE__ */ o({
|
|
2451
2451
|
__name: "SectionBlock",
|
|
2452
2452
|
props: {
|
|
2453
2453
|
block: {},
|
|
@@ -2456,46 +2456,21 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2456
2456
|
},
|
|
2457
2457
|
setup(e) {
|
|
2458
2458
|
let t = {
|
|
2459
|
-
title:
|
|
2460
|
-
paragraph:
|
|
2461
|
-
image:
|
|
2462
|
-
button:
|
|
2463
|
-
divider:
|
|
2464
|
-
custom:
|
|
2465
|
-
}, n = e, { t: r } = G(), o =
|
|
2466
|
-
d(
|
|
2467
|
-
let h = g(
|
|
2459
|
+
title: wo,
|
|
2460
|
+
paragraph: Ba,
|
|
2461
|
+
image: Na,
|
|
2462
|
+
button: ta,
|
|
2463
|
+
divider: ha,
|
|
2464
|
+
custom: pa
|
|
2465
|
+
}, n = e, { t: r } = G(), o = xn(Sn, "SectionBlock"), { displayBlock: s } = St(o), u = I(() => n.sourceBlock ?? n.block), m = g(an, I(() => /* @__PURE__ */ new Set()));
|
|
2466
|
+
d(an, I(() => /* @__PURE__ */ new Set([...m.value, ...Object.entries(u.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
2467
|
+
let h = g(dn, null), _ = g(ln, null), v = g(en, {}), y = g(Kt, null), b = g(Yt, null);
|
|
2468
2468
|
function x(e) {
|
|
2469
2469
|
if (y?.value) return;
|
|
2470
2470
|
let t = v.savedBlocks;
|
|
2471
2471
|
t?.isPicking.value ? t.togglePick(n.block.id) : o.selectBlock(e);
|
|
2472
2472
|
}
|
|
2473
|
-
let S = I(() => {
|
|
2474
|
-
switch (n.block.columns) {
|
|
2475
|
-
case "2": return ["50%", "50%"];
|
|
2476
|
-
case "3": return [
|
|
2477
|
-
"33.33%",
|
|
2478
|
-
"33.33%",
|
|
2479
|
-
"33.33%"
|
|
2480
|
-
];
|
|
2481
|
-
case "4": return [
|
|
2482
|
-
"25%",
|
|
2483
|
-
"25%",
|
|
2484
|
-
"25%",
|
|
2485
|
-
"25%"
|
|
2486
|
-
];
|
|
2487
|
-
case "1-2": return ["33.33%", "66.67%"];
|
|
2488
|
-
case "2-1": return ["66.67%", "33.33%"];
|
|
2489
|
-
case "1-3": return ["25%", "75%"];
|
|
2490
|
-
case "3-1": return ["75%", "25%"];
|
|
2491
|
-
case "1-2-1": return [
|
|
2492
|
-
"25%",
|
|
2493
|
-
"50%",
|
|
2494
|
-
"25%"
|
|
2495
|
-
];
|
|
2496
|
-
default: return ["100%"];
|
|
2497
|
-
}
|
|
2498
|
-
}), C = I(() => {
|
|
2473
|
+
let S = I(() => Ne(n.block).map((e) => `${e}%`)), C = I(() => {
|
|
2499
2474
|
let e = S.value.length, t = [...(o.state.previewMode ? n.block : u.value).children];
|
|
2500
2475
|
for (; t.length < e;) t.push([]);
|
|
2501
2476
|
return t.slice(0, e);
|
|
@@ -2515,7 +2490,7 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2515
2490
|
}
|
|
2516
2491
|
let R = I(() => {
|
|
2517
2492
|
if (o.state.previewMode) return !1;
|
|
2518
|
-
let e =
|
|
2493
|
+
let e = ke(n.block);
|
|
2519
2494
|
return e !== null && !e.applied && e.reason === "image";
|
|
2520
2495
|
});
|
|
2521
2496
|
function B(e) {
|
|
@@ -2525,10 +2500,10 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2525
2500
|
return E(e).length === 0 && o.state.previewMode;
|
|
2526
2501
|
}
|
|
2527
2502
|
function K(e, t) {
|
|
2528
|
-
y?.value ||
|
|
2503
|
+
y?.value || Va(o, t, n.block.id, e);
|
|
2529
2504
|
}
|
|
2530
2505
|
function ne(e) {
|
|
2531
|
-
return
|
|
2506
|
+
return Fi(e, _, t);
|
|
2532
2507
|
}
|
|
2533
2508
|
function q(e, t) {
|
|
2534
2509
|
y?.value || e.type !== "custom" || o.updateBlock(e.id, {
|
|
@@ -2536,7 +2511,7 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2536
2511
|
dataSourceFetched: t.dataSourceFetched
|
|
2537
2512
|
});
|
|
2538
2513
|
}
|
|
2539
|
-
return (t, u) => (c(), w("div",
|
|
2514
|
+
return (t, u) => (c(), w("div", Mo, [R.value ? (c(), w("div", No, [N("span", null, P(D(r).section.heroAddImage), 1)])) : k("", !0), N("div", { class: O(["tpl:flex tpl:gap-0", { "tpl:flex-col": T.value }]) }, [(c(!0), w(U, null, p(C.value, (t, d) => (c(), w("div", {
|
|
2540
2515
|
key: d,
|
|
2541
2516
|
class: O(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", B(d) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
2542
2517
|
style: L({ width: T.value ? "100%" : S.value[d] })
|
|
@@ -2546,7 +2521,7 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2546
2521
|
group: {
|
|
2547
2522
|
name: "blocks",
|
|
2548
2523
|
pull: !0,
|
|
2549
|
-
put: (e, t, n) => D(
|
|
2524
|
+
put: (e, t, n) => D(jo)(n)
|
|
2550
2525
|
},
|
|
2551
2526
|
animation: 150,
|
|
2552
2527
|
"ghost-class": "tpl-ghost",
|
|
@@ -2560,12 +2535,12 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2560
2535
|
"tpl:min-h-[60px]": F(d),
|
|
2561
2536
|
"tpl:min-h-[34px]": te(d)
|
|
2562
2537
|
}]),
|
|
2563
|
-
onUpdate: (e) => !D(y) && D(
|
|
2538
|
+
onUpdate: (e) => !D(y) && D(Va)(D(o), E(d), n.block.id, d, e),
|
|
2564
2539
|
onStart: (e) => M.value = d,
|
|
2565
2540
|
onEnd: u[0] ||= (e) => M.value = null,
|
|
2566
2541
|
"onUpdate:modelValue": (e) => K(d, e)
|
|
2567
2542
|
}, {
|
|
2568
|
-
default: l(() => [(c(!0), w(U, null, p(E(d), (t) => f((c(), w("div", { key: t.id }, [W(
|
|
2543
|
+
default: l(() => [(c(!0), w(U, null, p(E(d), (t) => f((c(), w("div", { key: t.id }, [W(So, {
|
|
2569
2544
|
block: t,
|
|
2570
2545
|
"display-block": D(s)(t),
|
|
2571
2546
|
"is-selected": D(o).state.selectedBlockId === t.id,
|
|
@@ -2602,14 +2577,50 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2602
2577
|
"onUpdate",
|
|
2603
2578
|
"onStart",
|
|
2604
2579
|
"onUpdate:modelValue"
|
|
2605
|
-
]), B(d) ? (c(), w("div",
|
|
2580
|
+
]), B(d) ? (c(), w("div", Po, [N("span", null, P(D(r).section.dropHere), 1)])) : k("", !0)], 6))), 128))], 2)]));
|
|
2606
2581
|
}
|
|
2607
|
-
}),
|
|
2582
|
+
}), Io = [
|
|
2583
|
+
"src",
|
|
2584
|
+
"alt",
|
|
2585
|
+
"width"
|
|
2586
|
+
], Lo = ["aria-label"], Ro = /* @__PURE__ */ o({
|
|
2587
|
+
__name: "SocialCustomIconImage",
|
|
2588
|
+
props: {
|
|
2589
|
+
icon: {},
|
|
2590
|
+
iconSize: {}
|
|
2591
|
+
},
|
|
2592
|
+
setup(e) {
|
|
2593
|
+
let t = e, { t: n } = G(), { syntax: r } = K(), i = I(() => Vn[t.iconSize]), a = I(() => Math.round(i.value / 2)), o = I(() => typeof t.icon.imageUrl == "string" ? t.icon.imageUrl : ""), s = I(() => Ae(o.value, r)), l = Pn(() => s.value || o.value.trim() === "" ? void 0 : o.value);
|
|
2594
|
+
return (t, r) => D(l) ? (c(), w("img", {
|
|
2595
|
+
key: 0,
|
|
2596
|
+
src: D(l),
|
|
2597
|
+
alt: e.icon.alt ?? "",
|
|
2598
|
+
width: i.value,
|
|
2599
|
+
style: {
|
|
2600
|
+
display: "block",
|
|
2601
|
+
height: "auto"
|
|
2602
|
+
}
|
|
2603
|
+
}, null, 8, Io)) : (c(), w("div", {
|
|
2604
|
+
key: 1,
|
|
2605
|
+
role: "img",
|
|
2606
|
+
"aria-label": D(n).social.customIconMissing,
|
|
2607
|
+
class: "tpl:box-border tpl:flex tpl:items-center tpl:justify-center tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]",
|
|
2608
|
+
style: L({
|
|
2609
|
+
width: `${i.value}px`,
|
|
2610
|
+
height: `${i.value}px`
|
|
2611
|
+
})
|
|
2612
|
+
}, [W(D(cr), {
|
|
2613
|
+
size: a.value,
|
|
2614
|
+
"stroke-width": 1.5,
|
|
2615
|
+
"aria-hidden": "true"
|
|
2616
|
+
}, null, 8, ["size"])], 12, Lo));
|
|
2617
|
+
}
|
|
2618
|
+
}), zo = ["width", "height"], Bo = [
|
|
2608
2619
|
"d",
|
|
2609
2620
|
"stroke",
|
|
2610
2621
|
"stroke-opacity",
|
|
2611
2622
|
"stroke-width"
|
|
2612
|
-
],
|
|
2623
|
+
], Vo = ["d", "fill"], Ho = /* @__PURE__ */ o({
|
|
2613
2624
|
__name: "SocialIconSvg",
|
|
2614
2625
|
props: {
|
|
2615
2626
|
platform: {},
|
|
@@ -2618,7 +2629,7 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2618
2629
|
iconSize: {}
|
|
2619
2630
|
},
|
|
2620
2631
|
setup(e) {
|
|
2621
|
-
let t = e, n = I(() =>
|
|
2632
|
+
let t = e, n = I(() => zn[t.platform]), r = I(() => Vn[t.iconSize]), i = I(() => ge(t.platform, t.iconTone)), a = I(() => ht(t.iconStyle, t.iconTone)), o = I(() => {
|
|
2622
2633
|
let e = {
|
|
2623
2634
|
display: "inline-flex",
|
|
2624
2635
|
alignItems: "center",
|
|
@@ -2656,7 +2667,7 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2656
2667
|
};
|
|
2657
2668
|
default: return e;
|
|
2658
2669
|
}
|
|
2659
|
-
}), s = I(() =>
|
|
2670
|
+
}), s = I(() => Ee(t.iconStyle)), l = I(() => Math.floor(r.value * s.value));
|
|
2660
2671
|
function u(e) {
|
|
2661
2672
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
2662
2673
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
@@ -2677,15 +2688,15 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2677
2688
|
"stroke-opacity": a.value.opacity,
|
|
2678
2689
|
"stroke-width": a.value.width / s.value,
|
|
2679
2690
|
"stroke-linejoin": "round"
|
|
2680
|
-
}, null, 8,
|
|
2691
|
+
}, null, 8, Bo)) : k("", !0), N("path", {
|
|
2681
2692
|
d: n.value.path,
|
|
2682
2693
|
fill: d.value
|
|
2683
|
-
}, null, 8,
|
|
2694
|
+
}, null, 8, Vo)], 8, zo))], 4));
|
|
2684
2695
|
}
|
|
2685
|
-
}),
|
|
2696
|
+
}), Uo = { class: "tpl:w-full" }, Wo = ["href"], Go = {
|
|
2686
2697
|
key: 1,
|
|
2687
2698
|
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)]"
|
|
2688
|
-
},
|
|
2699
|
+
}, Ko = /* @__PURE__ */ o({
|
|
2689
2700
|
__name: "SocialIconsBlock",
|
|
2690
2701
|
props: {
|
|
2691
2702
|
block: {},
|
|
@@ -2698,15 +2709,23 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2698
2709
|
gap: `${t.block.spacing}px`,
|
|
2699
2710
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
2700
2711
|
})), i = I(() => t.block.icons.length > 0);
|
|
2701
|
-
|
|
2712
|
+
function a(e) {
|
|
2713
|
+
return e.platform === "custom";
|
|
2714
|
+
}
|
|
2715
|
+
return (t, o) => (c(), w("div", Uo, [i.value ? (c(), w("div", {
|
|
2702
2716
|
key: 0,
|
|
2703
2717
|
style: L(r.value)
|
|
2704
2718
|
}, [(c(!0), w(U, null, p(e.block.icons, (t) => (c(), w("a", {
|
|
2705
2719
|
key: t.id,
|
|
2706
2720
|
href: t.url || "#",
|
|
2707
2721
|
class: "tpl:cursor-default",
|
|
2708
|
-
onClick:
|
|
2709
|
-
}, [
|
|
2722
|
+
onClick: o[0] ||= M(() => {}, ["prevent"])
|
|
2723
|
+
}, [a(t) ? (c(), A(Ro, {
|
|
2724
|
+
key: 0,
|
|
2725
|
+
icon: t,
|
|
2726
|
+
"icon-size": e.block.iconSize
|
|
2727
|
+
}, null, 8, ["icon", "icon-size"])) : (c(), A(Ho, {
|
|
2728
|
+
key: 1,
|
|
2710
2729
|
platform: t.platform,
|
|
2711
2730
|
"icon-style": e.block.iconStyle,
|
|
2712
2731
|
"icon-tone": e.block.iconTone,
|
|
@@ -2716,46 +2735,46 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2716
2735
|
"icon-style",
|
|
2717
2736
|
"icon-tone",
|
|
2718
2737
|
"icon-size"
|
|
2719
|
-
])], 8,
|
|
2738
|
+
]))], 8, Wo))), 128))], 4)) : (c(), w("div", Go, [W(D(dr), { size: 16 }), N("span", null, P(D(n).social.addIcons), 1)]))]));
|
|
2720
2739
|
}
|
|
2721
|
-
}),
|
|
2740
|
+
}), qo = { class: "tpl:w-full" }, Jo = {
|
|
2722
2741
|
key: 0,
|
|
2723
2742
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
2724
2743
|
style: {
|
|
2725
2744
|
"background-color": "var(--tpl-bg-hover)",
|
|
2726
2745
|
color: "var(--tpl-text-dim)"
|
|
2727
2746
|
}
|
|
2728
|
-
},
|
|
2747
|
+
}, Yo = /* @__PURE__ */ o({
|
|
2729
2748
|
__name: "SpacerBlock",
|
|
2730
2749
|
props: {
|
|
2731
2750
|
block: {},
|
|
2732
2751
|
viewport: {}
|
|
2733
2752
|
},
|
|
2734
2753
|
setup(e) {
|
|
2735
|
-
let t = e, n =
|
|
2754
|
+
let t = e, n = xn(Sn, "SpacerBlock"), r = I(() => ({
|
|
2736
2755
|
height: `${t.block.height}px`,
|
|
2737
2756
|
minHeight: `${t.block.height}px`,
|
|
2738
2757
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
2739
2758
|
}));
|
|
2740
|
-
return (t, i) => (c(), w("div",
|
|
2759
|
+
return (t, i) => (c(), w("div", qo, [N("div", {
|
|
2741
2760
|
style: L(r.value),
|
|
2742
2761
|
class: O(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !D(n).state.previewMode }])
|
|
2743
|
-
}, [D(n).state.previewMode ? k("", !0) : (c(), w("span",
|
|
2762
|
+
}, [D(n).state.previewMode ? k("", !0) : (c(), w("span", Jo, P(e.block.height) + "px ", 1))], 6)]));
|
|
2744
2763
|
}
|
|
2745
|
-
}),
|
|
2764
|
+
}), Xo = { class: "tpl:w-full" }, Zo = { key: 0 }, Qo = [
|
|
2746
2765
|
"aria-label",
|
|
2747
2766
|
"contenteditable",
|
|
2748
2767
|
"data-placeholder",
|
|
2749
2768
|
"onBlur"
|
|
2750
|
-
],
|
|
2769
|
+
], $o = [
|
|
2751
2770
|
"aria-label",
|
|
2752
2771
|
"contenteditable",
|
|
2753
2772
|
"data-placeholder",
|
|
2754
2773
|
"onBlur"
|
|
2755
|
-
],
|
|
2774
|
+
], es = {
|
|
2756
2775
|
key: 1,
|
|
2757
2776
|
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)]"
|
|
2758
|
-
},
|
|
2777
|
+
}, ts = /*#__PURE__*/ Cr(/* @__PURE__ */ o({
|
|
2759
2778
|
__name: "TableBlock",
|
|
2760
2779
|
props: {
|
|
2761
2780
|
block: {},
|
|
@@ -2769,7 +2788,7 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2769
2788
|
updated(e, t) {
|
|
2770
2789
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
2771
2790
|
}
|
|
2772
|
-
}, n = e, { t: r } = G(), i =
|
|
2791
|
+
}, n = e, { t: r } = G(), i = xn(Sn, "TableBlock"), a = xn(Zt, "TableBlock"), o = g(Kt, null), s = I(() => n.block.rows.length > 0), l = I(() => {
|
|
2773
2792
|
let e = {
|
|
2774
2793
|
width: "100%",
|
|
2775
2794
|
borderCollapse: "collapse",
|
|
@@ -2801,11 +2820,11 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2801
2820
|
} : n);
|
|
2802
2821
|
i.updateBlock(n.block.id, { rows: s });
|
|
2803
2822
|
}
|
|
2804
|
-
return (e, n) => (c(), w("div",
|
|
2823
|
+
return (e, n) => (c(), w("div", Xo, [s.value ? (c(), w("table", {
|
|
2805
2824
|
key: 0,
|
|
2806
2825
|
style: L(l.value),
|
|
2807
2826
|
class: "tpl-table-editable"
|
|
2808
|
-
}, [m.value ? (c(), w("thead",
|
|
2827
|
+
}, [m.value ? (c(), w("thead", Zo, [N("tr", null, [(c(!0), w(U, null, p(m.value.cells, (e) => f((c(), w("th", {
|
|
2809
2828
|
key: e.id,
|
|
2810
2829
|
style: L(d.value),
|
|
2811
2830
|
"aria-label": D(r).table.cellPlaceholder,
|
|
@@ -2814,7 +2833,7 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2814
2833
|
onBlur: (t) => v(m.value.id, e.id, t),
|
|
2815
2834
|
onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2816
2835
|
onClick: M(_, ["stop"])
|
|
2817
|
-
}, null, 44,
|
|
2836
|
+
}, null, 44, Qo)), [[t, e.content]])), 128))])])) : k("", !0), N("tbody", null, [(c(!0), w(U, null, p(h.value, (e) => (c(), w("tr", { key: e.id }, [(c(!0), w(U, null, p(e.cells, (i) => f((c(), w("td", {
|
|
2818
2837
|
key: i.id,
|
|
2819
2838
|
style: L(u.value),
|
|
2820
2839
|
"aria-label": D(r).table.cellPlaceholder,
|
|
@@ -2823,9 +2842,9 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2823
2842
|
onBlur: (t) => v(e.id, i.id, t),
|
|
2824
2843
|
onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2825
2844
|
onClick: M(_, ["stop"])
|
|
2826
|
-
}, null, 44,
|
|
2845
|
+
}, null, 44, $o)), [[t, i.content]])), 128))]))), 128))])], 4)) : (c(), w("div", es, [W(D(hr), { size: 16 }), N("span", null, P(D(r).table.empty), 1)]))]));
|
|
2827
2846
|
}
|
|
2828
|
-
}), [["__scopeId", "data-v-73b9f5e5"]]),
|
|
2847
|
+
}), [["__scopeId", "data-v-73b9f5e5"]]), ns = /* @__PURE__ */ o({
|
|
2829
2848
|
__name: "VideoPlayButton",
|
|
2830
2849
|
props: { hoverEffect: {
|
|
2831
2850
|
type: Boolean,
|
|
@@ -2842,7 +2861,7 @@ var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
|
2842
2861
|
}
|
|
2843
2862
|
});
|
|
2844
2863
|
// src/utils/videoThumbnail.ts
|
|
2845
|
-
function
|
|
2864
|
+
function rs(e) {
|
|
2846
2865
|
if (!e) return {
|
|
2847
2866
|
platform: "unknown",
|
|
2848
2867
|
videoId: null,
|
|
@@ -2874,24 +2893,24 @@ function Qo(e) {
|
|
|
2874
2893
|
thumbnailUrl: null
|
|
2875
2894
|
};
|
|
2876
2895
|
}
|
|
2877
|
-
function
|
|
2878
|
-
return t ||
|
|
2896
|
+
function is(e, t) {
|
|
2897
|
+
return t || rs(e).thumbnailUrl;
|
|
2879
2898
|
}
|
|
2880
2899
|
// src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2881
|
-
var
|
|
2900
|
+
var as = ["src", "alt"], os = {
|
|
2882
2901
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2883
2902
|
style: { opacity: "0.7" }
|
|
2884
|
-
},
|
|
2903
|
+
}, ss = ["href"], cs = ["src", "alt"], ls = ["src", "alt"], us = {
|
|
2885
2904
|
key: 3,
|
|
2886
2905
|
class: "tpl:flex tpl:box-border 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)]"
|
|
2887
|
-
},
|
|
2906
|
+
}, ds = /* @__PURE__ */ o({
|
|
2888
2907
|
__name: "VideoBlock",
|
|
2889
2908
|
props: {
|
|
2890
2909
|
block: {},
|
|
2891
2910
|
viewport: {}
|
|
2892
2911
|
},
|
|
2893
2912
|
setup(e) {
|
|
2894
|
-
let t = e, { t: n } = G(), { syntax: r } = K(), i = I(() =>
|
|
2913
|
+
let t = e, { t: n } = G(), { syntax: r } = K(), i = I(() => Ae(t.block.url, r) || Ae(t.block.thumbnailUrl, r)), a = Pn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Pn(() => i.value ? t.block.placeholderUrl : void 0), s = I(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : is(t.block.url)), l = I(() => ({ textAlign: t.block.align })), u = I(() => {
|
|
2895
2914
|
let e = t.block.align;
|
|
2896
2915
|
return {
|
|
2897
2916
|
maxWidth: "100%",
|
|
@@ -2901,7 +2920,7 @@ var es = ["src", "alt"], ts = {
|
|
|
2901
2920
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2902
2921
|
marginRight: e === "center" ? "auto" : void 0
|
|
2903
2922
|
};
|
|
2904
|
-
}), d = I(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = I(() =>
|
|
2923
|
+
}), d = I(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = I(() => Ae(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
2905
2924
|
return (t, r) => (c(), w("div", {
|
|
2906
2925
|
class: "tpl:w-full",
|
|
2907
2926
|
style: L(l.value)
|
|
@@ -2914,16 +2933,16 @@ var es = ["src", "alt"], ts = {
|
|
|
2914
2933
|
src: D(o),
|
|
2915
2934
|
alt: e.block.alt,
|
|
2916
2935
|
style: L(d.value)
|
|
2917
|
-
}, null, 12,
|
|
2936
|
+
}, null, 12, as), W(ns)], 4)) : i.value ? (c(), w("div", {
|
|
2918
2937
|
key: 1,
|
|
2919
2938
|
class: "tpl:relative tpl:!flex tpl:box-border 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)]",
|
|
2920
2939
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
2921
|
-
}, [W(D(
|
|
2940
|
+
}, [W(D(mr), {
|
|
2922
2941
|
size: 36,
|
|
2923
2942
|
"stroke-width": 1.5,
|
|
2924
2943
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2925
2944
|
style: { opacity: "0.5" }
|
|
2926
|
-
}), N("span",
|
|
2945
|
+
}), N("span", os, [W($i, { text: f.value }, null, 8, ["text"])])], 4)) : s.value ? (c(), w(U, { key: 2 }, [e.block.url ? (c(), w("a", {
|
|
2927
2946
|
key: 0,
|
|
2928
2947
|
href: e.block.url,
|
|
2929
2948
|
target: "_blank",
|
|
@@ -2936,7 +2955,7 @@ var es = ["src", "alt"], ts = {
|
|
|
2936
2955
|
src: s.value,
|
|
2937
2956
|
alt: e.block.alt,
|
|
2938
2957
|
style: L(d.value)
|
|
2939
|
-
}, null, 12,
|
|
2958
|
+
}, null, 12, cs), W(ns, { "hover-effect": "" })], 12, ss)) : (c(), w("div", {
|
|
2940
2959
|
key: 1,
|
|
2941
2960
|
class: "tpl:relative tpl:inline-block",
|
|
2942
2961
|
style: L(u.value)
|
|
@@ -2945,53 +2964,53 @@ var es = ["src", "alt"], ts = {
|
|
|
2945
2964
|
src: s.value,
|
|
2946
2965
|
alt: e.block.alt,
|
|
2947
2966
|
style: L(d.value)
|
|
2948
|
-
}, null, 12,
|
|
2967
|
+
}, null, 12, ls), W(ns)], 4))], 64)) : (c(), w("div", us, [W(D(mr), {
|
|
2949
2968
|
size: 40,
|
|
2950
2969
|
"stroke-width": 1.5,
|
|
2951
2970
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
2952
2971
|
}), N("span", null, P(D(n).video.addVideo), 1)]))], 4));
|
|
2953
2972
|
}
|
|
2954
|
-
}),
|
|
2955
|
-
section:
|
|
2956
|
-
title:
|
|
2957
|
-
paragraph:
|
|
2958
|
-
image:
|
|
2959
|
-
button:
|
|
2960
|
-
divider:
|
|
2961
|
-
video:
|
|
2962
|
-
social:
|
|
2963
|
-
menu:
|
|
2964
|
-
table:
|
|
2965
|
-
spacer:
|
|
2966
|
-
html:
|
|
2973
|
+
}), fs = {
|
|
2974
|
+
section: Fo,
|
|
2975
|
+
title: wo,
|
|
2976
|
+
paragraph: Ba,
|
|
2977
|
+
image: Na,
|
|
2978
|
+
button: ta,
|
|
2979
|
+
divider: ha,
|
|
2980
|
+
video: ds,
|
|
2981
|
+
social: Ko,
|
|
2982
|
+
menu: La,
|
|
2983
|
+
table: ts,
|
|
2984
|
+
spacer: Yo,
|
|
2985
|
+
html: xa,
|
|
2967
2986
|
countdown: b(() => import("./CountdownBlock--hlKE2aj.js"))
|
|
2968
2987
|
};
|
|
2969
|
-
function
|
|
2970
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = G(i), c = I(() =>
|
|
2988
|
+
function ps(t) {
|
|
2989
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = G(i), c = I(() => Ue(Ue(Ue(ui(i), Ai(n.content.value.settings?.locale)), He(n.content.value.settings) === "rtl" ? {
|
|
2971
2990
|
title: { textAlign: "right" },
|
|
2972
2991
|
table: { textAlign: "right" }
|
|
2973
2992
|
} : {}), r.blockDefaults ?? {}));
|
|
2974
2993
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
2975
|
-
let { resolvedTheme: l } =
|
|
2994
|
+
let { resolvedTheme: l } = ti(I(() => n.state.uiTheme)), f = H(r.theme ?? {}), { themeStyles: p } = Pr({
|
|
2976
2995
|
themeOverrides: f,
|
|
2977
2996
|
resolvedTheme: l,
|
|
2978
2997
|
extraStyles: () => ({
|
|
2979
2998
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
2980
2999
|
...t.themeExtraStyles?.()
|
|
2981
3000
|
})
|
|
2982
|
-
}), m = t.history ??
|
|
3001
|
+
}), m = t.history ?? On({
|
|
2983
3002
|
content: n.content,
|
|
2984
3003
|
setContent: (e, t) => n.setContent(e, t)
|
|
2985
3004
|
});
|
|
2986
|
-
t.history ? n.contentReplaced && u(n.contentReplaced, () => m.clear(), { flush: "sync" }) :
|
|
2987
|
-
let h =
|
|
3005
|
+
t.history ? n.contentReplaced && u(n.contentReplaced, () => m.clear(), { flush: "sync" }) : Mn(n, m);
|
|
3006
|
+
let h = qn({
|
|
2988
3007
|
addBlock: n.addBlock,
|
|
2989
3008
|
removeBlock: n.removeBlock,
|
|
2990
3009
|
updateBlock: n.updateBlock,
|
|
2991
3010
|
selectBlock: n.selectBlock,
|
|
2992
3011
|
findBlockLocation: n.findBlockLocation,
|
|
2993
3012
|
blockDefaults: () => c.value
|
|
2994
|
-
}), g =
|
|
3013
|
+
}), g = jn(n), _ = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? Nn({
|
|
2995
3014
|
content: n.content,
|
|
2996
3015
|
isDirty: () => n.state.isDirty,
|
|
2997
3016
|
...t.autoSaveOptions
|
|
@@ -2999,27 +3018,27 @@ function cs(t) {
|
|
|
2999
3018
|
_ && (y = u(m.isNavigating, (e) => {
|
|
3000
3019
|
e ? _.pause() : _.resume();
|
|
3001
3020
|
}));
|
|
3002
|
-
let b =
|
|
3021
|
+
let b = ei(n, {
|
|
3003
3022
|
t: o,
|
|
3004
3023
|
format: s
|
|
3005
|
-
}, r.customBlocks ?? []), x =
|
|
3024
|
+
}, r.customBlocks ?? []), x = vt(r.colors);
|
|
3006
3025
|
if (x.allowCustomIgnored && $.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), x.invalidPresets.length > 0 && $.warn(`config.colors.presets skipped invalid entries: ${x.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), x.allowCustom === !1) {
|
|
3007
|
-
let e =
|
|
3026
|
+
let e = li(x.presets, r.blockDefaults, r.templateDefaults);
|
|
3008
3027
|
e.length > 0 && $.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
|
|
3009
3028
|
}
|
|
3010
|
-
let S =
|
|
3011
|
-
for (let e of S.unknown) $.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${
|
|
3012
|
-
let w =
|
|
3013
|
-
|
|
3029
|
+
let S = Jn(r.templateSettings);
|
|
3030
|
+
for (let e of S.unknown) $.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${Yn.join(", ")}) — skipping it.`);
|
|
3031
|
+
let w = Or();
|
|
3032
|
+
oi(w, fs);
|
|
3014
3033
|
let T = /* @__PURE__ */ new Set();
|
|
3015
3034
|
function E(e) {
|
|
3016
3035
|
for (let t of e) {
|
|
3017
|
-
w.registerCustom(t,
|
|
3018
|
-
for (let e of
|
|
3036
|
+
w.registerCustom(t, pa);
|
|
3037
|
+
for (let e of ji(t, x)) T.has(e.id) || (T.add(e.id), $.warn(e.message));
|
|
3019
3038
|
}
|
|
3020
3039
|
}
|
|
3021
3040
|
r.customBlocks?.length && E(r.customBlocks);
|
|
3022
|
-
let D =
|
|
3041
|
+
let D = Gr();
|
|
3023
3042
|
if (C() && v(D.dispose), t.containerEl) {
|
|
3024
3043
|
let n = t.containerEl;
|
|
3025
3044
|
e(document, "pointerdown", (e) => {
|
|
@@ -3032,7 +3051,7 @@ function cs(t) {
|
|
|
3032
3051
|
e ? e.save() : _?.flush();
|
|
3033
3052
|
}
|
|
3034
3053
|
function ee(e) {
|
|
3035
|
-
D.isActive() &&
|
|
3054
|
+
D.isActive() && Ni(e, {
|
|
3036
3055
|
history: m,
|
|
3037
3056
|
selectBlock: (e) => n.selectBlock(e),
|
|
3038
3057
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -3045,45 +3064,45 @@ function cs(t) {
|
|
|
3045
3064
|
}
|
|
3046
3065
|
e(document, "keydown", ee);
|
|
3047
3066
|
let k = H(null), A = t.editorRoot ?? document;
|
|
3048
|
-
d(
|
|
3049
|
-
let j =
|
|
3067
|
+
d(Tn, A), d(hn, k), d(Dt, /* @__PURE__ */ new Map()), d(Xt, i), d(Sn, n), d(wn, m), d(vn, h), d(dn, g), d(Zt, a), d(on, p), d($t, l), d(Qt, c), d(yn, r.locale), d(ln, w), d(rn, r.customBlocks ?? []), d(Nt, r.paletteBlocks), d(Bt, si(r.htmlBlockPreview)), d(Vt, r.layout), d(Ct, r.sectionWrapper), d(mn, x), d(_n, S.fields), d(nn, ni(n.content, w));
|
|
3068
|
+
let j = st(r.mergeTags?.syntax);
|
|
3050
3069
|
for (let e of ["opener", "closer"]) {
|
|
3051
3070
|
let t = j[e];
|
|
3052
3071
|
typeof t == "string" && t.trim() === "" && $.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
3053
3072
|
}
|
|
3054
|
-
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" &&
|
|
3073
|
+
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && Me(j) === null && $.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
3055
3074
|
let M = R(r.mergeTags?.tags ?? []);
|
|
3056
3075
|
function N(e) {
|
|
3057
3076
|
Array.isArray(e) ? M.value = e : $.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
3058
3077
|
}
|
|
3059
|
-
d(
|
|
3060
|
-
let P = H(
|
|
3061
|
-
d(
|
|
3062
|
-
let F =
|
|
3078
|
+
d(Rt, M), d(Tt, j), d(kt, r.mergeTags?.onRequest ?? null), d(Ot, r.mergeTags?.autocomplete !== !1), d(En, r.mergeTags?.showRawValue !== !1);
|
|
3079
|
+
let P = H(je(r.mergeTags?.tags ?? []));
|
|
3080
|
+
d(zt, P);
|
|
3081
|
+
let F = Jr({
|
|
3063
3082
|
resolvePreview: r.resolvePreview,
|
|
3064
3083
|
surface: "preview",
|
|
3065
3084
|
getContent: () => {
|
|
3066
3085
|
let e = n.content.value;
|
|
3067
3086
|
if (!n.state.previewMode) return e;
|
|
3068
|
-
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i =
|
|
3069
|
-
return r.layout ?
|
|
3087
|
+
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i = We(e, t);
|
|
3088
|
+
return r.layout ? rt(We(r.layout, t, { missing: "default" }), i) : i;
|
|
3070
3089
|
},
|
|
3071
3090
|
isActive: () => n.state.previewMode,
|
|
3072
3091
|
getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
|
|
3073
3092
|
});
|
|
3074
|
-
d(
|
|
3093
|
+
d(Mt, F), d(qt, r.resolvePreview);
|
|
3075
3094
|
let L = null;
|
|
3076
|
-
d(
|
|
3095
|
+
d(Gt, (e) => (L = e, () => {
|
|
3077
3096
|
L === e && (L = null);
|
|
3078
3097
|
}));
|
|
3079
3098
|
let z = () => (L ?? F.refresh)(), B = I(() => !(n.state.previewMode && F.isConfigured));
|
|
3080
|
-
d(
|
|
3081
|
-
let V =
|
|
3082
|
-
d(
|
|
3083
|
-
let U =
|
|
3099
|
+
d(Yt, B);
|
|
3100
|
+
let V = Yr();
|
|
3101
|
+
d(jt, V), d(Pt, H(!1)), d(It, H(!1)), d(sn, r.logicTags?.tags ?? []), d(wt, r.logicTags?.pairs ?? []), d(Ht, r.logicTags?.onRequest ?? null), d(Ft, Xr()), d(Wt, r.onRequestMedia ?? null), d(bn, r.canDropMedia ?? null), d(Et, r.resolveImageUrl ? Gn(r.resolveImageUrl) : null), r.displayConditions?.onRequest && (r.displayConditions.conditions !== void 0 || r.displayConditions.allowCustom !== void 0) && $.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), d(Jt, r.displayConditions?.conditions ?? []), d(gn, r.displayConditions?.allowCustom ?? !1), d(At, r.displayConditions?.onRequest ?? null), d(en, t.capabilities ?? {}), d(Cn, b);
|
|
3102
|
+
let U = Zr(r.lint) ? null : $r({
|
|
3084
3103
|
content: n.content,
|
|
3085
3104
|
get options() {
|
|
3086
|
-
return
|
|
3105
|
+
return Kr({
|
|
3087
3106
|
...r,
|
|
3088
3107
|
content: n.content.value,
|
|
3089
3108
|
contentLocale: n.activeLocale?.value ?? void 0
|
|
@@ -3095,7 +3114,7 @@ function cs(t) {
|
|
|
3095
3114
|
updateSettings: n.updateSettings,
|
|
3096
3115
|
removeBlock: n.removeBlock
|
|
3097
3116
|
});
|
|
3098
|
-
d(
|
|
3117
|
+
d(fn, U);
|
|
3099
3118
|
function W() {
|
|
3100
3119
|
y?.(), U?.destroy(), _?.destroy(), m.destroy();
|
|
3101
3120
|
}
|
|
@@ -3126,14 +3145,14 @@ function cs(t) {
|
|
|
3126
3145
|
};
|
|
3127
3146
|
}
|
|
3128
3147
|
// src/composables/useSmallScreenNotice.ts
|
|
3129
|
-
var
|
|
3130
|
-
function
|
|
3131
|
-
let n = t(
|
|
3148
|
+
var ms = "(max-width: 767px)";
|
|
3149
|
+
function hs(e) {
|
|
3150
|
+
let n = t(ms);
|
|
3132
3151
|
return {
|
|
3133
3152
|
isSmallScreen: n,
|
|
3134
3153
|
showNotice: I(() => (F(e) ?? !0) && n.value)
|
|
3135
3154
|
};
|
|
3136
3155
|
}
|
|
3137
|
-
export {
|
|
3156
|
+
export { Ei as A, Mr as B, Yi as C, Zi as D, Pi as E, xi as F, Er as H, Jr as I, Kr as L, wi as M, Ci as N, Fi as O, Si as P, Vr as R, Bi as S, Gi as T, Dr as V, ha as _, Yo as a, ta as b, To as c, So as d, Va as f, xa as g, Na as h, ts as i, Ti as j, vi as k, Oo as l, La as m, ps as n, Ko as o, Ba as p, ds as r, Fo as s, hs as t, wo as u, pa as v, Wi as w, Li as x, ia as y, zr as z };
|
|
3138
3157
|
|
|
3139
|
-
//# sourceMappingURL=composables-
|
|
3158
|
+
//# sourceMappingURL=composables-BJBr8B4t.js.map
|