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,394 @@
|
|
|
1
|
+
import { resolveApiUrl } from '../../domain/runtime-paths.js';
|
|
2
|
+
|
|
3
|
+
function normalizeWorkspaceChange(workspaceChange = {}) {
|
|
4
|
+
return {
|
|
5
|
+
changedPaths: Array.isArray(workspaceChange.changedPaths) ? workspaceChange.changedPaths.filter(Boolean) : [],
|
|
6
|
+
deletedPaths: Array.isArray(workspaceChange.deletedPaths) ? workspaceChange.deletedPaths.filter(Boolean) : [],
|
|
7
|
+
refreshExplorer: workspaceChange.refreshExplorer !== false,
|
|
8
|
+
renamedPaths: Array.isArray(workspaceChange.renamedPaths)
|
|
9
|
+
? workspaceChange.renamedPaths.filter((entry) => entry?.oldPath && entry?.newPath)
|
|
10
|
+
: [],
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const gitFeature = {
|
|
15
|
+
setGitOperationStatus(message = '') {
|
|
16
|
+
const badge = this.elements.gitOperationStatus;
|
|
17
|
+
if (!badge) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const text = String(message ?? '').trim();
|
|
22
|
+
badge.textContent = text;
|
|
23
|
+
badge.classList.toggle('hidden', !text);
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
async runGitActionWithStatus(message, callback) {
|
|
27
|
+
this.setGitOperationStatus(message);
|
|
28
|
+
try {
|
|
29
|
+
return await callback();
|
|
30
|
+
} finally {
|
|
31
|
+
this.setGitOperationStatus('');
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
handleGitDiffSelection(filePath, { closeSidebarOnMobile = false, scope = 'working-tree' } = {}) {
|
|
36
|
+
if (closeSidebarOnMobile) {
|
|
37
|
+
this.closeSidebarOnMobile();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
this.navigation.navigateToGitDiff({ filePath, scope });
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
handleGitRepoChange(isGitRepo, status = null) {
|
|
44
|
+
this.gitRepoAvailable = Boolean(isGitRepo);
|
|
45
|
+
this.elements.sidebarTabs?.classList.toggle('hidden', !this.gitRepoAvailable);
|
|
46
|
+
this.elements.gitSidebarTab?.classList.toggle('hidden', !this.gitRepoAvailable);
|
|
47
|
+
|
|
48
|
+
const hasChanges = isGitRepo && status?.summary?.changedFiles > 0;
|
|
49
|
+
this.elements.gitSidebarTab?.classList.toggle('has-changes', hasChanges);
|
|
50
|
+
|
|
51
|
+
this.gitDiffView.setRepoStatus(this.gitRepoAvailable ? status : null);
|
|
52
|
+
|
|
53
|
+
if (!this.gitRepoAvailable && this.activeSidebarTab === 'git') {
|
|
54
|
+
this.setSidebarTab('files');
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (this.gitRepoAvailable && this.navigation.getHashRoute().type === 'git-diff' && this.activeSidebarTab !== 'git') {
|
|
59
|
+
this.setSidebarTab('git');
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
syncMainChrome({ mode, title = null } = {}) {
|
|
64
|
+
const isDiffMode = mode === 'diff';
|
|
65
|
+
this.elements.toolbarCenter?.classList.toggle('hidden', isDiffMode);
|
|
66
|
+
this.elements.mobileViewToggle?.classList.toggle('hidden', isDiffMode);
|
|
67
|
+
this.elements.userCount?.classList.toggle('hidden', isDiffMode);
|
|
68
|
+
this.elements.toolbarDiffBadge?.classList.toggle('hidden', !isDiffMode);
|
|
69
|
+
|
|
70
|
+
if (title && this.elements.activeFileName) {
|
|
71
|
+
this.elements.activeFileName.textContent = title;
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
async showGitDiff({ filePath = null, scope = 'all' } = {}) {
|
|
76
|
+
this.gitPanel.setSelection(filePath ? { path: filePath, scope } : {});
|
|
77
|
+
this.showDiffState();
|
|
78
|
+
this.syncMainChrome({
|
|
79
|
+
mode: 'diff',
|
|
80
|
+
title: this.gitDiffView.getToolbarTitle({ filePath, scope }),
|
|
81
|
+
});
|
|
82
|
+
await this.gitDiffView.open({ filePath, scope });
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
async postGitAction(endpoint, payload) {
|
|
86
|
+
const response = await fetch(endpoint, {
|
|
87
|
+
body: JSON.stringify(payload),
|
|
88
|
+
headers: {
|
|
89
|
+
'Content-Type': 'application/json',
|
|
90
|
+
},
|
|
91
|
+
method: 'POST',
|
|
92
|
+
});
|
|
93
|
+
const data = await response.json();
|
|
94
|
+
if (!response.ok) {
|
|
95
|
+
throw new Error(data.error || 'Git action failed');
|
|
96
|
+
}
|
|
97
|
+
return data;
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
async refreshWorkspaceAfterGitAction({ filePath = null, preferredScope = null } = {}) {
|
|
101
|
+
await this.fileExplorer.refresh();
|
|
102
|
+
await this.refreshGitAfterAction({ filePath, preferredScope });
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
async refreshGitAfterAction({ filePath = null, preferredScope = null } = {}) {
|
|
106
|
+
await this.gitPanel.refresh({ force: true });
|
|
107
|
+
|
|
108
|
+
const route = this.navigation.getHashRoute();
|
|
109
|
+
if (route.type !== 'git-diff') {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const nextFilePath = filePath ?? route.filePath;
|
|
114
|
+
const nextScope = preferredScope ?? route.scope;
|
|
115
|
+
if (nextScope !== route.scope || nextFilePath !== route.filePath) {
|
|
116
|
+
this.navigation.navigateToGitDiff({ filePath: nextFilePath, scope: nextScope });
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
await this.showGitDiff({ filePath: route.filePath, scope: route.scope });
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
async finalizeGitAction({
|
|
124
|
+
action,
|
|
125
|
+
filePath = null,
|
|
126
|
+
preferredScope = null,
|
|
127
|
+
result = {},
|
|
128
|
+
showLocalFileToast = false,
|
|
129
|
+
} = {}) {
|
|
130
|
+
const workspaceChange = normalizeWorkspaceChange(result.workspaceChange);
|
|
131
|
+
await this.refreshWorkspaceAfterGitAction({ filePath, preferredScope });
|
|
132
|
+
this.handleWorkspaceChangeForCurrentFile(workspaceChange, { action, local: true, showToast: showLocalFileToast });
|
|
133
|
+
this.lobby.sendWorkspaceEvent({
|
|
134
|
+
action,
|
|
135
|
+
sourceRef: result.sourceRef ?? null,
|
|
136
|
+
workspaceChange,
|
|
137
|
+
});
|
|
138
|
+
return workspaceChange;
|
|
139
|
+
},
|
|
140
|
+
|
|
141
|
+
handleWorkspaceChangeForCurrentFile(workspaceChange, { action = 'git', local = false, showToast = true } = {}) {
|
|
142
|
+
const currentFilePath = this.currentFilePath;
|
|
143
|
+
if (!currentFilePath) {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const wasDeleted = workspaceChange.deletedPaths.includes(currentFilePath);
|
|
148
|
+
const renameEntry = workspaceChange.renamedPaths.find((entry) => entry.oldPath === currentFilePath);
|
|
149
|
+
if (!wasDeleted && !renameEntry) {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
this.navigation.navigateToFile(null);
|
|
154
|
+
if (!showToast) {
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const displayName = this.getDisplayName(currentFilePath);
|
|
159
|
+
if (renameEntry) {
|
|
160
|
+
this.toastController.show(
|
|
161
|
+
local
|
|
162
|
+
? `${displayName} was reset away from this branch path`
|
|
163
|
+
: `${displayName} moved after a ${action} operation`,
|
|
164
|
+
);
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
this.toastController.show(
|
|
169
|
+
local
|
|
170
|
+
? `${displayName} was removed by ${action}`
|
|
171
|
+
: `${displayName} was removed after a ${action} operation`,
|
|
172
|
+
);
|
|
173
|
+
return true;
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
async handleIncomingWorkspaceEvent(event) {
|
|
177
|
+
if (!this.isTabActive || !event) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const workspaceChange = normalizeWorkspaceChange(event.workspaceChange);
|
|
182
|
+
await this.refreshWorkspaceAfterGitAction();
|
|
183
|
+
this.handleWorkspaceChangeForCurrentFile(workspaceChange, {
|
|
184
|
+
action: event.action || 'git',
|
|
185
|
+
local: false,
|
|
186
|
+
showToast: true,
|
|
187
|
+
});
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
async stageGitFile(filePath, { scope = 'working-tree' } = {}) {
|
|
191
|
+
if (!filePath) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
await this.runGitActionWithStatus('Staging changes...', async () => {
|
|
196
|
+
const result = await this.postGitAction(resolveApiUrl('/git/stage'), { path: filePath });
|
|
197
|
+
await this.finalizeGitAction({
|
|
198
|
+
action: 'stage',
|
|
199
|
+
filePath,
|
|
200
|
+
preferredScope: scope === 'all' ? 'all' : 'staged',
|
|
201
|
+
result,
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
async unstageGitFile(filePath, { scope = 'staged' } = {}) {
|
|
207
|
+
if (!filePath) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
await this.runGitActionWithStatus('Unstaging changes...', async () => {
|
|
212
|
+
const result = await this.postGitAction(resolveApiUrl('/git/unstage'), { path: filePath });
|
|
213
|
+
await this.finalizeGitAction({
|
|
214
|
+
action: 'unstage',
|
|
215
|
+
filePath,
|
|
216
|
+
preferredScope: scope === 'all' ? 'all' : 'working-tree',
|
|
217
|
+
result,
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
async pushGitBranch() {
|
|
223
|
+
await this.runGitActionWithStatus('Pushing branch...', async () => {
|
|
224
|
+
try {
|
|
225
|
+
const result = await this.postGitAction(resolveApiUrl('/git/push'), {});
|
|
226
|
+
await this.finalizeGitAction({
|
|
227
|
+
action: 'push',
|
|
228
|
+
result,
|
|
229
|
+
});
|
|
230
|
+
} catch (error) {
|
|
231
|
+
this.toastController.show(error.message || 'Failed to push branch');
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
},
|
|
235
|
+
|
|
236
|
+
async pullGitBranch() {
|
|
237
|
+
await this.runGitActionWithStatus('Pulling branch...', async () => {
|
|
238
|
+
try {
|
|
239
|
+
const result = await this.postGitAction(resolveApiUrl('/git/pull'), {});
|
|
240
|
+
await this.finalizeGitAction({
|
|
241
|
+
action: 'pull',
|
|
242
|
+
result,
|
|
243
|
+
showLocalFileToast: true,
|
|
244
|
+
});
|
|
245
|
+
} catch (error) {
|
|
246
|
+
this.toastController.show(error.message || 'Failed to pull branch');
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
},
|
|
250
|
+
|
|
251
|
+
openGitResetDialog(filePath) {
|
|
252
|
+
if (!this.isTabActive || !filePath) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
const dialog = this.elements.gitResetDialog;
|
|
257
|
+
if (!dialog || !this.elements.gitResetFileName) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
this.pendingGitResetPath = filePath;
|
|
262
|
+
if (this.elements.gitResetTitle) {
|
|
263
|
+
this.elements.gitResetTitle.textContent = 'Reset file to current branch';
|
|
264
|
+
}
|
|
265
|
+
if (this.elements.gitResetCopy) {
|
|
266
|
+
this.elements.gitResetCopy.textContent = 'Restore this file from the current checked-out branch. If this branch does not contain the file, the file will be deleted locally.';
|
|
267
|
+
}
|
|
268
|
+
this.elements.gitResetFileName.value = filePath;
|
|
269
|
+
if (this.elements.gitResetSubmit) {
|
|
270
|
+
this.elements.gitResetSubmit.textContent = 'Reset File';
|
|
271
|
+
}
|
|
272
|
+
this.elements.gitResetSubmit?.toggleAttribute('disabled', false);
|
|
273
|
+
|
|
274
|
+
if (dialog.open) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
if (typeof dialog.showModal === 'function') {
|
|
278
|
+
dialog.showModal();
|
|
279
|
+
} else {
|
|
280
|
+
dialog.setAttribute('open', 'true');
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
|
|
284
|
+
async handleGitResetSubmit() {
|
|
285
|
+
const filePath = this.pendingGitResetPath;
|
|
286
|
+
const dialog = this.elements.gitResetDialog;
|
|
287
|
+
const submit = this.elements.gitResetSubmit;
|
|
288
|
+
if (!filePath || !dialog) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
submit?.toggleAttribute('disabled', true);
|
|
293
|
+
if (submit) {
|
|
294
|
+
submit.textContent = 'Resetting...';
|
|
295
|
+
}
|
|
296
|
+
try {
|
|
297
|
+
await this.runGitActionWithStatus('Resetting file...', async () => {
|
|
298
|
+
const result = await this.postGitAction(resolveApiUrl('/git/reset-file'), { path: filePath });
|
|
299
|
+
await this.finalizeGitAction({
|
|
300
|
+
action: 'reset',
|
|
301
|
+
filePath,
|
|
302
|
+
result,
|
|
303
|
+
showLocalFileToast: true,
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
dialog.close();
|
|
307
|
+
} catch (error) {
|
|
308
|
+
this.toastController.show(error.message || 'Failed to reset file');
|
|
309
|
+
} finally {
|
|
310
|
+
if (submit) {
|
|
311
|
+
submit.textContent = 'Reset File';
|
|
312
|
+
}
|
|
313
|
+
submit?.toggleAttribute('disabled', false);
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
|
|
317
|
+
openGitCommitDialog() {
|
|
318
|
+
if (!this.isTabActive) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const dialog = this.elements.gitCommitDialog;
|
|
323
|
+
const input = this.elements.gitCommitInput;
|
|
324
|
+
if (!dialog || !input) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
if (this.elements.gitCommitTitle) {
|
|
329
|
+
this.elements.gitCommitTitle.textContent = 'Commit staged changes';
|
|
330
|
+
}
|
|
331
|
+
if (this.elements.gitCommitCopy) {
|
|
332
|
+
const stagedCount = Number(this.gitPanel.status?.summary?.staged || 0);
|
|
333
|
+
this.elements.gitCommitCopy.textContent = stagedCount > 0
|
|
334
|
+
? `${stagedCount} staged file${stagedCount === 1 ? '' : 's'} will be included.`
|
|
335
|
+
: 'All staged changes will be included.';
|
|
336
|
+
}
|
|
337
|
+
if (this.elements.gitCommitSubmit) {
|
|
338
|
+
this.elements.gitCommitSubmit.textContent = 'Commit staged changes';
|
|
339
|
+
}
|
|
340
|
+
input.value = '';
|
|
341
|
+
|
|
342
|
+
if (dialog.open) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
if (typeof dialog.showModal === 'function') {
|
|
346
|
+
dialog.showModal();
|
|
347
|
+
} else {
|
|
348
|
+
dialog.setAttribute('open', 'true');
|
|
349
|
+
}
|
|
350
|
+
requestAnimationFrame(() => {
|
|
351
|
+
input.focus();
|
|
352
|
+
input.select();
|
|
353
|
+
});
|
|
354
|
+
},
|
|
355
|
+
|
|
356
|
+
async handleGitCommitSubmit() {
|
|
357
|
+
const dialog = this.elements.gitCommitDialog;
|
|
358
|
+
const input = this.elements.gitCommitInput;
|
|
359
|
+
const submit = this.elements.gitCommitSubmit;
|
|
360
|
+
const message = String(input?.value ?? '').trim();
|
|
361
|
+
if (!dialog || !input) {
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
if (!message) {
|
|
365
|
+
input.focus();
|
|
366
|
+
this.toastController.show('Commit message cannot be empty');
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
submit?.toggleAttribute('disabled', true);
|
|
371
|
+
if (submit) {
|
|
372
|
+
submit.textContent = 'Committing...';
|
|
373
|
+
}
|
|
374
|
+
try {
|
|
375
|
+
await this.runGitActionWithStatus('Committing changes...', async () => {
|
|
376
|
+
const result = await this.postGitAction(resolveApiUrl('/git/commit'), {
|
|
377
|
+
message,
|
|
378
|
+
});
|
|
379
|
+
await this.finalizeGitAction({
|
|
380
|
+
action: 'commit',
|
|
381
|
+
result,
|
|
382
|
+
});
|
|
383
|
+
});
|
|
384
|
+
dialog.close();
|
|
385
|
+
} catch (error) {
|
|
386
|
+
this.toastController.show(error.message || 'Failed to commit staged changes');
|
|
387
|
+
} finally {
|
|
388
|
+
if (submit) {
|
|
389
|
+
submit.textContent = 'Commit staged changes';
|
|
390
|
+
}
|
|
391
|
+
submit?.toggleAttribute('disabled', false);
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
};
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
export const presenceFeature = {
|
|
2
|
+
updateGlobalUsers(users) {
|
|
3
|
+
this.globalUsers = users;
|
|
4
|
+
this.syncFollowedUser();
|
|
5
|
+
this.renderAvatars();
|
|
6
|
+
this.renderChat();
|
|
7
|
+
this.renderPresence();
|
|
8
|
+
this.syncCurrentUserName();
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
updateFileAwareness(_users) {
|
|
12
|
+
this.syncFollowedUser();
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
renderPresence() {
|
|
16
|
+
const badge = this.elements.userCount;
|
|
17
|
+
if (!badge) return;
|
|
18
|
+
|
|
19
|
+
const hasEditorSession = Boolean(this.session);
|
|
20
|
+
const isExcalidrawRoute = Boolean(this.currentFilePath && this.isExcalidrawFile?.(this.currentFilePath));
|
|
21
|
+
const shouldUseLobbyState = !hasEditorSession && (!this.currentFilePath || isExcalidrawRoute);
|
|
22
|
+
const effectiveConnectionState = shouldUseLobbyState
|
|
23
|
+
? this.lobby?.getConnectionState?.() ?? this.connectionState
|
|
24
|
+
: this.connectionState;
|
|
25
|
+
|
|
26
|
+
if (effectiveConnectionState.status === 'connected') {
|
|
27
|
+
badge.textContent = `${this.globalUsers.length} online`;
|
|
28
|
+
badge.style.opacity = '1';
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (effectiveConnectionState.status === 'connecting') {
|
|
33
|
+
badge.textContent = effectiveConnectionState.unreachable ? 'Unreachable' : 'Connecting...';
|
|
34
|
+
badge.style.opacity = '0.6';
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
badge.textContent = 'Offline';
|
|
39
|
+
badge.style.opacity = '0.6';
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
renderAvatars() {
|
|
43
|
+
const avatars = this.elements.userAvatars;
|
|
44
|
+
if (!avatars) return;
|
|
45
|
+
|
|
46
|
+
avatars.innerHTML = '';
|
|
47
|
+
const visibleUsers = [...this.globalUsers];
|
|
48
|
+
const localIndex = visibleUsers.findIndex((u) => u.isLocal);
|
|
49
|
+
if (localIndex > 0) {
|
|
50
|
+
const [localUser] = visibleUsers.splice(localIndex, 1);
|
|
51
|
+
visibleUsers.unshift(localUser);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const followedIndex = visibleUsers.findIndex((u) => !u.isLocal && u.clientId === this.followedUserClientId);
|
|
55
|
+
const followedInsertIndex = visibleUsers[0]?.isLocal ? 1 : 0;
|
|
56
|
+
if (followedIndex > followedInsertIndex) {
|
|
57
|
+
const [followed] = visibleUsers.splice(followedIndex, 1);
|
|
58
|
+
visibleUsers.splice(followedInsertIndex, 0, followed);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
visibleUsers.slice(0, 5).forEach((user) => {
|
|
62
|
+
const avatar = document.createElement(user.isLocal ? 'div' : 'button');
|
|
63
|
+
avatar.className = 'user-avatar';
|
|
64
|
+
avatar.classList.toggle('is-local', user.isLocal);
|
|
65
|
+
avatar.style.backgroundColor = user.color;
|
|
66
|
+
avatar.classList.toggle('is-following', user.clientId === this.followedUserClientId);
|
|
67
|
+
|
|
68
|
+
const initial = document.createElement('span');
|
|
69
|
+
initial.className = 'user-avatar-initial';
|
|
70
|
+
initial.textContent = user.name.charAt(0).toUpperCase();
|
|
71
|
+
avatar.appendChild(initial);
|
|
72
|
+
|
|
73
|
+
const sameFile = user.currentFile && user.currentFile === this.currentFilePath;
|
|
74
|
+
const fileLabel = user.currentFile ? this.getDisplayName(user.currentFile) : 'No file';
|
|
75
|
+
|
|
76
|
+
if (user.isLocal) {
|
|
77
|
+
const selfLabel = document.createElement('span');
|
|
78
|
+
selfLabel.className = 'user-avatar-self-label';
|
|
79
|
+
selfLabel.textContent = 'You';
|
|
80
|
+
avatar.appendChild(selfLabel);
|
|
81
|
+
avatar.title = `${user.name} (you) — ${fileLabel}`;
|
|
82
|
+
avatar.setAttribute('role', 'img');
|
|
83
|
+
avatar.setAttribute('aria-label', `${user.name} (you) — ${fileLabel}`);
|
|
84
|
+
} else {
|
|
85
|
+
avatar.type = 'button';
|
|
86
|
+
avatar.classList.add('user-avatar-button');
|
|
87
|
+
if (!sameFile) {
|
|
88
|
+
avatar.classList.add('different-file');
|
|
89
|
+
}
|
|
90
|
+
const avatarLabel = user.clientId === this.followedUserClientId
|
|
91
|
+
? `Stop following ${user.name}`
|
|
92
|
+
: sameFile
|
|
93
|
+
? `Follow ${user.name}`
|
|
94
|
+
: `Follow ${user.name} — ${fileLabel}`;
|
|
95
|
+
avatar.title = avatarLabel;
|
|
96
|
+
avatar.setAttribute('aria-label', avatarLabel);
|
|
97
|
+
avatar.addEventListener('click', () => this.toggleFollowUser(user.clientId));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
avatars.appendChild(avatar);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
if (visibleUsers.length > 5) {
|
|
104
|
+
const overflow = document.createElement('div');
|
|
105
|
+
overflow.className = 'user-avatar';
|
|
106
|
+
overflow.style.backgroundColor = 'var(--color-surface-dynamic)';
|
|
107
|
+
overflow.style.color = 'var(--color-text-muted)';
|
|
108
|
+
const overflowLabel = document.createElement('span');
|
|
109
|
+
overflowLabel.className = 'user-avatar-initial';
|
|
110
|
+
overflowLabel.textContent = `+${visibleUsers.length - 5}`;
|
|
111
|
+
overflow.appendChild(overflowLabel);
|
|
112
|
+
avatars.appendChild(overflow);
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
toggleFollowUser(clientId) {
|
|
117
|
+
if (!clientId) return;
|
|
118
|
+
|
|
119
|
+
if (this.followedUserClientId === clientId) {
|
|
120
|
+
this.stopFollowingUser();
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const user = this.globalUsers.find((u) => u.clientId === clientId && !u.isLocal);
|
|
125
|
+
if (!user) return;
|
|
126
|
+
|
|
127
|
+
this.followedUserClientId = clientId;
|
|
128
|
+
this.followedCursorSignature = '';
|
|
129
|
+
this.renderAvatars();
|
|
130
|
+
|
|
131
|
+
if (user.currentFile && user.currentFile !== this.currentFilePath) {
|
|
132
|
+
this.navigation.navigateToFile(user.currentFile);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
requestAnimationFrame(() => {
|
|
137
|
+
if (this.followedUserClientId === clientId) {
|
|
138
|
+
this.followUserCursor(user, { force: true });
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
stopFollowingUser() {
|
|
145
|
+
if (!this.followedUserClientId) return;
|
|
146
|
+
if (this.currentFilePath && this.isExcalidrawFile?.(this.currentFilePath)) {
|
|
147
|
+
void this.excalidrawEmbed?.setFollowedUser(this.currentFilePath, null);
|
|
148
|
+
}
|
|
149
|
+
this.followedUserClientId = null;
|
|
150
|
+
this.followedCursorSignature = '';
|
|
151
|
+
this.renderAvatars();
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
syncFollowedUser() {
|
|
155
|
+
if (!this.followedUserClientId) return;
|
|
156
|
+
const user = this.globalUsers.find((u) => u.clientId === this.followedUserClientId);
|
|
157
|
+
if (!user || user.isLocal) {
|
|
158
|
+
this.stopFollowingUser();
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (user.currentFile && user.currentFile !== this.currentFilePath) {
|
|
163
|
+
this.navigation.navigateToFile(user.currentFile);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
this.followUserCursor(user);
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
followUserCursor(user, { force = false } = {}) {
|
|
171
|
+
if (this.currentFilePath && this.isExcalidrawFile?.(this.currentFilePath)) {
|
|
172
|
+
this.followExcalidrawUser(user, { force });
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const fileClientId = this.resolveFileClientId(user.peerId);
|
|
177
|
+
const liveViewport = fileClientId != null ? this.session?.getUserViewport(fileClientId) : null;
|
|
178
|
+
const liveCursor = fileClientId != null ? this.session?.getUserCursor(fileClientId) : null;
|
|
179
|
+
const cursorHead = liveCursor?.cursorHead ?? null;
|
|
180
|
+
const cursorLine = liveCursor?.cursorLine ?? null;
|
|
181
|
+
const cursorAnchor = liveCursor?.cursorAnchor ?? null;
|
|
182
|
+
const viewportTopLine = liveViewport?.topLine ?? null;
|
|
183
|
+
const viewportRatio = liveViewport?.viewportRatio ?? 0.35;
|
|
184
|
+
|
|
185
|
+
if (!user || (viewportTopLine == null && (cursorHead == null || cursorLine == null))) {
|
|
186
|
+
this.followedCursorSignature = '';
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const nextSig = `${user.clientId}:${viewportTopLine ?? 'no-viewport'}:${cursorAnchor ?? 'no-anchor'}:${cursorHead ?? 'no-head'}`;
|
|
191
|
+
if (!force && nextSig === this.followedCursorSignature) return;
|
|
192
|
+
|
|
193
|
+
const didScroll = (fileClientId != null && this.session?.scrollToUserViewport(fileClientId))
|
|
194
|
+
|| (fileClientId != null && this.session?.scrollToUserCursor(fileClientId, 'center'))
|
|
195
|
+
|| (cursorHead != null && this.session?.scrollToPosition(cursorHead, 'center'))
|
|
196
|
+
|| (cursorLine != null && this.session?.scrollToLine(cursorLine, viewportRatio));
|
|
197
|
+
if (didScroll) this.followedCursorSignature = nextSig;
|
|
198
|
+
},
|
|
199
|
+
|
|
200
|
+
followExcalidrawUser(user, { force = false } = {}) {
|
|
201
|
+
if (!user?.peerId || !this.currentFilePath) {
|
|
202
|
+
this.followedCursorSignature = '';
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const nextSig = `excalidraw:${this.currentFilePath}:${user.peerId}`;
|
|
207
|
+
if (!force && nextSig === this.followedCursorSignature) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
void Promise.resolve(
|
|
212
|
+
this.excalidrawEmbed?.setFollowedUser(this.currentFilePath, user.peerId),
|
|
213
|
+
).then((didApply) => {
|
|
214
|
+
if (didApply === false || this.followedUserClientId !== user.clientId) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
this.followedCursorSignature = nextSig;
|
|
219
|
+
}).catch(() => {});
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
resolveFileClientId(peerId) {
|
|
223
|
+
if (!peerId || !this.session?.awareness) return null;
|
|
224
|
+
for (const [clientId, state] of this.session.awareness.getStates()) {
|
|
225
|
+
if (state.user?.peerId === peerId) return clientId;
|
|
226
|
+
}
|
|
227
|
+
return null;
|
|
228
|
+
},
|
|
229
|
+
};
|