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,145 @@
|
|
|
1
|
+
import { spawn } from 'child_process';
|
|
2
|
+
import readline from 'readline';
|
|
3
|
+
|
|
4
|
+
function getCloudflaredCommand() {
|
|
5
|
+
return process.env.CLOUDFLARED_BIN || 'cloudflared';
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function getTunnelTargetUrl() {
|
|
9
|
+
if (process.env.TUNNEL_TARGET_URL) {
|
|
10
|
+
return process.env.TUNNEL_TARGET_URL;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const host = process.env.TUNNEL_TARGET_HOST || process.env.HOST || '127.0.0.1';
|
|
14
|
+
const port = process.env.TUNNEL_TARGET_PORT || process.env.PORT || '1234';
|
|
15
|
+
|
|
16
|
+
return `http://${host}:${port}`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function getTunnelArgs(targetUrl) {
|
|
20
|
+
const customArgs = (process.env.CLOUDFLARED_EXTRA_ARGS || '')
|
|
21
|
+
.split(/\s+/)
|
|
22
|
+
.map((value) => value.trim())
|
|
23
|
+
.filter(Boolean);
|
|
24
|
+
|
|
25
|
+
return ['tunnel', '--url', targetUrl, ...customArgs];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const targetUrl = getTunnelTargetUrl();
|
|
29
|
+
const cloudflaredCommand = getCloudflaredCommand();
|
|
30
|
+
const cloudflaredArgs = getTunnelArgs(targetUrl);
|
|
31
|
+
let shutdownStarted = false;
|
|
32
|
+
let forceExitTimer = null;
|
|
33
|
+
let shareLinkLogged = false;
|
|
34
|
+
|
|
35
|
+
console.log(`[tunnel] Starting Cloudflare Tunnel for ${targetUrl}`);
|
|
36
|
+
|
|
37
|
+
function buildShareUrl(publicUrl) {
|
|
38
|
+
if (process.env.AUTH_STRATEGY !== 'password' || !process.env.AUTH_PASSWORD) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
try {
|
|
43
|
+
const shareUrl = new URL(publicUrl);
|
|
44
|
+
shareUrl.hash = new URLSearchParams({
|
|
45
|
+
auth_password: process.env.AUTH_PASSWORD,
|
|
46
|
+
}).toString();
|
|
47
|
+
return shareUrl.toString();
|
|
48
|
+
} catch {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function maybeLogShareLink(line) {
|
|
54
|
+
if (shareLinkLogged) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const match = String(line).match(/https:\/\/[a-z0-9.-]+\.trycloudflare\.com\b/i);
|
|
59
|
+
if (!match) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const shareUrl = buildShareUrl(match[0]);
|
|
64
|
+
if (!shareUrl) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
shareLinkLogged = true;
|
|
69
|
+
console.log(`[tunnel] Share URL: ${shareUrl}`);
|
|
70
|
+
console.log('[tunnel] The password is stored in the URL fragment. It is not sent to the server, but anyone with the full URL can use it.');
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const child = spawn(cloudflaredCommand, cloudflaredArgs, {
|
|
74
|
+
env: process.env,
|
|
75
|
+
stdio: ['inherit', 'pipe', 'pipe'],
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const stdoutInterface = readline.createInterface({ input: child.stdout });
|
|
79
|
+
stdoutInterface.on('line', (line) => {
|
|
80
|
+
console.log(line);
|
|
81
|
+
maybeLogShareLink(line);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
const stderrInterface = readline.createInterface({ input: child.stderr });
|
|
85
|
+
stderrInterface.on('line', (line) => {
|
|
86
|
+
console.error(line);
|
|
87
|
+
maybeLogShareLink(line);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
child.on('error', (error) => {
|
|
91
|
+
if (error.code === 'ENOENT') {
|
|
92
|
+
console.error(`[tunnel] Could not find "${cloudflaredCommand}". Install Cloudflare Tunnel first: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/`);
|
|
93
|
+
} else {
|
|
94
|
+
console.error('[tunnel] Failed to start Cloudflare Tunnel:', error.message);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
process.exit(1);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
function shutdown(signal) {
|
|
101
|
+
if (shutdownStarted) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
shutdownStarted = true;
|
|
106
|
+
console.log(`[tunnel] Received ${signal}, shutting down`);
|
|
107
|
+
|
|
108
|
+
if (child.exitCode === null && !child.killed) {
|
|
109
|
+
child.kill(signal);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
forceExitTimer = setTimeout(() => {
|
|
113
|
+
if (child.exitCode === null && !child.killed) {
|
|
114
|
+
child.kill('SIGKILL');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
process.exit(1);
|
|
118
|
+
}, 5000);
|
|
119
|
+
forceExitTimer.unref?.();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
process.once('SIGINT', () => shutdown('SIGINT'));
|
|
123
|
+
process.once('SIGTERM', () => shutdown('SIGTERM'));
|
|
124
|
+
|
|
125
|
+
child.on('exit', (code, signal) => {
|
|
126
|
+
stdoutInterface.close();
|
|
127
|
+
stderrInterface.close();
|
|
128
|
+
|
|
129
|
+
if (forceExitTimer) {
|
|
130
|
+
clearTimeout(forceExitTimer);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (shutdownStarted) {
|
|
134
|
+
process.exit(code ?? 0);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (signal) {
|
|
139
|
+
console.error(`[tunnel] Cloudflare Tunnel exited from signal ${signal}`);
|
|
140
|
+
process.exit(1);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
process.exit(code ?? 0);
|
|
145
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { dirname, resolve } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const scriptPath = fileURLToPath(import.meta.url);
|
|
6
|
+
const scriptDir = dirname(scriptPath);
|
|
7
|
+
const projectRoot = resolve(scriptDir, '..');
|
|
8
|
+
const composeFile = resolve(projectRoot, 'docker-compose.yml');
|
|
9
|
+
|
|
10
|
+
function runCommand(command, args, { env = process.env } = {}) {
|
|
11
|
+
return new Promise((resolvePromise, rejectPromise) => {
|
|
12
|
+
const child = spawn(command, args, {
|
|
13
|
+
cwd: projectRoot,
|
|
14
|
+
env,
|
|
15
|
+
stdio: 'inherit',
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
child.on('error', rejectPromise);
|
|
19
|
+
child.on('exit', (code) => {
|
|
20
|
+
if (code === 0) {
|
|
21
|
+
resolvePromise();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
rejectPromise(new Error(`${command} ${args.join(' ')} exited with code ${code}`));
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function getLocalPlantUmlHostPort() {
|
|
31
|
+
const rawValue = process.env.PLANTUML_HOST_PORT || '18080';
|
|
32
|
+
const parsed = Number.parseInt(rawValue, 10);
|
|
33
|
+
|
|
34
|
+
if (!Number.isInteger(parsed) || parsed <= 0) {
|
|
35
|
+
throw new Error(`Invalid PLANTUML_HOST_PORT: ${rawValue}`);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return parsed;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function getLocalPlantUmlServerUrl() {
|
|
42
|
+
return `http://127.0.0.1:${getLocalPlantUmlHostPort()}`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function getComposeArgs(command) {
|
|
46
|
+
return ['compose', '-f', composeFile, ...command];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export async function startLocalPlantUmlComposeService() {
|
|
50
|
+
await runCommand('docker', getComposeArgs(['up', '-d', 'plantuml']));
|
|
51
|
+
return getLocalPlantUmlServerUrl();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export async function stopLocalPlantUmlComposeService() {
|
|
55
|
+
await runCommand('docker', getComposeArgs(['stop', 'plantuml']));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function main() {
|
|
59
|
+
const command = process.argv[2] || 'up';
|
|
60
|
+
|
|
61
|
+
if (command === 'up') {
|
|
62
|
+
const url = await startLocalPlantUmlComposeService();
|
|
63
|
+
console.log(`[plantuml] Local PlantUML server is available at ${url}`);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (command === 'down') {
|
|
68
|
+
await stopLocalPlantUmlComposeService();
|
|
69
|
+
console.log('[plantuml] Local PlantUML server stopped');
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (command === 'url') {
|
|
74
|
+
console.log(getLocalPlantUmlServerUrl());
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
console.error('Usage: node scripts/local-plantuml-compose.mjs [up|down|url]');
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (process.argv[1] && resolve(process.argv[1]) === scriptPath) {
|
|
83
|
+
main().catch((error) => {
|
|
84
|
+
if (error.code === 'ENOENT') {
|
|
85
|
+
console.error('[plantuml] Docker is not available. Install Docker Desktop or Docker Engine first.');
|
|
86
|
+
} else {
|
|
87
|
+
console.error(`[plantuml] ${error.message}`);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
process.exit(1);
|
|
91
|
+
});
|
|
92
|
+
}
|
package/server.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './src/server/index.js';
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
export const chatFeature = {
|
|
2
|
+
updateChatMessages(messages, { initial = false } = {}) {
|
|
3
|
+
const previousIds = new Set(this.chatMessageIds);
|
|
4
|
+
const localPeerId = this.lobby.getLocalUser()?.peerId ?? null;
|
|
5
|
+
|
|
6
|
+
this.chatMessages = messages;
|
|
7
|
+
this.chatMessageIds = new Set(messages.map((message) => message.id));
|
|
8
|
+
|
|
9
|
+
if (!this.chatInitialSyncComplete) {
|
|
10
|
+
if (initial) {
|
|
11
|
+
this.chatInitialSyncComplete = true;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
this.renderChat();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const newRemoteMessages = messages.filter((message) => (
|
|
19
|
+
!previousIds.has(message.id)
|
|
20
|
+
&& message.peerId
|
|
21
|
+
&& message.peerId !== localPeerId
|
|
22
|
+
));
|
|
23
|
+
|
|
24
|
+
if (this.chatIsOpen) {
|
|
25
|
+
this.chatUnreadCount = 0;
|
|
26
|
+
} else if (newRemoteMessages.length > 0) {
|
|
27
|
+
this.chatUnreadCount += newRemoteMessages.length;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
for (const message of newRemoteMessages) {
|
|
31
|
+
this.maybeNotifyChatMessage(message);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
this.renderChat();
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
toggleChatPanel() {
|
|
38
|
+
if (this.chatIsOpen) {
|
|
39
|
+
this.closeChatPanel();
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
this.openChatPanel();
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
openChatPanel() {
|
|
47
|
+
this.chatIsOpen = true;
|
|
48
|
+
this.chatUnreadCount = 0;
|
|
49
|
+
this.renderChat();
|
|
50
|
+
requestAnimationFrame(() => {
|
|
51
|
+
this.elements.chatInput?.focus();
|
|
52
|
+
this.scrollChatToBottom();
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
closeChatPanel() {
|
|
57
|
+
if (!this.chatIsOpen) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
this.chatIsOpen = false;
|
|
62
|
+
this.renderChat();
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
handleChatSubmit() {
|
|
66
|
+
if (!this.isTabActive) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const input = this.elements.chatInput;
|
|
71
|
+
if (!input) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const sentMessage = this.lobby.sendChatMessage(input.value);
|
|
76
|
+
if (!sentMessage) {
|
|
77
|
+
input.focus();
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
input.value = '';
|
|
82
|
+
if (!this.chatIsOpen) {
|
|
83
|
+
this.openChatPanel();
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
this.renderChat();
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
renderChat() {
|
|
91
|
+
this.elements.chatContainer?.classList.toggle('is-open', this.chatIsOpen);
|
|
92
|
+
this.elements.chatPanel?.classList.toggle('hidden', !this.chatIsOpen);
|
|
93
|
+
|
|
94
|
+
this.syncChatToggleButton();
|
|
95
|
+
this.syncChatNotificationButton();
|
|
96
|
+
|
|
97
|
+
const list = this.elements.chatMessages;
|
|
98
|
+
const emptyState = this.elements.chatEmptyState;
|
|
99
|
+
|
|
100
|
+
if (this.elements.chatStatus) {
|
|
101
|
+
this.elements.chatStatus.textContent = this.chatInitialSyncComplete
|
|
102
|
+
? `${this.globalUsers.length} online`
|
|
103
|
+
: 'Syncing...';
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (!list) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
list.replaceChildren();
|
|
111
|
+
|
|
112
|
+
if (this.chatMessages.length === 0) {
|
|
113
|
+
emptyState?.classList.remove('hidden');
|
|
114
|
+
list.classList.add('hidden');
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
emptyState?.classList.add('hidden');
|
|
119
|
+
list.classList.remove('hidden');
|
|
120
|
+
|
|
121
|
+
const fragment = document.createDocumentFragment();
|
|
122
|
+
this.chatMessages.forEach((message) => {
|
|
123
|
+
fragment.appendChild(this.createChatMessageElement(message));
|
|
124
|
+
});
|
|
125
|
+
list.appendChild(fragment);
|
|
126
|
+
|
|
127
|
+
if (this.chatIsOpen) {
|
|
128
|
+
this.scrollChatToBottom();
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
createChatMessageElement(message) {
|
|
133
|
+
const item = document.createElement('article');
|
|
134
|
+
const isLocal = message.peerId === this.lobby.getLocalUser()?.peerId;
|
|
135
|
+
item.className = 'chat-message';
|
|
136
|
+
item.classList.toggle('is-local', isLocal);
|
|
137
|
+
|
|
138
|
+
const avatar = document.createElement('div');
|
|
139
|
+
avatar.className = 'chat-message-avatar';
|
|
140
|
+
avatar.style.backgroundColor = message.userColor || 'var(--color-primary)';
|
|
141
|
+
avatar.textContent = (message.userName || '?').charAt(0).toUpperCase();
|
|
142
|
+
avatar.setAttribute('aria-hidden', 'true');
|
|
143
|
+
|
|
144
|
+
const body = document.createElement('div');
|
|
145
|
+
body.className = 'chat-message-body';
|
|
146
|
+
|
|
147
|
+
const meta = document.createElement('div');
|
|
148
|
+
meta.className = 'chat-message-meta';
|
|
149
|
+
|
|
150
|
+
const author = document.createElement('span');
|
|
151
|
+
author.className = 'chat-message-author';
|
|
152
|
+
author.textContent = isLocal ? `${message.userName} (you)` : message.userName;
|
|
153
|
+
|
|
154
|
+
const time = document.createElement('span');
|
|
155
|
+
time.className = 'chat-message-time';
|
|
156
|
+
time.textContent = this.formatChatTimestamp(message.createdAt);
|
|
157
|
+
|
|
158
|
+
meta.append(author, time);
|
|
159
|
+
|
|
160
|
+
const fileLabel = this.getChatMessageFileLabel(message.filePath);
|
|
161
|
+
if (fileLabel) {
|
|
162
|
+
const file = document.createElement('span');
|
|
163
|
+
file.className = 'chat-message-file';
|
|
164
|
+
file.textContent = fileLabel;
|
|
165
|
+
meta.append(file);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const text = document.createElement('p');
|
|
169
|
+
text.className = 'chat-message-text';
|
|
170
|
+
text.textContent = message.text;
|
|
171
|
+
|
|
172
|
+
body.append(meta, text);
|
|
173
|
+
item.append(avatar, body);
|
|
174
|
+
return item;
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
scrollChatToBottom() {
|
|
178
|
+
const list = this.elements.chatMessages;
|
|
179
|
+
if (!list) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
requestAnimationFrame(() => {
|
|
184
|
+
list.scrollTop = list.scrollHeight;
|
|
185
|
+
});
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
formatChatTimestamp(value) {
|
|
189
|
+
if (!Number.isFinite(value)) {
|
|
190
|
+
return '';
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
try {
|
|
194
|
+
return this.chatTimeFormatter.format(new Date(value));
|
|
195
|
+
} catch {
|
|
196
|
+
return '';
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
|
|
200
|
+
getChatMessageFileLabel(filePath) {
|
|
201
|
+
if (!filePath) {
|
|
202
|
+
return '';
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return this.getDisplayName(filePath);
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
formatChatToastMessage(message) {
|
|
209
|
+
const sender = message?.userName || 'Someone';
|
|
210
|
+
const text = String(message?.text ?? '').replace(/\s+/g, ' ').trim();
|
|
211
|
+
const compactText = text.length > 88 ? `${text.slice(0, 85).trimEnd()}...` : text;
|
|
212
|
+
return `${sender}: ${compactText}`;
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
syncChatToggleButton() {
|
|
216
|
+
const button = this.elements.chatToggleButton;
|
|
217
|
+
const badge = this.elements.chatToggleBadge;
|
|
218
|
+
if (!button) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
const hasUnread = this.chatUnreadCount > 0;
|
|
223
|
+
const shouldEmphasizeUnread = hasUnread && !this.chatIsOpen;
|
|
224
|
+
|
|
225
|
+
button.classList.toggle('is-active', this.chatIsOpen);
|
|
226
|
+
button.classList.toggle('is-unread', shouldEmphasizeUnread);
|
|
227
|
+
button.setAttribute('aria-expanded', String(this.chatIsOpen));
|
|
228
|
+
button.setAttribute(
|
|
229
|
+
'aria-label',
|
|
230
|
+
hasUnread ? `Open team chat, ${this.chatUnreadCount} unread` : 'Open team chat',
|
|
231
|
+
);
|
|
232
|
+
button.title = this.chatUnreadCount > 0
|
|
233
|
+
? `Team chat (${this.chatUnreadCount} unread)`
|
|
234
|
+
: 'Team chat';
|
|
235
|
+
|
|
236
|
+
if (!badge) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
badge.classList.toggle('hidden', !hasUnread);
|
|
241
|
+
badge.textContent = this.chatUnreadCount > 9 ? '9+' : String(this.chatUnreadCount);
|
|
242
|
+
},
|
|
243
|
+
|
|
244
|
+
syncChatNotificationButton() {
|
|
245
|
+
const button = this.elements.chatNotificationButton;
|
|
246
|
+
if (!button) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const permission = this.notifications.getPermission();
|
|
251
|
+
this.chatNotificationPermission = permission;
|
|
252
|
+
|
|
253
|
+
let label = 'Enable alerts';
|
|
254
|
+
let title = 'Enable browser notifications for new chat messages';
|
|
255
|
+
let pressed = false;
|
|
256
|
+
|
|
257
|
+
if (permission === 'unsupported') {
|
|
258
|
+
label = 'No alerts';
|
|
259
|
+
title = 'Browser notifications are unavailable here';
|
|
260
|
+
} else if (permission === 'denied') {
|
|
261
|
+
label = 'Alerts blocked';
|
|
262
|
+
title = 'Browser notifications are blocked for this site';
|
|
263
|
+
} else if (permission === 'granted') {
|
|
264
|
+
pressed = this.chatNotificationsEnabled;
|
|
265
|
+
label = pressed ? 'Alerts on' : 'Alerts off';
|
|
266
|
+
title = pressed
|
|
267
|
+
? 'Disable browser notifications for chat'
|
|
268
|
+
: 'Enable browser notifications for chat';
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
button.textContent = label;
|
|
272
|
+
button.title = title;
|
|
273
|
+
button.setAttribute('aria-pressed', String(pressed));
|
|
274
|
+
button.classList.toggle('is-enabled', pressed);
|
|
275
|
+
button.classList.toggle('is-blocked', permission === 'denied');
|
|
276
|
+
},
|
|
277
|
+
|
|
278
|
+
async handleChatNotificationToggle() {
|
|
279
|
+
const permission = this.notifications.getPermission();
|
|
280
|
+
this.chatNotificationPermission = permission;
|
|
281
|
+
|
|
282
|
+
if (permission === 'unsupported') {
|
|
283
|
+
this.toastController.show('Browser notifications are unavailable here');
|
|
284
|
+
this.syncChatNotificationButton();
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (permission === 'denied') {
|
|
289
|
+
this.chatNotificationsEnabled = false;
|
|
290
|
+
this.preferences.setChatNotificationsEnabled(false);
|
|
291
|
+
this.toastController.show('Browser notifications are blocked for this site');
|
|
292
|
+
this.syncChatNotificationButton();
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (permission === 'default') {
|
|
297
|
+
const nextPermission = await this.notifications.requestPermission();
|
|
298
|
+
this.chatNotificationPermission = nextPermission;
|
|
299
|
+
|
|
300
|
+
if (nextPermission !== 'granted') {
|
|
301
|
+
this.chatNotificationsEnabled = false;
|
|
302
|
+
this.preferences.setChatNotificationsEnabled(false);
|
|
303
|
+
if (nextPermission === 'denied') {
|
|
304
|
+
this.toastController.show('Browser notifications were blocked');
|
|
305
|
+
}
|
|
306
|
+
this.syncChatNotificationButton();
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
this.chatNotificationsEnabled = true;
|
|
311
|
+
this.preferences.setChatNotificationsEnabled(true);
|
|
312
|
+
this.syncChatNotificationButton();
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
this.chatNotificationsEnabled = !this.chatNotificationsEnabled;
|
|
317
|
+
this.preferences.setChatNotificationsEnabled(this.chatNotificationsEnabled);
|
|
318
|
+
this.syncChatNotificationButton();
|
|
319
|
+
},
|
|
320
|
+
|
|
321
|
+
maybeNotifyChatMessage(message) {
|
|
322
|
+
if (!this.chatInitialSyncComplete) {
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
if (document.hidden) {
|
|
327
|
+
this.maybeShowBrowserChatNotification(message);
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (!this.isTabActive || this.chatIsOpen) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
(this.chatToastController ?? this.toastController).show(this.formatChatToastMessage(message), 4000);
|
|
336
|
+
},
|
|
337
|
+
|
|
338
|
+
maybeShowBrowserChatNotification(message) {
|
|
339
|
+
if (!this.chatNotificationsEnabled || this.notifications.getPermission() !== 'granted') {
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const title = `CollabMD chat • ${message.userName}`;
|
|
344
|
+
const fileLabel = this.getChatMessageFileLabel(message.filePath);
|
|
345
|
+
const body = fileLabel ? `${fileLabel}: ${message.text}` : message.text;
|
|
346
|
+
const notification = this.notifications.createNotification({
|
|
347
|
+
body,
|
|
348
|
+
onClick: () => {
|
|
349
|
+
if (message.filePath) {
|
|
350
|
+
this.navigation.navigateToFile(message.filePath);
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
tag: `collabmd-chat-${message.id}`,
|
|
354
|
+
title,
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
if (notification) {
|
|
358
|
+
setTimeout(() => {
|
|
359
|
+
notification.close?.();
|
|
360
|
+
}, 6000);
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { getVaultFileKind, supportsCommentsForFilePath } from '../../../domain/file-kind.js';
|
|
2
|
+
|
|
3
|
+
export const commentsFeature = {
|
|
4
|
+
getCommentFileKind(filePath = this.currentFilePath) {
|
|
5
|
+
return getVaultFileKind(filePath) || 'markdown';
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
syncCommentChrome(filePath = this.currentFilePath) {
|
|
9
|
+
const supported = supportsCommentsForFilePath(filePath) && !this.isExcalidrawFile(filePath);
|
|
10
|
+
this.commentUi.setCurrentFile(filePath, {
|
|
11
|
+
fileKind: this.getCommentFileKind(filePath),
|
|
12
|
+
supported,
|
|
13
|
+
});
|
|
14
|
+
this.handleCommentThreadsChange(this.session?.getCommentThreads?.() ?? []);
|
|
15
|
+
this.handleCommentSelectionChange(this.session?.getCurrentSelectionCommentAnchor?.() ?? null);
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
handleCommentSelectionChange(anchor) {
|
|
19
|
+
this.commentUi.setSelectionAnchor(anchor);
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
handleCommentThreadsChange(threads = []) {
|
|
23
|
+
this.commentUi.setThreads(threads);
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
handleCommentEditorContentChange() {
|
|
27
|
+
this.commentUi.handleEditorContentChange();
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
refreshCommentUiLayout() {
|
|
31
|
+
this.commentUi.refreshLayout();
|
|
32
|
+
},
|
|
33
|
+
};
|