collabmd 0.1.33 → 0.1.35
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/client/assets/{CodeMirrorEditor-UCMRAMCV-Bg0dawOb.js → CodeMirrorEditor-UCMRAMCV-CvLFeHXu.js} +1 -1
- package/dist/client/assets/_baseFor-Bfo4esZ5.js +1 -0
- package/dist/client/assets/arc-tRoMuWFi.js +1 -0
- package/dist/client/assets/architecture-YZFGNWBL-CtU43_5T.js +1 -0
- package/dist/client/assets/{architectureDiagram-2XIMDMQ5-kYbOThe4.js → architectureDiagram-Q4EWVU46-CVdcOotN.js} +4 -4
- package/dist/client/assets/blockDiagram-DXYQGD6D-B_gNUKQ4.js +132 -0
- package/dist/client/assets/c4Diagram-AHTNJAMY-BSDwfduG.js +10 -0
- package/dist/client/assets/channel-BDb1g_mJ.js +1 -0
- package/dist/client/assets/chunk-2KRD3SAO-C6u8y11R.js +1 -0
- package/dist/client/assets/chunk-336JU56O-Ch9X5KoM.js +2 -0
- package/dist/client/assets/{chunk-HHEYEP7N-DlevL8bq.js → chunk-426QAEUC-CwJ7loGf.js} +1 -1
- package/dist/client/assets/chunk-4TB4RGXK-BEsauZP5.js +206 -0
- package/dist/client/assets/chunk-5FUZZQ4R-6x8SlhH9.js +62 -0
- package/dist/client/assets/chunk-5PVQY5BW-R5SE6dhE.js +2 -0
- package/dist/client/assets/chunk-67CJDMHE-CjXw5hFa.js +1 -0
- package/dist/client/assets/chunk-7N4EOEYR-DNHyuswJ.js +1 -0
- package/dist/client/assets/chunk-AA7GKIK3-DayE4IF_.js +1 -0
- package/dist/client/assets/chunk-BSJP7CBP-CexlYBxB.js +1 -0
- package/dist/client/assets/chunk-CIAEETIT-CkDJ4DYI.js +1 -0
- package/dist/client/assets/{chunk-KX2RTZJC-BTiOJb7N.js → chunk-EDXVE4YY-BVR_nF3y.js} +1 -1
- package/dist/client/assets/chunk-ENJZ2VHE-CFVWytAB.js +10 -0
- package/dist/client/assets/chunk-FOC6F5B3-DzCiCLGs.js +1 -0
- package/dist/client/assets/chunk-ICPOFSXX-B9LPHgU7.js +122 -0
- package/dist/client/assets/chunk-K5T4RW27-kmGSebVE.js +94 -0
- package/dist/client/assets/chunk-KGLVRYIC-DVjPRsaR.js +1 -0
- package/dist/client/assets/chunk-LIHQZDEY-DKFj13sC.js +1 -0
- package/dist/client/assets/chunk-NU2UP6EN-UVL-wkIc.js +35 -0
- package/dist/client/assets/chunk-ORNJ4GCN-D0uTAC-5.js +1 -0
- package/dist/client/assets/{chunk-NQ4KR5QH-CMJKI6Oj.js → chunk-OYMX7WX6-nWiNHNyD.js} +25 -14
- package/dist/client/assets/{chunk-PU5JKC2W-D_6N6t8f.js → chunk-U2HBQHQK-Bue4Ufzn.js} +6 -6
- package/dist/client/assets/{chunk-PQ6SQG4A-D1AbThjy.js → chunk-X2U36JSP-CRE6lp7n.js} +1 -1
- package/dist/client/assets/{chunk-XPW4576I-DJr4_4Yy.js → chunk-XPW4576I-BL5M-tF8.js} +1 -1
- package/dist/client/assets/{chunk-JSJVCQXG-DPQ9cPJt.js → chunk-YZCP3GAM-D7Z5wUWA.js} +1 -1
- package/dist/client/assets/chunk-ZZ45TVLE-CBbl1Qec.js +1 -0
- package/dist/client/assets/classDiagram-6PBFFD2Q-MIbgV5UL.js +1 -0
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-Bb70vg2O.js +1 -0
- package/dist/client/assets/clike-BFTLRaGS.js +1 -0
- package/dist/client/assets/clone-D6JWrlxJ.js +1 -0
- package/dist/client/assets/{coffeescript-B_7eyHAa.js → coffeescript-B7GZajzV.js} +1 -1
- package/dist/client/assets/{cose-bilkent-S5V4N54A-DASO2hrk.js → cose-bilkent-S5V4N54A-xxgR5OJ-.js} +1 -1
- package/dist/client/assets/{cypher-DE6I2lIA.js → cypher-DEGl2llJ.js} +1 -1
- package/dist/client/assets/cytoscape.esm-B3PRdePO.js +321 -0
- package/dist/client/assets/{d-BNkKjn0o.js → d-BspB0dox.js} +1 -1
- package/dist/client/assets/dagre-KV5264BT-C2K9mFg1.js +4 -0
- package/dist/client/assets/dagre-VaFYRFbD.js +1 -0
- package/dist/client/assets/diagram-5BDNPKRD-DE0M0jaM.js +10 -0
- package/dist/client/assets/diagram-G4DWMVQ6-BfaRuSTT.js +24 -0
- package/dist/client/assets/diagram-MMDJMWI5-91Bly_hN.js +43 -0
- package/dist/client/assets/diagram-TYMM5635-fBkLwZGN.js +24 -0
- package/dist/client/assets/{dist-BzpfHRaE.js → dist-74GtnE06.js} +1 -1
- package/dist/client/assets/dist-B3lARV_e.js +1 -0
- package/dist/client/assets/{dist-O1z0Ayg0.js → dist-BCvzlTeb.js} +1 -1
- package/dist/client/assets/{dist-DsL7sqZR.js → dist-BMlUxhOz.js} +1 -1
- package/dist/client/assets/dist-BSED50tI.js +13 -0
- package/dist/client/assets/{dist-B-02vKOA.js → dist-Bkn7JaJv.js} +1 -1
- package/dist/client/assets/dist-Bq8Z0WUT.js +1 -0
- package/dist/client/assets/{dist-E_jPb93e.js → dist-Bzb9nPam.js} +1 -1
- package/dist/client/assets/{dist-CL-jjdvG.js → dist-C0e9kfNh.js} +1 -1
- package/dist/client/assets/dist-C8wdW7W4.js +1 -0
- package/dist/client/assets/dist-CDUQ5ELn.js +1 -0
- package/dist/client/assets/dist-CHSg_nUM.js +1 -0
- package/dist/client/assets/dist-CSAH9iuE.js +6 -0
- package/dist/client/assets/{dist-CxfohGIV.js → dist-CSNMpi-w.js} +1 -1
- package/dist/client/assets/dist-CZPTvk_g2.js +1 -0
- package/dist/client/assets/{dist-k47-Io7D.js → dist-Co8HE14w.js} +1 -1
- package/dist/client/assets/{dist-Bc2ND6i3.js → dist-CqU98NzX.js} +1 -1
- package/dist/client/assets/{dist-BzbYwa8m.js → dist-D0dQAc9b.js} +1 -1
- package/dist/client/assets/{dist-Dyt7n5Ui.js → dist-D1-dK0Dk.js} +1 -1
- package/dist/client/assets/{dist-B4uQVR_X.js → dist-DAKGEzm0.js} +1 -1
- package/dist/client/assets/dist-DBzteOlY.js +1 -0
- package/dist/client/assets/{dist-CjII8VDS.js → dist-DSRCADL9.js} +1 -1
- package/dist/client/assets/{dist-lDhnP-K1.js → dist-DdR2aYqj.js} +1 -1
- package/dist/client/assets/{dist-DUvaQ-Bj.js → dist-DidT3Jay.js} +1 -1
- package/dist/client/assets/dist-Doo91MTa.js +1 -0
- package/dist/client/assets/{dist-BLAlZer_.js → dist-Dwy75xI6.js} +1 -1
- package/dist/client/assets/{dist-3uAMa5w5.js → dist-FC9LftvP.js} +1 -1
- package/dist/client/assets/{dist-CGV1S_as.js → dist-PPAeaw4t.js} +1 -1
- package/dist/client/assets/{dist-BtnXjRx0.js → dist-VPEWg0Ob.js} +1 -1
- package/dist/client/assets/{dist-CXpKYW9s.js → dist-cQSK4Xor.js} +1 -1
- package/dist/client/assets/{dist-rMhng5DK.js → dist-r5I9Jgww.js} +1 -1
- package/dist/client/assets/drawio-editor-CWLEpwps.js +9 -0
- package/dist/client/assets/{drawioEditor-D6clB5OH.js → drawioEditor-5rJhxjA4.js} +2 -2
- package/dist/client/assets/{ecl-M7Iek4lq.js → ecl-D9rhJ9-u.js} +1 -1
- package/dist/client/assets/{editor-session-Dzy_85Wp.js → editor-session-CLOuvy37.js} +3 -3
- package/dist/client/assets/{erDiagram-INFDFZHY-DlIf-fb7.js → erDiagram-SMLLAGMA-DUQcqEQ1.js} +33 -18
- package/dist/client/assets/excalidraw-editor-ukEKPqGJ.js +9 -0
- package/dist/client/assets/{excalidraw-mermaid-stub-Bwe-bKcT.js → excalidraw-mermaid-stub-Df0Q2qkW.js} +1 -1
- package/dist/client/assets/excalidraw-scene-CDK3oDnm.js +176 -0
- package/dist/client/assets/excalidrawEditor-BJ8QLmWc.js +2 -0
- package/dist/client/assets/{export-page-PeexH2QK.js → export-page-D2rCmrUH.js} +2 -2
- package/dist/client/assets/exportDocument-Dunnjgii.js +2 -0
- package/dist/client/assets/{fcl-BWKK0S4-.js → fcl-CUXJFJn1.js} +1 -1
- package/dist/client/assets/flatten-CX_XvnUf.js +1 -0
- package/dist/client/assets/flowDiagram-DWJPFMVM-B_A5JyId.js +162 -0
- package/dist/client/assets/ganttDiagram-T4ZO3ILL-HM3CD7bk.js +292 -0
- package/dist/client/assets/gitGraph-7Q5UKJZL-BrBlB49D.js +1 -0
- package/dist/client/assets/gitGraphDiagram-UUTBAWPF-Dw7twZDm.js +106 -0
- package/dist/client/assets/graphlib-DDD4Vdye.js +1 -0
- package/dist/client/assets/{groovy-BEKazBrO.js → groovy-Di--Vb9Z.js} +1 -1
- package/dist/client/assets/{haxe-BY9d_5nB.js → haxe-CcPA1xnA.js} +1 -1
- package/dist/client/assets/image-XLNPCCAD-BFNybKza.js +1 -0
- package/dist/client/assets/{image-blob-reduce.esm-DriR2zT9.js → image-blob-reduce.esm-DiuPkovC.js} +1 -1
- package/dist/client/assets/{index-Czg_KL-i.js → index-BbziNMqE.js} +2 -2
- package/dist/client/assets/info-OMHHGYJF-BcmgcSx1.js +1 -0
- package/dist/client/assets/{infoDiagram-LFFYTUFH-DFTI0nfs.js → infoDiagram-42DDH7IO-DX-d3DMp.js} +1 -1
- package/dist/client/assets/isEmpty-BKDbo1FH.js +1 -0
- package/dist/client/assets/ishikawaDiagram-UXIWVN3A-BHmsxpMs.js +70 -0
- package/dist/client/assets/{javascript-CdiVhQeA.js → javascript-gTK9fxz6.js} +1 -1
- package/dist/client/assets/javascript-qUBHINSy.js +1 -0
- package/dist/client/assets/{journeyDiagram-4ABVD52K-DDur6iHm.js → journeyDiagram-VCZTEJTY-jxDSjgE1.js} +2 -2
- package/dist/client/assets/{jsx-runtime-C2p7wRmT.js → jsx-runtime-B_8UNt-W.js} +1 -1
- package/dist/client/assets/{kanban-definition-K7BYSVSG-dA6NPLsg.js → kanban-definition-6JOO6SKY-od3qY1mE.js} +2 -2
- package/dist/client/assets/line-CZsGUM4H.js +1 -0
- package/dist/client/assets/{lua-kutgyRGY.js → lua-Cg0FqIlO.js} +1 -1
- package/dist/client/assets/main-CN0kbtGk.js +1369 -0
- package/dist/client/assets/mermaid-parser.core-DtIbxv6L.js +4 -0
- package/dist/client/assets/mermaid-runtime-vVJfjscE.js +11 -0
- package/dist/client/assets/{mindmap-definition-YRQLILUH-DjQcsPoe.js → mindmap-definition-QFDTVHPH-C9qrdAqo.js} +39 -11
- package/dist/client/assets/packet-4T2RLAQJ-DYYSvRuJ.js +1 -0
- package/dist/client/assets/pica-BEurQXMu.js +2 -0
- package/dist/client/assets/pie-ZZUOXDRM-cG65Mc64.js +1 -0
- package/dist/client/assets/pieDiagram-DEJITSTG-BHXxj7wl.js +30 -0
- package/dist/client/assets/{preview-render-compiler-BjLlHmiQ.js → preview-render-compiler-BHeDhYho.js} +2 -2
- package/dist/client/assets/preview-render-compiler-D3QM1Ryz.js +1 -0
- package/dist/client/assets/{preview-render-profile-CR4dJZrp.js → preview-render-profile-BF6os3x9.js} +5 -5
- package/dist/client/assets/{preview-render-worker-B4dH2yxj.js → preview-render-worker-C4AFtMIr.js} +6 -6
- package/dist/client/assets/{pug-DkUcLYWt.js → pug-lkTEco3G.js} +1 -1
- package/dist/client/assets/{python-CZtTmYkS.js → python-BUyhM0Ew.js} +1 -1
- package/dist/client/assets/{q-I27iQntV.js → q-Dls1OX0D.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-337W2JSQ-CYKgdx7K.js → quadrantDiagram-34T5L4WZ-CWW7LORF.js} +1 -1
- package/dist/client/assets/{quick-switcher-controller-DcyllYpm.js → quick-switcher-controller-B1erSgJ1.js} +1 -1
- package/dist/client/assets/{r-DN_EydfL.js → r-DeZ8Mdev.js} +1 -1
- package/dist/client/assets/radar-PYXPWWZC-Bmpup_xw.js +1 -0
- package/dist/client/assets/reduce-C6FuFJbE.js +1 -0
- package/dist/client/assets/requirementDiagram-MS252O5E-CTljNdQH.js +84 -0
- package/dist/client/assets/{room-yJaBAoEU.js → room-DI7DXGeS.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-WA2Y5GQK-CfHe3D6R.js → sankeyDiagram-XADWPNL6-CCfFkC74.js} +1 -1
- package/dist/client/assets/sequenceDiagram-FGHM5R23-BD9vj6WG.js +157 -0
- package/dist/client/assets/{sparql-BOvq0dv7.js → sparql-vm8qNO8J.js} +1 -1
- package/dist/client/assets/sql-GL7dVWcd.js +1 -0
- package/dist/client/assets/stateDiagram-FHFEXIEX-CpiX3KPd.js +1 -0
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-D_5ufPqT.js +1 -0
- package/dist/client/assets/{swift-BCxe4-cw.js → swift-CKcKnWv9.js} +1 -1
- package/dist/client/assets/timeline-definition-GMOUNBTQ-BafRAkSF.js +120 -0
- package/dist/client/assets/treeView-SZITEDCU-NbjhK5cw.js +1 -0
- package/dist/client/assets/treemap-W4RFUUIX-DJzRbb-x.js +1 -0
- package/dist/client/assets/{turtle-GBz_E4RG.js → turtle-BkP3ExOG.js} +1 -1
- package/dist/client/assets/{vault-api-client-p7h7cXKM.js → vault-api-client-DSx3mWkH.js} +1 -1
- package/dist/client/assets/{vault-utils-5Xr0MXCb.js → vault-utils-CRpy8MQz.js} +1 -1
- package/dist/client/assets/vennDiagram-DHZGUBPP-DSngq_Zj.js +34 -0
- package/dist/client/assets/{verilog-C4wTycyo.js → verilog-DSARZZPc.js} +1 -1
- package/dist/client/assets/{vhdl-Bwndeg44.js → vhdl-CnYyYTpa.js} +1 -1
- package/dist/client/assets/wardley-RL74JXVD-DTNoH_BY.js +1 -0
- package/dist/client/assets/wardleyDiagram-NUSXRM2D-CAEd2kJG.js +20 -0
- package/dist/client/assets/{xychartDiagram-JWTSCODW-C3vA70iJ.js → xychartDiagram-5P7HB3ND-BScQpnru.js} +6 -6
- package/dist/client/assets/{yjs-provider-reset-guard-CtERLBID.js → yjs-provider-reset-guard-_Q3mj6tP.js} +1 -1
- package/dist/client/drawio-editor.html +1 -1
- package/dist/client/excalidraw-editor.html +1 -1
- package/dist/client/export-document.html +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +12 -11
- package/src/client/application/app-shell/git-feature.js +44 -36
- package/src/client/application/app-shell/ui-feature-shell.js +87 -63
- package/src/client/application/quick-switcher-loader.js +39 -0
- package/src/client/bootstrap/collabmd-app-shell.js +16 -20
- package/src/client/domain/keyboard-shortcuts.js +8 -0
- package/src/client/drawio-editor.js +13 -0
- package/src/client/excalidraw-editor.js +13 -0
- package/src/client/infrastructure/excalidraw-room-client.js +1 -1
- package/src/client/infrastructure/workspace-sync-client.js +26 -3
- package/src/client/presentation/comment-ui/comment-ui-card.js +83 -3
- package/src/client/presentation/comment-ui/comment-ui-state.js +25 -2
- package/src/client/presentation/drawio-embed-controller.js +18 -0
- package/src/client/presentation/excalidraw-embed-controller.js +11 -1
- package/src/client/presentation/file-history-view-controller.js +9 -1
- package/src/client/presentation/git-panel-controller.js +103 -91
- package/src/server/domain/backlink-index.js +74 -94
- package/src/server/domain/bases/base-index-snapshot-store.js +46 -62
- package/src/server/domain/markdown-reference-extractor.js +233 -0
- package/src/server/infrastructure/http/create-request-handler.js +63 -28
- package/src/server/infrastructure/http/create-vault-api-command-handler.js +275 -256
- package/src/server/infrastructure/http/create-vault-api-query-handler.js +255 -233
- package/src/server/infrastructure/persistence/vault-file-store.js +107 -16
- package/src/server/infrastructure/workspace/file-system-sync-service.js +37 -11
- package/dist/client/assets/_basePickBy-Dv0sK1l7.js +0 -1
- package/dist/client/assets/_baseUniq-DKYX57ji.js +0 -1
- package/dist/client/assets/arc-DrfYGhWk.js +0 -1
- package/dist/client/assets/architecture-PBZL5I3N-DiglIZi9.js +0 -1
- package/dist/client/assets/blockDiagram-WCTKOSBZ-GIgTqnhk.js +0 -132
- package/dist/client/assets/c4Diagram-IC4MRINW-CkHO1i_L.js +0 -10
- package/dist/client/assets/channel-CgsU9TSN.js +0 -1
- package/dist/client/assets/chunk-7E7YKBS2-TdU92i9i.js +0 -1
- package/dist/client/assets/chunk-7R4GIKGN-mqd2GwMg.js +0 -80
- package/dist/client/assets/chunk-C72U2L5F-CJKQWBtz.js +0 -1
- package/dist/client/assets/chunk-EGIJ26TM-C4nq20om.js +0 -1
- package/dist/client/assets/chunk-GEFDOKGD-Bs7FmFox.js +0 -2
- package/dist/client/assets/chunk-GLR3WWYH-qQe2O5VQ.js +0 -2
- package/dist/client/assets/chunk-KYZI473N-CTSCuqRb.js +0 -53
- package/dist/client/assets/chunk-L3YUKLVL-CJZMBtKF.js +0 -1
- package/dist/client/assets/chunk-MX3YWQON-DQpSwRf6.js +0 -1
- package/dist/client/assets/chunk-NU2UP6EN-DlUENSHU.js +0 -35
- package/dist/client/assets/chunk-O4XLMI2P-CcVxZh41.js +0 -7
- package/dist/client/assets/chunk-OZEHJAEY-DjBZbgu0.js +0 -1
- package/dist/client/assets/chunk-R5LLSJPH-CkjKXM73.js +0 -1
- package/dist/client/assets/chunk-WL4C6EOR-axcuKSup.js +0 -189
- package/dist/client/assets/chunk-XIRO2GV7-4wqVHjs_.js +0 -1
- package/dist/client/assets/chunk-XZSTWKYB-C8Y_hIKZ.js +0 -94
- package/dist/client/assets/chunk-YBOYWFTD-CKg4ymFF.js +0 -1
- package/dist/client/assets/classDiagram-VBA2DB6C-BHZpvOxK.js +0 -1
- package/dist/client/assets/classDiagram-v2-RAHNMMFH-DA7HMUUs.js +0 -1
- package/dist/client/assets/clike-1_ZsiVV8.js +0 -1
- package/dist/client/assets/clone-Dgi8Z4IL.js +0 -1
- package/dist/client/assets/cytoscape.esm-Czjc507F.js +0 -321
- package/dist/client/assets/dagre-CfB3Fw33.js +0 -1
- package/dist/client/assets/dagre-KLK3FWXG-CC7tq2Ky.js +0 -4
- package/dist/client/assets/diagram-E7M64L7V-CMt7BN5M.js +0 -24
- package/dist/client/assets/diagram-IFDJBPK2-BFMBUGpd.js +0 -43
- package/dist/client/assets/diagram-P4PSJMXO-CviA1xXr.js +0 -24
- package/dist/client/assets/dist-3bQB_we3.js +0 -1
- package/dist/client/assets/dist-8Igu3Ee_2.js +0 -1
- package/dist/client/assets/dist-BU8uusJX.js +0 -1
- package/dist/client/assets/dist-BVB8rn7o.js +0 -1
- package/dist/client/assets/dist-D5QOYy7y.js +0 -6
- package/dist/client/assets/dist-DIi0uqLJ.js +0 -1
- package/dist/client/assets/dist-DJ16N7ol.js +0 -1
- package/dist/client/assets/dist-DWJL3_bF.js +0 -13
- package/dist/client/assets/dist-OQE68wIX.js +0 -1
- package/dist/client/assets/dist-x7PIEmJu.js +0 -1
- package/dist/client/assets/drawio-editor-BMTwP5mD.js +0 -9
- package/dist/client/assets/excalidraw-editor-CAP9F8CB.js +0 -9
- package/dist/client/assets/excalidraw-scene-BF_bT1OL.js +0 -176
- package/dist/client/assets/excalidrawEditor-DD4AvzYP.js +0 -2
- package/dist/client/assets/exportDocument-Zfwq1XVx.js +0 -2
- package/dist/client/assets/flowDiagram-PKNHOUZH-C_t-mkwb.js +0 -162
- package/dist/client/assets/ganttDiagram-A5KZAMGK-BtK9Tb--.js +0 -292
- package/dist/client/assets/gitGraph-HDMCJU4V-CT7YfbD3.js +0 -1
- package/dist/client/assets/gitGraphDiagram-K3NZZRJ6-DULDLGiJ.js +0 -65
- package/dist/client/assets/graphlib-BgRST-Qg.js +0 -1
- package/dist/client/assets/image-XLNPCCAD-CFiKwiWK.js +0 -1
- package/dist/client/assets/info-3K5VOQVL-DUpNyDC-.js +0 -1
- package/dist/client/assets/isArrayLikeObject-BId_dPHM.js +0 -1
- package/dist/client/assets/isEmpty-CVvRj8fj.js +0 -1
- package/dist/client/assets/ishikawaDiagram-PHBUUO56-DpBuDpC6.js +0 -70
- package/dist/client/assets/javascript-UJe68_xi.js +0 -1
- package/dist/client/assets/line-B2GMovaI.js +0 -1
- package/dist/client/assets/main-DeowJOSp.js +0 -1368
- package/dist/client/assets/math-B-LMBwub.js +0 -1
- package/dist/client/assets/mermaid-parser.core-B1ogGcR8.js +0 -4
- package/dist/client/assets/mermaid-runtime-Bn8A6DGx.js +0 -11
- package/dist/client/assets/packet-RMMSAZCW-DEwNbIrA.js +0 -1
- package/dist/client/assets/pica-C1TdTz-C.js +0 -2
- package/dist/client/assets/pie-UPGHQEXC-D5M_lSjo.js +0 -1
- package/dist/client/assets/pieDiagram-SKSYHLDU-jhHouFpk.js +0 -30
- package/dist/client/assets/preview-render-compiler-Duy_3IcP.js +0 -1
- package/dist/client/assets/radar-KQ55EAFF-AU1qh3Bw.js +0 -1
- package/dist/client/assets/requirementDiagram-Z7DCOOCP-D9SHxoW7.js +0 -73
- package/dist/client/assets/sequenceDiagram-2WXFIKYE-CZsMMqAJ.js +0 -145
- package/dist/client/assets/sql-DDFeQNTK.js +0 -1
- package/dist/client/assets/stateDiagram-RAJIS63D-CoNZjTYV.js +0 -1
- package/dist/client/assets/stateDiagram-v2-FVOUBMTO-1zOw6NmQ.js +0 -1
- package/dist/client/assets/timeline-definition-YZTLITO2-DSe2mrG8.js +0 -61
- package/dist/client/assets/treemap-KZPCXAKY-C9UI2fwP.js +0 -1
- package/dist/client/assets/vennDiagram-LZ73GAT5-xSzaIpy1.js +0 -34
- /package/dist/client/assets/{chunk-55IACEB6-CpncB3ru.js → chunk-55IACEB6-DLqevMSj.js} +0 -0
- /package/dist/client/assets/{chunk-QZHKN3VN-CgLPFSk5.js → chunk-QZHKN3VN-BnOS2iQW.js} +0 -0
- /package/dist/client/assets/{drawio-room-DEivFyNV.js → drawio-room-1i6Nn0_Z.js} +0 -0
- /package/dist/client/assets/{excalidraw-mermaid-stub-BZPU4ZhU.js → excalidraw-mermaid-stub-DzxtBcQW.js} +0 -0
- /package/dist/client/assets/{file-kind-DBptLlF_.js → file-kind-DmKq2MvD.js} +0 -0
- /package/dist/client/assets/{preview-diagram-utils-COt-IYMD.js → preview-diagram-utils-D8VypUft.js} +0 -0
- /package/dist/client/assets/{rough.esm-DE_lJ5Ge.js → rough.esm-BU2knLt9.js} +0 -0
- /package/dist/client/assets/{runtime-config-CqhchMC4.js → runtime-config-DWTejofP.js} +0 -0
package/dist/client/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
document.documentElement.setAttribute('data-initial-file-requested', 'true');
|
|
16
16
|
}
|
|
17
17
|
</script>
|
|
18
|
-
<script type="module" crossorigin src="./assets/index-
|
|
18
|
+
<script type="module" crossorigin src="./assets/index-BbziNMqE.js"></script>
|
|
19
19
|
<link rel="modulepreload" crossorigin href="./assets/runtime-config-loader-_D2KZKn-.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-Bo9GmnuQ.js">
|
|
21
21
|
<link rel="modulepreload" crossorigin href="./assets/base-h1uscjTi.js">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "collabmd",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.35",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Collaborative markdown vault — like Obsidian, but online. Serve any directory of markdown files for realtime collaborative editing.",
|
|
6
6
|
"repository": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@codemirror/search": "^6.6.0",
|
|
70
70
|
"@codemirror/state": "^6.6.0",
|
|
71
71
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
72
|
-
"@codemirror/view": "^6.
|
|
72
|
+
"@codemirror/view": "^6.41.0",
|
|
73
73
|
"@excalidraw/excalidraw": "0.18.0-4a5c9e9",
|
|
74
74
|
"@fontsource-variable/inter": "^5.2.8",
|
|
75
75
|
"@fontsource/jetbrains-mono": "^5.2.8",
|
|
@@ -80,10 +80,11 @@
|
|
|
80
80
|
"lib0": "^0.2.117",
|
|
81
81
|
"lit-html": "^3.3.2",
|
|
82
82
|
"markdown-it": "^14.1.1",
|
|
83
|
-
"mermaid": "^11.
|
|
83
|
+
"mermaid": "^11.14.0",
|
|
84
84
|
"openid-client": "^6.8.2",
|
|
85
|
-
"react": "^19.2.
|
|
86
|
-
"react-dom": "^19.2.
|
|
85
|
+
"react": "^19.2.5",
|
|
86
|
+
"react-dom": "^19.2.5",
|
|
87
|
+
"sharp": "^0.34.5",
|
|
87
88
|
"ws": "^8.20.0",
|
|
88
89
|
"y-codemirror.next": "^0.3.5",
|
|
89
90
|
"y-protocols": "^1.0.7",
|
|
@@ -97,12 +98,12 @@
|
|
|
97
98
|
},
|
|
98
99
|
"devDependencies": {
|
|
99
100
|
"@eslint/js": "^10.0.1",
|
|
100
|
-
"@playwright/test": "^1.
|
|
101
|
-
"@vitest/browser": "^4.1.
|
|
102
|
-
"@vitest/browser-playwright": "^4.1.
|
|
103
|
-
"eslint": "^10.
|
|
101
|
+
"@playwright/test": "^1.59.1",
|
|
102
|
+
"@vitest/browser": "^4.1.4",
|
|
103
|
+
"@vitest/browser-playwright": "^4.1.4",
|
|
104
|
+
"eslint": "^10.2.0",
|
|
104
105
|
"globals": "^17.4.0",
|
|
105
|
-
"vite": "^8.0.
|
|
106
|
-
"vitest": "^4.1.
|
|
106
|
+
"vite": "^8.0.8",
|
|
107
|
+
"vitest": "^4.1.4"
|
|
107
108
|
}
|
|
108
109
|
}
|
|
@@ -232,6 +232,48 @@ export const gitFeature = {
|
|
|
232
232
|
await this.fileHistoryView.openFileHistory({ filePath });
|
|
233
233
|
},
|
|
234
234
|
|
|
235
|
+
async _loadGitFileSnapshot({ hash, filePath, resolvedCurrentFilePath }) {
|
|
236
|
+
const data = await this.gitApiClient.readFileSnapshot({
|
|
237
|
+
hash,
|
|
238
|
+
path: filePath,
|
|
239
|
+
});
|
|
240
|
+
this.setStaticPreviewDocument?.({
|
|
241
|
+
...data,
|
|
242
|
+
currentFilePath: resolvedCurrentFilePath,
|
|
243
|
+
});
|
|
244
|
+
this.resetPreviewMode();
|
|
245
|
+
this.elements.markdownToolbar?.classList.add('hidden');
|
|
246
|
+
this.elements.outlineToggle?.classList.toggle('hidden', data.fileKind !== 'markdown');
|
|
247
|
+
|
|
248
|
+
if (data.fileKind === 'markdown' || data.fileKind === 'mermaid' || data.fileKind === 'plantuml') {
|
|
249
|
+
if (data.fileKind === 'mermaid') {
|
|
250
|
+
this.elements.previewContent?.classList.add('is-mermaid-file-preview');
|
|
251
|
+
} else if (data.fileKind === 'plantuml') {
|
|
252
|
+
this.elements.previewContent?.classList.add('is-plantuml-file-preview');
|
|
253
|
+
}
|
|
254
|
+
this.previewRenderer.beginDocumentLoad();
|
|
255
|
+
this.previewRenderer.queueRender();
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
this.elements.outlineToggle?.classList.add('hidden');
|
|
260
|
+
this.renderTextFilePreview?.({
|
|
261
|
+
content: data.content,
|
|
262
|
+
filePath: resolvedCurrentFilePath,
|
|
263
|
+
});
|
|
264
|
+
},
|
|
265
|
+
|
|
266
|
+
_handleGitFilePreviewError(error, resolvedCurrentFilePath) {
|
|
267
|
+
console.error('[git-preview] Failed to load file snapshot:', error);
|
|
268
|
+
this.clearStaticPreviewDocument?.();
|
|
269
|
+
this.toastController.show('Failed to load historical file preview');
|
|
270
|
+
this.renderTextFilePreview?.({
|
|
271
|
+
content: 'Failed to load historical file preview.',
|
|
272
|
+
filePath: resolvedCurrentFilePath,
|
|
273
|
+
});
|
|
274
|
+
this.elements.outlineToggle?.classList.add('hidden');
|
|
275
|
+
},
|
|
276
|
+
|
|
235
277
|
async showGitFilePreview({ hash, filePath = null, currentFilePath = null } = {}) {
|
|
236
278
|
const resolvedCurrentFilePath = String(currentFilePath ?? '').trim() || filePath;
|
|
237
279
|
if (!hash || !filePath || !resolvedCurrentFilePath) {
|
|
@@ -256,43 +298,9 @@ export const gitFeature = {
|
|
|
256
298
|
this.syncFileHistoryButton({ filePath: resolvedCurrentFilePath, mode: 'history-preview' });
|
|
257
299
|
|
|
258
300
|
try {
|
|
259
|
-
|
|
260
|
-
hash,
|
|
261
|
-
path: filePath,
|
|
262
|
-
});
|
|
263
|
-
this.setStaticPreviewDocument?.({
|
|
264
|
-
...data,
|
|
265
|
-
currentFilePath: resolvedCurrentFilePath,
|
|
266
|
-
});
|
|
267
|
-
this.resetPreviewMode();
|
|
268
|
-
this.elements.markdownToolbar?.classList.add('hidden');
|
|
269
|
-
this.elements.outlineToggle?.classList.toggle('hidden', data.fileKind !== 'markdown');
|
|
270
|
-
|
|
271
|
-
if (data.fileKind === 'markdown' || data.fileKind === 'mermaid' || data.fileKind === 'plantuml') {
|
|
272
|
-
if (data.fileKind === 'mermaid') {
|
|
273
|
-
this.elements.previewContent?.classList.add('is-mermaid-file-preview');
|
|
274
|
-
} else if (data.fileKind === 'plantuml') {
|
|
275
|
-
this.elements.previewContent?.classList.add('is-plantuml-file-preview');
|
|
276
|
-
}
|
|
277
|
-
this.previewRenderer.beginDocumentLoad();
|
|
278
|
-
this.previewRenderer.queueRender();
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
this.elements.outlineToggle?.classList.add('hidden');
|
|
283
|
-
this.renderTextFilePreview?.({
|
|
284
|
-
content: data.content,
|
|
285
|
-
filePath: resolvedCurrentFilePath,
|
|
286
|
-
});
|
|
301
|
+
await this._loadGitFileSnapshot({ hash, filePath, resolvedCurrentFilePath });
|
|
287
302
|
} catch (error) {
|
|
288
|
-
|
|
289
|
-
this.clearStaticPreviewDocument?.();
|
|
290
|
-
this.toastController.show('Failed to load historical file preview');
|
|
291
|
-
this.renderTextFilePreview?.({
|
|
292
|
-
content: 'Failed to load historical file preview.',
|
|
293
|
-
filePath: resolvedCurrentFilePath,
|
|
294
|
-
});
|
|
295
|
-
this.elements.outlineToggle?.classList.add('hidden');
|
|
303
|
+
this._handleGitFilePreviewError(error, resolvedCurrentFilePath);
|
|
296
304
|
}
|
|
297
305
|
},
|
|
298
306
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { supportsBacklinksForFilePath } from '../../../domain/file-kind.js';
|
|
2
|
+
import { isPlainQuickSwitcherShortcut } from '../../domain/keyboard-shortcuts.js';
|
|
2
3
|
|
|
3
4
|
const VERSION_RELOAD_TOAST_DURATION_MS = 0;
|
|
4
5
|
|
|
@@ -136,31 +137,7 @@ function promptForVersionReload(payload = null) {
|
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
/** @this {UiShellContext} */
|
|
139
|
-
function
|
|
140
|
-
this.elements.emptyStateNewFileBtn?.addEventListener('click', () => {
|
|
141
|
-
this.fileExplorer.actionController.openRootCreateMenu({
|
|
142
|
-
anchor: this.elements.emptyStateNewFileBtn,
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
this.elements.emptyStateSearchBtn?.addEventListener('click', () => {
|
|
147
|
-
void this.toggleQuickSwitcher();
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
this.elements.chatToggleButton?.addEventListener('click', () => {
|
|
151
|
-
this.toggleChatPanel();
|
|
152
|
-
this.closeToolbarOverflowMenu?.();
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
this.elements.chatForm?.addEventListener('submit', (event) => {
|
|
156
|
-
event.preventDefault();
|
|
157
|
-
this.handleChatSubmit();
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
this.elements.chatNotificationButton?.addEventListener('click', () => {
|
|
161
|
-
void this.handleChatNotificationToggle();
|
|
162
|
-
});
|
|
163
|
-
|
|
140
|
+
function bindToolbarEvents() {
|
|
164
141
|
this.elements.shareButton?.addEventListener('click', () => {
|
|
165
142
|
void this.copyCurrentLink();
|
|
166
143
|
this.closeToolbarOverflowMenu?.();
|
|
@@ -197,7 +174,10 @@ function bindEvents() {
|
|
|
197
174
|
this.openDisplayNameDialog();
|
|
198
175
|
this.closeToolbarOverflowMenu?.();
|
|
199
176
|
});
|
|
177
|
+
}
|
|
200
178
|
|
|
179
|
+
/** @this {UiShellContext} */
|
|
180
|
+
function bindDialogEvents() {
|
|
201
181
|
this.elements.displayNameCancel?.addEventListener('click', () => {
|
|
202
182
|
this.elements.displayNameDialog?.close();
|
|
203
183
|
});
|
|
@@ -233,14 +213,6 @@ function bindEvents() {
|
|
|
233
213
|
}
|
|
234
214
|
});
|
|
235
215
|
|
|
236
|
-
this.elements.markdownToolbar?.addEventListener('click', (event) => {
|
|
237
|
-
this.handleMarkdownToolbarClick?.(event);
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
this.elements.markdownToolbar?.addEventListener('keydown', (event) => {
|
|
241
|
-
this.handleMarkdownToolbarKeydown?.(event);
|
|
242
|
-
});
|
|
243
|
-
|
|
244
216
|
this.elements.displayNameForm?.addEventListener('submit', (event) => {
|
|
245
217
|
event.preventDefault();
|
|
246
218
|
this.handleDisplayNameSubmit();
|
|
@@ -250,6 +222,44 @@ function bindEvents() {
|
|
|
250
222
|
event.preventDefault();
|
|
251
223
|
void this.handleGitCommitSubmit();
|
|
252
224
|
});
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** @this {UiShellContext} */
|
|
228
|
+
function bindEvents() {
|
|
229
|
+
this.elements.emptyStateNewFileBtn?.addEventListener('click', () => {
|
|
230
|
+
this.fileExplorer.actionController.openRootCreateMenu({
|
|
231
|
+
anchor: this.elements.emptyStateNewFileBtn,
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
this.elements.emptyStateSearchBtn?.addEventListener('click', () => {
|
|
236
|
+
void this.toggleQuickSwitcher();
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
this.elements.chatToggleButton?.addEventListener('click', () => {
|
|
240
|
+
this.toggleChatPanel();
|
|
241
|
+
this.closeToolbarOverflowMenu?.();
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
this.elements.chatForm?.addEventListener('submit', (event) => {
|
|
245
|
+
event.preventDefault();
|
|
246
|
+
this.handleChatSubmit();
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
this.elements.chatNotificationButton?.addEventListener('click', () => {
|
|
250
|
+
void this.handleChatNotificationToggle();
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
bindToolbarEvents.call(this);
|
|
254
|
+
bindDialogEvents.call(this);
|
|
255
|
+
|
|
256
|
+
this.elements.markdownToolbar?.addEventListener('click', (event) => {
|
|
257
|
+
this.handleMarkdownToolbarClick?.(event);
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
this.elements.markdownToolbar?.addEventListener('keydown', (event) => {
|
|
261
|
+
this.handleMarkdownToolbarKeydown?.(event);
|
|
262
|
+
});
|
|
253
263
|
|
|
254
264
|
this.elements.tabLockTakeoverButton?.addEventListener('click', () => {
|
|
255
265
|
this.handleTabTakeover();
|
|
@@ -299,43 +309,54 @@ function bindEvents() {
|
|
|
299
309
|
});
|
|
300
310
|
|
|
301
311
|
document.addEventListener('pointerdown', (event) => {
|
|
302
|
-
this.
|
|
312
|
+
this.handleDocumentPointerDown(event);
|
|
313
|
+
});
|
|
303
314
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
) {
|
|
309
|
-
this.closeToolbarOverflowMenu();
|
|
310
|
-
}
|
|
315
|
+
document.addEventListener('keydown', (event) => {
|
|
316
|
+
this.handleDocumentKeydown(event);
|
|
317
|
+
}, { capture: true });
|
|
318
|
+
}
|
|
311
319
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
320
|
+
/** @this {UiShellContext} */
|
|
321
|
+
function handleDocumentPointerDown(event) {
|
|
322
|
+
this.handleMarkdownToolbarDocumentPointerDown?.(event);
|
|
323
|
+
|
|
324
|
+
if (
|
|
325
|
+
this.toolbarOverflowOpen
|
|
326
|
+
&& !this.elements.toolbarOverflowMenu?.contains(event.target)
|
|
327
|
+
&& !this.elements.toolbarOverflowToggle?.contains(event.target)
|
|
328
|
+
) {
|
|
329
|
+
this.closeToolbarOverflowMenu();
|
|
330
|
+
}
|
|
315
331
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
332
|
+
if (!this.chatIsOpen) {
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
319
335
|
|
|
320
|
-
|
|
321
|
-
|
|
336
|
+
if (this.elements.chatContainer?.contains(event.target)) {
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
322
339
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
this.closeToolbarOverflowMenu();
|
|
326
|
-
return;
|
|
327
|
-
}
|
|
340
|
+
this.closeChatPanel();
|
|
341
|
+
}
|
|
328
342
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
343
|
+
/** @this {UiShellContext} */
|
|
344
|
+
function handleDocumentKeydown(event) {
|
|
345
|
+
if (event.key === 'Escape' && this.toolbarOverflowOpen) {
|
|
346
|
+
this.closeToolbarOverflowMenu();
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
333
349
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
350
|
+
if (event.key === 'Escape' && this.chatIsOpen) {
|
|
351
|
+
this.closeChatPanel();
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
if (isPlainQuickSwitcherShortcut(event)) {
|
|
356
|
+
event.preventDefault();
|
|
357
|
+
event.stopPropagation();
|
|
358
|
+
void this.toggleQuickSwitcher();
|
|
359
|
+
}
|
|
339
360
|
}
|
|
340
361
|
|
|
341
362
|
function isNestedTaskListClickTarget(target, taskItem) {
|
|
@@ -521,12 +542,15 @@ export const uiFeatureShellMethods = {
|
|
|
521
542
|
closeToolbarOverflowMenu,
|
|
522
543
|
getStoredLineWrapping,
|
|
523
544
|
handleConnectionChange,
|
|
545
|
+
handleDocumentKeydown,
|
|
546
|
+
handleDocumentPointerDown,
|
|
524
547
|
handlePreviewContentClick,
|
|
525
548
|
handleThemeChange,
|
|
526
549
|
hideEditorLoading,
|
|
527
550
|
initialize,
|
|
528
551
|
initializeVisualViewportBinding,
|
|
529
552
|
initializeVersionMonitoring,
|
|
553
|
+
isPlainQuickSwitcherShortcut,
|
|
530
554
|
promptForVersionReload,
|
|
531
555
|
scheduleBacklinkRefresh,
|
|
532
556
|
setToolbarOverflowOpen,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export async function ensureQuickSwitcherInstance(host) {
|
|
2
|
+
if (host.quickSwitcher) {
|
|
3
|
+
return host.quickSwitcher;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
if (!host.quickSwitcherModulePromise) {
|
|
7
|
+
host.quickSwitcherModulePromise = host.loadQuickSwitcherController();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let QuickSwitcherController;
|
|
11
|
+
try {
|
|
12
|
+
QuickSwitcherController = await host.quickSwitcherModulePromise;
|
|
13
|
+
} catch (error) {
|
|
14
|
+
host.quickSwitcherModulePromise = null;
|
|
15
|
+
console.error('[quick-switcher] Failed to load file search.', error);
|
|
16
|
+
host.toastController?.show?.('Failed to load file search. Try again.', {
|
|
17
|
+
dismissible: true,
|
|
18
|
+
});
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (!host.quickSwitcher) {
|
|
23
|
+
host.quickSwitcher = new QuickSwitcherController({
|
|
24
|
+
getFileList: () => host.fileExplorer.flatFiles,
|
|
25
|
+
onFileSelect: (filePath) => host.handleFileSelection(filePath, { closeSidebarOnMobile: true }),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return host.quickSwitcher;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export async function toggleQuickSwitcherInstance(host) {
|
|
33
|
+
try {
|
|
34
|
+
const quickSwitcher = await ensureQuickSwitcherInstance(host);
|
|
35
|
+
quickSwitcher.toggle();
|
|
36
|
+
} catch {
|
|
37
|
+
// ensureQuickSwitcherInstance reports the load failure and resets the cached import.
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PreviewRenderer } from '../application/preview-renderer.js';
|
|
2
|
+
import { ensureQuickSwitcherInstance, toggleQuickSwitcherInstance } from '../application/quick-switcher-loader.js';
|
|
2
3
|
import { WorkspaceRouteController } from '../application/workspace-route-controller.js';
|
|
3
4
|
import { WikiLinkFileController } from '../application/wiki-link-file-controller.js';
|
|
4
5
|
import { WorkspacePreviewController } from '../application/workspace-preview-controller.js';
|
|
@@ -112,6 +113,8 @@ export class CollabMdAppShell {
|
|
|
112
113
|
closeToolbarOverflowMenu(...args) { return uiFeature.closeToolbarOverflowMenu.apply(this, args); }
|
|
113
114
|
getStoredLineWrapping(...args) { return uiFeature.getStoredLineWrapping.apply(this, args); }
|
|
114
115
|
handleConnectionChange(...args) { return uiFeature.handleConnectionChange.apply(this, args); }
|
|
116
|
+
handleDocumentKeydown(...args) { return uiFeature.handleDocumentKeydown.apply(this, args); }
|
|
117
|
+
handleDocumentPointerDown(...args) { return uiFeature.handleDocumentPointerDown.apply(this, args); }
|
|
115
118
|
handlePreviewContentClick(...args) { return uiFeature.handlePreviewContentClick.apply(this, args); }
|
|
116
119
|
handleThemeChange(...args) { return uiFeature.handleThemeChange.apply(this, args); }
|
|
117
120
|
hideEditorLoading(...args) { return uiFeature.hideEditorLoading.apply(this, args); }
|
|
@@ -390,6 +393,9 @@ export class CollabMdAppShell {
|
|
|
390
393
|
getLocalUser: () => this.lobby.getLocalUser(),
|
|
391
394
|
getTheme: () => this.themeController.getTheme(),
|
|
392
395
|
onOpenFile: (filePath) => filePath && this.navigation.navigateToFile(filePath),
|
|
396
|
+
onToggleQuickSwitcher: () => {
|
|
397
|
+
void this.toggleQuickSwitcher();
|
|
398
|
+
},
|
|
393
399
|
previewContainer: this.elements.previewContainer,
|
|
394
400
|
previewElement: this.elements.previewContent,
|
|
395
401
|
toastController: this.toastController,
|
|
@@ -399,6 +405,9 @@ export class CollabMdAppShell {
|
|
|
399
405
|
getTheme: () => this.themeController.getTheme(),
|
|
400
406
|
onOpenFile: (filePath) => filePath && this.navigation.navigateToFile(filePath),
|
|
401
407
|
onOpenTextFile: (filePath) => filePath && this.navigation.navigateToFile(filePath, { drawioMode: 'text' }),
|
|
408
|
+
onToggleQuickSwitcher: () => {
|
|
409
|
+
void this.toggleQuickSwitcher();
|
|
410
|
+
},
|
|
402
411
|
previewContainer: this.elements.previewContainer,
|
|
403
412
|
previewElement: this.elements.previewContent,
|
|
404
413
|
toastController: this.toastController,
|
|
@@ -771,29 +780,16 @@ export class CollabMdAppShell {
|
|
|
771
780
|
this._editorSessionPrewarmHandle = window.setTimeout(runPrewarm, 0);
|
|
772
781
|
}
|
|
773
782
|
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
if (!this.quickSwitcherModulePromise) {
|
|
780
|
-
this.quickSwitcherModulePromise = import('../presentation/quick-switcher-controller.js')
|
|
781
|
-
.then((module) => module.QuickSwitcherController);
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
const QuickSwitcherController = await this.quickSwitcherModulePromise;
|
|
785
|
-
if (!this.quickSwitcher) {
|
|
786
|
-
this.quickSwitcher = new QuickSwitcherController({
|
|
787
|
-
getFileList: () => this.fileExplorer.flatFiles,
|
|
788
|
-
onFileSelect: (filePath) => this.handleFileSelection(filePath, { closeSidebarOnMobile: true }),
|
|
789
|
-
});
|
|
790
|
-
}
|
|
783
|
+
loadQuickSwitcherController() {
|
|
784
|
+
return import('../presentation/quick-switcher-controller.js')
|
|
785
|
+
.then((module) => module.QuickSwitcherController);
|
|
786
|
+
}
|
|
791
787
|
|
|
792
|
-
|
|
788
|
+
async ensureQuickSwitcher() {
|
|
789
|
+
return ensureQuickSwitcherInstance(this);
|
|
793
790
|
}
|
|
794
791
|
|
|
795
792
|
async toggleQuickSwitcher() {
|
|
796
|
-
|
|
797
|
-
quickSwitcher.toggle();
|
|
793
|
+
return toggleQuickSwitcherInstance(this);
|
|
798
794
|
}
|
|
799
795
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function isPlainQuickSwitcherShortcut(event) {
|
|
2
|
+
if (!event || event.repeat || (!event.metaKey && !event.ctrlKey) || event.shiftKey || event.altKey) {
|
|
3
|
+
return false;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const key = String(event.key ?? '').toLowerCase();
|
|
7
|
+
return key === 'k' || event.code === 'KeyK';
|
|
8
|
+
}
|
|
@@ -2,6 +2,7 @@ import './styles/surfaces/embedded-editor-base.css';
|
|
|
2
2
|
import './styles/surfaces/drawio-editor.css';
|
|
3
3
|
|
|
4
4
|
import { ensureClientAuthenticated } from './infrastructure/auth-client.js';
|
|
5
|
+
import { isPlainQuickSwitcherShortcut } from './domain/keyboard-shortcuts.js';
|
|
5
6
|
import { DrawioLeaseClient } from './infrastructure/drawio-lease-client.js';
|
|
6
7
|
import { getRuntimeConfig } from './infrastructure/runtime-config.js';
|
|
7
8
|
import { vaultApiClient } from './infrastructure/vault-api-client.js';
|
|
@@ -76,6 +77,16 @@ function postToParent(type, payload = {}) {
|
|
|
76
77
|
window.parent.postMessage({ source: 'drawio-editor', instanceId, type, ...payload }, parentOrigin);
|
|
77
78
|
}
|
|
78
79
|
|
|
80
|
+
function handleQuickSwitcherKeyDown(event) {
|
|
81
|
+
if (!isPlainQuickSwitcherShortcut(event)) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
event.preventDefault();
|
|
86
|
+
event.stopPropagation();
|
|
87
|
+
postToParent('request-toggle-quick-switcher');
|
|
88
|
+
}
|
|
89
|
+
|
|
79
90
|
function parseMessagePayload(rawValue) {
|
|
80
91
|
if (typeof rawValue === 'string') {
|
|
81
92
|
try {
|
|
@@ -418,6 +429,8 @@ async function claimEdit() {
|
|
|
418
429
|
drawioLeaseClient.tryAcquireLease();
|
|
419
430
|
}
|
|
420
431
|
|
|
432
|
+
window.addEventListener('keydown', handleQuickSwitcherKeyDown, { capture: true });
|
|
433
|
+
|
|
421
434
|
async function init() {
|
|
422
435
|
setBodyTheme(currentTheme);
|
|
423
436
|
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
normalizeDocumentMode,
|
|
26
26
|
} from './domain/excalidraw-document-switch.js';
|
|
27
|
+
import { isPlainQuickSwitcherShortcut } from './domain/keyboard-shortcuts.js';
|
|
27
28
|
import { ensureClientAuthenticated } from './infrastructure/auth-client.js';
|
|
28
29
|
import { ExcalidrawRoomClient } from './infrastructure/excalidraw-room-client.js';
|
|
29
30
|
import { vaultApiClient } from './infrastructure/vault-api-client.js';
|
|
@@ -440,6 +441,16 @@ function postToParent(type, payload = {}) {
|
|
|
440
441
|
window.parent.postMessage({ source: 'excalidraw-editor', type, ...payload }, parentOrigin);
|
|
441
442
|
}
|
|
442
443
|
|
|
444
|
+
function handleQuickSwitcherKeyDown(event) {
|
|
445
|
+
if (!isPlainQuickSwitcherShortcut(event)) {
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
event.preventDefault();
|
|
450
|
+
event.stopPropagation();
|
|
451
|
+
postToParent('request-toggle-quick-switcher');
|
|
452
|
+
}
|
|
453
|
+
|
|
443
454
|
function getSceneElementsForPreviewFit() {
|
|
444
455
|
return (
|
|
445
456
|
excalidrawAPI?.getSceneElementsIncludingDeleted?.()
|
|
@@ -757,6 +768,8 @@ function handleEditorMount({ excalidrawAPI: api }) {
|
|
|
757
768
|
excalidrawAPI = api;
|
|
758
769
|
}
|
|
759
770
|
|
|
771
|
+
window.addEventListener('keydown', handleQuickSwitcherKeyDown, { capture: true });
|
|
772
|
+
|
|
760
773
|
async function init() {
|
|
761
774
|
const loadingElement = document.getElementById('loadingState');
|
|
762
775
|
|
|
@@ -210,7 +210,7 @@ export class ExcalidrawRoomClient {
|
|
|
210
210
|
let initialJson = this.getStructuredSceneJson();
|
|
211
211
|
let usedApiFallback = false;
|
|
212
212
|
if (!initialJson) {
|
|
213
|
-
const sceneFromApi = await this.loadSceneFromApi();
|
|
213
|
+
const sceneFromApi = await this.loadSceneFromApi({ createIfMissing: false });
|
|
214
214
|
const syncedJson = this.getStructuredSceneJson();
|
|
215
215
|
if (syncedJson) {
|
|
216
216
|
initialJson = syncedJson;
|
|
@@ -6,6 +6,29 @@ import { WORKSPACE_ROOM_NAME } from '../../domain/workspace-room.js';
|
|
|
6
6
|
import { resolveWsBaseUrl } from '../domain/runtime-paths.js';
|
|
7
7
|
import { stopReconnectOnControlledClose } from './yjs-provider-reset-guard.js';
|
|
8
8
|
|
|
9
|
+
function normalizeWorkspacePath(pathValue = '') {
|
|
10
|
+
return String(pathValue ?? '')
|
|
11
|
+
.trim()
|
|
12
|
+
.replace(/\\/g, '/')
|
|
13
|
+
.split('/')
|
|
14
|
+
.filter(Boolean)
|
|
15
|
+
.join('/');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function getParentDirectoryPath(pathValue = '') {
|
|
19
|
+
const normalizedPath = normalizeWorkspacePath(pathValue);
|
|
20
|
+
if (!normalizedPath) {
|
|
21
|
+
return '';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const separatorIndex = normalizedPath.lastIndexOf('/');
|
|
25
|
+
return separatorIndex >= 0 ? normalizedPath.slice(0, separatorIndex) : '';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function getEntryParentPath(entry = {}) {
|
|
29
|
+
return getParentDirectoryPath(entry?.path ?? '');
|
|
30
|
+
}
|
|
31
|
+
|
|
9
32
|
function createNode(entry) {
|
|
10
33
|
if (!entry?.path || !entry?.type) {
|
|
11
34
|
return null;
|
|
@@ -87,7 +110,7 @@ class WorkspaceTreeModel {
|
|
|
87
110
|
sortPathsByDepth(Array.from(this.nodesByPath.keys())).forEach((pathValue) => {
|
|
88
111
|
const node = this.nodesByPath.get(pathValue);
|
|
89
112
|
if (node) {
|
|
90
|
-
this.attachNode(pathValue, node, this.entriesByPath.get(pathValue)
|
|
113
|
+
this.attachNode(pathValue, node, getEntryParentPath(this.entriesByPath.get(pathValue)));
|
|
91
114
|
}
|
|
92
115
|
});
|
|
93
116
|
|
|
@@ -170,7 +193,7 @@ class WorkspaceTreeModel {
|
|
|
170
193
|
}
|
|
171
194
|
|
|
172
195
|
this.entriesByPath.set(pathValue, entry);
|
|
173
|
-
this.attachNode(pathValue, node, entry
|
|
196
|
+
this.attachNode(pathValue, node, getEntryParentPath(entry));
|
|
174
197
|
|
|
175
198
|
if (node.type === 'directory') {
|
|
176
199
|
this.rehomeChildren(pathValue);
|
|
@@ -214,7 +237,7 @@ class WorkspaceTreeModel {
|
|
|
214
237
|
|
|
215
238
|
rehomeChildren(parentPath) {
|
|
216
239
|
this.entriesByPath.forEach((entry, pathValue) => {
|
|
217
|
-
if (entry
|
|
240
|
+
if (getEntryParentPath(entry) !== parentPath) {
|
|
218
241
|
return;
|
|
219
242
|
}
|
|
220
243
|
|