@templatical/editor 0.37.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-tu4eLcf_.js → AiChatSidebar-jVlXXND3.js} +66 -66
- package/dist/{AiFeatureMenu-BF0i0vA4.js → AiFeatureMenu-C1HCntyQ.js} +6 -6
- package/dist/{BlockIssueBadge-DT-FqKeC.js → BlockIssueBadge-JhNgcUmZ.js} +4 -4
- package/dist/{BlockPreviewCanvas-DDCmMram.js → BlockPreviewCanvas-C_rA5LJN.js} +2 -2
- package/dist/{CloudHeaderExtras-NPhudovT.js → CloudHeaderExtras-DvYyNsPB.js} +3 -3
- package/dist/{CloudPanels-Iwnky0iA.js → CloudPanels-CDPhPVdd.js} +5 -5
- package/dist/{CollaboratorBar-DAITu0hz.js → CollaboratorBar-Co9UPoB0.js} +3 -3
- package/dist/{ColorPicker-BqlZ_TqG.js → ColorPicker-BTtN94te.js} +6 -6
- package/dist/{CommentsPanel-CDvgmWP1.js → CommentsPanel-CRcVN9Ri.js} +1 -1
- package/dist/{CommentsSidebar-X_xqM3dR.js → CommentsSidebar-gDU977br.js} +12 -12
- package/dist/{CountdownBlock-ZFJIdbP6.js → CountdownBlock-CEzrfe5R.js} +1 -1
- package/dist/{CountdownToolbar-DBFoG3a6.js → CountdownToolbar-B00zhkNJ.js} +2 -2
- package/dist/{DesignReferenceSidebar--QtXjLrw.js → DesignReferenceSidebar-DedivZZl.js} +7 -7
- package/dist/{IssuesPanel-BLbNFMSX.js → IssuesPanel-C-PjdmAV.js} +7 -7
- package/dist/{MediaPanels-CMTAhDXB.js → MediaPanels-BpQNY8YX.js} +1 -1
- package/dist/{MergeTagInput-BEjzj4Iu.js → MergeTagInput-Cw1RoMly.js} +201 -149
- package/dist/{MergeTagModeToggle-DKN6ihI5.js → MergeTagModeToggle-DGuzSAdX.js} +35 -35
- package/dist/{MergeTagSuggestion-DKoLEeoj.js → MergeTagSuggestion-BXO3UIXW.js} +2 -2
- package/dist/{ParagraphEditor-1E9yzOfk.js → ParagraphEditor-jMKLLTa8.js} +38 -38
- package/dist/{RestoreVersionDialog-BMGUkcd8.js → RestoreVersionDialog-DG1jUdBM.js} +4 -4
- package/dist/{RichTextEditorContent-BnxbQUV9.js → RichTextEditorContent-JrNEg0kv.js} +8 -8
- package/dist/{SaveBlockDialog-WKASpCCT.js → SaveBlockDialog-C0KC-OKs.js} +8 -8
- package/dist/{SavedBlocksBrowserModal-AYEXTMtQ.js → SavedBlocksBrowserModal-zyOiRgWZ.js} +10 -10
- package/dist/{SavedBlocksPanels-D_CpacTl.js → SavedBlocksPanels-epMd799w.js} +1 -1
- package/dist/{SavedBlocksPickBar-BHMwg-1G.js → SavedBlocksPickBar-CJqqQ3jd.js} +3 -3
- package/dist/{TemplateScoringPanel-CSin43YM.js → TemplateScoringPanel-m2FOeaai.js} +103 -103
- package/dist/{TestEmailModal-BxizsRCd.js → TestEmailModal-D58kYkMV.js} +54 -54
- package/dist/{TestEmailPanel-vd2e5HzT.js → TestEmailPanel-BmFVBIQt.js} +1 -1
- package/dist/{TitleEditor-CLJ68Ty4.js → TitleEditor-C4BGPXnf.js} +13 -13
- package/dist/{TplModal-Q9fDgS1M.js → TplModal-BIDJw4Kj.js} +3 -3
- package/dist/{VersionHistoryMenu-eGYVhM4H.js → VersionHistoryMenu-dt_aZQfh.js} +7 -7
- package/dist/{VersionHistoryPanels-C7Ntrrfq.js → VersionHistoryPanels-B_5SBRrr.js} +1 -1
- package/dist/{VersionPreviewBanner-BbQXnR0M.js → VersionPreviewBanner-DttvOkwd.js} +2 -2
- package/dist/{blockTypeIcons-5qD4bB76.js → blockTypeIcons-CzTizYmK.js} +2 -2
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-D9S-UCfZ.js → ca-YlPDhElv.js} +5 -3
- package/dist/cdn/chunks/{AiChatSidebar-dyqqHAcI.js → AiChatSidebar-DeZl9Tk0.js} +54 -54
- package/dist/cdn/chunks/AiChatSidebar-DeZl9Tk0.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu-BjVMwhW8.js → AiFeatureMenu-Bv8jMu9p.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-BjVMwhW8.js.map → AiFeatureMenu-Bv8jMu9p.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BJ__oEtm.js → BlockIssueBadge-B6PpoOPv.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-BJ__oEtm.js.map → BlockIssueBadge-B6PpoOPv.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-B5f26eLE.js → BlockPreviewCanvas-DfEtDosD.js} +3 -3
- package/dist/cdn/chunks/{BlockPreviewCanvas-B5f26eLE.js.map → BlockPreviewCanvas-DfEtDosD.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-D5P5IEKA.js → CloudHeaderExtras-Hk98ub-C.js} +4 -4
- package/dist/cdn/chunks/{CloudHeaderExtras-D5P5IEKA.js.map → CloudHeaderExtras-Hk98ub-C.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DkmR05nB.js → CloudPanels-Ba3GLmvF.js} +5 -5
- package/dist/cdn/chunks/{CloudPanels-DkmR05nB.js.map → CloudPanels-Ba3GLmvF.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-Yn7KSpt4.js → CollaboratorBar-D2dCQ9gg.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-Yn7KSpt4.js.map → CollaboratorBar-D2dCQ9gg.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-LcrzgMoW.js → ColorPicker-BaonTCAQ.js} +7 -7
- package/dist/cdn/chunks/{ColorPicker-LcrzgMoW.js.map → ColorPicker-BaonTCAQ.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CntwwocI.js → CommentsPanel-CV2HveQk.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-CntwwocI.js.map → CommentsPanel-CV2HveQk.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-BLDKnKy7.js → CommentsSidebar-Dok_vaRc.js} +4 -4
- package/dist/cdn/chunks/{CommentsSidebar-BLDKnKy7.js.map → CommentsSidebar-Dok_vaRc.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-B4AfqJwb.js → CountdownBlock-DGDl3ota.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-B4AfqJwb.js.map → CountdownBlock-DGDl3ota.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CA1dpuOI.js → CountdownToolbar-B9Rin64t.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-CA1dpuOI.js.map → CountdownToolbar-B9Rin64t.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-D1Y9Hswe.js → DesignReferenceSidebar-eCuTFak2.js} +4 -4
- package/dist/cdn/chunks/{DesignReferenceSidebar-D1Y9Hswe.js.map → DesignReferenceSidebar-eCuTFak2.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-Q62LTqvd.js → IssuesPanel-CP7FEzw7.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-Q62LTqvd.js.map → IssuesPanel-CP7FEzw7.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-D21M6shx.js → MediaPanels-TYrKKHX5.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-D21M6shx.js.map → MediaPanels-TYrKKHX5.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagInput-CSIThqkz.js +470 -0
- package/dist/cdn/chunks/MergeTagInput-CSIThqkz.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagModeToggle-DYxkAGtA.js → MergeTagModeToggle-QGTUIWWo.js} +32 -32
- package/dist/cdn/chunks/{MergeTagModeToggle-DYxkAGtA.js.map → MergeTagModeToggle-QGTUIWWo.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-t8Uj00Er.js → MergeTagSuggestion-CY6WK8Eb.js} +3 -3
- package/dist/cdn/chunks/MergeTagSuggestion-CY6WK8Eb.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-Bd-GQXee.js → ParagraphEditor-D1tsPv4v.js} +22 -22
- package/dist/cdn/chunks/{ParagraphEditor-Bd-GQXee.js.map → ParagraphEditor-D1tsPv4v.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-2X9RpM9A.js → RestoreVersionDialog-BeCxNPLS.js} +4 -4
- package/dist/cdn/chunks/{RestoreVersionDialog-2X9RpM9A.js.map → RestoreVersionDialog-BeCxNPLS.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-D_rb0rmU.js → RichTextEditorContent-BBxzACFQ.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-D_rb0rmU.js.map → RichTextEditorContent-BBxzACFQ.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CufdTomT.js → SaveBlockDialog-CLgh_g7H.js} +7 -7
- package/dist/cdn/chunks/{SaveBlockDialog-CufdTomT.js.map → SaveBlockDialog-CLgh_g7H.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CqpaNsk7.js → SavedBlocksBrowserModal-B4TcUJJe.js} +8 -8
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CqpaNsk7.js.map → SavedBlocksBrowserModal-B4TcUJJe.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-DpxYxddo.js → SavedBlocksPanels-CaBsHoRC.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-DpxYxddo.js.map → SavedBlocksPanels-CaBsHoRC.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-Drpoav1B.js → SavedBlocksPickBar-iG35XCDx.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksPickBar-Drpoav1B.js.map → SavedBlocksPickBar-iG35XCDx.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-DBjUNULq.js → TemplateScoringPanel-DuQJBykq.js} +86 -86
- package/dist/cdn/chunks/TemplateScoringPanel-DuQJBykq.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-BTNlSW6f.js → TestEmailModal-D6Woss3r.js} +52 -52
- package/dist/cdn/chunks/TestEmailModal-D6Woss3r.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-D0A9Zgxr.js → TestEmailPanel-CWQFB7J3.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-D0A9Zgxr.js.map → TestEmailPanel-CWQFB7J3.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CrnuIq62.js → TitleEditor-CbY1tgSl.js} +12 -12
- package/dist/cdn/chunks/TitleEditor-CbY1tgSl.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-DYXrTz42.js → TplModal-CGpp-d_r.js} +4 -4
- package/dist/cdn/chunks/{TplModal-DYXrTz42.js.map → TplModal-CGpp-d_r.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-bDGnE4hb.js → VersionHistoryMenu-ByVJXDbK.js} +4 -4
- package/dist/cdn/chunks/{VersionHistoryMenu-bDGnE4hb.js.map → VersionHistoryMenu-ByVJXDbK.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-82P0Q0HM.js → VersionHistoryPanels-CQJ5OggF.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-82P0Q0HM.js.map → VersionHistoryPanels-CQJ5OggF.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BJiwKkVC.js → VersionPreviewBanner-G4lLbfr8.js} +3 -3
- package/dist/cdn/chunks/{VersionPreviewBanner-BJiwKkVC.js.map → VersionPreviewBanner-G4lLbfr8.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CNjJSFun.js → blockTypeIcons-CQY-vxdM.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-CNjJSFun.js.map → blockTypeIcons-CQY-vxdM.js.map} +1 -1
- package/dist/{ca-D9S-UCfZ.js → cdn/chunks/ca-YlPDhElv.js} +7 -1
- package/dist/cdn/chunks/{ca-D9S-UCfZ.js.map → ca-YlPDhElv.js.map} +1 -1
- package/dist/cdn/chunks/cloud-BLgCKP7Z.js.map +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-U-qCH-dq.js → createCloudRuntime-ClvtMBF1.js} +2 -2
- package/dist/cdn/chunks/{createCloudRuntime-U-qCH-dq.js.map → createCloudRuntime-ClvtMBF1.js.map} +1 -1
- package/dist/cdn/chunks/{de-BUPszLpi.js → de-CONjnzrF.js} +6 -2
- package/dist/cdn/chunks/{de-BUPszLpi.js.map → de-CONjnzrF.js.map} +1 -1
- package/dist/cdn/chunks/draggable-kbOhCgnk.js.map +1 -1
- package/dist/cdn/chunks/{editor-modal-MXgtarMl.js → editor-modal-B6IdQWlf.js} +3 -3
- package/dist/cdn/chunks/{editor-modal-MXgtarMl.js.map → editor-modal-B6IdQWlf.js.map} +1 -1
- package/dist/cdn/chunks/{en-BbOC5x3w.js → en-BAMooiOF.js} +6 -2
- package/dist/cdn/chunks/{en-BbOC5x3w.js.map → en-BAMooiOF.js.map} +1 -1
- package/dist/cdn/chunks/en-DjunooBz.js +2 -0
- package/dist/{es-0bCDcT9p.js → cdn/chunks/es-I47lHs2m.js} +7 -1
- package/dist/cdn/chunks/{es-0bCDcT9p.js.map → es-I47lHs2m.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-B8_jnIkD.js → extensions-D2YIhF7u.js} +126 -101
- package/dist/cdn/chunks/extensions-D2YIhF7u.js.map +1 -0
- package/dist/cdn/chunks/{fr-Brr8mJ9e.js → fr-B8MIKjT4.js} +6 -2
- package/dist/cdn/chunks/{fr-Brr8mJ9e.js.map → fr-B8MIKjT4.js.map} +1 -1
- package/dist/cdn/chunks/htmlparser-ClUZ6waR.js +1113 -0
- package/dist/cdn/chunks/htmlparser-ClUZ6waR.js.map +1 -0
- package/dist/cdn/chunks/{icons-BUlqGSgd.js → icons-DdrAicM2.js} +33 -33
- package/dist/cdn/chunks/{icons-BUlqGSgd.js.map → icons-DdrAicM2.js.map} +1 -1
- package/dist/cdn/chunks/keys-DXYJTLZF.js +12 -0
- package/dist/cdn/chunks/keys-DXYJTLZF.js.map +1 -0
- package/dist/{nl-Co3_RL0M.js → cdn/chunks/nl-CBLxcb-0.js} +7 -1
- package/dist/cdn/chunks/{nl-Co3_RL0M.js.map → nl-CBLxcb-0.js.map} +1 -1
- package/dist/{pt-BR-BECez5b0.js → cdn/chunks/pt-BR-CMSRfX7t.js} +7 -1
- package/dist/cdn/chunks/{pt-BR-BECez5b0.js.map → pt-BR-CMSRfX7t.js.map} +1 -1
- package/dist/cdn/chunks/{src-CUvZWL6Y.js → src-CaNsA_WX.js} +2 -2
- package/dist/cdn/chunks/{src-CUvZWL6Y.js.map → src-CaNsA_WX.js.map} +1 -1
- package/dist/cdn/chunks/src-Dwgq7hf4.js.map +1 -1
- package/dist/cdn/chunks/{src-Ozknnj-v.js → src-fn7uy1FD.js} +3 -3
- package/dist/cdn/chunks/{src-Ozknnj-v.js.map → src-fn7uy1FD.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-DSWSGj-A.js → useCloudI18n-OezCj0cx.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-DSWSGj-A.js.map → useCloudI18n-OezCj0cx.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-Cs7rYVBo.js → useEditorCore-06PtcUi1.js} +482 -473
- package/dist/cdn/chunks/useEditorCore-06PtcUi1.js.map +1 -0
- package/dist/cdn/chunks/{useEditorRoot-B0zW2nT4.js → useEditorRoot-ByHPMqYT.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-B0zW2nT4.js.map → useEditorRoot-ByHPMqYT.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-Dlo7R9RA.js → useI18n-BhE7ndNr.js} +2 -2
- package/dist/cdn/chunks/{useI18n-Dlo7R9RA.js.map → useI18n-BhE7ndNr.js.map} +1 -1
- package/dist/cdn/chunks/useMergeTag-DE2mpy1w.js +60 -0
- package/dist/cdn/chunks/useMergeTag-DE2mpy1w.js.map +1 -0
- package/dist/cdn/chunks/{usePopoverPosition-ElP3ABaV.js → usePopoverPosition-BPL891uG.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-ElP3ABaV.js.map → usePopoverPosition-BPL891uG.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-nTbWkgaU.js → useScrollToBlock-DwF4pVur.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-nTbWkgaU.js.map → useScrollToBlock-DwF4pVur.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +894 -857
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-DWtkBzBU.js → check-9xX6RVHz.js} +1 -1
- package/dist/{chevron-down-C-Fjxcqj.js → chevron-down-J5hFJ6TL.js} +1 -1
- package/dist/{chevron-right-SOkn2d4P.js → chevron-right-BJuo5PQ-.js} +1 -1
- package/dist/{chevron-up-lntU1ypp.js → chevron-up-Qfi5k52_.js} +1 -1
- package/dist/{circle-alert-CjzUTwy3.js → circle-alert-BiArYmkB.js} +1 -1
- package/dist/{clock-pB2QKPsJ.js → clock-BkYJZ7Y0.js} +1 -1
- package/dist/{copy-CId1E038.js → copy-BRLUNHwF.js} +1 -1
- package/dist/{createCloudRuntime-x5WZm3p8.js → createCloudRuntime-CNFXaTNQ.js} +1 -1
- package/dist/{createLucideIcon-Cwf_nTzE.js → createLucideIcon-CDDkF1Tm.js} +5 -5
- package/dist/{de-BUPszLpi.js → de-CONjnzrF.js} +5 -1
- package/dist/{editor-modal-B_LaQf0s.js → editor-modal-uAEB6xKz.js} +15 -15
- package/dist/{en-BbOC5x3w.js → en-BAMooiOF.js} +5 -1
- package/dist/en-CQWkDCpm.js +2 -0
- package/dist/{cdn/chunks/es-0bCDcT9p.js → es-I47lHs2m.js} +5 -3
- package/dist/{extensions-CHOBZRab.js → extensions-CcGj7OfS.js} +129 -104
- package/dist/{eye-BuGtFUoJ.js → eye-DwhBOaV8.js} +1 -1
- package/dist/{fr-Brr8mJ9e.js → fr-B8MIKjT4.js} +5 -1
- package/dist/{image-up-gH4JEpU5.js → image-up-CiyQNZBt.js} +1 -1
- package/dist/index.d.ts +15 -0
- package/dist/{info-BQ60P82u.js → info-D6A1qEiF.js} +1 -1
- package/dist/keys-DD1rl72F.js +10 -0
- package/dist/{link-3R8it3J7.js → link-tKGmYWsB.js} +1 -1
- package/dist/{list-Ccdgj46T.js → list-DjZQRpeI.js} +1 -1
- package/dist/{loader-circle-B_tAD4k6.js → loader-circle-D9ZL3Sv0.js} +1 -1
- package/dist/{message-circle-P-KSc6V0.js → message-circle-KTHxCcpB.js} +1 -1
- package/dist/{cdn/chunks/nl-Co3_RL0M.js → nl-CBLxcb-0.js} +5 -3
- package/dist/{pencil-9ZiwqS4r.js → pencil-Bq-nbQ7F.js} +1 -1
- package/dist/{plus-BwJEzCaO.js → plus-CRMnR4IG.js} +1 -1
- package/dist/{cdn/chunks/pt-BR-BECez5b0.js → pt-BR-CMSRfX7t.js} +5 -3
- package/dist/{refresh-cw-DEgfb2FK.js → refresh-cw-D7bYS5tm.js} +1 -1
- package/dist/{search-DqQ8Li5E.js → search-DUo0YwPz.js} +1 -1
- package/dist/{send-CE6uvqop.js → send-DaVMQphu.js} +1 -1
- package/dist/{shield-check-DhD1Z3rd.js → shield-check-DxaaurL9.js} +1 -1
- package/dist/{sparkles-R0ZQHa6F.js → sparkles-D6T6k30e.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +1156 -1119
- package/dist/{text-align-start-DSux2UNn.js → text-align-start-vreFpmCX.js} +1 -1
- package/dist/{trash-Cf_SqsER.js → trash-DBv8MGY6.js} +1 -1
- package/dist/{triangle-alert-C6tGa6jw.js → triangle-alert-CmNS2LLv.js} +1 -1
- package/dist/{upload-DusKjpVr.js → upload-DDB9Fs0P.js} +1 -1
- package/dist/{useCloudI18n-BLyh_e2T.js → useCloudI18n-C1wuXik6.js} +1 -1
- package/dist/{useEditorCore-DhlKOYwe.js → useEditorCore-jfwgLThK.js} +1077 -1068
- package/dist/{useEditorRoot-ds57-l6F.js → useEditorRoot-eVv4doqZ.js} +1 -1
- package/dist/{useI18n-BbdxxpOE.js → useI18n-VOtdfENx.js} +1 -1
- package/dist/useMergeTag-CQM9pFca.js +58 -0
- package/dist/{usePopoverPosition-CprM5p-c.js → usePopoverPosition-gZjRywai.js} +1 -1
- package/dist/{useScrollToBlock-BTFw0b9O.js → useScrollToBlock-C0Ehnyl4.js} +2 -2
- package/dist/{x-D_-42Ukq.js → x-B7sgO_z8.js} +1 -1
- package/package.json +10 -10
- package/dist/cdn/chunks/AiChatSidebar-dyqqHAcI.js.map +0 -1
- package/dist/cdn/chunks/MergeTagInput-l7paaAml.js +0 -419
- package/dist/cdn/chunks/MergeTagInput-l7paaAml.js.map +0 -1
- package/dist/cdn/chunks/MergeTagSuggestion-t8Uj00Er.js.map +0 -1
- package/dist/cdn/chunks/TemplateScoringPanel-DBjUNULq.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-BTNlSW6f.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-CrnuIq62.js.map +0 -1
- package/dist/cdn/chunks/en-C9U7N77n.js +0 -2
- package/dist/cdn/chunks/extensions-B8_jnIkD.js.map +0 -1
- package/dist/cdn/chunks/htmlparser-DTML8Gvz.js +0 -1007
- package/dist/cdn/chunks/htmlparser-DTML8Gvz.js.map +0 -1
- package/dist/cdn/chunks/keys-DBFhDFng.js +0 -12
- package/dist/cdn/chunks/keys-DBFhDFng.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-Cs7rYVBo.js.map +0 -1
- package/dist/cdn/chunks/useMergeTag-BYAifvh8.js +0 -46
- package/dist/cdn/chunks/useMergeTag-BYAifvh8.js.map +0 -1
- package/dist/en-DcmpWV53.js +0 -2
- package/dist/keys-DQA2i1k1.js +0 -10
- package/dist/useMergeTag-DlvOBW_B.js +0 -44
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { A as e, B as t, E as n, F as r, H as i, I as a, K as o, N as s, P as c, Q as l, R as u, S as d, U as f, W as p, X as m, Y as h, Z as g, at as _, b as v, c as y, ct as b, et as x, f as S, g as C, h as w, it as T, j as E, k as D, l as O, lt as k, m as A, ot as j, p as M, q as N, rt as P, s as F, t as I, u as L, ut as R, w as z, x as B, y as V } from "./draggable-kbOhCgnk.js";
|
|
2
|
-
import { A as H, B as ee, C as te, D as ne, E as re, F as ie, H as ae, I as oe, L as U, M as se, N as ce, O as le, P as ue, R as de, S as fe, T as pe, V as me, W as he, _ as ge, a as _e, b as ve, d as ye, f as be, g as xe, h as Se, i as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { a as
|
|
5
|
-
import { A as
|
|
2
|
+
import { A as H, B as ee, C as te, D as ne, E as re, F as ie, H as ae, I as oe, L as U, M as se, N as ce, O as le, P as ue, R as de, S as fe, T as pe, V as me, W as he, _ as ge, a as _e, b as ve, d as ye, f as be, g as xe, h as Se, i as Ce, it as we, j as Te, k as Ee, l as De, m as Oe, n as ke, nt as Ae, o as je, p as Me, r as Ne, rt as Pe, s as Fe, t as W, u as Ie, w as Le, z as Re } from "./src-Dwgq7hf4.js";
|
|
3
|
+
import { _ as ze, h as Be, v as Ve, y as He } from "./dist-BW6Y49zE.js";
|
|
4
|
+
import { a as G, c as Ue, i as We, r as Ge } from "./dist-CAFTQ6Y2.js";
|
|
5
|
+
import { A as Ke, B as qe, C as Je, D as K, E as Ye, F as Xe, G as Ze, I as Qe, J as $e, K as et, L as tt, M as nt, N as rt, O as it, P as at, R as ot, S as st, T as ct, V as lt, W as ut, X as q, Y as dt, Z as ft, _ as pt, a as mt, b as ht, c as gt, d as _t, f as vt, g as J, h as yt, j as bt, k as xt, l as St, m as Ct, n as wt, o as Tt, p as Et, q as Dt, r as Ot, s as kt, v as At, w as jt, x as Mt, y as Nt, z as Pt } from "./keys-DXYJTLZF.js";
|
|
6
6
|
import "./timeouts-DHPZQ0G3.js";
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { a as
|
|
10
|
-
import { A as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import "./useCloudI18n-
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
7
|
+
import { t as Y } from "./useI18n-BhE7ndNr.js";
|
|
8
|
+
import { t as X } from "./logger-ByvdoAwq.js";
|
|
9
|
+
import { a as Ft, i as It, o as Lt, r as Z, t as Rt } from "./usePopoverPosition-BPL891uG.js";
|
|
10
|
+
import { A as zt, Bt, Et as Vt, H as Ht, Ot as Ut, Tt as Wt, X as Gt, d as Kt, ft as qt, ht as Jt, it as Yt, o as Xt, s as Zt, tt as Qt, u as $t, v as en, vt as tn, zt as nn } from "./icons-DdrAicM2.js";
|
|
11
|
+
import { t as rn } from "./LoadingTrack-Cm3TDKb3.js";
|
|
12
|
+
import { t as an } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
13
|
+
import { t as on } from "./useEditorRoot-ByHPMqYT.js";
|
|
14
|
+
import "./useCloudI18n-OezCj0cx.js";
|
|
15
|
+
import { t as sn } from "./useMergeTag-DE2mpy1w.js";
|
|
16
|
+
import { t as cn } from "./useAliveFlag-CT9gjvO_.js";
|
|
17
17
|
//#region ../core/src/error-reporting.ts
|
|
18
|
-
function
|
|
18
|
+
function ln(e) {
|
|
19
19
|
return e instanceof Error ? e : Error(String(e), { cause: e });
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function un(e, t) {
|
|
22
22
|
try {
|
|
23
23
|
t();
|
|
24
24
|
} catch (t) {
|
|
25
|
-
e?.(
|
|
25
|
+
e?.(ln(t));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region ../core/src/editor.ts
|
|
30
|
-
function
|
|
30
|
+
function dn(e) {
|
|
31
31
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function fn(e) {
|
|
34
34
|
let t = m({
|
|
35
35
|
template: null,
|
|
36
|
-
content: e.content ??
|
|
36
|
+
content: e.content ?? Re(e.defaultFontFamily, e.templateDefaults),
|
|
37
37
|
selectedBlockId: null,
|
|
38
38
|
viewport: "desktop",
|
|
39
39
|
darkMode: !1,
|
|
@@ -128,7 +128,7 @@ function un(e) {
|
|
|
128
128
|
if (l(n)) return;
|
|
129
129
|
let r = o(t.content.blocks, n);
|
|
130
130
|
if (r && r.type === "section") {
|
|
131
|
-
if (i < 0 || i >=
|
|
131
|
+
if (i < 0 || i >= dn(r.columns)) return;
|
|
132
132
|
r.children[i] = r.children[i] || [];
|
|
133
133
|
let t = r.children[i];
|
|
134
134
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -161,7 +161,7 @@ function un(e) {
|
|
|
161
161
|
let d;
|
|
162
162
|
if (i) {
|
|
163
163
|
let e = o(t.content.blocks, i);
|
|
164
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
164
|
+
if (!e || e.type !== "section" || a < 0 || a >= dn(e.columns)) return;
|
|
165
165
|
e.children[a] = e.children[a] || [], d = e.children[a];
|
|
166
166
|
} else d = t.content.blocks;
|
|
167
167
|
let [f] = s.blocks.splice(u, 1);
|
|
@@ -171,10 +171,10 @@ function un(e) {
|
|
|
171
171
|
r();
|
|
172
172
|
}
|
|
173
173
|
function E(e, t) {
|
|
174
|
-
throw new
|
|
174
|
+
throw new W(`[Templatical] Templates: ${e} ${t}`);
|
|
175
175
|
}
|
|
176
176
|
function D(t) {
|
|
177
|
-
|
|
177
|
+
un(e.onError, t);
|
|
178
178
|
}
|
|
179
179
|
function O(t) {
|
|
180
180
|
let { templates: n } = e;
|
|
@@ -274,9 +274,9 @@ function un(e) {
|
|
|
274
274
|
}
|
|
275
275
|
//#endregion
|
|
276
276
|
//#region ../core/src/history.ts
|
|
277
|
-
var
|
|
278
|
-
function
|
|
279
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
277
|
+
var pn = 50, mn = 300, hn = 1500;
|
|
278
|
+
function gn(e) {
|
|
279
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = pn } = e, a = l([]), o = l([]), s = l(!1), c = null, u = null, d = p(() => a.value.length > 0), f = p(() => o.value.length > 0);
|
|
280
280
|
function m() {
|
|
281
281
|
return ve(t.value);
|
|
282
282
|
}
|
|
@@ -294,21 +294,21 @@ function mn(e) {
|
|
|
294
294
|
if (u && u.blockId === e) {
|
|
295
295
|
clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
|
|
296
296
|
u = null;
|
|
297
|
-
},
|
|
297
|
+
}, mn);
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
300
|
g(), h(m()), o.value = [], u = {
|
|
301
301
|
blockId: e,
|
|
302
302
|
timeoutId: setTimeout(() => {
|
|
303
303
|
u = null;
|
|
304
|
-
},
|
|
304
|
+
}, mn)
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
function y() {
|
|
309
309
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
310
310
|
s.value = !1, c = null;
|
|
311
|
-
},
|
|
311
|
+
}, hn);
|
|
312
312
|
}
|
|
313
313
|
function b() {
|
|
314
314
|
if (a.value.length === 0) return;
|
|
@@ -342,7 +342,7 @@ function mn(e) {
|
|
|
342
342
|
}
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region ../core/src/block-actions.ts
|
|
345
|
-
function
|
|
345
|
+
function _n(e) {
|
|
346
346
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
347
347
|
...e,
|
|
348
348
|
id: U(),
|
|
@@ -358,7 +358,7 @@ function hn(e) {
|
|
|
358
358
|
id: U()
|
|
359
359
|
})));
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function vn(e) {
|
|
362
362
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
363
363
|
function o(n, r, a) {
|
|
364
364
|
let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = fe(n, o);
|
|
@@ -366,9 +366,9 @@ function gn(e) {
|
|
|
366
366
|
}
|
|
367
367
|
function s(e, n, r) {
|
|
368
368
|
let o = JSON.parse(JSON.stringify(e));
|
|
369
|
-
if (o.id = U(),
|
|
369
|
+
if (o.id = U(), _n(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
370
370
|
let t = JSON.parse(JSON.stringify(e));
|
|
371
|
-
return t.id = U(),
|
|
371
|
+
return t.id = U(), _n(t), t;
|
|
372
372
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
373
373
|
else {
|
|
374
374
|
let i = a?.(e.id) ?? null;
|
|
@@ -391,9 +391,9 @@ function gn(e) {
|
|
|
391
391
|
}
|
|
392
392
|
//#endregion
|
|
393
393
|
//#region ../core/src/auto-save.ts
|
|
394
|
-
var
|
|
395
|
-
function
|
|
396
|
-
let { content: t, isDirty: n, onChange: r, debounce: i =
|
|
394
|
+
var yn = 2e3;
|
|
395
|
+
function bn(e) {
|
|
396
|
+
let { content: t, isDirty: n, onChange: r, debounce: i = yn, enabled: a = !0 } = e, o = null, s = !1;
|
|
397
397
|
function c() {
|
|
398
398
|
return typeof a == "function" ? a() : a;
|
|
399
399
|
}
|
|
@@ -430,7 +430,7 @@ function vn(e) {
|
|
|
430
430
|
}
|
|
431
431
|
//#endregion
|
|
432
432
|
//#region ../core/src/condition-preview.ts
|
|
433
|
-
function
|
|
433
|
+
function xn(e) {
|
|
434
434
|
let t = m(/* @__PURE__ */ new Set()), n = p(() => t.size > 0);
|
|
435
435
|
function r(e) {
|
|
436
436
|
return t.has(e);
|
|
@@ -450,7 +450,7 @@ function yn(e) {
|
|
|
450
450
|
}
|
|
451
451
|
//#endregion
|
|
452
452
|
//#region ../core/src/data-source-fetch.ts
|
|
453
|
-
function
|
|
453
|
+
function Sn(e) {
|
|
454
454
|
let t = l(!1), n = l(!1), r = p(() => !!e.definition.value?.dataSource), i = p(() => r.value && !e.block.value.dataSourceFetched);
|
|
455
455
|
async function a() {
|
|
456
456
|
let r = e.definition.value;
|
|
@@ -482,7 +482,7 @@ function bn(e) {
|
|
|
482
482
|
}
|
|
483
483
|
//#endregion
|
|
484
484
|
//#region ../core/src/history-interceptor.ts
|
|
485
|
-
function
|
|
485
|
+
function Cn(e, t) {
|
|
486
486
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
487
487
|
e.addBlock = (r, i, a, o) => {
|
|
488
488
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -498,7 +498,7 @@ function xn(e, t) {
|
|
|
498
498
|
}
|
|
499
499
|
//#endregion
|
|
500
500
|
//#region ../core/src/saved-blocks.ts
|
|
501
|
-
function
|
|
501
|
+
function wn(e) {
|
|
502
502
|
let { provider: t } = e, n = l([]), r = l(!1), i = S(() => {
|
|
503
503
|
let e = /* @__PURE__ */ new Set();
|
|
504
504
|
for (let t of n.value) {
|
|
@@ -514,10 +514,10 @@ function Sn(e) {
|
|
|
514
514
|
return s.value && e.canDelete !== !1;
|
|
515
515
|
}
|
|
516
516
|
function d(e, t) {
|
|
517
|
-
throw new
|
|
517
|
+
throw new W(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
|
|
518
518
|
}
|
|
519
519
|
function f(t) {
|
|
520
|
-
|
|
520
|
+
un(e.onError, t);
|
|
521
521
|
}
|
|
522
522
|
async function p(i) {
|
|
523
523
|
r.value = !0;
|
|
@@ -586,9 +586,9 @@ function Sn(e) {
|
|
|
586
586
|
}
|
|
587
587
|
//#endregion
|
|
588
588
|
//#region ../core/src/saved-blocks-local.ts
|
|
589
|
-
var
|
|
590
|
-
function
|
|
591
|
-
let t = e.key ??
|
|
589
|
+
var Tn = "templatical:saved-blocks";
|
|
590
|
+
function En(e = {}) {
|
|
591
|
+
let t = e.key ?? Tn;
|
|
592
592
|
function n() {
|
|
593
593
|
if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
|
|
594
594
|
return localStorage;
|
|
@@ -641,9 +641,9 @@ function wn(e = {}) {
|
|
|
641
641
|
}
|
|
642
642
|
//#endregion
|
|
643
643
|
//#region ../core/src/media-local.ts
|
|
644
|
-
var
|
|
645
|
-
function
|
|
646
|
-
let t = e.key ??
|
|
644
|
+
var Dn = "templatical:media", On = 50;
|
|
645
|
+
function kn(e = {}) {
|
|
646
|
+
let t = e.key ?? Dn;
|
|
647
647
|
function n() {
|
|
648
648
|
if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with localStorage. Supply your own MediaProvider for server-side or non-browser use.");
|
|
649
649
|
return localStorage;
|
|
@@ -680,7 +680,7 @@ function Dn(e = {}) {
|
|
|
680
680
|
let t = r(), n = e?.search?.trim().toLowerCase(), i = n ? t.filter((e) => {
|
|
681
681
|
let t = e.filename?.toLowerCase() ?? "", r = e.alt?.toLowerCase() ?? "";
|
|
682
682
|
return t.includes(n) || r.includes(n);
|
|
683
|
-
}) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o +
|
|
683
|
+
}) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o + On), c = { items: s }, l = o + s.length;
|
|
684
684
|
return l < i.length && (c.nextCursor = String(l)), c;
|
|
685
685
|
},
|
|
686
686
|
async create(e) {
|
|
@@ -722,18 +722,18 @@ function Dn(e = {}) {
|
|
|
722
722
|
}
|
|
723
723
|
//#endregion
|
|
724
724
|
//#region ../core/src/version-history.ts
|
|
725
|
-
function
|
|
725
|
+
function An(e) {
|
|
726
726
|
let { provider: t, getTemplateId: n } = e, r = l([]), i = l(!1), a = l(void 0), o = l(!1), s = /* @__PURE__ */ new Map(), c = S(() => typeof t.create == "function"), u = S(() => typeof t.restore == "function");
|
|
727
727
|
function d(e) {
|
|
728
728
|
let t = n();
|
|
729
|
-
if (!t) throw new
|
|
729
|
+
if (!t) throw new W(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
|
|
730
730
|
return t;
|
|
731
731
|
}
|
|
732
732
|
function f(e) {
|
|
733
|
-
throw new
|
|
733
|
+
throw new W(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
734
734
|
}
|
|
735
735
|
function p(t) {
|
|
736
|
-
|
|
736
|
+
un(e.onError, t);
|
|
737
737
|
}
|
|
738
738
|
async function m(n) {
|
|
739
739
|
let o = d("list");
|
|
@@ -802,7 +802,7 @@ function On(e) {
|
|
|
802
802
|
}
|
|
803
803
|
//#endregion
|
|
804
804
|
//#region ../core/src/comments.ts
|
|
805
|
-
function
|
|
805
|
+
function jn(e) {
|
|
806
806
|
let { provider: t, getTemplateId: n, getUser: r } = e, i = l([]), a = l(!1), o = l(!1), s = S(() => typeof t.create == "function"), c = S(() => typeof t.update == "function"), u = S(() => typeof t.delete == "function"), d = S(() => typeof t.setResolved == "function"), f = S(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), p = S(() => i.value.filter((e) => !e.resolvedAt).length), m = S(() => {
|
|
807
807
|
let e = /* @__PURE__ */ new Map();
|
|
808
808
|
for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
|
|
@@ -810,16 +810,16 @@ function kn(e) {
|
|
|
810
810
|
});
|
|
811
811
|
function h(e) {
|
|
812
812
|
let t = n();
|
|
813
|
-
if (!t) throw new
|
|
813
|
+
if (!t) throw new W(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
|
|
814
814
|
return t;
|
|
815
815
|
}
|
|
816
816
|
function g(e) {
|
|
817
817
|
let t = r();
|
|
818
|
-
if (!t) throw new
|
|
818
|
+
if (!t) throw new W(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
|
|
819
819
|
return t;
|
|
820
820
|
}
|
|
821
821
|
function _(e) {
|
|
822
|
-
throw new
|
|
822
|
+
throw new W(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
823
823
|
}
|
|
824
824
|
function v(e) {
|
|
825
825
|
for (let t of i.value) {
|
|
@@ -833,11 +833,11 @@ function kn(e) {
|
|
|
833
833
|
return t !== null && e.author.id === t.id;
|
|
834
834
|
}
|
|
835
835
|
function b(t) {
|
|
836
|
-
let n =
|
|
836
|
+
let n = ln(t);
|
|
837
837
|
throw e.onError?.(n), n;
|
|
838
838
|
}
|
|
839
839
|
function x(t) {
|
|
840
|
-
|
|
840
|
+
un(e.onError, t);
|
|
841
841
|
}
|
|
842
842
|
function C(e, t, n) {
|
|
843
843
|
return [
|
|
@@ -977,7 +977,7 @@ function kn(e) {
|
|
|
977
977
|
applyRemoteDelete: P
|
|
978
978
|
};
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function Mn(e) {
|
|
981
981
|
let { comments: n, provider: r, getTemplateId: i } = e, { subscribe: a } = r;
|
|
982
982
|
if (typeof a != "function") return;
|
|
983
983
|
let o = null;
|
|
@@ -1000,18 +1000,18 @@ function An(e) {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
//#endregion
|
|
1002
1002
|
//#region src/utils/activeEditorTracker.ts
|
|
1003
|
-
var
|
|
1004
|
-
function
|
|
1005
|
-
let e = ++
|
|
1006
|
-
return
|
|
1003
|
+
var Nn = /* @__PURE__ */ new Set(), Q = 0, Pn = 0;
|
|
1004
|
+
function Fn() {
|
|
1005
|
+
let e = ++Pn;
|
|
1006
|
+
return Nn.add(e), Q === 0 && (Q = e), {
|
|
1007
1007
|
id: e,
|
|
1008
|
-
isActive: () =>
|
|
1008
|
+
isActive: () => Nn.size <= 1 || Q === e,
|
|
1009
1009
|
claim: () => {
|
|
1010
1010
|
Q = e;
|
|
1011
1011
|
},
|
|
1012
1012
|
dispose: () => {
|
|
1013
|
-
if (
|
|
1014
|
-
let e = Array.from(
|
|
1013
|
+
if (Nn.delete(e), Q === e) {
|
|
1014
|
+
let e = Array.from(Nn);
|
|
1015
1015
|
Q = e[e.length - 1] ?? 0;
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
@@ -1019,8 +1019,8 @@ function Nn() {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
//#endregion
|
|
1021
1021
|
//#region src/composables/usePreviewResolution.ts
|
|
1022
|
-
var
|
|
1023
|
-
function
|
|
1022
|
+
var In = 500;
|
|
1023
|
+
function Ln(e) {
|
|
1024
1024
|
let n = typeof e.resolvePreview == "function", r = l(null), i = l(!1), a = l(!1), o = 0, s = null;
|
|
1025
1025
|
function c() {
|
|
1026
1026
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -1037,7 +1037,7 @@ function Fn(e) {
|
|
|
1037
1037
|
try {
|
|
1038
1038
|
let e = await t(s);
|
|
1039
1039
|
if (n !== o) return;
|
|
1040
|
-
if (!
|
|
1040
|
+
if (!ke(e)) {
|
|
1041
1041
|
a.value = !0;
|
|
1042
1042
|
return;
|
|
1043
1043
|
}
|
|
@@ -1057,7 +1057,7 @@ function Fn(e) {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
s = setTimeout(() => {
|
|
1059
1059
|
s = null, u();
|
|
1060
|
-
},
|
|
1060
|
+
}, In);
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
1063
|
return t(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
@@ -1079,7 +1079,7 @@ function Fn(e) {
|
|
|
1079
1079
|
}
|
|
1080
1080
|
//#endregion
|
|
1081
1081
|
//#region src/composables/useImageUrlResolver.ts
|
|
1082
|
-
function
|
|
1082
|
+
function Rn(e) {
|
|
1083
1083
|
let t = m(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
1084
1084
|
function r(e) {
|
|
1085
1085
|
return t.get(e);
|
|
@@ -1112,8 +1112,8 @@ function In(e) {
|
|
|
1112
1112
|
lookup: a
|
|
1113
1113
|
};
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1116
|
-
let r = n(
|
|
1115
|
+
function zn(e) {
|
|
1116
|
+
let r = n(Mt, null), i = S(e);
|
|
1117
1117
|
if (!r) return i;
|
|
1118
1118
|
let a;
|
|
1119
1119
|
function s() {
|
|
@@ -1142,37 +1142,38 @@ function Ln(e) {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
//#endregion
|
|
1144
1144
|
//#region src/composables/useMergeTagPicker.ts
|
|
1145
|
-
function
|
|
1146
|
-
let e = l(!1), t = l([]), n = null;
|
|
1147
|
-
function
|
|
1148
|
-
if (
|
|
1149
|
-
let e =
|
|
1150
|
-
|
|
1145
|
+
function Bn() {
|
|
1146
|
+
let e = l(!1), t = l([]), n = l(null), r = null;
|
|
1147
|
+
function i(i, a) {
|
|
1148
|
+
if (r) {
|
|
1149
|
+
let e = r;
|
|
1150
|
+
r = null, e(null);
|
|
1151
1151
|
}
|
|
1152
|
-
return t.value =
|
|
1153
|
-
|
|
1152
|
+
return t.value = i, n.value = a?.current ?? null, e.value = !0, new Promise((e) => {
|
|
1153
|
+
r = e;
|
|
1154
1154
|
});
|
|
1155
1155
|
}
|
|
1156
|
-
function i
|
|
1157
|
-
let
|
|
1158
|
-
|
|
1156
|
+
function a(i) {
|
|
1157
|
+
let a = r;
|
|
1158
|
+
r = null, e.value = !1, t.value = [], n.value = null, a && a(i);
|
|
1159
1159
|
}
|
|
1160
1160
|
return o() && h(() => {
|
|
1161
|
-
if (
|
|
1162
|
-
let e =
|
|
1163
|
-
|
|
1161
|
+
if (r) {
|
|
1162
|
+
let e = r;
|
|
1163
|
+
r = null, e(null);
|
|
1164
1164
|
}
|
|
1165
|
-
e.value = !1, t.value = [];
|
|
1165
|
+
e.value = !1, t.value = [], n.value = null;
|
|
1166
1166
|
}), {
|
|
1167
1167
|
isOpen: e,
|
|
1168
1168
|
tags: t,
|
|
1169
|
-
|
|
1170
|
-
|
|
1169
|
+
current: n,
|
|
1170
|
+
open: i,
|
|
1171
|
+
resolve: a
|
|
1171
1172
|
};
|
|
1172
1173
|
}
|
|
1173
1174
|
//#endregion
|
|
1174
1175
|
//#region src/composables/useLogicTagPicker.ts
|
|
1175
|
-
function
|
|
1176
|
+
function Vn() {
|
|
1176
1177
|
let e = l(!1), t = l([]), n = l([]), r = null;
|
|
1177
1178
|
function i(i, a) {
|
|
1178
1179
|
if (r) {
|
|
@@ -1203,17 +1204,17 @@ function zn() {
|
|
|
1203
1204
|
}
|
|
1204
1205
|
//#endregion
|
|
1205
1206
|
//#region src/composables/useTemplateLint.ts
|
|
1206
|
-
function
|
|
1207
|
+
function Hn(e) {
|
|
1207
1208
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1208
1209
|
}
|
|
1209
|
-
function
|
|
1210
|
-
let n = l([]), r = l(!1), i = l(!1), a = x(null), o =
|
|
1210
|
+
function Un(e) {
|
|
1211
|
+
let n = l([]), r = l(!1), i = l(!1), a = x(null), o = Hn(e.options), s = null, c = !1;
|
|
1211
1212
|
o || u();
|
|
1212
1213
|
async function u() {
|
|
1213
1214
|
try {
|
|
1214
|
-
let t = await import("./src-
|
|
1215
|
+
let t = await import("./src-CaNsA_WX.js");
|
|
1215
1216
|
if (c) return;
|
|
1216
|
-
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s =
|
|
1217
|
+
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s = He(e.content, d, {
|
|
1217
1218
|
debounce: e.debounce ?? 500,
|
|
1218
1219
|
deep: !0
|
|
1219
1220
|
});
|
|
@@ -1248,17 +1249,17 @@ function Vn(e) {
|
|
|
1248
1249
|
}
|
|
1249
1250
|
//#endregion
|
|
1250
1251
|
//#region src/utils/blockTypeLabels.ts
|
|
1251
|
-
function
|
|
1252
|
+
function Wn(e, t) {
|
|
1252
1253
|
return t.blocks[e] ?? e;
|
|
1253
1254
|
}
|
|
1254
|
-
function
|
|
1255
|
-
if (e.type !== "custom") return
|
|
1255
|
+
function Gn(e, t, n = []) {
|
|
1256
|
+
if (e.type !== "custom") return Wn(e.type, t);
|
|
1256
1257
|
let { customType: r } = e;
|
|
1257
1258
|
return n.find((e) => e.type === r)?.name ?? r;
|
|
1258
1259
|
}
|
|
1259
1260
|
//#endregion
|
|
1260
1261
|
//#region src/composables/useKeyboardReorder.ts
|
|
1261
|
-
function
|
|
1262
|
+
function Kn(e, t, n = []) {
|
|
1262
1263
|
let r = l(null), i = l(""), a = null;
|
|
1263
1264
|
function o(t) {
|
|
1264
1265
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1285,7 +1286,7 @@ function Wn(e, t, n = []) {
|
|
|
1285
1286
|
let i = o(r);
|
|
1286
1287
|
if (!i) return "";
|
|
1287
1288
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
1288
|
-
return a ?
|
|
1289
|
+
return a ? Gn(a, t.t, n) : "";
|
|
1289
1290
|
}
|
|
1290
1291
|
function c(t, n) {
|
|
1291
1292
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1354,13 +1355,13 @@ function Wn(e, t, n = []) {
|
|
|
1354
1355
|
}
|
|
1355
1356
|
//#endregion
|
|
1356
1357
|
//#region src/composables/useUiTheme.ts
|
|
1357
|
-
function
|
|
1358
|
-
let t =
|
|
1358
|
+
function qn(e) {
|
|
1359
|
+
let t = Ue("(prefers-color-scheme: dark)");
|
|
1359
1360
|
return { resolvedTheme: S(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1360
1361
|
}
|
|
1361
1362
|
//#endregion
|
|
1362
1363
|
//#region src/composables/useThemeStyles.ts
|
|
1363
|
-
var
|
|
1364
|
+
var Jn = {
|
|
1364
1365
|
bg: "--tpl-bg",
|
|
1365
1366
|
bgElevated: "--tpl-bg-elevated",
|
|
1366
1367
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1384,10 +1385,10 @@ var Kn = {
|
|
|
1384
1385
|
dangerLight: "--tpl-danger-light",
|
|
1385
1386
|
canvasBg: "--tpl-canvas-bg"
|
|
1386
1387
|
};
|
|
1387
|
-
function
|
|
1388
|
+
function Yn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1388
1389
|
return { themeStyles: S(() => {
|
|
1389
1390
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1390
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1391
|
+
if (a) for (let [e, t] of Object.entries(Jn)) {
|
|
1391
1392
|
let n = a[e];
|
|
1392
1393
|
n && (r[t] = n);
|
|
1393
1394
|
}
|
|
@@ -1396,7 +1397,7 @@ function qn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1396
1397
|
}
|
|
1397
1398
|
//#endregion
|
|
1398
1399
|
//#region src/composables/useBlockRegistry.ts
|
|
1399
|
-
function
|
|
1400
|
+
function Xn() {
|
|
1400
1401
|
let e = x(/* @__PURE__ */ new Map());
|
|
1401
1402
|
function t(t, n) {
|
|
1402
1403
|
e.value.set(t, n), T(e);
|
|
@@ -1436,7 +1437,7 @@ function Jn() {
|
|
|
1436
1437
|
strictFilters: !1
|
|
1437
1438
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1438
1439
|
} catch (t) {
|
|
1439
|
-
return
|
|
1440
|
+
return X.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
1440
1441
|
}
|
|
1441
1442
|
}
|
|
1442
1443
|
function c(t) {
|
|
@@ -1454,9 +1455,9 @@ function Jn() {
|
|
|
1454
1455
|
}
|
|
1455
1456
|
//#endregion
|
|
1456
1457
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
1457
|
-
function
|
|
1458
|
+
function Zn(e, t) {
|
|
1458
1459
|
return S(() => {
|
|
1459
|
-
let n =
|
|
1460
|
+
let n = Qn(e.value.blocks);
|
|
1460
1461
|
if (n.size === 0) return [];
|
|
1461
1462
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
1462
1463
|
for (let e of n) {
|
|
@@ -1468,11 +1469,11 @@ function Yn(e, t) {
|
|
|
1468
1469
|
return i;
|
|
1469
1470
|
});
|
|
1470
1471
|
}
|
|
1471
|
-
function
|
|
1472
|
+
function Qn(e) {
|
|
1472
1473
|
let t = /* @__PURE__ */ new Set();
|
|
1473
|
-
return
|
|
1474
|
+
return $n(e, t), t;
|
|
1474
1475
|
}
|
|
1475
|
-
function
|
|
1476
|
+
function $n(e, t) {
|
|
1476
1477
|
for (let n of e) {
|
|
1477
1478
|
if (he(n)) {
|
|
1478
1479
|
t.add(n.customType);
|
|
@@ -1481,16 +1482,16 @@ function Zn(e, t) {
|
|
|
1481
1482
|
if (n.type === "section") {
|
|
1482
1483
|
let e = n.children;
|
|
1483
1484
|
if (!e) continue;
|
|
1484
|
-
for (let n of e)
|
|
1485
|
+
for (let n of e) $n(n, t);
|
|
1485
1486
|
}
|
|
1486
1487
|
}
|
|
1487
1488
|
}
|
|
1488
1489
|
//#endregion
|
|
1489
1490
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1490
|
-
var
|
|
1491
|
+
var er = [
|
|
1491
1492
|
{
|
|
1492
1493
|
type: "section",
|
|
1493
|
-
createBlock:
|
|
1494
|
+
createBlock: Te
|
|
1494
1495
|
},
|
|
1495
1496
|
{
|
|
1496
1497
|
type: "title",
|
|
@@ -1522,7 +1523,7 @@ var Qn = [
|
|
|
1522
1523
|
},
|
|
1523
1524
|
{
|
|
1524
1525
|
type: "menu",
|
|
1525
|
-
createBlock:
|
|
1526
|
+
createBlock: Ee
|
|
1526
1527
|
},
|
|
1527
1528
|
{
|
|
1528
1529
|
type: "table",
|
|
@@ -1538,11 +1539,11 @@ var Qn = [
|
|
|
1538
1539
|
},
|
|
1539
1540
|
{
|
|
1540
1541
|
type: "countdown",
|
|
1541
|
-
createBlock:
|
|
1542
|
+
createBlock: Le
|
|
1542
1543
|
}
|
|
1543
1544
|
];
|
|
1544
|
-
function
|
|
1545
|
-
for (let n of
|
|
1545
|
+
function tr(e, t) {
|
|
1546
|
+
for (let n of er) {
|
|
1546
1547
|
let r = t[n.type];
|
|
1547
1548
|
r && e.registerBuiltIn(n.type, {
|
|
1548
1549
|
component: r,
|
|
@@ -1552,12 +1553,12 @@ function $n(e, t) {
|
|
|
1552
1553
|
}
|
|
1553
1554
|
//#endregion
|
|
1554
1555
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
1555
|
-
function
|
|
1556
|
+
function nr(e) {
|
|
1556
1557
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1557
1558
|
}
|
|
1558
1559
|
//#endregion
|
|
1559
1560
|
//#region src/utils/templateSettingsFields.ts
|
|
1560
|
-
var
|
|
1561
|
+
var rr = {
|
|
1561
1562
|
width: "layout",
|
|
1562
1563
|
backgroundColor: "appearance",
|
|
1563
1564
|
textColor: "appearance",
|
|
@@ -1567,14 +1568,14 @@ var tr = {
|
|
|
1567
1568
|
locale: "language",
|
|
1568
1569
|
direction: "language",
|
|
1569
1570
|
preheaderText: "preheader"
|
|
1570
|
-
},
|
|
1571
|
-
function
|
|
1572
|
-
return Object.prototype.hasOwnProperty.call(
|
|
1571
|
+
}, ir = Object.keys(rr);
|
|
1572
|
+
function ar(e) {
|
|
1573
|
+
return Object.prototype.hasOwnProperty.call(rr, e);
|
|
1573
1574
|
}
|
|
1574
|
-
function
|
|
1575
|
+
function or(e) {
|
|
1575
1576
|
let t = e?.fields;
|
|
1576
1577
|
if (t === void 0 || t === !0) return {
|
|
1577
|
-
fields: new Set(
|
|
1578
|
+
fields: new Set(ir),
|
|
1578
1579
|
unknown: []
|
|
1579
1580
|
};
|
|
1580
1581
|
if (t === !1) return {
|
|
@@ -1582,7 +1583,7 @@ function ir(e) {
|
|
|
1582
1583
|
unknown: []
|
|
1583
1584
|
};
|
|
1584
1585
|
let n = /* @__PURE__ */ new Set(), r = [];
|
|
1585
|
-
for (let e of t)
|
|
1586
|
+
for (let e of t) ar(e) ? n.add(e) : r.push(String(e));
|
|
1586
1587
|
return {
|
|
1587
1588
|
fields: n,
|
|
1588
1589
|
unknown: r
|
|
@@ -1590,18 +1591,18 @@ function ir(e) {
|
|
|
1590
1591
|
}
|
|
1591
1592
|
//#endregion
|
|
1592
1593
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
1593
|
-
function
|
|
1594
|
+
function sr(e) {
|
|
1594
1595
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1595
1596
|
}
|
|
1596
|
-
function
|
|
1597
|
-
let r = new Set(e.map((e) =>
|
|
1598
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1597
|
+
function cr(e, t, n) {
|
|
1598
|
+
let r = new Set(e.map((e) => Z(e))), i = [], a = (e, t) => {
|
|
1599
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Z(o)) && i.push(`${t}.${n}: ${o}`) : sr(o) && a(o, `${t}.${n}`);
|
|
1599
1600
|
}, o = t;
|
|
1600
1601
|
for (let [e, t] of Object.entries(ee)) {
|
|
1601
1602
|
let n = o?.[e];
|
|
1602
1603
|
a({
|
|
1603
1604
|
...t,
|
|
1604
|
-
...
|
|
1605
|
+
...sr(n) ? n : {}
|
|
1605
1606
|
}, e);
|
|
1606
1607
|
}
|
|
1607
1608
|
return a({
|
|
@@ -1611,7 +1612,7 @@ function or(e, t, n) {
|
|
|
1611
1612
|
}
|
|
1612
1613
|
//#endregion
|
|
1613
1614
|
//#region src/utils/localizedBlockDefaults.ts
|
|
1614
|
-
function
|
|
1615
|
+
function lr(e) {
|
|
1615
1616
|
return {
|
|
1616
1617
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
1617
1618
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -1620,58 +1621,58 @@ function sr(e) {
|
|
|
1620
1621
|
}
|
|
1621
1622
|
//#endregion
|
|
1622
1623
|
//#region src/i18n/index.ts
|
|
1623
|
-
var
|
|
1624
|
-
"./locales/ca.ts": () => import("./ca-
|
|
1625
|
-
"./locales/de.ts": () => import("./de-
|
|
1626
|
-
"./locales/en.ts": () => import("./en-
|
|
1627
|
-
"./locales/es.ts": () => import("./es-
|
|
1628
|
-
"./locales/fr.ts": () => import("./fr-
|
|
1629
|
-
"./locales/nl.ts": () => import("./nl-
|
|
1630
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
1631
|
-
}),
|
|
1624
|
+
var ur = /* #__PURE__ */ Object.assign({
|
|
1625
|
+
"./locales/ca.ts": () => import("./ca-YlPDhElv.js"),
|
|
1626
|
+
"./locales/de.ts": () => import("./de-CONjnzrF.js"),
|
|
1627
|
+
"./locales/en.ts": () => import("./en-BAMooiOF.js"),
|
|
1628
|
+
"./locales/es.ts": () => import("./es-I47lHs2m.js"),
|
|
1629
|
+
"./locales/fr.ts": () => import("./fr-B8MIKjT4.js"),
|
|
1630
|
+
"./locales/nl.ts": () => import("./nl-CBLxcb-0.js"),
|
|
1631
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-CMSRfX7t.js")
|
|
1632
|
+
}), dr = /* #__PURE__ */ Object.assign({
|
|
1632
1633
|
"./locales/cloud/de.ts": () => import("./de-BytZwgn6.js"),
|
|
1633
1634
|
"./locales/cloud/en.ts": () => import("./en-DyOSV0lY.js"),
|
|
1634
1635
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-C1WLSGDh.js")
|
|
1635
1636
|
});
|
|
1636
|
-
function
|
|
1637
|
+
function fr(e) {
|
|
1637
1638
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
1638
1639
|
}
|
|
1639
|
-
var
|
|
1640
|
-
function
|
|
1640
|
+
var pr = fr(ur), mr = fr(dr);
|
|
1641
|
+
function hr(e) {
|
|
1641
1642
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
1642
1643
|
}
|
|
1643
|
-
function
|
|
1644
|
-
let n =
|
|
1645
|
-
return t.find((e) =>
|
|
1644
|
+
function gr(e, t) {
|
|
1645
|
+
let n = hr(e);
|
|
1646
|
+
return t.find((e) => hr(e) === n);
|
|
1646
1647
|
}
|
|
1647
|
-
function
|
|
1648
|
-
return
|
|
1648
|
+
function _r(e) {
|
|
1649
|
+
return hr(e).split("-")[0];
|
|
1649
1650
|
}
|
|
1650
|
-
function
|
|
1651
|
-
return
|
|
1651
|
+
function vr(e, t) {
|
|
1652
|
+
return gr(e, t) ?? gr(_r(e), t);
|
|
1652
1653
|
}
|
|
1653
|
-
function
|
|
1654
|
-
return
|
|
1654
|
+
function yr(e, t) {
|
|
1655
|
+
return vr(e, t) ?? "en";
|
|
1655
1656
|
}
|
|
1656
|
-
async function
|
|
1657
|
-
let t =
|
|
1657
|
+
async function br(e) {
|
|
1658
|
+
let t = ur[`./locales/${yr(e, pr)}.ts`];
|
|
1658
1659
|
return (await t()).default;
|
|
1659
1660
|
}
|
|
1660
|
-
async function
|
|
1661
|
-
let t =
|
|
1661
|
+
async function xr(e) {
|
|
1662
|
+
let t = dr[`./locales/cloud/${yr(e, mr)}.ts`];
|
|
1662
1663
|
return (await t()).default;
|
|
1663
1664
|
}
|
|
1664
|
-
function
|
|
1665
|
-
return
|
|
1665
|
+
function Sr(e) {
|
|
1666
|
+
return vr(e, pr) !== void 0;
|
|
1666
1667
|
}
|
|
1667
|
-
function
|
|
1668
|
-
return
|
|
1668
|
+
function Cr(e) {
|
|
1669
|
+
return vr(e, mr) !== void 0;
|
|
1669
1670
|
}
|
|
1670
|
-
function
|
|
1671
|
-
return [...
|
|
1671
|
+
function wr() {
|
|
1672
|
+
return [...pr];
|
|
1672
1673
|
}
|
|
1673
|
-
function
|
|
1674
|
-
return [...
|
|
1674
|
+
function Tr() {
|
|
1675
|
+
return [...mr];
|
|
1675
1676
|
}
|
|
1676
1677
|
//#endregion
|
|
1677
1678
|
//#region src/i18n/contentDefaults.ts
|
|
@@ -1732,16 +1733,16 @@ var $ = {
|
|
|
1732
1733
|
seconds: "Segons",
|
|
1733
1734
|
expired: "Aquesta oferta ha caducat"
|
|
1734
1735
|
}
|
|
1735
|
-
},
|
|
1736
|
-
function
|
|
1736
|
+
}, Er = new Map(Object.keys($).map((e) => [e.toLowerCase(), e]));
|
|
1737
|
+
function Dr(e) {
|
|
1737
1738
|
if (!e) return $.en;
|
|
1738
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
1739
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = Er.get(t);
|
|
1739
1740
|
if (n) return $[n];
|
|
1740
|
-
let r =
|
|
1741
|
+
let r = Er.get(_r(t));
|
|
1741
1742
|
return r ? $[r] : $.en;
|
|
1742
1743
|
}
|
|
1743
|
-
function
|
|
1744
|
-
let t =
|
|
1744
|
+
function Or(e) {
|
|
1745
|
+
let t = Dr(e);
|
|
1745
1746
|
return {
|
|
1746
1747
|
video: { alt: t.video },
|
|
1747
1748
|
countdown: {
|
|
@@ -1755,8 +1756,8 @@ function Er(e) {
|
|
|
1755
1756
|
}
|
|
1756
1757
|
//#endregion
|
|
1757
1758
|
//#region src/utils/resolveFieldColors.ts
|
|
1758
|
-
function
|
|
1759
|
-
let n =
|
|
1759
|
+
function kr(e, t) {
|
|
1760
|
+
let n = Lt({ presets: e.presets }, Ft), r = n.presets.length === 0;
|
|
1760
1761
|
return {
|
|
1761
1762
|
presets: r ? t.presets : n.presets,
|
|
1762
1763
|
allowCustom: t.allowCustom === !1 ? !1 : e.allowCustom ?? t.allowCustom,
|
|
@@ -1768,9 +1769,9 @@ function Dr(e, t) {
|
|
|
1768
1769
|
}
|
|
1769
1770
|
//#endregion
|
|
1770
1771
|
//#region src/utils/collectColorFieldIssues.ts
|
|
1771
|
-
function
|
|
1772
|
+
function Ar(e, t) {
|
|
1772
1773
|
let n = [], r = (r, i) => {
|
|
1773
|
-
let a =
|
|
1774
|
+
let a = kr(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1774
1775
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1775
1776
|
id: s("invalid-presets"),
|
|
1776
1777
|
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." : "")
|
|
@@ -1781,8 +1782,8 @@ function Or(e, t) {
|
|
|
1781
1782
|
id: s("allow-custom-ignored"),
|
|
1782
1783
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1783
1784
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1784
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1785
|
-
e !== "" && !t.has(
|
|
1785
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Z(e)));
|
|
1786
|
+
e !== "" && !t.has(Z(e)) && n.push({
|
|
1786
1787
|
id: s("off-palette-default"),
|
|
1787
1788
|
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.`
|
|
1788
1789
|
});
|
|
@@ -1794,7 +1795,7 @@ function Or(e, t) {
|
|
|
1794
1795
|
}
|
|
1795
1796
|
//#endregion
|
|
1796
1797
|
//#region src/utils/keyboardShortcuts.ts
|
|
1797
|
-
function
|
|
1798
|
+
function jr(e) {
|
|
1798
1799
|
for (let t of e.composedPath()) {
|
|
1799
1800
|
if (!(t instanceof HTMLElement)) continue;
|
|
1800
1801
|
if (t.isContentEditable) return !0;
|
|
@@ -1803,18 +1804,18 @@ function kr(e) {
|
|
|
1803
1804
|
}
|
|
1804
1805
|
return !1;
|
|
1805
1806
|
}
|
|
1806
|
-
function
|
|
1807
|
+
function Mr(e, t) {
|
|
1807
1808
|
let n = e.metaKey || e.ctrlKey;
|
|
1808
1809
|
if (n && e.key.toLowerCase() === "s") {
|
|
1809
1810
|
e.preventDefault(), t.onSave?.();
|
|
1810
1811
|
return;
|
|
1811
1812
|
}
|
|
1812
1813
|
if (n && e.key.toLowerCase() === "z") {
|
|
1813
|
-
if (
|
|
1814
|
+
if (jr(e)) return;
|
|
1814
1815
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1815
1816
|
return;
|
|
1816
1817
|
}
|
|
1817
|
-
if (t.isPicking?.() && !
|
|
1818
|
+
if (t.isPicking?.() && !jr(e)) {
|
|
1818
1819
|
if (e.key === "Escape") {
|
|
1819
1820
|
e.preventDefault(), t.onCancelPick?.();
|
|
1820
1821
|
return;
|
|
@@ -1832,11 +1833,11 @@ function Ar(e, t) {
|
|
|
1832
1833
|
t.selectBlock(null);
|
|
1833
1834
|
return;
|
|
1834
1835
|
}
|
|
1835
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1836
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !jr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1836
1837
|
}
|
|
1837
1838
|
//#endregion
|
|
1838
1839
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
1839
|
-
function
|
|
1840
|
+
function Nr(e, t, n, r = !1) {
|
|
1840
1841
|
if (!e) return [];
|
|
1841
1842
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
1842
1843
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -1846,10 +1847,10 @@ function jr(e, t, n, r = !1) {
|
|
|
1846
1847
|
});
|
|
1847
1848
|
let i = s[0];
|
|
1848
1849
|
if (be(i, n)) {
|
|
1849
|
-
let e = r ?
|
|
1850
|
+
let e = r ? Fe(i, t) : void 0;
|
|
1850
1851
|
a.push(e === void 0 ? {
|
|
1851
1852
|
type: "tag",
|
|
1852
|
-
value:
|
|
1853
|
+
value: je(i, t)
|
|
1853
1854
|
} : {
|
|
1854
1855
|
type: "text",
|
|
1855
1856
|
value: e
|
|
@@ -1870,20 +1871,20 @@ function jr(e, t, n, r = !1) {
|
|
|
1870
1871
|
}
|
|
1871
1872
|
//#endregion
|
|
1872
1873
|
//#region src/components/MergeTagPreviewText.vue
|
|
1873
|
-
var
|
|
1874
|
+
var Pr = d({
|
|
1874
1875
|
name: "MergeTagPreviewText",
|
|
1875
1876
|
props: { text: {
|
|
1876
1877
|
type: String,
|
|
1877
1878
|
required: !0
|
|
1878
1879
|
} },
|
|
1879
1880
|
setup(e) {
|
|
1880
|
-
let t = n(
|
|
1881
|
+
let t = n(K, at), r = n(rt, Ne.liquid), i = n(q, null), a = S(() => Nr(e.text, t.value, r, i?.value ?? !1));
|
|
1881
1882
|
return () => a.value.map((e, t) => e.type === "tag" ? z("span", {
|
|
1882
1883
|
key: t,
|
|
1883
1884
|
class: "tpl-merge-tag-label"
|
|
1884
1885
|
}, e.value) : e.value);
|
|
1885
1886
|
}
|
|
1886
|
-
}),
|
|
1887
|
+
}), Fr = ["href"], Ir = /* @__PURE__ */ d({
|
|
1887
1888
|
__name: "ButtonBlock",
|
|
1888
1889
|
props: {
|
|
1889
1890
|
block: {},
|
|
@@ -1909,13 +1910,13 @@ var Mr = d({
|
|
|
1909
1910
|
style: k(n.value),
|
|
1910
1911
|
class: "tpl:cursor-default",
|
|
1911
1912
|
onClick: i[0] ||= O(() => {}, ["prevent"])
|
|
1912
|
-
}, [v(
|
|
1913
|
+
}, [v(Pr, { text: e.block.text }, null, 8, ["text"])], 12, Fr)], 4));
|
|
1913
1914
|
}
|
|
1914
|
-
}),
|
|
1915
|
+
}), Lr = ["innerHTML"], Rr = [
|
|
1915
1916
|
"src",
|
|
1916
1917
|
"width",
|
|
1917
1918
|
"height"
|
|
1918
|
-
],
|
|
1919
|
+
], zr = /* @__PURE__ */ d({
|
|
1919
1920
|
__name: "CustomBlockIcon",
|
|
1920
1921
|
props: {
|
|
1921
1922
|
icon: {},
|
|
@@ -1931,24 +1932,24 @@ var Mr = d({
|
|
|
1931
1932
|
height: `${n.value}px`
|
|
1932
1933
|
}),
|
|
1933
1934
|
innerHTML: e.icon
|
|
1934
|
-
}, null, 12,
|
|
1935
|
+
}, null, 12, Lr)) : i.value ? (s(), C("img", {
|
|
1935
1936
|
key: 1,
|
|
1936
1937
|
src: e.icon,
|
|
1937
1938
|
width: n.value,
|
|
1938
1939
|
height: n.value,
|
|
1939
1940
|
class: "tpl:inline-block",
|
|
1940
1941
|
alt: ""
|
|
1941
|
-
}, null, 8,
|
|
1942
|
+
}, null, 8, Rr)) : (s(), A(_(nn), {
|
|
1942
1943
|
key: 2,
|
|
1943
1944
|
size: n.value,
|
|
1944
1945
|
"stroke-width": 1.5
|
|
1945
1946
|
}, null, 8, ["size"]));
|
|
1946
1947
|
}
|
|
1947
|
-
}),
|
|
1948
|
-
function
|
|
1949
|
-
let r =
|
|
1948
|
+
}), Br = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1949
|
+
function Vr(e, n) {
|
|
1950
|
+
let r = on(), i = null, a = null, o = null;
|
|
1950
1951
|
function s() {
|
|
1951
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1952
|
+
return e.value ? Array.from(e.value.querySelectorAll(Br)).filter((e) => e.offsetParent !== null) : [];
|
|
1952
1953
|
}
|
|
1953
1954
|
function c(e) {
|
|
1954
1955
|
if (e.key !== "Tab") return;
|
|
@@ -1963,7 +1964,7 @@ function zr(e, n) {
|
|
|
1963
1964
|
o = null;
|
|
1964
1965
|
let t = s();
|
|
1965
1966
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1966
|
-
}), a =
|
|
1967
|
+
}), a = G(e, "keydown", c);
|
|
1967
1968
|
}
|
|
1968
1969
|
function u(e = {}) {
|
|
1969
1970
|
let t = e.restoreFocus !== !1;
|
|
@@ -1978,8 +1979,8 @@ function zr(e, n) {
|
|
|
1978
1979
|
}
|
|
1979
1980
|
//#endregion
|
|
1980
1981
|
//#region src/composables/useEmoji.ts
|
|
1981
|
-
function
|
|
1982
|
-
let [e, n] =
|
|
1982
|
+
function Hr() {
|
|
1983
|
+
let [e, n] = Ve(!1), r = x([]), i = !1;
|
|
1983
1984
|
h(() => {
|
|
1984
1985
|
i = !0;
|
|
1985
1986
|
}), t(e, async (e) => {
|
|
@@ -2004,7 +2005,7 @@ function Br() {
|
|
|
2004
2005
|
}
|
|
2005
2006
|
//#endregion
|
|
2006
2007
|
//#region src/composables/useFonts.ts
|
|
2007
|
-
var
|
|
2008
|
+
var Ur = [
|
|
2008
2009
|
{
|
|
2009
2010
|
value: "Arial",
|
|
2010
2011
|
label: "Arial"
|
|
@@ -2033,7 +2034,7 @@ var Vr = [
|
|
|
2033
2034
|
value: "Courier New",
|
|
2034
2035
|
label: "Courier New"
|
|
2035
2036
|
}
|
|
2036
|
-
],
|
|
2037
|
+
], Wr = {
|
|
2037
2038
|
arial: "Arial, sans-serif",
|
|
2038
2039
|
helvetica: "Helvetica, sans-serif",
|
|
2039
2040
|
georgia: "Georgia, serif",
|
|
@@ -2041,23 +2042,23 @@ var Vr = [
|
|
|
2041
2042
|
verdana: "Verdana, sans-serif",
|
|
2042
2043
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2043
2044
|
"courier new": "'Courier New', monospace"
|
|
2044
|
-
},
|
|
2045
|
-
function
|
|
2046
|
-
if (e === void 0 || e === !0) return [...
|
|
2045
|
+
}, Gr = "Arial, sans-serif";
|
|
2046
|
+
function Kr(e) {
|
|
2047
|
+
if (e === void 0 || e === !0) return [...Ur];
|
|
2047
2048
|
if (e === !1) return [];
|
|
2048
2049
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
2049
2050
|
for (let i of e) {
|
|
2050
|
-
let e = i.toLowerCase(), a =
|
|
2051
|
+
let e = i.toLowerCase(), a = Ur.find((t) => t.value.toLowerCase() === e);
|
|
2051
2052
|
if (!a) {
|
|
2052
|
-
r.has(e) || (r.add(e),
|
|
2053
|
+
r.has(e) || (r.add(e), X.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Ur.map((e) => e.value).join(", ")}.`));
|
|
2053
2054
|
continue;
|
|
2054
2055
|
}
|
|
2055
2056
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
2056
2057
|
}
|
|
2057
2058
|
return t;
|
|
2058
2059
|
}
|
|
2059
|
-
function
|
|
2060
|
-
let t = l(e?.customFonts ?? []), n = l(!1), r =
|
|
2060
|
+
function qr(e) {
|
|
2061
|
+
let t = l(e?.customFonts ?? []), n = l(!1), r = Kr(e?.builtIns), i = S(() => e?.defaultFallback ?? Gr), a = S(() => {
|
|
2061
2062
|
let e = [...r], n = t.value.map((e) => ({
|
|
2062
2063
|
value: e.name,
|
|
2063
2064
|
label: e.name,
|
|
@@ -2068,20 +2069,20 @@ function Gr(e) {
|
|
|
2068
2069
|
function s(e) {
|
|
2069
2070
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2070
2071
|
}
|
|
2071
|
-
let c = e?.defaultFont ??
|
|
2072
|
-
s(c) ||
|
|
2072
|
+
let c = e?.defaultFont ?? Gr.split(",")[0].trim();
|
|
2073
|
+
s(c) || X.warn(`config.fonts: new templates seed "${c}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
2073
2074
|
function u() {
|
|
2074
2075
|
if (e?.defaultFont && s(e.defaultFont)) {
|
|
2075
2076
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
2076
2077
|
if (t) return t.value;
|
|
2077
2078
|
}
|
|
2078
|
-
return
|
|
2079
|
+
return Gr;
|
|
2079
2080
|
}
|
|
2080
2081
|
let d = S(() => u());
|
|
2081
2082
|
function f(e) {
|
|
2082
2083
|
if (!e) return i.value;
|
|
2083
2084
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
2084
|
-
return n ? `'${n.name}', ${n.fallback ?? i.value}` :
|
|
2085
|
+
return n ? `'${n.name}', ${n.fallback ?? i.value}` : Wr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
2085
2086
|
}
|
|
2086
2087
|
let p = [], m = !1;
|
|
2087
2088
|
async function g() {
|
|
@@ -2097,7 +2098,7 @@ function Gr(e) {
|
|
|
2097
2098
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2098
2099
|
});
|
|
2099
2100
|
} catch (t) {
|
|
2100
|
-
|
|
2101
|
+
X.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2101
2102
|
}
|
|
2102
2103
|
});
|
|
2103
2104
|
await Promise.allSettled(e), !m && (n.value = !0);
|
|
@@ -2122,8 +2123,8 @@ function Gr(e) {
|
|
|
2122
2123
|
}
|
|
2123
2124
|
//#endregion
|
|
2124
2125
|
//#region src/composables/useLogicTag.ts
|
|
2125
|
-
function
|
|
2126
|
-
let e = n(
|
|
2126
|
+
function Jr() {
|
|
2127
|
+
let e = n(jt, []), t = n(Je, []), r = n(rt, Ne.liquid), i = n(Xe, null), a = n(ct, null), o = n(Ye, null) ?? l(!1), s = !!i || e.length > 0 || t.length > 0, c = e.length > 0 || t.length > 0;
|
|
2127
2128
|
async function u() {
|
|
2128
2129
|
if (i) {
|
|
2129
2130
|
o.value = !0;
|
|
@@ -2154,7 +2155,7 @@ function Kr() {
|
|
|
2154
2155
|
}
|
|
2155
2156
|
//#endregion
|
|
2156
2157
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
2157
|
-
function
|
|
2158
|
+
function Yr(e, t, n) {
|
|
2158
2159
|
return ye(e, n) ? {
|
|
2159
2160
|
type: "logicMergeTagNode",
|
|
2160
2161
|
attrs: {
|
|
@@ -2171,15 +2172,15 @@ function qr(e, t, n) {
|
|
|
2171
2172
|
}
|
|
2172
2173
|
//#endregion
|
|
2173
2174
|
//#region src/utils/insertLogicTag.ts
|
|
2174
|
-
function
|
|
2175
|
+
function Xr(e) {
|
|
2175
2176
|
return "before" in e && "after" in e;
|
|
2176
2177
|
}
|
|
2177
|
-
function
|
|
2178
|
-
if (!
|
|
2179
|
-
e.chain().focus().insertContent(
|
|
2178
|
+
function Zr(e, t, n) {
|
|
2179
|
+
if (!Xr(t)) {
|
|
2180
|
+
e.chain().focus().insertContent(Yr(t.value, t.label, n)).run();
|
|
2180
2181
|
return;
|
|
2181
2182
|
}
|
|
2182
|
-
let r =
|
|
2183
|
+
let r = Yr(t.before, t.label, n), i = Yr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
2183
2184
|
if (a !== o) {
|
|
2184
2185
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
2185
2186
|
return;
|
|
@@ -2188,20 +2189,20 @@ function Yr(e, t, n) {
|
|
|
2188
2189
|
}
|
|
2189
2190
|
//#endregion
|
|
2190
2191
|
//#region src/utils/linkColorExtension.ts
|
|
2191
|
-
function
|
|
2192
|
+
function Qr(e) {
|
|
2192
2193
|
if (!e) return null;
|
|
2193
2194
|
let t = e.trim();
|
|
2194
2195
|
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;
|
|
2195
2196
|
}
|
|
2196
|
-
function
|
|
2197
|
+
function $r(e) {
|
|
2197
2198
|
return e.extend({ addAttributes() {
|
|
2198
2199
|
return {
|
|
2199
2200
|
...this.parent?.(),
|
|
2200
2201
|
color: {
|
|
2201
2202
|
default: null,
|
|
2202
|
-
parseHTML: (e) =>
|
|
2203
|
+
parseHTML: (e) => Qr(It(e.style.color)),
|
|
2203
2204
|
renderHTML: (e) => {
|
|
2204
|
-
let t =
|
|
2205
|
+
let t = Qr(e.color);
|
|
2205
2206
|
return t ? { style: `color: ${t}` } : {};
|
|
2206
2207
|
}
|
|
2207
2208
|
}
|
|
@@ -2210,9 +2211,9 @@ function Zr(e) {
|
|
|
2210
2211
|
}
|
|
2211
2212
|
//#endregion
|
|
2212
2213
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2213
|
-
function
|
|
2214
|
+
function ei(e, t = Ne.liquid) {
|
|
2214
2215
|
let n = l(!1), r = l(""), i = l(""), a = l(null);
|
|
2215
|
-
|
|
2216
|
+
Vr(a, n);
|
|
2216
2217
|
function o() {
|
|
2217
2218
|
let t = e.value?.getAttributes("link") ?? {};
|
|
2218
2219
|
r.value = t.href || "", i.value = t.color || "", n.value = !0;
|
|
@@ -2221,7 +2222,7 @@ function Qr(e, t = Me.liquid) {
|
|
|
2221
2222
|
if (r.value) {
|
|
2222
2223
|
let t = d(r.value);
|
|
2223
2224
|
if (t !== null) {
|
|
2224
|
-
let n =
|
|
2225
|
+
let n = Qr(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
2225
2226
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
2226
2227
|
}
|
|
2227
2228
|
}
|
|
@@ -2271,13 +2272,13 @@ function Qr(e, t = Me.liquid) {
|
|
|
2271
2272
|
}
|
|
2272
2273
|
//#endregion
|
|
2273
2274
|
//#region src/composables/useRichTextEditor.ts
|
|
2274
|
-
function
|
|
2275
|
-
let i = n(
|
|
2275
|
+
function ti(r) {
|
|
2276
|
+
let i = n(J, null), { mergeTags: a, canRequestMergeTag: o, isRequesting: s, requestMergeTag: c, syntax: u, autocomplete: d } = sn(), { canInsertLogicTag: f, isRequesting: p, requestLogicTag: m } = Jr(), h = n(Dt, null), g = (N(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", _ = De(u), v = x(null), y = () => de(i?.content?.value?.settings ?? { locale: "en" });
|
|
2276
2277
|
t(y, (e) => {
|
|
2277
2278
|
let t = v.value?.view.dom;
|
|
2278
2279
|
t && t.setAttribute("dir", e);
|
|
2279
2280
|
});
|
|
2280
|
-
let { showLinkDialog: b, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } =
|
|
2281
|
+
let { showLinkDialog: b, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = ei(v, u), { start: A, stop: j } = ze(() => v.value?.commands.focus("end"), 0, { immediate: !1 }), M = x(null), P = l(!0), F = l(null), I = !1;
|
|
2281
2282
|
async function L() {
|
|
2282
2283
|
F.value = null, P.value = !0;
|
|
2283
2284
|
try {
|
|
@@ -2308,7 +2309,7 @@ function $r(r) {
|
|
|
2308
2309
|
v.value = s, P.value = !1, A();
|
|
2309
2310
|
} catch (e) {
|
|
2310
2311
|
if (I) return;
|
|
2311
|
-
|
|
2312
|
+
X.error(`[${r.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
|
|
2312
2313
|
}
|
|
2313
2314
|
}
|
|
2314
2315
|
function R() {
|
|
@@ -2326,7 +2327,7 @@ function $r(r) {
|
|
|
2326
2327
|
let i = t.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
2327
2328
|
n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog") || i || r.onDone();
|
|
2328
2329
|
}
|
|
2329
|
-
|
|
2330
|
+
G(document, "mousedown", B), e(() => {
|
|
2330
2331
|
I = !0, z(), j(), v.value?.destroy();
|
|
2331
2332
|
});
|
|
2332
2333
|
async function V() {
|
|
@@ -2338,7 +2339,7 @@ function $r(r) {
|
|
|
2338
2339
|
}
|
|
2339
2340
|
async function H() {
|
|
2340
2341
|
let e = await m();
|
|
2341
|
-
I || (e && v.value ?
|
|
2342
|
+
I || (e && v.value ? Zr(v.value, e, u) : v.value?.commands.focus());
|
|
2342
2343
|
}
|
|
2343
2344
|
return {
|
|
2344
2345
|
editor: v,
|
|
@@ -2367,9 +2368,9 @@ function $r(r) {
|
|
|
2367
2368
|
}
|
|
2368
2369
|
//#endregion
|
|
2369
2370
|
//#region src/composables/useSmallScreenNotice.ts
|
|
2370
|
-
var
|
|
2371
|
-
function
|
|
2372
|
-
let t =
|
|
2371
|
+
var ni = "(max-width: 767px)";
|
|
2372
|
+
function ri(e) {
|
|
2373
|
+
let t = Ue(ni);
|
|
2373
2374
|
return {
|
|
2374
2375
|
isSmallScreen: t,
|
|
2375
2376
|
showNotice: S(() => (P(e) ?? !0) && t.value)
|
|
@@ -2377,20 +2378,20 @@ function ti(e) {
|
|
|
2377
2378
|
}
|
|
2378
2379
|
//#endregion
|
|
2379
2380
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2380
|
-
var
|
|
2381
|
+
var ii = { class: "tpl:w-full" }, ai = {
|
|
2381
2382
|
key: 0,
|
|
2382
2383
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
2383
|
-
},
|
|
2384
|
+
}, oi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, si = {
|
|
2384
2385
|
key: 1,
|
|
2385
2386
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
2386
|
-
},
|
|
2387
|
+
}, ci = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, li = {
|
|
2387
2388
|
key: 2,
|
|
2388
2389
|
class: "tpl:relative"
|
|
2389
|
-
},
|
|
2390
|
+
}, ui = ["innerHTML"], di = {
|
|
2390
2391
|
key: 0,
|
|
2391
2392
|
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]",
|
|
2392
2393
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2393
|
-
},
|
|
2394
|
+
}, fi = /* @__PURE__ */ d({
|
|
2394
2395
|
__name: "CustomBlock",
|
|
2395
2396
|
props: {
|
|
2396
2397
|
block: {},
|
|
@@ -2398,7 +2399,7 @@ var ni = { class: "tpl:w-full" }, ri = {
|
|
|
2398
2399
|
},
|
|
2399
2400
|
emits: ["fetchData"],
|
|
2400
2401
|
setup(e, { emit: r }) {
|
|
2401
|
-
let i = e, a = r, { t: o } =
|
|
2402
|
+
let i = e, a = r, { t: o } = Y(), c = n(kt, null), u = l(""), d = l(!1), f = S(() => c?.getDefinition(i.block.customType)), p = S(() => !!f.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: y } = Sn({
|
|
2402
2403
|
definition: f,
|
|
2403
2404
|
block: S(() => i.block),
|
|
2404
2405
|
onUpdate: (e, t) => {
|
|
@@ -2407,10 +2408,10 @@ var ni = { class: "tpl:w-full" }, ri = {
|
|
|
2407
2408
|
dataSourceFetched: t
|
|
2408
2409
|
});
|
|
2409
2410
|
}
|
|
2410
|
-
}), b = n(
|
|
2411
|
+
}), b = n(K, at), x = n(q, null), T = S(() => {
|
|
2411
2412
|
if (!x?.value) return i.block;
|
|
2412
2413
|
let e = {};
|
|
2413
|
-
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? ge(n, b) : n;
|
|
2414
|
+
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? ge(n, b.value) : n;
|
|
2414
2415
|
return {
|
|
2415
2416
|
...i.block,
|
|
2416
2417
|
fieldValues: e
|
|
@@ -2427,17 +2428,17 @@ var ni = { class: "tpl:w-full" }, ri = {
|
|
|
2427
2428
|
}
|
|
2428
2429
|
}
|
|
2429
2430
|
}
|
|
2430
|
-
let k =
|
|
2431
|
+
let k = Be(D, 150);
|
|
2431
2432
|
return E(() => {
|
|
2432
2433
|
D();
|
|
2433
2434
|
}), t(() => i.block.fieldValues, () => {
|
|
2434
2435
|
k();
|
|
2435
2436
|
}, { deep: !0 }), t(() => x?.value, () => {
|
|
2436
2437
|
k();
|
|
2437
|
-
}), (e, t) => (s(), C("div",
|
|
2438
|
+
}), (e, t) => (s(), C("div", ii, [p.value ? d.value ? (s(), C("div", si, [v(_($t), {
|
|
2438
2439
|
size: 24,
|
|
2439
2440
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2440
|
-
}), M("span",
|
|
2441
|
+
}), M("span", ci, R(_(o).customBlocks.renderError), 1)])) : (s(), C("div", li, [M("div", { innerHTML: u.value }, null, 8, ui), _(y) && _(g) ? (s(), C("div", di, [_(m) ? (s(), A(rn, {
|
|
2441
2442
|
key: 1,
|
|
2442
2443
|
class: "tpl:w-48"
|
|
2443
2444
|
})) : (s(), C("button", {
|
|
@@ -2445,16 +2446,16 @@ var ni = { class: "tpl:w-full" }, ri = {
|
|
|
2445
2446
|
type: "button",
|
|
2446
2447
|
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)]",
|
|
2447
2448
|
onClick: t[0] ||= O((...e) => _(h) && _(h)(...e), ["stop"])
|
|
2448
|
-
}, [f.value?.icon ? (s(), A(
|
|
2449
|
+
}, [f.value?.icon ? (s(), A(zr, {
|
|
2449
2450
|
key: 0,
|
|
2450
2451
|
icon: f.value.icon,
|
|
2451
2452
|
size: 16
|
|
2452
|
-
}, null, 8, ["icon"])) : w("", !0), V(" " + R(f.value?.dataSource?.label || _(o).customBlocks.dataSource.fetchButton), 1)]))])) : w("", !0)])) : (s(), C("div",
|
|
2453
|
+
}, null, 8, ["icon"])) : w("", !0), V(" " + R(f.value?.dataSource?.label || _(o).customBlocks.dataSource.fetchButton), 1)]))])) : w("", !0)])) : (s(), C("div", ai, [v(_(Ht), {
|
|
2453
2454
|
size: 24,
|
|
2454
2455
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2455
|
-
}), M("span",
|
|
2456
|
+
}), M("span", oi, R(_(o).customBlocks.definitionNotFound), 1)]))]));
|
|
2456
2457
|
}
|
|
2457
|
-
}),
|
|
2458
|
+
}), pi = { class: "tpl:w-full" }, mi = /* @__PURE__ */ d({
|
|
2458
2459
|
__name: "DividerBlock",
|
|
2459
2460
|
props: {
|
|
2460
2461
|
block: {},
|
|
@@ -2466,28 +2467,28 @@ var ni = { class: "tpl:w-full" }, ri = {
|
|
|
2466
2467
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2467
2468
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2468
2469
|
}));
|
|
2469
|
-
return (e, t) => (s(), C("div",
|
|
2470
|
+
return (e, t) => (s(), C("div", pi, [M("hr", {
|
|
2470
2471
|
class: "tpl:m-0 tpl:border-none",
|
|
2471
2472
|
style: k(n.value)
|
|
2472
2473
|
}, null, 4)]));
|
|
2473
2474
|
}
|
|
2474
|
-
}),
|
|
2475
|
+
}), hi = { class: "tpl:w-full" }, gi = ["srcdoc", "title"], _i = {
|
|
2475
2476
|
key: 1,
|
|
2476
2477
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
2477
|
-
},
|
|
2478
|
+
}, vi = {
|
|
2478
2479
|
key: 0,
|
|
2479
2480
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2480
|
-
},
|
|
2481
|
+
}, yi = {
|
|
2481
2482
|
key: 1,
|
|
2482
2483
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2483
|
-
},
|
|
2484
|
+
}, bi = /* @__PURE__ */ d({
|
|
2484
2485
|
__name: "HtmlBlock",
|
|
2485
2486
|
props: {
|
|
2486
2487
|
block: {},
|
|
2487
2488
|
viewport: {}
|
|
2488
2489
|
},
|
|
2489
2490
|
setup(r) {
|
|
2490
|
-
let i = r, { t: a } =
|
|
2491
|
+
let i = r, { t: a } = Y(), o = n(ht, !1), c = S(() => i.block.content.trim().length > 0), u = S(() => o && c.value), d = n(K, at), f = n(q, null), p = S(() => f?.value ? ge(i.block.content, d.value) : i.block.content), m = l(null), h = l(60), g = null;
|
|
2491
2492
|
function y() {
|
|
2492
2493
|
let e = m.value?.contentDocument;
|
|
2493
2494
|
e && (h.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -2501,7 +2502,7 @@ var ni = { class: "tpl:w-full" }, ri = {
|
|
|
2501
2502
|
e || (g?.disconnect(), g = null);
|
|
2502
2503
|
}), e(() => {
|
|
2503
2504
|
g?.disconnect(), g = null;
|
|
2504
|
-
}), (e, t) => (s(), C("div",
|
|
2505
|
+
}), (e, t) => (s(), C("div", hi, [u.value ? (s(), C("iframe", {
|
|
2505
2506
|
key: 0,
|
|
2506
2507
|
ref_key: "iframeRef",
|
|
2507
2508
|
ref: m,
|
|
@@ -2511,18 +2512,18 @@ var ni = { class: "tpl:w-full" }, ri = {
|
|
|
2511
2512
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2512
2513
|
style: k({ height: `${h.value}px` }),
|
|
2513
2514
|
onLoad: b
|
|
2514
|
-
}, null, 44,
|
|
2515
|
+
}, null, 44, gi)) : (s(), C("div", _i, [v(_(Ut), {
|
|
2515
2516
|
size: 24,
|
|
2516
2517
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2517
|
-
}), c.value ? (s(), C("span",
|
|
2518
|
+
}), c.value ? (s(), C("span", vi, R(_(a).html.preview), 1)) : (s(), C("span", yi, R(_(a).html.empty), 1))]))]));
|
|
2518
2519
|
}
|
|
2519
|
-
}),
|
|
2520
|
-
function
|
|
2521
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } =
|
|
2520
|
+
}), xi = "image/";
|
|
2521
|
+
function Si(e) {
|
|
2522
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } = Ge(t, {
|
|
2522
2523
|
preventDefaultForUnhandled: !0,
|
|
2523
2524
|
onDrop: (e) => {
|
|
2524
2525
|
if (!i()) return;
|
|
2525
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
2526
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(xi));
|
|
2526
2527
|
t.length > 0 && n([t[0]]);
|
|
2527
2528
|
}
|
|
2528
2529
|
});
|
|
@@ -2530,17 +2531,17 @@ function bi(e) {
|
|
|
2530
2531
|
}
|
|
2531
2532
|
//#endregion
|
|
2532
2533
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2533
|
-
var
|
|
2534
|
+
var Ci = ["data-drop-enabled"], wi = {
|
|
2534
2535
|
key: 0,
|
|
2535
2536
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
2536
2537
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
2537
|
-
},
|
|
2538
|
+
}, Ti = ["href"], Ei = ["src", "alt"], Di = ["src", "alt"], Oi = {
|
|
2538
2539
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2539
2540
|
style: { opacity: "0.7" }
|
|
2540
|
-
},
|
|
2541
|
+
}, ki = ["href"], Ai = ["src", "alt"], ji = ["src", "alt"], Mi = {
|
|
2541
2542
|
key: 4,
|
|
2542
2543
|
class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
2543
|
-
},
|
|
2544
|
+
}, Ni = ["aria-label"], Pi = { key: 1 }, Fi = /* @__PURE__ */ d({
|
|
2544
2545
|
__name: "ImageBlock",
|
|
2545
2546
|
props: {
|
|
2546
2547
|
block: {},
|
|
@@ -2548,7 +2549,7 @@ var xi = ["data-drop-enabled"], Si = {
|
|
|
2548
2549
|
},
|
|
2549
2550
|
emits: ["update"],
|
|
2550
2551
|
setup(e, { emit: t }) {
|
|
2551
|
-
let r = e, i = t, { t: a } =
|
|
2552
|
+
let r = e, i = t, { t: a } = Y(), { syntax: o } = sn(), c = n(Qe, null), u = n(gt, null), d = S(() => !!c), f = cn();
|
|
2552
2553
|
async function p() {
|
|
2553
2554
|
let e = await c?.({ accept: ["images"] });
|
|
2554
2555
|
if (f.alive && e) {
|
|
@@ -2575,7 +2576,7 @@ var xi = ["data-drop-enabled"], Si = {
|
|
|
2575
2576
|
}
|
|
2576
2577
|
}
|
|
2577
2578
|
}
|
|
2578
|
-
let { isOver: b } =
|
|
2579
|
+
let { isOver: b } = Si({
|
|
2579
2580
|
target: m,
|
|
2580
2581
|
enabled: g,
|
|
2581
2582
|
onFiles: y
|
|
@@ -2590,7 +2591,7 @@ var xi = ["data-drop-enabled"], Si = {
|
|
|
2590
2591
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2591
2592
|
marginRight: e === "center" ? "auto" : void 0
|
|
2592
2593
|
};
|
|
2593
|
-
}), E = S(() =>
|
|
2594
|
+
}), E = S(() => Ce(r.block.src, o)), D = zn(() => E.value ? void 0 : r.block.src), A = zn(() => E.value ? r.block.placeholderUrl : void 0);
|
|
2594
2595
|
return (t, n) => (s(), C("div", {
|
|
2595
2596
|
ref_key: "dropZoneRef",
|
|
2596
2597
|
ref: m,
|
|
@@ -2598,11 +2599,11 @@ var xi = ["data-drop-enabled"], Si = {
|
|
|
2598
2599
|
"data-drop-enabled": g.value,
|
|
2599
2600
|
class: "tpl:relative tpl:w-full",
|
|
2600
2601
|
style: k(x.value)
|
|
2601
|
-
}, [g.value && (_(b) || h.value) ? (s(), C("div",
|
|
2602
|
+
}, [g.value && (_(b) || h.value) ? (s(), C("div", wi, [h.value ? (s(), C(L, { key: 0 }, [v(_(Yt), {
|
|
2602
2603
|
class: "tpl-spinner",
|
|
2603
2604
|
size: 20,
|
|
2604
2605
|
"stroke-width": 2
|
|
2605
|
-
}), V(" " + R(_(a).image.uploading), 1)], 64)) : (s(), C(L, { key: 1 }, [v(_(
|
|
2606
|
+
}), V(" " + R(_(a).image.uploading), 1)], 64)) : (s(), C(L, { key: 1 }, [v(_(Zt), {
|
|
2606
2607
|
size: 20,
|
|
2607
2608
|
"stroke-width": 1.5
|
|
2608
2609
|
}), V(" " + R(_(a).image.dropToUpload), 1)], 64))])) : w("", !0), e.block.src && E.value && e.block.placeholderUrl ? (s(), C(L, { key: 1 }, [e.block.linkUrl ? (s(), C("a", {
|
|
@@ -2617,22 +2618,22 @@ var xi = ["data-drop-enabled"], Si = {
|
|
|
2617
2618
|
src: _(A),
|
|
2618
2619
|
alt: e.block.alt || _(a).image.altTextPlaceholder,
|
|
2619
2620
|
style: k(T.value)
|
|
2620
|
-
}, null, 12,
|
|
2621
|
+
}, null, 12, Ei)], 8, Ti)) : (s(), C("img", {
|
|
2621
2622
|
key: 1,
|
|
2622
2623
|
class: "tpl:border-0",
|
|
2623
2624
|
src: _(A),
|
|
2624
2625
|
alt: e.block.alt,
|
|
2625
2626
|
style: k(T.value)
|
|
2626
|
-
}, null, 12,
|
|
2627
|
+
}, null, 12, Di))], 64)) : e.block.src && E.value ? (s(), C("div", {
|
|
2627
2628
|
key: 2,
|
|
2628
2629
|
class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
2629
2630
|
style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, T.value])
|
|
2630
|
-
}, [v(_(
|
|
2631
|
+
}, [v(_(qt), {
|
|
2631
2632
|
size: 32,
|
|
2632
2633
|
"stroke-width": 1.5,
|
|
2633
2634
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2634
2635
|
style: { opacity: "0.5" }
|
|
2635
|
-
}), M("span",
|
|
2636
|
+
}), M("span", Oi, [v(Pr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), C(L, { key: 3 }, [e.block.linkUrl ? (s(), C("a", {
|
|
2636
2637
|
key: 0,
|
|
2637
2638
|
href: e.block.linkUrl,
|
|
2638
2639
|
target: "_blank",
|
|
@@ -2644,33 +2645,33 @@ var xi = ["data-drop-enabled"], Si = {
|
|
|
2644
2645
|
src: _(D),
|
|
2645
2646
|
alt: e.block.alt || _(a).image.altTextPlaceholder,
|
|
2646
2647
|
style: k(T.value)
|
|
2647
|
-
}, null, 12,
|
|
2648
|
+
}, null, 12, Ai)], 8, ki)) : (s(), C("img", {
|
|
2648
2649
|
key: 1,
|
|
2649
2650
|
class: "tpl:border-0",
|
|
2650
2651
|
src: _(D),
|
|
2651
2652
|
alt: e.block.alt,
|
|
2652
2653
|
style: k(T.value)
|
|
2653
|
-
}, null, 12,
|
|
2654
|
+
}, null, 12, ji))], 64)) : (s(), C("div", Mi, [d.value ? (s(), C("button", {
|
|
2654
2655
|
key: 0,
|
|
2655
2656
|
"aria-label": _(a).image.browseMedia,
|
|
2656
2657
|
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)]",
|
|
2657
2658
|
onClick: O(p, ["stop"])
|
|
2658
|
-
}, [v(_(
|
|
2659
|
+
}, [v(_(qt), {
|
|
2659
2660
|
size: 14,
|
|
2660
2661
|
"stroke-width": 1.5
|
|
2661
|
-
}), V(" " + R(_(a).image.browseMedia), 1)], 8,
|
|
2662
|
+
}), V(" " + R(_(a).image.browseMedia), 1)], 8, Ni)) : (s(), C("span", Pi, R(_(a).image.clickToAdd), 1))]))], 12, Ci));
|
|
2662
2663
|
}
|
|
2663
|
-
}),
|
|
2664
|
+
}), Ii = { class: "tpl:w-full" }, Li = ["href"], Ri = {
|
|
2664
2665
|
key: 1,
|
|
2665
2666
|
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)]"
|
|
2666
|
-
},
|
|
2667
|
+
}, zi = /* @__PURE__ */ d({
|
|
2667
2668
|
__name: "MenuBlock",
|
|
2668
2669
|
props: {
|
|
2669
2670
|
block: {},
|
|
2670
2671
|
viewport: {}
|
|
2671
2672
|
},
|
|
2672
2673
|
setup(e) {
|
|
2673
|
-
let t = e, { t: n } =
|
|
2674
|
+
let t = e, { t: n } = Y(), i = S(() => ({
|
|
2674
2675
|
display: "flex",
|
|
2675
2676
|
flexWrap: "wrap",
|
|
2676
2677
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -2682,7 +2683,7 @@ var xi = ["data-drop-enabled"], Si = {
|
|
|
2682
2683
|
function o(e) {
|
|
2683
2684
|
return e || t.block.linkColor || t.block.color;
|
|
2684
2685
|
}
|
|
2685
|
-
return (t, c) => (s(), C("div",
|
|
2686
|
+
return (t, c) => (s(), C("div", Ii, [a.value ? (s(), C("div", {
|
|
2686
2687
|
key: 0,
|
|
2687
2688
|
style: k(i.value)
|
|
2688
2689
|
}, [(s(!0), C(L, null, r(e.block.items, (t, n) => (s(), C(L, { key: t.id }, [M("a", {
|
|
@@ -2694,15 +2695,15 @@ var xi = ["data-drop-enabled"], Si = {
|
|
|
2694
2695
|
textDecoration: t.underline ? "underline" : "none"
|
|
2695
2696
|
}),
|
|
2696
2697
|
onClick: c[0] ||= O(() => {}, ["prevent"])
|
|
2697
|
-
}, [v(
|
|
2698
|
+
}, [v(Pr, { text: t.text || "..." }, null, 8, ["text"])], 12, Li), n < e.block.items.length - 1 ? (s(), C("span", {
|
|
2698
2699
|
key: 0,
|
|
2699
2700
|
style: k({
|
|
2700
2701
|
color: e.block.separatorColor,
|
|
2701
2702
|
padding: `0 ${e.block.spacing}px`
|
|
2702
2703
|
})
|
|
2703
|
-
}, R(e.block.separator), 5)) : w("", !0)], 64))), 128))], 4)) : (s(), C("div",
|
|
2704
|
+
}, R(e.block.separator), 5)) : w("", !0)], 64))), 128))], 4)) : (s(), C("div", Ri, [v(_(Gt), { size: 16 }), M("span", null, R(_(n).menu.addLinks), 1)]))]));
|
|
2704
2705
|
}
|
|
2705
|
-
}),
|
|
2706
|
+
}), Bi = /* @__PURE__ */ new Set([
|
|
2706
2707
|
"http",
|
|
2707
2708
|
"https",
|
|
2708
2709
|
"mailto",
|
|
@@ -2712,7 +2713,7 @@ var xi = ["data-drop-enabled"], Si = {
|
|
|
2712
2713
|
"sms",
|
|
2713
2714
|
"xmpp",
|
|
2714
2715
|
"cid"
|
|
2715
|
-
]),
|
|
2716
|
+
]), Vi = /* @__PURE__ */ new Set([
|
|
2716
2717
|
"SCRIPT",
|
|
2717
2718
|
"STYLE",
|
|
2718
2719
|
"IFRAME",
|
|
@@ -2722,7 +2723,7 @@ var xi = ["data-drop-enabled"], Si = {
|
|
|
2722
2723
|
"META",
|
|
2723
2724
|
"BASE",
|
|
2724
2725
|
"FORM"
|
|
2725
|
-
]),
|
|
2726
|
+
]), Hi = /* @__PURE__ */ new Set([
|
|
2726
2727
|
"href",
|
|
2727
2728
|
"xlink:href",
|
|
2728
2729
|
"formaction",
|
|
@@ -2731,16 +2732,16 @@ var xi = ["data-drop-enabled"], Si = {
|
|
|
2731
2732
|
"background",
|
|
2732
2733
|
"poster"
|
|
2733
2734
|
]);
|
|
2734
|
-
function
|
|
2735
|
+
function Ui(e, t) {
|
|
2735
2736
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2736
2737
|
if (!n || n.startsWith("#")) return !0;
|
|
2737
2738
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
2738
2739
|
if (!r) return !0;
|
|
2739
2740
|
let i = r[1].toLowerCase();
|
|
2740
|
-
return
|
|
2741
|
+
return Bi.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
2741
2742
|
}
|
|
2742
|
-
function
|
|
2743
|
-
if (
|
|
2743
|
+
function Wi(e) {
|
|
2744
|
+
if (Vi.has(e.tagName)) {
|
|
2744
2745
|
e.remove();
|
|
2745
2746
|
return;
|
|
2746
2747
|
}
|
|
@@ -2752,29 +2753,29 @@ function Hi(e) {
|
|
|
2752
2753
|
e.removeAttribute(n);
|
|
2753
2754
|
continue;
|
|
2754
2755
|
}
|
|
2755
|
-
if (
|
|
2756
|
-
|
|
2756
|
+
if (Hi.has(t)) {
|
|
2757
|
+
Ui(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
2757
2758
|
continue;
|
|
2758
2759
|
}
|
|
2759
2760
|
if (t === "src") {
|
|
2760
|
-
|
|
2761
|
+
Ui(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
2761
2762
|
continue;
|
|
2762
2763
|
}
|
|
2763
2764
|
t === "srcdoc" && e.removeAttribute(n);
|
|
2764
2765
|
}
|
|
2765
2766
|
let n = Array.from(e.children);
|
|
2766
|
-
for (let e of n)
|
|
2767
|
+
for (let e of n) Wi(e);
|
|
2767
2768
|
}
|
|
2768
|
-
function
|
|
2769
|
+
function Gi(e) {
|
|
2769
2770
|
if (typeof DOMParser > "u") return e;
|
|
2770
2771
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
2771
|
-
for (let e of n)
|
|
2772
|
+
for (let e of n) Wi(e);
|
|
2772
2773
|
return t.innerHTML;
|
|
2773
2774
|
}
|
|
2774
2775
|
//#endregion
|
|
2775
2776
|
//#region src/composables/useEditableTextBlock.ts
|
|
2776
|
-
function
|
|
2777
|
-
let t = n(
|
|
2777
|
+
function Ki(e) {
|
|
2778
|
+
let t = n(K, at), r = n(q, null), { syntax: i } = sn(), a = S(() => r?.value ? xe(e(), t.value) : Oe(e(), t.value)), o = S(() => Gi(Me(a.value, i))), s = l(!1), c = l(null), { top: u, left: d } = We(c), { toLocal: f } = Rt(), p = S(() => f({
|
|
2778
2779
|
top: u.value - 8,
|
|
2779
2780
|
left: d.value
|
|
2780
2781
|
}));
|
|
@@ -2795,14 +2796,14 @@ function Wi(e) {
|
|
|
2795
2796
|
}
|
|
2796
2797
|
//#endregion
|
|
2797
2798
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2798
|
-
var
|
|
2799
|
+
var qi = ["innerHTML"], Ji = /* @__PURE__ */ d({
|
|
2799
2800
|
__name: "ParagraphBlock",
|
|
2800
2801
|
props: {
|
|
2801
2802
|
block: {},
|
|
2802
2803
|
viewport: {}
|
|
2803
2804
|
},
|
|
2804
2805
|
setup(e) {
|
|
2805
|
-
let t = e, n = B(() => import("./ParagraphEditor-
|
|
2806
|
+
let t = e, n = B(() => import("./ParagraphEditor-D1tsPv4v.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = Ki(() => t.block.content);
|
|
2806
2807
|
return (t, u) => (s(), C("div", {
|
|
2807
2808
|
ref_key: "blockRef",
|
|
2808
2809
|
ref: i,
|
|
@@ -2821,54 +2822,54 @@ var Gi = ["innerHTML"], Ki = /* @__PURE__ */ d({
|
|
|
2821
2822
|
key: 1,
|
|
2822
2823
|
class: "tpl-text-content tpl:outline-none",
|
|
2823
2824
|
innerHTML: _(o)
|
|
2824
|
-
}, null, 8,
|
|
2825
|
+
}, null, 8, qi))], 544));
|
|
2825
2826
|
}
|
|
2826
2827
|
});
|
|
2827
2828
|
//#endregion
|
|
2828
2829
|
//#region src/utils/blockComponentResolver.ts
|
|
2829
|
-
function
|
|
2830
|
+
function Yi(e) {
|
|
2830
2831
|
let t = { fontFamily: e.fontFamily };
|
|
2831
2832
|
return e.textColor && (t.color = e.textColor), e.linkColor && (t["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (t["--tpl-doc-link-underline"] = "underline"), t;
|
|
2832
2833
|
}
|
|
2833
|
-
function
|
|
2834
|
+
function Xi(e, t, n) {
|
|
2834
2835
|
if (t) {
|
|
2835
2836
|
let n = t.getComponent(e);
|
|
2836
2837
|
if (n) return n;
|
|
2837
2838
|
}
|
|
2838
2839
|
return n[e.type] ?? null;
|
|
2839
2840
|
}
|
|
2840
|
-
function
|
|
2841
|
+
function Zi(e) {
|
|
2841
2842
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2842
2843
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2843
2844
|
backgroundColor: n || "transparent"
|
|
2844
2845
|
};
|
|
2845
|
-
return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
2846
|
+
return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? we.paragraphGap : we.paragraphGap}px`), e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2846
2847
|
}
|
|
2847
|
-
function
|
|
2848
|
+
function Qi(e) {
|
|
2848
2849
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2849
2850
|
let t = e.wrapper, n = {};
|
|
2850
2851
|
return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
|
|
2851
2852
|
}
|
|
2852
2853
|
//#endregion
|
|
2853
2854
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2854
|
-
var
|
|
2855
|
+
var $i = [
|
|
2855
2856
|
"data-block-id",
|
|
2856
2857
|
"data-block-type",
|
|
2857
2858
|
"data-tpl-picked"
|
|
2858
|
-
],
|
|
2859
|
+
], ea = ["aria-label"], ta = [
|
|
2859
2860
|
"aria-label",
|
|
2860
2861
|
"aria-pressed",
|
|
2861
2862
|
"title"
|
|
2862
|
-
],
|
|
2863
|
+
], na = ["aria-label", "title"], ra = ["aria-label", "title"], ia = ["aria-label", "title"], aa = {
|
|
2863
2864
|
key: 1,
|
|
2864
2865
|
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"
|
|
2865
|
-
},
|
|
2866
|
+
}, oa = { 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)]" }, sa = {
|
|
2866
2867
|
key: 2,
|
|
2867
2868
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2868
|
-
},
|
|
2869
|
+
}, ca = ["aria-label", "title"], la = {
|
|
2869
2870
|
key: 3,
|
|
2870
2871
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2871
|
-
},
|
|
2872
|
+
}, ua = ["aria-label"], da = /*#__PURE__*/ an(/* @__PURE__ */ d({
|
|
2872
2873
|
__name: "BlockWrapper",
|
|
2873
2874
|
props: {
|
|
2874
2875
|
block: {},
|
|
@@ -2880,7 +2881,7 @@ var Zi = [
|
|
|
2880
2881
|
},
|
|
2881
2882
|
emits: ["select"],
|
|
2882
2883
|
setup(e, { emit: t }) {
|
|
2883
|
-
let r = B(() => import("./BlockIssueBadge-
|
|
2884
|
+
let r = B(() => import("./BlockIssueBadge-B6PpoOPv.js")), i = e, o = t, { t: c, format: u } = Y(), d = n(st, null), f = l(null), p = S(() => d?.liftedBlockId.value === i.block.id), m = S(() => p.value ? u(c.blockActions.dragLifted, { block: i.block.type }) : c.blockActions.drag);
|
|
2884
2885
|
async function h() {
|
|
2885
2886
|
await D(), f.value?.focus();
|
|
2886
2887
|
}
|
|
@@ -2906,7 +2907,7 @@ var Zi = [
|
|
|
2906
2907
|
let y = S(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), x = S(() => i.previewMode === !0 && y.value), T = S(() => i.viewport ? {
|
|
2907
2908
|
desktop: c.viewport.desktop,
|
|
2908
2909
|
mobile: c.viewport.mobile
|
|
2909
|
-
}[i.viewport] ?? i.viewport : ""), E = S(() => !!i.block.displayCondition), A = n(
|
|
2910
|
+
}[i.viewport] ?? i.viewport : ""), E = S(() => !!i.block.displayCondition), A = n(mt, null), j = n(vt, null), N = n(St, {}), P = S(() => N.savedBlocks?.isPicking.value === !0), F = S(() => !i.nested && N.savedBlocks?.isAvailable.value === !0 && N.savedBlocks?.canCreate.value === !0), I = S(() => i.isSelected && !P.value), L = S(() => N.comments?.getBlockCount(i.block.id) ?? 0), z = S(() => Zi(i.block)), H = S(() => Qi(i.block));
|
|
2910
2911
|
function ee(e) {
|
|
2911
2912
|
i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), o("select"));
|
|
2912
2913
|
}
|
|
@@ -2951,61 +2952,61 @@ var Zi = [
|
|
|
2951
2952
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2952
2953
|
title: _(c).blockActions.drag,
|
|
2953
2954
|
onKeydown: g
|
|
2954
|
-
}, [v(_(
|
|
2955
|
+
}, [v(_(Jt), {
|
|
2955
2956
|
size: 14,
|
|
2956
2957
|
"stroke-width": 1.5
|
|
2957
|
-
})], 40,
|
|
2958
|
+
})], 40, ta),
|
|
2958
2959
|
M("button", {
|
|
2959
2960
|
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",
|
|
2960
2961
|
"aria-label": _(c).blockActions.duplicate,
|
|
2961
2962
|
title: _(c).blockActions.duplicate,
|
|
2962
2963
|
onClick: O(ne, ["stop"])
|
|
2963
|
-
}, [v(_(
|
|
2964
|
+
}, [v(_(Vt), {
|
|
2964
2965
|
size: 14,
|
|
2965
2966
|
"stroke-width": 1.5
|
|
2966
|
-
})], 8,
|
|
2967
|
+
})], 8, na),
|
|
2967
2968
|
F.value ? (s(), C("button", {
|
|
2968
2969
|
key: 0,
|
|
2969
2970
|
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",
|
|
2970
2971
|
"aria-label": _(c).blockActions.saveAsBlock,
|
|
2971
2972
|
title: _(c).blockActions.saveAsBlock,
|
|
2972
2973
|
onClick: O(re, ["stop"])
|
|
2973
|
-
}, [v(_(
|
|
2974
|
+
}, [v(_(Bt), {
|
|
2974
2975
|
size: 14,
|
|
2975
2976
|
"stroke-width": 1.5
|
|
2976
|
-
})], 8,
|
|
2977
|
+
})], 8, ra)) : w("", !0),
|
|
2977
2978
|
M("button", {
|
|
2978
2979
|
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",
|
|
2979
2980
|
"aria-label": _(c).blockActions.delete,
|
|
2980
2981
|
title: _(c).blockActions.delete,
|
|
2981
2982
|
onClick: O(te, ["stop"])
|
|
2982
|
-
}, [v(_(
|
|
2983
|
+
}, [v(_(Kt), {
|
|
2983
2984
|
size: 14,
|
|
2984
2985
|
"stroke-width": 1.5
|
|
2985
|
-
})], 8,
|
|
2986
|
-
], 8,
|
|
2987
|
-
y.value ? (s(), C("div",
|
|
2986
|
+
})], 8, ia)
|
|
2987
|
+
], 8, ea)) : w("", !0),
|
|
2988
|
+
y.value ? (s(), C("div", aa, [M("span", oa, [v(_(Wt), {
|
|
2988
2989
|
size: 12,
|
|
2989
2990
|
"stroke-width": 1.5
|
|
2990
2991
|
}), V(" " + R(_(u)(_(c).blockActions.hiddenOnViewport, { viewport: T.value })), 1)])])) : w("", !0),
|
|
2991
|
-
E.value && !y.value ? (s(), C("div",
|
|
2992
|
+
E.value && !y.value ? (s(), C("div", sa, [M("button", {
|
|
2992
2993
|
"data-testid": "condition-toggle",
|
|
2993
2994
|
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)]",
|
|
2994
2995
|
"aria-label": _(c).blockActions.conditionToggle,
|
|
2995
2996
|
title: e.block.displayCondition?.label,
|
|
2996
2997
|
onClick: O(ie, ["stop"])
|
|
2997
|
-
}, [v(_(
|
|
2998
|
+
}, [v(_(tn), {
|
|
2998
2999
|
size: 12,
|
|
2999
3000
|
"stroke-width": 2
|
|
3000
|
-
})], 8,
|
|
3001
|
-
L.value > 0 && !y.value ? (s(), C("div",
|
|
3001
|
+
})], 8, ca)])) : w("", !0),
|
|
3002
|
+
L.value > 0 && !y.value ? (s(), C("div", la, [M("button", {
|
|
3002
3003
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
3003
3004
|
"aria-label": _(u)(_(c).blockActions.comments, { count: String(L.value) }),
|
|
3004
3005
|
onClick: n[0] ||= O((t) => _(N).comments?.openForBlock(e.block.id), ["stop"])
|
|
3005
|
-
}, [v(_(
|
|
3006
|
+
}, [v(_(Qt), {
|
|
3006
3007
|
size: 12,
|
|
3007
3008
|
"stroke-width": 2.5
|
|
3008
|
-
}), V(" " + R(L.value), 1)], 8,
|
|
3009
|
+
}), V(" " + R(L.value), 1)], 8, ua)])) : w("", !0),
|
|
3009
3010
|
H.value ? (s(), C("div", {
|
|
3010
3011
|
key: 4,
|
|
3011
3012
|
class: "tpl-section-wrapper",
|
|
@@ -3018,31 +3019,31 @@ var Zi = [
|
|
|
3018
3019
|
class: "tpl-block-content",
|
|
3019
3020
|
style: k(z.value)
|
|
3020
3021
|
}, [a(t.$slots, "default", {}, void 0, !0)], 4))
|
|
3021
|
-
], 10,
|
|
3022
|
+
], 10, $i));
|
|
3022
3023
|
}
|
|
3023
3024
|
}), [["__scopeId", "data-v-2c239048"]]);
|
|
3024
3025
|
//#endregion
|
|
3025
3026
|
//#region src/utils/unwrapParagraph.ts
|
|
3026
|
-
function
|
|
3027
|
+
function fa(e) {
|
|
3027
3028
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
3028
3029
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
3029
3030
|
}
|
|
3030
3031
|
//#endregion
|
|
3031
3032
|
//#region src/components/blocks/TitleBlock.vue
|
|
3032
|
-
var
|
|
3033
|
+
var pa = /* @__PURE__ */ d({
|
|
3033
3034
|
__name: "TitleBlock",
|
|
3034
3035
|
props: {
|
|
3035
3036
|
block: {},
|
|
3036
3037
|
viewport: {}
|
|
3037
3038
|
},
|
|
3038
3039
|
setup(e) {
|
|
3039
|
-
let t = e, n = B(() => import("./TitleEditor-
|
|
3040
|
+
let t = e, n = B(() => import("./TitleEditor-CbY1tgSl.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = Ki(() => t.block.content), d = S(() => {
|
|
3040
3041
|
let e = {
|
|
3041
|
-
fontSize: `${
|
|
3042
|
+
fontSize: `${Pe[t.block.level]}px`,
|
|
3042
3043
|
textAlign: t.block.textAlign
|
|
3043
3044
|
};
|
|
3044
3045
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
3045
|
-
}), f = S(() => `h${t.block.level}`), p = S(() =>
|
|
3046
|
+
}), f = S(() => `h${t.block.level}`), p = S(() => fa(o.value));
|
|
3046
3047
|
return (t, o) => (s(), C("div", {
|
|
3047
3048
|
ref_key: "blockRef",
|
|
3048
3049
|
ref: i,
|
|
@@ -3068,16 +3069,16 @@ var da = /* @__PURE__ */ d({
|
|
|
3068
3069
|
});
|
|
3069
3070
|
//#endregion
|
|
3070
3071
|
//#region src/utils/sectionColumnDrop.ts
|
|
3071
|
-
function
|
|
3072
|
+
function ma(e) {
|
|
3072
3073
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
3073
3074
|
}
|
|
3074
3075
|
//#endregion
|
|
3075
3076
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3076
|
-
var
|
|
3077
|
+
var ha = { class: "tpl:w-full" }, ga = {
|
|
3077
3078
|
key: 0,
|
|
3078
3079
|
"data-testid": "section-drop-hint",
|
|
3079
3080
|
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)]"
|
|
3080
|
-
},
|
|
3081
|
+
}, _a = /* @__PURE__ */ d({
|
|
3081
3082
|
__name: "SectionBlock",
|
|
3082
3083
|
props: {
|
|
3083
3084
|
block: {},
|
|
@@ -3085,13 +3086,13 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3085
3086
|
},
|
|
3086
3087
|
setup(e) {
|
|
3087
3088
|
let t = {
|
|
3088
|
-
title:
|
|
3089
|
-
paragraph:
|
|
3090
|
-
image:
|
|
3091
|
-
button:
|
|
3092
|
-
divider:
|
|
3093
|
-
custom:
|
|
3094
|
-
}, a = e, { t: o } =
|
|
3089
|
+
title: pa,
|
|
3090
|
+
paragraph: Ji,
|
|
3091
|
+
image: Fi,
|
|
3092
|
+
button: Ir,
|
|
3093
|
+
divider: mi,
|
|
3094
|
+
custom: fi
|
|
3095
|
+
}, a = e, { t: o } = Y(), c = ft(J, "SectionBlock"), l = n(vt, null), d = n(kt, null), p = n(St, {}), m = n(Ot, null);
|
|
3095
3096
|
function h(e) {
|
|
3096
3097
|
let t = p.savedBlocks;
|
|
3097
3098
|
if (t?.isPicking.value) {
|
|
@@ -3126,7 +3127,7 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3126
3127
|
r[e] = n, c.updateBlock(a.block.id, { children: r });
|
|
3127
3128
|
}
|
|
3128
3129
|
function D(e) {
|
|
3129
|
-
return
|
|
3130
|
+
return Xi(e, d, t);
|
|
3130
3131
|
}
|
|
3131
3132
|
function O(e, t) {
|
|
3132
3133
|
e.type === "custom" && c.updateBlock(e.id, {
|
|
@@ -3134,7 +3135,7 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3134
3135
|
dataSourceFetched: t.dataSourceFetched
|
|
3135
3136
|
});
|
|
3136
3137
|
}
|
|
3137
|
-
return (t, n) => (s(), C("div",
|
|
3138
|
+
return (t, n) => (s(), C("div", ha, [M("div", { class: b(["tpl:flex tpl:gap-0", { "tpl:flex-col": x.value }]) }, [(s(!0), C(L, null, r(y.value, (t, n) => (s(), C("div", {
|
|
3138
3139
|
key: n,
|
|
3139
3140
|
class: b(["tpl:relative tpl:min-h-[60px] tpl:rounded", T(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3140
3141
|
style: k({ width: x.value ? "100%" : g.value[n] })
|
|
@@ -3143,7 +3144,7 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3143
3144
|
group: {
|
|
3144
3145
|
name: "blocks",
|
|
3145
3146
|
pull: !0,
|
|
3146
|
-
put: (e, t, n) => _(
|
|
3147
|
+
put: (e, t, n) => _(ma)(n)
|
|
3147
3148
|
},
|
|
3148
3149
|
animation: 150,
|
|
3149
3150
|
"ghost-class": "tpl-ghost",
|
|
@@ -3156,7 +3157,7 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3156
3157
|
class: "tpl:min-h-[60px]",
|
|
3157
3158
|
"onUpdate:modelValue": (e) => E(n, e)
|
|
3158
3159
|
}, {
|
|
3159
|
-
default: i(() => [(s(!0), C(L, null, r(T(n), (t) => f((s(), C("div", { key: t.id }, [v(
|
|
3160
|
+
default: i(() => [(s(!0), C(L, null, r(T(n), (t) => f((s(), C("div", { key: t.id }, [v(da, {
|
|
3160
3161
|
block: t,
|
|
3161
3162
|
"is-selected": _(c).state.selectedBlockId === t.id,
|
|
3162
3163
|
viewport: e.viewport,
|
|
@@ -3188,13 +3189,13 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3188
3189
|
"model-value",
|
|
3189
3190
|
"group",
|
|
3190
3191
|
"onUpdate:modelValue"
|
|
3191
|
-
]), T(n).length === 0 ? (s(), C("div",
|
|
3192
|
+
]), T(n).length === 0 ? (s(), C("div", ga, [M("span", null, R(_(o).section.dropHere), 1)])) : w("", !0)], 6))), 128))], 2)]));
|
|
3192
3193
|
}
|
|
3193
|
-
}),
|
|
3194
|
+
}), va = Ae, ya = {
|
|
3194
3195
|
small: 24,
|
|
3195
3196
|
medium: 32,
|
|
3196
3197
|
large: 48
|
|
3197
|
-
},
|
|
3198
|
+
}, ba = [
|
|
3198
3199
|
"facebook",
|
|
3199
3200
|
"twitter",
|
|
3200
3201
|
"instagram",
|
|
@@ -3212,11 +3213,11 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3212
3213
|
"github",
|
|
3213
3214
|
"dribbble",
|
|
3214
3215
|
"behance"
|
|
3215
|
-
],
|
|
3216
|
+
], xa = [
|
|
3216
3217
|
"width",
|
|
3217
3218
|
"height",
|
|
3218
3219
|
"fill"
|
|
3219
|
-
],
|
|
3220
|
+
], Sa = ["d"], Ca = /* @__PURE__ */ d({
|
|
3220
3221
|
__name: "SocialIconSvg",
|
|
3221
3222
|
props: {
|
|
3222
3223
|
platform: {},
|
|
@@ -3224,7 +3225,7 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3224
3225
|
iconSize: {}
|
|
3225
3226
|
},
|
|
3226
3227
|
setup(e) {
|
|
3227
|
-
let t = e, n = S(() =>
|
|
3228
|
+
let t = e, n = S(() => va[t.platform]), r = S(() => ya[t.iconSize]), i = S(() => {
|
|
3228
3229
|
let e = {
|
|
3229
3230
|
display: "inline-flex",
|
|
3230
3231
|
alignItems: "center",
|
|
@@ -3268,25 +3269,25 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3268
3269
|
viewBox: "0 0 24 24",
|
|
3269
3270
|
fill: o.value,
|
|
3270
3271
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3271
|
-
}, [M("path", { d: n.value.path }, null, 8,
|
|
3272
|
+
}, [M("path", { d: n.value.path }, null, 8, Sa)], 8, xa))], 4));
|
|
3272
3273
|
}
|
|
3273
|
-
}),
|
|
3274
|
+
}), wa = { class: "tpl:w-full" }, Ta = ["href"], Ea = {
|
|
3274
3275
|
key: 1,
|
|
3275
3276
|
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)]"
|
|
3276
|
-
},
|
|
3277
|
+
}, Da = /* @__PURE__ */ d({
|
|
3277
3278
|
__name: "SocialIconsBlock",
|
|
3278
3279
|
props: {
|
|
3279
3280
|
block: {},
|
|
3280
3281
|
viewport: {}
|
|
3281
3282
|
},
|
|
3282
3283
|
setup(e) {
|
|
3283
|
-
let t = e, { t: n } =
|
|
3284
|
+
let t = e, { t: n } = Y(), i = S(() => ({
|
|
3284
3285
|
display: "flex",
|
|
3285
3286
|
flexWrap: "wrap",
|
|
3286
3287
|
gap: `${t.block.spacing}px`,
|
|
3287
3288
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3288
3289
|
})), a = S(() => t.block.icons.length > 0);
|
|
3289
|
-
return (t, o) => (s(), C("div",
|
|
3290
|
+
return (t, o) => (s(), C("div", wa, [a.value ? (s(), C("div", {
|
|
3290
3291
|
key: 0,
|
|
3291
3292
|
style: k(i.value)
|
|
3292
3293
|
}, [(s(!0), C(L, null, r(e.block.icons, (t) => (s(), C("a", {
|
|
@@ -3294,7 +3295,7 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3294
3295
|
href: t.url || "#",
|
|
3295
3296
|
class: "tpl:cursor-default",
|
|
3296
3297
|
onClick: o[0] ||= O(() => {}, ["prevent"])
|
|
3297
|
-
}, [v(
|
|
3298
|
+
}, [v(Ca, {
|
|
3298
3299
|
platform: t.platform,
|
|
3299
3300
|
"icon-style": e.block.iconStyle,
|
|
3300
3301
|
"icon-size": e.block.iconSize
|
|
@@ -3302,44 +3303,44 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3302
3303
|
"platform",
|
|
3303
3304
|
"icon-style",
|
|
3304
3305
|
"icon-size"
|
|
3305
|
-
])], 8,
|
|
3306
|
+
])], 8, Ta))), 128))], 4)) : (s(), C("div", Ea, [v(_(zt), { size: 16 }), M("span", null, R(_(n).social.addIcons), 1)]))]));
|
|
3306
3307
|
}
|
|
3307
|
-
}),
|
|
3308
|
+
}), Oa = { class: "tpl:w-full" }, ka = {
|
|
3308
3309
|
key: 0,
|
|
3309
3310
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3310
3311
|
style: {
|
|
3311
3312
|
"background-color": "var(--tpl-bg-hover)",
|
|
3312
3313
|
color: "var(--tpl-text-dim)"
|
|
3313
3314
|
}
|
|
3314
|
-
},
|
|
3315
|
+
}, Aa = /* @__PURE__ */ d({
|
|
3315
3316
|
__name: "SpacerBlock",
|
|
3316
3317
|
props: {
|
|
3317
3318
|
block: {},
|
|
3318
3319
|
viewport: {}
|
|
3319
3320
|
},
|
|
3320
3321
|
setup(e) {
|
|
3321
|
-
let t = e, n =
|
|
3322
|
+
let t = e, n = ft(J, "SpacerBlock"), r = S(() => ({
|
|
3322
3323
|
height: `${t.block.height}px`,
|
|
3323
3324
|
minHeight: `${t.block.height}px`,
|
|
3324
3325
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3325
3326
|
}));
|
|
3326
|
-
return (t, i) => (s(), C("div",
|
|
3327
|
+
return (t, i) => (s(), C("div", Oa, [M("div", {
|
|
3327
3328
|
style: k(r.value),
|
|
3328
3329
|
class: b(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !_(n).state.previewMode }])
|
|
3329
|
-
}, [_(n).state.previewMode ? w("", !0) : (s(), C("span",
|
|
3330
|
+
}, [_(n).state.previewMode ? w("", !0) : (s(), C("span", ka, R(e.block.height) + "px ", 1))], 6)]));
|
|
3330
3331
|
}
|
|
3331
|
-
}),
|
|
3332
|
+
}), ja = { class: "tpl:w-full" }, Ma = { key: 0 }, Na = [
|
|
3332
3333
|
"aria-label",
|
|
3333
3334
|
"data-placeholder",
|
|
3334
3335
|
"onBlur"
|
|
3335
|
-
],
|
|
3336
|
+
], Pa = [
|
|
3336
3337
|
"aria-label",
|
|
3337
3338
|
"data-placeholder",
|
|
3338
3339
|
"onBlur"
|
|
3339
|
-
],
|
|
3340
|
+
], Fa = {
|
|
3340
3341
|
key: 1,
|
|
3341
3342
|
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)]"
|
|
3342
|
-
},
|
|
3343
|
+
}, Ia = /*#__PURE__*/ an(/* @__PURE__ */ d({
|
|
3343
3344
|
__name: "TableBlock",
|
|
3344
3345
|
props: {
|
|
3345
3346
|
block: {},
|
|
@@ -3353,7 +3354,7 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3353
3354
|
updated(e, t) {
|
|
3354
3355
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3355
3356
|
}
|
|
3356
|
-
}, n = e, { t: i } =
|
|
3357
|
+
}, n = e, { t: i } = Y(), a = ft(J, "TableBlock"), o = S(() => n.block.rows.length > 0), c = S(() => {
|
|
3357
3358
|
let e = {
|
|
3358
3359
|
width: "100%",
|
|
3359
3360
|
borderCollapse: "collapse",
|
|
@@ -3384,11 +3385,11 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3384
3385
|
} : n);
|
|
3385
3386
|
a.updateBlock(n.block.id, { rows: o });
|
|
3386
3387
|
}
|
|
3387
|
-
return (e, n) => (s(), C("div",
|
|
3388
|
+
return (e, n) => (s(), C("div", ja, [o.value ? (s(), C("table", {
|
|
3388
3389
|
key: 0,
|
|
3389
3390
|
style: k(c.value),
|
|
3390
3391
|
class: "tpl-table-editable"
|
|
3391
|
-
}, [d.value ? (s(), C("thead",
|
|
3392
|
+
}, [d.value ? (s(), C("thead", Ma, [M("tr", null, [(s(!0), C(L, null, r(d.value.cells, (e) => f((s(), C("th", {
|
|
3392
3393
|
key: e.id,
|
|
3393
3394
|
style: k(u.value),
|
|
3394
3395
|
"aria-label": _(i).table.cellPlaceholder,
|
|
@@ -3397,7 +3398,7 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3397
3398
|
onBlur: (t) => h(d.value.id, e.id, t),
|
|
3398
3399
|
onKeydown: n[0] ||= y(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3399
3400
|
onClick: O(m, ["stop"])
|
|
3400
|
-
}, null, 44,
|
|
3401
|
+
}, null, 44, Na)), [[t, e.content]])), 128))])])) : w("", !0), M("tbody", null, [(s(!0), C(L, null, r(p.value, (e) => (s(), C("tr", { key: e.id }, [(s(!0), C(L, null, r(e.cells, (r) => f((s(), C("td", {
|
|
3401
3402
|
key: r.id,
|
|
3402
3403
|
style: k(l.value),
|
|
3403
3404
|
"aria-label": _(i).table.cellPlaceholder,
|
|
@@ -3406,9 +3407,9 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3406
3407
|
onBlur: (t) => h(e.id, r.id, t),
|
|
3407
3408
|
onKeydown: n[1] ||= y(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3408
3409
|
onClick: O(m, ["stop"])
|
|
3409
|
-
}, null, 44,
|
|
3410
|
+
}, null, 44, Pa)), [[t, r.content]])), 128))]))), 128))])], 4)) : (s(), C("div", Fa, [v(_(en), { size: 16 }), M("span", null, R(_(i).table.empty), 1)]))]));
|
|
3410
3411
|
}
|
|
3411
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
3412
|
+
}), [["__scopeId", "data-v-963ac422"]]), La = /* @__PURE__ */ d({
|
|
3412
3413
|
__name: "VideoPlayButton",
|
|
3413
3414
|
props: { hoverEffect: {
|
|
3414
3415
|
type: Boolean,
|
|
@@ -3426,7 +3427,7 @@ var pa = { class: "tpl:w-full" }, ma = {
|
|
|
3426
3427
|
});
|
|
3427
3428
|
//#endregion
|
|
3428
3429
|
//#region src/utils/videoThumbnail.ts
|
|
3429
|
-
function
|
|
3430
|
+
function Ra(e) {
|
|
3430
3431
|
if (!e) return {
|
|
3431
3432
|
platform: "unknown",
|
|
3432
3433
|
videoId: null,
|
|
@@ -3458,25 +3459,25 @@ function Ia(e) {
|
|
|
3458
3459
|
thumbnailUrl: null
|
|
3459
3460
|
};
|
|
3460
3461
|
}
|
|
3461
|
-
function
|
|
3462
|
-
return t ||
|
|
3462
|
+
function za(e, t) {
|
|
3463
|
+
return t || Ra(e).thumbnailUrl;
|
|
3463
3464
|
}
|
|
3464
3465
|
//#endregion
|
|
3465
3466
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3466
|
-
var
|
|
3467
|
+
var Ba = ["src", "alt"], Va = {
|
|
3467
3468
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3468
3469
|
style: { opacity: "0.7" }
|
|
3469
|
-
},
|
|
3470
|
+
}, Ha = ["href"], Ua = ["src", "alt"], Wa = ["src", "alt"], Ga = {
|
|
3470
3471
|
key: 3,
|
|
3471
3472
|
class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
3472
|
-
},
|
|
3473
|
+
}, Ka = /* @__PURE__ */ d({
|
|
3473
3474
|
__name: "VideoBlock",
|
|
3474
3475
|
props: {
|
|
3475
3476
|
block: {},
|
|
3476
3477
|
viewport: {}
|
|
3477
3478
|
},
|
|
3478
3479
|
setup(e) {
|
|
3479
|
-
let t = e, { t: n } =
|
|
3480
|
+
let t = e, { t: n } = Y(), { syntax: r } = sn(), i = S(() => Ce(t.block.url, r) || Ce(t.block.thumbnailUrl, r)), a = zn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = zn(() => i.value ? t.block.placeholderUrl : void 0), c = S(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : za(t.block.url)), l = S(() => ({ textAlign: t.block.align })), u = S(() => {
|
|
3480
3481
|
let e = t.block.align;
|
|
3481
3482
|
return {
|
|
3482
3483
|
maxWidth: "100%",
|
|
@@ -3486,7 +3487,7 @@ var Ra = ["src", "alt"], za = {
|
|
|
3486
3487
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3487
3488
|
marginRight: e === "center" ? "auto" : void 0
|
|
3488
3489
|
};
|
|
3489
|
-
}), d = S(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = S(() =>
|
|
3490
|
+
}), d = S(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = S(() => Ce(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
3490
3491
|
return (t, r) => (s(), C("div", {
|
|
3491
3492
|
class: "tpl:w-full",
|
|
3492
3493
|
style: k(l.value)
|
|
@@ -3499,16 +3500,16 @@ var Ra = ["src", "alt"], za = {
|
|
|
3499
3500
|
src: _(o),
|
|
3500
3501
|
alt: e.block.alt,
|
|
3501
3502
|
style: k(d.value)
|
|
3502
|
-
}, null, 12,
|
|
3503
|
+
}, null, 12, Ba), v(La)], 4)) : i.value ? (s(), C("div", {
|
|
3503
3504
|
key: 1,
|
|
3504
3505
|
class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
3505
3506
|
style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
3506
|
-
}, [v(_(
|
|
3507
|
+
}, [v(_(Xt), {
|
|
3507
3508
|
size: 36,
|
|
3508
3509
|
"stroke-width": 1.5,
|
|
3509
3510
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3510
3511
|
style: { opacity: "0.5" }
|
|
3511
|
-
}), M("span",
|
|
3512
|
+
}), M("span", Va, [v(Pr, { text: f.value }, null, 8, ["text"])])], 4)) : c.value ? (s(), C(L, { key: 2 }, [e.block.url ? (s(), C("a", {
|
|
3512
3513
|
key: 0,
|
|
3513
3514
|
href: e.block.url,
|
|
3514
3515
|
target: "_blank",
|
|
@@ -3521,7 +3522,7 @@ var Ra = ["src", "alt"], za = {
|
|
|
3521
3522
|
src: c.value,
|
|
3522
3523
|
alt: e.block.alt,
|
|
3523
3524
|
style: k(d.value)
|
|
3524
|
-
}, null, 12,
|
|
3525
|
+
}, null, 12, Ua), v(La, { "hover-effect": "" })], 12, Ha)) : (s(), C("div", {
|
|
3525
3526
|
key: 1,
|
|
3526
3527
|
class: "tpl:relative tpl:inline-block",
|
|
3527
3528
|
style: k(u.value)
|
|
@@ -3530,54 +3531,54 @@ var Ra = ["src", "alt"], za = {
|
|
|
3530
3531
|
src: c.value,
|
|
3531
3532
|
alt: e.block.alt,
|
|
3532
3533
|
style: k(d.value)
|
|
3533
|
-
}, null, 12,
|
|
3534
|
+
}, null, 12, Wa), v(La)], 4))], 64)) : (s(), C("div", Ga, [v(_(Xt), {
|
|
3534
3535
|
size: 40,
|
|
3535
3536
|
"stroke-width": 1.5,
|
|
3536
3537
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3537
3538
|
}), M("span", null, R(_(n).video.addVideo), 1)]))], 4));
|
|
3538
3539
|
}
|
|
3539
|
-
}),
|
|
3540
|
-
section:
|
|
3541
|
-
title:
|
|
3542
|
-
paragraph:
|
|
3543
|
-
image:
|
|
3544
|
-
button:
|
|
3545
|
-
divider:
|
|
3546
|
-
video:
|
|
3547
|
-
social:
|
|
3548
|
-
menu:
|
|
3549
|
-
table:
|
|
3550
|
-
spacer:
|
|
3551
|
-
html:
|
|
3552
|
-
countdown: B(() => import("./CountdownBlock-
|
|
3540
|
+
}), qa = {
|
|
3541
|
+
section: _a,
|
|
3542
|
+
title: pa,
|
|
3543
|
+
paragraph: Ji,
|
|
3544
|
+
image: Fi,
|
|
3545
|
+
button: Ir,
|
|
3546
|
+
divider: mi,
|
|
3547
|
+
video: Ka,
|
|
3548
|
+
social: Da,
|
|
3549
|
+
menu: zi,
|
|
3550
|
+
table: Ia,
|
|
3551
|
+
spacer: Aa,
|
|
3552
|
+
html: bi,
|
|
3553
|
+
countdown: B(() => import("./CountdownBlock-DGDl3ota.js"))
|
|
3553
3554
|
};
|
|
3554
|
-
function
|
|
3555
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } =
|
|
3555
|
+
function Ja(e) {
|
|
3556
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = Y(i), d = S(() => ae(ae(ae(lr(i), Or(n.content.value.settings?.locale)), de(n.content.value.settings) === "rtl" ? {
|
|
3556
3557
|
title: { textAlign: "right" },
|
|
3557
3558
|
table: { textAlign: "right" }
|
|
3558
3559
|
} : {}), r.blockDefaults ?? {}));
|
|
3559
3560
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
3560
|
-
let { resolvedTheme: f } =
|
|
3561
|
+
let { resolvedTheme: f } = qn(S(() => n.state.uiTheme)), p = l(r.theme ?? {}), { themeStyles: m } = Yn({
|
|
3561
3562
|
themeOverrides: p,
|
|
3562
3563
|
resolvedTheme: f,
|
|
3563
3564
|
extraStyles: () => ({
|
|
3564
3565
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
3565
3566
|
...e.themeExtraStyles?.()
|
|
3566
3567
|
})
|
|
3567
|
-
}), g =
|
|
3568
|
+
}), g = gn({
|
|
3568
3569
|
content: n.content,
|
|
3569
3570
|
setContent: (e, t) => n.setContent(e, t),
|
|
3570
3571
|
...e.historyOptions
|
|
3571
3572
|
});
|
|
3572
|
-
|
|
3573
|
-
let _ =
|
|
3573
|
+
Cn(n, g);
|
|
3574
|
+
let _ = vn({
|
|
3574
3575
|
addBlock: n.addBlock,
|
|
3575
3576
|
removeBlock: n.removeBlock,
|
|
3576
3577
|
updateBlock: n.updateBlock,
|
|
3577
3578
|
selectBlock: n.selectBlock,
|
|
3578
3579
|
findBlockLocation: n.findBlockLocation,
|
|
3579
3580
|
blockDefaults: () => d.value
|
|
3580
|
-
}), v =
|
|
3581
|
+
}), v = xn(n), y = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? bn({
|
|
3581
3582
|
content: n.content,
|
|
3582
3583
|
isDirty: () => n.state.isDirty,
|
|
3583
3584
|
...e.autoSaveOptions
|
|
@@ -3585,35 +3586,35 @@ function Ka(e) {
|
|
|
3585
3586
|
y && (b = t(g.isNavigating, (e) => {
|
|
3586
3587
|
e ? y.pause() : y.resume();
|
|
3587
3588
|
}));
|
|
3588
|
-
let
|
|
3589
|
+
let C = Kn(n, {
|
|
3589
3590
|
t: s,
|
|
3590
3591
|
format: u
|
|
3591
|
-
}, r.customBlocks ?? []),
|
|
3592
|
-
if (
|
|
3593
|
-
let e =
|
|
3594
|
-
e.length > 0 &&
|
|
3595
|
-
}
|
|
3596
|
-
let
|
|
3597
|
-
for (let e of
|
|
3598
|
-
let
|
|
3599
|
-
|
|
3600
|
-
let
|
|
3601
|
-
function
|
|
3592
|
+
}, r.customBlocks ?? []), w = Lt(r.colors);
|
|
3593
|
+
if (w.allowCustomIgnored && X.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), w.invalidPresets.length > 0 && X.warn(`config.colors.presets skipped invalid entries: ${w.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), w.allowCustom === !1) {
|
|
3594
|
+
let e = cr(w.presets, r.blockDefaults, r.templateDefaults);
|
|
3595
|
+
e.length > 0 && X.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.`);
|
|
3596
|
+
}
|
|
3597
|
+
let T = or(r.templateSettings);
|
|
3598
|
+
for (let e of T.unknown) X.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${ir.join(", ")}) — skipping it.`);
|
|
3599
|
+
let E = Xn();
|
|
3600
|
+
tr(E, qa);
|
|
3601
|
+
let D = /* @__PURE__ */ new Set();
|
|
3602
|
+
function O(e) {
|
|
3602
3603
|
for (let t of e) {
|
|
3603
|
-
|
|
3604
|
-
for (let e of
|
|
3604
|
+
E.registerCustom(t, fi);
|
|
3605
|
+
for (let e of Ar(t, w)) D.has(e.id) || (D.add(e.id), X.warn(e.message));
|
|
3605
3606
|
}
|
|
3606
3607
|
}
|
|
3607
|
-
r.customBlocks?.length &&
|
|
3608
|
-
let
|
|
3609
|
-
if (o() && h(
|
|
3608
|
+
r.customBlocks?.length && O(r.customBlocks);
|
|
3609
|
+
let k = Fn();
|
|
3610
|
+
if (o() && h(k.dispose), e.containerEl) {
|
|
3610
3611
|
let t = e.containerEl;
|
|
3611
|
-
|
|
3612
|
+
G(document, "pointerdown", (e) => {
|
|
3612
3613
|
let n = t.value;
|
|
3613
|
-
n && (e.composedPath?.() ?? []).includes(n) &&
|
|
3614
|
+
n && (e.composedPath?.() ?? []).includes(n) && k.claim();
|
|
3614
3615
|
}, { capture: !0 });
|
|
3615
3616
|
}
|
|
3616
|
-
function
|
|
3617
|
+
function A() {
|
|
3617
3618
|
let t = e.capabilities?.templates;
|
|
3618
3619
|
if (t) {
|
|
3619
3620
|
t.save();
|
|
@@ -3621,46 +3622,53 @@ function Ka(e) {
|
|
|
3621
3622
|
}
|
|
3622
3623
|
y?.flush();
|
|
3623
3624
|
}
|
|
3624
|
-
function
|
|
3625
|
-
|
|
3625
|
+
function j(t) {
|
|
3626
|
+
k.isActive() && Mr(t, {
|
|
3626
3627
|
history: g,
|
|
3627
3628
|
selectBlock: (e) => n.selectBlock(e),
|
|
3628
3629
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
3629
3630
|
removeBlock: (e) => n.removeBlock(e),
|
|
3630
|
-
onSave:
|
|
3631
|
+
onSave: A,
|
|
3631
3632
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo,
|
|
3632
3633
|
isPicking: () => e.capabilities?.savedBlocks?.isPicking.value === !0,
|
|
3633
3634
|
onConfirmPick: () => e.capabilities?.savedBlocks?.confirmPicking(),
|
|
3634
3635
|
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
3635
3636
|
});
|
|
3636
3637
|
}
|
|
3637
|
-
|
|
3638
|
-
let
|
|
3639
|
-
c(
|
|
3640
|
-
let
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3638
|
+
G(document, "keydown", j);
|
|
3639
|
+
let M = l(null);
|
|
3640
|
+
c(pt, e.editorRoot ?? document), c(Pt, M), c(Dt, i), c(J, n), c(Nt, g), c(mt, _), c(vt, v), c(At, a), c(et, m), c(dt, f), c(Tt, d), c($e, r.locale), c(kt, E), c(Et, r.customBlocks ?? []), c(ot, r.paletteBlocks), c(ht, nr(r.htmlBlockPreview)), c(_t, w), c(Ze, T.fields), c(Ct, Zn(n.content, E));
|
|
3641
|
+
let N = Se(r.mergeTags?.syntax), P = x(r.mergeTags?.tags ?? []);
|
|
3642
|
+
function F(e) {
|
|
3643
|
+
if (!Array.isArray(e)) {
|
|
3644
|
+
X.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
3645
|
+
return;
|
|
3646
|
+
}
|
|
3647
|
+
P.value = e;
|
|
3648
|
+
}
|
|
3649
|
+
c(K, P), c(rt, N), c(tt, r.mergeTags?.onRequest ?? null), c(it, r.mergeTags?.autocomplete !== !1), c(nt, r.mergeTags?.showRawValue !== !1);
|
|
3650
|
+
let I = l(Ie(r.mergeTags?.tags ?? []));
|
|
3651
|
+
c(bt, I);
|
|
3652
|
+
let L = Ln({
|
|
3645
3653
|
resolvePreview: r.resolvePreview,
|
|
3646
3654
|
getContent: () => n.content.value,
|
|
3647
3655
|
isActive: () => n.state.previewMode
|
|
3648
3656
|
});
|
|
3649
|
-
c(
|
|
3650
|
-
let
|
|
3651
|
-
c(
|
|
3652
|
-
let
|
|
3653
|
-
c(
|
|
3654
|
-
let
|
|
3657
|
+
c(qe, L), c(lt, r.resolvePreview);
|
|
3658
|
+
let R = S(() => !(n.state.previewMode && L.isConfigured));
|
|
3659
|
+
c(Ot, R);
|
|
3660
|
+
let z = Bn();
|
|
3661
|
+
c(xt, z), c(Ke, l(!1)), c(Ye, l(!1)), c(jt, r.logicTags?.tags ?? []), c(Je, r.logicTags?.pairs ?? []), c(Xe, r.logicTags?.onRequest ?? null), c(ct, Vn()), c(Qe, r.onRequestMedia ?? null), c(gt, r.canDropMedia ?? null), c(Mt, r.resolveImageUrl ? Rn(r.resolveImageUrl) : null), c(yt, r.displayConditions?.conditions ?? []), c(wt, r.displayConditions?.allowCustom ?? !1), c(St, e.capabilities ?? {}), c(st, C);
|
|
3662
|
+
let B = Hn(r.lint) ? null : Un({
|
|
3655
3663
|
content: n.content,
|
|
3656
3664
|
options: r.lint ?? {},
|
|
3657
3665
|
updateBlock: n.updateBlock,
|
|
3658
3666
|
updateSettings: n.updateSettings,
|
|
3659
3667
|
removeBlock: n.removeBlock
|
|
3660
3668
|
});
|
|
3661
|
-
c(
|
|
3662
|
-
function
|
|
3663
|
-
b?.(),
|
|
3669
|
+
c(ut, B);
|
|
3670
|
+
function V() {
|
|
3671
|
+
b?.(), B?.destroy(), y?.destroy(), g.destroy();
|
|
3664
3672
|
}
|
|
3665
3673
|
return {
|
|
3666
3674
|
t: s,
|
|
@@ -3672,18 +3680,19 @@ function Ka(e) {
|
|
|
3672
3680
|
resolvedTheme: f,
|
|
3673
3681
|
themeStyles: m,
|
|
3674
3682
|
themeOverrides: p,
|
|
3675
|
-
registry:
|
|
3676
|
-
keyboardReorder:
|
|
3677
|
-
templateLint:
|
|
3678
|
-
popoverRoot:
|
|
3679
|
-
mergeTagSampleMode:
|
|
3680
|
-
previewResolution:
|
|
3681
|
-
appliesConditionFilter:
|
|
3682
|
-
registerCustomBlocks:
|
|
3683
|
-
|
|
3683
|
+
registry: E,
|
|
3684
|
+
keyboardReorder: C,
|
|
3685
|
+
templateLint: B,
|
|
3686
|
+
popoverRoot: M,
|
|
3687
|
+
mergeTagSampleMode: I,
|
|
3688
|
+
previewResolution: L,
|
|
3689
|
+
appliesConditionFilter: R,
|
|
3690
|
+
registerCustomBlocks: O,
|
|
3691
|
+
setMergeTags: F,
|
|
3692
|
+
destroy: V
|
|
3684
3693
|
};
|
|
3685
3694
|
}
|
|
3686
3695
|
//#endregion
|
|
3687
|
-
export {
|
|
3696
|
+
export { _r as A, Wn as B, Jr as C, zr as D, Vr as E, xr as F, kn as G, Mn as H, br as I, Sn as J, En as K, ir as L, wr as M, Cr as N, Ir as O, Sr as P, rr as R, $r as S, Hr as T, jn as U, Ln as V, An as W, fn as X, yn as Y, bi as _, Da as a, ri as b, pa as c, Yi as d, Xi as f, Si as g, Fi as h, Aa as i, Tr as j, kr as k, da as l, zi as m, Ka as n, ba as o, Ji as p, wn as q, Ia as r, _a as s, Ja as t, Zi as u, mi as v, qr as w, ti as x, fi as y, Gn as z };
|
|
3688
3697
|
|
|
3689
|
-
//# sourceMappingURL=useEditorCore-
|
|
3698
|
+
//# sourceMappingURL=useEditorCore-06PtcUi1.js.map
|