collabmd 0.1.49 → 0.1.51
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/README.md +10 -659
- package/bin/collabmd.js +36 -20
- package/dist/client/assets/CodeMirrorEditor-UCMRAMCV-Crf9Y3Q6.js +1 -0
- package/dist/client/assets/{abnfDiagram-VCTEODGH-CdVZqicp.js → abnfDiagram-VCTEODGH-PuinKbSQ.js} +1 -1
- package/dist/client/assets/ar-SA-5WIASEJP-Di7OimCN.js +10 -0
- package/dist/client/assets/{architectureDiagram-5GKGNRK7-wUo0bXif.js → architectureDiagram-5GKGNRK7-46hPkrZv.js} +1 -1
- package/dist/client/assets/az-AZ-V5EUQD6C-C19OGTT_.js +1 -0
- package/dist/client/assets/bg-BG-EXASCMTR-BIt0xWyb.js +5 -0
- package/dist/client/assets/{blockDiagram-I7D4REHJ-BRSK3m49.js → blockDiagram-I7D4REHJ-C1S5Bzf8.js} +1 -1
- package/dist/client/assets/bn-BD-U4SYNFCO-CdNaPy4Q.js +3 -0
- package/dist/client/assets/bn-IN-HKDJIITE-CdNaPy4Q.js +3 -0
- package/dist/client/assets/{browser-BKLM0ThC-IxjwuOIz-BBqQnUEb.js → browser-BKLM0ThC-IxjwuOIz-DyJcVMFR.js} +1 -1
- package/dist/client/assets/{c4Diagram-7LVT6UL2-yD2poxqw.js → c4Diagram-7LVT6UL2-VAk1HPmz.js} +1 -1
- package/dist/client/assets/ca-ES-2KGUU5XB-C9t-c0cH.js +8 -0
- package/dist/client/assets/channel-jwdhnPiV.js +1 -0
- package/dist/client/assets/chunk-2E4U76K2-Ba8Wf22k.js +1 -0
- package/dist/client/assets/{chunk-4HAMMTFA-DStbIfJ1.js → chunk-4HAMMTFA-Ht-73lsT.js} +1 -1
- package/dist/client/assets/chunk-5XKZK2GL-D4UAZSOJ.js +1 -0
- package/dist/client/assets/{chunk-75Z2AOVW-C5pGd3W9.js → chunk-75Z2AOVW-B2cZexqK.js} +1 -1
- package/dist/client/assets/{chunk-CLGD4ZFX-BMeArk03.js → chunk-CLGD4ZFX-Cmtx89ht.js} +1 -1
- package/dist/client/assets/{chunk-DU6HZSFF-Zkp69c6c.js → chunk-DU6HZSFF-C6d6PJfE.js} +1 -1
- package/dist/client/assets/{chunk-F27PBJKO-D4xNct1r.js → chunk-F27PBJKO-Dg3H6KLL.js} +1 -1
- package/dist/client/assets/{chunk-GMAD6QVW-NZ6WpDb8.js → chunk-GMAD6QVW-DUfjx_d5.js} +1 -1
- package/dist/client/assets/{chunk-GVQU2GXP-D8SDprfX.js → chunk-GVQU2GXP-D1l7oRGR.js} +1 -1
- package/dist/client/assets/{chunk-IMKFNOWR-D8jEuU3Q.js → chunk-IMKFNOWR-3F6NhHUP.js} +1 -1
- package/dist/client/assets/{chunk-L3NEJ4N5-aijKP-eh.js → chunk-L3NEJ4N5-BmCVn4y-.js} +1 -1
- package/dist/client/assets/{chunk-OSK3NFVY-CCbLQAMa.js → chunk-OSK3NFVY-CWHXAmfx.js} +1 -1
- package/dist/client/assets/{chunk-P2QGCYS3-Oag_FdCq.js → chunk-P2QGCYS3-Du8EtwOa.js} +1 -1
- package/dist/client/assets/{chunk-POPQ4Y6H-CYnpIgXT.js → chunk-POPQ4Y6H-B5yJIrZE.js} +1 -1
- package/dist/client/assets/{chunk-PWAF6VOD-JSNrcBmP.js → chunk-PWAF6VOD-B3gML4ps.js} +1 -1
- package/dist/client/assets/{chunk-SHT3W25Y-BiQGljao.js → chunk-SHT3W25Y-BKaI8jZO.js} +1 -1
- package/dist/client/assets/{chunk-SVP7TREG-DB485R5x.js → chunk-SVP7TREG-XlsB_ZMZ.js} +1 -1
- package/dist/client/assets/{chunk-TICWLB2K-8rAVvoS3.js → chunk-TICWLB2K-Cpp2z8yK.js} +1 -1
- package/dist/client/assets/chunk-TLUHSLCS-Yl7B0Vrz.js +1 -0
- package/dist/client/assets/chunk-ZNVOA63L-BmCQjhx-.js +40 -0
- package/dist/client/assets/{chunk-FLYJHZSQ-Be7lKF17.js → chunk-ZPMXAHWN-Dt0TxJa6.js} +2 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-BRw9vo8U.js +1 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-BRw9vo8U.js +1 -0
- package/dist/client/assets/comment-markdown-renderer-B9_vPc3F.js +1 -0
- package/dist/client/assets/comment-thread-store-NNHqRVsX.js +1 -0
- package/dist/client/assets/comment-threads-nJhK1yfc.js +4 -0
- package/dist/client/assets/cs-CZ-VUCGPRML-BfCoYAgj.js +7 -0
- package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-rTz9RhFH.js → cynefinDiagram-5FMLGOSQ-BRoCEoZM.js} +1 -1
- package/dist/client/assets/da-DK-NNDP2IVP-DBw9ZNTR.js +2 -0
- package/dist/client/assets/{dagre-GXQ25YYZ-Cr67wLpQ.js → dagre-GXQ25YYZ-BSfKCfy7.js} +1 -1
- package/dist/client/assets/de-CH-I7RAVIZN-DYW18Vsr.js +11 -0
- package/dist/client/assets/de-DE-WBQ3DQLR-DYW18Vsr.js +11 -0
- package/dist/client/assets/deferred-collab-rBe4nuQ2.css +1 -0
- package/dist/client/assets/deferred-git-BHKtkFYi.css +1 -0
- package/dist/client/assets/deferred-preview-pe7Iwwx3.css +1 -0
- package/dist/client/assets/{diagram-S7CK7UJ4-DywERe__.js → diagram-S7CK7UJ4-D7KaM9yj.js} +1 -1
- package/dist/client/assets/{diagram-UQ7AKVKN-CNYlXtu4.js → diagram-UQ7AKVKN-JevUZuYi.js} +1 -1
- package/dist/client/assets/{diagram-VSXAHHWV-0H1a61Bn.js → diagram-VSXAHHWV-B3-U-Q2E.js} +1 -1
- package/dist/client/assets/{diagram-VX7I27RA-CsJbsx5F.js → diagram-VX7I27RA-pSD4HMh1.js} +1 -1
- package/dist/client/assets/{diagram-Z3DM3KII-D0mLxEgI.js → diagram-Z3DM3KII-D8r1_CIb.js} +1 -1
- package/dist/client/assets/{direct-engine-DdrQKpgq-CtKfQzCt.js → direct-engine-DdrQKpgq-B5zIoeQw.js} +1 -1
- package/dist/client/assets/dist-B3HdUPsK.js +1 -0
- package/dist/client/assets/{dist-Tw-Fxpeb.js → dist-B7XMN9AT.js} +1 -1
- package/dist/client/assets/dist-BIRygGYH.js +1 -0
- package/dist/client/assets/dist-BPyOlNLY.js +2 -0
- package/dist/client/assets/{dist-D5wCC32z.js → dist-BR81yxMt.js} +1 -1
- package/dist/client/assets/{dist-TW8iFRyW.js → dist-B_B4XLmq.js} +1 -1
- package/dist/client/assets/dist-Bdy9ZRzd.js +9 -0
- package/dist/client/assets/{dist-netZOQtD.js → dist-Bfxzlnrf.js} +1 -1
- package/dist/client/assets/{dist-DzNmC81X.js → dist-Bx3QkS-3.js} +1 -1
- package/dist/client/assets/{dist-mj2Ht75J.js → dist-By7ieqAf.js} +1 -1
- package/dist/client/assets/dist-ByhQbe-x.js +1 -0
- package/dist/client/assets/{dist-CdmKGRGr.js → dist-BzFSJM0U.js} +1 -1
- package/dist/client/assets/dist-C5NkYKAa.js +1 -0
- package/dist/client/assets/{dist-D3fehAZ2.js → dist-CELhfKzh.js} +1 -1
- package/dist/client/assets/dist-CEirJSxk.js +1 -0
- package/dist/client/assets/dist-CO0-4CuV.js +39 -0
- package/dist/client/assets/dist-CRnJ0D9h.js +1 -0
- package/dist/client/assets/{dist-GvvCNBe4.js → dist-CbDyXgCo.js} +1 -1
- package/dist/client/assets/{dist-BeajGMhO.js → dist-CqXVyYoH.js} +1 -1
- package/dist/client/assets/{dist-LQ4kDCKz.js → dist-CrWzIWEE.js} +1 -1
- package/dist/client/assets/dist-CyNrloSI.js +1 -0
- package/dist/client/assets/dist-D60_kdpQ.js +1 -0
- package/dist/client/assets/{dist-DuH3ZrHo.js → dist-DCpIH3-_.js} +1 -1
- package/dist/client/assets/{dist-BPHLJ09L.js → dist-DJAMplZI.js} +2 -2
- package/dist/client/assets/{dist-DGEbEfw4.js → dist-DVXzbeDx.js} +1 -1
- package/dist/client/assets/{dist-C5NgpdG5.js → dist-Drv_wZYC.js} +1 -1
- package/dist/client/assets/{dist-DVy5woUy.js → dist-EWJYvBK1.js} +1 -1
- package/dist/client/assets/dist-Hdhj3L3t.js +1 -0
- package/dist/client/assets/{dist-DpYDHR9p.js → dist-gRRhmB-2.js} +3 -3
- package/dist/client/assets/dist-kWb2d1CH.js +1 -0
- package/dist/client/assets/dist-kiD2GIsD.js +13 -0
- package/dist/client/assets/{dist-JaU3aRlD.js → dist-l-56SowH.js} +1 -1
- package/dist/client/assets/{dist-BK9QvQrc.js → dist-nxQErAaK.js} +2 -2
- package/dist/client/assets/dist-sLzRQQk7.js +1 -0
- package/dist/client/assets/document-formatter-Qdiq9uJs.js +1 -0
- package/dist/client/assets/drawioEditor-CHf1vtdQ.js +9 -0
- package/dist/client/assets/{ebnfDiagram-PWID7BFC-HeTxHpCU.js → ebnfDiagram-PWID7BFC-UJ0Fz5ci.js} +1 -1
- package/dist/client/assets/editor-session-4Bn81iWm.js +14 -0
- package/dist/client/assets/el-GR-TYQHVGXW-Dx82YYAS.js +7 -0
- package/dist/client/assets/embedded-editor-base-jK221GC8.css +1 -0
- package/dist/client/assets/{embedpdf-DA4bA119-BPqZxwjc.js → embedpdf-DA4bA119-E8wZ11J2.js} +2 -3
- package/dist/client/assets/{embedpdf-BmE13ZZ0.js → embedpdf-LUXDBD3-.js} +1 -1
- package/dist/client/assets/{en-SJ2YIMFF-CJBL3nkq.js → en-2RFA324Y-BsuNJTcL.js} +1 -1
- package/dist/client/assets/{erDiagram-RLTQ6QDP-CbrDdd5P.js → erDiagram-RLTQ6QDP-CWrH1UJ9.js} +1 -1
- package/dist/client/assets/es-ES-JEUOREKJ-Rx0NUQDl.js +12 -0
- package/dist/client/assets/eu-ES-SO5DEEAN-CDYm-BcK.js +8 -0
- package/dist/client/assets/excalidraw-element-link-iA6zo0_f.js +7 -0
- package/dist/client/assets/{excalidrawEditor-BbSbI80a.css → excalidrawEditor-DDE0n1Pk.css} +1 -1
- package/dist/client/assets/excalidrawEditor-WIuguTz7.js +9 -0
- package/dist/client/assets/export-page-AN-wI5p4.js +56 -0
- package/dist/client/assets/exportDocument-B7IagJhQ.css +1 -0
- package/dist/client/assets/exportDocument-B9xNKpQe.js +2 -0
- package/dist/client/assets/fa-IR-FIYUE2GQ-C865Nx3X.js +9 -0
- package/dist/client/assets/fi-FI-REAEF6HQ-BIpjJqIb.js +6 -0
- package/dist/client/assets/flowDiagram-HODETNUW-kb1lUSBo.js +1 -0
- package/dist/client/assets/fr-FR-SUCL7J6B-DGAKE8jH.js +12 -0
- package/dist/client/assets/{ganttDiagram-EL5Y4UJY-BHgOYiZz.js → ganttDiagram-EL5Y4UJY-BBNzDfaV.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-Dl__X3Sk.js → gitGraphDiagram-WWUBYQGX-Csf0Dm_1.js} +1 -1
- package/dist/client/assets/gl-ES-KHCSOGVH-DWKh0CMu.js +6 -0
- package/dist/client/assets/he-IL-JYXVXV2Q-zqbcM-4g.js +9 -0
- package/dist/client/assets/hi-IN-BU52H3BO-CY8v6eG9.js +3 -0
- package/dist/client/assets/highlight-theme-CzNkO-IJ.js +1 -0
- package/dist/client/assets/hu-HU-OWADXDQ3-CEl6Udfh.js +3 -0
- package/dist/client/assets/id-ID-EOMR5R3I-CGQwUjoL.js +8 -0
- package/dist/client/assets/image-2QKV3NAF-BUbX0y5Y.js +1 -0
- package/dist/client/assets/index-BAmZnTFV.css +1 -0
- package/dist/client/assets/index-mWiw418b.js +1111 -0
- package/dist/client/assets/{infoDiagram-27XIBGKW-DBpoANC9.js → infoDiagram-27XIBGKW-Bzy6kCbb.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-5VMMS53U-BMPC6hfp.js → ishikawaDiagram-5VMMS53U-CRy9vIS5.js} +1 -1
- package/dist/client/assets/it-IT-FC2VTM3L-KTijNcUe.js +12 -0
- package/dist/client/assets/ja-JP-JBNTKYP4-BflWlGhw.js +12 -0
- package/dist/client/assets/{journeyDiagram-3NMN7TZE-B1sApUmM.js → journeyDiagram-3NMN7TZE-D4ZR_s9J.js} +1 -1
- package/dist/client/assets/kaa-TC3VIB7V-B-xtZfy0.js +1 -0
- package/dist/client/assets/kab-KAB-UOUDSQKM-BmO0O4Y4.js +4 -0
- package/dist/client/assets/{kanban-definition-UXKFOSKX-C9yP4td1.js → kanban-definition-UXKFOSKX-CIDTmu5g.js} +1 -1
- package/dist/client/assets/kk-KZ-P5H2X7YS-CSQFB8IN.js +1 -0
- package/dist/client/assets/{km-KH-PCWDKPHP-DSmy5shj.js → km-KH-IHMV2US7-BxrjuEzr.js} +4 -4
- package/dist/client/assets/ko-KR-ZTMANIDF-BnNRXd5J.js +5 -0
- package/dist/client/assets/ku-TR-GPJTRB5G-BZM7f2aT.js +6 -0
- package/dist/client/assets/{line-BFl3ujec.js → line-DSWLHgpx.js} +1 -1
- package/dist/client/assets/lobby-presence-Rdjnc0_0.js +1 -0
- package/dist/client/assets/lt-LT-V3XDOK3P-MVQBOHmF.js +3 -0
- package/dist/client/assets/lv-LV-DVQ3FADO-CrenwAhS.js +4 -0
- package/dist/client/assets/markdown-it-CocJWnjv.js +13 -0
- package/dist/client/assets/mermaid-parser.core-DrdLA3p0.js +3 -0
- package/dist/client/assets/mermaid.core-C_FK-7n4.js +1 -0
- package/dist/client/assets/{mermaid.core-BrY09czX.js → mermaid.core-D0cMM4Rl.js} +2 -3
- package/dist/client/assets/{mindmap-definition-YA3MSWOX-BUQHcYbK.js → mindmap-definition-YA3MSWOX-DO8NB9VH.js} +1 -1
- package/dist/client/assets/mr-IN-VZ6HH5FE-B-PHPglH.js +9 -0
- package/dist/client/assets/my-MM-XYKWHRK6-Be5sYp5q.js +1 -0
- package/dist/client/assets/nb-NO-UNO2GGZJ-BvSKGdja.js +8 -0
- package/dist/client/assets/nl-NL-76EFHT4P-C2yNx1Cj.js +13 -0
- package/dist/client/assets/nn-NO-CFKD7ABE-4NsqlDRP.js +4 -0
- package/dist/client/assets/oc-FR-YBJTCJ3J-B4OTQsWW.js +4 -0
- package/dist/client/assets/pa-IN-SNOXSMRV-CKj_sOG7.js +4 -0
- package/dist/client/assets/{pegDiagram-XKGWAZYB-Bi2Iml7Z.js → pegDiagram-XKGWAZYB-DS6Ab21R.js} +1 -1
- package/dist/client/assets/percentages-Q7USCRWZ-DWE6uvTs.js +1 -0
- package/dist/client/assets/{pieDiagram-E7YTZNPT-_gYXnMoi.js → pieDiagram-E7YTZNPT-BbFe6Tgs.js} +1 -1
- package/dist/client/assets/pl-PL-BSY6YFZ3-CFuzA6L0.js +12 -0
- package/dist/client/assets/preload-helper-CtT0-S4g.js +1 -0
- package/dist/client/assets/preview-render-compiler-C_7J7eia.js +43 -0
- package/dist/client/assets/preview-render-compiler-DzJ1KR_M.js +1 -0
- package/dist/client/assets/preview-render-worker-1DoIDllV.js +59 -0
- package/dist/client/assets/prod-D5TxmmoB.js +1 -0
- package/dist/client/assets/prod-pbFU4TaM.js +145 -0
- package/dist/client/assets/pt-BR-CZDV62R3-CkPMtyNx.js +10 -0
- package/dist/client/assets/pt-PT-JO57XJJW-CBSnfGtF.js +12 -0
- package/dist/client/assets/{quadrantDiagram-AXDQQJYC-DwexhEhd.js → quadrantDiagram-AXDQQJYC-fJE7iAxt.js} +1 -1
- package/dist/client/assets/quick-switcher-De4PjZFC.css +1 -0
- package/dist/client/assets/quick-switcher-controller-CUajuy78.js +1 -0
- package/dist/client/assets/{railroadDiagram-O6MQD6OU-BVA5UbMu.js → railroadDiagram-O6MQD6OU-CUQKqbCK.js} +1 -1
- package/dist/client/assets/{requirementDiagram-BXWQKSXE-C4cKwiIw.js → requirementDiagram-BXWQKSXE-Balm0WW8.js} +1 -1
- package/dist/client/assets/ro-RO-UZ5ICYYN-BOuntc_r.js +12 -0
- package/dist/client/assets/room-DX7lIfnu.js +1 -0
- package/dist/client/assets/ru-RU-AN7JPREC-D-ow3SNR.js +10 -0
- package/dist/client/assets/runtime-config-BFVdhnJu.js +1 -0
- package/dist/client/assets/runtime-paths-Cn0snt_9.js +1 -0
- package/dist/client/assets/{sankeyDiagram-P5KCCOFB-B5HHkRT2.js → sankeyDiagram-P5KCCOFB-CcbMqrlQ.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-BX6jqJFD.js → sequenceDiagram-WJ2MYXX4-BL1j3Sn-.js} +1 -1
- package/dist/client/assets/si-LK-7CBLD6QQ-c91EepX0.js +1 -0
- package/dist/client/assets/sk-SK-SWR6DKBI-D5vFMIL6.js +7 -0
- package/dist/client/assets/sl-SI-JRML4FIH-D53L_0S2.js +6 -0
- package/dist/client/assets/{stateDiagram-D77RDMKH-CmqxyRGx.js → stateDiagram-D77RDMKH-DNi924hh.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-C62JEwak.js +1 -0
- package/dist/client/assets/sv-SE-4ZPKFFXF-DT-G7RCI.js +12 -0
- package/dist/client/assets/{swimlanes-42K2YHIH-Bmgb9Zld.js → swimlanes-42K2YHIH-ColgjSH4.js} +1 -1
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-B9UZhEj4.js +8 -0
- package/dist/client/assets/ta-IN-V6NHHU6Z-D5jy7_AE.js +6 -0
- package/dist/client/assets/th-TH-P7CTMGDK-6sy0NO7K.js +1 -0
- package/dist/client/assets/{timeline-definition-24CTP7MA-BA-lVH6P.js → timeline-definition-24CTP7MA-7pch5JAr.js} +1 -1
- package/dist/client/assets/tr-TR-GUFYG22B-ClVaf8h1.js +4 -0
- package/dist/client/assets/uk-UA-K6SV5NFQ-BLTTtyNB.js +6 -0
- package/dist/client/assets/uz-UZ-TVKTZO2G-Bm02Eg3D.js +1 -0
- package/dist/client/assets/vault-api-client-QjZ_T03l.js +7 -0
- package/dist/client/assets/vault-utils-Bct69Xw2.js +1 -0
- package/dist/client/assets/{vennDiagram-4TSXK5OY-DNdUC_Xj.js → vennDiagram-4TSXK5OY-C5taziCX.js} +1 -1
- package/dist/client/assets/vi-VN-7FKFXJNO-CL3WPhmG.js +7 -0
- package/dist/client/assets/{wardleyDiagram-VM6X3IG4-C2oY-YbF.js → wardleyDiagram-VM6X3IG4-BbSlUwuM.js} +1 -1
- package/dist/client/assets/{wiki-link-resolver-DFIwErjc.js → wiki-link-resolver-C2P_WmTV.js} +1 -1
- package/dist/client/assets/{worker-engine-m0rlHn8R-S8mpn_O0.js → worker-engine-m0rlHn8R-eSDcDGEI.js} +1 -1
- package/dist/client/assets/workspace-change-CVA9dVmy.js +1 -0
- package/dist/client/assets/workspace-sync-client-D4nblH_2.js +1 -0
- package/dist/client/assets/{xychartDiagram-S5SC5T6Z-CoIR8CBX.js → xychartDiagram-S5SC5T6Z-D06X1arY.js} +1 -1
- package/dist/client/assets/yjs-B41tM6Sz.js +4 -0
- package/dist/client/assets/yjs-provider-reset-guard-R43MnLNc.js +1 -0
- package/dist/client/assets/zh-CN-AOKVLNNK-DGidDH2b.js +11 -0
- package/dist/client/assets/zh-HK-CDKPF5DC-CRcNR3rk.js +1 -0
- package/dist/client/assets/zh-TW-ZVGYESGW-C7Qji1y6.js +13 -0
- package/dist/client/drawio-editor.html +7 -8
- package/dist/client/excalidraw-editor.html +31 -33
- package/dist/client/export-document.html +5 -7
- package/dist/client/index.html +30 -26
- package/package.json +14 -20
- package/src/client/app/drawio-editor.html +1 -1
- package/src/client/app/excalidraw-editor.html +1 -1
- package/src/client/app/export-document.html +1 -1
- package/src/client/app/index.html +28 -4
- package/src/client/app/main-entry.js +1 -19
- package/src/client/application/app-shell/comments-feature.js +6 -0
- package/src/client/application/app-shell/ui-feature-shell.js +136 -58
- package/src/client/application/app-shell/ui-feature-tab-activity.js +8 -3
- package/src/client/application/app-shell-elements.js +5 -0
- package/src/client/application/highlight-theme.js +16 -0
- package/src/client/application/preview-render-compiler.js +43 -20
- package/src/client/application/preview-render-executor.js +0 -26
- package/src/client/application/preview-renderer.js +24 -7
- package/src/client/application/workspace-coordinator.js +20 -21
- package/src/client/bootstrap/collabmd-app-shell.js +71 -35
- package/src/client/bootstrap/lazy-collab-clients.js +90 -0
- package/src/client/domain/excalidraw-scene-reconcile.js +5 -2
- package/src/client/domain/hash-routes.js +5 -0
- package/src/client/domain/highlight-runtime.js +47 -0
- package/src/client/domain/lobby-chat.js +2 -0
- package/src/client/domain/runtime-paths.js +56 -7
- package/src/client/domain/vault-utils.js +11 -0
- package/src/client/excalidraw-editor.js +20 -4
- package/src/client/infrastructure/auth-client.js +1 -2
- package/src/client/infrastructure/browser-preferences-port.js +16 -0
- package/src/client/infrastructure/editor-view-adapter.js +43 -8
- package/src/client/infrastructure/excalidraw-room-client.js +9 -1
- package/src/client/infrastructure/hosted-api-client.js +60 -0
- package/src/client/infrastructure/lobby-presence.js +2 -2
- package/src/client/infrastructure/runtime-config.js +3 -1
- package/src/client/infrastructure/webmcp-tool-registry.js +16 -2
- package/src/client/presentation/comment-markdown-renderer.js +2 -14
- package/src/client/presentation/comment-overview-controller.js +1 -2
- package/src/client/presentation/comment-ui/comment-ui-shared.js +5 -2
- package/src/client/presentation/file-explorer-controller.js +3 -0
- package/src/client/presentation/file-explorer-view.js +272 -174
- package/src/client/presentation/git-panel-controller.js +1 -1
- package/src/client/presentation/hosted-workspace-gate-controller.js +180 -0
- package/src/client/presentation/layout-controller.js +10 -1
- package/src/client/presentation/team-settings-controller.js +228 -0
- package/src/client/styles/deferred-collab.css +5 -0
- package/src/client/styles/deferred-git.css +7 -0
- package/src/client/styles/deferred-preview.css +6 -0
- package/src/client/styles/features/diagram-preview.css +0 -15
- package/src/client/styles/features/outline.css +4 -2
- package/src/client/styles/features/preview-markdown.css +25 -11
- package/src/client/styles/features/team-settings.css +162 -0
- package/src/client/styles/foundation/tokens.css +2 -2
- package/src/client/styles/layout/editor-page.css +0 -13
- package/src/client/styles/layout/overlays.css +16 -0
- package/src/client/styles/layout/responsive.css +5 -5
- package/src/client/styles/layout/shell.css +20 -1
- package/src/client/styles/layout/sidebar.css +92 -3
- package/src/client/styles/style.css +3 -19
- package/src/domain/agent-tool-definitions.js +139 -63
- package/src/domain/collabmd-content-capabilities.js +4 -4
- package/src/domain/excalidraw-agent-scene.js +108 -6
- package/src/domain/excalidraw-agent-verification.js +95 -1
- package/src/domain/excalidraw-room-codec.js +12 -1
- package/src/domain/literal-text-search.js +13 -0
- package/src/server/application/agent-content-service.js +142 -74
- package/src/server/config/env.js +96 -5
- package/src/server/create-app-server.js +23 -153
- package/src/server/domain/hosted-workspace.js +10 -1
- package/src/server/domain/ripgrep-search-service.js +68 -21
- package/src/server/infrastructure/git/local-exclude.js +13 -1
- package/src/server/infrastructure/http/create-agent-api-handler.js +1 -1
- package/src/server/infrastructure/http/create-hosted-api-handler.js +5 -0
- package/src/server/infrastructure/http/create-request-handler.js +95 -26
- package/src/server/infrastructure/http/create-static-handler.js +3 -0
- package/src/server/infrastructure/http/create-vault-api-query-handler.js +15 -2
- package/src/server/infrastructure/mcp/create-agent-mcp-handler.js +2 -1
- package/src/server/infrastructure/persistence/sidecar-store.js +12 -5
- package/src/server/infrastructure/persistence/vault-file-store.js +2 -3
- package/src/server/infrastructure/websocket/attach-collaboration-gateway.js +48 -22
- package/src/server/shared/agent-tool-rate-limiter.js +7 -0
- package/src/server/startup/git-remote-bootstrap.js +56 -49
- package/src/server/vault-registry.js +251 -0
- package/dist/client/assets/CodeMirrorEditor-UCMRAMCV-C-nmgL5g.js +0 -1
- package/dist/client/assets/ar-SA-PQUY64WN-xjXgbW6d.js +0 -10
- package/dist/client/assets/az-AZ-OXJXL76K-4JkO4Pca.js +0 -1
- package/dist/client/assets/base-CaIEJUF9.css +0 -1
- package/dist/client/assets/bg-BG-W2GKIJDF-DnkH_o81.js +0 -5
- package/dist/client/assets/bn-BD-TGL7M4PJ-CG4JkmtP.js +0 -3
- package/dist/client/assets/bn-IN-BKETKYEH-CG4JkmtP.js +0 -3
- package/dist/client/assets/ca-ES-LD5SCRVV-U6_TVMX9.js +0 -8
- package/dist/client/assets/channel-Fa4GS_-F.js +0 -1
- package/dist/client/assets/chunk-2E4U76K2-BPnTT-J3.js +0 -2
- package/dist/client/assets/chunk-7XWMRXBY-CfMzEq80.js +0 -1
- package/dist/client/assets/chunk-RM4UPSZO-DOWllDY8.js +0 -41
- package/dist/client/assets/chunk-TLUHSLCS-DTY5v0aj.js +0 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-BsQWoR3Q.js +0 -1
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-BsQWoR3Q.js +0 -1
- package/dist/client/assets/comment-thread-store-CX98zR6q.js +0 -1
- package/dist/client/assets/comment-threads-BnRwo5B9.js +0 -4
- package/dist/client/assets/cs-CZ-OFPU5DBV-BmFAIhqX.js +0 -7
- package/dist/client/assets/da-DK-FRDJFYWF-H387Jw8B.js +0 -2
- package/dist/client/assets/de-CH-ZG7H3QK3-C_groygo.js +0 -11
- package/dist/client/assets/de-DE-SIJYH4IH-C_groygo.js +0 -11
- package/dist/client/assets/dist--hk9I5HQ.js +0 -1
- package/dist/client/assets/dist-B1XEa-Zs.js +0 -1
- package/dist/client/assets/dist-BJ1bJs33.js +0 -1
- package/dist/client/assets/dist-Bd1JucQF.js +0 -1
- package/dist/client/assets/dist-ByrG2qBA.js +0 -1
- package/dist/client/assets/dist-C0G3AaXG.js +0 -1
- package/dist/client/assets/dist-CKS_-are.js +0 -1
- package/dist/client/assets/dist-D37Hyu3h.js +0 -9
- package/dist/client/assets/dist-Dl_tpDSr.js +0 -1
- package/dist/client/assets/dist-Dm4w5UId.js +0 -1
- package/dist/client/assets/dist-RKBTaQMb.js +0 -13
- package/dist/client/assets/dist-eBx8q6Sy.js +0 -1
- package/dist/client/assets/dist-jVU5Be5P.js +0 -1
- package/dist/client/assets/document-formatter-rDDjRfZ2.js +0 -2
- package/dist/client/assets/drawioEditor-JubEEha7.js +0 -9
- package/dist/client/assets/editor-session-Bk6oIvSr.js +0 -54
- package/dist/client/assets/el-GR-IEE2CGI2-BkT6YT54.js +0 -7
- package/dist/client/assets/embedded-editor-base-BlCgz6mw.css +0 -1
- package/dist/client/assets/es-Bfdp096f.js +0 -22
- package/dist/client/assets/es-ES-TVVPWKV5-CpPKJXTM.js +0 -12
- package/dist/client/assets/eu-ES-CGBMFQDT-Bu3N2493.js +0 -8
- package/dist/client/assets/excalidraw-element-link-YLIaTnVF.js +0 -7
- package/dist/client/assets/excalidrawEditor-dBMbRX_S.js +0 -9
- package/dist/client/assets/export-page-CRRQ2NEl.js +0 -57
- package/dist/client/assets/exportDocument-BlQRd9_m.js +0 -2
- package/dist/client/assets/exportDocument-CNSbjZwu.css +0 -1
- package/dist/client/assets/fa-IR-IE6XAPR4-BEvLCORD.js +0 -9
- package/dist/client/assets/fi-FI-P7TKNHRM-DI0q8iSX.js +0 -6
- package/dist/client/assets/file-icon-svg-Y_kpF957.js +0 -1
- package/dist/client/assets/flowDiagram-HODETNUW-D5Gy0wmg.js +0 -1
- package/dist/client/assets/fr-FR-QI2XZNT7-y8kXd8LA.js +0 -12
- package/dist/client/assets/gl-ES-TLYCNOZZ-Br-Fhff-.js +0 -6
- package/dist/client/assets/he-IL-ZX43XLGP-qKQq6V9X.js +0 -9
- package/dist/client/assets/hi-IN-UTYRMTUF-DOUcwrDO.js +0 -3
- package/dist/client/assets/hu-HU-AJOSEBW6-FqTyvHlD.js +0 -3
- package/dist/client/assets/id-ID-ETLTVG6C-CQqh3CLS.js +0 -8
- package/dist/client/assets/image-ZVKINSPA-DgzW5zAy.js +0 -1
- package/dist/client/assets/index-D3RER1SZ.js +0 -1023
- package/dist/client/assets/index-DREVKl_K.css +0 -1
- package/dist/client/assets/it-IT-B4B6TP6L-V-yK3SZz.js +0 -12
- package/dist/client/assets/ja-JP-IYKVURR5-BQKBXRpX.js +0 -12
- package/dist/client/assets/kaa-SE2BUIKX-CZ5kfwPg.js +0 -1
- package/dist/client/assets/kab-KAB-Y3GLKXLR-Do7GWfuN.js +0 -4
- package/dist/client/assets/kk-KZ-ABWUFVOH-BpqVciQz.js +0 -1
- package/dist/client/assets/ko-KR-7JQDXKGM-N42lep78.js +0 -5
- package/dist/client/assets/ku-TR-NAH2Q5B7-K8LLl9fk.js +0 -6
- package/dist/client/assets/lt-LT-VQFYRSNQ-BmOd0ALn.js +0 -3
- package/dist/client/assets/lv-LV-T62VSYUM-B22WdPhp.js +0 -4
- package/dist/client/assets/mermaid-parser.core-Bl0efOMt.js +0 -4
- package/dist/client/assets/mermaid.core-DfcNfOTv.js +0 -1
- package/dist/client/assets/modulepreload-polyfill-P2Xu9kJm.js +0 -1
- package/dist/client/assets/mr-IN-V4FHLCJE-XX069tpm.js +0 -9
- package/dist/client/assets/my-MM-E3SQ6E54-cst_-5SB.js +0 -1
- package/dist/client/assets/nb-NO-MLNOFN5H-Bu2URWko.js +0 -8
- package/dist/client/assets/nl-NL-D5L3ZV4M-BqrV0btt.js +0 -13
- package/dist/client/assets/nn-NO-NNHDGPKB-DK-xZaWM.js +0 -4
- package/dist/client/assets/oc-FR-DWCRF55G-BZ5Po5R6.js +0 -4
- package/dist/client/assets/pa-IN-3JSAY44M-BZQSjKrS.js +0 -4
- package/dist/client/assets/percentages-ETZPVQEE-DFxFqXgH.js +0 -1
- package/dist/client/assets/pl-PL-ACURYKP3-qcEOSfCk.js +0 -12
- package/dist/client/assets/preload-helper-HclGiUj8.js +0 -1
- package/dist/client/assets/preview-render-compiler-CfxJYldJ.js +0 -41
- package/dist/client/assets/preview-render-compiler-Cu8_i9iS.js +0 -1
- package/dist/client/assets/preview-render-worker-c4Yi93qW.js +0 -66
- package/dist/client/assets/prod-BiJL30sl.js +0 -1
- package/dist/client/assets/prod-qAk7rHa4.js +0 -177
- package/dist/client/assets/pt-BR-LOX7MLGD-DLueHSyZ.js +0 -10
- package/dist/client/assets/pt-PT-CZ2U2RFQ-BJ-GAEm6.js +0 -12
- package/dist/client/assets/quick-switcher-controller-BoIK_wuG.js +0 -1
- package/dist/client/assets/ro-RO-2HECL2X6-CJUvKAf0.js +0 -12
- package/dist/client/assets/ru-RU-HAYNXO46-BWSlvTrt.js +0 -10
- package/dist/client/assets/runtime-config-DcmnGcXU.js +0 -1
- package/dist/client/assets/si-LK-W5KNS4H6-DGGCsn7k.js +0 -1
- package/dist/client/assets/sk-SK-7K2CFGDV-CY4uTYgQ.js +0 -7
- package/dist/client/assets/sl-SI-OXV2QZWW-2-weqaBY.js +0 -6
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-zoLLQVyh.js +0 -1
- package/dist/client/assets/sv-SE-JTOBZRGL-9-IUtVkO.js +0 -12
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-DS-KQN37.js +0 -8
- package/dist/client/assets/ta-IN-KFAVKXGT-gHO6Q_DH.js +0 -6
- package/dist/client/assets/th-TH-VDMSCPDL-BvJuw6PJ.js +0 -1
- package/dist/client/assets/tr-TR-CEZ6GX45-CG6UU3Su.js +0 -4
- package/dist/client/assets/uk-UA-Q3H3OXQC-CSuIg_DY.js +0 -6
- package/dist/client/assets/uz-UZ-NGCSWWPX-mom7rxSP.js +0 -1
- package/dist/client/assets/vault-api-client-iZLhMJKe.js +0 -6
- package/dist/client/assets/vi-VN-P3NDEVPS-BB0Fu9ck.js +0 -7
- package/dist/client/assets/yjs-provider-reset-guard-9ul1qF6k.js +0 -4
- package/dist/client/assets/zh-CN-SS3O57GA-Bj8wsiMe.js +0 -11
- package/dist/client/assets/zh-HK-LWJT3VCF-DOTquTCh.js +0 -1
- package/dist/client/assets/zh-TW-VJXC72RT-B48PRo-l.js +0 -13
- package/integrations/pi/index.ts +0 -94
- /package/dist/client/assets/{vault-api-client-C3mlS_4N.css → auth-gate-C3mlS_4N.css} +0 -0
- /package/dist/client/assets/{base-BYODPHdS.js → github.min-DBihDoic.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getVaultFileKind, supportsBacklinksForFilePath } from '../../../domain/file-kind.js';
|
|
2
2
|
import { isPlainQuickSwitcherShortcut } from '../../domain/keyboard-shortcuts.js';
|
|
3
|
-
import { createFileRouteHash, isCollabMdHashRoute } from '../../domain/hash-routes.js';
|
|
3
|
+
import { createFileRouteHash, isCollabMdHashRoute, isGitHashRouteType } from '../../domain/hash-routes.js';
|
|
4
4
|
|
|
5
5
|
const VERSION_RELOAD_TOAST_DURATION_MS = 0;
|
|
6
6
|
const PREVIEW_ROUTE_ANCHOR_STABILIZE_MS = 2000;
|
|
@@ -48,14 +48,13 @@ const PREVIEW_HEADING_LINK_ICON = `
|
|
|
48
48
|
*/
|
|
49
49
|
|
|
50
50
|
/** @this {UiShellContext} */
|
|
51
|
-
function initialize() {
|
|
51
|
+
async function initialize() {
|
|
52
|
+
await this.hostedGateController?.initialize();
|
|
52
53
|
this.initializeExportBridge?.();
|
|
53
54
|
this.renderMarkdownToolbar?.();
|
|
54
55
|
this.initializeVisualViewportBinding?.();
|
|
55
56
|
this.themeController.initialize();
|
|
56
57
|
this.previewRenderer.applyTheme(this.themeController.getTheme());
|
|
57
|
-
this.previewRenderer.scheduleWorkerPrewarm();
|
|
58
|
-
this.scheduleEditorSessionPrewarm?.();
|
|
59
58
|
this.outlineController.initialize();
|
|
60
59
|
this.layoutController.initialize();
|
|
61
60
|
this.scrollSyncController.initialize();
|
|
@@ -87,17 +86,24 @@ function initialize() {
|
|
|
87
86
|
this.syncToolbarOverflowVisibility?.();
|
|
88
87
|
});
|
|
89
88
|
|
|
89
|
+
if (this.runtimeConfig?.gitEnabled !== false) {
|
|
90
|
+
this.gitRepoAvailable = true;
|
|
91
|
+
this.elements.gitSidebarTab?.classList.remove('hidden');
|
|
92
|
+
this.elements.sidebarTabs?.classList.remove('hidden');
|
|
93
|
+
}
|
|
94
|
+
|
|
90
95
|
this.fileExplorerReadyPromise = this.fileExplorer.refresh().then(() => {
|
|
91
96
|
this.fileExplorerReady = true;
|
|
92
97
|
void this.commentsOverview?.refresh?.();
|
|
93
|
-
if (this.
|
|
94
|
-
void this.gitPanel.refresh({ force:
|
|
98
|
+
if (isGitHashRouteType(this.navigation.getHashRoute().type)) {
|
|
99
|
+
void this.gitPanel.refresh({ force: false });
|
|
95
100
|
}
|
|
96
101
|
if (this.isTabActive) {
|
|
97
102
|
return this.workspaceRouteController.handleHashChange();
|
|
98
103
|
}
|
|
99
104
|
return undefined;
|
|
100
105
|
});
|
|
106
|
+
|
|
101
107
|
}
|
|
102
108
|
|
|
103
109
|
/** @this {UiShellContext} */
|
|
@@ -377,6 +383,12 @@ function bindEvents() {
|
|
|
377
383
|
this.elements.previewContent?.addEventListener('click', (event) => {
|
|
378
384
|
this.handlePreviewContentClick?.(event);
|
|
379
385
|
});
|
|
386
|
+
this.elements.previewContent?.addEventListener('pointerover', (event) => {
|
|
387
|
+
this.handlePreviewContentPointerOver?.(event);
|
|
388
|
+
});
|
|
389
|
+
this.elements.previewContent?.addEventListener('focusin', (event) => {
|
|
390
|
+
this.handlePreviewContentPointerOver?.(event);
|
|
391
|
+
});
|
|
380
392
|
|
|
381
393
|
this.elements.sidebarToggle?.addEventListener('click', () => {
|
|
382
394
|
this.closeToolbarOverflowMenu();
|
|
@@ -521,6 +533,7 @@ function navigatePreviewHeading(target, headingId, { behavior = 'auto' } = {}) {
|
|
|
521
533
|
|
|
522
534
|
this.scrollSyncController?.suspendSync?.(250);
|
|
523
535
|
scrollPreviewToTarget(previewContainer, target, { behavior });
|
|
536
|
+
this.attachPreviewHeadingControls?.(target);
|
|
524
537
|
|
|
525
538
|
const sourceLine = Number.parseInt(target.getAttribute('data-source-line') || '', 10);
|
|
526
539
|
if (Number.isFinite(sourceLine)) {
|
|
@@ -563,7 +576,7 @@ async function copyPreviewHeadingLink(anchorId) {
|
|
|
563
576
|
|
|
564
577
|
/** @this {UiShellContext} */
|
|
565
578
|
async function copyPreviewCodeBlock(button) {
|
|
566
|
-
const code = button?.closest('
|
|
579
|
+
const code = button?.closest('pre')?.querySelector(':scope > code');
|
|
567
580
|
if (!(code instanceof HTMLElement)) {
|
|
568
581
|
return;
|
|
569
582
|
}
|
|
@@ -576,27 +589,107 @@ async function copyPreviewCodeBlock(button) {
|
|
|
576
589
|
}
|
|
577
590
|
}
|
|
578
591
|
|
|
592
|
+
|
|
593
|
+
function syncHeadingFoldButtonState(heading, button) {
|
|
594
|
+
if (!(heading instanceof HTMLElement) || !(button instanceof HTMLButtonElement)) {
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
const headingLabel = getHeadingLinkLabel(heading);
|
|
599
|
+
const collapsed = heading.dataset.previewHeadingCollapsed === 'true';
|
|
600
|
+
heading.setAttribute('aria-expanded', String(!collapsed));
|
|
601
|
+
button.setAttribute('aria-expanded', String(!collapsed));
|
|
602
|
+
button.setAttribute('aria-label', `${collapsed ? 'Expand' : 'Collapse'} ${headingLabel}`);
|
|
603
|
+
button.setAttribute('title', `${collapsed ? 'Expand' : 'Collapse'} section`);
|
|
604
|
+
}
|
|
605
|
+
|
|
579
606
|
/** @this {UiShellContext} */
|
|
580
|
-
function
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
607
|
+
function attachPreviewHeadingControls(heading) {
|
|
608
|
+
if (!(heading instanceof HTMLElement) || !/^H[1-6]$/.test(heading.tagName)) {
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
if (!this._previewHeadingFoldButton) {
|
|
613
|
+
const button = document.createElement('button');
|
|
614
|
+
button.type = 'button';
|
|
615
|
+
button.className = 'ui-icon-button preview-heading-fold-button';
|
|
616
|
+
this._previewHeadingFoldButton = button;
|
|
617
|
+
}
|
|
618
|
+
if (!this._previewHeadingLinkButton) {
|
|
619
|
+
const button = document.createElement('button');
|
|
620
|
+
button.type = 'button';
|
|
621
|
+
button.className = 'ui-icon-button preview-heading-link-button';
|
|
585
622
|
// pi-lens-ignore: no-inner-html-js
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
623
|
+
button.innerHTML = PREVIEW_HEADING_LINK_ICON;
|
|
624
|
+
this._previewHeadingLinkButton = button;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
const foldButton = this._previewHeadingFoldButton;
|
|
628
|
+
const linkButton = this._previewHeadingLinkButton;
|
|
629
|
+
|
|
630
|
+
if (foldButton.parentElement !== heading) {
|
|
631
|
+
heading.prepend(foldButton);
|
|
632
|
+
}
|
|
633
|
+
syncHeadingFoldButtonState(heading, foldButton);
|
|
634
|
+
|
|
635
|
+
if (!heading.id) {
|
|
636
|
+
linkButton.remove();
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
const headingLabel = getHeadingLinkLabel(heading);
|
|
641
|
+
linkButton.dataset.previewHeadingAnchor = heading.id;
|
|
642
|
+
linkButton.setAttribute('aria-label', `Copy link to ${headingLabel}`);
|
|
643
|
+
linkButton.setAttribute('title', 'Copy link to this section');
|
|
644
|
+
if (linkButton.parentElement !== heading) {
|
|
645
|
+
heading.append(linkButton);
|
|
646
|
+
}
|
|
595
647
|
}
|
|
596
648
|
|
|
649
|
+
/** @this {UiShellContext} */
|
|
650
|
+
function attachPreviewCodeCopyButton(pre) {
|
|
651
|
+
if (!(pre instanceof HTMLElement) || pre.tagName !== 'PRE' || !pre.querySelector(':scope > code')) {
|
|
652
|
+
return;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
if (!this._previewCodeCopyButton) {
|
|
656
|
+
const button = document.createElement('button');
|
|
657
|
+
button.type = 'button';
|
|
658
|
+
button.className = 'ui-button ui-button--secondary ui-button--compact preview-code-copy-button';
|
|
659
|
+
button.setAttribute('aria-label', 'Copy code');
|
|
660
|
+
button.title = 'Copy code';
|
|
661
|
+
// pi-lens-ignore: no-inner-html-js
|
|
662
|
+
button.innerHTML = `${PREVIEW_CODE_COPY_ICON}<span data-preview-code-copy-label>Copy</span>`;
|
|
663
|
+
this._previewCodeCopyButton = button;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
const button = this._previewCodeCopyButton;
|
|
667
|
+
if (button.parentElement !== pre) {
|
|
668
|
+
pre.append(button);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
/** @this {UiShellContext} */
|
|
673
|
+
function handlePreviewContentPointerOver(event) {
|
|
674
|
+
if (!(event.target instanceof Element) || !this.elements.previewContent) {
|
|
675
|
+
return;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
const heading = event.target.closest('h1, h2, h3, h4, h5, h6');
|
|
679
|
+
if (heading instanceof HTMLElement && this.elements.previewContent.contains(heading)) {
|
|
680
|
+
this.attachPreviewHeadingControls(heading);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
const pre = event.target.closest('pre');
|
|
684
|
+
if (pre instanceof HTMLElement && this.elements.previewContent.contains(pre)) {
|
|
685
|
+
this.attachPreviewCodeCopyButton(pre);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
|
|
597
690
|
function applyPreviewHeadingFolds(previewContent) {
|
|
598
|
-
const parents = new Set(Array.from(previewContent?.querySelectorAll?.('
|
|
599
|
-
.map((
|
|
691
|
+
const parents = new Set(Array.from(previewContent?.querySelectorAll?.('h1, h2, h3, h4, h5, h6') ?? [])
|
|
692
|
+
.map((heading) => heading.parentElement)
|
|
600
693
|
.filter(Boolean));
|
|
601
694
|
|
|
602
695
|
parents.forEach((parent) => {
|
|
@@ -660,19 +753,12 @@ function syncPreviewHeadingFoldButtons() {
|
|
|
660
753
|
return;
|
|
661
754
|
}
|
|
662
755
|
|
|
663
|
-
const headingLabel = getHeadingLinkLabel(heading);
|
|
664
|
-
let button = heading.querySelector(':scope > .preview-heading-fold-button');
|
|
665
|
-
if (!(button instanceof HTMLButtonElement)) {
|
|
666
|
-
button = document.createElement('button');
|
|
667
|
-
button.type = 'button';
|
|
668
|
-
button.className = 'ui-icon-button preview-heading-fold-button';
|
|
669
|
-
heading.prepend(button);
|
|
670
|
-
}
|
|
671
|
-
|
|
672
756
|
const collapsed = heading.dataset.previewHeadingCollapsed === 'true';
|
|
673
|
-
|
|
674
|
-
button.
|
|
675
|
-
button
|
|
757
|
+
heading.setAttribute('aria-expanded', String(!collapsed));
|
|
758
|
+
const button = heading.querySelector(':scope > .preview-heading-fold-button');
|
|
759
|
+
if (button instanceof HTMLButtonElement) {
|
|
760
|
+
syncHeadingFoldButtonState(heading, button);
|
|
761
|
+
}
|
|
676
762
|
});
|
|
677
763
|
|
|
678
764
|
applyPreviewHeadingFolds(this.elements.previewContent);
|
|
@@ -680,30 +766,19 @@ function syncPreviewHeadingFoldButtons() {
|
|
|
680
766
|
|
|
681
767
|
/** @this {UiShellContext} */
|
|
682
768
|
function syncPreviewHeadingLinkButtons() {
|
|
683
|
-
const
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
const headingLabel = getHeadingLinkLabel(heading);
|
|
691
|
-
let button = heading.querySelector(':scope > .preview-heading-link-button');
|
|
692
|
-
if (!(button instanceof HTMLButtonElement)) {
|
|
693
|
-
button = document.createElement('button');
|
|
694
|
-
button.type = 'button';
|
|
695
|
-
button.className = 'ui-icon-button preview-heading-link-button';
|
|
696
|
-
// pi-lens-ignore: no-inner-html-js
|
|
697
|
-
button.innerHTML = PREVIEW_HEADING_LINK_ICON;
|
|
698
|
-
heading.appendChild(button);
|
|
699
|
-
}
|
|
769
|
+
const linkButton = this._previewHeadingLinkButton;
|
|
770
|
+
const heading = linkButton?.parentElement;
|
|
771
|
+
if (!(heading instanceof HTMLElement) || !heading.id) {
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
700
774
|
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
775
|
+
const headingLabel = getHeadingLinkLabel(heading);
|
|
776
|
+
linkButton.dataset.previewHeadingAnchor = heading.id;
|
|
777
|
+
linkButton.setAttribute('aria-label', `Copy link to ${headingLabel}`);
|
|
778
|
+
linkButton.setAttribute('title', 'Copy link to this section');
|
|
705
779
|
}
|
|
706
780
|
|
|
781
|
+
|
|
707
782
|
/** @this {UiShellContext} */
|
|
708
783
|
function requestPreviewRouteAnchor(anchorId, filePath = this.currentFilePath) {
|
|
709
784
|
const normalizedAnchor = String(anchorId ?? '').trim();
|
|
@@ -868,7 +943,8 @@ function closeToolbarOverflowMenu() {
|
|
|
868
943
|
function handleThemeChange(theme) {
|
|
869
944
|
this.previewRenderer.applyTheme(theme);
|
|
870
945
|
if (
|
|
871
|
-
|
|
946
|
+
this.currentFilePath
|
|
947
|
+
&& !this.isExcalidrawFile(this.currentFilePath)
|
|
872
948
|
&& !this.isImageFile?.(this.currentFilePath)
|
|
873
949
|
&& !this.isPdfFile?.(this.currentFilePath)
|
|
874
950
|
&& !this.isStructurizrWorkspaceFile?.(this.currentFilePath)
|
|
@@ -1031,6 +1107,8 @@ function clearInitialFileBootstrap() {
|
|
|
1031
1107
|
|
|
1032
1108
|
export const uiFeatureShellMethods = {
|
|
1033
1109
|
applyPendingPreviewRouteAnchor,
|
|
1110
|
+
attachPreviewCodeCopyButton,
|
|
1111
|
+
attachPreviewHeadingControls,
|
|
1034
1112
|
bindEvents,
|
|
1035
1113
|
clearInitialFileBootstrap,
|
|
1036
1114
|
closeToolbarOverflowMenu,
|
|
@@ -1044,6 +1122,7 @@ export const uiFeatureShellMethods = {
|
|
|
1044
1122
|
handleConnectionChange,
|
|
1045
1123
|
handleDocumentKeydown,
|
|
1046
1124
|
handlePreviewContentClick,
|
|
1125
|
+
handlePreviewContentPointerOver,
|
|
1047
1126
|
handleThemeChange,
|
|
1048
1127
|
hideEditorLoading,
|
|
1049
1128
|
initialize,
|
|
@@ -1056,7 +1135,6 @@ export const uiFeatureShellMethods = {
|
|
|
1056
1135
|
scheduleBacklinkRefresh,
|
|
1057
1136
|
showEditorLoadError,
|
|
1058
1137
|
showEditorLoading,
|
|
1059
|
-
syncPreviewCodeCopyButtons,
|
|
1060
1138
|
syncPreviewHeadingFoldButtons,
|
|
1061
1139
|
syncPreviewHeadingLinkButtons,
|
|
1062
1140
|
syncVisualViewportBounds,
|
|
@@ -41,9 +41,7 @@ function handleTabActivated({ takeover = false } = {}) {
|
|
|
41
41
|
if (!this.lobby.provider) {
|
|
42
42
|
this.lobby.connect();
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
this.workspaceSync.connect();
|
|
46
|
-
}
|
|
44
|
+
this.connectWorkspaceSync();
|
|
47
45
|
|
|
48
46
|
if (wasInactive) {
|
|
49
47
|
if (this.fileExplorerReady) {
|
|
@@ -57,6 +55,12 @@ function handleTabActivated({ takeover = false } = {}) {
|
|
|
57
55
|
}
|
|
58
56
|
}
|
|
59
57
|
|
|
58
|
+
function connectWorkspaceSync() {
|
|
59
|
+
if (!this.workspaceSync.provider) {
|
|
60
|
+
this.workspaceSync.connect();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
60
64
|
/** @this {UiTabActivityContext} */
|
|
61
65
|
async function handleTabBlocked({ reason } = {}) {
|
|
62
66
|
const wasActive = this.isTabActive;
|
|
@@ -134,6 +138,7 @@ function hideTabLockOverlay() {
|
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
export const uiFeatureTabActivityMethods = {
|
|
141
|
+
connectWorkspaceSync,
|
|
137
142
|
handleTabActivated,
|
|
138
143
|
handleTabBlocked,
|
|
139
144
|
handleTabTakeover,
|
|
@@ -3,6 +3,11 @@ export function bindAppShellElements(doc = document) {
|
|
|
3
3
|
agentConnectionContent: doc.getElementById('agentConnectionContent'),
|
|
4
4
|
agentConnectionDialog: doc.getElementById('agentConnectionDialog'),
|
|
5
5
|
connectAgentButton: doc.getElementById('connectAgentBtn'),
|
|
6
|
+
appShell: doc.getElementById('appShell'),
|
|
7
|
+
hostedGate: doc.getElementById('hostedGate'),
|
|
8
|
+
teamSettingsButton: doc.getElementById('teamSettingsBtn'),
|
|
9
|
+
teamSettingsContent: doc.getElementById('teamSettingsContent'),
|
|
10
|
+
teamSettingsDialog: doc.getElementById('teamSettingsDialog'),
|
|
6
11
|
currentUserName: doc.getElementById('currentUserName'),
|
|
7
12
|
chatContainer: doc.getElementById('chatContainer'),
|
|
8
13
|
chatEmptyState: doc.getElementById('chatEmptyState'),
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import darkHighlightThemeUrl from '../assets/vendor/highlight/github-dark.min.css?url';
|
|
2
|
+
import lightHighlightThemeUrl from '../assets/vendor/highlight/github.min.css?url';
|
|
3
|
+
|
|
4
|
+
export function ensureHighlightThemeStylesheet() {
|
|
5
|
+
let themeStylesheet = document.getElementById('hljs-theme');
|
|
6
|
+
if (!(themeStylesheet instanceof HTMLLinkElement)) {
|
|
7
|
+
themeStylesheet = document.createElement('link');
|
|
8
|
+
themeStylesheet.id = 'hljs-theme';
|
|
9
|
+
themeStylesheet.rel = 'stylesheet';
|
|
10
|
+
document.head.append(themeStylesheet);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
themeStylesheet.href = darkHighlightThemeUrl;
|
|
14
|
+
themeStylesheet.dataset.darkHref = darkHighlightThemeUrl;
|
|
15
|
+
themeStylesheet.dataset.lightHref = lightHighlightThemeUrl;
|
|
16
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import markdownIt from 'markdown-it';
|
|
2
|
-
import hljs from 'highlight.js';
|
|
3
2
|
|
|
4
3
|
import { isImageAttachmentFilePath } from '../../domain/file-kind.js';
|
|
5
4
|
import { resolveVaultRelativePath } from '../../domain/vault-paths.js';
|
|
6
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
createWikiTargetIndex,
|
|
7
|
+
resolveWikiTargetWithIndex,
|
|
8
|
+
} from '../../domain/wiki-link-resolver.js';
|
|
7
9
|
import { classifyPublicVideoEmbed } from '../../domain/video-embed.js';
|
|
10
|
+
import { highlightFence } from '../domain/highlight-runtime.js';
|
|
8
11
|
import { escapeHtml } from '../domain/vault-utils.js';
|
|
9
12
|
import { extractYamlFrontmatter } from '../../domain/yaml-frontmatter.js';
|
|
10
13
|
import { renderFrontmatterBlock } from './markdown-frontmatter.js';
|
|
11
14
|
import { analyzeMarkdownComplexity } from './preview-render-profile.js';
|
|
12
15
|
|
|
13
|
-
hljs.registerAliases(['cql', 'mariadb', 'mssql', 'mysql', 'plsql', 'sqlite'], { languageName: 'sql' });
|
|
14
|
-
hljs.registerAliases(['ecmascript', 'node'], { languageName: 'javascript' });
|
|
15
|
-
|
|
16
16
|
|
|
17
17
|
function renderToken(renderer, tokens, index, options, env, self) {
|
|
18
18
|
return renderer?.(tokens, index, options, env, self) ?? self.renderToken(tokens, index, options);
|
|
@@ -249,6 +249,20 @@ function resolveLocalAttachmentUrl(source = '', {
|
|
|
249
249
|
return `${attachmentApiPath}?path=${encodeURIComponent(resolvedPath)}`;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
+
function resolveWikiImageAttachmentPath(target = '', sourceFilePath = '') {
|
|
253
|
+
const trimmed = String(target ?? '').trim().replace(/^\/+/u, '');
|
|
254
|
+
if (!trimmed) {
|
|
255
|
+
return '';
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (trimmed.startsWith('../') || trimmed.startsWith('./')) {
|
|
259
|
+
const resolved = resolveVaultRelativePath(sourceFilePath, trimmed);
|
|
260
|
+
return isImageAttachmentFilePath(resolved) ? resolved : '';
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
return isImageAttachmentFilePath(trimmed) ? trimmed : '';
|
|
264
|
+
}
|
|
265
|
+
|
|
252
266
|
function removeTokenAttr(token, name) {
|
|
253
267
|
const attributeIndex = token.attrIndex(name);
|
|
254
268
|
if (attributeIndex >= 0) {
|
|
@@ -257,16 +271,17 @@ function removeTokenAttr(token, name) {
|
|
|
257
271
|
}
|
|
258
272
|
|
|
259
273
|
function renderInlineWikiText(content, {
|
|
274
|
+
attachmentApiPath = '/api/attachment',
|
|
260
275
|
baseEmbedCounts,
|
|
261
276
|
drawioEmbedCounts,
|
|
262
277
|
excalidrawEmbedCounts,
|
|
263
|
-
|
|
278
|
+
wikiTargetIndex,
|
|
264
279
|
mermaidEmbedCounts,
|
|
265
280
|
plantUmlEmbedCounts,
|
|
266
281
|
sourceFilePath = '',
|
|
267
282
|
wikiLinkAutoCreate = true,
|
|
268
283
|
}) {
|
|
269
|
-
const regex = /!\[\[([^\]|#]+\.(?:base|excalidraw|drawio|mmd|mermaid|puml|plantuml))(?:#([^\]|]+))?(?:\|([^\]]+))?\]\]|\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/gi;
|
|
284
|
+
const regex = /!\[\[([^\]|#]+\.(?:base|excalidraw|drawio|mmd|mermaid|puml|plantuml|png|jpe?g|webp|gif|svg))(?:#([^\]|]+))?(?:\|([^\]]+))?\]\]|\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/gi;
|
|
270
285
|
let lastIndex = 0;
|
|
271
286
|
let html = '';
|
|
272
287
|
let match;
|
|
@@ -315,6 +330,12 @@ function renderInlineWikiText(content, {
|
|
|
315
330
|
label: normalizePreviewTypography(label.replace(/\.(?:mmd|mermaid)$/i, '')),
|
|
316
331
|
target,
|
|
317
332
|
});
|
|
333
|
+
} else if (isImageAttachmentFilePath(target)) {
|
|
334
|
+
const resolvedPath = resolveWikiImageAttachmentPath(target, sourceFilePath);
|
|
335
|
+
const alt = normalizePreviewTypography(label.replace(/\.(?:png|jpe?g|webp|gif|svg)$/i, ''));
|
|
336
|
+
html += resolvedPath
|
|
337
|
+
? `<img src="${escapeHtml(`${attachmentApiPath}?path=${encodeURIComponent(resolvedPath)}`)}" alt="${escapeHtml(alt)}" loading="lazy" decoding="async">`
|
|
338
|
+
: `<a class="wiki-link wiki-link-new" href="#" data-wiki-target="${escapeHtml(target)}" title="${escapeHtml(`Missing "${target}"`)}">${escapePreviewText(label)}</a>`;
|
|
318
339
|
} else {
|
|
319
340
|
const occurrenceIndex = plantUmlEmbedCounts.get(target) ?? 0;
|
|
320
341
|
plantUmlEmbedCounts.set(target, occurrenceIndex + 1);
|
|
@@ -327,7 +348,7 @@ function renderInlineWikiText(content, {
|
|
|
327
348
|
} else {
|
|
328
349
|
const target = match[4].trim();
|
|
329
350
|
const display = (match[5] || match[4]).trim();
|
|
330
|
-
const resolved =
|
|
351
|
+
const resolved = resolveWikiTargetWithIndex(target, wikiTargetIndex);
|
|
331
352
|
const classes = resolved ? 'wiki-link' : 'wiki-link wiki-link-new';
|
|
332
353
|
const title = resolved
|
|
333
354
|
? normalizePreviewTypography(display)
|
|
@@ -359,11 +380,7 @@ function createMarkdownRenderer(fileList = [], {
|
|
|
359
380
|
}
|
|
360
381
|
|
|
361
382
|
try {
|
|
362
|
-
|
|
363
|
-
return hljs.highlight(source, { language }).value;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
return hljs.highlightAuto(source).value;
|
|
383
|
+
return highlightFence(source, language);
|
|
367
384
|
} catch {
|
|
368
385
|
return '';
|
|
369
386
|
}
|
|
@@ -402,6 +419,7 @@ function createMarkdownRenderer(fileList = [], {
|
|
|
402
419
|
const plantUmlCounts = new Map();
|
|
403
420
|
const plantUmlEmbedCounts = new Map();
|
|
404
421
|
const videoEmbedCounts = new Map();
|
|
422
|
+
const wikiTargetIndex = createWikiTargetIndex(fileList);
|
|
405
423
|
|
|
406
424
|
const fallbackFence = markdown.renderer.rules.fence;
|
|
407
425
|
const fallbackImage = markdown.renderer.rules.image;
|
|
@@ -480,36 +498,39 @@ function createMarkdownRenderer(fileList = [], {
|
|
|
480
498
|
const content = tokens[index].content;
|
|
481
499
|
|
|
482
500
|
if (content.startsWith('[x] ') || content.startsWith('[X] ')) {
|
|
483
|
-
return `<input type="checkbox" checked data-task-checkbox="true"> ${renderInlineWikiText(content.slice(4), {
|
|
501
|
+
return `<label class="task-list-label"><input type="checkbox" checked data-task-checkbox="true"> ${renderInlineWikiText(content.slice(4), {
|
|
502
|
+
attachmentApiPath,
|
|
484
503
|
baseEmbedCounts: baseCounts,
|
|
485
504
|
drawioEmbedCounts,
|
|
486
505
|
excalidrawEmbedCounts,
|
|
487
|
-
|
|
506
|
+
wikiTargetIndex,
|
|
488
507
|
mermaidEmbedCounts,
|
|
489
508
|
plantUmlEmbedCounts,
|
|
490
509
|
sourceFilePath,
|
|
491
510
|
wikiLinkAutoCreate,
|
|
492
|
-
})}
|
|
511
|
+
})}</label>`;
|
|
493
512
|
}
|
|
494
513
|
|
|
495
514
|
if (content.startsWith('[ ] ')) {
|
|
496
|
-
return `<input type="checkbox" data-task-checkbox="true"> ${renderInlineWikiText(content.slice(4), {
|
|
515
|
+
return `<label class="task-list-label"><input type="checkbox" data-task-checkbox="true"> ${renderInlineWikiText(content.slice(4), {
|
|
516
|
+
attachmentApiPath,
|
|
497
517
|
baseEmbedCounts: baseCounts,
|
|
498
518
|
drawioEmbedCounts,
|
|
499
519
|
excalidrawEmbedCounts,
|
|
500
|
-
|
|
520
|
+
wikiTargetIndex,
|
|
501
521
|
mermaidEmbedCounts,
|
|
502
522
|
plantUmlEmbedCounts,
|
|
503
523
|
sourceFilePath,
|
|
504
524
|
wikiLinkAutoCreate,
|
|
505
|
-
})}
|
|
525
|
+
})}</label>`;
|
|
506
526
|
}
|
|
507
527
|
|
|
508
528
|
return renderInlineWikiText(content, {
|
|
529
|
+
attachmentApiPath,
|
|
509
530
|
baseEmbedCounts: baseCounts,
|
|
510
531
|
drawioEmbedCounts,
|
|
511
532
|
excalidrawEmbedCounts,
|
|
512
|
-
|
|
533
|
+
wikiTargetIndex,
|
|
513
534
|
mermaidEmbedCounts,
|
|
514
535
|
plantUmlEmbedCounts,
|
|
515
536
|
sourceFilePath,
|
|
@@ -545,6 +566,8 @@ function createMarkdownRenderer(fileList = [], {
|
|
|
545
566
|
return renderedVideo;
|
|
546
567
|
}
|
|
547
568
|
|
|
569
|
+
token.attrSet('loading', 'lazy');
|
|
570
|
+
token.attrSet('decoding', 'async');
|
|
548
571
|
return renderToken(fallbackImage, tokens, index, options, env, self);
|
|
549
572
|
};
|
|
550
573
|
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cancelIdleRender,
|
|
3
|
-
IDLE_RENDER_TIMEOUT_MS,
|
|
4
|
-
requestIdleRender,
|
|
5
|
-
} from './preview-diagram-utils.js';
|
|
6
1
|
|
|
7
2
|
function createPreviewWorker() {
|
|
8
3
|
return new Worker(new URL('./preview-render-worker.js', import.meta.url), { type: 'module' });
|
|
@@ -11,28 +6,21 @@ function createPreviewWorker() {
|
|
|
11
6
|
export class PreviewRenderExecutor {
|
|
12
7
|
constructor({
|
|
13
8
|
attachmentApiPath = '/api/attachment',
|
|
14
|
-
cancelIdleRenderFn = cancelIdleRender,
|
|
15
9
|
compilePreviewDocumentLoader = () => import('./preview-render-compiler.js'),
|
|
16
10
|
createWorkerFn = createPreviewWorker,
|
|
17
11
|
getFileList,
|
|
18
12
|
getSourceFilePath = null,
|
|
19
13
|
getWikiLinkAutoCreate = null,
|
|
20
|
-
idleTimeoutMs = IDLE_RENDER_TIMEOUT_MS,
|
|
21
|
-
requestIdleRenderFn = requestIdleRender,
|
|
22
14
|
} = {}) {
|
|
23
15
|
this.attachmentApiPath = attachmentApiPath;
|
|
24
|
-
this.cancelIdleRenderFn = cancelIdleRenderFn;
|
|
25
16
|
this.compilePreviewDocumentLoader = compilePreviewDocumentLoader;
|
|
26
17
|
this.createWorkerFn = createWorkerFn;
|
|
27
18
|
this.getFileList = getFileList;
|
|
28
19
|
this.getSourceFilePath = getSourceFilePath;
|
|
29
20
|
this.getWikiLinkAutoCreate = getWikiLinkAutoCreate;
|
|
30
|
-
this.idleTimeoutMs = idleTimeoutMs;
|
|
31
|
-
this.requestIdleRenderFn = requestIdleRenderFn;
|
|
32
21
|
this.worker = null;
|
|
33
22
|
this.workerDisabled = false;
|
|
34
23
|
this.workerJob = null;
|
|
35
|
-
this.workerPrewarmId = null;
|
|
36
24
|
|
|
37
25
|
this.handleWorkerMessage = (event) => {
|
|
38
26
|
if (!this.workerJob || event.data?.renderVersion !== this.workerJob.renderVersion) {
|
|
@@ -68,16 +56,6 @@ export class PreviewRenderExecutor {
|
|
|
68
56
|
return this.workerJob !== null;
|
|
69
57
|
}
|
|
70
58
|
|
|
71
|
-
schedulePrewarm({ timeout = this.idleTimeoutMs } = {}) {
|
|
72
|
-
if (this.workerDisabled || this.worker || this.workerPrewarmId !== null) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
this.workerPrewarmId = this.requestIdleRenderFn(() => {
|
|
77
|
-
this.workerPrewarmId = null;
|
|
78
|
-
this.ensureWorker();
|
|
79
|
-
}, timeout);
|
|
80
|
-
}
|
|
81
59
|
|
|
82
60
|
ensureWorker() {
|
|
83
61
|
if (this.workerDisabled) {
|
|
@@ -163,10 +141,6 @@ export class PreviewRenderExecutor {
|
|
|
163
141
|
}
|
|
164
142
|
|
|
165
143
|
destroy(reason = 'Preview renderer destroyed') {
|
|
166
|
-
if (this.workerPrewarmId !== null) {
|
|
167
|
-
this.cancelIdleRenderFn(this.workerPrewarmId);
|
|
168
|
-
}
|
|
169
|
-
this.workerPrewarmId = null;
|
|
170
144
|
this.reset(reason);
|
|
171
145
|
}
|
|
172
146
|
}
|