@templatical/editor 0.39.0 → 0.39.2
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/README.md +2 -4
- package/dist/{AiChatSidebar-jVlXXND3.js → AiChatSidebar-pOxCZWz9.js} +14 -14
- package/dist/{AiFeatureMenu-C1HCntyQ.js → AiFeatureMenu-Bljk6Qjv.js} +7 -7
- package/dist/{BlockIssueBadge-JhNgcUmZ.js → BlockIssueBadge-D5oGxOQP.js} +5 -5
- package/dist/{BlockPreviewCanvas-C_rA5LJN.js → BlockPreviewCanvas-DXGjUECG.js} +27 -27
- package/dist/{CloudHeaderExtras-DvYyNsPB.js → CloudHeaderExtras-DaocwNmy.js} +5 -5
- package/dist/{CloudPanels-CDPhPVdd.js → CloudPanels-CyZAnSJY.js} +7 -7
- package/dist/{CollaboratorBar-Co9UPoB0.js → CollaboratorBar-C7Zca3g1.js} +4 -4
- package/dist/{CommentsPanel-CRcVN9Ri.js → CommentsPanel-CNOb7YCm.js} +2 -2
- package/dist/{CommentsSidebar-gDU977br.js → CommentsSidebar-VmwjU9va.js} +14 -14
- package/dist/{CountdownBlock-CEzrfe5R.js → CountdownBlock-DSvbf3qU.js} +3 -3
- package/dist/{CountdownToolbar-B00zhkNJ.js → CountdownToolbar-C2kfS6Oy.js} +31 -30
- package/dist/{DesignReferenceSidebar-DedivZZl.js → DesignReferenceSidebar-QC4gEUWp.js} +11 -11
- package/dist/{IssuesPanel-C-PjdmAV.js → IssuesPanel-DL2Xr14_.js} +8 -8
- package/dist/{LoadingTrack-BlTL4zFv.js → LoadingTrack-C2jKCU2d.js} +1 -1
- package/dist/LogicTagInsertButton-D8IwH-9Z.js +1071 -0
- package/dist/MediaEditModal-D4GEq2md.js +3545 -0
- package/dist/{MediaPanels-BpQNY8YX.js → MediaPanels-sapgKtxu.js} +2 -2
- package/dist/MergeTagInput-QI-5KG2R.js +81 -0
- package/dist/{MergeTagModeToggle-DGuzSAdX.js → MergeTagModeToggle-D793Bj_E.js} +14 -55
- package/dist/{ParagraphEditor-jMKLLTa8.js → ParagraphEditor-DkkPSexG.js} +65 -66
- package/dist/{RestoreVersionDialog-DG1jUdBM.js → RestoreVersionDialog-BgueZnZr.js} +5 -5
- package/dist/{RichTextEditorContent-JrNEg0kv.js → RichTextEditorContent-BC5UTVnb.js} +11 -11
- package/dist/{SaveBlockDialog-C0KC-OKs.js → SaveBlockDialog-BuTuVlLr.js} +12 -11
- package/dist/{SavedBlocksBrowserModal-zyOiRgWZ.js → SavedBlocksBrowserModal-Srhix8BB.js} +17 -16
- package/dist/{SavedBlocksPanels-epMd799w.js → SavedBlocksPanels-B2iScCS-.js} +2 -2
- package/dist/{SavedBlocksPickBar-CJqqQ3jd.js → SavedBlocksPickBar-cI7bDQQi.js} +4 -4
- package/dist/{TemplateScoringPanel-m2FOeaai.js → TemplateScoringPanel-C2Rdlyn6.js} +16 -16
- package/dist/TemplateSettings-C_5leDdF.js +245 -0
- package/dist/{TestEmailModal-D58kYkMV.js → TestEmailModal-DJ5q_u4N.js} +10 -10
- package/dist/{TestEmailPanel-BmFVBIQt.js → TestEmailPanel-CP24UGst.js} +2 -2
- package/dist/{TitleEditor-C4BGPXnf.js → TitleEditor-QBBOXtxx.js} +15 -15
- package/dist/ToggleSwitch-JvQ_CmI1.js +102 -0
- package/dist/Toolbar-COD2TW20.js +2426 -0
- package/dist/{TplModal-BIDJw4Kj.js → TplModal-C8xGjC1l.js} +5 -5
- package/dist/{VersionHistoryMenu-dt_aZQfh.js → VersionHistoryMenu-BVQityes.js} +10 -10
- package/dist/{VersionHistoryPanels-B_5SBRrr.js → VersionHistoryPanels-BrK6na4A.js} +2 -2
- package/dist/{VersionPreviewBanner-DttvOkwd.js → VersionPreviewBanner-BaMSgA1O.js} +3 -3
- package/dist/{blockTypeIcons-CzTizYmK.js → blockTypeIcons-CdXugKyV.js} +16 -37
- package/dist/bundle-stats.json +8 -8
- package/dist/{ca-Jx2CDwtn.js → ca-BTf1Zbqb.js} +9 -0
- package/dist/cdn/chunks/{AiChatSidebar-DeZl9Tk0.js → AiChatSidebar-CjSEoK4x.js} +8 -8
- package/dist/cdn/chunks/{AiChatSidebar-DeZl9Tk0.js.map → AiChatSidebar-CjSEoK4x.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-Bv8jMu9p.js → AiFeatureMenu-l0K5TOSn.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-Bv8jMu9p.js.map → AiFeatureMenu-l0K5TOSn.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-B6PpoOPv.js → BlockIssueBadge-9hHpaXb9.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-B6PpoOPv.js.map → BlockIssueBadge-9hHpaXb9.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-DfEtDosD.js → BlockPreviewCanvas-lQrAdgG3.js} +30 -30
- package/dist/cdn/chunks/{BlockPreviewCanvas-DfEtDosD.js.map → BlockPreviewCanvas-lQrAdgG3.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-Hk98ub-C.js → CloudHeaderExtras-CXNe7Q-4.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-Hk98ub-C.js.map → CloudHeaderExtras-CXNe7Q-4.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-Ba3GLmvF.js → CloudPanels-bHhh9AUA.js} +6 -6
- package/dist/cdn/chunks/{CloudPanels-Ba3GLmvF.js.map → CloudPanels-bHhh9AUA.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-D2dCQ9gg.js → CollaboratorBar-DgqcaGGI.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-D2dCQ9gg.js.map → CollaboratorBar-DgqcaGGI.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CV2HveQk.js → CommentsPanel-Cy4TlTHC.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-CV2HveQk.js.map → CommentsPanel-Cy4TlTHC.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-Dok_vaRc.js → CommentsSidebar-C7oAP3Mx.js} +5 -5
- package/dist/cdn/chunks/{CommentsSidebar-Dok_vaRc.js.map → CommentsSidebar-C7oAP3Mx.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DGDl3ota.js → CountdownBlock-DdC8Lg5F.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-DGDl3ota.js.map → CountdownBlock-DdC8Lg5F.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-B9Rin64t.js → CountdownToolbar-CN9h4nlC.js} +22 -21
- package/dist/cdn/chunks/{CountdownToolbar-B9Rin64t.js.map → CountdownToolbar-CN9h4nlC.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-eCuTFak2.js → DesignReferenceSidebar-Bjo0M-AY.js} +7 -7
- package/dist/cdn/chunks/{DesignReferenceSidebar-eCuTFak2.js.map → DesignReferenceSidebar-Bjo0M-AY.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CP7FEzw7.js → IssuesPanel-DdFk-Blf.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-CP7FEzw7.js.map → IssuesPanel-DdFk-Blf.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-Cm3TDKb3.js → LoadingTrack-Ba5xh5HD.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-Cm3TDKb3.js.map → LoadingTrack-Ba5xh5HD.js.map} +1 -1
- package/dist/cdn/chunks/LogicTagInsertButton-DpyPozop.js +1035 -0
- package/dist/cdn/chunks/LogicTagInsertButton-DpyPozop.js.map +1 -0
- package/dist/cdn/chunks/MediaEditModal-BBZRcYKe.js +3529 -0
- package/dist/cdn/chunks/MediaEditModal-BBZRcYKe.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-TYrKKHX5.js → MediaPanels-CSBCsFwT.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-TYrKKHX5.js.map → MediaPanels-CSBCsFwT.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagInput-ERJr7bP_.js +83 -0
- package/dist/cdn/chunks/MergeTagInput-ERJr7bP_.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagModeToggle-QGTUIWWo.js → MergeTagModeToggle-n3nvSNeQ.js} +5 -5
- package/dist/cdn/chunks/{MergeTagModeToggle-QGTUIWWo.js.map → MergeTagModeToggle-n3nvSNeQ.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-D1tsPv4v.js → ParagraphEditor-DO4RzP8l.js} +40 -40
- package/dist/cdn/chunks/{ParagraphEditor-D1tsPv4v.js.map → ParagraphEditor-DO4RzP8l.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-BeCxNPLS.js → RestoreVersionDialog-CzZ_sFnz.js} +5 -5
- package/dist/cdn/chunks/{RestoreVersionDialog-BeCxNPLS.js.map → RestoreVersionDialog-CzZ_sFnz.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BBxzACFQ.js → RichTextEditorContent-Ch5zeyZ7.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-BBxzACFQ.js.map → RichTextEditorContent-Ch5zeyZ7.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CLgh_g7H.js → SaveBlockDialog-LgxYrXyx.js} +10 -9
- package/dist/cdn/chunks/{SaveBlockDialog-CLgh_g7H.js.map → SaveBlockDialog-LgxYrXyx.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-B4TcUJJe.js → SavedBlocksBrowserModal-CdeSsTpb.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-B4TcUJJe.js.map → SavedBlocksBrowserModal-CdeSsTpb.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-CaBsHoRC.js → SavedBlocksPanels-B5hakNJj.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-CaBsHoRC.js.map → SavedBlocksPanels-B5hakNJj.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-iG35XCDx.js → SavedBlocksPickBar-Cl6PLwwV.js} +5 -5
- package/dist/cdn/chunks/{SavedBlocksPickBar-iG35XCDx.js.map → SavedBlocksPickBar-Cl6PLwwV.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-DuQJBykq.js → TemplateScoringPanel--JxR6CsQ.js} +6 -6
- package/dist/cdn/chunks/{TemplateScoringPanel-DuQJBykq.js.map → TemplateScoringPanel--JxR6CsQ.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js +207 -0
- package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-D6Woss3r.js → TestEmailModal-BAuDxJtD.js} +9 -9
- package/dist/cdn/chunks/{TestEmailModal-D6Woss3r.js.map → TestEmailModal-BAuDxJtD.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-CWQFB7J3.js → TestEmailPanel-GUGZisLp.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-CWQFB7J3.js.map → TestEmailPanel-GUGZisLp.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CbY1tgSl.js → TitleEditor-uKu33Nwr.js} +12 -12
- package/dist/cdn/chunks/{TitleEditor-CbY1tgSl.js.map → TitleEditor-uKu33Nwr.js.map} +1 -1
- package/dist/cdn/chunks/ToggleSwitch-CDy8OfcB.js +104 -0
- package/dist/cdn/chunks/ToggleSwitch-CDy8OfcB.js.map +1 -0
- package/dist/cdn/chunks/Toolbar-dxDYwN5E.js +2385 -0
- package/dist/cdn/chunks/Toolbar-dxDYwN5E.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-CGpp-d_r.js → TplModal-DuwS2ifK.js} +5 -5
- package/dist/cdn/chunks/{TplModal-CGpp-d_r.js.map → TplModal-DuwS2ifK.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-ByVJXDbK.js → VersionHistoryMenu-Dij1pTEb.js} +6 -6
- package/dist/cdn/chunks/{VersionHistoryMenu-ByVJXDbK.js.map → VersionHistoryMenu-Dij1pTEb.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-CQJ5OggF.js → VersionHistoryPanels-GeR6MStB.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-CQJ5OggF.js.map → VersionHistoryPanels-GeR6MStB.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-G4lLbfr8.js → VersionPreviewBanner-Df3FVlig.js} +4 -4
- package/dist/cdn/chunks/{VersionPreviewBanner-G4lLbfr8.js.map → VersionPreviewBanner-Df3FVlig.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CQY-vxdM.js → blockTypeIcons-raBjStuv.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-CQY-vxdM.js.map → blockTypeIcons-raBjStuv.js.map} +1 -1
- package/dist/cdn/chunks/{ca-Jx2CDwtn.js → ca-BTf1Zbqb.js} +10 -1
- package/dist/cdn/chunks/{ca-Jx2CDwtn.js.map → ca-BTf1Zbqb.js.map} +1 -1
- package/dist/cdn/chunks/{cloud-BLgCKP7Z.js → cloud-eaXyxZ8l.js} +2 -2
- package/dist/cdn/chunks/{cloud-BLgCKP7Z.js.map → cloud-eaXyxZ8l.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-ClvtMBF1.js → createCloudRuntime-D5bXzcTe.js} +6 -6
- package/dist/cdn/chunks/{createCloudRuntime-ClvtMBF1.js.map → createCloudRuntime-D5bXzcTe.js.map} +1 -1
- package/dist/{de-Ck0pBGHu.js → cdn/chunks/de-xzrh9PA3.js} +11 -0
- package/dist/cdn/chunks/{de-Ck0pBGHu.js.map → de-xzrh9PA3.js.map} +1 -1
- package/dist/cdn/chunks/{dist-BW6Y49zE.js → dist-BRZhN8qJ.js} +4 -4
- package/dist/cdn/chunks/dist-BRZhN8qJ.js.map +1 -0
- package/dist/cdn/chunks/{dist-CAFTQ6Y2.js → dist-CXB2_kBa.js} +27 -22
- package/dist/cdn/chunks/dist-CXB2_kBa.js.map +1 -0
- package/dist/cdn/chunks/{draggable-kbOhCgnk.js → draggable-IB4x6w2O.js} +1477 -1470
- package/dist/cdn/chunks/draggable-IB4x6w2O.js.map +1 -0
- package/dist/cdn/chunks/editor-modal-C-yBlj2C.js +2700 -0
- package/dist/cdn/chunks/editor-modal-C-yBlj2C.js.map +1 -0
- package/dist/cdn/chunks/en-DYtFUE2l.js +2 -0
- package/dist/cdn/chunks/{es-lagTvUfX.js → es-BT4LSpE2.js} +10 -1
- package/dist/cdn/chunks/{es-lagTvUfX.js.map → es-BT4LSpE2.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-D2YIhF7u.js → extensions-Bhu8UEE5.js} +105 -45
- package/dist/cdn/chunks/extensions-Bhu8UEE5.js.map +1 -0
- package/dist/cdn/chunks/{fr-C4hVl5Lk.js → fr-CI7OJoql.js} +10 -1
- package/dist/cdn/chunks/{fr-C4hVl5Lk.js.map → fr-CI7OJoql.js.map} +1 -1
- package/dist/cdn/chunks/{icons-DdrAicM2.js → icons-BKkJ-5xF.js} +43 -43
- package/dist/cdn/chunks/{icons-DdrAicM2.js.map → icons-BKkJ-5xF.js.map} +1 -1
- package/dist/cdn/chunks/{keys-DXYJTLZF.js → keys-dJbD1QPs.js} +2 -2
- package/dist/cdn/chunks/{keys-DXYJTLZF.js.map → keys-dJbD1QPs.js.map} +1 -1
- package/dist/{nl-CReD7Apd.js → cdn/chunks/nl-D8y5OWGB.js} +11 -0
- package/dist/cdn/chunks/{nl-CReD7Apd.js.map → nl-D8y5OWGB.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-BRA0-vGP.js → pt-BR-DMCbUBvJ.js} +10 -1
- package/dist/cdn/chunks/{pt-BR-BRA0-vGP.js.map → pt-BR-DMCbUBvJ.js.map} +1 -1
- package/dist/cdn/chunks/socialIcons-9VrG8X3m.js +1054 -0
- package/dist/cdn/chunks/socialIcons-9VrG8X3m.js.map +1 -0
- package/dist/cdn/chunks/{src-fn7uy1FD.js → src-O5Sp_qJ7.js} +3 -3
- package/dist/cdn/chunks/{src-fn7uy1FD.js.map → src-O5Sp_qJ7.js.map} +1 -1
- package/dist/cdn/chunks/templateSettingsFields-YCFVBVYh.js +36 -0
- package/dist/cdn/chunks/templateSettingsFields-YCFVBVYh.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-Epe8m3Vo.js → tiptap-DhLuKyDc.js} +2776 -2773
- package/dist/cdn/chunks/tiptap-DhLuKyDc.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-CT9gjvO_.js → useAliveFlag-DAlQLbM2.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-CT9gjvO_.js.map → useAliveFlag-DAlQLbM2.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-OezCj0cx.js → useCloudI18n-C09JcFS0.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-OezCj0cx.js.map → useCloudI18n-C09JcFS0.js.map} +1 -1
- package/dist/cdn/chunks/useEditorCore-BHmIp1hW.js +2592 -0
- package/dist/cdn/chunks/useEditorCore-BHmIp1hW.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-DFx2fXJP.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-ByHPMqYT.js.map → useEditorRoot-DFx2fXJP.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-BhE7ndNr.js → useI18n-DTZ9sIcv.js} +3 -3
- package/dist/cdn/chunks/{useI18n-BhE7ndNr.js.map → useI18n-DTZ9sIcv.js.map} +1 -1
- package/dist/cdn/chunks/useLogicTag-E2V0Xdcb.js +38 -0
- package/dist/cdn/chunks/useLogicTag-E2V0Xdcb.js.map +1 -0
- package/dist/cdn/chunks/{useMergeTag-DE2mpy1w.js → useMergeTag-BE8oDoha.js} +3 -3
- package/dist/cdn/chunks/{useMergeTag-DE2mpy1w.js.map → useMergeTag-BE8oDoha.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BPL891uG.js → usePopoverPosition-gB9q-ql7.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-BPL891uG.js.map → usePopoverPosition-gB9q-ql7.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-DwF4pVur.js → useScrollToBlock-CtTXwmiU.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-DwF4pVur.js.map → useScrollToBlock-CtTXwmiU.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +809 -3337
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-9xX6RVHz.js → check-eqb2JhqU.js} +1 -1
- package/dist/{chevron-down-J5hFJ6TL.js → chevron-down-Dkr-7Ywl.js} +1 -1
- package/dist/{chevron-right-BJuo5PQ-.js → chevron-right-Bge4XF_B.js} +1 -1
- package/dist/{chevron-up-Qfi5k52_.js → chevron-up-CQAyl0kC.js} +1 -1
- package/dist/{circle-alert-BiArYmkB.js → circle-alert-CYgTHKWr.js} +1 -1
- package/dist/{clock-BkYJZ7Y0.js → clock-BgSJZJP5.js} +1 -1
- package/dist/{cloud-DdidMW6f.js → cloud-C9xWZXhg.js} +1 -1
- package/dist/{copy-BRLUNHwF.js → copy-mw6PVnOJ.js} +1 -1
- package/dist/{createCloudRuntime-CNFXaTNQ.js → createCloudRuntime-BGd5--Bq.js} +5 -5
- package/dist/{createLucideIcon-CDDkF1Tm.js → createLucideIcon-BxY5yz5u.js} +6 -6
- package/dist/{cdn/chunks/de-Ck0pBGHu.js → de-xzrh9PA3.js} +9 -2
- package/dist/{dist-D8i1ixHK.js → dist-8VFzbeu9.js} +3 -3
- package/dist/{dist-DBirAJIs.js → dist-BDuPwOyn.js} +26 -21
- package/dist/{dist-CtF9STPS.js → dist-BJM3eFyT.js} +1 -1
- package/dist/{dist-DkcA6epL.js → dist-BdHF7nyq.js} +3 -3
- package/dist/{dist-ByT5fgKq.js → dist-Bl4rxpX9.js} +1 -1
- package/dist/{dist-BVqAYoRB.js → dist-BmsLcnrO.js} +4 -4
- package/dist/{dist-CtMXAH7a.js → dist-BxVnMgXZ.js} +1 -1
- package/dist/{dist-DC-3T0ED.js → dist-CQSVro7b.js} +1 -1
- package/dist/{dist-f7HXo6j6.js → dist-DQbOebGW.js} +1 -1
- package/dist/{dist-DL9334yz.js → dist-DerFNpDY.js} +3 -3
- package/dist/{dist-D08oVYhr.js → dist-Djmzp6wi.js} +1 -1
- package/dist/{dist-D7WY8VPq.js → dist-DyrEOKEJ.js} +1 -1
- package/dist/{dist-DzdeVn-W.js → dist-EDkj3Ub1.js} +1 -1
- package/dist/{dist-C1tsW_99.js → dist-wyXxj3R1.js} +1 -1
- package/dist/editor-modal-oD1qNz_P.js +2773 -0
- package/dist/en-CM5fTFSo.js +2 -0
- package/dist/{es-lagTvUfX.js → es-BT4LSpE2.js} +9 -0
- package/dist/extensions-DRN-elXT.js +1645 -0
- package/dist/{eye-DwhBOaV8.js → eye-DphkRtAD.js} +1 -1
- package/dist/{fr-C4hVl5Lk.js → fr-CI7OJoql.js} +9 -0
- package/dist/{image-up-CiyQNZBt.js → image-up-Qi2BXD7T.js} +1 -1
- package/dist/{info-D6A1qEiF.js → info-VSyAs02q.js} +1 -1
- package/dist/{keys-DD1rl72F.js → keys-BdoSgsz9.js} +1 -1
- package/dist/{link-tKGmYWsB.js → link-CNuozGqD.js} +1 -1
- package/dist/{list-DjZQRpeI.js → list-BA0I5Wmu.js} +1 -1
- package/dist/{loader-circle-D9ZL3Sv0.js → loader-circle-z5eeqasv.js} +1 -1
- package/dist/{message-circle-KTHxCcpB.js → message-circle-BsQ9hEup.js} +1 -1
- package/dist/{cdn/chunks/nl-CReD7Apd.js → nl-D8y5OWGB.js} +9 -2
- package/dist/package-OkXfuRoO.js +25 -0
- package/dist/{pencil-Bq-nbQ7F.js → pencil-DFVFA7Dj.js} +1 -1
- package/dist/{plus-CRMnR4IG.js → plus-D8bkVjZ7.js} +1 -1
- package/dist/{pt-BR-BRA0-vGP.js → pt-BR-DMCbUBvJ.js} +9 -0
- package/dist/{refresh-cw-D7bYS5tm.js → refresh-cw-DPB7YFuz.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-PnoZU512.js → runtime-dom.esm-bundler-BGbPz4-g.js} +2 -2
- package/dist/{search-DUo0YwPz.js → search-C-dCgqIa.js} +1 -1
- package/dist/{send-DaVMQphu.js → send-Cm2fy2zm.js} +1 -1
- package/dist/{shield-check-DxaaurL9.js → shield-check-COgBYFDF.js} +1 -1
- package/dist/smartphone-v0u_MOEV.js +46 -0
- package/dist/socialIcons-DkGcpEwC.js +1130 -0
- package/dist/{sparkles-D6T6k30e.js → sparkles-Ds0RF8Iu.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templateSettingsFields-YCFVBVYh.js +34 -0
- package/dist/templatical-editor.js +895 -3498
- package/dist/{text-align-start-vreFpmCX.js → text-align-start-DiavaIm6.js} +1 -1
- package/dist/{trash-DBv8MGY6.js → trash-DnOkfu2V.js} +1 -1
- package/dist/{triangle-alert-CmNS2LLv.js → triangle-alert-DGLAyXnh.js} +1 -1
- package/dist/{upload-DDB9Fs0P.js → upload-BBDme2cy.js} +1 -1
- package/dist/{useAliveFlag-oyByIcjy.js → useAliveFlag-BkKyhkwZ.js} +1 -1
- package/dist/{useCloudI18n-C1wuXik6.js → useCloudI18n-D1iedlP3.js} +2 -2
- package/dist/{useEditorCore-jfwgLThK.js → useEditorCore-C5APBjjV.js} +1140 -2325
- package/dist/{useEditorRoot-eVv4doqZ.js → useEditorRoot-BOxn5EfP.js} +2 -2
- package/dist/{useI18n-VOtdfENx.js → useI18n-Ds_-druD.js} +2 -2
- package/dist/useLogicTag-DoHfc08B.js +36 -0
- package/dist/{useMergeTag-CQM9pFca.js → useMergeTag-DXyum3kG.js} +2 -2
- package/dist/{usePopoverPosition-gZjRywai.js → usePopoverPosition-Du-Ah8E9.js} +2 -2
- package/dist/{useScrollToBlock-C0Ehnyl4.js → useScrollToBlock-DXQYPCnJ.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-DShF3P6k.js → vue.runtime.esm-bundler-CyqhBwpY.js} +1133 -1126
- package/dist/{x-B7sgO_z8.js → x-3BHV3Q6K.js} +1 -1
- package/package.json +14 -14
- package/dist/ColorPicker-BTtN94te.js +0 -501
- package/dist/FieldRow-C8nOknr_.js +0 -128
- package/dist/MergeTagInput-Cw1RoMly.js +0 -509
- package/dist/MergeTagSuggestion-BXO3UIXW.js +0 -1329
- package/dist/cdn/chunks/ColorPicker-BaonTCAQ.js +0 -502
- package/dist/cdn/chunks/ColorPicker-BaonTCAQ.js.map +0 -1
- package/dist/cdn/chunks/FieldRow-D9OJhYeb.js +0 -130
- package/dist/cdn/chunks/FieldRow-D9OJhYeb.js.map +0 -1
- package/dist/cdn/chunks/MergeTagInput-CSIThqkz.js +0 -470
- package/dist/cdn/chunks/MergeTagInput-CSIThqkz.js.map +0 -1
- package/dist/cdn/chunks/MergeTagSuggestion-CY6WK8Eb.js +0 -215
- package/dist/cdn/chunks/MergeTagSuggestion-CY6WK8Eb.js.map +0 -1
- package/dist/cdn/chunks/dist-BW6Y49zE.js.map +0 -1
- package/dist/cdn/chunks/dist-CAFTQ6Y2.js.map +0 -1
- package/dist/cdn/chunks/draggable-kbOhCgnk.js.map +0 -1
- package/dist/cdn/chunks/editor-modal-B6IdQWlf.js +0 -5908
- package/dist/cdn/chunks/editor-modal-B6IdQWlf.js.map +0 -1
- package/dist/cdn/chunks/en-DjunooBz.js +0 -2
- package/dist/cdn/chunks/extensions-D2YIhF7u.js.map +0 -1
- package/dist/cdn/chunks/tiptap-Epe8m3Vo.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-06PtcUi1.js +0 -3698
- package/dist/cdn/chunks/useEditorCore-06PtcUi1.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-ByHPMqYT.js +0 -10
- package/dist/editor-modal-uAEB6xKz.js +0 -5998
- package/dist/en-CQWkDCpm.js +0 -2
- package/dist/extensions-CcGj7OfS.js +0 -470
|
@@ -0,0 +1,1645 @@
|
|
|
1
|
+
import { A as e, At as t, B as n, E as r, J as i, V as a, Z as o, at as s, c, d as l, jt as u, kt as d, l as f, s as p, u as m, v as h } from "./vue.runtime.esm-bundler-CyqhBwpY.js";
|
|
2
|
+
import { a as g, c as _, s as v } from "./runtime-dom.esm-bundler-BGbPz4-g.js";
|
|
3
|
+
import { F as y, O as b, k as x, o as S } from "./dist-tGkjkX-v.js";
|
|
4
|
+
import { t as C } from "./useI18n-Ds_-druD.js";
|
|
5
|
+
import { a as w, o as T, s as E } from "./LogicTagInsertButton-D8IwH-9Z.js";
|
|
6
|
+
import { t as D } from "./useMergeTag-DXyum3kG.js";
|
|
7
|
+
import { Gn as O, H as k, Hn as A, Vn as j, Wn as M, gn as N, m as P, s as F, u as ee, v as te } from "./dist-DerFNpDY.js";
|
|
8
|
+
import { n as ne, t as re } from "./dist-BmsLcnrO.js";
|
|
9
|
+
//#region src/extensions/FontSize.ts
|
|
10
|
+
var ie = F.create({
|
|
11
|
+
name: "fontSize",
|
|
12
|
+
addOptions() {
|
|
13
|
+
return { types: ["textStyle"] };
|
|
14
|
+
},
|
|
15
|
+
addGlobalAttributes() {
|
|
16
|
+
return [{
|
|
17
|
+
types: this.options.types,
|
|
18
|
+
attributes: { fontSize: {
|
|
19
|
+
default: null,
|
|
20
|
+
parseHTML: (e) => e.style.fontSize?.replace(/['"]+/g, "") || null,
|
|
21
|
+
renderHTML: (e) => e.fontSize ? { style: `font-size: ${e.fontSize}` } : {}
|
|
22
|
+
} }
|
|
23
|
+
}];
|
|
24
|
+
},
|
|
25
|
+
addCommands() {
|
|
26
|
+
return {
|
|
27
|
+
setFontSize: (e) => ({ chain: t }) => t().setMark("textStyle", { fontSize: e }).run(),
|
|
28
|
+
unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}), ae = F.create({
|
|
32
|
+
name: "letterSpacing",
|
|
33
|
+
addOptions() {
|
|
34
|
+
return { types: ["textStyle"] };
|
|
35
|
+
},
|
|
36
|
+
addGlobalAttributes() {
|
|
37
|
+
return [{
|
|
38
|
+
types: this.options.types,
|
|
39
|
+
attributes: { letterSpacing: {
|
|
40
|
+
default: null,
|
|
41
|
+
parseHTML: (e) => e.style.letterSpacing?.replace(/['"]+/g, "") || null,
|
|
42
|
+
renderHTML: (e) => e.letterSpacing ? { style: `letter-spacing: ${e.letterSpacing}` } : {}
|
|
43
|
+
} }
|
|
44
|
+
}];
|
|
45
|
+
},
|
|
46
|
+
addCommands() {
|
|
47
|
+
return {
|
|
48
|
+
setLetterSpacing: (e) => ({ chain: t }) => t().setMark("textStyle", { letterSpacing: e }).run(),
|
|
49
|
+
unsetLetterSpacing: () => ({ chain: e }) => e().setMark("textStyle", { letterSpacing: null }).removeEmptyTextStyle().run()
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}), oe = F.create({
|
|
53
|
+
name: "lineBoundaryKeys",
|
|
54
|
+
addKeyboardShortcuts() {
|
|
55
|
+
let e = (e) => ({ editor: t }) => {
|
|
56
|
+
let n = t.view;
|
|
57
|
+
if (!n || n.composing) return !1;
|
|
58
|
+
let r = typeof n.root?.getSelection == "function" ? n.root.getSelection() : n.dom?.ownerDocument?.getSelection?.() ?? null;
|
|
59
|
+
return !r || typeof r.modify != "function" || !r.anchorNode || !n.dom.contains(r.anchorNode) ? !1 : (r.modify("move", e, "lineboundary"), !0);
|
|
60
|
+
};
|
|
61
|
+
return {
|
|
62
|
+
End: e("forward"),
|
|
63
|
+
Home: e("backward")
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}), se = F.create({
|
|
67
|
+
name: "lineHeight",
|
|
68
|
+
addOptions() {
|
|
69
|
+
return {
|
|
70
|
+
types: ["paragraph"],
|
|
71
|
+
defaultLineHeight: "1.5"
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
addGlobalAttributes() {
|
|
75
|
+
return [{
|
|
76
|
+
types: this.options.types,
|
|
77
|
+
attributes: { lineHeight: {
|
|
78
|
+
default: null,
|
|
79
|
+
parseHTML: (e) => e.style.lineHeight || null,
|
|
80
|
+
renderHTML: (e) => e.lineHeight ? { style: `line-height: ${e.lineHeight}` } : {}
|
|
81
|
+
} }
|
|
82
|
+
}];
|
|
83
|
+
},
|
|
84
|
+
addCommands() {
|
|
85
|
+
return {
|
|
86
|
+
setLineHeight: (e) => ({ commands: t }) => this.options.types.every((n) => t.updateAttributes(n, { lineHeight: e })),
|
|
87
|
+
unsetLineHeight: () => ({ commands: e }) => this.options.types.every((t) => e.resetAttributes(t, "lineHeight"))
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
}), ce = [
|
|
91
|
+
"aria-label",
|
|
92
|
+
"data-tooltip",
|
|
93
|
+
"onKeydown"
|
|
94
|
+
], le = ["aria-label", "onKeydown"], ue = ["aria-label"], de = /* @__PURE__ */ h({
|
|
95
|
+
__name: "LogicMergeTagNodeView",
|
|
96
|
+
props: {
|
|
97
|
+
node: {},
|
|
98
|
+
editor: {},
|
|
99
|
+
getPos: { type: Function },
|
|
100
|
+
deleteNode: { type: Function },
|
|
101
|
+
updateAttributes: { type: Function }
|
|
102
|
+
},
|
|
103
|
+
setup(i) {
|
|
104
|
+
let h = i, { syntax: x } = D(), { t: S } = C(), w = p(() => y(h.node.attrs.value, x)), T = p(() => b(h.node.attrs.value, x)), E = o(!1), O = o(""), k = o(null), A = !1;
|
|
105
|
+
function j() {
|
|
106
|
+
O.value = h.node.attrs.value, A = !1, E.value = !0, r(() => {
|
|
107
|
+
k.value?.focus(), k.value?.select();
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function M() {
|
|
111
|
+
if (A) return;
|
|
112
|
+
A = !0;
|
|
113
|
+
let e = O.value.trim();
|
|
114
|
+
if (!e) {
|
|
115
|
+
E.value = !1;
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
e !== h.node.attrs.value && h.updateAttributes({
|
|
119
|
+
value: e,
|
|
120
|
+
keyword: y(e, x) ? b(e, x) : ""
|
|
121
|
+
}), E.value = !1;
|
|
122
|
+
}
|
|
123
|
+
function N(e) {
|
|
124
|
+
e.key === "Enter" ? (e.preventDefault(), M()) : e.key === "Escape" && (E.value = !1);
|
|
125
|
+
}
|
|
126
|
+
return (r, o) => (e(), f(s(re), {
|
|
127
|
+
as: "span",
|
|
128
|
+
class: d(w.value ? "tpl-logic-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase tpl:select-none" : ""),
|
|
129
|
+
style: t(w.value ? "background-color: transparent; border: 1.5px solid color-mix(in srgb, var(--tpl-primary) 50%, transparent); color: var(--tpl-primary);" : ""),
|
|
130
|
+
contenteditable: "false"
|
|
131
|
+
}, {
|
|
132
|
+
default: n(() => [E.value ? a((e(), l("input", {
|
|
133
|
+
key: 0,
|
|
134
|
+
ref_key: "inputRef",
|
|
135
|
+
ref: k,
|
|
136
|
+
"onUpdate:modelValue": o[0] ||= (e) => O.value = e,
|
|
137
|
+
type: "text",
|
|
138
|
+
class: "tpl:w-40 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:normal-case tpl:outline-none tpl:text-[var(--tpl-primary)]",
|
|
139
|
+
onBlur: M,
|
|
140
|
+
onKeydown: N
|
|
141
|
+
}, null, 544)), [[g, O.value]]) : w.value ? (e(), l("span", {
|
|
142
|
+
key: 1,
|
|
143
|
+
role: "button",
|
|
144
|
+
tabindex: "0",
|
|
145
|
+
"aria-label": s(S).mergeTag.editValue,
|
|
146
|
+
class: "tpl-tooltip tpl:cursor-pointer",
|
|
147
|
+
"data-tooltip": i.node.attrs.value,
|
|
148
|
+
onClick: _(j, ["stop"]),
|
|
149
|
+
onKeydown: [v(_(j, ["stop"]), ["enter"]), v(_(j, ["prevent", "stop"]), ["space"])]
|
|
150
|
+
}, u(T.value), 41, ce)) : (e(), l("span", {
|
|
151
|
+
key: 2,
|
|
152
|
+
role: "button",
|
|
153
|
+
tabindex: "0",
|
|
154
|
+
"aria-label": s(S).mergeTag.editValue,
|
|
155
|
+
onClick: _(j, ["stop"]),
|
|
156
|
+
onKeydown: [v(_(j, ["stop"]), ["enter"]), v(_(j, ["prevent", "stop"]), ["space"])]
|
|
157
|
+
}, u(i.node.attrs.value), 41, le)), w.value ? (e(), l("button", {
|
|
158
|
+
key: 3,
|
|
159
|
+
type: "button",
|
|
160
|
+
"aria-label": s(S).mergeTag.deleteMergeTag,
|
|
161
|
+
class: "tpl-merge-tag-delete tpl:flex tpl:size-5 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all tpl:hover:opacity-100 tpl:text-[var(--tpl-primary)]",
|
|
162
|
+
contenteditable: "false",
|
|
163
|
+
onClick: o[1] ||= _((...e) => i.deleteNode && i.deleteNode(...e), ["stop", "prevent"])
|
|
164
|
+
}, [...o[2] ||= [c("svg", {
|
|
165
|
+
width: "10",
|
|
166
|
+
height: "10",
|
|
167
|
+
viewBox: "0 0 24 24",
|
|
168
|
+
fill: "none",
|
|
169
|
+
stroke: "currentColor",
|
|
170
|
+
"stroke-width": "3",
|
|
171
|
+
"aria-hidden": "true"
|
|
172
|
+
}, [c("line", {
|
|
173
|
+
x1: "18",
|
|
174
|
+
y1: "6",
|
|
175
|
+
x2: "6",
|
|
176
|
+
y2: "18"
|
|
177
|
+
}), c("line", {
|
|
178
|
+
x1: "6",
|
|
179
|
+
y1: "6",
|
|
180
|
+
x2: "18",
|
|
181
|
+
y2: "18"
|
|
182
|
+
})], -1)]], 8, ue)) : m("", !0)]),
|
|
183
|
+
_: 1
|
|
184
|
+
}, 8, ["class", "style"]));
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region src/extensions/isNodeSelected.ts
|
|
189
|
+
function fe(e, t) {
|
|
190
|
+
let { $from: n, $to: r } = e.state.selection;
|
|
191
|
+
return n.pos === r.pos ? n.pos > 0 && n.nodeBefore?.type.name === t || n.nodeAfter?.type.name === t : !1;
|
|
192
|
+
}
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region src/extensions/renderVueNodeView.ts
|
|
195
|
+
function pe(e) {
|
|
196
|
+
return ne(e);
|
|
197
|
+
}
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region src/extensions/LogicMergeTagNode.ts
|
|
200
|
+
var me = P.create({
|
|
201
|
+
name: "logicMergeTagNode",
|
|
202
|
+
group: "inline",
|
|
203
|
+
inline: !0,
|
|
204
|
+
atom: !0,
|
|
205
|
+
addOptions() {
|
|
206
|
+
return { syntax: S.liquid };
|
|
207
|
+
},
|
|
208
|
+
addAttributes() {
|
|
209
|
+
return {
|
|
210
|
+
value: {
|
|
211
|
+
default: "",
|
|
212
|
+
rendered: !1,
|
|
213
|
+
parseHTML: (e) => e.getAttribute("data-logic-merge-tag") || ""
|
|
214
|
+
},
|
|
215
|
+
keyword: {
|
|
216
|
+
default: "",
|
|
217
|
+
rendered: !1,
|
|
218
|
+
parseHTML: (e) => e.getAttribute("data-keyword") || e.textContent || ""
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
},
|
|
222
|
+
parseHTML() {
|
|
223
|
+
return [{ tag: "span[data-logic-merge-tag]" }];
|
|
224
|
+
},
|
|
225
|
+
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
226
|
+
if (!y(e.attrs.value, this.options.syntax)) return [
|
|
227
|
+
"span",
|
|
228
|
+
{},
|
|
229
|
+
e.attrs.value
|
|
230
|
+
];
|
|
231
|
+
let n = b(e.attrs.value, this.options.syntax);
|
|
232
|
+
return [
|
|
233
|
+
"span",
|
|
234
|
+
N(t, {
|
|
235
|
+
"data-logic-merge-tag": e.attrs.value,
|
|
236
|
+
"data-keyword": n
|
|
237
|
+
}),
|
|
238
|
+
n
|
|
239
|
+
];
|
|
240
|
+
},
|
|
241
|
+
addNodeView() {
|
|
242
|
+
return pe(de);
|
|
243
|
+
},
|
|
244
|
+
addKeyboardShortcuts() {
|
|
245
|
+
return {
|
|
246
|
+
Backspace: () => fe(this.editor, this.name),
|
|
247
|
+
Delete: () => fe(this.editor, this.name)
|
|
248
|
+
};
|
|
249
|
+
},
|
|
250
|
+
addInputRules() {
|
|
251
|
+
let e = RegExp(this.options.syntax.logic.source + "$", "");
|
|
252
|
+
return [new ee({
|
|
253
|
+
find: e,
|
|
254
|
+
handler: ({ state: e, range: t, match: n }) => {
|
|
255
|
+
let r = n[0];
|
|
256
|
+
if (!y(r, this.options.syntax)) return;
|
|
257
|
+
let i = b(r, this.options.syntax), a = this.type.create({
|
|
258
|
+
value: r,
|
|
259
|
+
keyword: i
|
|
260
|
+
});
|
|
261
|
+
e.tr.replaceWith(t.from, t.to, a);
|
|
262
|
+
}
|
|
263
|
+
})];
|
|
264
|
+
},
|
|
265
|
+
addPasteRules() {
|
|
266
|
+
let e = new RegExp(this.options.syntax.logic.source, "g");
|
|
267
|
+
return [new te({
|
|
268
|
+
find: e,
|
|
269
|
+
handler: ({ state: e, range: t, match: n }) => {
|
|
270
|
+
let r = n[0];
|
|
271
|
+
if (!y(r, this.options.syntax)) return;
|
|
272
|
+
let i = b(r, this.options.syntax), a = this.type.create({
|
|
273
|
+
value: r,
|
|
274
|
+
keyword: i
|
|
275
|
+
});
|
|
276
|
+
e.tr.replaceWith(t.from, t.to, a);
|
|
277
|
+
}
|
|
278
|
+
})];
|
|
279
|
+
}
|
|
280
|
+
}), he = ["aria-invalid"], ge = [
|
|
281
|
+
"aria-label",
|
|
282
|
+
"data-tooltip",
|
|
283
|
+
"onKeydown"
|
|
284
|
+
], _e = ["aria-label"], ve = /* @__PURE__ */ h({
|
|
285
|
+
__name: "MergeTagNodeView",
|
|
286
|
+
props: {
|
|
287
|
+
node: {},
|
|
288
|
+
deleteNode: { type: Function },
|
|
289
|
+
updateAttributes: { type: Function }
|
|
290
|
+
},
|
|
291
|
+
setup(t) {
|
|
292
|
+
let m = t, { getMergeTagLabel: h, getMergeTagDisplayLabel: y, findMergeTag: b, canRepickMergeTag: x, showRawValue: S, isMergeTagValue: w, requestMergeTag: T } = D(), { t: E, format: O } = C(), k = p(() => y(m.node.attrs.value, m.node.attrs.label)), A = p(() => x(m.node.attrs.value)), j = o(!1), M = o(""), N = o(null), P = !1;
|
|
293
|
+
i(() => {
|
|
294
|
+
P = !0;
|
|
295
|
+
});
|
|
296
|
+
let F = p(() => M.value.trim() === "" || w(M.value.trim()));
|
|
297
|
+
async function ee() {
|
|
298
|
+
let e = await T({
|
|
299
|
+
reason: "edit",
|
|
300
|
+
current: b(m.node.attrs.value)
|
|
301
|
+
});
|
|
302
|
+
!P && e && m.updateAttributes({
|
|
303
|
+
value: e.value,
|
|
304
|
+
label: e.label
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
function te() {
|
|
308
|
+
M.value = m.node.attrs.value, j.value = !0, r(() => {
|
|
309
|
+
N.value?.focus(), N.value?.select();
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
function ne() {
|
|
313
|
+
if (A.value) {
|
|
314
|
+
ee();
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
te();
|
|
318
|
+
}
|
|
319
|
+
function ie() {
|
|
320
|
+
let e = M.value.trim();
|
|
321
|
+
e && e !== m.node.attrs.value && w(e) && m.updateAttributes({
|
|
322
|
+
value: e,
|
|
323
|
+
label: h(e)
|
|
324
|
+
}), j.value = !1;
|
|
325
|
+
}
|
|
326
|
+
function ae(e) {
|
|
327
|
+
if (e.key === "Enter") {
|
|
328
|
+
if (e.preventDefault(), !F.value) return;
|
|
329
|
+
ie();
|
|
330
|
+
} else e.key === "Escape" && (j.value = !1);
|
|
331
|
+
}
|
|
332
|
+
return (r, i) => (e(), f(s(re), {
|
|
333
|
+
as: "span",
|
|
334
|
+
class: "tpl-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium tpl:select-none tpl:text-[var(--tpl-primary)]",
|
|
335
|
+
style: { "background-color": "color-mix(in srgb, var(--tpl-primary) 20%, transparent)" },
|
|
336
|
+
contenteditable: "false"
|
|
337
|
+
}, {
|
|
338
|
+
default: n(() => [j.value ? a((e(), l("input", {
|
|
339
|
+
key: 0,
|
|
340
|
+
ref_key: "inputRef",
|
|
341
|
+
ref: N,
|
|
342
|
+
"onUpdate:modelValue": i[0] ||= (e) => M.value = e,
|
|
343
|
+
type: "text",
|
|
344
|
+
"aria-invalid": F.value ? void 0 : "true",
|
|
345
|
+
class: d(["tpl:w-32 tpl:rounded tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:outline-none tpl:text-[var(--tpl-primary)]", F.value ? "tpl:border-none" : "tpl:border tpl:border-[var(--tpl-danger)]"]),
|
|
346
|
+
onBlur: ie,
|
|
347
|
+
onKeydown: ae
|
|
348
|
+
}, null, 42, he)), [[g, M.value]]) : (e(), l("span", {
|
|
349
|
+
key: 1,
|
|
350
|
+
role: "button",
|
|
351
|
+
tabindex: "0",
|
|
352
|
+
"aria-label": A.value ? s(O)(s(E).mergeTag.changeTag, { label: k.value }) : s(E).mergeTag.editValue,
|
|
353
|
+
class: d(["tpl:cursor-pointer", s(S) ? "tpl-tooltip" : ""]),
|
|
354
|
+
"data-tooltip": s(S) ? t.node.attrs.value : void 0,
|
|
355
|
+
onClick: _(ne, ["stop"]),
|
|
356
|
+
onKeydown: [v(_(ne, ["stop"]), ["enter"]), v(_(ne, ["prevent", "stop"]), ["space"])]
|
|
357
|
+
}, u(k.value), 43, ge)), c("button", {
|
|
358
|
+
type: "button",
|
|
359
|
+
"aria-label": s(E).mergeTag.deleteMergeTag,
|
|
360
|
+
class: "tpl-merge-tag-delete tpl:flex tpl:size-5 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all tpl:hover:opacity-100 tpl:text-[var(--tpl-primary)]",
|
|
361
|
+
contenteditable: "false",
|
|
362
|
+
onClick: i[1] ||= _((...e) => t.deleteNode && t.deleteNode(...e), ["stop", "prevent"])
|
|
363
|
+
}, [...i[2] ||= [c("svg", {
|
|
364
|
+
width: "10",
|
|
365
|
+
height: "10",
|
|
366
|
+
viewBox: "0 0 24 24",
|
|
367
|
+
fill: "none",
|
|
368
|
+
stroke: "currentColor",
|
|
369
|
+
"stroke-width": "3",
|
|
370
|
+
"aria-hidden": "true"
|
|
371
|
+
}, [c("line", {
|
|
372
|
+
x1: "18",
|
|
373
|
+
y1: "6",
|
|
374
|
+
x2: "6",
|
|
375
|
+
y2: "18"
|
|
376
|
+
}), c("line", {
|
|
377
|
+
x1: "6",
|
|
378
|
+
y1: "6",
|
|
379
|
+
x2: "18",
|
|
380
|
+
y2: "18"
|
|
381
|
+
})], -1)]], 8, _e)]),
|
|
382
|
+
_: 1
|
|
383
|
+
}));
|
|
384
|
+
}
|
|
385
|
+
}), ye = P.create({
|
|
386
|
+
name: "mergeTagNode",
|
|
387
|
+
group: "inline",
|
|
388
|
+
inline: !0,
|
|
389
|
+
atom: !0,
|
|
390
|
+
addOptions() {
|
|
391
|
+
return {
|
|
392
|
+
mergeTags: () => [],
|
|
393
|
+
syntax: S.liquid
|
|
394
|
+
};
|
|
395
|
+
},
|
|
396
|
+
addAttributes() {
|
|
397
|
+
return {
|
|
398
|
+
label: {
|
|
399
|
+
default: "",
|
|
400
|
+
rendered: !1,
|
|
401
|
+
parseHTML: (e) => e.getAttribute("data-label") || e.textContent || ""
|
|
402
|
+
},
|
|
403
|
+
value: {
|
|
404
|
+
default: "",
|
|
405
|
+
rendered: !1,
|
|
406
|
+
parseHTML: (e) => e.getAttribute("data-merge-tag") || ""
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
},
|
|
410
|
+
parseHTML() {
|
|
411
|
+
return [{ tag: "span[data-merge-tag]" }];
|
|
412
|
+
},
|
|
413
|
+
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
414
|
+
let n = x(e.attrs.value, this.options.mergeTags());
|
|
415
|
+
return [
|
|
416
|
+
"span",
|
|
417
|
+
N(t, {
|
|
418
|
+
"data-merge-tag": e.attrs.value,
|
|
419
|
+
"data-label": n
|
|
420
|
+
}),
|
|
421
|
+
n
|
|
422
|
+
];
|
|
423
|
+
},
|
|
424
|
+
addNodeView() {
|
|
425
|
+
return pe(ve);
|
|
426
|
+
},
|
|
427
|
+
addCommands() {
|
|
428
|
+
return { insertMergeTag: (e) => ({ commands: t }) => t.insertContent({
|
|
429
|
+
type: this.name,
|
|
430
|
+
attrs: {
|
|
431
|
+
label: e.label,
|
|
432
|
+
value: e.value
|
|
433
|
+
}
|
|
434
|
+
}) };
|
|
435
|
+
},
|
|
436
|
+
addKeyboardShortcuts() {
|
|
437
|
+
return {
|
|
438
|
+
Backspace: () => fe(this.editor, this.name),
|
|
439
|
+
Delete: () => fe(this.editor, this.name)
|
|
440
|
+
};
|
|
441
|
+
},
|
|
442
|
+
addInputRules() {
|
|
443
|
+
let e = RegExp(this.options.syntax.value.source + "$", "");
|
|
444
|
+
return [new ee({
|
|
445
|
+
find: e,
|
|
446
|
+
handler: ({ state: e, range: t, match: n }) => {
|
|
447
|
+
let r = n[0], i = x(r, this.options.mergeTags()), a = this.type.create({
|
|
448
|
+
label: i,
|
|
449
|
+
value: r
|
|
450
|
+
});
|
|
451
|
+
e.tr.replaceWith(t.from, t.to, a);
|
|
452
|
+
}
|
|
453
|
+
})];
|
|
454
|
+
},
|
|
455
|
+
addPasteRules() {
|
|
456
|
+
let e = new RegExp(this.options.syntax.value.source, "g");
|
|
457
|
+
return [new te({
|
|
458
|
+
find: e,
|
|
459
|
+
handler: ({ state: e, range: t, match: n }) => {
|
|
460
|
+
let r = n[0], i = x(r, this.options.mergeTags()), a = this.type.create({
|
|
461
|
+
label: i,
|
|
462
|
+
value: r
|
|
463
|
+
});
|
|
464
|
+
e.tr.replaceWith(t.from, t.to, a);
|
|
465
|
+
}
|
|
466
|
+
})];
|
|
467
|
+
}
|
|
468
|
+
}), be = Math.min, I = Math.max, L = Math.round, R = Math.floor, z = (e) => ({
|
|
469
|
+
x: e,
|
|
470
|
+
y: e
|
|
471
|
+
}), xe = {
|
|
472
|
+
left: "right",
|
|
473
|
+
right: "left",
|
|
474
|
+
bottom: "top",
|
|
475
|
+
top: "bottom"
|
|
476
|
+
};
|
|
477
|
+
function Se(e, t) {
|
|
478
|
+
return typeof e == "function" ? e(t) : e;
|
|
479
|
+
}
|
|
480
|
+
function B(e) {
|
|
481
|
+
return e.split("-")[0];
|
|
482
|
+
}
|
|
483
|
+
function Ce(e) {
|
|
484
|
+
return e.split("-")[1];
|
|
485
|
+
}
|
|
486
|
+
function we(e) {
|
|
487
|
+
return e === "x" ? "y" : "x";
|
|
488
|
+
}
|
|
489
|
+
function Te(e) {
|
|
490
|
+
return e === "y" ? "height" : "width";
|
|
491
|
+
}
|
|
492
|
+
function V(e) {
|
|
493
|
+
let t = e[0];
|
|
494
|
+
return t === "t" || t === "b" ? "y" : "x";
|
|
495
|
+
}
|
|
496
|
+
function Ee(e) {
|
|
497
|
+
return we(V(e));
|
|
498
|
+
}
|
|
499
|
+
function De(e, t, n) {
|
|
500
|
+
n === void 0 && (n = !1);
|
|
501
|
+
let r = Ce(e), i = Ee(e), a = Te(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
502
|
+
return t.reference[a] > t.floating[a] && (o = Ie(o)), [o, Ie(o)];
|
|
503
|
+
}
|
|
504
|
+
function Oe(e) {
|
|
505
|
+
let t = Ie(e);
|
|
506
|
+
return [
|
|
507
|
+
ke(e),
|
|
508
|
+
t,
|
|
509
|
+
ke(t)
|
|
510
|
+
];
|
|
511
|
+
}
|
|
512
|
+
function ke(e) {
|
|
513
|
+
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
514
|
+
}
|
|
515
|
+
var Ae = ["left", "right"], je = ["right", "left"], Me = ["top", "bottom"], Ne = ["bottom", "top"];
|
|
516
|
+
function Pe(e, t, n) {
|
|
517
|
+
switch (e) {
|
|
518
|
+
case "top":
|
|
519
|
+
case "bottom": return n ? t ? je : Ae : t ? Ae : je;
|
|
520
|
+
case "left":
|
|
521
|
+
case "right": return t ? Me : Ne;
|
|
522
|
+
default: return [];
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
function Fe(e, t, n, r) {
|
|
526
|
+
let i = Ce(e), a = Pe(B(e), n === "start", r);
|
|
527
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(ke)))), a;
|
|
528
|
+
}
|
|
529
|
+
function Ie(e) {
|
|
530
|
+
let t = B(e);
|
|
531
|
+
return xe[t] + e.slice(t.length);
|
|
532
|
+
}
|
|
533
|
+
function Le(e) {
|
|
534
|
+
return {
|
|
535
|
+
top: e.top ?? 0,
|
|
536
|
+
right: e.right ?? 0,
|
|
537
|
+
bottom: e.bottom ?? 0,
|
|
538
|
+
left: e.left ?? 0
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
function Re(e) {
|
|
542
|
+
return typeof e == "number" ? {
|
|
543
|
+
top: e,
|
|
544
|
+
right: e,
|
|
545
|
+
bottom: e,
|
|
546
|
+
left: e
|
|
547
|
+
} : Le(e);
|
|
548
|
+
}
|
|
549
|
+
function ze(e) {
|
|
550
|
+
let { x: t, y: n, width: r, height: i } = e;
|
|
551
|
+
return {
|
|
552
|
+
width: r,
|
|
553
|
+
height: i,
|
|
554
|
+
top: n,
|
|
555
|
+
left: t,
|
|
556
|
+
right: t + r,
|
|
557
|
+
bottom: n + i,
|
|
558
|
+
x: t,
|
|
559
|
+
y: n
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
//#endregion
|
|
563
|
+
//#region ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
564
|
+
function Be(e, t, n) {
|
|
565
|
+
let { reference: r, floating: i } = e, a = V(t), o = Ee(t), s = Te(o), c = B(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
566
|
+
switch (c) {
|
|
567
|
+
case "top":
|
|
568
|
+
p = {
|
|
569
|
+
x: u,
|
|
570
|
+
y: r.y - i.height
|
|
571
|
+
};
|
|
572
|
+
break;
|
|
573
|
+
case "bottom":
|
|
574
|
+
p = {
|
|
575
|
+
x: u,
|
|
576
|
+
y: r.y + r.height
|
|
577
|
+
};
|
|
578
|
+
break;
|
|
579
|
+
case "right":
|
|
580
|
+
p = {
|
|
581
|
+
x: r.x + r.width,
|
|
582
|
+
y: d
|
|
583
|
+
};
|
|
584
|
+
break;
|
|
585
|
+
case "left":
|
|
586
|
+
p = {
|
|
587
|
+
x: r.x - i.width,
|
|
588
|
+
y: d
|
|
589
|
+
};
|
|
590
|
+
break;
|
|
591
|
+
default: p = {
|
|
592
|
+
x: r.x,
|
|
593
|
+
y: r.y
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
let m = Ce(t);
|
|
597
|
+
return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
|
|
598
|
+
}
|
|
599
|
+
async function Ve(e, t) {
|
|
600
|
+
t === void 0 && (t = {});
|
|
601
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = Se(t, e), p = Re(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = ze(await i.getClippingRect({
|
|
602
|
+
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
603
|
+
boundary: c,
|
|
604
|
+
rootBoundary: l,
|
|
605
|
+
strategy: s
|
|
606
|
+
})), g = u === "floating" ? {
|
|
607
|
+
x: n,
|
|
608
|
+
y: r,
|
|
609
|
+
width: a.floating.width,
|
|
610
|
+
height: a.floating.height
|
|
611
|
+
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
612
|
+
x: 1,
|
|
613
|
+
y: 1
|
|
614
|
+
}, y = ze(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
615
|
+
elements: o,
|
|
616
|
+
rect: g,
|
|
617
|
+
offsetParent: _,
|
|
618
|
+
strategy: s
|
|
619
|
+
}) : g);
|
|
620
|
+
return {
|
|
621
|
+
top: (h.top - y.top + p.top) / v.y,
|
|
622
|
+
bottom: (y.bottom - h.bottom + p.bottom) / v.y,
|
|
623
|
+
left: (h.left - y.left + p.left) / v.x,
|
|
624
|
+
right: (y.right - h.right + p.right) / v.x
|
|
625
|
+
};
|
|
626
|
+
}
|
|
627
|
+
var He = 50, Ue = async (e, t, n) => {
|
|
628
|
+
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
629
|
+
...o,
|
|
630
|
+
detectOverflow: Ve
|
|
631
|
+
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
632
|
+
reference: e,
|
|
633
|
+
floating: t,
|
|
634
|
+
strategy: i
|
|
635
|
+
}), { x: u, y: d } = Be(l, r, c), f = r, p = 0, m = {};
|
|
636
|
+
for (let n = 0; n < a.length; n++) {
|
|
637
|
+
let h = a[n];
|
|
638
|
+
if (!h) continue;
|
|
639
|
+
let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
|
|
640
|
+
x: u,
|
|
641
|
+
y: d,
|
|
642
|
+
initialPlacement: r,
|
|
643
|
+
placement: f,
|
|
644
|
+
strategy: i,
|
|
645
|
+
middlewareData: m,
|
|
646
|
+
rects: l,
|
|
647
|
+
platform: s,
|
|
648
|
+
elements: {
|
|
649
|
+
reference: e,
|
|
650
|
+
floating: t
|
|
651
|
+
}
|
|
652
|
+
});
|
|
653
|
+
u = v ?? u, d = y ?? d, m[g] = {
|
|
654
|
+
...m[g],
|
|
655
|
+
...b
|
|
656
|
+
}, x && p < He && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
657
|
+
reference: e,
|
|
658
|
+
floating: t,
|
|
659
|
+
strategy: i
|
|
660
|
+
}) : x.rects), {x: u, y: d} = Be(l, f, c)), n = -1);
|
|
661
|
+
}
|
|
662
|
+
return {
|
|
663
|
+
x: u,
|
|
664
|
+
y: d,
|
|
665
|
+
placement: f,
|
|
666
|
+
strategy: i,
|
|
667
|
+
middlewareData: m
|
|
668
|
+
};
|
|
669
|
+
}, We = function(e) {
|
|
670
|
+
return e === void 0 && (e = {}), {
|
|
671
|
+
name: "flip",
|
|
672
|
+
options: e,
|
|
673
|
+
async fn(t) {
|
|
674
|
+
var n;
|
|
675
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = Se(e, t);
|
|
676
|
+
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
677
|
+
let g = B(r), _ = V(o), v = B(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [Ie(o)] : Oe(o)), x = p !== "none";
|
|
678
|
+
!d && x && b.push(...Fe(o, m, p, y));
|
|
679
|
+
let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
|
|
680
|
+
if (l && w.push(C[g]), u) {
|
|
681
|
+
let e = De(r, a, y);
|
|
682
|
+
w.push(C[e[0]], C[e[1]]);
|
|
683
|
+
}
|
|
684
|
+
if (T = [...T, {
|
|
685
|
+
placement: r,
|
|
686
|
+
overflows: w
|
|
687
|
+
}], !w.every((e) => e <= 0)) {
|
|
688
|
+
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
689
|
+
if (t && (u !== "alignment" || _ === V(t) || T.every((e) => V(e.placement) !== _ || e.overflows[0] > 0))) return {
|
|
690
|
+
data: {
|
|
691
|
+
index: e,
|
|
692
|
+
overflows: T
|
|
693
|
+
},
|
|
694
|
+
reset: { placement: t }
|
|
695
|
+
};
|
|
696
|
+
let n = T.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
697
|
+
if (!n) switch (f) {
|
|
698
|
+
case "bestFit": {
|
|
699
|
+
let e = T.filter((e) => {
|
|
700
|
+
if (x) {
|
|
701
|
+
let t = V(e.placement);
|
|
702
|
+
return t === _ || t === "y";
|
|
703
|
+
}
|
|
704
|
+
return !0;
|
|
705
|
+
}).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
|
|
706
|
+
e && (n = e);
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
case "initialPlacement": n = o;
|
|
710
|
+
}
|
|
711
|
+
if (r !== n) return { reset: { placement: n } };
|
|
712
|
+
}
|
|
713
|
+
return {};
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
}, Ge = /*#__PURE__*/ new Set(["left", "top"]);
|
|
717
|
+
async function Ke(e, t) {
|
|
718
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = B(n), s = Ce(n), c = V(n) === "y", l = Ge.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = Se(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
719
|
+
mainAxis: d,
|
|
720
|
+
crossAxis: 0,
|
|
721
|
+
alignmentAxis: null
|
|
722
|
+
} : {
|
|
723
|
+
mainAxis: d.mainAxis || 0,
|
|
724
|
+
crossAxis: d.crossAxis || 0,
|
|
725
|
+
alignmentAxis: d.alignmentAxis
|
|
726
|
+
};
|
|
727
|
+
return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
|
|
728
|
+
x: p * u,
|
|
729
|
+
y: f * l
|
|
730
|
+
} : {
|
|
731
|
+
x: f * l,
|
|
732
|
+
y: p * u
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
var qe = function(e) {
|
|
736
|
+
return e === void 0 && (e = 0), {
|
|
737
|
+
name: "offset",
|
|
738
|
+
options: e,
|
|
739
|
+
async fn(t) {
|
|
740
|
+
var n;
|
|
741
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await Ke(t, e);
|
|
742
|
+
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
743
|
+
x: r + s.x,
|
|
744
|
+
y: i + s.y,
|
|
745
|
+
data: {
|
|
746
|
+
...s,
|
|
747
|
+
placement: a
|
|
748
|
+
}
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
};
|
|
752
|
+
};
|
|
753
|
+
//#endregion
|
|
754
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
755
|
+
function Je() {
|
|
756
|
+
return typeof window < "u";
|
|
757
|
+
}
|
|
758
|
+
function H(e) {
|
|
759
|
+
return Ye(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
760
|
+
}
|
|
761
|
+
function U(e) {
|
|
762
|
+
var t;
|
|
763
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
764
|
+
}
|
|
765
|
+
function W(e) {
|
|
766
|
+
return ((Ye(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
767
|
+
}
|
|
768
|
+
function Ye(e) {
|
|
769
|
+
return Je() ? e instanceof Node || e instanceof U(e).Node : !1;
|
|
770
|
+
}
|
|
771
|
+
function G(e) {
|
|
772
|
+
return Je() ? e instanceof Element || e instanceof U(e).Element : !1;
|
|
773
|
+
}
|
|
774
|
+
function K(e) {
|
|
775
|
+
return Je() ? e instanceof HTMLElement || e instanceof U(e).HTMLElement : !1;
|
|
776
|
+
}
|
|
777
|
+
function Xe(e) {
|
|
778
|
+
return !Je() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
|
|
779
|
+
}
|
|
780
|
+
function Ze(e) {
|
|
781
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = Y(e);
|
|
782
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
783
|
+
}
|
|
784
|
+
function Qe(e) {
|
|
785
|
+
return /^(table|td|th)$/.test(H(e));
|
|
786
|
+
}
|
|
787
|
+
function $e(e) {
|
|
788
|
+
try {
|
|
789
|
+
if (e.matches(":popover-open")) return !0;
|
|
790
|
+
} catch {}
|
|
791
|
+
try {
|
|
792
|
+
return e.matches(":modal");
|
|
793
|
+
} catch {
|
|
794
|
+
return !1;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
var et = /transform|translate|scale|rotate|perspective|filter/, tt = /paint|layout|strict|content/, q = (e) => !!e && e !== "none", nt;
|
|
798
|
+
function rt(e) {
|
|
799
|
+
let t = G(e) ? Y(e) : e;
|
|
800
|
+
return q(t.transform) || q(t.translate) || q(t.scale) || q(t.rotate) || q(t.perspective) || !at() && (q(t.backdropFilter) || q(t.filter)) || et.test(t.willChange || "") || tt.test(t.contain || "");
|
|
801
|
+
}
|
|
802
|
+
function it(e) {
|
|
803
|
+
let t = X(e);
|
|
804
|
+
for (; K(t) && !J(t);) {
|
|
805
|
+
if (rt(t)) return t;
|
|
806
|
+
if ($e(t)) return null;
|
|
807
|
+
t = X(t);
|
|
808
|
+
}
|
|
809
|
+
return null;
|
|
810
|
+
}
|
|
811
|
+
function at() {
|
|
812
|
+
return nt ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), nt;
|
|
813
|
+
}
|
|
814
|
+
function J(e) {
|
|
815
|
+
return /^(html|body|#document)$/.test(H(e));
|
|
816
|
+
}
|
|
817
|
+
function Y(e) {
|
|
818
|
+
return U(e).getComputedStyle(e);
|
|
819
|
+
}
|
|
820
|
+
function ot(e) {
|
|
821
|
+
return G(e) ? {
|
|
822
|
+
scrollLeft: e.scrollLeft,
|
|
823
|
+
scrollTop: e.scrollTop
|
|
824
|
+
} : {
|
|
825
|
+
scrollLeft: e.scrollX,
|
|
826
|
+
scrollTop: e.scrollY
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
function X(e) {
|
|
830
|
+
if (H(e) === "html") return e;
|
|
831
|
+
let t = e.assignedSlot || e.parentNode || Xe(e) && e.host || W(e);
|
|
832
|
+
return Xe(t) ? t.host : t;
|
|
833
|
+
}
|
|
834
|
+
function st(e) {
|
|
835
|
+
let t = X(e);
|
|
836
|
+
return J(t) ? (e.ownerDocument || e).body : K(t) && Ze(t) ? t : st(t);
|
|
837
|
+
}
|
|
838
|
+
function Z(e, t, n) {
|
|
839
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
840
|
+
let r = st(e), i = r === e.ownerDocument?.body, a = U(r);
|
|
841
|
+
if (i) {
|
|
842
|
+
let e = ct(a);
|
|
843
|
+
return t.concat(a, a.visualViewport || [], Ze(r) ? r : [], e && n ? Z(e) : []);
|
|
844
|
+
}
|
|
845
|
+
return t.concat(r, Z(r, [], n));
|
|
846
|
+
}
|
|
847
|
+
function ct(e) {
|
|
848
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
849
|
+
}
|
|
850
|
+
//#endregion
|
|
851
|
+
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
852
|
+
function lt(e) {
|
|
853
|
+
let t = Y(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = K(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = L(n) !== a || L(r) !== o;
|
|
854
|
+
return s && (n = a, r = o), {
|
|
855
|
+
width: n,
|
|
856
|
+
height: r,
|
|
857
|
+
$: s
|
|
858
|
+
};
|
|
859
|
+
}
|
|
860
|
+
function ut(e) {
|
|
861
|
+
return G(e) ? e : e.contextElement;
|
|
862
|
+
}
|
|
863
|
+
function Q(e) {
|
|
864
|
+
let t = ut(e);
|
|
865
|
+
if (!K(t)) return z(1);
|
|
866
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = lt(t), o = (a ? L(n.width) : n.width) / r, s = (a ? L(n.height) : n.height) / i;
|
|
867
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
868
|
+
x: o,
|
|
869
|
+
y: s
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
var dt = /*#__PURE__*/ z(0);
|
|
873
|
+
function ft(e) {
|
|
874
|
+
let t = U(e);
|
|
875
|
+
return !at() || !t.visualViewport ? dt : {
|
|
876
|
+
x: t.visualViewport.offsetLeft,
|
|
877
|
+
y: t.visualViewport.offsetTop
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
function pt(e, t, n) {
|
|
881
|
+
return t === void 0 && (t = !1), !!n && t && n === U(e);
|
|
882
|
+
}
|
|
883
|
+
function $(e, t, n, r) {
|
|
884
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
885
|
+
let i = e.getBoundingClientRect(), a = ut(e), o = z(1);
|
|
886
|
+
t && (r ? G(r) && (o = Q(r)) : o = Q(e));
|
|
887
|
+
let s = pt(a, n, r) ? ft(a) : z(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
888
|
+
if (a && r) {
|
|
889
|
+
let e = U(a), t = G(r) ? U(r) : r, n = e, i = ct(n);
|
|
890
|
+
for (; i && t !== n;) {
|
|
891
|
+
let e = Q(i), t = i.getBoundingClientRect(), r = Y(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
892
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = U(i), i = ct(n);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
return ze({
|
|
896
|
+
width: u,
|
|
897
|
+
height: d,
|
|
898
|
+
x: c,
|
|
899
|
+
y: l
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
function mt(e, t) {
|
|
903
|
+
let n = ot(e).scrollLeft;
|
|
904
|
+
return t ? t.left + n : $(W(e)).left + n;
|
|
905
|
+
}
|
|
906
|
+
function ht(e, t) {
|
|
907
|
+
let n = e.getBoundingClientRect();
|
|
908
|
+
return {
|
|
909
|
+
x: n.left + t.scrollLeft - mt(e, n),
|
|
910
|
+
y: n.top + t.scrollTop
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
function gt(e) {
|
|
914
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = W(r), s = t ? $e(t.floating) : !1;
|
|
915
|
+
if (r === o || s && a) return n;
|
|
916
|
+
let c = {
|
|
917
|
+
scrollLeft: 0,
|
|
918
|
+
scrollTop: 0
|
|
919
|
+
}, l = z(1), u = z(0), d = K(r);
|
|
920
|
+
if ((d || !a) && ((H(r) !== "body" || Ze(o)) && (c = ot(r)), d)) {
|
|
921
|
+
let e = $(r);
|
|
922
|
+
l = Q(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
923
|
+
}
|
|
924
|
+
let f = o && !d && !a ? ht(o, c) : z(0);
|
|
925
|
+
return {
|
|
926
|
+
width: n.width * l.x,
|
|
927
|
+
height: n.height * l.y,
|
|
928
|
+
x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
|
|
929
|
+
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
930
|
+
};
|
|
931
|
+
}
|
|
932
|
+
function _t(e) {
|
|
933
|
+
return e.getClientRects ? Array.from(e.getClientRects()) : [];
|
|
934
|
+
}
|
|
935
|
+
function vt(e) {
|
|
936
|
+
let t = ot(e), n = e.ownerDocument.body, r = I(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = I(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + mt(e), o = -t.scrollTop;
|
|
937
|
+
return Y(n).direction === "rtl" && (a += I(e.clientWidth, n.clientWidth) - r), {
|
|
938
|
+
width: r,
|
|
939
|
+
height: i,
|
|
940
|
+
x: a,
|
|
941
|
+
y: o
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
var yt = 25;
|
|
945
|
+
function bt(e, t, n) {
|
|
946
|
+
n === void 0 && (n = "viewport");
|
|
947
|
+
let r = n === "layoutViewport", i = U(e), a = W(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
|
|
948
|
+
if (o) {
|
|
949
|
+
let e = !at() || t === "fixed";
|
|
950
|
+
r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
|
|
951
|
+
}
|
|
952
|
+
if (mt(a) <= 0) {
|
|
953
|
+
let e = a.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(a.clientWidth - t.clientWidth - r), o = getComputedStyle(a).scrollbarGutter === "stable both-edges" ? i / 2 : i;
|
|
954
|
+
o <= yt && (s -= o);
|
|
955
|
+
}
|
|
956
|
+
return {
|
|
957
|
+
width: s,
|
|
958
|
+
height: c,
|
|
959
|
+
x: l,
|
|
960
|
+
y: u
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
function xt(e, t) {
|
|
964
|
+
let n = $(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = Q(e);
|
|
965
|
+
return {
|
|
966
|
+
width: e.clientWidth * a.x,
|
|
967
|
+
height: e.clientHeight * a.y,
|
|
968
|
+
x: i * a.x,
|
|
969
|
+
y: r * a.y
|
|
970
|
+
};
|
|
971
|
+
}
|
|
972
|
+
function St(e, t, n) {
|
|
973
|
+
let r;
|
|
974
|
+
if (t === "viewport" || t === "layoutViewport") r = bt(e, n, t);
|
|
975
|
+
else if (t === "document") r = vt(W(e));
|
|
976
|
+
else if (G(t)) r = xt(t, n);
|
|
977
|
+
else {
|
|
978
|
+
let n = ft(e);
|
|
979
|
+
r = {
|
|
980
|
+
x: t.x - n.x,
|
|
981
|
+
y: t.y - n.y,
|
|
982
|
+
width: t.width,
|
|
983
|
+
height: t.height
|
|
984
|
+
};
|
|
985
|
+
}
|
|
986
|
+
return ze(r);
|
|
987
|
+
}
|
|
988
|
+
function Ct(e, t) {
|
|
989
|
+
let n = t.get(e);
|
|
990
|
+
if (n) return n;
|
|
991
|
+
let r = Z(e, [], !1).filter((e) => G(e) && H(e) !== "body"), i = null, a = Y(e).position === "fixed", o = a ? X(e) : e;
|
|
992
|
+
for (; G(o) && !J(o);) {
|
|
993
|
+
let e = Y(o), t = rt(o), n = i ? i.position : a ? "fixed" : "";
|
|
994
|
+
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = X(o);
|
|
995
|
+
}
|
|
996
|
+
return t.set(e, r), r;
|
|
997
|
+
}
|
|
998
|
+
function wt(e) {
|
|
999
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? $e(t) ? [] : Ct(t, this._c) : [].concat(n), r], o = St(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
1000
|
+
for (let e = 1; e < a.length; e++) {
|
|
1001
|
+
let n = St(t, a[e], i);
|
|
1002
|
+
s = I(n.top, s), c = be(n.right, c), l = be(n.bottom, l), u = I(n.left, u);
|
|
1003
|
+
}
|
|
1004
|
+
return {
|
|
1005
|
+
width: c - u,
|
|
1006
|
+
height: l - s,
|
|
1007
|
+
x: u,
|
|
1008
|
+
y: s
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
function Tt(e) {
|
|
1012
|
+
let { width: t, height: n } = lt(e);
|
|
1013
|
+
return {
|
|
1014
|
+
width: t,
|
|
1015
|
+
height: n
|
|
1016
|
+
};
|
|
1017
|
+
}
|
|
1018
|
+
function Et(e, t, n) {
|
|
1019
|
+
let r = K(t), i = W(t), a = n === "fixed", o = $(e, !0, a, t), s = {
|
|
1020
|
+
scrollLeft: 0,
|
|
1021
|
+
scrollTop: 0
|
|
1022
|
+
}, c = z(0);
|
|
1023
|
+
if ((r || !a) && ((H(t) !== "body" || Ze(i)) && (s = ot(t)), r)) {
|
|
1024
|
+
let e = $(t, !0, a, t);
|
|
1025
|
+
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
1026
|
+
}
|
|
1027
|
+
!r && i && (c.x = mt(i));
|
|
1028
|
+
let l = i && !r && !a ? ht(i, s) : z(0);
|
|
1029
|
+
return {
|
|
1030
|
+
x: o.left + s.scrollLeft - c.x - l.x,
|
|
1031
|
+
y: o.top + s.scrollTop - c.y - l.y,
|
|
1032
|
+
width: o.width,
|
|
1033
|
+
height: o.height
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
function Dt(e) {
|
|
1037
|
+
return Y(e).position === "static";
|
|
1038
|
+
}
|
|
1039
|
+
function Ot(e, t) {
|
|
1040
|
+
if (!K(e) || Y(e).position === "fixed") return null;
|
|
1041
|
+
if (t) return t(e);
|
|
1042
|
+
let n = e.offsetParent;
|
|
1043
|
+
return W(e) === n && (n = n.ownerDocument.body), n;
|
|
1044
|
+
}
|
|
1045
|
+
function kt(e, t) {
|
|
1046
|
+
let n = U(e);
|
|
1047
|
+
if ($e(e)) return n;
|
|
1048
|
+
if (!K(e)) {
|
|
1049
|
+
let t = X(e);
|
|
1050
|
+
for (; t && !J(t);) {
|
|
1051
|
+
if (G(t) && !Dt(t)) return t;
|
|
1052
|
+
t = X(t);
|
|
1053
|
+
}
|
|
1054
|
+
return n;
|
|
1055
|
+
}
|
|
1056
|
+
let r = Ot(e, t);
|
|
1057
|
+
for (; r && Qe(r) && Dt(r);) r = Ot(r, t);
|
|
1058
|
+
return r && J(r) && Dt(r) && !rt(r) ? n : r || it(e) || n;
|
|
1059
|
+
}
|
|
1060
|
+
var At = async function(e) {
|
|
1061
|
+
let t = this.getOffsetParent || kt, n = this.getDimensions, r = await n(e.floating);
|
|
1062
|
+
return {
|
|
1063
|
+
reference: Et(e.reference, await t(e.floating), e.strategy),
|
|
1064
|
+
floating: {
|
|
1065
|
+
x: 0,
|
|
1066
|
+
y: 0,
|
|
1067
|
+
width: r.width,
|
|
1068
|
+
height: r.height
|
|
1069
|
+
}
|
|
1070
|
+
};
|
|
1071
|
+
};
|
|
1072
|
+
function jt(e) {
|
|
1073
|
+
return Y(e).direction === "rtl";
|
|
1074
|
+
}
|
|
1075
|
+
var Mt = {
|
|
1076
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: gt,
|
|
1077
|
+
getDocumentElement: W,
|
|
1078
|
+
getClippingRect: wt,
|
|
1079
|
+
getOffsetParent: kt,
|
|
1080
|
+
getElementRects: At,
|
|
1081
|
+
getClientRects: _t,
|
|
1082
|
+
getDimensions: Tt,
|
|
1083
|
+
getScale: Q,
|
|
1084
|
+
isElement: G,
|
|
1085
|
+
isRTL: jt
|
|
1086
|
+
};
|
|
1087
|
+
function Nt(e, t) {
|
|
1088
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1089
|
+
}
|
|
1090
|
+
function Pt(e, t, n) {
|
|
1091
|
+
let r = null, i, a = W(e);
|
|
1092
|
+
function o() {
|
|
1093
|
+
var e;
|
|
1094
|
+
clearTimeout(i), (e = r) == null || e.disconnect(), r = null;
|
|
1095
|
+
}
|
|
1096
|
+
function s(n, c) {
|
|
1097
|
+
n === void 0 && (n = !1), c === void 0 && (c = 1), o();
|
|
1098
|
+
let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
|
|
1099
|
+
if (n || t(), !f || !p) return;
|
|
1100
|
+
let m = R(d), h = R(a.clientWidth - (u + f)), g = R(a.clientHeight - (d + p)), _ = R(u), v = {
|
|
1101
|
+
rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
|
|
1102
|
+
threshold: I(0, be(1, c)) || 1
|
|
1103
|
+
}, y = !0;
|
|
1104
|
+
function b(t) {
|
|
1105
|
+
let n = t[0].intersectionRatio;
|
|
1106
|
+
if (!Nt(l, e.getBoundingClientRect())) return s();
|
|
1107
|
+
if (n !== c) {
|
|
1108
|
+
if (!y) return s();
|
|
1109
|
+
n ? s(!1, n) : i = setTimeout(() => {
|
|
1110
|
+
s(!1, 1e-7);
|
|
1111
|
+
}, 1e3);
|
|
1112
|
+
}
|
|
1113
|
+
y = !1;
|
|
1114
|
+
}
|
|
1115
|
+
try {
|
|
1116
|
+
r = new IntersectionObserver(b, {
|
|
1117
|
+
...v,
|
|
1118
|
+
root: a.ownerDocument
|
|
1119
|
+
});
|
|
1120
|
+
} catch {
|
|
1121
|
+
r = new IntersectionObserver(b, v);
|
|
1122
|
+
}
|
|
1123
|
+
r.observe(e);
|
|
1124
|
+
}
|
|
1125
|
+
let c = U(e), l = () => s(n);
|
|
1126
|
+
return c.addEventListener("resize", l), s(!0), () => {
|
|
1127
|
+
c.removeEventListener("resize", l), o();
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
function Ft(e, t, n, r) {
|
|
1131
|
+
r === void 0 && (r = {});
|
|
1132
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = ut(e), u = i || a ? [...l ? Z(l) : [], ...t ? Z(t) : []] : [];
|
|
1133
|
+
u.forEach((e) => {
|
|
1134
|
+
i && e.addEventListener("scroll", n), a && e.addEventListener("resize", n);
|
|
1135
|
+
});
|
|
1136
|
+
let d = l && s ? Pt(l, n, a) : null, f = -1, p = null;
|
|
1137
|
+
o && (p = new ResizeObserver((e) => {
|
|
1138
|
+
let [r] = e;
|
|
1139
|
+
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
1140
|
+
var e;
|
|
1141
|
+
(e = p) == null || e.observe(t);
|
|
1142
|
+
})), n();
|
|
1143
|
+
}), l && !c && p.observe(l), t && p.observe(t));
|
|
1144
|
+
let m, h = c ? $(e) : null;
|
|
1145
|
+
c && g();
|
|
1146
|
+
function g() {
|
|
1147
|
+
let t = $(e);
|
|
1148
|
+
h && !Nt(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
1149
|
+
}
|
|
1150
|
+
return n(), () => {
|
|
1151
|
+
var e;
|
|
1152
|
+
u.forEach((e) => {
|
|
1153
|
+
i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
|
|
1154
|
+
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
var It = qe, Lt = We, Rt = (e, t, n) => {
|
|
1158
|
+
let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
|
|
1159
|
+
...Mt,
|
|
1160
|
+
...i.platform,
|
|
1161
|
+
_c: r
|
|
1162
|
+
};
|
|
1163
|
+
return Ue(e, t, {
|
|
1164
|
+
...i,
|
|
1165
|
+
platform: a
|
|
1166
|
+
});
|
|
1167
|
+
};
|
|
1168
|
+
//#endregion
|
|
1169
|
+
//#region ../../node_modules/.pnpm/@tiptap+suggestion@3.31.3_@floating-ui+dom@1.8.0_@tiptap+core@3.31.3_@tiptap+pm@3.31.3__@tiptap+pm@3.31.3/node_modules/@tiptap/suggestion/dist/index.js
|
|
1170
|
+
function zt(e) {
|
|
1171
|
+
let { char: t, allowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, $position: o } = e, s = n && !r, c = k(t), l = RegExp(`\\s${c}$`), u = a ? "^" : "", d = r ? "" : c, f = RegExp(s ? `${u}${c}.*?(?=\\s${d}|$)` : `${u}(?:^)?${c}[^\\s${d}]*`, "gm"), p = o.nodeBefore?.isText && o.nodeBefore.text;
|
|
1172
|
+
if (!p) return null;
|
|
1173
|
+
let m = o.pos - p.length, h = Array.from(p.matchAll(f)).pop();
|
|
1174
|
+
if (!h || h.input === void 0 || h.index === void 0) return null;
|
|
1175
|
+
let g = h.input.slice(Math.max(0, h.index - 1), h.index), _ = RegExp(`^[${i?.join("")}\0]?$`).test(g);
|
|
1176
|
+
if (i !== null && !_) return null;
|
|
1177
|
+
let v = m + h.index, y = v + h[0].length;
|
|
1178
|
+
return s && l.test(p.slice(y - 1, y + 1)) && (h[0] += " ", y += 1), v < o.pos && y >= o.pos ? {
|
|
1179
|
+
range: {
|
|
1180
|
+
from: v,
|
|
1181
|
+
to: y
|
|
1182
|
+
},
|
|
1183
|
+
query: h[0].slice(t.length),
|
|
1184
|
+
text: h[0]
|
|
1185
|
+
} : null;
|
|
1186
|
+
}
|
|
1187
|
+
function Bt(e) {
|
|
1188
|
+
return e.docChanged ? e.steps.some((e) => {
|
|
1189
|
+
let t = e.slice;
|
|
1190
|
+
if (!t?.content) return !1;
|
|
1191
|
+
let n = t.content.textBetween(0, t.content.size, "\n");
|
|
1192
|
+
return /\s/.test(n);
|
|
1193
|
+
}) : !1;
|
|
1194
|
+
}
|
|
1195
|
+
function Vt(e) {
|
|
1196
|
+
return () => {
|
|
1197
|
+
let t = e.state.selection.$anchor.pos, { top: n, right: r, bottom: i, left: a } = e.view.coordsAtPos(t);
|
|
1198
|
+
try {
|
|
1199
|
+
return new DOMRect(a, n, r - a, i - n);
|
|
1200
|
+
} catch {
|
|
1201
|
+
return null;
|
|
1202
|
+
}
|
|
1203
|
+
};
|
|
1204
|
+
}
|
|
1205
|
+
function Ht(e, t, n, r) {
|
|
1206
|
+
return n ? () => {
|
|
1207
|
+
let n = r.getState(e.state)?.decorationId;
|
|
1208
|
+
return t.dom.querySelector(`[data-decoration-id="${n}"]`)?.getBoundingClientRect() || null;
|
|
1209
|
+
} : Vt(e);
|
|
1210
|
+
}
|
|
1211
|
+
function Ut({ match: e, dismissedRange: t, state: n, transaction: r, editor: i, shouldResetDismissed: a, effectiveAllowSpaces: o }) {
|
|
1212
|
+
return a?.({
|
|
1213
|
+
editor: i,
|
|
1214
|
+
state: n,
|
|
1215
|
+
range: t,
|
|
1216
|
+
match: e,
|
|
1217
|
+
transaction: r,
|
|
1218
|
+
allowSpaces: o
|
|
1219
|
+
}) ? !1 : o ? e.range.from === t.from : e.range.from === t.from && !Bt(r);
|
|
1220
|
+
}
|
|
1221
|
+
function Wt({ view: e, pluginKeyRef: t }) {
|
|
1222
|
+
let n = e.state.tr.setMeta(t, { exit: !0 });
|
|
1223
|
+
e.dispatch(n);
|
|
1224
|
+
}
|
|
1225
|
+
function Gt({ pluginKey: e, decorationTag: t, decorationClass: n, decorationContent: r, decorationEmptyClass: i, renderer: a, dispatchExit: o }) {
|
|
1226
|
+
return {
|
|
1227
|
+
handleKeyDown(t, n) {
|
|
1228
|
+
var r;
|
|
1229
|
+
let i = e.getState(t.state);
|
|
1230
|
+
if (!i.active) return !1;
|
|
1231
|
+
if (n.key === "Escape" || n.key === "Esc") {
|
|
1232
|
+
var s;
|
|
1233
|
+
return a == null || (s = a.onKeyDown) == null || s.call(a, {
|
|
1234
|
+
view: t,
|
|
1235
|
+
event: n,
|
|
1236
|
+
range: i.range
|
|
1237
|
+
}), o(t), !0;
|
|
1238
|
+
}
|
|
1239
|
+
return (a == null || (r = a.onKeyDown) == null ? void 0 : r.call(a, {
|
|
1240
|
+
view: t,
|
|
1241
|
+
event: n,
|
|
1242
|
+
range: i.range
|
|
1243
|
+
})) || !1;
|
|
1244
|
+
},
|
|
1245
|
+
decorations(a) {
|
|
1246
|
+
let { active: o, range: s, decorationId: c, query: l } = e.getState(a);
|
|
1247
|
+
if (!o) return null;
|
|
1248
|
+
let u = !l?.length, d = [n];
|
|
1249
|
+
return u && d.push(i), A.create(a.doc, [j.inline(s.from, s.to, {
|
|
1250
|
+
nodeName: t,
|
|
1251
|
+
class: d.join(" "),
|
|
1252
|
+
"data-decoration-id": c || void 0,
|
|
1253
|
+
"data-decoration-content": r
|
|
1254
|
+
})]);
|
|
1255
|
+
}
|
|
1256
|
+
};
|
|
1257
|
+
}
|
|
1258
|
+
function Kt({ editor: e, char: t, effectiveAllowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, findSuggestionMatch: o, allow: s, shouldShow: c, shouldKeepDismissed: l, pluginKey: u }) {
|
|
1259
|
+
return {
|
|
1260
|
+
init() {
|
|
1261
|
+
return {
|
|
1262
|
+
active: !1,
|
|
1263
|
+
range: {
|
|
1264
|
+
from: 0,
|
|
1265
|
+
to: 0
|
|
1266
|
+
},
|
|
1267
|
+
query: null,
|
|
1268
|
+
text: null,
|
|
1269
|
+
composing: !1,
|
|
1270
|
+
dismissedRange: null
|
|
1271
|
+
};
|
|
1272
|
+
},
|
|
1273
|
+
apply(d, f, p, m) {
|
|
1274
|
+
let { isEditable: h } = e, { composing: g } = e.view, { selection: _ } = d, { empty: v, from: y } = _, b = { ...f }, x = d.getMeta(u);
|
|
1275
|
+
if (x && x.exit) return b.active = !1, b.decorationId = null, b.range = {
|
|
1276
|
+
from: 0,
|
|
1277
|
+
to: 0
|
|
1278
|
+
}, b.query = null, b.text = null, b.dismissedRange = f.active ? { ...f.range } : f.dismissedRange, b;
|
|
1279
|
+
if (b.composing = g, d.docChanged && b.dismissedRange !== null && (b.dismissedRange = {
|
|
1280
|
+
from: d.mapping.map(b.dismissedRange.from),
|
|
1281
|
+
to: d.mapping.map(b.dismissedRange.to)
|
|
1282
|
+
}), h && (v || e.view.composing)) {
|
|
1283
|
+
(y < f.range.from || y > f.range.to) && !g && !f.composing && (b.active = !1);
|
|
1284
|
+
let u = o({
|
|
1285
|
+
char: t,
|
|
1286
|
+
allowSpaces: n,
|
|
1287
|
+
allowToIncludeChar: r,
|
|
1288
|
+
allowedPrefixes: i,
|
|
1289
|
+
startOfLine: a,
|
|
1290
|
+
$position: _.$from
|
|
1291
|
+
}), p = `id_${Math.floor(Math.random() * 4294967295)}`;
|
|
1292
|
+
u && s({
|
|
1293
|
+
editor: e,
|
|
1294
|
+
state: m,
|
|
1295
|
+
range: u.range,
|
|
1296
|
+
isActive: f.active
|
|
1297
|
+
}) && (!c || c({
|
|
1298
|
+
editor: e,
|
|
1299
|
+
range: u.range,
|
|
1300
|
+
query: u.query,
|
|
1301
|
+
text: u.text,
|
|
1302
|
+
transaction: d
|
|
1303
|
+
})) ? (b.dismissedRange !== null && !l({
|
|
1304
|
+
match: u,
|
|
1305
|
+
dismissedRange: b.dismissedRange,
|
|
1306
|
+
state: m,
|
|
1307
|
+
transaction: d
|
|
1308
|
+
}) && (b.dismissedRange = null), b.dismissedRange === null ? (b.active = !0, b.decorationId = f.decorationId || p, b.range = u.range, b.query = u.query, b.text = u.text) : b.active = !1) : (u || (b.dismissedRange = null), b.active = !1);
|
|
1309
|
+
} else b.active = !1;
|
|
1310
|
+
return b.active || (b.decorationId = null, b.range = {
|
|
1311
|
+
from: 0,
|
|
1312
|
+
to: 0
|
|
1313
|
+
}, b.query = null, b.text = null), b;
|
|
1314
|
+
}
|
|
1315
|
+
};
|
|
1316
|
+
}
|
|
1317
|
+
function qt({ editor: e, items: t }) {
|
|
1318
|
+
let n = null, r = null, i = null, a = () => {
|
|
1319
|
+
r !== null && (clearTimeout(r), r = null), i?.(), i = null;
|
|
1320
|
+
}, o = (e) => new Promise((t) => {
|
|
1321
|
+
i = t, r = setTimeout(() => {
|
|
1322
|
+
r = null;
|
|
1323
|
+
let e = i;
|
|
1324
|
+
i = null, e?.();
|
|
1325
|
+
}, e);
|
|
1326
|
+
}), s = () => {
|
|
1327
|
+
n?.abort(), a(), n = null;
|
|
1328
|
+
};
|
|
1329
|
+
return {
|
|
1330
|
+
abort: s,
|
|
1331
|
+
fetch: async (r, i) => {
|
|
1332
|
+
s(), n = new AbortController();
|
|
1333
|
+
let a = n;
|
|
1334
|
+
if (i > 0 && await o(i), n !== a || a.signal.aborted) return { status: "aborted" };
|
|
1335
|
+
try {
|
|
1336
|
+
let i = await t({
|
|
1337
|
+
editor: e,
|
|
1338
|
+
query: r,
|
|
1339
|
+
signal: a.signal
|
|
1340
|
+
});
|
|
1341
|
+
return n !== a || a.signal.aborted ? { status: "aborted" } : {
|
|
1342
|
+
status: "resolved",
|
|
1343
|
+
items: i
|
|
1344
|
+
};
|
|
1345
|
+
} catch {
|
|
1346
|
+
return n !== a || a.signal.aborted ? { status: "aborted" } : { status: "error" };
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
function Jt({ placement: e, offset: t, flip: n, floatingUi: r }) {
|
|
1352
|
+
var i;
|
|
1353
|
+
let a = [It({
|
|
1354
|
+
mainAxis: t.mainAxis ?? 4,
|
|
1355
|
+
crossAxis: t.crossAxis ?? 0
|
|
1356
|
+
})];
|
|
1357
|
+
return n && a.push(Lt()), r != null && (i = r.middleware) != null && i.length && a.push(...r.middleware), {
|
|
1358
|
+
placement: e,
|
|
1359
|
+
strategy: r?.strategy ?? "absolute",
|
|
1360
|
+
middleware: a
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
function Yt(e) {
|
|
1364
|
+
if (e instanceof HTMLElement) return e;
|
|
1365
|
+
if (typeof e == "string") try {
|
|
1366
|
+
let t = document.querySelector(e);
|
|
1367
|
+
if (t) return t;
|
|
1368
|
+
} catch {
|
|
1369
|
+
return document.body;
|
|
1370
|
+
}
|
|
1371
|
+
return document.body;
|
|
1372
|
+
}
|
|
1373
|
+
function Xt({ getReferenceRect: e, contextElement: t, config: n, container: r, dismissOnOutsideClick: i, dismiss: a }) {
|
|
1374
|
+
return (o, s = {}) => {
|
|
1375
|
+
let c = {
|
|
1376
|
+
getBoundingClientRect: () => e() ?? new DOMRect(),
|
|
1377
|
+
contextElement: t
|
|
1378
|
+
}, l = !1, u = !o.isConnected;
|
|
1379
|
+
u && Yt(r).appendChild(o), s.onPosition || (o.style.visibility = "hidden", o.style.width = "max-content");
|
|
1380
|
+
let d = Ft(c, o, () => {
|
|
1381
|
+
Rt(c, o, {
|
|
1382
|
+
placement: n.placement,
|
|
1383
|
+
strategy: n.strategy,
|
|
1384
|
+
middleware: n.middleware
|
|
1385
|
+
}).then(({ x: e, y: t, placement: n, strategy: r }) => {
|
|
1386
|
+
if (s.onPosition) {
|
|
1387
|
+
s.onPosition({
|
|
1388
|
+
x: e,
|
|
1389
|
+
y: t,
|
|
1390
|
+
placement: n,
|
|
1391
|
+
strategy: r
|
|
1392
|
+
});
|
|
1393
|
+
return;
|
|
1394
|
+
}
|
|
1395
|
+
Object.assign(o.style, {
|
|
1396
|
+
position: r,
|
|
1397
|
+
left: `${e}px`,
|
|
1398
|
+
top: `${t}px`
|
|
1399
|
+
}), l || (l = !0, o.style.visibility = "");
|
|
1400
|
+
});
|
|
1401
|
+
}, s.autoUpdate), f;
|
|
1402
|
+
return i && (f = (e) => {
|
|
1403
|
+
let n = e.target;
|
|
1404
|
+
!(n instanceof Node) || o.contains(n) || t.contains(n) || a();
|
|
1405
|
+
}, document.addEventListener("pointerdown", f, !0)), () => {
|
|
1406
|
+
d(), f && document.removeEventListener("pointerdown", f, !0), u && o.remove();
|
|
1407
|
+
};
|
|
1408
|
+
};
|
|
1409
|
+
}
|
|
1410
|
+
function Zt({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i, debounce: a, initialItems: o, placement: s, offset: c, container: l, flip: u, floatingUi: d, dismissOnOutsideClick: f, command: p, clientRectFor: m, dispatchExit: h }) {
|
|
1411
|
+
let g, _ = qt({
|
|
1412
|
+
editor: e,
|
|
1413
|
+
items: n
|
|
1414
|
+
}), v = Jt({
|
|
1415
|
+
placement: s,
|
|
1416
|
+
offset: c,
|
|
1417
|
+
flip: u,
|
|
1418
|
+
floatingUi: d
|
|
1419
|
+
});
|
|
1420
|
+
function y(e, t) {
|
|
1421
|
+
switch (e) {
|
|
1422
|
+
case "started":
|
|
1423
|
+
var n;
|
|
1424
|
+
r == null || (n = r.onStart) == null || n.call(r, t);
|
|
1425
|
+
break;
|
|
1426
|
+
case "updated":
|
|
1427
|
+
var i;
|
|
1428
|
+
r == null || (i = r.onUpdate) == null || i.call(r, t);
|
|
1429
|
+
break;
|
|
1430
|
+
case "stopped":
|
|
1431
|
+
var a;
|
|
1432
|
+
r == null || (a = r.onExit) == null || a.call(r, t);
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
return {
|
|
1436
|
+
update: async (n, d) => {
|
|
1437
|
+
let b = t.getState(d), x = t.getState(n.state);
|
|
1438
|
+
if (!b || !x) return;
|
|
1439
|
+
let S = null, C = b.query !== x.query, w = b.text !== x.text, T = b.range.from !== x.range.from || b.range.to !== x.range.to, E = C || w || T;
|
|
1440
|
+
if (!b.active && x.active) S = "started";
|
|
1441
|
+
else if (b.active && !x.active) S = "stopped";
|
|
1442
|
+
else if (x.active && E) S = "updated";
|
|
1443
|
+
else return;
|
|
1444
|
+
let D = S === "stopped" ? b : x, O = n.dom.querySelector(`[data-decoration-id="${D.decorationId}"]`), k = m(n, O), A = i === 0 || (D.query ? D.query.length >= i : !1), j = (S === "started" || S === "updated") && A;
|
|
1445
|
+
if (g = {
|
|
1446
|
+
editor: e,
|
|
1447
|
+
range: D.range,
|
|
1448
|
+
query: D.query || "",
|
|
1449
|
+
text: D.text || "",
|
|
1450
|
+
items: o ?? [],
|
|
1451
|
+
command: (t) => p({
|
|
1452
|
+
editor: e,
|
|
1453
|
+
range: D.range,
|
|
1454
|
+
props: t
|
|
1455
|
+
}),
|
|
1456
|
+
decorationNode: O,
|
|
1457
|
+
clientRect: k,
|
|
1458
|
+
loading: j,
|
|
1459
|
+
placement: s,
|
|
1460
|
+
offset: {
|
|
1461
|
+
mainAxis: c.mainAxis ?? 4,
|
|
1462
|
+
crossAxis: c.crossAxis ?? 0
|
|
1463
|
+
},
|
|
1464
|
+
container: l,
|
|
1465
|
+
flip: u,
|
|
1466
|
+
floatingUi: v,
|
|
1467
|
+
mount: Xt({
|
|
1468
|
+
getReferenceRect: k,
|
|
1469
|
+
contextElement: n.dom,
|
|
1470
|
+
config: v,
|
|
1471
|
+
container: l,
|
|
1472
|
+
dismissOnOutsideClick: f,
|
|
1473
|
+
dismiss: () => h(e.view)
|
|
1474
|
+
})
|
|
1475
|
+
}, S === "started") {
|
|
1476
|
+
var M;
|
|
1477
|
+
r == null || (M = r.onBeforeStart) == null || M.call(r, g);
|
|
1478
|
+
}
|
|
1479
|
+
if (S === "updated") {
|
|
1480
|
+
var N;
|
|
1481
|
+
r == null || (N = r.onBeforeUpdate) == null || N.call(r, g);
|
|
1482
|
+
}
|
|
1483
|
+
if (S === "started" && y(S, g), S === "started" || S === "updated") {
|
|
1484
|
+
if (!j) _.abort(), g = {
|
|
1485
|
+
...g,
|
|
1486
|
+
items: o ?? [],
|
|
1487
|
+
loading: !1
|
|
1488
|
+
};
|
|
1489
|
+
else {
|
|
1490
|
+
g = {
|
|
1491
|
+
...g,
|
|
1492
|
+
items: o ?? [],
|
|
1493
|
+
loading: !0
|
|
1494
|
+
}, S = "updated", y(S, g);
|
|
1495
|
+
let e = await _.fetch(D.query || "", a);
|
|
1496
|
+
if (e.status === "aborted") return;
|
|
1497
|
+
if (!t.getState(n.state)?.active) {
|
|
1498
|
+
_.abort();
|
|
1499
|
+
return;
|
|
1500
|
+
}
|
|
1501
|
+
g = e.status === "resolved" ? {
|
|
1502
|
+
...g,
|
|
1503
|
+
items: e.items,
|
|
1504
|
+
loading: !1
|
|
1505
|
+
} : {
|
|
1506
|
+
...g,
|
|
1507
|
+
loading: !1
|
|
1508
|
+
};
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
if (S === "stopped") {
|
|
1512
|
+
_.abort(), y(S, g), g = void 0;
|
|
1513
|
+
return;
|
|
1514
|
+
}
|
|
1515
|
+
S === "updated" && y(S, g);
|
|
1516
|
+
},
|
|
1517
|
+
destroy: () => {
|
|
1518
|
+
var e;
|
|
1519
|
+
_.abort(), g && (r == null || (e = r.onExit) == null || e.call(r, g));
|
|
1520
|
+
}
|
|
1521
|
+
};
|
|
1522
|
+
}
|
|
1523
|
+
var Qt = new O("suggestion");
|
|
1524
|
+
function $t({ pluginKey: e = Qt, editor: t, char: n = "@", allowSpaces: r = !1, allowToIncludeChar: i = !1, allowedPrefixes: a = [" "], startOfLine: o = !1, decorationTag: s = "span", decorationClass: c = "suggestion", decorationContent: l = "", decorationEmptyClass: u = "is-empty", command: d = () => null, items: f = () => [], minQueryLength: p = 0, debounce: m = 0, initialItems: h, placement: g = "bottom-start", offset: _ = {}, container: v, flip: y = !0, floatingUi: b, dismissOnOutsideClick: x = !0, render: S = () => ({}), allow: C = () => !0, findSuggestionMatch: w = zt, shouldShow: T, shouldResetDismissed: E }) {
|
|
1525
|
+
let D = S?.(), O = r && !i, k = (n, r) => Ht(t, n, r, e);
|
|
1526
|
+
function A(e) {
|
|
1527
|
+
return Ut({
|
|
1528
|
+
...e,
|
|
1529
|
+
editor: t,
|
|
1530
|
+
shouldResetDismissed: E,
|
|
1531
|
+
effectiveAllowSpaces: O
|
|
1532
|
+
});
|
|
1533
|
+
}
|
|
1534
|
+
let j = (t) => Wt({
|
|
1535
|
+
view: t,
|
|
1536
|
+
pluginKeyRef: e
|
|
1537
|
+
});
|
|
1538
|
+
return new M({
|
|
1539
|
+
key: e,
|
|
1540
|
+
view: () => Zt({
|
|
1541
|
+
editor: t,
|
|
1542
|
+
pluginKey: e,
|
|
1543
|
+
items: f,
|
|
1544
|
+
renderer: D,
|
|
1545
|
+
minQueryLength: p,
|
|
1546
|
+
debounce: m,
|
|
1547
|
+
initialItems: h,
|
|
1548
|
+
placement: g,
|
|
1549
|
+
offset: _,
|
|
1550
|
+
container: v,
|
|
1551
|
+
flip: y,
|
|
1552
|
+
floatingUi: b,
|
|
1553
|
+
dismissOnOutsideClick: x,
|
|
1554
|
+
command: d,
|
|
1555
|
+
clientRectFor: k,
|
|
1556
|
+
dispatchExit: j
|
|
1557
|
+
}),
|
|
1558
|
+
state: Kt({
|
|
1559
|
+
editor: t,
|
|
1560
|
+
char: n,
|
|
1561
|
+
effectiveAllowSpaces: O,
|
|
1562
|
+
allowToIncludeChar: i,
|
|
1563
|
+
allowedPrefixes: a,
|
|
1564
|
+
startOfLine: o,
|
|
1565
|
+
findSuggestionMatch: w,
|
|
1566
|
+
allow: C,
|
|
1567
|
+
shouldShow: T,
|
|
1568
|
+
shouldKeepDismissed: A,
|
|
1569
|
+
pluginKey: e
|
|
1570
|
+
}),
|
|
1571
|
+
props: Gt({
|
|
1572
|
+
pluginKey: e,
|
|
1573
|
+
decorationTag: s,
|
|
1574
|
+
decorationClass: c,
|
|
1575
|
+
decorationContent: l,
|
|
1576
|
+
decorationEmptyClass: u,
|
|
1577
|
+
renderer: D,
|
|
1578
|
+
dispatchExit: j
|
|
1579
|
+
})
|
|
1580
|
+
});
|
|
1581
|
+
}
|
|
1582
|
+
var en = $t;
|
|
1583
|
+
//#endregion
|
|
1584
|
+
//#region src/extensions/MergeTagSuggestion.ts
|
|
1585
|
+
function tn(e, t) {
|
|
1586
|
+
return () => {
|
|
1587
|
+
let n = w(e, t);
|
|
1588
|
+
return {
|
|
1589
|
+
onStart: (e) => {
|
|
1590
|
+
let t = e.editor.view?.dom;
|
|
1591
|
+
n.open({
|
|
1592
|
+
items: e.items,
|
|
1593
|
+
getRect: e.clientRect ?? null,
|
|
1594
|
+
anchorEl: t ?? null,
|
|
1595
|
+
onCommand: (t) => e.command(t)
|
|
1596
|
+
});
|
|
1597
|
+
},
|
|
1598
|
+
onUpdate: (e) => {
|
|
1599
|
+
n.update({
|
|
1600
|
+
items: e.items,
|
|
1601
|
+
getRect: e.clientRect ?? null,
|
|
1602
|
+
onCommand: (t) => e.command(t)
|
|
1603
|
+
});
|
|
1604
|
+
},
|
|
1605
|
+
onKeyDown: (e) => e.event.key === "Escape" || n.handleKeyDown(e.event),
|
|
1606
|
+
onExit: () => n.close()
|
|
1607
|
+
};
|
|
1608
|
+
};
|
|
1609
|
+
}
|
|
1610
|
+
var nn = F.create({
|
|
1611
|
+
name: "mergeTagSuggestion",
|
|
1612
|
+
addOptions() {
|
|
1613
|
+
return {
|
|
1614
|
+
mergeTags: () => [],
|
|
1615
|
+
char: "{{",
|
|
1616
|
+
emptyText: "No matching merge tags",
|
|
1617
|
+
popoverRoot: null
|
|
1618
|
+
};
|
|
1619
|
+
},
|
|
1620
|
+
addProseMirrorPlugins() {
|
|
1621
|
+
let e = this.options.mergeTags(), t = this.options.emptyText, n = this.options.popoverRoot, r = {
|
|
1622
|
+
char: this.options.char,
|
|
1623
|
+
allowSpaces: !1,
|
|
1624
|
+
startOfLine: !1,
|
|
1625
|
+
allowedPrefixes: null,
|
|
1626
|
+
items: ({ query: t }) => T(e, t),
|
|
1627
|
+
command: ({ editor: e, range: t, props: n }) => {
|
|
1628
|
+
e.chain().focus().insertContentAt(t, {
|
|
1629
|
+
type: "mergeTagNode",
|
|
1630
|
+
attrs: {
|
|
1631
|
+
label: n.label,
|
|
1632
|
+
value: n.value
|
|
1633
|
+
}
|
|
1634
|
+
}).run();
|
|
1635
|
+
},
|
|
1636
|
+
render: tn(t, n)
|
|
1637
|
+
};
|
|
1638
|
+
return [en({
|
|
1639
|
+
editor: this.editor,
|
|
1640
|
+
...r
|
|
1641
|
+
})];
|
|
1642
|
+
}
|
|
1643
|
+
});
|
|
1644
|
+
//#endregion
|
|
1645
|
+
export { ie as FontSize, ae as LetterSpacing, oe as LineBoundaryKeys, se as LineHeight, me as LogicMergeTagNode, ye as MergeTagNode, nn as MergeTagSuggestion, T as filterMergeTags, E as handleSuggestionKeyDown };
|