collabmd 0.1.25 → 0.1.26
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/dist/client/assets/{CodeMirrorEditor-UCMRAMCV-BHWNpLuY.js → CodeMirrorEditor-UCMRAMCV-C5yVpm45.js} +1 -1
- package/dist/client/assets/{_basePickBy-CJWegqog.js → _basePickBy-Dr0N-hVE.js} +1 -1
- package/dist/client/assets/{_baseUniq-CFKN1k1n.js → _baseUniq-BddJc3B1.js} +1 -1
- package/dist/client/assets/{ar-SA-NXDWD63E-DND5MLpM.js → ar-SA-NXDWD63E-C3GLfrYV.js} +1 -1
- package/dist/client/assets/{arc-D1SV2GW0.js → arc-fx_D7wYg.js} +1 -1
- package/dist/client/assets/architecture-PBZL5I3N-C1Yv7agI.js +1 -0
- package/dist/client/assets/{architectureDiagram-2XIMDMQ5-DXpDe6lq.js → architectureDiagram-2XIMDMQ5-T__yxKk2.js} +1 -1
- package/dist/client/assets/{az-AZ-MXSORGZV-ILYw2sYr.js → az-AZ-MXSORGZV-BJ2t-y-C.js} +1 -1
- package/dist/client/assets/{bg-BG-O6MV2KSF-DmfoZHM8.js → bg-BG-O6MV2KSF-Cd3kEZI-.js} +1 -1
- package/dist/client/assets/{blockDiagram-WCTKOSBZ-DlJn0Rs1.js → blockDiagram-WCTKOSBZ-BivLpsk_.js} +1 -1
- package/dist/client/assets/{bn-IN-MMW2ORAC-CmlBLY7g.js → bn-BD-T2VJNT7N-BFCx9nbZ.js} +1 -1
- package/dist/client/assets/{bn-BD-T2VJNT7N-uYQx1Wph.js → bn-IN-MMW2ORAC-Dn9W9dUT.js} +1 -1
- package/dist/client/assets/{c4Diagram-IC4MRINW-C6S9MOEW.js → c4Diagram-IC4MRINW-nVzPTZmV.js} +1 -1
- package/dist/client/assets/{ca-ES-MKBCGNOG-DWiYvMvF.js → ca-ES-MKBCGNOG-D_BNlrmg.js} +1 -1
- package/dist/client/assets/channel-DBZin7O0.js +1 -0
- package/dist/client/assets/{chunk-27N2SPOM-RxZ2_zJJ.js → chunk-27N2SPOM-CyIruM79.js} +4 -4
- package/dist/client/assets/{chunk-4BX2VUAB-LBTVcC6-.js → chunk-4BX2VUAB-n_yl-toC.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-T5nuDI6U.js → chunk-55IACEB6-CJ9i_5Da.js} +1 -1
- package/dist/client/assets/{chunk-7E7YKBS2-CBNUsbS7.js → chunk-7E7YKBS2-CebEBDsj.js} +1 -1
- package/dist/client/assets/{chunk-7R4GIKGN-Dh9p1sbP.js → chunk-7R4GIKGN-BXNhzFkP.js} +2 -2
- package/dist/client/assets/{chunk-C72U2L5F-DLNOvzEI.js → chunk-C72U2L5F-Cck8MvGP.js} +1 -1
- package/dist/client/assets/{chunk-EGIJ26TM-BkBsHEWn.js → chunk-EGIJ26TM-BDQ7tRV-.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-BoiIqhkb.js → chunk-FMBD7UC4-DAcjCJR-.js} +1 -1
- package/dist/client/assets/{chunk-GEFDOKGD-CIg-LRSp.js → chunk-GEFDOKGD-CYSNVsp-.js} +1 -1
- package/dist/client/assets/chunk-GLR3WWYH-FplqAopN.js +2 -0
- package/dist/client/assets/chunk-HHEYEP7N-Bv_FKHmu.js +1 -0
- package/dist/client/assets/{chunk-JSJVCQXG-C6-G93S3.js → chunk-JSJVCQXG-CLgStmEI.js} +1 -1
- package/dist/client/assets/{chunk-KX2RTZJC-CJlt0Rne.js → chunk-KX2RTZJC-B__vUl1o.js} +1 -1
- package/dist/client/assets/{chunk-KYZI473N-C-ObF5L3.js → chunk-KYZI473N-BpfobHkp.js} +1 -1
- package/dist/client/assets/{chunk-L3YUKLVL-BzkNNFii.js → chunk-L3YUKLVL-B7jdwbRL.js} +1 -1
- package/dist/client/assets/{chunk-MX3YWQON-bjcMtEei.js → chunk-MX3YWQON-DNcuP5dS.js} +1 -1
- package/dist/client/assets/{chunk-NQ4KR5QH-DY9oh8PD.js → chunk-NQ4KR5QH-oaq5iS2W.js} +1 -1
- package/dist/client/assets/{chunk-O4XLMI2P-CVfnFXq8.js → chunk-O4XLMI2P-NI4OcSZ6.js} +1 -1
- package/dist/client/assets/{chunk-OZEHJAEY-DyD-ywvu.js → chunk-OZEHJAEY-BevHLeQ0.js} +1 -1
- package/dist/client/assets/{chunk-PQ6SQG4A-BOJs3QbF.js → chunk-PQ6SQG4A-fQ_Oml5n.js} +1 -1
- package/dist/client/assets/{chunk-PU5JKC2W-1nkyDxBh.js → chunk-PU5JKC2W-Bp4H-mwZ.js} +1 -1
- package/dist/client/assets/chunk-QZHKN3VN-Blawx8vd.js +1 -0
- package/dist/client/assets/{chunk-R5LLSJPH-D9t4mFiL.js → chunk-R5LLSJPH-CZzZlfdI.js} +1 -1
- package/dist/client/assets/{chunk-SRAX5OIU-B-Zdxy2r.js → chunk-SRAX5OIU-CtUYAya6.js} +1 -1
- package/dist/client/assets/{chunk-WL4C6EOR-Bs95uEnp.js → chunk-WL4C6EOR-DnV9nMco.js} +1 -1
- package/dist/client/assets/{chunk-XIRO2GV7-CtwY16Jh.js → chunk-XIRO2GV7-BnkmoLpc.js} +1 -1
- package/dist/client/assets/{chunk-XPW4576I-CvxG514V.js → chunk-XPW4576I-DOk6pMat.js} +1 -1
- package/dist/client/assets/{chunk-XZSTWKYB-BNB3Mgw3.js → chunk-XZSTWKYB-DZzfqgVn.js} +1 -1
- package/dist/client/assets/{chunk-YBOYWFTD-MIDp82ug.js → chunk-YBOYWFTD-CrI5WFnC.js} +1 -1
- package/dist/client/assets/{chunk-Z5NKEFVG-CIMf1Se5.js → chunk-Z5NKEFVG-EGvolisB.js} +1 -1
- package/dist/client/assets/classDiagram-VBA2DB6C-CreQafQu.js +1 -0
- package/dist/client/assets/classDiagram-v2-RAHNMMFH-BIYHzbiv.js +1 -0
- package/dist/client/assets/clone-C3ajWNce.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-BKEY00wk.js → cose-bilkent-S5V4N54A-PcMOD_rX.js} +1 -1
- package/dist/client/assets/{cs-CZ-V77HGUP7-sLBAF2Iw.js → cs-CZ-V77HGUP7-gpioT6mv.js} +1 -1
- package/dist/client/assets/{da-DK-I5RFNTM4-B__PLwca.js → da-DK-I5RFNTM4-CVv-_qu9.js} +1 -1
- package/dist/client/assets/{dagre-Cm2w_QpZ.js → dagre-BD9xHP_z.js} +1 -1
- package/dist/client/assets/{dagre-KLK3FWXG-BddfhbwG.js → dagre-KLK3FWXG-Ct1xwvCC.js} +1 -1
- package/dist/client/assets/{de-DE-DTI4WUSC-Ba3fBYEU.js → de-CH-WLRDEVBV-CL0gsFEp.js} +1 -1
- package/dist/client/assets/{de-CH-WLRDEVBV-D61DKw_9.js → de-DE-DTI4WUSC-BQO1SHIK.js} +1 -1
- package/dist/client/assets/{diagram-E7M64L7V-BoyJ8kpo.js → diagram-E7M64L7V-DkHzt94k.js} +1 -1
- package/dist/client/assets/{diagram-IFDJBPK2-DLWembLL.js → diagram-IFDJBPK2-D4g8afpU.js} +1 -1
- package/dist/client/assets/{diagram-P4PSJMXO-CPmPa0OC.js → diagram-P4PSJMXO-DVwwx6ED.js} +1 -1
- package/dist/client/assets/{dist-gCWIHDgw.js → dist-2HWwyMLA.js} +1 -1
- package/dist/client/assets/{dist-Dy9oGocr.js → dist-60g3bzYH.js} +1 -1
- package/dist/client/assets/{dist-Czv7DXcw.js → dist-B2pRSR5A.js} +1 -1
- package/dist/client/assets/{dist-BpEcA20b.js → dist-BQhICHxD.js} +1 -1
- package/dist/client/assets/dist-BS6yAJ9F.js +1 -0
- package/dist/client/assets/dist-BUnp4fHW.js +1 -0
- package/dist/client/assets/dist-BWEDjv8G.js +1 -0
- package/dist/client/assets/{dist-DnpxzfoU.js → dist-BZc5d15t.js} +1 -1
- package/dist/client/assets/{dist-D7S1mzwR.js → dist-BdtPRC1F.js} +1 -1
- package/dist/client/assets/{dist-CKdaLumK.js → dist-BiFbHWxc.js} +1 -1
- package/dist/client/assets/{dist-DFIisyRk.js → dist-BlhsMbAl.js} +1 -1
- package/dist/client/assets/{dist-DGbPPlZ8.js → dist-CLsz2DCg.js} +1 -1
- package/dist/client/assets/{dist-tyxqXzyB.js → dist-Ciw3BJA2.js} +1 -1
- package/dist/client/assets/{dist-BtROnx4-.js → dist-CvMToPSN.js} +1 -1
- package/dist/client/assets/{dist-D4ebIlQB.js → dist-D2m8lD1h.js} +1 -1
- package/dist/client/assets/{dist-BATDm5JF.js → dist-DAwSRqIJ.js} +1 -1
- package/dist/client/assets/{dist-StJm6K24.js → dist-DZD5y4h6.js} +1 -1
- package/dist/client/assets/{dist-Cje3pdZH.js → dist-DhzldYic.js} +1 -1
- package/dist/client/assets/{dist-BiNL3fhN.js → dist-DrNF924C.js} +1 -1
- package/dist/client/assets/{dist-CPzoLjNz.js → dist-DzArd_Bk.js} +1 -1
- package/dist/client/assets/{dist-Le-AVwIk.js → dist-EPRNBXHp.js} +1 -1
- package/dist/client/assets/{dist-BDDCA7hC.js → dist-Q6uG0wie.js} +1 -1
- package/dist/client/assets/{dist-CQzPpOiH.js → dist-U9MIFRLF.js} +1 -1
- package/dist/client/assets/{dist-CxPc5kI6.js → dist-WrbPKwPQ.js} +1 -1
- package/dist/client/assets/{dist-BEs40fGb.js → dist-_L_gn5XE.js} +1 -1
- package/dist/client/assets/{dist-DhkKj77m.js → dist-a6bFAbQd.js} +1 -1
- package/dist/client/assets/{dist-vL71uaef.js → dist-fkQ6urpt.js} +1 -1
- package/dist/client/assets/{dist-BPyPcaZr.js → dist-lbtQBzLu.js} +1 -1
- package/dist/client/assets/dist-naAaVPPS.js +1 -0
- package/dist/client/assets/{dockerfile-BmylqEVx.js → dockerfile-Ci0-ApQC.js} +1 -1
- package/dist/client/assets/drawio-editor-BW2z4NH2.js +9 -0
- package/dist/client/assets/drawio-room-D6352KkV.js +1 -0
- package/dist/client/assets/drawioEditor-DgoA4Zqi.js +2 -0
- package/dist/client/assets/{editor-session-DsM3VgQv.js → editor-session-xPvmulmt.js} +2 -2
- package/dist/client/assets/{el-GR-ZXDJ2OS4-CpEbk42T.js → el-GR-ZXDJ2OS4-DGa9DqWI.js} +1 -1
- package/dist/client/assets/{en-CTDJDZ6K-C36Iqh9O.js → en-CTDJDZ6K-DC-4I8h8.js} +1 -1
- package/dist/client/assets/{erDiagram-INFDFZHY-Dwg_AhU2.js → erDiagram-INFDFZHY-Dnub3poK.js} +1 -1
- package/dist/client/assets/{es-ES-DYQHAD43-Ba-6t0Wr.js → es-ES-DYQHAD43-Cox3GUnj.js} +1 -1
- package/dist/client/assets/{eu-ES-QDSYU5Y3-CYzUKQ2_.js → eu-ES-QDSYU5Y3-DrPM2uSX.js} +1 -1
- package/dist/client/assets/{excalidraw-editor-Cs5p0lBn.js → excalidraw-editor-BAYca95w.js} +9 -9
- package/dist/client/assets/{excalidraw-mermaid-stub-C1ZaaI05.js → excalidraw-mermaid-stub-LpuTrLnr.js} +1 -1
- package/dist/client/assets/excalidrawEditor-BY5rq_Bn.js +2 -0
- package/dist/client/assets/{fa-IR-26LZG4PM-CxLc7ohL.js → fa-IR-26LZG4PM-ViTdxAWX.js} +1 -1
- package/dist/client/assets/{factor-Cc9mS1OI.js → factor-DMvifS-k.js} +1 -1
- package/dist/client/assets/{fi-FI-6YS4KDE4-DtYLOEJY.js → fi-FI-6YS4KDE4-BTBRGd69.js} +1 -1
- package/dist/client/assets/{flowDiagram-PKNHOUZH-BIJd4wAz.js → flowDiagram-PKNHOUZH-DF4dDV_8.js} +1 -1
- package/dist/client/assets/{fr-FR-BRLLPTZC-9O_U5gdi.js → fr-FR-BRLLPTZC-z-POHcHJ.js} +1 -1
- package/dist/client/assets/{ganttDiagram-A5KZAMGK-BiMwicnp.js → ganttDiagram-A5KZAMGK-CwrN53Gu.js} +1 -1
- package/dist/client/assets/gitGraph-HDMCJU4V-DbS2XnWK.js +1 -0
- package/dist/client/assets/{gitGraphDiagram-K3NZZRJ6-lk_paRel.js → gitGraphDiagram-K3NZZRJ6-BV9w0K-N.js} +1 -1
- package/dist/client/assets/{gl-ES-OKUZTLYG-Bb7TO64O.js → gl-ES-OKUZTLYG-BQtfDFNk.js} +1 -1
- package/dist/client/assets/{graphlib-B2nPo9Z4.js → graphlib-B7v-yqry.js} +1 -1
- package/dist/client/assets/{he-IL-26MGYIU7-CQW1igm9.js → he-IL-26MGYIU7-Dyw-xS4W.js} +1 -1
- package/dist/client/assets/{hi-IN-Q4ZOGTP2-BM91ENLs.js → hi-IN-Q4ZOGTP2-BqENUkZA.js} +1 -1
- package/dist/client/assets/{hu-HU-P2OXPSN5-HiGbsUwM.js → hu-HU-P2OXPSN5-D1HGK0_M.js} +1 -1
- package/dist/client/assets/{id-ID-2EIKXYN6-DEG8vRZ2.js → id-ID-2EIKXYN6-BEjyfllL.js} +1 -1
- package/dist/client/assets/image-32MOCVDX-BBXPyAeU.js +1 -0
- package/dist/client/assets/index-C95nV7Tl.css +1 -0
- package/dist/client/assets/index-GE56R5t4.js +2 -0
- package/dist/client/assets/info-3K5VOQVL-Bre4VStM.js +1 -0
- package/dist/client/assets/infoDiagram-LFFYTUFH-CuUbZqrG.js +2 -0
- package/dist/client/assets/{isEmpty-DGNCKhlT.js → isEmpty-CLDc0Kt_.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-PHBUUO56-CE3HierS.js → ishikawaDiagram-PHBUUO56-CmO_FyHY.js} +1 -1
- package/dist/client/assets/{it-IT-4CFKVXI2-DSrGqCKD.js → it-IT-4CFKVXI2-C24G-VcQ.js} +1 -1
- package/dist/client/assets/{ja-JP-MAND2Z4V-OFpEymIv.js → ja-JP-MAND2Z4V-DLhvsdYk.js} +1 -1
- package/dist/client/assets/javascript-DdEc60Aj.js +1 -0
- package/dist/client/assets/{journeyDiagram-4ABVD52K-CzoczPjW.js → journeyDiagram-4ABVD52K-DF4HAYLk.js} +1 -1
- package/dist/client/assets/{jsx-runtime-DRYOYO9I.js → jsx-runtime-DJkgQklN.js} +1 -1
- package/dist/client/assets/{kaa-HQRTCXTJ-CpOJ_vn4.js → kaa-HQRTCXTJ-DC8l3BuJ.js} +1 -1
- package/dist/client/assets/{kab-KAB-JKIKKTGH-CNPzzJH6.js → kab-KAB-JKIKKTGH-DVFog4hd.js} +1 -1
- package/dist/client/assets/{kanban-definition-K7BYSVSG-Cr6iNYl4.js → kanban-definition-K7BYSVSG-nQoJJABn.js} +1 -1
- package/dist/client/assets/{kk-KZ-HXQ63ZFC-CgtjU5JI.js → kk-KZ-HXQ63ZFC-CULUfwMg.js} +1 -1
- package/dist/client/assets/{km-KH-PKL3LSGX-BAJh8UnF.js → km-KH-PKL3LSGX-CnLlEv7i.js} +1 -1
- package/dist/client/assets/{ko-KR-KXLREZX3-BshOksBX.js → ko-KR-KXLREZX3-DNKXAYCx.js} +1 -1
- package/dist/client/assets/{ku-TR-MJ4IER3X-Bi3YtiD-.js → ku-TR-MJ4IER3X-DLUiMa4h.js} +1 -1
- package/dist/client/assets/{line-D2NTyhqv.js → line-DvLjT0Gv.js} +1 -1
- package/dist/client/assets/{linear-DntNI0Uj.js → linear-CEb8O7zv.js} +1 -1
- package/dist/client/assets/{lt-LT-H6WFQ6FJ-DQ2W0g7h.js → lt-LT-H6WFQ6FJ-CoFiurzb.js} +1 -1
- package/dist/client/assets/{lv-LV-GOCK6SJW-DeqTo8T7.js → lv-LV-GOCK6SJW-DzeEvHxX.js} +1 -1
- package/dist/client/assets/main-AejRWvom.js +600 -0
- package/dist/client/assets/{mermaid-parser.core-Bh2Ta9ou.js → mermaid-parser.core-DllATXd7.js} +2 -2
- package/dist/client/assets/{mermaid-runtime-CLtta79D.js → mermaid-runtime-DbCLD8Ih.js} +3 -3
- package/dist/client/assets/{mindmap-definition-YRQLILUH-DufPyQO8.js → mindmap-definition-YRQLILUH-DaMULsE9.js} +1 -1
- package/dist/client/assets/{mr-IN-IXVLDMEQ-CnH5Wjc7.js → mr-IN-IXVLDMEQ-C5i5R9H5.js} +1 -1
- package/dist/client/assets/{my-MM-YG6MYTTD-BefEpouO.js → my-MM-YG6MYTTD-DvwceqO-.js} +1 -1
- package/dist/client/assets/{nb-NO-XGWJISD2-CNRrlrPY.js → nb-NO-XGWJISD2-BUhX8hX0.js} +1 -1
- package/dist/client/assets/{nl-NL-XVDVCPNC-CuLTw3kL.js → nl-NL-XVDVCPNC-BV6Y0-Q0.js} +1 -1
- package/dist/client/assets/{nn-NO-EMX5MJX5-NHFRnQkl.js → nn-NO-EMX5MJX5-CF_bB9Jq.js} +1 -1
- package/dist/client/assets/{nsis-YyYYKQIB.js → nsis-42hkxqLx.js} +1 -1
- package/dist/client/assets/{oc-FR-ROEINTVO-8kCbAtcr.js → oc-FR-ROEINTVO-CiNI8fg8.js} +1 -1
- package/dist/client/assets/{ordinal-BuNU9EgZ.js → ordinal-fW5lWpNM.js} +1 -1
- package/dist/client/assets/{pa-IN-ZYN6SUDY-Dh8USSIe.js → pa-IN-ZYN6SUDY-CsbIU150.js} +1 -1
- package/dist/client/assets/packet-RMMSAZCW-B7lnOkip.js +1 -0
- package/dist/client/assets/percentages-5DKR754L-Dp1vwDEq.js +1 -0
- package/dist/client/assets/{pica-BG8AR4mo.js → pica-BbcTjVoI.js} +1 -1
- package/dist/client/assets/{clone-CMmi3x0H.js → pie-UPGHQEXC-D0gHdMgb.js} +1 -1
- package/dist/client/assets/{pieDiagram-SKSYHLDU--YidSJxi.js → pieDiagram-SKSYHLDU-BPFp1WBd.js} +1 -1
- package/dist/client/assets/{pl-PL-6VTG7PHC-BMbgP62B.js → pl-PL-6VTG7PHC-D1Nnx7R3.js} +1 -1
- package/dist/client/assets/preview-render-compiler-BYiRMsPq.js +1 -0
- package/dist/client/assets/{preview-render-profile-BjrQVCWD.js → preview-render-profile-DQsam_Ol.js} +2 -2
- package/dist/client/assets/{preview-render-worker-DbMTa0Y6.js → preview-render-worker-CcASh3y3.js} +1 -1
- package/dist/client/assets/{pt-BR-5YFKRR5G-CyrwFw_N.js → pt-BR-5YFKRR5G-DEDTeWEP.js} +1 -1
- package/dist/client/assets/{pt-PT-GEIXXZ67-SpK5vaGR.js → pt-PT-GEIXXZ67-BpqPVZom.js} +1 -1
- package/dist/client/assets/{pug-CM36H1hd.js → pug-BANqyQJ9.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-337W2JSQ-n7EIFT_f.js → quadrantDiagram-337W2JSQ-DjPGrcJM.js} +1 -1
- package/dist/client/assets/{quick-switcher-controller-CKrGBgcl.js → quick-switcher-controller-n6Jhu3Z9.js} +1 -1
- package/dist/client/assets/radar-KQ55EAFF-D48du2CB.js +1 -0
- package/dist/client/assets/{requirementDiagram-Z7DCOOCP-BrquJATD.js → requirementDiagram-Z7DCOOCP-BmiYAMKV.js} +1 -1
- package/dist/client/assets/{ro-RO-E2P6TFZI-90dn2iUp.js → ro-RO-E2P6TFZI-4vRM1jVT.js} +1 -1
- package/dist/client/assets/{room-zaSnuMv5.js → room-DyhEnogt.js} +1 -1
- package/dist/client/assets/{ru-RU-YBIIY43T-Cl52NZnQ.js → ru-RU-YBIIY43T-Cfbhz4Ew.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-WA2Y5GQK-IpD6lgfO.js → sankeyDiagram-WA2Y5GQK-BEoPAlcC.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-2WXFIKYE-DxZ6glIZ.js → sequenceDiagram-2WXFIKYE-BXqojuDS.js} +1 -1
- package/dist/client/assets/{si-LK-673C2CI2-DMSUxT-y.js → si-LK-673C2CI2-0muNkOEn.js} +1 -1
- package/dist/client/assets/{sk-SK-CKZHQ4AP-DUDai5Oe.js → sk-SK-CKZHQ4AP-EnLgxyJL.js} +1 -1
- package/dist/client/assets/{sl-SI-557H2GWM-BbLeATfl.js → sl-SI-557H2GWM-BN6npqVj.js} +1 -1
- package/dist/client/assets/{src-H0-aBY9y.js → src-DUDi_GeV.js} +1 -1
- package/dist/client/assets/{stateDiagram-RAJIS63D-A-rbDcdL.js → stateDiagram-RAJIS63D-DTR2sQs8.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-FVOUBMTO-BwVII-kJ.js +1 -0
- package/dist/client/assets/subset-shared.chunk-C6pUl_Oh.js +1 -0
- package/dist/client/assets/{subset-worker.chunk-B7pmUG1o.js → subset-worker.chunk-1FoL7eL0.js} +1 -1
- package/dist/client/assets/{sv-SE-XOPKKDWS-BBa-AcMf.js → sv-SE-XOPKKDWS-D3VSs2SQ.js} +1 -1
- package/dist/client/assets/{ta-IN-XBH7DQI3-9uR7ADzx.js → ta-IN-XBH7DQI3-BKR1mqfo.js} +1 -1
- package/dist/client/assets/{th-TH-TOCWH3R4-Box9U3ny.js → th-TH-TOCWH3R4-Bek1dQcW.js} +1 -1
- package/dist/client/assets/{timeline-definition-YZTLITO2-DuTppHot.js → timeline-definition-YZTLITO2-BP09qqIh.js} +1 -1
- package/dist/client/assets/{tr-TR-GXW6CYY5-BA8pS3C5.js → tr-TR-GXW6CYY5-xdLb7Dgi.js} +1 -1
- package/dist/client/assets/treemap-KZPCXAKY-BBRObSiT.js +1 -0
- package/dist/client/assets/{uk-UA-IJKTNUDG-B6hoHqzM.js → uk-UA-IJKTNUDG-Cd0AhTti.js} +1 -1
- package/dist/client/assets/{uz-UZ-TBZZEA4V-CPuftH33.js → uz-UZ-TBZZEA4V-DQH4e-QC.js} +1 -1
- package/dist/client/assets/{vault-api-client-D7C_m9eq.js → vault-api-client-fFJfUVXM.js} +2 -2
- package/dist/client/assets/vault-utils-BM4i-Ofm.js +1 -0
- package/dist/client/assets/{vennDiagram-LZ73GAT5-J0SBkXj8.js → vennDiagram-LZ73GAT5-BvSlhnT0.js} +1 -1
- package/dist/client/assets/{vi-VN-MULSGNVB-yRFd9OXl.js → vi-VN-MULSGNVB-BYDcPrAo.js} +1 -1
- package/dist/client/assets/{xychartDiagram-JWTSCODW-Dn9dSYxn.js → xychartDiagram-JWTSCODW-BvZ78F0j.js} +1 -1
- package/dist/client/assets/{yjs-provider-reset-guard-BcnBGrS9.js → yjs-provider-reset-guard-Cj00kgyM.js} +1 -1
- package/dist/client/assets/{zh-CN-MVX3E32U-VzUIXB4K.js → zh-CN-MVX3E32U-BqZQ-18-.js} +1 -1
- package/dist/client/assets/{zh-HK-JNU5RLIE-i0G2jHO_.js → zh-HK-JNU5RLIE-CbF8Agwa.js} +1 -1
- package/dist/client/assets/{zh-TW-LENVCA6T-BkHZg3jv.js → zh-TW-LENVCA6T-CepoVycx.js} +1 -1
- package/dist/client/drawio-editor.html +38 -0
- package/dist/client/excalidraw-editor.html +3 -3
- package/dist/client/index.html +16 -22
- package/package.json +1 -1
- package/src/client/app/drawio-editor-entry.js +4 -0
- package/src/client/app/drawio-editor.html +36 -0
- package/src/client/app/index.html +12 -18
- package/src/client/application/app-shell/ui-feature-identity.js +5 -2
- package/src/client/application/app-shell/ui-feature-shell.js +28 -2
- package/src/client/application/app-shell/workspace-feature.js +9 -0
- package/src/client/application/preview-render-compiler.js +18 -1
- package/src/client/application/preview-render-profile.js +5 -1
- package/src/client/application/workspace-chrome-controller.js +6 -0
- package/src/client/application/workspace-coordinator.js +12 -4
- package/src/client/application/workspace-preview-controller.js +65 -3
- package/src/client/application/workspace-route-controller.js +6 -3
- package/src/client/bootstrap/collabmd-app-shell.js +20 -0
- package/src/client/domain/runtime-paths.js +1 -0
- package/src/client/domain/vault-paths.js +24 -0
- package/src/client/drawio-editor.js +479 -0
- package/src/client/infrastructure/browser-navigation-port.js +2 -2
- package/src/client/infrastructure/drawio-lease-client.js +345 -0
- package/src/client/infrastructure/runtime-config.js +5 -1
- package/src/client/infrastructure/vault-api-client.js +9 -0
- package/src/client/presentation/comments-panel.js +2 -2
- package/src/client/presentation/create-menu-presenter.js +274 -0
- package/src/client/presentation/drawio-embed-controller.js +500 -0
- package/src/client/presentation/file-action-controller.js +126 -16
- package/src/client/presentation/file-explorer-controller.js +1 -0
- package/src/client/presentation/file-explorer-view.js +10 -2
- package/src/client/presentation/file-tree-state.js +1 -0
- package/src/client/presentation/theme-controller.js +21 -4
- package/src/client/styles/components/navigation.css +24 -0
- package/src/client/styles/features/diagram-preview.css +119 -1
- package/src/client/styles/layout/responsive.css +76 -7
- package/src/client/styles/layout/shell.css +41 -0
- package/src/client/styles/layout/sidebar.css +194 -3
- package/src/client/styles/layout/view-modes.css +1 -0
- package/src/domain/drawio-room.js +47 -0
- package/src/domain/file-kind.js +13 -2
- package/src/server/config/env.js +5 -0
- package/src/server/create-app-server.js +4 -2
- package/src/server/domain/collaboration/collaboration-document-store.js +11 -0
- package/src/server/domain/collaboration/collaboration-room.js +5 -0
- package/src/server/infrastructure/http/create-static-handler.js +2 -0
- package/src/server/infrastructure/http/create-vault-api-command-handler.js +5 -0
- package/src/server/infrastructure/http/create-vault-api-query-handler.js +5 -0
- package/src/server/infrastructure/persistence/path-utils.js +1 -1
- package/src/server/infrastructure/persistence/vault-content-adapter.js +6 -0
- package/src/server/infrastructure/persistence/vault-file-store.js +8 -0
- package/dist/client/assets/architecture-PBZL5I3N-0dui3p7-.js +0 -1
- package/dist/client/assets/channel-CVwYcdlk.js +0 -1
- package/dist/client/assets/chunk-GLR3WWYH-CqGMuOti.js +0 -2
- package/dist/client/assets/chunk-HHEYEP7N-Czb3OX2v.js +0 -1
- package/dist/client/assets/chunk-QZHKN3VN-DU7fMcaP.js +0 -1
- package/dist/client/assets/classDiagram-VBA2DB6C-CBSmkOe7.js +0 -1
- package/dist/client/assets/classDiagram-v2-RAHNMMFH-CJarRy94.js +0 -1
- package/dist/client/assets/dist-CNcGnl0T.js +0 -1
- package/dist/client/assets/dist-CnKD4Y92.js +0 -1
- package/dist/client/assets/dist-DL-EaOiC.js +0 -1
- package/dist/client/assets/dist-mDBaykBY.js +0 -1
- package/dist/client/assets/excalidrawEditor-wgJb2hmP.js +0 -2
- package/dist/client/assets/gitGraph-HDMCJU4V-iPo6Lz4k.js +0 -1
- package/dist/client/assets/image-32MOCVDX-viHDtJGM.js +0 -1
- package/dist/client/assets/index-B6m_KATZ.css +0 -1
- package/dist/client/assets/index-D20GlrKF.js +0 -2
- package/dist/client/assets/info-3K5VOQVL-DePZHLA4.js +0 -1
- package/dist/client/assets/infoDiagram-LFFYTUFH-CiAT_kJZ.js +0 -2
- package/dist/client/assets/javascript-DcX_cm1u.js +0 -1
- package/dist/client/assets/main-DONXLDrC.js +0 -599
- package/dist/client/assets/packet-RMMSAZCW-BVw0pEk-.js +0 -1
- package/dist/client/assets/percentages-5DKR754L-RQFE76Sg.js +0 -1
- package/dist/client/assets/pie-UPGHQEXC-ChUWa5qF.js +0 -1
- package/dist/client/assets/preview-render-compiler-CWBdv5tw.js +0 -1
- package/dist/client/assets/radar-KQ55EAFF-B4gMcoDX.js +0 -1
- package/dist/client/assets/stateDiagram-v2-FVOUBMTO-CKhOHHLe.js +0 -1
- package/dist/client/assets/subset-shared.chunk-93a-Md8B.js +0 -1
- package/dist/client/assets/treemap-KZPCXAKY-on28XbV_.js +0 -1
- package/dist/client/assets/vault-utils-Js2T-e-h.js +0 -1
- /package/dist/client/assets/{apl-khHl8vBy.js → apl-CJPt5sW7.js} +0 -0
- /package/dist/client/assets/{array-BTHl6o_K.js → array-e43ctQmx.js} +0 -0
- /package/dist/client/assets/{asciiarmor-7xnRhA8w.js → asciiarmor-D0oCypDs.js} +0 -0
- /package/dist/client/assets/{asn1-_x-T1mFB.js → asn1-8xgVfRoq.js} +0 -0
- /package/dist/client/assets/{asterisk-Ct2NwVUw.js → asterisk-B5kv5AQp.js} +0 -0
- /package/dist/client/assets/{brainfuck-CAmdgqDN.js → brainfuck-Dh7M1Ucz.js} +0 -0
- /package/dist/client/assets/{chunk-3PELD44J-BvOh9EJp.js → chunk-3PELD44J-D4qJ8fq7.js} +0 -0
- /package/dist/client/assets/{chunk-A66AFZZU-D0IDIehU.js → chunk-A66AFZZU-CJuwmF1m.js} +0 -0
- /package/dist/client/assets/{chunk-Cq_f4orQ.js → chunk-D-fkvfCP.js} +0 -0
- /package/dist/client/assets/{chunk-ETSVUAFD-BnK5BhxL.js → chunk-ETSVUAFD-C8C1JDu2.js} +0 -0
- /package/dist/client/assets/{clike-BJcwKCE7.js → clike-zYz_LEkw.js} +0 -0
- /package/dist/client/assets/{clojure-uSRILJfc.js → clojure-CdWlIeQh.js} +0 -0
- /package/dist/client/assets/{cmake-j5-7WxMz.js → cmake-wWuF5ifR.js} +0 -0
- /package/dist/client/assets/{cobol-cnURuZ43.js → cobol-D3WLbLVy.js} +0 -0
- /package/dist/client/assets/{coffeescript-iQD116iO.js → coffeescript-DRtt-5a2.js} +0 -0
- /package/dist/client/assets/{commonlisp-DGzExN9H.js → commonlisp-DJV75lsU.js} +0 -0
- /package/dist/client/assets/{crystal-CnjkM1-q.js → crystal-C7mEw92C.js} +0 -0
- /package/dist/client/assets/{css-C-Nv0c9S.js → css-_6KgQwpu.js} +0 -0
- /package/dist/client/assets/{cypher-hxitpny2.js → cypher-B3uWx7jm.js} +0 -0
- /package/dist/client/assets/{cytoscape.esm-0xzpJ66h.js → cytoscape.esm-BbbuX1pV.js} +0 -0
- /package/dist/client/assets/{d-BtdAWoTB.js → d-D3kOh3JF.js} +0 -0
- /package/dist/client/assets/{defaultLocale-PG3Gbk8q.js → defaultLocale-DTn6RiRA.js} +0 -0
- /package/dist/client/assets/{diff-f_ZkWiYS.js → diff-CoamybWh.js} +0 -0
- /package/dist/client/assets/{dist-CCxn5Mk-.js → dist-yRVuIDKu.js} +0 -0
- /package/dist/client/assets/{dtd-B6xdyNDx.js → dtd-BjGQwMWL.js} +0 -0
- /package/dist/client/assets/{dylan-BzUoKQTn.js → dylan-B9W3X2GI.js} +0 -0
- /package/dist/client/assets/{ebnf-BlTaNq16.js → ebnf-d5D0otVn.js} +0 -0
- /package/dist/client/assets/{ecl-CffPaRqR.js → ecl-C5Q_IBPt.js} +0 -0
- /package/dist/client/assets/{eiffel-B66P6crR.js → eiffel-BQA_6I3b.js} +0 -0
- /package/dist/client/assets/{elm-DIwllOLv.js → elm-unPS17vB.js} +0 -0
- /package/dist/client/assets/{erlang-DwYA67QU.js → erlang-R8nOsUTx.js} +0 -0
- /package/dist/client/assets/{excalidraw-mermaid-stub-BtCKxPxK.js → excalidraw-mermaid-stub-BJq3n7pR.js} +0 -0
- /package/dist/client/assets/{fcl-DD6dBrvI.js → fcl-CVAfW9wK.js} +0 -0
- /package/dist/client/assets/{forth-DFLLMv-i.js → forth-DHbsK8X8.js} +0 -0
- /package/dist/client/assets/{fortran-CNZVMQdQ.js → fortran-4jMwxW9-.js} +0 -0
- /package/dist/client/assets/{gas-DyiCLKEJ.js → gas-zC_XGrQT.js} +0 -0
- /package/dist/client/assets/{gherkin-CHgE7bAJ.js → gherkin-CPBQou3u.js} +0 -0
- /package/dist/client/assets/{groovy-BZc3It91.js → groovy-Cqopym0q.js} +0 -0
- /package/dist/client/assets/{haskell-DJ4hTi3A.js → haskell-imzbNPgF.js} +0 -0
- /package/dist/client/assets/{haxe-sJjg_lHN.js → haxe-Doh225Ku.js} +0 -0
- /package/dist/client/assets/{http-DwAi3Ho1.js → http-j4R5uEso.js} +0 -0
- /package/dist/client/assets/{idl-CCIDRFwr.js → idl-l9d1__Hj.js} +0 -0
- /package/dist/client/assets/{image-blob-reduce.esm-D4wBfumB.js → image-blob-reduce.esm-CQfEe3_g.js} +0 -0
- /package/dist/client/assets/{init-Bb7Vx0CW.js → init-207s1ipc.js} +0 -0
- /package/dist/client/assets/{isArrayLikeObject-DxEG9mY7.js → isArrayLikeObject-ZCMZRndo.js} +0 -0
- /package/dist/client/assets/{javascript-BlUxwA0O.js → javascript-9dQYqEHJ.js} +0 -0
- /package/dist/client/assets/{julia-BU0qBb1w.js → julia-ByGjwiLn.js} +0 -0
- /package/dist/client/assets/{katex-DoaSnJ5T.js → katex-XOVNa2d9.js} +0 -0
- /package/dist/client/assets/{livescript-uk34VDGK.js → livescript-B8l2m7xO.js} +0 -0
- /package/dist/client/assets/{lua-ClQGOv84.js → lua-DrfAKnQQ.js} +0 -0
- /package/dist/client/assets/{math-DQo53qzt.js → math-BlD6rf4Z.js} +0 -0
- /package/dist/client/assets/{mathematica-BDmKpvRN.js → mathematica-DYk_2Ik_.js} +0 -0
- /package/dist/client/assets/{mbox-T5kA6jAQ.js → mbox-BOzVHzVt.js} +0 -0
- /package/dist/client/assets/{mirc-DRRKKkcJ.js → mirc-DStbUCmv.js} +0 -0
- /package/dist/client/assets/{mllike-iZXopbca.js → mllike-BmhQglqS.js} +0 -0
- /package/dist/client/assets/{modelica-DP8T2DKM.js → modelica-ZElxtbqD.js} +0 -0
- /package/dist/client/assets/{mscgen-DXIRw2qg.js → mscgen-f-YxHPr0.js} +0 -0
- /package/dist/client/assets/{mumps-BKUS05-y.js → mumps-B79RJJhR.js} +0 -0
- /package/dist/client/assets/{nginx-CzYOtr2G.js → nginx-c--axfuP.js} +0 -0
- /package/dist/client/assets/{ntriples-ZgZuaYbW.js → ntriples-CgD4YZZC.js} +0 -0
- /package/dist/client/assets/{octave-CnOndUN3.js → octave-BQk-bCrp.js} +0 -0
- /package/dist/client/assets/{oz-DjW322Rn.js → oz-DPCSPrx5.js} +0 -0
- /package/dist/client/assets/{pascal-BdeW5uRX.js → pascal-C1iGzZ53.js} +0 -0
- /package/dist/client/assets/{path-BxyPWlyM.js → path-CDSE7Nw0.js} +0 -0
- /package/dist/client/assets/{perl-_CDvIe1D.js → perl-DQ3L8ffg.js} +0 -0
- /package/dist/client/assets/{pig-inWo_B4W.js → pig-B4S8acys.js} +0 -0
- /package/dist/client/assets/{powershell-CO5KWJsy.js → powershell-BhSVdaeY.js} +0 -0
- /package/dist/client/assets/{preload-helper-Chd9yIcd.js → preload-helper-I1wKxk_B.js} +0 -0
- /package/dist/client/assets/{properties-CjVp4a6M.js → properties-B2nfdtxE.js} +0 -0
- /package/dist/client/assets/{protobuf-DybFT2KT.js → protobuf-BFW_iwVN.js} +0 -0
- /package/dist/client/assets/{puppet-Dw_NDgko.js → puppet-C1-CkyhQ.js} +0 -0
- /package/dist/client/assets/{python-2pwcWoy7.js → python-CYXPDD4I.js} +0 -0
- /package/dist/client/assets/{q-C47l8kdS.js → q-Bub5Xmxm.js} +0 -0
- /package/dist/client/assets/{r-BmcXGVZ5.js → r-C59ONZO2.js} +0 -0
- /package/dist/client/assets/{rough.esm-C7Rbwqik.js → rough.esm-xhKrnp4d.js} +0 -0
- /package/dist/client/assets/{roundRect-CDlbNkEg.js → roundRect-CTz-kxJH.js} +0 -0
- /package/dist/client/assets/{rpm-Cm0x5xT_.js → rpm-DiM-R-wd.js} +0 -0
- /package/dist/client/assets/{ruby-Dl-I4pxG.js → ruby-DTqG95KX.js} +0 -0
- /package/dist/client/assets/{runtime-config-loader--hxFvh23.js → runtime-config-loader-DwWsKc1-.js} +0 -0
- /package/dist/client/assets/{sas-Bxkg4GVX.js → sas-BjdhmGHX.js} +0 -0
- /package/dist/client/assets/{scheme-CO3zogua.js → scheme-CWNdoI17.js} +0 -0
- /package/dist/client/assets/{shell-gYrTvBTP.js → shell-iaorleRB.js} +0 -0
- /package/dist/client/assets/{sieve-COX4Kn1X.js → sieve-D8m9Etmd.js} +0 -0
- /package/dist/client/assets/{simple-mode-BY9UFVy7.js → simple-mode-kdHrpFjq.js} +0 -0
- /package/dist/client/assets/{smalltalk-Dma1z5eE.js → smalltalk-28WS1mUj.js} +0 -0
- /package/dist/client/assets/{solr-BvhcdkNH.js → solr-x8qQ6eAP.js} +0 -0
- /package/dist/client/assets/{sparql-gX7W9xeh.js → sparql-BvLmi7B6.js} +0 -0
- /package/dist/client/assets/{spreadsheet-BnlQRxWz.js → spreadsheet-BuqSwScP.js} +0 -0
- /package/dist/client/assets/{sql-CwA10oIk.js → sql-B8tBavZM.js} +0 -0
- /package/dist/client/assets/{stex-DhLUylSV.js → stex-Bx4bLPxI.js} +0 -0
- /package/dist/client/assets/{stylus-9ZGSp3KB.js → stylus-CMEhEjuV.js} +0 -0
- /package/dist/client/assets/{swift-CurfpLXH.js → swift-wY9II8hY.js} +0 -0
- /package/dist/client/assets/{tcl-BPvzXR-t.js → tcl-BGywDEsi.js} +0 -0
- /package/dist/client/assets/{textile-BUq3vgBH.js → textile-K_mvsehZ.js} +0 -0
- /package/dist/client/assets/{tiddlywiki-DRR6E4hS.js → tiddlywiki-BrpeQ34q.js} +0 -0
- /package/dist/client/assets/{tiki-C1XMixgx.js → tiki-z2eQQPgI.js} +0 -0
- /package/dist/client/assets/{toml-BQjoWSzq.js → toml-Dcu7S7XA.js} +0 -0
- /package/dist/client/assets/{troff-DbgTp3Cj.js → troff-Djlumm7T.js} +0 -0
- /package/dist/client/assets/{ttcn-1OxchGWH.js → ttcn-XqU6tthJ.js} +0 -0
- /package/dist/client/assets/{ttcn-cfg-CC8OhyHu.js → ttcn-cfg-BzD0wr3i.js} +0 -0
- /package/dist/client/assets/{turtle-D1WjVU4-.js → turtle-DcjXkx6M.js} +0 -0
- /package/dist/client/assets/{vb-Bf-XXYNJ.js → vb-DV4y2QrD.js} +0 -0
- /package/dist/client/assets/{vbscript-HeSyWuOi.js → vbscript-BS8DsYJ_.js} +0 -0
- /package/dist/client/assets/{velocity-CUkiDsJQ.js → velocity-CS6Ly2yV.js} +0 -0
- /package/dist/client/assets/{verilog-BFxB5RAN.js → verilog-DbEC7ose.js} +0 -0
- /package/dist/client/assets/{vhdl-BJUXQE-6.js → vhdl-DBLrW9bF.js} +0 -0
- /package/dist/client/assets/{webidl-advQMGTP.js → webidl-CnE8KY-y.js} +0 -0
- /package/dist/client/assets/{xquery-CNzoFgd7.js → xquery--K5Za5EW.js} +0 -0
- /package/dist/client/assets/{yacas-BsmlDKac.js → yacas-ClQfYBmX.js} +0 -0
- /package/dist/client/assets/{z80-Bnez4vZ_.js → z80-Dr2oR3X2.js} +0 -0
|
@@ -22,6 +22,7 @@ import { vaultApiClient } from '../infrastructure/vault-api-client.js';
|
|
|
22
22
|
import { WorkspaceSyncClient } from '../infrastructure/workspace-sync-client.js';
|
|
23
23
|
import { BacklinksPanel } from '../presentation/backlinks-panel.js';
|
|
24
24
|
import { CommentUiController } from '../presentation/comment-ui-controller.js';
|
|
25
|
+
import { DrawioEmbedController } from '../presentation/drawio-embed-controller.js';
|
|
25
26
|
import { ExcalidrawEmbedController } from '../presentation/excalidraw-embed-controller.js';
|
|
26
27
|
import { FileExplorerController } from '../presentation/file-explorer-controller.js';
|
|
27
28
|
import { FileHistoryViewController } from '../presentation/file-history-view-controller.js';
|
|
@@ -194,6 +195,8 @@ export class CollabMdAppShell {
|
|
|
194
195
|
});
|
|
195
196
|
this.videoEmbed.reconcileEmbeds(this.elements.previewContent);
|
|
196
197
|
this.videoEmbed.syncLayout();
|
|
198
|
+
this.drawioEmbed.reconcileEmbeds(this.elements.previewContent);
|
|
199
|
+
this.drawioEmbed.syncLayout();
|
|
197
200
|
this.excalidrawEmbed.reconcileEmbeds(this.elements.previewContent, { isLargeDocument: stats.isLargeDocument });
|
|
198
201
|
this.excalidrawEmbed.syncLayout();
|
|
199
202
|
this.scrollSyncController.setLargeDocumentMode(stats.isLargeDocument);
|
|
@@ -202,10 +205,12 @@ export class CollabMdAppShell {
|
|
|
202
205
|
},
|
|
203
206
|
onBeforeRenderCommit: () => {
|
|
204
207
|
this.videoEmbed.detachForCommit();
|
|
208
|
+
this.drawioEmbed.detachForCommit();
|
|
205
209
|
this.excalidrawEmbed.detachForCommit();
|
|
206
210
|
},
|
|
207
211
|
onRenderComplete: () => {
|
|
208
212
|
this.videoEmbed.syncLayout();
|
|
213
|
+
this.drawioEmbed.syncLayout();
|
|
209
214
|
this.excalidrawEmbed.syncLayout();
|
|
210
215
|
this.schedulePreviewLayoutSync({ delayMs: 0 });
|
|
211
216
|
this.refreshCommentUiLayout();
|
|
@@ -239,6 +244,15 @@ export class CollabMdAppShell {
|
|
|
239
244
|
previewElement: this.elements.previewContent,
|
|
240
245
|
toastController: this.toastController,
|
|
241
246
|
});
|
|
247
|
+
this.drawioEmbed = new DrawioEmbedController({
|
|
248
|
+
getLocalUser: () => this.lobby.getLocalUser(),
|
|
249
|
+
getTheme: () => this.themeController.getTheme(),
|
|
250
|
+
onOpenFile: (filePath) => filePath && this.navigation.navigateToFile(filePath),
|
|
251
|
+
onOpenTextFile: (filePath) => filePath && this.navigation.navigateToFile(filePath, { drawioMode: 'text' }),
|
|
252
|
+
previewContainer: this.elements.previewContainer,
|
|
253
|
+
previewElement: this.elements.previewContent,
|
|
254
|
+
toastController: this.toastController,
|
|
255
|
+
});
|
|
242
256
|
this.commentUi = new CommentUiController({
|
|
243
257
|
commentSelectionButton: this.elements.commentSelectionButton,
|
|
244
258
|
commentsDrawer: this.elements.commentsDrawer,
|
|
@@ -260,10 +274,12 @@ export class CollabMdAppShell {
|
|
|
260
274
|
});
|
|
261
275
|
this.workspacePreviewController = new WorkspacePreviewController({
|
|
262
276
|
backlinksPanel: this.backlinksPanel,
|
|
277
|
+
drawioEmbed: this.drawioEmbed,
|
|
263
278
|
elements: this.elements,
|
|
264
279
|
excalidrawEmbed: this.excalidrawEmbed,
|
|
265
280
|
getDisplayName: (filePath) => this.getDisplayName(filePath),
|
|
266
281
|
getSession: () => this.session,
|
|
282
|
+
isDrawioFile: (filePath) => this.isDrawioFile(filePath),
|
|
267
283
|
isExcalidrawFile: (filePath) => this.isExcalidrawFile(filePath),
|
|
268
284
|
isImageFile: (filePath) => this.isImageFile(filePath),
|
|
269
285
|
isMermaidFile: (filePath) => this.isMermaidFile(filePath),
|
|
@@ -348,6 +364,7 @@ export class CollabMdAppShell {
|
|
|
348
364
|
getLocalUser: () => this.lobby.getLocalUser(),
|
|
349
365
|
getStoredUserName: () => this.getStoredUserName(),
|
|
350
366
|
getTheme: () => this.themeController.getTheme(),
|
|
367
|
+
isDrawioFile: (filePath) => this.isDrawioFile(filePath),
|
|
351
368
|
isExcalidrawFile: (filePath) => this.isExcalidrawFile(filePath),
|
|
352
369
|
isImageFile: (filePath) => this.isImageFile(filePath),
|
|
353
370
|
isMermaidFile: (filePath) => this.isMermaidFile(filePath),
|
|
@@ -394,6 +411,7 @@ export class CollabMdAppShell {
|
|
|
394
411
|
this.session = session;
|
|
395
412
|
this.commentUi.attachSession(session);
|
|
396
413
|
},
|
|
414
|
+
onRenderDrawioPreview: (filePath) => this.renderDrawioFilePreview(filePath),
|
|
397
415
|
onRenderExcalidrawPreview: (filePath) => this.renderExcalidrawFilePreview(filePath),
|
|
398
416
|
onRenderImagePreview: (filePath) => this.renderImageFilePreview(filePath),
|
|
399
417
|
onSyncWrapToggle: () => this.syncWrapToggle(),
|
|
@@ -413,6 +431,7 @@ export class CollabMdAppShell {
|
|
|
413
431
|
onViewModeReset: () => this.resetPreviewMode(),
|
|
414
432
|
renderPresence: () => this.renderPresence(),
|
|
415
433
|
scrollContainerForSession: (session) => session.getScrollContainer(),
|
|
434
|
+
shouldUseDrawioPreview: () => Boolean(this.runtimeConfig.drawioBaseUrl),
|
|
416
435
|
showEditorLoading: () => this.showEditorLoading(),
|
|
417
436
|
stateStore: this.stateStore,
|
|
418
437
|
});
|
|
@@ -421,6 +440,7 @@ export class CollabMdAppShell {
|
|
|
421
440
|
clearInitialFileBootstrap: () => this.clearInitialFileBootstrap(),
|
|
422
441
|
clearStaticPreviewDocument: () => this.clearStaticPreviewDocument(),
|
|
423
442
|
closeSidebarOnMobile: () => this.closeSidebarOnMobile(),
|
|
443
|
+
drawioEmbed: this.drawioEmbed,
|
|
424
444
|
elements: this.elements,
|
|
425
445
|
excalidrawEmbed: this.excalidrawEmbed,
|
|
426
446
|
fileHistoryView: this.fileHistoryView,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
isDrawioFilePath,
|
|
2
3
|
isMermaidFilePath,
|
|
3
4
|
isPlantUmlFilePath,
|
|
4
5
|
stripVaultFileExtension,
|
|
@@ -63,6 +64,29 @@ export function createMermaidStarter(filePath) {
|
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
66
|
|
|
67
|
+
export function createDrawioStarter(filePath) {
|
|
68
|
+
const normalizedPath = normalizeVaultPathInput(filePath);
|
|
69
|
+
const nextPath = isDrawioFilePath(normalizedPath)
|
|
70
|
+
? normalizedPath
|
|
71
|
+
: `${normalizedPath}.drawio`;
|
|
72
|
+
return {
|
|
73
|
+
content: [
|
|
74
|
+
'<mxfile host="app.diagrams.net" modified="2026-01-01T00:00:00.000Z" agent="CollabMD" version="24.7.17">',
|
|
75
|
+
' <diagram id="page-1" name="Page-1">',
|
|
76
|
+
' <mxGraphModel dx="1200" dy="800" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">',
|
|
77
|
+
' <root>',
|
|
78
|
+
' <mxCell id="0" />',
|
|
79
|
+
' <mxCell id="1" parent="0" />',
|
|
80
|
+
' </root>',
|
|
81
|
+
' </mxGraphModel>',
|
|
82
|
+
' </diagram>',
|
|
83
|
+
'</mxfile>',
|
|
84
|
+
'',
|
|
85
|
+
].join('\n'),
|
|
86
|
+
path: nextPath,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
66
90
|
export function createPlantUmlStarter(filePath) {
|
|
67
91
|
const normalizedPath = normalizeVaultPathInput(filePath);
|
|
68
92
|
const nextPath = isPlantUmlFilePath(normalizedPath)
|
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
import { ensureClientAuthenticated } from './infrastructure/auth-client.js';
|
|
2
|
+
import { DrawioLeaseClient } from './infrastructure/drawio-lease-client.js';
|
|
3
|
+
import { getRuntimeConfig } from './infrastructure/runtime-config.js';
|
|
4
|
+
import { vaultApiClient } from './infrastructure/vault-api-client.js';
|
|
5
|
+
|
|
6
|
+
const AUTOSAVE_DEBOUNCE_MS = 1000;
|
|
7
|
+
const IFRAME_BOOT_TIMEOUT_MS = 15000;
|
|
8
|
+
const parentOrigin = window.location.origin;
|
|
9
|
+
const params = new URLSearchParams(window.location.search);
|
|
10
|
+
const filePath = params.get('file') || '';
|
|
11
|
+
const leaseRoom = params.get('leaseRoom') || '';
|
|
12
|
+
const requestedMode = params.get('mode') === 'view' ? 'view' : 'edit';
|
|
13
|
+
const hostMode = params.get('hostMode') || '';
|
|
14
|
+
const instanceId = params.get('instanceId') || '';
|
|
15
|
+
const themeParam = params.get('theme') === 'light' ? 'light' : 'dark';
|
|
16
|
+
const isExportImageMode = hostMode === 'export-image';
|
|
17
|
+
const requestedPreviewWidth = Number.parseInt(params.get('previewWidth') || '', 10);
|
|
18
|
+
|
|
19
|
+
let runtimeConfig = getRuntimeConfig();
|
|
20
|
+
let currentXml = '';
|
|
21
|
+
let currentTheme = themeParam;
|
|
22
|
+
let currentLeaseState = null;
|
|
23
|
+
let drawioFrame = null;
|
|
24
|
+
let drawioFrameReady = false;
|
|
25
|
+
let drawioFrameBootTimer = null;
|
|
26
|
+
let drawioMessageHandler = null;
|
|
27
|
+
let saveTimer = null;
|
|
28
|
+
let pendingSaveXml = null;
|
|
29
|
+
let lastSavedVersion = 0;
|
|
30
|
+
let hasPostedReadyToParent = false;
|
|
31
|
+
let exportRequested = false;
|
|
32
|
+
|
|
33
|
+
const loadingState = document.getElementById('loadingState');
|
|
34
|
+
const rootElement = document.getElementById('root');
|
|
35
|
+
|
|
36
|
+
const state = {
|
|
37
|
+
bannerText: '',
|
|
38
|
+
canClaim: false,
|
|
39
|
+
isEditor: false,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const rootShell = document.createElement('div');
|
|
43
|
+
rootShell.className = 'drawio-shell';
|
|
44
|
+
|
|
45
|
+
const banner = document.createElement('div');
|
|
46
|
+
banner.className = 'drawio-banner';
|
|
47
|
+
banner.innerHTML = `
|
|
48
|
+
<div class="drawio-banner-status">
|
|
49
|
+
<span class="drawio-banner-pill" id="drawioModePill">Loading</span>
|
|
50
|
+
<span class="drawio-banner-copy" id="drawioBannerText">Connecting…</span>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="drawio-banner-actions">
|
|
53
|
+
<button type="button" class="drawio-btn" id="claimEditBtn" hidden>Claim edit</button>
|
|
54
|
+
</div>
|
|
55
|
+
`;
|
|
56
|
+
|
|
57
|
+
const frameShell = document.createElement('div');
|
|
58
|
+
frameShell.className = 'drawio-frame-shell';
|
|
59
|
+
|
|
60
|
+
const drawioLeaseClient = leaseRoom
|
|
61
|
+
? new DrawioLeaseClient({
|
|
62
|
+
filePath,
|
|
63
|
+
onStateChange: (nextState) => handleLeaseState(nextState),
|
|
64
|
+
roomName: leaseRoom,
|
|
65
|
+
})
|
|
66
|
+
: null;
|
|
67
|
+
|
|
68
|
+
function postToParent(type, payload = {}) {
|
|
69
|
+
if (window.parent === window) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
window.parent.postMessage({ source: 'drawio-editor', instanceId, type, ...payload }, parentOrigin);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function parseMessagePayload(rawValue) {
|
|
77
|
+
if (typeof rawValue === 'string') {
|
|
78
|
+
try {
|
|
79
|
+
return JSON.parse(rawValue);
|
|
80
|
+
} catch {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return rawValue && typeof rawValue === 'object' ? rawValue : null;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function setBodyTheme(theme) {
|
|
89
|
+
document.body.dataset.theme = theme === 'light' ? 'light' : 'dark';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function setLoadingCopy(message, { isError = false } = {}) {
|
|
93
|
+
if (!loadingState) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
loadingState.className = isError ? 'drawio-error' : 'drawio-loading';
|
|
98
|
+
loadingState.textContent = message;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function updateBanner() {
|
|
102
|
+
const pill = document.getElementById('drawioModePill');
|
|
103
|
+
const bannerText = document.getElementById('drawioBannerText');
|
|
104
|
+
const claimEditButton = document.getElementById('claimEditBtn');
|
|
105
|
+
if (!pill || !bannerText || !claimEditButton) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
pill.textContent = state.isEditor ? 'Editing' : 'Read-only';
|
|
110
|
+
bannerText.textContent = state.bannerText || (state.isEditor ? 'Editing' : 'Read-only mode');
|
|
111
|
+
claimEditButton.hidden = !state.canClaim;
|
|
112
|
+
claimEditButton.disabled = !state.canClaim;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function clearFrameBootTimer() {
|
|
116
|
+
if (!drawioFrameBootTimer) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
window.clearTimeout(drawioFrameBootTimer);
|
|
121
|
+
drawioFrameBootTimer = null;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function teardownDrawioFrame() {
|
|
125
|
+
clearFrameBootTimer();
|
|
126
|
+
if (drawioMessageHandler) {
|
|
127
|
+
window.removeEventListener('message', drawioMessageHandler);
|
|
128
|
+
drawioMessageHandler = null;
|
|
129
|
+
}
|
|
130
|
+
drawioFrame?.remove();
|
|
131
|
+
drawioFrame = null;
|
|
132
|
+
drawioFrameReady = false;
|
|
133
|
+
hasPostedReadyToParent = false;
|
|
134
|
+
exportRequested = false;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function buildDrawioFrameUrl() {
|
|
138
|
+
const baseUrl = runtimeConfig.drawioBaseUrl || 'https://embed.diagrams.net';
|
|
139
|
+
const url = new URL(baseUrl);
|
|
140
|
+
url.searchParams.set('embed', '1');
|
|
141
|
+
url.searchParams.set('proto', 'json');
|
|
142
|
+
url.searchParams.set('spin', '1');
|
|
143
|
+
url.searchParams.set('ui', currentTheme === 'light' ? 'simple' : 'dark');
|
|
144
|
+
url.searchParams.set('libraries', '1');
|
|
145
|
+
return url.toString();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function postAction(action, payload = {}) {
|
|
149
|
+
if (!drawioFrame?.contentWindow) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
drawioFrame.contentWindow.postMessage(JSON.stringify({
|
|
154
|
+
action,
|
|
155
|
+
...payload,
|
|
156
|
+
}), '*');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function loadDiagramIntoFrame() {
|
|
160
|
+
postAction('load', {
|
|
161
|
+
autosave: state.isEditor && !isExportImageMode ? 1 : 0,
|
|
162
|
+
dark: currentTheme === 'dark' ? 1 : 0,
|
|
163
|
+
modified: 'unsavedChanges',
|
|
164
|
+
noExitBtn: isExportImageMode ? 1 : 1,
|
|
165
|
+
noSaveBtn: isExportImageMode ? 1 : (state.isEditor ? 0 : 1),
|
|
166
|
+
saveAndExit: isExportImageMode ? 0 : 0,
|
|
167
|
+
theme: currentTheme === 'light' ? 'simple' : 'dark',
|
|
168
|
+
xml: currentXml || '',
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function updateFrameMode() {
|
|
173
|
+
if (!drawioFrame) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
drawioFrame.classList.toggle('is-read-only', !state.isEditor);
|
|
178
|
+
if (drawioFrameReady) {
|
|
179
|
+
loadDiagramIntoFrame();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function renderError(message, { fallbackToText = false } = {}) {
|
|
184
|
+
console.error('[drawio] Failed to initialize:', message);
|
|
185
|
+
teardownDrawioFrame();
|
|
186
|
+
rootElement.replaceChildren(rootShell);
|
|
187
|
+
frameShell.replaceChildren();
|
|
188
|
+
frameShell.appendChild(Object.assign(document.createElement('div'), {
|
|
189
|
+
className: 'drawio-error',
|
|
190
|
+
textContent: message,
|
|
191
|
+
}));
|
|
192
|
+
state.bannerText = message;
|
|
193
|
+
state.isEditor = false;
|
|
194
|
+
state.canClaim = false;
|
|
195
|
+
updateBanner();
|
|
196
|
+
postToParent(fallbackToText ? 'fallback-text' : 'error', { filePath, message });
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function requestPreviewImageExport() {
|
|
200
|
+
if (exportRequested || !drawioFrameReady) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
exportRequested = true;
|
|
205
|
+
postAction('export', {
|
|
206
|
+
border: 0,
|
|
207
|
+
currentPage: true,
|
|
208
|
+
format: 'png',
|
|
209
|
+
grid: false,
|
|
210
|
+
keepTheme: true,
|
|
211
|
+
scale: 2,
|
|
212
|
+
shadow: false,
|
|
213
|
+
size: 'diagram',
|
|
214
|
+
transparent: false,
|
|
215
|
+
...(Number.isFinite(requestedPreviewWidth) && requestedPreviewWidth > 0
|
|
216
|
+
? { width: requestedPreviewWidth }
|
|
217
|
+
: {}),
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
async function flushSave() {
|
|
222
|
+
if (!pendingSaveXml || !filePath || !state.isEditor) {
|
|
223
|
+
return null;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
const xmlToSave = pendingSaveXml;
|
|
227
|
+
pendingSaveXml = null;
|
|
228
|
+
const savePromise = vaultApiClient.writeFile({
|
|
229
|
+
content: xmlToSave,
|
|
230
|
+
path: filePath,
|
|
231
|
+
}).then(() => {
|
|
232
|
+
currentXml = xmlToSave;
|
|
233
|
+
lastSavedVersion = drawioLeaseClient?.publishSave?.() ?? lastSavedVersion;
|
|
234
|
+
return true;
|
|
235
|
+
}).catch((error) => {
|
|
236
|
+
console.error('[drawio] Failed to save diagram:', error);
|
|
237
|
+
pendingSaveXml = xmlToSave;
|
|
238
|
+
throw error;
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
return savePromise;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function scheduleSave(xml, { immediate = false } = {}) {
|
|
245
|
+
if (!state.isEditor || !xml) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
pendingSaveXml = xml;
|
|
250
|
+
if (saveTimer) {
|
|
251
|
+
window.clearTimeout(saveTimer);
|
|
252
|
+
saveTimer = null;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (immediate) {
|
|
256
|
+
void flushSave();
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
saveTimer = window.setTimeout(() => {
|
|
261
|
+
saveTimer = null;
|
|
262
|
+
void flushSave();
|
|
263
|
+
}, AUTOSAVE_DEBOUNCE_MS);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
async function reloadLatestXml() {
|
|
267
|
+
if (!filePath) {
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
const response = await vaultApiClient.readFile(filePath);
|
|
272
|
+
const nextXml = String(response?.content ?? '');
|
|
273
|
+
if (nextXml === currentXml) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
currentXml = nextXml;
|
|
278
|
+
if (drawioFrameReady) {
|
|
279
|
+
loadDiagramIntoFrame();
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function attachDrawioFrame() {
|
|
284
|
+
teardownDrawioFrame();
|
|
285
|
+
|
|
286
|
+
const iframe = document.createElement('iframe');
|
|
287
|
+
iframe.className = 'drawio-frame';
|
|
288
|
+
iframe.title = 'draw.io';
|
|
289
|
+
iframe.allow = 'clipboard-read; clipboard-write';
|
|
290
|
+
iframe.src = buildDrawioFrameUrl();
|
|
291
|
+
frameShell.replaceChildren(iframe);
|
|
292
|
+
drawioFrame = iframe;
|
|
293
|
+
updateFrameMode();
|
|
294
|
+
|
|
295
|
+
drawioMessageHandler = (event) => {
|
|
296
|
+
if (event.source !== drawioFrame?.contentWindow) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const payload = parseMessagePayload(event.data);
|
|
301
|
+
if (!payload?.event) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
if (payload.event === 'ready' || payload.event === 'init') {
|
|
306
|
+
drawioFrameReady = true;
|
|
307
|
+
clearFrameBootTimer();
|
|
308
|
+
loadDiagramIntoFrame();
|
|
309
|
+
if (!hasPostedReadyToParent) {
|
|
310
|
+
hasPostedReadyToParent = true;
|
|
311
|
+
postToParent('ready', {
|
|
312
|
+
filePath,
|
|
313
|
+
instanceMode: state.isEditor ? 'edit' : 'view',
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
if (payload.event === 'load') {
|
|
320
|
+
if (isExportImageMode) {
|
|
321
|
+
requestPreviewImageExport();
|
|
322
|
+
}
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
if (payload.event === 'autosave') {
|
|
327
|
+
scheduleSave(String(payload.xml || ''));
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (payload.event === 'save') {
|
|
332
|
+
scheduleSave(String(payload.xml || ''), { immediate: true });
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (payload.event === 'export') {
|
|
337
|
+
if (isExportImageMode && typeof payload.data === 'string' && payload.data) {
|
|
338
|
+
postToParent('export-image', {
|
|
339
|
+
data: payload.data,
|
|
340
|
+
filePath,
|
|
341
|
+
format: payload.format || 'svg',
|
|
342
|
+
});
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
if (isExportImageMode) {
|
|
347
|
+
renderError('Failed to export draw.io preview');
|
|
348
|
+
}
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
if (payload.event === 'exit') {
|
|
353
|
+
if (hostMode === 'file-preview' && !state.isEditor) {
|
|
354
|
+
postToParent('request-open-file', { filePath });
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
window.addEventListener('message', drawioMessageHandler);
|
|
360
|
+
drawioFrameBootTimer = window.setTimeout(() => {
|
|
361
|
+
renderError('Failed to initialize draw.io editor', { fallbackToText: hostMode === 'file-preview' });
|
|
362
|
+
}, IFRAME_BOOT_TIMEOUT_MS);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
function handleLeaseState(nextState) {
|
|
366
|
+
const previousState = currentLeaseState;
|
|
367
|
+
currentLeaseState = nextState;
|
|
368
|
+
state.isEditor = Boolean(nextState?.isEditor);
|
|
369
|
+
state.canClaim = Boolean(nextState?.canClaim);
|
|
370
|
+
|
|
371
|
+
if (state.isEditor) {
|
|
372
|
+
state.bannerText = 'Editing';
|
|
373
|
+
} else if (nextState?.hasHealthyHolder) {
|
|
374
|
+
const holderName = nextState.holderName || 'Another user';
|
|
375
|
+
state.bannerText = `${holderName} is editing this diagram. Read-only mode. Updates appear after they save.`;
|
|
376
|
+
} else if (nextState?.isStale) {
|
|
377
|
+
state.bannerText = 'Editor disconnected. Claim edit to continue editing.';
|
|
378
|
+
} else {
|
|
379
|
+
state.bannerText = 'Read-only mode. Updates appear after save.';
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
updateBanner();
|
|
383
|
+
|
|
384
|
+
const modeChanged = previousState && previousState.isEditor !== nextState.isEditor;
|
|
385
|
+
if (!previousState || modeChanged) {
|
|
386
|
+
attachDrawioFrame();
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
const savedVersionChanged = nextState.savedVersion !== lastSavedVersion;
|
|
391
|
+
lastSavedVersion = nextState.savedVersion;
|
|
392
|
+
if (!state.isEditor && savedVersionChanged) {
|
|
393
|
+
void reloadLatestXml();
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
function handleParentMessage(event) {
|
|
398
|
+
const payload = event.data;
|
|
399
|
+
if (!payload || payload.source !== 'collabmd-host') {
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
if (payload.type === 'set-theme') {
|
|
404
|
+
currentTheme = payload.theme === 'light' ? 'light' : 'dark';
|
|
405
|
+
setBodyTheme(currentTheme);
|
|
406
|
+
attachDrawioFrame();
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
async function claimEdit() {
|
|
411
|
+
if (!drawioLeaseClient) {
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
drawioLeaseClient.tryAcquireLease();
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
async function init() {
|
|
419
|
+
setBodyTheme(currentTheme);
|
|
420
|
+
|
|
421
|
+
try {
|
|
422
|
+
await ensureClientAuthenticated();
|
|
423
|
+
runtimeConfig = getRuntimeConfig();
|
|
424
|
+
|
|
425
|
+
if (!filePath) {
|
|
426
|
+
throw new Error('Missing draw.io file path');
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
const response = await vaultApiClient.readFile(filePath);
|
|
430
|
+
currentXml = String(response?.content ?? '');
|
|
431
|
+
|
|
432
|
+
loadingState?.remove();
|
|
433
|
+
rootElement.replaceChildren(rootShell);
|
|
434
|
+
rootShell.replaceChildren(banner, frameShell);
|
|
435
|
+
|
|
436
|
+
document.getElementById('claimEditBtn')?.addEventListener('click', () => {
|
|
437
|
+
void claimEdit();
|
|
438
|
+
});
|
|
439
|
+
|
|
440
|
+
window.addEventListener('message', handleParentMessage);
|
|
441
|
+
window.addEventListener('beforeunload', () => {
|
|
442
|
+
if (saveTimer) {
|
|
443
|
+
window.clearTimeout(saveTimer);
|
|
444
|
+
}
|
|
445
|
+
drawioLeaseClient?.releaseLease?.();
|
|
446
|
+
});
|
|
447
|
+
window.addEventListener('pagehide', () => {
|
|
448
|
+
if (saveTimer) {
|
|
449
|
+
window.clearTimeout(saveTimer);
|
|
450
|
+
}
|
|
451
|
+
drawioLeaseClient?.releaseLease?.();
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
if (requestedMode === 'view' || !drawioLeaseClient) {
|
|
455
|
+
state.isEditor = false;
|
|
456
|
+
state.canClaim = false;
|
|
457
|
+
state.bannerText = isExportImageMode ? 'Rendering preview…' : 'Read-only mode';
|
|
458
|
+
if (!isExportImageMode) {
|
|
459
|
+
updateBanner();
|
|
460
|
+
}
|
|
461
|
+
attachDrawioFrame();
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
await drawioLeaseClient.connect({
|
|
466
|
+
initialUser: {
|
|
467
|
+
name: params.get('userName') || localStorage.getItem('collabmd-user-name') || '',
|
|
468
|
+
peerId: params.get('peerId') || '',
|
|
469
|
+
},
|
|
470
|
+
requestedMode: 'edit',
|
|
471
|
+
});
|
|
472
|
+
} catch (error) {
|
|
473
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
474
|
+
renderError(message, { fallbackToText: hostMode === 'file-preview' });
|
|
475
|
+
setLoadingCopy(`Failed to load draw.io: ${message}`, { isError: true });
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
void init();
|