collabmd 0.1.18
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/LICENSE +21 -0
- package/README.md +453 -0
- package/bin/collabmd.js +241 -0
- package/docker-compose.yml +43 -0
- package/package.json +93 -0
- package/public/assets/css/base.css +1 -0
- package/public/assets/css/style.css +1 -0
- package/public/assets/js/assets/Assistant-Bold-ZDZZ6JHA.woff2 +0 -0
- package/public/assets/js/assets/Assistant-Medium-DZ25RZU3.woff2 +0 -0
- package/public/assets/js/assets/Assistant-Regular-PLF2XOGW.woff2 +0 -0
- package/public/assets/js/assets/Assistant-SemiBold-CZ5MX6FK.woff2 +0 -0
- package/public/assets/js/chunks/CodeMirrorEditor-UCMRAMCV-MAKZFDBE.js +12 -0
- package/public/assets/js/chunks/apl-C5P5JBDI.js +1 -0
- package/public/assets/js/chunks/ar-SA-NXDWD63E-MF6HMEA4.js +8 -0
- package/public/assets/js/chunks/architecture-PBZL5I3N-55LDZ5WS.js +1 -0
- package/public/assets/js/chunks/architectureDiagram-2XIMDMQ5-2VP562X7.js +36 -0
- package/public/assets/js/chunks/asciiarmor-3NCLLELT.js +1 -0
- package/public/assets/js/chunks/asn1-KF4WXU3M.js +1 -0
- package/public/assets/js/chunks/asterisk-EA3VIN65.js +1 -0
- package/public/assets/js/chunks/az-AZ-MXSORGZV-AIGO4TNU.js +1 -0
- package/public/assets/js/chunks/bg-BG-O6MV2KSF-X6AVO2AF.js +5 -0
- package/public/assets/js/chunks/blockDiagram-WCTKOSBZ-KM56WWDE.js +132 -0
- package/public/assets/js/chunks/bn-BD-T2VJNT7N-7OMHRIGC.js +3 -0
- package/public/assets/js/chunks/bn-IN-MMW2ORAC-EPKMNKG7.js +3 -0
- package/public/assets/js/chunks/brainfuck-A3CTQVFD.js +1 -0
- package/public/assets/js/chunks/c4Diagram-IC4MRINW-KX6UEGQZ.js +10 -0
- package/public/assets/js/chunks/ca-ES-MKBCGNOG-U44SUUTN.js +8 -0
- package/public/assets/js/chunks/chunk-2NTQWLZD.js +25 -0
- package/public/assets/js/chunks/chunk-2YRP2AWD.js +1 -0
- package/public/assets/js/chunks/chunk-3BUCGSSJ.js +1 -0
- package/public/assets/js/chunks/chunk-47L7JGE3.js +1 -0
- package/public/assets/js/chunks/chunk-4BCHPULB.js +1 -0
- package/public/assets/js/chunks/chunk-4NKM6YFO.js +161 -0
- package/public/assets/js/chunks/chunk-4WGMPBK5.js +1 -0
- package/public/assets/js/chunks/chunk-55WF6Y2Q.js +1 -0
- package/public/assets/js/chunks/chunk-775E65SU.js +1 -0
- package/public/assets/js/chunks/chunk-AJRGTECU.js +70 -0
- package/public/assets/js/chunks/chunk-B2J3PHGY.js +1 -0
- package/public/assets/js/chunks/chunk-B4JKB3BC.js +1 -0
- package/public/assets/js/chunks/chunk-BBHPYU2R.js +1 -0
- package/public/assets/js/chunks/chunk-CGVY4PKT.js +13 -0
- package/public/assets/js/chunks/chunk-CVTRX3TE.js +220 -0
- package/public/assets/js/chunks/chunk-DW6KK6VF.js +1 -0
- package/public/assets/js/chunks/chunk-E2HMNOQL.js +189 -0
- package/public/assets/js/chunks/chunk-EPTJZP5H.js +7 -0
- package/public/assets/js/chunks/chunk-G7NUGGE7.js +13 -0
- package/public/assets/js/chunks/chunk-GI7LBIBP.js +1 -0
- package/public/assets/js/chunks/chunk-GXRL27M7.js +1 -0
- package/public/assets/js/chunks/chunk-H6EYDHRW.js +1 -0
- package/public/assets/js/chunks/chunk-HOCBCDA5.js +1 -0
- package/public/assets/js/chunks/chunk-HS2CUOC6.js +1 -0
- package/public/assets/js/chunks/chunk-HUAS4BYI.js +12 -0
- package/public/assets/js/chunks/chunk-HVNNEPP5.js +2 -0
- package/public/assets/js/chunks/chunk-I2GVZI7W.js +38 -0
- package/public/assets/js/chunks/chunk-I6PVWGBN.js +14 -0
- package/public/assets/js/chunks/chunk-IR2DOYV4.js +7 -0
- package/public/assets/js/chunks/chunk-IZ3V3F2A.js +1 -0
- package/public/assets/js/chunks/chunk-KPAQHIOI.js +1 -0
- package/public/assets/js/chunks/chunk-M3EW4V74.js +1 -0
- package/public/assets/js/chunks/chunk-MK3AFU3C.js +90 -0
- package/public/assets/js/chunks/chunk-NM6J3ND7.js +1 -0
- package/public/assets/js/chunks/chunk-NO7UPWTU.js +1 -0
- package/public/assets/js/chunks/chunk-OG2TNZEU.js +9 -0
- package/public/assets/js/chunks/chunk-OHGDMMWM.js +1 -0
- package/public/assets/js/chunks/chunk-OOT2HALX.js +1 -0
- package/public/assets/js/chunks/chunk-OQLLZFFN.js +1 -0
- package/public/assets/js/chunks/chunk-PF6TP4EI.js +1 -0
- package/public/assets/js/chunks/chunk-PMOZMECZ.js +85 -0
- package/public/assets/js/chunks/chunk-QBGS6DJR.js +1 -0
- package/public/assets/js/chunks/chunk-QF3ZQ6UQ.js +1 -0
- package/public/assets/js/chunks/chunk-QFXMAUW4.js +1 -0
- package/public/assets/js/chunks/chunk-QSTBGTWJ.js +1 -0
- package/public/assets/js/chunks/chunk-QYKIT2IH.js +41 -0
- package/public/assets/js/chunks/chunk-S75BI2UQ.js +1 -0
- package/public/assets/js/chunks/chunk-SKEZZ3H6.js +1 -0
- package/public/assets/js/chunks/chunk-SO6QBCB6.js +1 -0
- package/public/assets/js/chunks/chunk-SR3U53EQ.js +1 -0
- package/public/assets/js/chunks/chunk-TFP6LRYJ.js +53 -0
- package/public/assets/js/chunks/chunk-U6APNHAF.js +15 -0
- package/public/assets/js/chunks/chunk-VOODXHXA.js +1 -0
- package/public/assets/js/chunks/chunk-W7WJUTSA.js +3 -0
- package/public/assets/js/chunks/chunk-WNXFO2F2.js +1 -0
- package/public/assets/js/chunks/chunk-X6EEYWV4.js +6 -0
- package/public/assets/js/chunks/chunk-YVW3ZETS.js +1 -0
- package/public/assets/js/chunks/chunk-ZR2QRTBG.js +339 -0
- package/public/assets/js/chunks/chunk-ZZJX4LQ2.js +1 -0
- package/public/assets/js/chunks/classDiagram-VBA2DB6C-IYW4O2RM.js +1 -0
- package/public/assets/js/chunks/classDiagram-v2-RAHNMMFH-DNKVN2WD.js +1 -0
- package/public/assets/js/chunks/clike-RTBH33GE.js +1 -0
- package/public/assets/js/chunks/clojure-BR2VJ2JI.js +1 -0
- package/public/assets/js/chunks/cmake-2HEWVFEE.js +1 -0
- package/public/assets/js/chunks/cobol-V6EIK6DN.js +1 -0
- package/public/assets/js/chunks/coffeescript-JW3ZOGMD.js +1 -0
- package/public/assets/js/chunks/commonlisp-UCWSIHYK.js +1 -0
- package/public/assets/js/chunks/cose-bilkent-S5V4N54A-QVYRFFNC.js +1 -0
- package/public/assets/js/chunks/crystal-GR4VLC3M.js +1 -0
- package/public/assets/js/chunks/cs-CZ-V77HGUP7-OLBAKFG5.js +7 -0
- package/public/assets/js/chunks/css-C5DVWGB4.js +1 -0
- package/public/assets/js/chunks/cypher-K7FZM5GC.js +1 -0
- package/public/assets/js/chunks/d-CF3QNNH5.js +1 -0
- package/public/assets/js/chunks/da-DK-I5RFNTM4-QJIG2SEZ.js +2 -0
- package/public/assets/js/chunks/dagre-KLK3FWXG-KVNBUDOY.js +4 -0
- package/public/assets/js/chunks/de-CH-WLRDEVBV-4MMJDMVD.js +7 -0
- package/public/assets/js/chunks/de-DE-DTI4WUSC-ML7C46TT.js +7 -0
- package/public/assets/js/chunks/diagram-E7M64L7V-ZP33VRUC.js +24 -0
- package/public/assets/js/chunks/diagram-IFDJBPK2-ZG35YWOD.js +43 -0
- package/public/assets/js/chunks/diagram-P4PSJMXO-ZGIGM7D2.js +24 -0
- package/public/assets/js/chunks/diff-KOMSZU7O.js +1 -0
- package/public/assets/js/chunks/dist-7RQKSOUX.js +7 -0
- package/public/assets/js/chunks/dist-ARWGZ6MN.js +1 -0
- package/public/assets/js/chunks/dist-DPBSGC3Y.js +2 -0
- package/public/assets/js/chunks/dist-E36PJE5M.js +1 -0
- package/public/assets/js/chunks/dist-E5NM7OBW.js +1 -0
- package/public/assets/js/chunks/dist-ERADYPEK.js +1 -0
- package/public/assets/js/chunks/dist-F43RIHBZ.js +1 -0
- package/public/assets/js/chunks/dist-HAB5NIXI.js +1 -0
- package/public/assets/js/chunks/dist-HG23OLRA.js +1 -0
- package/public/assets/js/chunks/dist-IEJXBSDJ.js +1 -0
- package/public/assets/js/chunks/dist-IQA4KVJK.js +1 -0
- package/public/assets/js/chunks/dist-OIQTNVT2.js +3 -0
- package/public/assets/js/chunks/dist-PMZJ734S.js +1 -0
- package/public/assets/js/chunks/dist-RCQFQRLD.js +1 -0
- package/public/assets/js/chunks/dist-RQLC4GVI.js +1 -0
- package/public/assets/js/chunks/dist-RSJGLSKC.js +1 -0
- package/public/assets/js/chunks/dist-SGNQZVVX.js +1 -0
- package/public/assets/js/chunks/dist-VCFTF7Z6.js +1 -0
- package/public/assets/js/chunks/dist-VTO23SHH.js +1 -0
- package/public/assets/js/chunks/dist-XOODBV4L.js +1 -0
- package/public/assets/js/chunks/dist-ZFZNCRZY.js +1 -0
- package/public/assets/js/chunks/dockerfile-XCIKYOSI.js +1 -0
- package/public/assets/js/chunks/dtd-3XFH7W6Z.js +1 -0
- package/public/assets/js/chunks/dylan-3UWPKVOR.js +1 -0
- package/public/assets/js/chunks/ebnf-OLHTL3VN.js +1 -0
- package/public/assets/js/chunks/ecl-43LZ3ZRM.js +1 -0
- package/public/assets/js/chunks/editor-session-IHFTYG5D.js +22 -0
- package/public/assets/js/chunks/eiffel-ISPO2UJF.js +1 -0
- package/public/assets/js/chunks/el-GR-ZXDJ2OS4-WSCEIO6J.js +7 -0
- package/public/assets/js/chunks/elm-CLK576PK.js +1 -0
- package/public/assets/js/chunks/en-CTDJDZ6K-IC3QAUOI.js +1 -0
- package/public/assets/js/chunks/erDiagram-INFDFZHY-ZMS6H2TH.js +70 -0
- package/public/assets/js/chunks/erlang-AVQXQFOT.js +1 -0
- package/public/assets/js/chunks/es-ES-DYQHAD43-XGB5X5IM.js +7 -0
- package/public/assets/js/chunks/eu-ES-QDSYU5Y3-LA3JTIJ2.js +7 -0
- package/public/assets/js/chunks/excalidraw-mermaid-stub-NYXTOJ4H.js +1 -0
- package/public/assets/js/chunks/fa-IR-26LZG4PM-PFALMEDX.js +9 -0
- package/public/assets/js/chunks/factor-CRTVBD6Q.js +1 -0
- package/public/assets/js/chunks/fcl-FX24LKTH.js +1 -0
- package/public/assets/js/chunks/fi-FI-6YS4KDE4-ES5MV6P4.js +6 -0
- package/public/assets/js/chunks/flowDiagram-PKNHOUZH-QD4L5IE5.js +162 -0
- package/public/assets/js/chunks/forth-YKDKCTVS.js +1 -0
- package/public/assets/js/chunks/fortran-UJWC6SLU.js +1 -0
- package/public/assets/js/chunks/fr-FR-BRLLPTZC-VMFE22YV.js +12 -0
- package/public/assets/js/chunks/ganttDiagram-A5KZAMGK-VTMTQESP.js +292 -0
- package/public/assets/js/chunks/gas-MYEMWGRE.js +1 -0
- package/public/assets/js/chunks/gherkin-JWHAU2YG.js +1 -0
- package/public/assets/js/chunks/gitGraph-HDMCJU4V-YPHS74XX.js +1 -0
- package/public/assets/js/chunks/gitGraphDiagram-K3NZZRJ6-Z3EZ634T.js +65 -0
- package/public/assets/js/chunks/gl-ES-OKUZTLYG-GPT42ZHV.js +6 -0
- package/public/assets/js/chunks/groovy-QZIZQIAK.js +1 -0
- package/public/assets/js/chunks/haskell-JR3G7YNW.js +1 -0
- package/public/assets/js/chunks/haxe-TVLAIYEN.js +1 -0
- package/public/assets/js/chunks/he-IL-26MGYIU7-VQ5XQYYY.js +8 -0
- package/public/assets/js/chunks/hi-IN-Q4ZOGTP2-2Z766MXA.js +3 -0
- package/public/assets/js/chunks/http-YXQRE77G.js +1 -0
- package/public/assets/js/chunks/hu-HU-P2OXPSN5-6XDVPGTE.js +3 -0
- package/public/assets/js/chunks/id-ID-2EIKXYN6-J5GWSY2S.js +8 -0
- package/public/assets/js/chunks/idl-RAQGJ6LJ.js +1 -0
- package/public/assets/js/chunks/image-32MOCVDX-JN2EUMQG.js +1 -0
- package/public/assets/js/chunks/image-blob-reduce.esm-K5OWL55S.js +13 -0
- package/public/assets/js/chunks/info-3K5VOQVL-CXJSPNNP.js +1 -0
- package/public/assets/js/chunks/infoDiagram-LFFYTUFH-WQ34MUJA.js +2 -0
- package/public/assets/js/chunks/ishikawaDiagram-PHBUUO56-4IARWKJK.js +70 -0
- package/public/assets/js/chunks/it-IT-4CFKVXI2-NMBWUWFF.js +12 -0
- package/public/assets/js/chunks/ja-JP-MAND2Z4V-GQZYXXOC.js +7 -0
- package/public/assets/js/chunks/javascript-NM7KDJUE.js +1 -0
- package/public/assets/js/chunks/journeyDiagram-4ABVD52K-FJ4LF4SX.js +139 -0
- package/public/assets/js/chunks/julia-LG3BH25B.js +1 -0
- package/public/assets/js/chunks/kaa-HQRTCXTJ-7D6PAKDJ.js +1 -0
- package/public/assets/js/chunks/kab-KAB-JKIKKTGH-TNKFXNAX.js +4 -0
- package/public/assets/js/chunks/kanban-definition-K7BYSVSG-TY4EVYI3.js +89 -0
- package/public/assets/js/chunks/katex-5YJCUCFD.js +261 -0
- package/public/assets/js/chunks/kk-KZ-HXQ63ZFC-T4HCMWED.js +1 -0
- package/public/assets/js/chunks/km-KH-PKL3LSGX-HTLHEJV6.js +7 -0
- package/public/assets/js/chunks/ko-KR-KXLREZX3-QMR52QVI.js +5 -0
- package/public/assets/js/chunks/ku-TR-MJ4IER3X-K5CNY4UO.js +6 -0
- package/public/assets/js/chunks/livescript-4CVWVI4M.js +1 -0
- package/public/assets/js/chunks/lt-LT-H6WFQ6FJ-IW25FAGX.js +3 -0
- package/public/assets/js/chunks/lua-VWGE7DQ7.js +1 -0
- package/public/assets/js/chunks/lv-LV-GOCK6SJW-KTDFW5OH.js +4 -0
- package/public/assets/js/chunks/mathematica-D7APQSEU.js +1 -0
- package/public/assets/js/chunks/mbox-BN3XQBYX.js +1 -0
- package/public/assets/js/chunks/mermaid-runtime-BIFNJ2CT.js +18 -0
- package/public/assets/js/chunks/mindmap-definition-YRQLILUH-5B565RNP.js +68 -0
- package/public/assets/js/chunks/mirc-565WBI76.js +1 -0
- package/public/assets/js/chunks/mllike-VV3KS46B.js +1 -0
- package/public/assets/js/chunks/modelica-EGX44FZV.js +1 -0
- package/public/assets/js/chunks/mr-IN-IXVLDMEQ-PHM5DT7Q.js +9 -0
- package/public/assets/js/chunks/mscgen-GFGTHENT.js +1 -0
- package/public/assets/js/chunks/mumps-POZYWSMI.js +1 -0
- package/public/assets/js/chunks/my-MM-YG6MYTTD-ZHLCMEVA.js +1 -0
- package/public/assets/js/chunks/nb-NO-XGWJISD2-KSDFG6YU.js +8 -0
- package/public/assets/js/chunks/nginx-JUBX55EU.js +1 -0
- package/public/assets/js/chunks/nl-NL-XVDVCPNC-KVF3ZO2R.js +13 -0
- package/public/assets/js/chunks/nn-NO-EMX5MJX5-34QKSHNR.js +4 -0
- package/public/assets/js/chunks/nsis-RC4CREGM.js +1 -0
- package/public/assets/js/chunks/ntriples-4WK6CNVE.js +1 -0
- package/public/assets/js/chunks/oc-FR-ROEINTVO-5GP4AOYO.js +4 -0
- package/public/assets/js/chunks/octave-GOKFN2V7.js +1 -0
- package/public/assets/js/chunks/oz-OQUMNC63.js +1 -0
- package/public/assets/js/chunks/pa-IN-ZYN6SUDY-MVL7O44W.js +4 -0
- package/public/assets/js/chunks/packet-RMMSAZCW-D7XTR5TT.js +1 -0
- package/public/assets/js/chunks/pascal-BBWQWWWD.js +1 -0
- package/public/assets/js/chunks/percentages-5DKR754L-DG7W23CV.js +1 -0
- package/public/assets/js/chunks/perl-KTPJTTAM.js +1 -0
- package/public/assets/js/chunks/pica-6G3NROWT.js +17 -0
- package/public/assets/js/chunks/pie-UPGHQEXC-KGC3O6LN.js +1 -0
- package/public/assets/js/chunks/pieDiagram-SKSYHLDU-KWKRDEZS.js +30 -0
- package/public/assets/js/chunks/pig-IJMBS4FZ.js +1 -0
- package/public/assets/js/chunks/pl-PL-6VTG7PHC-VADRWSX4.js +12 -0
- package/public/assets/js/chunks/powershell-6YGCBHDP.js +1 -0
- package/public/assets/js/chunks/preview-render-compiler-WD3A76I6.js +25 -0
- package/public/assets/js/chunks/properties-5QTD3364.js +1 -0
- package/public/assets/js/chunks/protobuf-LTRWBIK3.js +1 -0
- package/public/assets/js/chunks/pt-BR-5YFKRR5G-HHF4UPO4.js +6 -0
- package/public/assets/js/chunks/pt-PT-GEIXXZ67-TUTAUZJK.js +8 -0
- package/public/assets/js/chunks/pug-U4PV3WLG.js +1 -0
- package/public/assets/js/chunks/puppet-WGYJPR3Y.js +1 -0
- package/public/assets/js/chunks/python-6YGH4S47.js +1 -0
- package/public/assets/js/chunks/q-VIG4IJLI.js +1 -0
- package/public/assets/js/chunks/quadrantDiagram-337W2JSQ-GWQRUFHQ.js +7 -0
- package/public/assets/js/chunks/quick-switcher-controller-JYDIJVAJ.js +5 -0
- package/public/assets/js/chunks/r-NVPCXGTR.js +1 -0
- package/public/assets/js/chunks/radar-KQ55EAFF-OPO64DRI.js +1 -0
- package/public/assets/js/chunks/requirementDiagram-Z7DCOOCP-ASW7IPJL.js +73 -0
- package/public/assets/js/chunks/ro-RO-E2P6TFZI-RJFCULYF.js +12 -0
- package/public/assets/js/chunks/roundRect-Z3DX3W5S.js +1 -0
- package/public/assets/js/chunks/rpm-UEA257HD.js +1 -0
- package/public/assets/js/chunks/ru-RU-YBIIY43T-BF27TNVK.js +10 -0
- package/public/assets/js/chunks/ruby-KPQRAJGE.js +1 -0
- package/public/assets/js/chunks/sankeyDiagram-WA2Y5GQK-W6BBWCLW.js +10 -0
- package/public/assets/js/chunks/sas-L7VATVH5.js +1 -0
- package/public/assets/js/chunks/scheme-T2NOWR3P.js +1 -0
- package/public/assets/js/chunks/sequenceDiagram-2WXFIKYE-H4G3ISLN.js +145 -0
- package/public/assets/js/chunks/shell-DLVDUNFA.js +1 -0
- package/public/assets/js/chunks/si-LK-673C2CI2-IOFGU4U2.js +1 -0
- package/public/assets/js/chunks/sieve-BKBZYDBU.js +1 -0
- package/public/assets/js/chunks/sk-SK-CKZHQ4AP-6O5JGN26.js +7 -0
- package/public/assets/js/chunks/sl-SI-557H2GWM-2NEHLV7W.js +6 -0
- package/public/assets/js/chunks/smalltalk-WRJQKJSD.js +1 -0
- package/public/assets/js/chunks/solr-66B3BIDL.js +1 -0
- package/public/assets/js/chunks/sparql-S25Z47JG.js +1 -0
- package/public/assets/js/chunks/spreadsheet-B272EF7Y.js +1 -0
- package/public/assets/js/chunks/sql-BPLIIUYC.js +1 -0
- package/public/assets/js/chunks/stateDiagram-RAJIS63D-OF5XXRUS.js +1 -0
- package/public/assets/js/chunks/stateDiagram-v2-FVOUBMTO-IV2CSQSQ.js +1 -0
- package/public/assets/js/chunks/stex-4IJY64QX.js +1 -0
- package/public/assets/js/chunks/stylus-PJUHLGPT.js +1 -0
- package/public/assets/js/chunks/subset-shared.chunk-4NMWHS4D.js +1 -0
- package/public/assets/js/chunks/subset-worker.chunk-NTLP7Y66.js +1 -0
- package/public/assets/js/chunks/sv-SE-XOPKKDWS-Q2L6KGFV.js +8 -0
- package/public/assets/js/chunks/swift-UYHTO4SX.js +1 -0
- package/public/assets/js/chunks/ta-IN-XBH7DQI3-ISSUGZAK.js +6 -0
- package/public/assets/js/chunks/tcl-OQ5J3VO2.js +1 -0
- package/public/assets/js/chunks/textile-NOGVBEYF.js +1 -0
- package/public/assets/js/chunks/th-TH-TOCWH3R4-TABEAMJA.js +1 -0
- package/public/assets/js/chunks/tiddlywiki-SYTK4QUE.js +1 -0
- package/public/assets/js/chunks/tiki-P7K4ZLOM.js +1 -0
- package/public/assets/js/chunks/timeline-definition-YZTLITO2-HBCANIUC.js +61 -0
- package/public/assets/js/chunks/toml-AUZYRP36.js +1 -0
- package/public/assets/js/chunks/tr-TR-GXW6CYY5-5NQRN52Y.js +4 -0
- package/public/assets/js/chunks/treemap-KZPCXAKY-WYMCT5F7.js +1 -0
- package/public/assets/js/chunks/troff-XFYJNQOJ.js +1 -0
- package/public/assets/js/chunks/ttcn-AK2IXWU6.js +1 -0
- package/public/assets/js/chunks/ttcn-cfg-3IDPIYPU.js +1 -0
- package/public/assets/js/chunks/turtle-OIDMF46P.js +1 -0
- package/public/assets/js/chunks/uk-UA-IJKTNUDG-2IIL3TO5.js +6 -0
- package/public/assets/js/chunks/uz-UZ-TBZZEA4V-X22KVKBP.js +1 -0
- package/public/assets/js/chunks/vb-J6K4XVA2.js +1 -0
- package/public/assets/js/chunks/vbscript-FM7DDZZE.js +1 -0
- package/public/assets/js/chunks/velocity-6KZFEOFD.js +1 -0
- package/public/assets/js/chunks/vennDiagram-LZ73GAT5-EBRF3MZR.js +34 -0
- package/public/assets/js/chunks/verilog-EWWQPMNN.js +1 -0
- package/public/assets/js/chunks/vhdl-CJ3M4IHI.js +1 -0
- package/public/assets/js/chunks/vi-VN-MULSGNVB-TENM65C7.js +7 -0
- package/public/assets/js/chunks/webidl-XVBHXCRV.js +1 -0
- package/public/assets/js/chunks/xquery-7WZOZ4UK.js +1 -0
- package/public/assets/js/chunks/xychartDiagram-JWTSCODW-WIFVRQPR.js +7 -0
- package/public/assets/js/chunks/yacas-MZ2ZZPF3.js +1 -0
- package/public/assets/js/chunks/z80-I447CBF7.js +1 -0
- package/public/assets/js/chunks/zh-CN-MVX3E32U-S5VA2BA5.js +11 -0
- package/public/assets/js/chunks/zh-HK-JNU5RLIE-A4VUKZFV.js +1 -0
- package/public/assets/js/chunks/zh-TW-LENVCA6T-KFB6KHMM.js +9 -0
- package/public/assets/js/excalidraw-editor-7ORML5YA.css +1 -0
- package/public/assets/js/excalidraw-editor-LKW2AZBU.js +347 -0
- package/public/assets/js/excalidraw-editor.css +1 -0
- package/public/assets/js/excalidraw-editor.js +1 -0
- package/public/assets/js/main.js +354 -0
- package/public/assets/js/preview-render-worker.js +30 -0
- package/public/assets/vendor/highlight/github-dark.min.css +10 -0
- package/public/assets/vendor/highlight/github.min.css +10 -0
- package/public/excalidraw-editor.html +31 -0
- package/public/index.html +549 -0
- package/scripts/cloudflare-tunnel.mjs +145 -0
- package/scripts/local-plantuml-compose.mjs +92 -0
- package/server.js +1 -0
- package/src/client/application/app-shell/chat-feature.js +363 -0
- package/src/client/application/app-shell/comments-feature.js +33 -0
- package/src/client/application/app-shell/git-feature.js +394 -0
- package/src/client/application/app-shell/presence-feature.js +229 -0
- package/src/client/application/app-shell/ui-feature.js +535 -0
- package/src/client/application/app-shell/workspace-feature.js +132 -0
- package/src/client/application/app-shell-elements.js +78 -0
- package/src/client/application/diagram-preview-hydrator.js +382 -0
- package/src/client/application/file-open-lifecycle.js +26 -0
- package/src/client/application/mermaid-preview-hydrator.js +570 -0
- package/src/client/application/plantuml-preview-hydrator.js +563 -0
- package/src/client/application/preview-diagram-utils.js +223 -0
- package/src/client/application/preview-render-compiler.js +426 -0
- package/src/client/application/preview-render-executor.js +153 -0
- package/src/client/application/preview-render-profile.js +63 -0
- package/src/client/application/preview-render-scheduler.js +73 -0
- package/src/client/application/preview-render-worker.js +19 -0
- package/src/client/application/preview-renderer.js +452 -0
- package/src/client/application/wiki-link-file-controller.js +58 -0
- package/src/client/application/workspace-chrome-controller.js +84 -0
- package/src/client/application/workspace-coordinator.js +238 -0
- package/src/client/application/workspace-preview-controller.js +237 -0
- package/src/client/application/workspace-route-controller.js +170 -0
- package/src/client/application/workspace-state-store.js +46 -0
- package/src/client/bootstrap/collabmd-app-shell.js +479 -0
- package/src/client/domain/diagram-action-icons.js +41 -0
- package/src/client/domain/excalidraw-collaboration.js +153 -0
- package/src/client/domain/excalidraw-scene.js +87 -0
- package/src/client/domain/markdown-formatting.js +370 -0
- package/src/client/domain/plantuml-language.js +226 -0
- package/src/client/domain/room.js +49 -0
- package/src/client/domain/runtime-paths.js +136 -0
- package/src/client/domain/vault-api-client.js +1 -0
- package/src/client/domain/vault-paths.js +80 -0
- package/src/client/domain/vault-utils.js +49 -0
- package/src/client/domain/wiki-link-completions.js +78 -0
- package/src/client/excalidraw-editor.js +630 -0
- package/src/client/excalidraw-mermaid-stub.js +7 -0
- package/src/client/infrastructure/auth-client.js +383 -0
- package/src/client/infrastructure/browser-navigation-port.js +19 -0
- package/src/client/infrastructure/browser-notification-port.js +40 -0
- package/src/client/infrastructure/browser-preferences-port.js +79 -0
- package/src/client/infrastructure/comment-thread-store.js +293 -0
- package/src/client/infrastructure/editor-collaboration-client.js +240 -0
- package/src/client/infrastructure/editor-session.js +255 -0
- package/src/client/infrastructure/editor-view-adapter.js +578 -0
- package/src/client/infrastructure/excalidraw-room-client.js +651 -0
- package/src/client/infrastructure/lobby-presence.js +304 -0
- package/src/client/infrastructure/runtime-config.js +65 -0
- package/src/client/infrastructure/tab-activity-lock.js +193 -0
- package/src/client/infrastructure/vault-api-client.js +61 -0
- package/src/client/infrastructure/yjs-provider-reset-guard.js +19 -0
- package/src/client/main.js +16 -0
- package/src/client/mermaid-runtime.js +3 -0
- package/src/client/presentation/backlinks-panel.js +188 -0
- package/src/client/presentation/comment-ui-controller.js +1235 -0
- package/src/client/presentation/comments-panel.js +531 -0
- package/src/client/presentation/excalidraw-embed-controller.js +968 -0
- package/src/client/presentation/excalidraw-embed-reconciler.js +37 -0
- package/src/client/presentation/file-action-controller.js +596 -0
- package/src/client/presentation/file-explorer-controller.js +81 -0
- package/src/client/presentation/file-explorer-view.js +256 -0
- package/src/client/presentation/file-tree-state.js +77 -0
- package/src/client/presentation/git-diff-view-controller.js +656 -0
- package/src/client/presentation/git-panel-controller.js +516 -0
- package/src/client/presentation/layout-controller.js +222 -0
- package/src/client/presentation/outline-controller.js +239 -0
- package/src/client/presentation/quick-switcher-controller.js +300 -0
- package/src/client/presentation/scroll-sync-controller.js +500 -0
- package/src/client/presentation/theme-controller.js +64 -0
- package/src/client/presentation/toast-controller.js +21 -0
- package/src/client/presentation/video-embed-controller.js +264 -0
- package/src/client/styles/base.css +58 -0
- package/src/client/styles/style.css +4245 -0
- package/src/domain/comment-threads.js +233 -0
- package/src/domain/excalidraw-room-codec.js +427 -0
- package/src/domain/file-kind.js +104 -0
- package/src/domain/wiki-link-resolver.js +75 -0
- package/src/server/auth/create-auth-service.js +272 -0
- package/src/server/auth/session-cookie.js +125 -0
- package/src/server/config/env.js +186 -0
- package/src/server/create-app-server.js +143 -0
- package/src/server/domain/backlink-index.js +291 -0
- package/src/server/domain/collaboration/collaboration-document-store.js +155 -0
- package/src/server/domain/collaboration/collaboration-room.js +603 -0
- package/src/server/domain/collaboration/protocol.js +2 -0
- package/src/server/domain/collaboration/room-client-state-store.js +28 -0
- package/src/server/domain/collaboration/room-persistence-controller.js +80 -0
- package/src/server/domain/collaboration/room-registry.js +94 -0
- package/src/server/domain/git-service.js +1 -0
- package/src/server/domain/plantuml-encoder.js +49 -0
- package/src/server/domain/plantuml-renderer.js +1 -0
- package/src/server/index.js +72 -0
- package/src/server/infrastructure/git/command-runner.js +48 -0
- package/src/server/infrastructure/git/concurrency.js +19 -0
- package/src/server/infrastructure/git/diff-service.js +389 -0
- package/src/server/infrastructure/git/errors.js +5 -0
- package/src/server/infrastructure/git/git-service.js +216 -0
- package/src/server/infrastructure/git/parsers.js +401 -0
- package/src/server/infrastructure/git/path-utils.js +65 -0
- package/src/server/infrastructure/git/responses.js +108 -0
- package/src/server/infrastructure/git/status-service.js +99 -0
- package/src/server/infrastructure/git/untracked-files.js +101 -0
- package/src/server/infrastructure/http/create-auth-api-handler.js +48 -0
- package/src/server/infrastructure/http/create-esm-proxy-handler.js +130 -0
- package/src/server/infrastructure/http/create-git-api-command-handler.js +170 -0
- package/src/server/infrastructure/http/create-git-api-handler.js +40 -0
- package/src/server/infrastructure/http/create-git-api-query-handler.js +62 -0
- package/src/server/infrastructure/http/create-plantuml-api-handler.js +43 -0
- package/src/server/infrastructure/http/create-request-handler.js +138 -0
- package/src/server/infrastructure/http/create-static-handler.js +167 -0
- package/src/server/infrastructure/http/create-vault-api-command-handler.js +161 -0
- package/src/server/infrastructure/http/create-vault-api-handler.js +43 -0
- package/src/server/infrastructure/http/create-vault-api-query-handler.js +82 -0
- package/src/server/infrastructure/http/http-errors.js +13 -0
- package/src/server/infrastructure/http/http-response.js +167 -0
- package/src/server/infrastructure/http/request-body.js +56 -0
- package/src/server/infrastructure/persistence/path-utils.js +90 -0
- package/src/server/infrastructure/persistence/sidecar-store.js +150 -0
- package/src/server/infrastructure/persistence/vault-content-adapter.js +49 -0
- package/src/server/infrastructure/persistence/vault-file-store.js +435 -0
- package/src/server/infrastructure/plantuml/plantuml-renderer.js +56 -0
- package/src/server/infrastructure/websocket/attach-collaboration-gateway.js +194 -0
- package/src/server/infrastructure/websocket/client-socket-session.js +151 -0
- package/src/server/startup/git-remote-bootstrap.js +435 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export function reconcileEmbedEntries(currentEntries, placeholderDescriptors) {
|
|
2
|
+
const nextEntries = new Map();
|
|
3
|
+
|
|
4
|
+
placeholderDescriptors.forEach((descriptor) => {
|
|
5
|
+
const existing = currentEntries.get(descriptor.key);
|
|
6
|
+
const entry = existing ?? {
|
|
7
|
+
filePath: descriptor.filePath,
|
|
8
|
+
iframe: null,
|
|
9
|
+
instanceId: null,
|
|
10
|
+
key: descriptor.key,
|
|
11
|
+
label: descriptor.label,
|
|
12
|
+
placeholder: descriptor.placeholder,
|
|
13
|
+
queued: false,
|
|
14
|
+
reusedFromEmbed: false,
|
|
15
|
+
wrapper: null,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
entry.filePath = descriptor.filePath;
|
|
19
|
+
entry.key = descriptor.key;
|
|
20
|
+
entry.label = descriptor.label;
|
|
21
|
+
entry.placeholder = descriptor.placeholder;
|
|
22
|
+
|
|
23
|
+
nextEntries.set(descriptor.key, entry);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const removedEntries = [];
|
|
27
|
+
currentEntries.forEach((entry, key) => {
|
|
28
|
+
if (!nextEntries.has(key)) {
|
|
29
|
+
removedEntries.push(entry);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
nextEntries,
|
|
35
|
+
removedEntries,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getVaultFileExtension,
|
|
3
|
+
stripVaultFileExtension,
|
|
4
|
+
} from '../../domain/file-kind.js';
|
|
5
|
+
import {
|
|
6
|
+
composeVaultChildPath,
|
|
7
|
+
createMarkdownStarter,
|
|
8
|
+
createMermaidStarter,
|
|
9
|
+
createPlantUmlStarter,
|
|
10
|
+
ensureVaultExtension,
|
|
11
|
+
normalizeVaultPathInput,
|
|
12
|
+
} from '../domain/vault-paths.js';
|
|
13
|
+
|
|
14
|
+
function getPathLeaf(path) {
|
|
15
|
+
return String(path ?? '')
|
|
16
|
+
.replace(/\/+$/u, '')
|
|
17
|
+
.split('/')
|
|
18
|
+
.filter(Boolean)
|
|
19
|
+
.pop() || '';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function createEmptyExcalidrawScene() {
|
|
23
|
+
return JSON.stringify({
|
|
24
|
+
type: 'excalidraw',
|
|
25
|
+
version: 2,
|
|
26
|
+
source: 'collabmd',
|
|
27
|
+
elements: [],
|
|
28
|
+
appState: { viewBackgroundColor: '#ffffff', gridSize: null },
|
|
29
|
+
files: {},
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export class FileActionController {
|
|
34
|
+
constructor({
|
|
35
|
+
onFileDelete,
|
|
36
|
+
onFileSelect,
|
|
37
|
+
state,
|
|
38
|
+
toastController,
|
|
39
|
+
vaultClient,
|
|
40
|
+
view,
|
|
41
|
+
refresh,
|
|
42
|
+
}) {
|
|
43
|
+
this.onFileDelete = onFileDelete;
|
|
44
|
+
this.onFileSelect = onFileSelect;
|
|
45
|
+
this.state = state;
|
|
46
|
+
this.toastController = toastController;
|
|
47
|
+
this.vaultClient = vaultClient;
|
|
48
|
+
this.view = view;
|
|
49
|
+
this.refresh = refresh;
|
|
50
|
+
this.newFileButton = document.getElementById('newFileBtn');
|
|
51
|
+
this.newDrawingButton = document.getElementById('newDrawingBtn');
|
|
52
|
+
this.newMermaidButton = document.getElementById('newMermaidBtn');
|
|
53
|
+
this.newPlantumlButton = document.getElementById('newPlantumlBtn');
|
|
54
|
+
this.newFolderButton = document.getElementById('newFolderBtn');
|
|
55
|
+
this.refreshButton = document.getElementById('refreshFilesBtn');
|
|
56
|
+
this.actionDialog = document.getElementById('fileActionDialog');
|
|
57
|
+
this.actionForm = document.getElementById('fileActionForm');
|
|
58
|
+
this.actionTitle = document.getElementById('fileActionTitle');
|
|
59
|
+
this.actionCopy = document.getElementById('fileActionCopy');
|
|
60
|
+
this.actionField = document.getElementById('fileActionField');
|
|
61
|
+
this.actionLabel = document.getElementById('fileActionLabel');
|
|
62
|
+
this.actionInput = document.getElementById('fileActionInput');
|
|
63
|
+
this.actionHint = document.getElementById('fileActionHint');
|
|
64
|
+
this.actionNote = document.getElementById('fileActionNote');
|
|
65
|
+
this.actionCancelButton = document.getElementById('fileActionCancel');
|
|
66
|
+
this.actionSubmitButton = document.getElementById('fileActionSubmit');
|
|
67
|
+
this.pendingAction = null;
|
|
68
|
+
this.actionBusy = false;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
initialize() {
|
|
72
|
+
this.newFileButton?.addEventListener('click', () => this.handleNewFile());
|
|
73
|
+
this.newDrawingButton?.addEventListener('click', () => this.handleNewDrawing());
|
|
74
|
+
this.newMermaidButton?.addEventListener('click', () => this.handleNewMermaid());
|
|
75
|
+
this.newPlantumlButton?.addEventListener('click', () => this.handleNewPlantUml());
|
|
76
|
+
this.newFolderButton?.addEventListener('click', () => this.handleNewFolder());
|
|
77
|
+
this.refreshButton?.addEventListener('click', () => this.refresh());
|
|
78
|
+
this.actionCancelButton?.addEventListener('click', () => this.closeActionDialog());
|
|
79
|
+
this.actionForm?.addEventListener('submit', (event) => {
|
|
80
|
+
event.preventDefault();
|
|
81
|
+
void this.handleActionSubmit();
|
|
82
|
+
});
|
|
83
|
+
this.actionDialog?.addEventListener('close', () => this.resetActionDialog());
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
createContextMenuItems(parentDir = '') {
|
|
87
|
+
return [
|
|
88
|
+
{
|
|
89
|
+
label: 'New markdown file',
|
|
90
|
+
onSelect: () => this.handleNewFile({ parentDir }),
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
label: 'New Excalidraw drawing',
|
|
94
|
+
onSelect: () => this.handleNewDrawing({ parentDir }),
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: 'New Mermaid diagram',
|
|
98
|
+
onSelect: () => this.handleNewMermaid({ parentDir }),
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: 'New PlantUML diagram',
|
|
102
|
+
onSelect: () => this.handleNewPlantUml({ parentDir }),
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
label: 'New folder',
|
|
106
|
+
onSelect: () => this.handleNewFolder({ parentDir }),
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
getFileContextMenuItems(filePath) {
|
|
112
|
+
return [
|
|
113
|
+
{
|
|
114
|
+
label: 'Rename',
|
|
115
|
+
onSelect: () => this.handleRename(filePath),
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: 'Delete',
|
|
119
|
+
danger: true,
|
|
120
|
+
onSelect: () => this.handleDelete(filePath),
|
|
121
|
+
},
|
|
122
|
+
];
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
showToast(message) {
|
|
126
|
+
if (message) {
|
|
127
|
+
this.toastController?.show(String(message));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
showError(message, error) {
|
|
132
|
+
this.showToast(error?.message ? `${message}: ${error.message}` : message);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
ensureExtension(pathValue, extension) {
|
|
136
|
+
return ensureVaultExtension(pathValue, extension);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
openActionDialog({
|
|
140
|
+
title,
|
|
141
|
+
copy,
|
|
142
|
+
label = 'Path',
|
|
143
|
+
hint = '',
|
|
144
|
+
note = '',
|
|
145
|
+
placeholder = '',
|
|
146
|
+
value = '',
|
|
147
|
+
submitLabel = 'Save',
|
|
148
|
+
destructive = false,
|
|
149
|
+
requiresInput = true,
|
|
150
|
+
emptyMessage = 'A value is required',
|
|
151
|
+
onSubmit,
|
|
152
|
+
}) {
|
|
153
|
+
if (!this.actionDialog || !this.actionTitle || !this.actionCopy || !this.actionSubmitButton || !this.actionCancelButton) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (requiresInput && !this.actionInput) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (this.actionDialog.open) {
|
|
162
|
+
if (typeof this.actionDialog.close === 'function') {
|
|
163
|
+
this.actionDialog.close();
|
|
164
|
+
} else {
|
|
165
|
+
this.actionDialog.removeAttribute('open');
|
|
166
|
+
this.resetActionDialog();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
this.pendingAction = { requiresInput, emptyMessage, onSubmit };
|
|
171
|
+
this.view?.removeContextMenu?.();
|
|
172
|
+
|
|
173
|
+
this.actionTitle.textContent = title;
|
|
174
|
+
this.actionCopy.textContent = copy;
|
|
175
|
+
|
|
176
|
+
if (this.actionField) {
|
|
177
|
+
this.actionField.hidden = !requiresInput;
|
|
178
|
+
}
|
|
179
|
+
if (this.actionLabel) {
|
|
180
|
+
this.actionLabel.textContent = label;
|
|
181
|
+
}
|
|
182
|
+
if (this.actionInput) {
|
|
183
|
+
this.actionInput.value = value;
|
|
184
|
+
this.actionInput.placeholder = placeholder;
|
|
185
|
+
this.actionInput.required = requiresInput;
|
|
186
|
+
this.actionInput.disabled = false;
|
|
187
|
+
}
|
|
188
|
+
if (this.actionHint) {
|
|
189
|
+
this.actionHint.textContent = hint;
|
|
190
|
+
this.actionHint.hidden = !requiresInput || !hint;
|
|
191
|
+
}
|
|
192
|
+
if (this.actionNote) {
|
|
193
|
+
this.actionNote.textContent = note;
|
|
194
|
+
this.actionNote.hidden = !note;
|
|
195
|
+
this.actionNote.classList.toggle('is-danger', destructive);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
this.actionSubmitButton.textContent = submitLabel;
|
|
199
|
+
this.actionSubmitButton.disabled = false;
|
|
200
|
+
this.actionSubmitButton.classList.toggle('btn-primary', !destructive);
|
|
201
|
+
this.actionSubmitButton.classList.toggle('btn-danger', destructive);
|
|
202
|
+
this.actionCancelButton.disabled = false;
|
|
203
|
+
|
|
204
|
+
if (typeof this.actionDialog.showModal === 'function') {
|
|
205
|
+
this.actionDialog.showModal();
|
|
206
|
+
} else {
|
|
207
|
+
this.actionDialog.setAttribute('open', 'true');
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
requestAnimationFrame(() => {
|
|
211
|
+
if (!requiresInput || !this.actionInput) {
|
|
212
|
+
this.actionSubmitButton.focus();
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
this.actionInput.focus();
|
|
217
|
+
if (value) {
|
|
218
|
+
this.actionInput.select();
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
resetActionDialog() {
|
|
224
|
+
this.pendingAction = null;
|
|
225
|
+
this.actionBusy = false;
|
|
226
|
+
|
|
227
|
+
if (this.actionField) {
|
|
228
|
+
this.actionField.hidden = false;
|
|
229
|
+
}
|
|
230
|
+
if (this.actionLabel) {
|
|
231
|
+
this.actionLabel.textContent = 'Path';
|
|
232
|
+
}
|
|
233
|
+
if (this.actionInput) {
|
|
234
|
+
this.actionInput.value = '';
|
|
235
|
+
this.actionInput.placeholder = '';
|
|
236
|
+
this.actionInput.required = true;
|
|
237
|
+
this.actionInput.disabled = false;
|
|
238
|
+
}
|
|
239
|
+
if (this.actionHint) {
|
|
240
|
+
this.actionHint.textContent = '';
|
|
241
|
+
this.actionHint.hidden = true;
|
|
242
|
+
}
|
|
243
|
+
if (this.actionNote) {
|
|
244
|
+
this.actionNote.textContent = '';
|
|
245
|
+
this.actionNote.hidden = true;
|
|
246
|
+
this.actionNote.classList.remove('is-danger');
|
|
247
|
+
}
|
|
248
|
+
if (this.actionSubmitButton) {
|
|
249
|
+
this.actionSubmitButton.textContent = 'Save';
|
|
250
|
+
this.actionSubmitButton.disabled = false;
|
|
251
|
+
this.actionSubmitButton.classList.add('btn-primary');
|
|
252
|
+
this.actionSubmitButton.classList.remove('btn-danger');
|
|
253
|
+
}
|
|
254
|
+
if (this.actionCancelButton) {
|
|
255
|
+
this.actionCancelButton.disabled = false;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
closeActionDialog() {
|
|
260
|
+
if (!this.actionDialog) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (this.actionDialog.open && typeof this.actionDialog.close === 'function') {
|
|
265
|
+
this.actionDialog.close();
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
this.actionDialog.removeAttribute('open');
|
|
270
|
+
this.resetActionDialog();
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
setActionDialogBusy(isBusy) {
|
|
274
|
+
this.actionBusy = isBusy;
|
|
275
|
+
|
|
276
|
+
if (this.actionInput) {
|
|
277
|
+
this.actionInput.disabled = isBusy || !(this.pendingAction?.requiresInput ?? true);
|
|
278
|
+
}
|
|
279
|
+
if (this.actionCancelButton) {
|
|
280
|
+
this.actionCancelButton.disabled = isBusy;
|
|
281
|
+
}
|
|
282
|
+
if (this.actionSubmitButton) {
|
|
283
|
+
this.actionSubmitButton.disabled = isBusy;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
async handleActionSubmit() {
|
|
288
|
+
if (!this.pendingAction?.onSubmit || this.actionBusy) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const requiresInput = this.pendingAction.requiresInput;
|
|
293
|
+
const rawValue = requiresInput ? this.actionInput?.value.trim() ?? '' : undefined;
|
|
294
|
+
|
|
295
|
+
if (requiresInput && !rawValue) {
|
|
296
|
+
this.showToast(this.pendingAction.emptyMessage);
|
|
297
|
+
this.actionInput?.focus();
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
this.setActionDialogBusy(true);
|
|
302
|
+
|
|
303
|
+
let shouldClose = false;
|
|
304
|
+
try {
|
|
305
|
+
shouldClose = await this.pendingAction.onSubmit(rawValue);
|
|
306
|
+
} catch (error) {
|
|
307
|
+
shouldClose = false;
|
|
308
|
+
this.showError('Failed to complete action', error);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
this.setActionDialogBusy(false);
|
|
312
|
+
|
|
313
|
+
if (shouldClose !== false) {
|
|
314
|
+
this.closeActionDialog();
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
if (requiresInput && this.actionInput) {
|
|
319
|
+
this.actionInput.focus();
|
|
320
|
+
this.actionInput.select();
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
async createVaultFile(filePath, content, { openAfterCreate = false, errorMessage = 'Failed to create file' } = {}) {
|
|
325
|
+
try {
|
|
326
|
+
await this.vaultClient.createFile({ content, path: filePath });
|
|
327
|
+
this.state.expandDirectoryPath(filePath, { includeLeaf: false });
|
|
328
|
+
await this.refresh();
|
|
329
|
+
|
|
330
|
+
if (openAfterCreate) {
|
|
331
|
+
this.onFileSelect?.(filePath);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
return true;
|
|
335
|
+
} catch (error) {
|
|
336
|
+
this.showToast(error?.message || errorMessage);
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
async createDirectory(pathValue) {
|
|
342
|
+
const directoryPath = normalizeVaultPathInput(pathValue);
|
|
343
|
+
if (!directoryPath) {
|
|
344
|
+
this.showToast('Folder path is required');
|
|
345
|
+
return false;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
try {
|
|
349
|
+
await this.vaultClient.createDirectory(directoryPath);
|
|
350
|
+
this.state.expandDirectoryPath(directoryPath);
|
|
351
|
+
await this.refresh();
|
|
352
|
+
return true;
|
|
353
|
+
} catch (error) {
|
|
354
|
+
this.showToast(error?.message || 'Failed to create folder');
|
|
355
|
+
return false;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
async renameVaultFile(filePath, nextName, extension) {
|
|
360
|
+
const normalizedName = String(nextName ?? '').trim();
|
|
361
|
+
if (!normalizedName) {
|
|
362
|
+
this.showToast('File name is required');
|
|
363
|
+
return false;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
if (/[\\/]/u.test(normalizedName)) {
|
|
367
|
+
this.showToast('Rename only supports the file name right now');
|
|
368
|
+
return false;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
const baseName = stripVaultFileExtension(normalizedName).trim();
|
|
372
|
+
if (!baseName) {
|
|
373
|
+
this.showToast('File name is required');
|
|
374
|
+
return false;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
const dir = filePath.includes('/') ? filePath.substring(0, filePath.lastIndexOf('/') + 1) : '';
|
|
378
|
+
const newPath = `${dir}${baseName}${extension}`;
|
|
379
|
+
|
|
380
|
+
if (newPath === filePath) {
|
|
381
|
+
return true;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
try {
|
|
385
|
+
await this.vaultClient.renameFile({ newPath, oldPath: filePath });
|
|
386
|
+
this.state.expandDirectoryPath(newPath, { includeLeaf: false });
|
|
387
|
+
await this.refresh();
|
|
388
|
+
|
|
389
|
+
if (this.state.activeFilePath === filePath) {
|
|
390
|
+
this.state.activeFilePath = newPath;
|
|
391
|
+
this.onFileSelect?.(newPath);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
return true;
|
|
395
|
+
} catch (error) {
|
|
396
|
+
this.showToast(error?.message || 'Failed to rename');
|
|
397
|
+
return false;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
async deleteVaultFile(filePath) {
|
|
402
|
+
try {
|
|
403
|
+
await this.vaultClient.deleteFile(filePath);
|
|
404
|
+
await this.refresh();
|
|
405
|
+
|
|
406
|
+
if (this.state.activeFilePath === filePath) {
|
|
407
|
+
this.state.activeFilePath = null;
|
|
408
|
+
this.onFileDelete?.(filePath);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
return true;
|
|
412
|
+
} catch (error) {
|
|
413
|
+
this.showToast(error?.message || 'Failed to delete');
|
|
414
|
+
return false;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
getCreateContext(parentDir = '') {
|
|
419
|
+
const normalizedParentDir = normalizeVaultPathInput(parentDir);
|
|
420
|
+
|
|
421
|
+
return {
|
|
422
|
+
hintPrefix: normalizedParentDir
|
|
423
|
+
? 'Use "/" to create nested items under this folder.'
|
|
424
|
+
: 'Use "/" to place it inside a folder.',
|
|
425
|
+
inputLabelSuffix: normalizedParentDir ? 'name or path' : 'path',
|
|
426
|
+
note: normalizedParentDir ? `Parent folder: ${normalizedParentDir}` : '',
|
|
427
|
+
normalizedParentDir,
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
handleNewFile({ parentDir = '' } = {}) {
|
|
432
|
+
const context = this.getCreateContext(parentDir);
|
|
433
|
+
|
|
434
|
+
this.openActionDialog({
|
|
435
|
+
title: 'Create markdown file',
|
|
436
|
+
copy: context.normalizedParentDir
|
|
437
|
+
? 'Add a new note inside the selected folder. It opens immediately after creation.'
|
|
438
|
+
: 'Add a new note to the vault. It opens immediately after creation.',
|
|
439
|
+
label: `File ${context.inputLabelSuffix}`,
|
|
440
|
+
hint: `${context.hintPrefix} ".md" is added automatically.`,
|
|
441
|
+
note: context.note,
|
|
442
|
+
placeholder: context.normalizedParentDir ? 'my-note' : 'notes/my-note',
|
|
443
|
+
submitLabel: 'Create file',
|
|
444
|
+
emptyMessage: 'File path is required',
|
|
445
|
+
onSubmit: (value) => {
|
|
446
|
+
const normalizedPath = normalizeVaultPathInput(value);
|
|
447
|
+
if (!normalizedPath) {
|
|
448
|
+
this.showToast('File path is required');
|
|
449
|
+
return false;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
const filePath = this.ensureExtension(composeVaultChildPath(context.normalizedParentDir, normalizedPath), '.md');
|
|
453
|
+
return this.createVaultFile(filePath, createMarkdownStarter(filePath), {
|
|
454
|
+
errorMessage: 'Failed to create file',
|
|
455
|
+
openAfterCreate: true,
|
|
456
|
+
});
|
|
457
|
+
},
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
handleNewFolder({ parentDir = '' } = {}) {
|
|
462
|
+
const context = this.getCreateContext(parentDir);
|
|
463
|
+
|
|
464
|
+
this.openActionDialog({
|
|
465
|
+
title: 'Create folder',
|
|
466
|
+
copy: context.normalizedParentDir
|
|
467
|
+
? 'Add a new folder inside the selected folder.'
|
|
468
|
+
: 'Add a new folder to organize notes and diagrams.',
|
|
469
|
+
label: `Folder ${context.inputLabelSuffix}`,
|
|
470
|
+
hint: context.hintPrefix,
|
|
471
|
+
note: context.note,
|
|
472
|
+
placeholder: context.normalizedParentDir ? 'archive' : 'notes/archive',
|
|
473
|
+
submitLabel: 'Create folder',
|
|
474
|
+
emptyMessage: 'Folder path is required',
|
|
475
|
+
onSubmit: (value) => this.createDirectory(composeVaultChildPath(context.normalizedParentDir, value)),
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
handleNewDrawing({ parentDir = '' } = {}) {
|
|
480
|
+
const context = this.getCreateContext(parentDir);
|
|
481
|
+
|
|
482
|
+
this.openActionDialog({
|
|
483
|
+
title: 'Create Excalidraw drawing',
|
|
484
|
+
copy: context.normalizedParentDir
|
|
485
|
+
? 'Start a new drawing inside the selected folder.'
|
|
486
|
+
: 'Start a new drawing file in the vault.',
|
|
487
|
+
label: `Drawing ${context.inputLabelSuffix}`,
|
|
488
|
+
hint: `${context.hintPrefix} ".excalidraw" is added automatically.`,
|
|
489
|
+
note: context.note,
|
|
490
|
+
placeholder: context.normalizedParentDir ? 'architecture' : 'diagrams/architecture',
|
|
491
|
+
submitLabel: 'Create drawing',
|
|
492
|
+
emptyMessage: 'Drawing path is required',
|
|
493
|
+
onSubmit: (value) => {
|
|
494
|
+
const normalizedPath = normalizeVaultPathInput(value);
|
|
495
|
+
if (!normalizedPath) {
|
|
496
|
+
this.showToast('Drawing path is required');
|
|
497
|
+
return false;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
const filePath = this.ensureExtension(composeVaultChildPath(context.normalizedParentDir, normalizedPath), '.excalidraw');
|
|
501
|
+
return this.createVaultFile(filePath, createEmptyExcalidrawScene(), {
|
|
502
|
+
errorMessage: 'Failed to create drawing',
|
|
503
|
+
openAfterCreate: true,
|
|
504
|
+
});
|
|
505
|
+
},
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
handleNewMermaid({ parentDir = '' } = {}) {
|
|
510
|
+
const context = this.getCreateContext(parentDir);
|
|
511
|
+
|
|
512
|
+
this.openActionDialog({
|
|
513
|
+
title: 'Create Mermaid diagram',
|
|
514
|
+
copy: context.normalizedParentDir
|
|
515
|
+
? 'Create a new `.mmd` or `.mermaid` file inside the selected folder.'
|
|
516
|
+
: 'Create a new `.mmd` or `.mermaid` file with starter diagram content.',
|
|
517
|
+
label: `Diagram ${context.inputLabelSuffix}`,
|
|
518
|
+
hint: `${context.hintPrefix} ".mmd" is added automatically unless you enter ".mermaid".`,
|
|
519
|
+
note: context.note,
|
|
520
|
+
placeholder: context.normalizedParentDir ? 'flow' : 'diagrams/flow',
|
|
521
|
+
submitLabel: 'Create diagram',
|
|
522
|
+
emptyMessage: 'Diagram path is required',
|
|
523
|
+
onSubmit: (value) => {
|
|
524
|
+
const normalizedPath = normalizeVaultPathInput(value);
|
|
525
|
+
if (!normalizedPath) {
|
|
526
|
+
this.showToast('Diagram path is required');
|
|
527
|
+
return false;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
const starter = createMermaidStarter(composeVaultChildPath(context.normalizedParentDir, normalizedPath));
|
|
531
|
+
return this.createVaultFile(starter.path, starter.content, {
|
|
532
|
+
errorMessage: 'Failed to create Mermaid diagram',
|
|
533
|
+
openAfterCreate: true,
|
|
534
|
+
});
|
|
535
|
+
},
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
handleNewPlantUml({ parentDir = '' } = {}) {
|
|
540
|
+
const context = this.getCreateContext(parentDir);
|
|
541
|
+
|
|
542
|
+
this.openActionDialog({
|
|
543
|
+
title: 'Create PlantUML diagram',
|
|
544
|
+
copy: context.normalizedParentDir
|
|
545
|
+
? 'Create a new `.puml` or `.plantuml` file inside the selected folder.'
|
|
546
|
+
: 'Create a new `.puml` or `.plantuml` file with starter diagram content.',
|
|
547
|
+
label: `Diagram ${context.inputLabelSuffix}`,
|
|
548
|
+
hint: `${context.hintPrefix} ".puml" is added automatically unless you enter ".plantuml".`,
|
|
549
|
+
note: context.note,
|
|
550
|
+
placeholder: context.normalizedParentDir ? 'sequence-flow' : 'diagrams/sequence-flow',
|
|
551
|
+
submitLabel: 'Create diagram',
|
|
552
|
+
emptyMessage: 'Diagram path is required',
|
|
553
|
+
onSubmit: (value) => {
|
|
554
|
+
const normalizedPath = normalizeVaultPathInput(value);
|
|
555
|
+
if (!normalizedPath) {
|
|
556
|
+
this.showToast('Diagram path is required');
|
|
557
|
+
return false;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
const starter = createPlantUmlStarter(composeVaultChildPath(context.normalizedParentDir, normalizedPath));
|
|
561
|
+
return this.createVaultFile(starter.path, starter.content, {
|
|
562
|
+
errorMessage: 'Failed to create PlantUML diagram',
|
|
563
|
+
openAfterCreate: true,
|
|
564
|
+
});
|
|
565
|
+
},
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
handleRename(filePath) {
|
|
570
|
+
const currentName = getPathLeaf(filePath);
|
|
571
|
+
const extension = getVaultFileExtension(currentName) ?? '.md';
|
|
572
|
+
|
|
573
|
+
this.openActionDialog({
|
|
574
|
+
title: 'Rename file',
|
|
575
|
+
copy: 'Update the file name without changing its current type.',
|
|
576
|
+
label: 'Name',
|
|
577
|
+
hint: `${extension} is kept automatically.`,
|
|
578
|
+
value: stripVaultFileExtension(currentName),
|
|
579
|
+
submitLabel: 'Rename file',
|
|
580
|
+
emptyMessage: 'File name is required',
|
|
581
|
+
onSubmit: (value) => this.renameVaultFile(filePath, value, extension),
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
handleDelete(filePath) {
|
|
586
|
+
this.openActionDialog({
|
|
587
|
+
title: 'Delete file',
|
|
588
|
+
copy: 'This permanently removes the file from the vault.',
|
|
589
|
+
note: filePath,
|
|
590
|
+
submitLabel: 'Delete file',
|
|
591
|
+
destructive: true,
|
|
592
|
+
requiresInput: false,
|
|
593
|
+
onSubmit: () => this.deleteVaultFile(filePath),
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { vaultApiClient } from '../domain/vault-api-client.js';
|
|
2
|
+
import { FileActionController } from './file-action-controller.js';
|
|
3
|
+
import { FileTreeState } from './file-tree-state.js';
|
|
4
|
+
import { FileExplorerView } from './file-explorer-view.js';
|
|
5
|
+
|
|
6
|
+
export class FileExplorerController {
|
|
7
|
+
constructor({ onFileSelect, onFileDelete, toastController, vaultClient = vaultApiClient }) {
|
|
8
|
+
this.onFileSelect = onFileSelect;
|
|
9
|
+
this.onFileDelete = onFileDelete;
|
|
10
|
+
this.toastController = toastController;
|
|
11
|
+
this.vaultClient = vaultClient;
|
|
12
|
+
this.state = new FileTreeState();
|
|
13
|
+
this.view = new FileExplorerView({
|
|
14
|
+
onDirectoryToggle: (pathValue) => {
|
|
15
|
+
this.state.toggleDirectory(pathValue);
|
|
16
|
+
this.renderTree();
|
|
17
|
+
},
|
|
18
|
+
onFileContextMenu: (event, payload) => {
|
|
19
|
+
if (payload.type === 'directory') {
|
|
20
|
+
this.view.showContextMenu(event, this.actionController.createContextMenuItems(payload.directoryPath));
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
this.view.showContextMenu(event, this.actionController.getFileContextMenuItems(payload.filePath));
|
|
25
|
+
},
|
|
26
|
+
onFileSelect: (filePath) => {
|
|
27
|
+
this.onFileSelect?.(filePath);
|
|
28
|
+
},
|
|
29
|
+
onSearchChange: (value) => {
|
|
30
|
+
this.state.setSearchQuery(value);
|
|
31
|
+
this.renderTree();
|
|
32
|
+
},
|
|
33
|
+
onTreeContextMenu: (event) => {
|
|
34
|
+
this.view.showContextMenu(event, this.actionController.createContextMenuItems());
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
this.actionController = new FileActionController({
|
|
38
|
+
onFileDelete: this.onFileDelete,
|
|
39
|
+
onFileSelect: this.onFileSelect,
|
|
40
|
+
refresh: () => this.refresh(),
|
|
41
|
+
state: this.state,
|
|
42
|
+
toastController: this.toastController,
|
|
43
|
+
vaultClient: this.vaultClient,
|
|
44
|
+
view: this.view,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
initialize() {
|
|
49
|
+
this.view.initialize();
|
|
50
|
+
this.actionController.initialize();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async refresh() {
|
|
54
|
+
try {
|
|
55
|
+
const data = await this.vaultClient.readTree();
|
|
56
|
+
this.state.setTree(data.tree || []);
|
|
57
|
+
this.renderTree();
|
|
58
|
+
} catch (error) {
|
|
59
|
+
console.error('[explorer] Failed to load file tree:', error.message);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
setActiveFile(filePath) {
|
|
64
|
+
this.state.setActiveFile(filePath);
|
|
65
|
+
this.renderTree();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
get flatFiles() {
|
|
69
|
+
return this.state.flatFiles;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
renderTree() {
|
|
73
|
+
this.view.render({
|
|
74
|
+
activeFilePath: this.state.activeFilePath,
|
|
75
|
+
expandedDirs: this.state.expandedDirs,
|
|
76
|
+
searchMatches: this.state.getSearchMatches(),
|
|
77
|
+
searchQuery: this.state.searchQuery,
|
|
78
|
+
tree: this.state.tree,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|