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,656 @@
|
|
|
1
|
+
import { escapeHtml } from '../domain/vault-utils.js';
|
|
2
|
+
import { resolveApiUrl } from '../domain/runtime-paths.js';
|
|
3
|
+
|
|
4
|
+
function getPathLeaf(pathValue) {
|
|
5
|
+
return String(pathValue ?? '').split('/').pop() || '';
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function badgeClass(status) {
|
|
9
|
+
switch (status) {
|
|
10
|
+
case 'added':
|
|
11
|
+
case 'untracked':
|
|
12
|
+
return 'added';
|
|
13
|
+
case 'deleted':
|
|
14
|
+
return 'deleted';
|
|
15
|
+
case 'renamed':
|
|
16
|
+
return 'renamed';
|
|
17
|
+
default:
|
|
18
|
+
return 'modified';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function commonPrefixLength(left, right) {
|
|
23
|
+
let index = 0;
|
|
24
|
+
while (index < left.length && index < right.length && left[index] === right[index]) {
|
|
25
|
+
index += 1;
|
|
26
|
+
}
|
|
27
|
+
return index;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function commonSuffixLength(left, right, prefixLength) {
|
|
31
|
+
let index = 0;
|
|
32
|
+
const maxLength = Math.min(left.length, right.length) - prefixLength;
|
|
33
|
+
while (index < maxLength) {
|
|
34
|
+
const leftIndex = left.length - 1 - index;
|
|
35
|
+
const rightIndex = right.length - 1 - index;
|
|
36
|
+
if (left[leftIndex] !== right[rightIndex]) {
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
index += 1;
|
|
40
|
+
}
|
|
41
|
+
return index;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function highlightPair(leftText, rightText) {
|
|
45
|
+
const prefixLength = commonPrefixLength(leftText, rightText);
|
|
46
|
+
const suffixLength = commonSuffixLength(leftText, rightText, prefixLength);
|
|
47
|
+
const leftChangedEnd = Math.max(prefixLength, leftText.length - suffixLength);
|
|
48
|
+
const rightChangedEnd = Math.max(prefixLength, rightText.length - suffixLength);
|
|
49
|
+
|
|
50
|
+
const leftHtml = `${escapeHtml(leftText.slice(0, prefixLength))}${leftChangedEnd > prefixLength ? `<span class="diff-highlight-del">${escapeHtml(leftText.slice(prefixLength, leftChangedEnd))}</span>` : ''}${escapeHtml(leftText.slice(leftChangedEnd))}`;
|
|
51
|
+
const rightHtml = `${escapeHtml(rightText.slice(0, prefixLength))}${rightChangedEnd > prefixLength ? `<span class="diff-highlight-add">${escapeHtml(rightText.slice(prefixLength, rightChangedEnd))}</span>` : ''}${escapeHtml(rightText.slice(rightChangedEnd))}`;
|
|
52
|
+
|
|
53
|
+
return { leftHtml, rightHtml };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function createPairedBlocks(lines = []) {
|
|
57
|
+
const blocks = [];
|
|
58
|
+
|
|
59
|
+
for (let index = 0; index < lines.length; index += 1) {
|
|
60
|
+
const line = lines[index];
|
|
61
|
+
if (line.type === 'context' || line.type === 'note') {
|
|
62
|
+
blocks.push({ additions: [], context: [line], deletions: [] });
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (line.type !== 'deletion' && line.type !== 'addition') {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const deletions = [];
|
|
71
|
+
const additions = [];
|
|
72
|
+
|
|
73
|
+
while (index < lines.length && lines[index].type === 'deletion') {
|
|
74
|
+
deletions.push(lines[index]);
|
|
75
|
+
index += 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
while (index < lines.length && lines[index].type === 'addition') {
|
|
79
|
+
additions.push(lines[index]);
|
|
80
|
+
index += 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
index -= 1;
|
|
84
|
+
blocks.push({ additions, context: [], deletions });
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return blocks;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function renderUnifiedLine(line, prefix, contentHtml) {
|
|
91
|
+
const oldLine = Number.isInteger(line.oldLine) ? line.oldLine : '';
|
|
92
|
+
const newLine = Number.isInteger(line.newLine) ? line.newLine : '';
|
|
93
|
+
const lineClass = line.type === 'note' ? 'note' : line.type;
|
|
94
|
+
const renderedPrefix = line.type === 'context' || line.type === 'note' ? ' ' : prefix;
|
|
95
|
+
|
|
96
|
+
return `
|
|
97
|
+
<div class="diff-line ${lineClass}">
|
|
98
|
+
<div class="diff-line-numbers">
|
|
99
|
+
<span class="diff-line-num">${oldLine}</span>
|
|
100
|
+
<span class="diff-line-num">${newLine}</span>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="diff-line-prefix">${escapeHtml(renderedPrefix)}</div>
|
|
103
|
+
<div class="diff-line-content">${contentHtml}</div>
|
|
104
|
+
</div>
|
|
105
|
+
`;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function renderSplitRow(leftLine, rightLine) {
|
|
109
|
+
let leftHtml = leftLine ? escapeHtml(leftLine.content) : '';
|
|
110
|
+
let rightHtml = rightLine ? escapeHtml(rightLine.content) : '';
|
|
111
|
+
|
|
112
|
+
if (leftLine && rightLine && leftLine.type === 'deletion' && rightLine.type === 'addition') {
|
|
113
|
+
const highlighted = highlightPair(leftLine.content, rightLine.content);
|
|
114
|
+
leftHtml = highlighted.leftHtml;
|
|
115
|
+
rightHtml = highlighted.rightHtml;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return `
|
|
119
|
+
<div class="diff-split-row">
|
|
120
|
+
<div class="diff-split-line ${leftLine?.type || 'empty'}">
|
|
121
|
+
<span class="diff-split-num">${Number.isInteger(leftLine?.oldLine) ? leftLine.oldLine : ''}</span>
|
|
122
|
+
<span class="diff-split-content">${leftHtml}</span>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="diff-split-line ${rightLine?.type || 'empty'}">
|
|
125
|
+
<span class="diff-split-num">${Number.isInteger(rightLine?.newLine) ? rightLine.newLine : ''}</span>
|
|
126
|
+
<span class="diff-split-content">${rightHtml}</span>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
`;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export class GitDiffViewController {
|
|
133
|
+
constructor({
|
|
134
|
+
onCommitStaged = null,
|
|
135
|
+
onOpenFile = null,
|
|
136
|
+
onStageFile = null,
|
|
137
|
+
onUnstageFile = null,
|
|
138
|
+
toastController = null,
|
|
139
|
+
} = {}) {
|
|
140
|
+
this.onCommitStaged = onCommitStaged;
|
|
141
|
+
this.onOpenFile = onOpenFile;
|
|
142
|
+
this.onStageFile = onStageFile;
|
|
143
|
+
this.onUnstageFile = onUnstageFile;
|
|
144
|
+
this.toastController = toastController;
|
|
145
|
+
this.page = document.getElementById('diff-page');
|
|
146
|
+
this.content = document.getElementById('diffContent');
|
|
147
|
+
this.scrollContainer = document.getElementById('diffScroll');
|
|
148
|
+
this.fileIndicator = document.getElementById('diffFileIndicator');
|
|
149
|
+
this.openEditorButton = document.getElementById('diffOpenEditorBtn');
|
|
150
|
+
this.primaryActionButton = document.getElementById('diffPrimaryActionBtn');
|
|
151
|
+
this.commitButton = document.getElementById('diffCommitBtn');
|
|
152
|
+
this.stats = document.getElementById('diffStats');
|
|
153
|
+
this.prevButton = document.getElementById('diffPrevBtn');
|
|
154
|
+
this.nextButton = document.getElementById('diffNextBtn');
|
|
155
|
+
this.modeButtons = Array.from(document.querySelectorAll('[data-diff-mode]'));
|
|
156
|
+
this.mode = 'unified';
|
|
157
|
+
this.data = null;
|
|
158
|
+
this.currentIndex = 0;
|
|
159
|
+
this.fileCache = new Map();
|
|
160
|
+
this.loadingFilePath = null;
|
|
161
|
+
this.requestScope = 'all';
|
|
162
|
+
this.pendingAction = null;
|
|
163
|
+
this.repoStatus = null;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
initialize() {
|
|
167
|
+
this.prevButton?.addEventListener('click', () => this.navigateFile(-1));
|
|
168
|
+
this.nextButton?.addEventListener('click', () => this.navigateFile(1));
|
|
169
|
+
this.openEditorButton?.addEventListener('click', () => {
|
|
170
|
+
const currentFile = this.getCurrentFile();
|
|
171
|
+
if (!currentFile?.path) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
this.onOpenFile?.(currentFile.path);
|
|
176
|
+
});
|
|
177
|
+
this.primaryActionButton?.addEventListener('click', () => {
|
|
178
|
+
const action = this.getPrimaryAction();
|
|
179
|
+
if (!action) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
void this.handleFileAction(action);
|
|
184
|
+
});
|
|
185
|
+
this.commitButton?.addEventListener('click', () => {
|
|
186
|
+
void this.handleFileAction('commit');
|
|
187
|
+
});
|
|
188
|
+
this.content?.addEventListener('click', (event) => {
|
|
189
|
+
const loadButton = event.target instanceof Element
|
|
190
|
+
? event.target.closest('[data-load-full-diff]')
|
|
191
|
+
: null;
|
|
192
|
+
if (loadButton) {
|
|
193
|
+
void this.loadCurrentFile({ forceFullPatch: true });
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
this.modeButtons.forEach((button) => {
|
|
197
|
+
button.addEventListener('click', () => {
|
|
198
|
+
const nextMode = button.getAttribute('data-diff-mode');
|
|
199
|
+
if (!nextMode || nextMode === this.mode) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
this.mode = nextMode;
|
|
203
|
+
this.render();
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
hide() {
|
|
209
|
+
this.page?.classList.add('hidden');
|
|
210
|
+
if (this.content) {
|
|
211
|
+
this.content.innerHTML = '';
|
|
212
|
+
}
|
|
213
|
+
this.data = null;
|
|
214
|
+
this.currentIndex = 0;
|
|
215
|
+
this.fileCache.clear();
|
|
216
|
+
this.loadingFilePath = null;
|
|
217
|
+
this.pendingAction = null;
|
|
218
|
+
this.repoStatus = null;
|
|
219
|
+
this.syncToolbar();
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
async open({ filePath = null, scope = 'all' } = {}) {
|
|
223
|
+
this.fileCache.clear();
|
|
224
|
+
this.loadingFilePath = null;
|
|
225
|
+
this.requestScope = scope;
|
|
226
|
+
this.renderLoading('Loading diff summary...');
|
|
227
|
+
|
|
228
|
+
try {
|
|
229
|
+
const query = new URLSearchParams();
|
|
230
|
+
query.set('scope', scope);
|
|
231
|
+
if (filePath) {
|
|
232
|
+
query.set('path', filePath);
|
|
233
|
+
}
|
|
234
|
+
query.set('metaOnly', 'true');
|
|
235
|
+
|
|
236
|
+
const response = await fetch(resolveApiUrl(`/git/diff?${query.toString()}`));
|
|
237
|
+
const data = await response.json();
|
|
238
|
+
if (!response.ok) {
|
|
239
|
+
throw new Error(data.error || 'Failed to load git diff');
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
this.data = data;
|
|
243
|
+
const initialIndex = filePath
|
|
244
|
+
? Math.max(0, data.files.findIndex((file) => file.path === filePath))
|
|
245
|
+
: 0;
|
|
246
|
+
this.currentIndex = initialIndex;
|
|
247
|
+
if ((data.files?.length ?? 0) === 0) {
|
|
248
|
+
this.render();
|
|
249
|
+
return data;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
await this.loadCurrentFile();
|
|
253
|
+
return data;
|
|
254
|
+
} catch (error) {
|
|
255
|
+
console.error('[git-diff] Failed to load diff:', error);
|
|
256
|
+
this.toastController?.show('Failed to load git diff');
|
|
257
|
+
this.data = {
|
|
258
|
+
files: [],
|
|
259
|
+
metaOnly: false,
|
|
260
|
+
summary: { additions: 0, deletions: 0, filesChanged: 0 },
|
|
261
|
+
};
|
|
262
|
+
this.renderEmpty('Failed to load git diff');
|
|
263
|
+
return this.data;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
navigateFile(direction) {
|
|
268
|
+
if (!this.data?.files?.length) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
const nextIndex = Math.max(0, Math.min(this.currentIndex + direction, this.data.files.length - 1));
|
|
273
|
+
if (nextIndex === this.currentIndex) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
this.currentIndex = nextIndex;
|
|
278
|
+
this.scrollContainer?.scrollTo({ top: 0, behavior: 'auto' });
|
|
279
|
+
void this.loadCurrentFile();
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
renderLoading(message = 'Loading git diff...') {
|
|
283
|
+
this.page?.classList.remove('hidden');
|
|
284
|
+
if (this.content) {
|
|
285
|
+
this.content.innerHTML = `<div class="diff-empty-state">${escapeHtml(message)}</div>`;
|
|
286
|
+
}
|
|
287
|
+
this.data = null;
|
|
288
|
+
this.syncToolbar();
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
renderEmpty(message) {
|
|
292
|
+
this.page?.classList.remove('hidden');
|
|
293
|
+
if (this.content) {
|
|
294
|
+
this.content.innerHTML = `<div class="diff-empty-state">${escapeHtml(message)}</div>`;
|
|
295
|
+
}
|
|
296
|
+
this.syncToolbar();
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
renderUnifiedHunk(hunk) {
|
|
300
|
+
const markup = [];
|
|
301
|
+
for (const block of createPairedBlocks(hunk.lines)) {
|
|
302
|
+
if (block.context.length > 0) {
|
|
303
|
+
for (const line of block.context) {
|
|
304
|
+
markup.push(renderUnifiedLine(line, ' ', escapeHtml(line.content)));
|
|
305
|
+
}
|
|
306
|
+
continue;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
const pairCount = Math.max(block.deletions.length, block.additions.length);
|
|
310
|
+
for (let index = 0; index < pairCount; index += 1) {
|
|
311
|
+
const deletion = block.deletions[index] ?? null;
|
|
312
|
+
const addition = block.additions[index] ?? null;
|
|
313
|
+
const highlighted = deletion && addition
|
|
314
|
+
? highlightPair(deletion.content, addition.content)
|
|
315
|
+
: null;
|
|
316
|
+
|
|
317
|
+
if (deletion) {
|
|
318
|
+
markup.push(renderUnifiedLine(deletion, '-', highlighted?.leftHtml ?? escapeHtml(deletion.content)));
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
if (addition) {
|
|
322
|
+
markup.push(renderUnifiedLine(addition, '+', highlighted?.rightHtml ?? escapeHtml(addition.content)));
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
return `
|
|
328
|
+
<div class="diff-hunk-header">${escapeHtml(hunk.header)}</div>
|
|
329
|
+
${markup.join('')}
|
|
330
|
+
`;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
renderUnifiedFile(file, index) {
|
|
334
|
+
return `
|
|
335
|
+
<section class="diff-file-block" data-diff-file-index="${index}">
|
|
336
|
+
<div class="diff-file-header">
|
|
337
|
+
<span class="diff-file-path">${escapeHtml(file.path)}</span>
|
|
338
|
+
<span class="git-status-badge ${badgeClass(file.status)}">${escapeHtml(file.status)}</span>
|
|
339
|
+
<span class="diff-file-header-stats"><span class="diff-stats-add">+${file.stats?.additions ?? 0}</span><span class="diff-stats-del">-${file.stats?.deletions ?? 0}</span></span>
|
|
340
|
+
</div>
|
|
341
|
+
${file.isBinary ? `<div class="diff-binary-message">${escapeHtml(file.binaryMessage || 'Binary file changed')}</div>` : ''}
|
|
342
|
+
${file.hunks.map((hunk) => this.renderUnifiedHunk(hunk)).join('')}
|
|
343
|
+
</section>
|
|
344
|
+
`;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
renderSplitFile(file, index) {
|
|
348
|
+
const hunks = file.hunks.map((hunk) => {
|
|
349
|
+
const rows = [];
|
|
350
|
+
for (const block of createPairedBlocks(hunk.lines)) {
|
|
351
|
+
if (block.context.length > 0) {
|
|
352
|
+
for (const line of block.context) {
|
|
353
|
+
rows.push(renderSplitRow(line, line));
|
|
354
|
+
}
|
|
355
|
+
continue;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
const count = Math.max(block.deletions.length, block.additions.length);
|
|
359
|
+
for (let rowIndex = 0; rowIndex < count; rowIndex += 1) {
|
|
360
|
+
rows.push(renderSplitRow(block.deletions[rowIndex] ?? null, block.additions[rowIndex] ?? null));
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
return `
|
|
365
|
+
<div class="diff-split-hunk">${escapeHtml(hunk.header)}</div>
|
|
366
|
+
${rows.join('')}
|
|
367
|
+
`;
|
|
368
|
+
}).join('');
|
|
369
|
+
|
|
370
|
+
return `
|
|
371
|
+
<section class="diff-file-block" data-diff-file-index="${index}">
|
|
372
|
+
<div class="diff-file-header">
|
|
373
|
+
<span class="diff-file-path">${escapeHtml(file.path)}</span>
|
|
374
|
+
<span class="git-status-badge ${badgeClass(file.status)}">${escapeHtml(file.status)}</span>
|
|
375
|
+
<span class="diff-file-header-stats"><span class="diff-stats-add">+${file.stats?.additions ?? 0}</span><span class="diff-stats-del">-${file.stats?.deletions ?? 0}</span></span>
|
|
376
|
+
</div>
|
|
377
|
+
<div class="diff-split">
|
|
378
|
+
<div class="diff-split-pane">
|
|
379
|
+
<div class="diff-split-pane-header">Before</div>
|
|
380
|
+
${hunks}
|
|
381
|
+
</div>
|
|
382
|
+
</div>
|
|
383
|
+
</section>
|
|
384
|
+
`;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
getCurrentFile() {
|
|
388
|
+
const files = this.data?.files ?? [];
|
|
389
|
+
if (files.length === 0) {
|
|
390
|
+
return null;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
return files[this.currentIndex] ?? files[0] ?? null;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
getCurrentCacheKey() {
|
|
397
|
+
const currentFile = this.getCurrentFile();
|
|
398
|
+
return currentFile?.path ? `${this.requestScope}:${currentFile.path}` : null;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
getCurrentFileDetail() {
|
|
402
|
+
const cacheKey = this.getCurrentCacheKey();
|
|
403
|
+
return cacheKey ? this.fileCache.get(cacheKey) : null;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
getCurrentActionState() {
|
|
407
|
+
const currentFile = this.getCurrentFile();
|
|
408
|
+
const detail = this.getCurrentFileDetail() ?? currentFile;
|
|
409
|
+
const stagedCount = Number(this.repoStatus?.summary?.staged || 0);
|
|
410
|
+
if (!detail?.path) {
|
|
411
|
+
return {
|
|
412
|
+
canCommit: stagedCount > 0,
|
|
413
|
+
canStage: false,
|
|
414
|
+
canUnstage: false,
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
return {
|
|
419
|
+
canCommit: stagedCount > 0,
|
|
420
|
+
canStage: Boolean(detail.hasWorkingTreeChanges || detail.hasUntrackedChanges),
|
|
421
|
+
canUnstage: Boolean(detail.hasStagedChanges),
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
getPrimaryAction() {
|
|
426
|
+
const actionState = this.getCurrentActionState();
|
|
427
|
+
if (actionState.canStage && !actionState.canUnstage) {
|
|
428
|
+
return 'stage';
|
|
429
|
+
}
|
|
430
|
+
if (actionState.canUnstage && !actionState.canStage) {
|
|
431
|
+
return 'unstage';
|
|
432
|
+
}
|
|
433
|
+
if (this.requestScope === 'staged' && actionState.canUnstage) {
|
|
434
|
+
return 'unstage';
|
|
435
|
+
}
|
|
436
|
+
if (actionState.canStage) {
|
|
437
|
+
return 'stage';
|
|
438
|
+
}
|
|
439
|
+
if (actionState.canUnstage) {
|
|
440
|
+
return 'unstage';
|
|
441
|
+
}
|
|
442
|
+
return null;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
async handleFileAction(action) {
|
|
446
|
+
const currentFile = this.getCurrentFile();
|
|
447
|
+
if (!currentFile?.path || this.pendingAction) {
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
this.pendingAction = action;
|
|
452
|
+
this.syncToolbar();
|
|
453
|
+
|
|
454
|
+
try {
|
|
455
|
+
if (action === 'stage') {
|
|
456
|
+
await this.onStageFile?.(currentFile.path, { scope: this.requestScope });
|
|
457
|
+
} else if (action === 'unstage') {
|
|
458
|
+
await this.onUnstageFile?.(currentFile.path, { scope: this.requestScope });
|
|
459
|
+
} else if (action === 'commit') {
|
|
460
|
+
await this.onCommitStaged?.();
|
|
461
|
+
}
|
|
462
|
+
} finally {
|
|
463
|
+
this.pendingAction = null;
|
|
464
|
+
this.syncToolbar();
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
setRepoStatus(status) {
|
|
469
|
+
this.repoStatus = status;
|
|
470
|
+
this.syncToolbar();
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
async loadCurrentFile({ forceFullPatch = false } = {}) {
|
|
474
|
+
const currentFile = this.getCurrentFile();
|
|
475
|
+
if (!currentFile?.path) {
|
|
476
|
+
this.render();
|
|
477
|
+
return null;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
const cacheKey = this.getCurrentCacheKey();
|
|
481
|
+
const cachedFile = cacheKey ? this.fileCache.get(cacheKey) : null;
|
|
482
|
+
if (cachedFile && (!cachedFile.tooLarge || !forceFullPatch)) {
|
|
483
|
+
this.loadingFilePath = null;
|
|
484
|
+
this.render();
|
|
485
|
+
return cachedFile;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
this.loadingFilePath = currentFile.path;
|
|
489
|
+
this.render();
|
|
490
|
+
|
|
491
|
+
try {
|
|
492
|
+
const query = new URLSearchParams();
|
|
493
|
+
query.set('scope', this.requestScope);
|
|
494
|
+
query.set('path', currentFile.path);
|
|
495
|
+
if (forceFullPatch) {
|
|
496
|
+
query.set('allowLargePatch', 'true');
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
const response = await fetch(resolveApiUrl(`/git/diff?${query.toString()}`));
|
|
500
|
+
const data = await response.json();
|
|
501
|
+
if (!response.ok) {
|
|
502
|
+
throw new Error(data.error || 'Failed to load file diff');
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
const detail = {
|
|
506
|
+
...currentFile,
|
|
507
|
+
...(data.files?.[0] ?? {}),
|
|
508
|
+
};
|
|
509
|
+
if (cacheKey) {
|
|
510
|
+
this.fileCache.set(cacheKey, detail);
|
|
511
|
+
}
|
|
512
|
+
this.loadingFilePath = null;
|
|
513
|
+
this.render();
|
|
514
|
+
return detail;
|
|
515
|
+
} catch (error) {
|
|
516
|
+
console.error('[git-diff] Failed to load file diff:', error);
|
|
517
|
+
this.toastController?.show('Failed to load file diff');
|
|
518
|
+
this.loadingFilePath = null;
|
|
519
|
+
this.render();
|
|
520
|
+
return null;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
renderCurrentFile() {
|
|
525
|
+
const currentFile = this.getCurrentFile();
|
|
526
|
+
if (!currentFile) {
|
|
527
|
+
return '<div class="diff-empty-state">No changes to display.</div>';
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
const detail = this.getCurrentFileDetail();
|
|
531
|
+
if (this.loadingFilePath === currentFile.path) {
|
|
532
|
+
return `
|
|
533
|
+
<section class="diff-file-block">
|
|
534
|
+
<div class="diff-file-header">
|
|
535
|
+
<span class="diff-file-path">${escapeHtml(currentFile.path)}</span>
|
|
536
|
+
<span class="git-status-badge ${badgeClass(currentFile.status)}">${escapeHtml(currentFile.status)}</span>
|
|
537
|
+
</div>
|
|
538
|
+
<div class="diff-empty-state">Loading file diff...</div>
|
|
539
|
+
</section>
|
|
540
|
+
`;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
if (!detail) {
|
|
544
|
+
return `
|
|
545
|
+
<section class="diff-file-block">
|
|
546
|
+
<div class="diff-file-header">
|
|
547
|
+
<span class="diff-file-path">${escapeHtml(currentFile.path)}</span>
|
|
548
|
+
<span class="git-status-badge ${badgeClass(currentFile.status)}">${escapeHtml(currentFile.status)}</span>
|
|
549
|
+
</div>
|
|
550
|
+
<div class="diff-empty-state">Select a file to load its diff.</div>
|
|
551
|
+
</section>
|
|
552
|
+
`;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
if (detail.tooLarge) {
|
|
556
|
+
return `
|
|
557
|
+
<section class="diff-file-block">
|
|
558
|
+
<div class="diff-file-header">
|
|
559
|
+
<span class="diff-file-path">${escapeHtml(detail.path)}</span>
|
|
560
|
+
<span class="git-status-badge ${badgeClass(detail.status)}">${escapeHtml(detail.status)}</span>
|
|
561
|
+
<span class="diff-file-header-stats"><span class="diff-stats-add">+${detail.stats?.additions ?? 0}</span><span class="diff-stats-del">-${detail.stats?.deletions ?? 0}</span></span>
|
|
562
|
+
</div>
|
|
563
|
+
<div class="diff-limit-card">
|
|
564
|
+
<strong>Large diff withheld</strong>
|
|
565
|
+
<span>This file diff is large enough to impact rendering performance.</span>
|
|
566
|
+
<button class="btn btn-secondary diff-load-full-btn" type="button" data-load-full-diff>Load full diff</button>
|
|
567
|
+
</div>
|
|
568
|
+
</section>
|
|
569
|
+
`;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
return this.mode === 'split'
|
|
573
|
+
? this.renderSplitFile(detail, this.currentIndex)
|
|
574
|
+
: this.renderUnifiedFile(detail, this.currentIndex);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
syncToolbar() {
|
|
578
|
+
const totalFiles = this.data?.files?.length ?? 0;
|
|
579
|
+
const visibleIndex = totalFiles === 0 ? 0 : this.currentIndex + 1;
|
|
580
|
+
if (this.fileIndicator) {
|
|
581
|
+
this.fileIndicator.textContent = totalFiles > 0
|
|
582
|
+
? `${visibleIndex} / ${totalFiles} files`
|
|
583
|
+
: '0 / 0 files';
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
if (this.stats) {
|
|
587
|
+
const additions = this.data?.summary?.additions ?? 0;
|
|
588
|
+
const deletions = this.data?.summary?.deletions ?? 0;
|
|
589
|
+
this.stats.innerHTML = `
|
|
590
|
+
<span class="diff-stats-add">+${additions}</span>
|
|
591
|
+
<span class="diff-stats-del">-${deletions}</span>
|
|
592
|
+
`;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
this.modeButtons.forEach((button) => {
|
|
596
|
+
button.classList.toggle('active', button.getAttribute('data-diff-mode') === this.mode);
|
|
597
|
+
});
|
|
598
|
+
const hasCurrentFile = Boolean(this.getCurrentFile()?.path);
|
|
599
|
+
const actionState = this.getCurrentActionState();
|
|
600
|
+
const primaryAction = this.getPrimaryAction();
|
|
601
|
+
this.openEditorButton?.toggleAttribute('disabled', !hasCurrentFile);
|
|
602
|
+
if (this.primaryActionButton) {
|
|
603
|
+
this.primaryActionButton.textContent = this.pendingAction === primaryAction
|
|
604
|
+
? 'Working...'
|
|
605
|
+
: primaryAction === 'unstage'
|
|
606
|
+
? 'Unstage'
|
|
607
|
+
: 'Stage';
|
|
608
|
+
this.primaryActionButton.toggleAttribute(
|
|
609
|
+
'disabled',
|
|
610
|
+
!hasCurrentFile || !primaryAction || Boolean(this.pendingAction),
|
|
611
|
+
);
|
|
612
|
+
}
|
|
613
|
+
if (this.commitButton) {
|
|
614
|
+
this.commitButton.textContent = this.pendingAction === 'commit' ? 'Working...' : 'Commit Staged';
|
|
615
|
+
}
|
|
616
|
+
this.commitButton?.toggleAttribute(
|
|
617
|
+
'disabled',
|
|
618
|
+
!actionState.canCommit || Boolean(this.pendingAction),
|
|
619
|
+
);
|
|
620
|
+
this.prevButton?.toggleAttribute('disabled', this.currentIndex <= 0);
|
|
621
|
+
this.nextButton?.toggleAttribute('disabled', totalFiles === 0 || this.currentIndex >= totalFiles - 1);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
render() {
|
|
625
|
+
this.page?.classList.remove('hidden');
|
|
626
|
+
|
|
627
|
+
const files = this.data?.files ?? [];
|
|
628
|
+
if (files.length === 0) {
|
|
629
|
+
this.renderEmpty('No changes to display.');
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
if (!this.content) {
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
this.content.innerHTML = this.renderCurrentFile();
|
|
638
|
+
this.syncToolbar();
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
getToolbarTitle({ filePath = null, scope = 'all' } = {}) {
|
|
642
|
+
if (filePath) {
|
|
643
|
+
return getPathLeaf(filePath);
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
if (scope === 'staged') {
|
|
647
|
+
return 'Staged Changes';
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
if (scope === 'working-tree') {
|
|
651
|
+
return 'Working Tree Changes';
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
return 'All Changes';
|
|
655
|
+
}
|
|
656
|
+
}
|