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,238 @@
|
|
|
1
|
+
import { FileOpenLifecycle } from './file-open-lifecycle.js';
|
|
2
|
+
import { WorkspaceChromeController } from './workspace-chrome-controller.js';
|
|
3
|
+
|
|
4
|
+
export class WorkspaceCoordinator {
|
|
5
|
+
constructor({
|
|
6
|
+
attachEditorScroller,
|
|
7
|
+
beginDocumentLoad,
|
|
8
|
+
cleanupAfterSessionDestroy,
|
|
9
|
+
createEditorSession,
|
|
10
|
+
getDisplayName,
|
|
11
|
+
getFileList,
|
|
12
|
+
getLineWrappingEnabled,
|
|
13
|
+
getLocalUser,
|
|
14
|
+
getStoredUserName,
|
|
15
|
+
getTheme,
|
|
16
|
+
isExcalidrawFile,
|
|
17
|
+
isMermaidFile,
|
|
18
|
+
isPlantUmlFile,
|
|
19
|
+
isTabActive,
|
|
20
|
+
loadEditorSessionClass,
|
|
21
|
+
loadBacklinks,
|
|
22
|
+
onBeforeFileOpen,
|
|
23
|
+
onConnectionChange,
|
|
24
|
+
onContentChange,
|
|
25
|
+
onCommentsChange,
|
|
26
|
+
onFileAwarenessChange,
|
|
27
|
+
onFileOpenError,
|
|
28
|
+
onFileOpenReady,
|
|
29
|
+
onSelectionChange,
|
|
30
|
+
onSessionAssigned = null,
|
|
31
|
+
onRenderExcalidrawPreview,
|
|
32
|
+
onSyncWrapToggle,
|
|
33
|
+
onUpdateActiveFile,
|
|
34
|
+
onUpdateCurrentFile,
|
|
35
|
+
onUpdateLobbyCurrentFile,
|
|
36
|
+
onUpdateVisibleChrome,
|
|
37
|
+
onViewModeReset,
|
|
38
|
+
renderPresence,
|
|
39
|
+
scrollContainerForSession,
|
|
40
|
+
showEditorLoading,
|
|
41
|
+
stateStore,
|
|
42
|
+
}) {
|
|
43
|
+
this.attachEditorScroller = attachEditorScroller;
|
|
44
|
+
this.beginDocumentLoad = beginDocumentLoad;
|
|
45
|
+
this.cleanupAfterSessionDestroy = cleanupAfterSessionDestroy;
|
|
46
|
+
this.createEditorSession = createEditorSession;
|
|
47
|
+
this.getDisplayName = getDisplayName;
|
|
48
|
+
this.getFileList = getFileList;
|
|
49
|
+
this.getLineWrappingEnabled = getLineWrappingEnabled;
|
|
50
|
+
this.getLocalUser = getLocalUser;
|
|
51
|
+
this.getStoredUserName = getStoredUserName;
|
|
52
|
+
this.getTheme = getTheme;
|
|
53
|
+
this.isExcalidrawFile = isExcalidrawFile;
|
|
54
|
+
this.isMermaidFile = isMermaidFile;
|
|
55
|
+
this.isPlantUmlFile = isPlantUmlFile;
|
|
56
|
+
this.isTabActive = isTabActive;
|
|
57
|
+
this.loadEditorSessionClassPort = loadEditorSessionClass;
|
|
58
|
+
this.loadBacklinks = loadBacklinks;
|
|
59
|
+
this.onBeforeFileOpen = onBeforeFileOpen;
|
|
60
|
+
this.onConnectionChange = onConnectionChange;
|
|
61
|
+
this.onContentChange = onContentChange;
|
|
62
|
+
this.onCommentsChange = onCommentsChange;
|
|
63
|
+
this.onFileAwarenessChange = onFileAwarenessChange;
|
|
64
|
+
this.onFileOpenError = onFileOpenError;
|
|
65
|
+
this.onFileOpenReady = onFileOpenReady;
|
|
66
|
+
this.onSelectionChange = onSelectionChange;
|
|
67
|
+
this.onSessionAssigned = onSessionAssigned;
|
|
68
|
+
this.onRenderExcalidrawPreview = onRenderExcalidrawPreview;
|
|
69
|
+
this.onSyncWrapToggle = onSyncWrapToggle;
|
|
70
|
+
this.onUpdateActiveFile = onUpdateActiveFile;
|
|
71
|
+
this.onUpdateCurrentFile = onUpdateCurrentFile;
|
|
72
|
+
this.onUpdateLobbyCurrentFile = onUpdateLobbyCurrentFile;
|
|
73
|
+
this.onUpdateVisibleChrome = onUpdateVisibleChrome;
|
|
74
|
+
this.renderPresence = renderPresence;
|
|
75
|
+
this.stateStore = stateStore;
|
|
76
|
+
this.session = null;
|
|
77
|
+
this.lifecycle = new FileOpenLifecycle({
|
|
78
|
+
attachEditorScroller,
|
|
79
|
+
createEditorSession,
|
|
80
|
+
loadEditorSessionClass: () => this.loadEditorSessionClassPort(),
|
|
81
|
+
scrollContainerForSession,
|
|
82
|
+
});
|
|
83
|
+
this.chromeController = new WorkspaceChromeController({
|
|
84
|
+
beginDocumentLoad,
|
|
85
|
+
getDisplayName,
|
|
86
|
+
loadBacklinks,
|
|
87
|
+
onBeforeFileOpen,
|
|
88
|
+
onFileOpenError,
|
|
89
|
+
onFileOpenReady,
|
|
90
|
+
onRenderExcalidrawPreview,
|
|
91
|
+
onSyncWrapToggle,
|
|
92
|
+
onUpdateActiveFile,
|
|
93
|
+
onUpdateCurrentFile,
|
|
94
|
+
onUpdateLobbyCurrentFile,
|
|
95
|
+
onUpdateVisibleChrome,
|
|
96
|
+
onViewModeReset,
|
|
97
|
+
renderPresence,
|
|
98
|
+
showEditorLoading,
|
|
99
|
+
stateStore,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
getSession() {
|
|
104
|
+
return this.session;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
loadEditorSessionClass() {
|
|
108
|
+
return this.loadEditorSessionClassPort();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
waitForNextPaint() {
|
|
112
|
+
return new Promise((resolve) => {
|
|
113
|
+
requestAnimationFrame(() => {
|
|
114
|
+
requestAnimationFrame(resolve);
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
cleanupSession() {
|
|
120
|
+
this.session?.destroy();
|
|
121
|
+
this.session = null;
|
|
122
|
+
this.lifecycle.clearSessionScroller();
|
|
123
|
+
this.cleanupAfterSessionDestroy();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
async openFile(filePath) {
|
|
127
|
+
if (!this.isTabActive()) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const isExcalidraw = this.isExcalidrawFile(filePath);
|
|
132
|
+
const isMermaid = this.isMermaidFile(filePath);
|
|
133
|
+
const isPlantUml = this.isPlantUmlFile(filePath);
|
|
134
|
+
|
|
135
|
+
if (filePath === this.stateStore.get('currentFilePath') && (this.session || isExcalidraw)) {
|
|
136
|
+
this.onUpdateActiveFile(filePath);
|
|
137
|
+
this.onUpdateLobbyCurrentFile(filePath);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const loadToken = this.stateStore.nextSessionLoadToken();
|
|
142
|
+
|
|
143
|
+
this.cleanupSession();
|
|
144
|
+
const chromeState = this.chromeController.prepareForFileOpen(filePath, {
|
|
145
|
+
resetConnectionState: !isExcalidraw,
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
if (isExcalidraw) {
|
|
149
|
+
this.onSessionAssigned?.(null);
|
|
150
|
+
|
|
151
|
+
if (loadToken !== this.stateStore.get('sessionLoadToken')) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
this.chromeController.markFileOpenReady(null);
|
|
156
|
+
this.chromeController.finalizeFileOpen({
|
|
157
|
+
filePath,
|
|
158
|
+
isExcalidraw: true,
|
|
159
|
+
session: null,
|
|
160
|
+
supportsBacklinks: chromeState.supportsBacklinks,
|
|
161
|
+
});
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const session = await this.lifecycle.createSession({
|
|
166
|
+
filePath,
|
|
167
|
+
getFileList: this.getFileList,
|
|
168
|
+
lineWrappingEnabled: this.getLineWrappingEnabled(),
|
|
169
|
+
localUser: this.getLocalUser(),
|
|
170
|
+
onAwarenessChange: (users) => this.onFileAwarenessChange(users),
|
|
171
|
+
onConnectionChange: (state) => this.onConnectionChange(state),
|
|
172
|
+
onCommentsChange: (threads) => this.onCommentsChange?.(threads),
|
|
173
|
+
onContentChange: () => {
|
|
174
|
+
if (isExcalidraw) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
this.onContentChange({
|
|
179
|
+
isMermaid,
|
|
180
|
+
isPlantUml,
|
|
181
|
+
});
|
|
182
|
+
},
|
|
183
|
+
preferredUserName: this.getStoredUserName(),
|
|
184
|
+
onSelectionChange: (anchor) => this.onSelectionChange?.(anchor),
|
|
185
|
+
theme: this.getTheme(),
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
this.session = session;
|
|
189
|
+
this.onSessionAssigned?.(session);
|
|
190
|
+
|
|
191
|
+
try {
|
|
192
|
+
await session.initialize(filePath);
|
|
193
|
+
|
|
194
|
+
if (loadToken !== this.stateStore.get('sessionLoadToken')) {
|
|
195
|
+
session.destroy();
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
this.lifecycle.attachSessionScroller(session);
|
|
200
|
+
session.applyTheme(this.getTheme());
|
|
201
|
+
await session.waitForInitialSync();
|
|
202
|
+
session.ensureInitialContent?.();
|
|
203
|
+
|
|
204
|
+
if (loadToken !== this.stateStore.get('sessionLoadToken')) {
|
|
205
|
+
session.destroy();
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
this.chromeController.markFileOpenReady(session);
|
|
210
|
+
session.requestMeasure();
|
|
211
|
+
await this.waitForNextPaint();
|
|
212
|
+
|
|
213
|
+
if (loadToken !== this.stateStore.get('sessionLoadToken')) {
|
|
214
|
+
session.destroy();
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
this.chromeController.finalizeFileOpen({
|
|
218
|
+
filePath,
|
|
219
|
+
isExcalidraw,
|
|
220
|
+
session,
|
|
221
|
+
supportsBacklinks: chromeState.supportsBacklinks,
|
|
222
|
+
});
|
|
223
|
+
} catch (error) {
|
|
224
|
+
console.error('[app] Failed to initialize editor:', error);
|
|
225
|
+
session.destroy();
|
|
226
|
+
this.lifecycle.clearSessionScroller();
|
|
227
|
+
if (this.session === session) {
|
|
228
|
+
this.session = null;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (loadToken !== this.stateStore.get('sessionLoadToken')) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
this.chromeController.handleFileOpenError();
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isDiagramFilePath,
|
|
3
|
+
isMarkdownFilePath,
|
|
4
|
+
} from '../../domain/file-kind.js';
|
|
5
|
+
|
|
6
|
+
export class WorkspacePreviewController {
|
|
7
|
+
constructor({
|
|
8
|
+
backlinksPanel,
|
|
9
|
+
elements,
|
|
10
|
+
excalidrawEmbed,
|
|
11
|
+
getDisplayName,
|
|
12
|
+
getSession,
|
|
13
|
+
isExcalidrawFile,
|
|
14
|
+
isMermaidFile,
|
|
15
|
+
isPlantUmlFile,
|
|
16
|
+
layoutController,
|
|
17
|
+
outlineController,
|
|
18
|
+
previewRenderer,
|
|
19
|
+
schedulePreviewLayoutSync,
|
|
20
|
+
scrollSyncController,
|
|
21
|
+
videoEmbed,
|
|
22
|
+
}) {
|
|
23
|
+
this.backlinksPanel = backlinksPanel;
|
|
24
|
+
this.elements = elements;
|
|
25
|
+
this.excalidrawEmbed = excalidrawEmbed;
|
|
26
|
+
this.getDisplayName = getDisplayName;
|
|
27
|
+
this.getSession = getSession;
|
|
28
|
+
this.isExcalidrawFile = isExcalidrawFile;
|
|
29
|
+
this.isMermaidFile = isMermaidFile;
|
|
30
|
+
this.isPlantUmlFile = isPlantUmlFile;
|
|
31
|
+
this.layoutController = layoutController;
|
|
32
|
+
this.outlineController = outlineController;
|
|
33
|
+
this.previewRenderer = previewRenderer;
|
|
34
|
+
this.schedulePreviewLayoutSyncCallback = schedulePreviewLayoutSync;
|
|
35
|
+
this.scrollSyncController = scrollSyncController;
|
|
36
|
+
this.videoEmbed = videoEmbed;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
createDiagramPreviewDocument(language, source = '') {
|
|
40
|
+
const text = String(source ?? '');
|
|
41
|
+
const longestFence = Math.max(...(text.match(/`+/g)?.map((fence) => fence.length) ?? [0]));
|
|
42
|
+
const fence = '`'.repeat(Math.max(3, longestFence + 1));
|
|
43
|
+
return `${fence}${language}\n${text}\n${fence}`;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
getPreviewSource(filePath) {
|
|
47
|
+
const source = this.getSession()?.getText() ?? '';
|
|
48
|
+
if (this.isMermaidFile(filePath)) {
|
|
49
|
+
return this.createDiagramPreviewDocument('mermaid', source);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (this.isPlantUmlFile(filePath)) {
|
|
53
|
+
return this.createDiagramPreviewDocument('plantuml', source);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return source;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
resetPreviewMode() {
|
|
60
|
+
this.elements.previewContent?.classList.remove('is-excalidraw-file-preview');
|
|
61
|
+
this.elements.previewContent?.classList.remove('is-mermaid-file-preview');
|
|
62
|
+
this.elements.previewContent?.classList.remove('is-plantuml-file-preview');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
syncFileChrome(filePath) {
|
|
66
|
+
const isExcalidraw = this.isExcalidrawFile(filePath);
|
|
67
|
+
const isMarkdown = isMarkdownFilePath(filePath);
|
|
68
|
+
const isMermaid = this.isMermaidFile(filePath);
|
|
69
|
+
const isPlantUml = this.isPlantUmlFile(filePath);
|
|
70
|
+
const isDiagramFile = isDiagramFilePath(filePath);
|
|
71
|
+
|
|
72
|
+
this.elements.markdownToolbar?.classList.toggle('hidden', !isMarkdown);
|
|
73
|
+
this.elements.outlineToggle?.classList.toggle('hidden', isDiagramFile);
|
|
74
|
+
this.elements.previewContent?.classList.toggle('is-mermaid-file-preview', isMermaid);
|
|
75
|
+
this.elements.previewContent?.classList.toggle('is-plantuml-file-preview', isPlantUml);
|
|
76
|
+
|
|
77
|
+
if (isExcalidraw) {
|
|
78
|
+
this.layoutController.setView('preview', { persist: false });
|
|
79
|
+
this.outlineController.close();
|
|
80
|
+
this.backlinksPanel.clear();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (isMermaid || isPlantUml) {
|
|
85
|
+
this.outlineController.close();
|
|
86
|
+
this.backlinksPanel.clear();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
renderExcalidrawFilePreview(filePath) {
|
|
91
|
+
const previewElement = this.elements.previewContent;
|
|
92
|
+
if (!previewElement) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
this.videoEmbed?.detachForCommit();
|
|
97
|
+
this.excalidrawEmbed.detachForCommit();
|
|
98
|
+
this.resetPreviewMode();
|
|
99
|
+
previewElement.classList.add('is-excalidraw-file-preview');
|
|
100
|
+
const renderHost = this.previewRenderer.ensureRenderHost();
|
|
101
|
+
this.previewRenderer.normalizePreviewChildren(renderHost);
|
|
102
|
+
|
|
103
|
+
const placeholder = document.createElement('div');
|
|
104
|
+
placeholder.className = 'excalidraw-embed-placeholder';
|
|
105
|
+
placeholder.dataset.embedKey = `${filePath}#file-preview`;
|
|
106
|
+
placeholder.dataset.embedLabel = this.getDisplayName(filePath);
|
|
107
|
+
placeholder.dataset.embedTarget = filePath;
|
|
108
|
+
const loadingShell = document.createElement('div');
|
|
109
|
+
loadingShell.className = 'preview-shell';
|
|
110
|
+
loadingShell.textContent = 'Loading Excalidraw preview…';
|
|
111
|
+
placeholder.appendChild(loadingShell);
|
|
112
|
+
if (renderHost) {
|
|
113
|
+
renderHost.replaceChildren(placeholder);
|
|
114
|
+
renderHost.style.minHeight = '';
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
previewElement.dataset.renderPhase = 'ready';
|
|
118
|
+
this.outlineController.refresh();
|
|
119
|
+
this.scrollSyncController.setLargeDocumentMode(false);
|
|
120
|
+
this.scrollSyncController.invalidatePreviewBlocks();
|
|
121
|
+
this.videoEmbed?.reconcileEmbeds(previewElement);
|
|
122
|
+
this.excalidrawEmbed.reconcileEmbeds(previewElement, { isLargeDocument: false });
|
|
123
|
+
this.excalidrawEmbed.hydrateVisibleEmbeds();
|
|
124
|
+
this.schedulePreviewLayoutSyncCallback({ delayMs: 0 });
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
createResizeHandler(restoreSidebarState) {
|
|
128
|
+
let resizeTimer = null;
|
|
129
|
+
return () => {
|
|
130
|
+
clearTimeout(resizeTimer);
|
|
131
|
+
resizeTimer = setTimeout(() => {
|
|
132
|
+
restoreSidebarState?.();
|
|
133
|
+
this.schedulePreviewLayoutSyncCallback({ delayMs: 0 });
|
|
134
|
+
}, 100);
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
initializePreviewLayoutObserver(onSchedule = () => {}) {
|
|
139
|
+
if (typeof ResizeObserver !== 'function' || !this.elements.previewContent) {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const observer = new ResizeObserver(() => {
|
|
144
|
+
onSchedule();
|
|
145
|
+
});
|
|
146
|
+
observer.observe(this.elements.previewContent);
|
|
147
|
+
return observer;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
schedulePreviewLayoutSync({
|
|
151
|
+
hydrationPaused,
|
|
152
|
+
previewLayoutSyncTimer,
|
|
153
|
+
setPendingPreviewLayoutSync,
|
|
154
|
+
setPreviewLayoutSyncTimer,
|
|
155
|
+
delayMs = 120,
|
|
156
|
+
}) {
|
|
157
|
+
if (hydrationPaused) {
|
|
158
|
+
setPendingPreviewLayoutSync(true);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
clearTimeout(previewLayoutSyncTimer);
|
|
163
|
+
|
|
164
|
+
const nextTimer = setTimeout(() => {
|
|
165
|
+
setPreviewLayoutSyncTimer(null);
|
|
166
|
+
|
|
167
|
+
const hasSession = Boolean(this.getSession());
|
|
168
|
+
const isExcalidrawPreview = this.elements.previewContent?.classList?.contains?.('is-excalidraw-file-preview') ?? false;
|
|
169
|
+
if ((!hasSession && !isExcalidrawPreview) || !this.elements.previewContent) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (this.elements.previewContent.dataset.renderPhase === 'shell') {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (hydrationPaused) {
|
|
178
|
+
setPendingPreviewLayoutSync(true);
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
this.previewRenderer.scheduleActiveMermaidRefit();
|
|
183
|
+
this.previewRenderer.scheduleActivePlantUmlRefit();
|
|
184
|
+
this.videoEmbed?.syncLayout();
|
|
185
|
+
this.excalidrawEmbed.syncLayout();
|
|
186
|
+
if (isExcalidrawPreview && !hasSession) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
this.scrollSyncController.invalidatePreviewBlocks();
|
|
191
|
+
this.scrollSyncController.warmPreviewBlocks({
|
|
192
|
+
onReady: () => {
|
|
193
|
+
if (!this.getSession()) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
this.scrollSyncController.realignAfterLayoutChange();
|
|
198
|
+
this.outlineController.scheduleActiveHeadingUpdate();
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
}, delayMs);
|
|
202
|
+
|
|
203
|
+
setPreviewLayoutSyncTimer(nextTimer);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
handleEditorScrollActivityChange({
|
|
207
|
+
isActive,
|
|
208
|
+
pendingPreviewLayoutSync,
|
|
209
|
+
previewLayoutSyncTimer,
|
|
210
|
+
setHydrationPaused,
|
|
211
|
+
setPendingPreviewLayoutSync,
|
|
212
|
+
setPreviewLayoutSyncTimer,
|
|
213
|
+
}) {
|
|
214
|
+
const nextPaused = Boolean(isActive);
|
|
215
|
+
setHydrationPaused(nextPaused);
|
|
216
|
+
this.previewRenderer.setHydrationPaused(nextPaused);
|
|
217
|
+
this.excalidrawEmbed.setHydrationPaused(nextPaused);
|
|
218
|
+
|
|
219
|
+
if (nextPaused) {
|
|
220
|
+
clearTimeout(previewLayoutSyncTimer);
|
|
221
|
+
setPreviewLayoutSyncTimer(null);
|
|
222
|
+
setPendingPreviewLayoutSync(true);
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (pendingPreviewLayoutSync) {
|
|
227
|
+
setPendingPreviewLayoutSync(false);
|
|
228
|
+
this.schedulePreviewLayoutSync({
|
|
229
|
+
delayMs: 0,
|
|
230
|
+
hydrationPaused: false,
|
|
231
|
+
previewLayoutSyncTimer: null,
|
|
232
|
+
setPendingPreviewLayoutSync,
|
|
233
|
+
setPreviewLayoutSyncTimer,
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
export class WorkspaceRouteController {
|
|
2
|
+
constructor({
|
|
3
|
+
backlinksPanel,
|
|
4
|
+
clearInitialFileBootstrap,
|
|
5
|
+
closeSidebarOnMobile,
|
|
6
|
+
elements,
|
|
7
|
+
excalidrawEmbed,
|
|
8
|
+
fileExplorer,
|
|
9
|
+
getIsTabActive,
|
|
10
|
+
getSessionLoadToken,
|
|
11
|
+
gitDiffView,
|
|
12
|
+
gitPanel,
|
|
13
|
+
lobby,
|
|
14
|
+
navigation,
|
|
15
|
+
previewRenderer,
|
|
16
|
+
renderAvatars,
|
|
17
|
+
renderPresence,
|
|
18
|
+
resetPreviewMode,
|
|
19
|
+
scrollSyncController,
|
|
20
|
+
setSession,
|
|
21
|
+
setSessionLoadToken,
|
|
22
|
+
setSidebarTab,
|
|
23
|
+
setCurrentFilePath,
|
|
24
|
+
showGitDiff,
|
|
25
|
+
syncMainChrome,
|
|
26
|
+
videoEmbed,
|
|
27
|
+
workspaceCoordinator,
|
|
28
|
+
layoutController,
|
|
29
|
+
}) {
|
|
30
|
+
this.backlinksPanel = backlinksPanel;
|
|
31
|
+
this.clearInitialFileBootstrap = clearInitialFileBootstrap;
|
|
32
|
+
this.closeSidebarOnMobile = closeSidebarOnMobile;
|
|
33
|
+
this.elements = elements;
|
|
34
|
+
this.excalidrawEmbed = excalidrawEmbed;
|
|
35
|
+
this.fileExplorer = fileExplorer;
|
|
36
|
+
this.getIsTabActive = getIsTabActive;
|
|
37
|
+
this.getSessionLoadToken = getSessionLoadToken;
|
|
38
|
+
this.gitDiffView = gitDiffView;
|
|
39
|
+
this.gitPanel = gitPanel;
|
|
40
|
+
this.lobby = lobby;
|
|
41
|
+
this.navigation = navigation;
|
|
42
|
+
this.previewRenderer = previewRenderer;
|
|
43
|
+
this.renderAvatars = renderAvatars;
|
|
44
|
+
this.renderPresence = renderPresence;
|
|
45
|
+
this.resetPreviewMode = resetPreviewMode;
|
|
46
|
+
this.scrollSyncController = scrollSyncController;
|
|
47
|
+
this.setSession = setSession;
|
|
48
|
+
this.setSessionLoadToken = setSessionLoadToken;
|
|
49
|
+
this.setSidebarTab = setSidebarTab;
|
|
50
|
+
this.setCurrentFilePath = setCurrentFilePath;
|
|
51
|
+
this.showGitDiff = showGitDiff;
|
|
52
|
+
this.syncMainChrome = syncMainChrome;
|
|
53
|
+
this.videoEmbed = videoEmbed;
|
|
54
|
+
this.workspaceCoordinator = workspaceCoordinator;
|
|
55
|
+
this.layoutController = layoutController;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async handleHashChange() {
|
|
59
|
+
if (!this.getIsTabActive()) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const route = this.navigation.getHashRoute();
|
|
64
|
+
if (route.type === 'empty') {
|
|
65
|
+
this.gitPanel.setSelection();
|
|
66
|
+
this.showEmptyState();
|
|
67
|
+
this.syncMainChrome({ mode: 'empty', title: 'CollabMD' });
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (route.type === 'git-diff') {
|
|
72
|
+
this.setSidebarTab('git');
|
|
73
|
+
await this.showGitDiff(route);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
this.setSidebarTab('files');
|
|
78
|
+
await this.openFile(route.filePath);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
showEmptyState() {
|
|
82
|
+
this.gitDiffView.hide();
|
|
83
|
+
this.workspaceCoordinator.cleanupSession();
|
|
84
|
+
this.setSession(null);
|
|
85
|
+
this.setSessionLoadToken(this.getSessionLoadToken() + 1);
|
|
86
|
+
this.clearInitialFileBootstrap();
|
|
87
|
+
this.resetPreviewMode();
|
|
88
|
+
this.elements.outlineToggle?.classList.remove('hidden');
|
|
89
|
+
this.elements.markdownToolbar?.classList.add('hidden');
|
|
90
|
+
this.setCurrentFilePath(null);
|
|
91
|
+
this.lobby.setCurrentFile(null);
|
|
92
|
+
this.fileExplorer.setActiveFile(null);
|
|
93
|
+
|
|
94
|
+
this.elements.emptyState?.classList.remove('hidden');
|
|
95
|
+
this.elements.editorPage?.classList.add('hidden');
|
|
96
|
+
this.elements.diffPage?.classList.add('hidden');
|
|
97
|
+
if (this.elements.previewContent) {
|
|
98
|
+
this.elements.previewContent.innerHTML = '';
|
|
99
|
+
this.elements.previewContent.dataset.renderPhase = 'ready';
|
|
100
|
+
}
|
|
101
|
+
this.videoEmbed?.reconcileEmbeds(this.elements.previewContent);
|
|
102
|
+
this.resetPreviewSurface();
|
|
103
|
+
|
|
104
|
+
this.renderAvatars();
|
|
105
|
+
this.renderPresence();
|
|
106
|
+
this.backlinksPanel.clear();
|
|
107
|
+
|
|
108
|
+
if (this.elements.activeFileName) {
|
|
109
|
+
this.elements.activeFileName.textContent = 'CollabMD';
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
showDiffState() {
|
|
114
|
+
this.setSessionLoadToken(this.getSessionLoadToken() + 1);
|
|
115
|
+
this.clearInitialFileBootstrap();
|
|
116
|
+
this.workspaceCoordinator.cleanupSession();
|
|
117
|
+
this.setSession(null);
|
|
118
|
+
this.resetPreviewMode();
|
|
119
|
+
this.layoutController.reset();
|
|
120
|
+
this.setCurrentFilePath(null);
|
|
121
|
+
this.lobby.setCurrentFile(null);
|
|
122
|
+
this.fileExplorer.setActiveFile(null);
|
|
123
|
+
|
|
124
|
+
this.elements.emptyState?.classList.add('hidden');
|
|
125
|
+
this.elements.editorPage?.classList.add('hidden');
|
|
126
|
+
this.elements.diffPage?.classList.remove('hidden');
|
|
127
|
+
if (this.elements.previewContent) {
|
|
128
|
+
this.elements.previewContent.innerHTML = '';
|
|
129
|
+
this.elements.previewContent.dataset.renderPhase = 'ready';
|
|
130
|
+
}
|
|
131
|
+
this.videoEmbed?.reconcileEmbeds(this.elements.previewContent);
|
|
132
|
+
this.resetPreviewSurface();
|
|
133
|
+
|
|
134
|
+
this.elements.outlineToggle?.classList.add('hidden');
|
|
135
|
+
this.elements.markdownToolbar?.classList.add('hidden');
|
|
136
|
+
|
|
137
|
+
this.renderAvatars();
|
|
138
|
+
this.renderPresence();
|
|
139
|
+
this.backlinksPanel.clear();
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
async openFile(filePath) {
|
|
143
|
+
this.gitPanel.setSelection();
|
|
144
|
+
this.gitDiffView.hide();
|
|
145
|
+
this.syncMainChrome({ mode: 'editor' });
|
|
146
|
+
await this.workspaceCoordinator.openFile(filePath);
|
|
147
|
+
this.setSession(this.workspaceCoordinator.getSession());
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
cleanupSession() {
|
|
151
|
+
this.workspaceCoordinator.cleanupSession();
|
|
152
|
+
this.setSession(this.workspaceCoordinator.getSession());
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
handleFileSelection(filePath, { closeSidebarOnMobile = false } = {}) {
|
|
156
|
+
if (closeSidebarOnMobile) {
|
|
157
|
+
this.closeSidebarOnMobile();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
this.navigation.navigateToFile(filePath);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
resetPreviewSurface() {
|
|
164
|
+
this.previewRenderer.setHydrationPaused(false);
|
|
165
|
+
this.excalidrawEmbed.setHydrationPaused(false);
|
|
166
|
+
this.videoEmbed?.detachForCommit();
|
|
167
|
+
this.scrollSyncController.setLargeDocumentMode(false);
|
|
168
|
+
this.scrollSyncController.invalidatePreviewBlocks();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export class WorkspaceStateStore {
|
|
2
|
+
constructor(initialState = {}) {
|
|
3
|
+
this.state = {
|
|
4
|
+
activeSidebarTab: 'files',
|
|
5
|
+
chatInitialSyncComplete: false,
|
|
6
|
+
chatIsOpen: false,
|
|
7
|
+
chatMessageIds: new Set(),
|
|
8
|
+
chatMessages: [],
|
|
9
|
+
chatUnreadCount: 0,
|
|
10
|
+
connectionHelpShown: false,
|
|
11
|
+
connectionState: { status: 'disconnected', unreachable: false },
|
|
12
|
+
currentFilePath: null,
|
|
13
|
+
fileExplorerReady: false,
|
|
14
|
+
followedCursorSignature: '',
|
|
15
|
+
followedUserClientId: null,
|
|
16
|
+
gitRepoAvailable: false,
|
|
17
|
+
globalUsers: [],
|
|
18
|
+
isTabActive: false,
|
|
19
|
+
sessionLoadToken: 0,
|
|
20
|
+
...initialState,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
get(key) {
|
|
25
|
+
return this.state[key];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
set(key, value) {
|
|
29
|
+
this.state[key] = value;
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
nextSessionLoadToken() {
|
|
34
|
+
const nextToken = Number(this.state.sessionLoadToken || 0) + 1;
|
|
35
|
+
this.state.sessionLoadToken = nextToken;
|
|
36
|
+
return nextToken;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
replaceChatState({ initialSyncComplete, isOpen, messageIds, messages, unreadCount }) {
|
|
40
|
+
this.state.chatMessages = Array.isArray(messages) ? messages : [];
|
|
41
|
+
this.state.chatMessageIds = messageIds instanceof Set ? messageIds : new Set();
|
|
42
|
+
this.state.chatUnreadCount = Number.isFinite(unreadCount) ? unreadCount : 0;
|
|
43
|
+
this.state.chatIsOpen = Boolean(isOpen);
|
|
44
|
+
this.state.chatInitialSyncComplete = Boolean(initialSyncComplete);
|
|
45
|
+
}
|
|
46
|
+
}
|