collabmd 0.1.45 → 0.1.47
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 +40 -19
- package/bin/collabmd.js +27 -1
- package/dist/client/assets/CodeMirrorEditor-UCMRAMCV-BPH4FJkv.js +1 -0
- package/dist/client/assets/{abnfDiagram-N423BO3Z-CUMTFJhI.js → abnfDiagram-VCTEODGH-BNDLzJ7L.js} +1 -1
- package/dist/client/assets/architecture-7GRP2DOG-BMOPAkUC.js +1 -0
- package/dist/client/assets/{architectureDiagram-T3A2C74G-w25m71oV.js → architectureDiagram-5GKGNRK7-I39sYjHI.js} +1 -1
- package/dist/client/assets/base-BYODPHdS.js +1 -0
- package/dist/client/assets/blockDiagram-NRAW4CY4-C6DtJy5Y.js +129 -0
- package/dist/client/assets/browser-BKLM0ThC-IxjwuOIz-BBqQnUEb.js +1 -0
- package/dist/client/assets/browser-utils--H_DkyEF.js +1 -0
- package/dist/client/assets/c4Diagram-UCG6FXSJ-CtWtxS9_.js +38 -0
- package/dist/client/assets/channel-CaoKA_We.js +1 -0
- package/dist/client/assets/{chunk-U6XO7XAA-BFxjP5U3.js → chunk-2ZTRR5NV-C2qZJila.js} +1 -1
- package/dist/client/assets/{chunk-YOTPTUD7-D0vRKqYp.js → chunk-3Z5EZCMW-DMniOlPd.js} +1 -1
- package/dist/client/assets/{chunk-BIQX33UG-DZEsGuSn.js → chunk-5V3GS4D5-i-ZDOEnP.js} +1 -1
- package/dist/client/assets/{chunk-MOZMSUNE-XVucA-n6.js → chunk-6AZGARVD-BB6FqMl-.js} +1 -1
- package/dist/client/assets/{chunk-5JV3BV7I-Cy5pj3QY.js → chunk-6EIED4P4-DdUJkP0f.js} +1 -1
- package/dist/client/assets/{chunk-R7FJI6CG-Cnn3gE-Y.js → chunk-6K3QC6MW-CqVsVn-y.js} +1 -1
- package/dist/client/assets/{chunk-OSBZ3O6U-CrKZOUOr.js → chunk-6TQVIW2G-DKlLbNIP.js} +1 -1
- package/dist/client/assets/{chunk-JG7HCLWE-BYfiSaVt.js → chunk-747NJXEK-BFkZPlab.js} +1 -1
- package/dist/client/assets/{chunk-NSK5VX7P-TLH37VXI.js → chunk-75Z2AOVW-CdFSaPjz.js} +1 -1
- package/dist/client/assets/chunk-CKBBP62Z-DG26UiBv.js +2 -0
- package/dist/client/assets/{chunk-3NCLNEKW-Y2Jf_LI-.js → chunk-CLGD4ZFX-DQLgbQrv.js} +1 -1
- package/dist/client/assets/chunk-DSNCTWBM-8xkug7fQ.js +2 -0
- package/dist/client/assets/chunk-DU6HZSFF-COXDzJK1.js +127 -0
- package/dist/client/assets/{chunk-2GRJ4B5K-DhnlUv3F.js → chunk-F27PBJKO-CNHIFhjo.js} +1 -1
- package/dist/client/assets/{chunk-YGJVY4SA-CjSe7Bx7.js → chunk-FLYJHZSQ-Be7lKF17.js} +1 -1
- package/dist/client/assets/{chunk-KEIR6QF5-BICK3FdT.js → chunk-FOHPRMQF-DHwB1DNv.js} +2 -2
- package/dist/client/assets/{chunk-5RXB4S5H-BWrwFqMI.js → chunk-G27WJ6UU-D9-eg537.js} +2 -2
- package/dist/client/assets/chunk-GMAD6QVW-CbcBqPM5.js +72 -0
- package/dist/client/assets/{chunk-QBLGF6JB-CxAyS2mW.js → chunk-I5DQTOEV-Hm2LfiYI.js} +1 -1
- package/dist/client/assets/{chunk-5FCAYU7R-Dh5nylU8.js → chunk-ICYGCRZG-749o-pGJ.js} +1 -1
- package/dist/client/assets/{chunk-CQNSW5MT-B8S09OIh.js → chunk-IH6LHLGP-CC6I9F3i.js} +1 -1
- package/dist/client/assets/chunk-JQ64N6SF-DSFNH4bh.js +1 -0
- package/dist/client/assets/{chunk-CYSBUYHQ-C1Rf4art.js → chunk-KI3K4JFJ-Rma-0k_M.js} +1 -1
- package/dist/client/assets/{chunk-GF5L2VYU-DkJpO7ff.js → chunk-LCL6LL3I-DmDkVukh.js} +1 -1
- package/dist/client/assets/chunk-LNGE3PJU-DWpGwHrW.js +34 -0
- package/dist/client/assets/chunk-OBVCFTLP-BJR7u1jh.js +1 -0
- package/dist/client/assets/{chunk-5TONJI2A-DQOY3q1H.js → chunk-OUJLGHUK-D0j2JRSg.js} +1 -1
- package/dist/client/assets/chunk-P2QGCYS3-BRpqY32H.js +1 -0
- package/dist/client/assets/{chunk-KBJHAD2P-CB_3zWUf.js → chunk-POPQ4Y6H-Cb4SlVZF.js} +1 -1
- package/dist/client/assets/{chunk-4I5QYGJK-CCB2YcIH.js → chunk-PWAF6VOD-Cz8IwBB5.js} +1 -1
- package/dist/client/assets/chunk-R7TYR2AO-CTd0Yj98.js +10 -0
- package/dist/client/assets/chunk-RHFEMEQ7-CWY8cf4H.js +168 -0
- package/dist/client/assets/chunk-RM4UPSZO-CWRwxNWJ.js +41 -0
- package/dist/client/assets/{chunk-6Q2QTUOP-CPlWzBtc.js → chunk-SVP7TREG-CyHOmcac.js} +1 -1
- package/dist/client/assets/chunk-TEH6E4GO-DVayPj-q.js +62 -0
- package/dist/client/assets/{chunk-EMLP6XTP-RLD4nXpI.js → chunk-UY3FDG6J-CnmaAkG5.js} +1 -1
- package/dist/client/assets/{chunk-5HE753X5-Bw-yg4kO.js → chunk-XHIXRSVI-BFQ6B8BE.js} +1 -1
- package/dist/client/assets/classDiagram-DTDB5LWJ-7fEmn0zV.js +1 -0
- package/dist/client/assets/classDiagram-v2-JRS7N3AN-7fEmn0zV.js +1 -0
- package/dist/client/assets/comment-thread-store-CdcwrObc.js +1 -0
- package/dist/client/assets/comment-threads-9J6Em-_y.js +4 -0
- package/dist/client/assets/comment-ui-shared-DWkk9Vh3.js +7 -0
- package/dist/client/assets/cynefin-OW5HDTMX-7tP7QfM3.js +1 -0
- package/dist/client/assets/{cynefinDiagram-MW4NZA55-CJxXfJek.js → cynefinDiagram-5FMLGOSQ-CdTPi2yO.js} +1 -1
- package/dist/client/assets/dagre-3AP2YEHR-5gtJtd0O.js +4 -0
- package/dist/client/assets/dagre-PrKaheQc.js +1 -0
- package/dist/client/assets/{diagram-7IWD3JNH-B2d2Bm15.js → diagram-S7CK7UJ4-BudWz9WU.js} +4 -4
- package/dist/client/assets/{diagram-UB23O5K3-DJcKCwv9.js → diagram-UQ7AKVKN-3v4rbH-s.js} +1 -1
- package/dist/client/assets/{diagram-B4RE2ZJO-NP4UAwjR.js → diagram-VSXAHHWV-CQRVEZR7.js} +1 -1
- package/dist/client/assets/{diagram-Q27KOJAE-DylDuwor.js → diagram-VX7I27RA-C_-rj0sw.js} +1 -1
- package/dist/client/assets/{diagram-LBJQPF4R-D1FJQV8t.js → diagram-Z3DM3KII-B4yxavgj.js} +1 -1
- package/dist/client/assets/direct-engine-DdrQKpgq-CtKfQzCt.js +5 -0
- package/dist/client/assets/dist-73RPdcyU.js +1 -0
- package/dist/client/assets/dist-BJ1bJs33.js +1 -0
- package/dist/client/assets/{dist-CYZmbokb.js → dist-BK9QvQrc.js} +9 -9
- package/dist/client/assets/dist-BPHLJ09L.js +11 -0
- package/dist/client/assets/dist-B_yQaEv_.js +6 -0
- package/dist/client/assets/dist-BeajGMhO.js +1 -0
- package/dist/client/assets/{dist-JYEDRrPT.js → dist-Bw3VIE_v.js} +1 -1
- package/dist/client/assets/dist-ByrG2qBA.js +1 -0
- package/dist/client/assets/dist-C5NgpdG5.js +1 -0
- package/dist/client/assets/dist-CH-sQu3r.js +1 -0
- package/dist/client/assets/dist-CKS_-are.js +1 -0
- package/dist/client/assets/{dist-MvcV4190.js → dist-CdmKGRGr.js} +1 -1
- package/dist/client/assets/{dist-DGb27Dl6.js → dist-CietwTVS.js} +1 -1
- package/dist/client/assets/dist-D37Hyu3h.js +9 -0
- package/dist/client/assets/dist-D3fehAZ2.js +2 -0
- package/dist/client/assets/dist-D5wCC32z.js +1 -0
- package/dist/client/assets/{dist-DCzuX1AF.js → dist-DDUn5zTz.js} +1 -1
- package/dist/client/assets/dist-DGEbEfw4.js +1 -0
- package/dist/client/assets/dist-DVy5woUy.js +1 -0
- package/dist/client/assets/{dist-3bgCp7iY.js → dist-DZAAWTG-.js} +1 -1
- package/dist/client/assets/{dist-Drp8uu5J.js → dist-Dir5dDKZ.js} +1 -1
- package/dist/client/assets/dist-Dl_tpDSr.js +1 -0
- package/dist/client/assets/dist-DuH3ZrHo.js +1 -0
- package/dist/client/assets/dist-DutPuFmC.js +1 -0
- package/dist/client/assets/{dist-D2AQ-76g.js → dist-LQ4kDCKz.js} +1 -1
- package/dist/client/assets/{dist-C11hHqv_.js → dist-RKBTaQMb.js} +12 -12
- package/dist/client/assets/dist-Tw-Fxpeb.js +1 -0
- package/dist/client/assets/dist-eBx8q6Sy.js +1 -0
- package/dist/client/assets/{dist-DK5Gs2wa.js → dist-mj2Ht75J.js} +1 -1
- package/dist/client/assets/{dist-CnL7Y2sM.js → dist-netZOQtD.js} +1 -1
- package/dist/client/assets/{drawio-editor-ClE8jpoG.js → drawio-editor-BjrxTe3l.js} +1 -1
- package/dist/client/assets/drawioEditor-DUVZjSSr.js +2 -0
- package/dist/client/assets/{ebnfDiagram-BXEA7PRR-nw0wmA6y.js → ebnfDiagram-PWID7BFC-OXa8VEp1.js} +1 -1
- package/dist/client/assets/editor-session-DfZuRgB_.js +54 -0
- package/dist/client/assets/embedded-editor-base-DvMynhKu.css +1 -0
- package/dist/client/assets/embedpdf-BmE13ZZ0.js +1 -0
- package/dist/client/assets/embedpdf-DA4bA119-BPqZxwjc.js +2363 -0
- package/dist/client/assets/{en-7NFCYGKX-BrgYZAEe.js → en-SJ2YIMFF-CJBL3nkq.js} +1 -1
- package/dist/client/assets/erDiagram-SSCWMZ5O-C-iy6VkX.js +99 -0
- package/dist/client/assets/es-CAsWR6hG.js +22 -0
- package/dist/client/assets/eventmodeling-NTZA5JFV-BR2FzK4R.js +1 -0
- package/dist/client/assets/excalidraw-editor-BlcN6umJ.css +1 -0
- package/dist/client/assets/excalidraw-editor-D7pnUCLH.js +9 -0
- package/dist/client/assets/excalidraw-scene-BOben2gr.js +1 -0
- package/dist/client/assets/excalidrawEditor-B0jOK3lv.js +2 -0
- package/dist/client/assets/export-page-Bs3xE1fg.js +57 -0
- package/dist/client/assets/exportDocument-Dg9MjkIk.js +2 -0
- package/dist/client/assets/exportDocument-PnYU3v1s.css +1 -0
- package/dist/client/assets/file-icon-svg-CQAjlWjK.js +1 -0
- package/dist/client/assets/file-kind-BbqgGzpc.js +1 -0
- package/dist/client/assets/flowDiagram-A5DVABFB-CiW1eN8C.js +1 -0
- package/dist/client/assets/{ganttDiagram-PKOTCBZU-BnM97BCT.js → ganttDiagram-EL5Y4UJY-DtKHAbez.js} +1 -1
- package/dist/client/assets/gitGraph-4MIJSDKK-DYlXv_yJ.js +1 -0
- package/dist/client/assets/{gitGraphDiagram-DS77QQ5N-BQpQhjuN.js → gitGraphDiagram-WWUBYQGX-oue8fQ5o.js} +1 -1
- package/dist/client/assets/github-dark.min-BV82VuKq.css +1 -0
- package/dist/client/assets/github.min-v3dd8CNH.css +1 -0
- package/dist/client/assets/image-ZVKINSPA-0zXSnE7M.js +1 -0
- package/dist/client/assets/index-BIpgxyGZ.css +1 -0
- package/dist/client/assets/index-Z5sI0Bj-.js +2 -0
- package/dist/client/assets/info-A6RAGUB7-BlU-8_xu.js +1 -0
- package/dist/client/assets/{infoDiagram-6WML65LV-DYB8HCDQ.js → infoDiagram-RXCK75RN-BMzo6KIn.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-WSZJBQD7-Coz_P3t6.js → ishikawaDiagram-5VMMS53U-BIM3h287.js} +1 -1
- package/dist/client/assets/{journeyDiagram-NVQOT4AX-B6edChce.js → journeyDiagram-EYS64GPL-mF6Lh8O-.js} +1 -1
- package/dist/client/assets/{kanban-definition-27J2QSJJ-BFd9-cLc.js → kanban-definition-3QL26DDD-DLN2NyoR.js} +2 -2
- package/dist/client/assets/{line-B_S_S8kV.js → line-BfTWJmgf.js} +1 -1
- package/dist/client/assets/main-Dwnj9Gaq.js +903 -0
- package/dist/client/assets/{mermaid-parser.core-CUVdebAV.js → mermaid-parser.core-Bl0efOMt.js} +2 -2
- package/dist/client/assets/mermaid.core-CLZBlpIW.js +11 -0
- package/dist/client/assets/{mindmap-definition-FAOFIHXS-C9PQ38Al.js → mindmap-definition-FBJOCRG2-CRyHaHTk.js} +1 -1
- package/dist/client/assets/packet-AYTQ26CC-BSJEH9Lb.js +1 -0
- package/dist/client/assets/pdfium-RAgkpwfK.wasm +0 -0
- package/dist/client/assets/{pegDiagram-VL7TDLO6-BMZUrSaU.js → pegDiagram-XKGWAZYB-B31fKPR2.js} +1 -1
- package/dist/client/assets/pie-WAS4IAKB-qxv01Y8W.js +1 -0
- package/dist/client/assets/{pieDiagram-7S7Q4E2Y-h8kbCL9o.js → pieDiagram-E7YTZNPT-B5OZPb88.js} +1 -1
- package/dist/client/assets/preview-render-compiler-BApvlLLo.js +35 -0
- package/dist/client/assets/preview-render-compiler-BQ_3h9vD.js +1 -0
- package/dist/client/assets/preview-render-profile-CE-5rVTC.js +1 -0
- package/dist/client/assets/preview-render-worker-BmN79bVc.js +60 -0
- package/dist/client/assets/prod-BiYPMR1i.js +177 -0
- package/dist/client/assets/prod-VxdGZ5Ly.js +1 -0
- package/dist/client/assets/{quadrantDiagram-CIZ2JOQS-CkElyfMi.js → quadrantDiagram-AXDQQJYC-Drrw14YH.js} +1 -1
- package/dist/client/assets/quick-switcher-controller-ButWPmCI.js +12 -0
- package/dist/client/assets/radar-RG4KPBEZ-B6h6pWOs.js +1 -0
- package/dist/client/assets/railroad-74A4TZTK-CGtTWdGc.js +1 -0
- package/dist/client/assets/railroad-abnf-HS5TGJTU-Cq7y22IA.js +1 -0
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-V0aQVv9m.js +1 -0
- package/dist/client/assets/railroad-peg-WCYAUIDC-BQiIsX_p.js +1 -0
- package/dist/client/assets/{railroadDiagram-AXF67PYL-c75gnikD.js → railroadDiagram-O6MQD6OU-BPifP0MB.js} +1 -1
- package/dist/client/assets/{requirementDiagram-LRYGKXZP-mNxKLuHS.js → requirementDiagram-EFPCY7ZU-CRZG6mRB.js} +2 -2
- package/dist/client/assets/runtime-config-BLrEKVO1.js +1 -0
- package/dist/client/assets/{sankeyDiagram-W5VNT64P-0OhplksI.js → sankeyDiagram-P5KCCOFB-DvarEJpo.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-SI44F4Z6-BJ_yAocC.js → sequenceDiagram-WJ2MYXX4-B4oWlb-w.js} +1 -1
- package/dist/client/assets/{stateDiagram-OKZ733FA-Cc83O86s.js → stateDiagram-HBIQ2CUA-qbHIIqRZ.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-4QOOHH4V-B--gjrit.js +1 -0
- package/dist/client/assets/swimlanes-XN3QIQJK-xB6CtUGj.js +1 -0
- package/dist/client/assets/swimlanesDiagram-VK2B7HYN-DO8XNXEg.js +8 -0
- package/dist/client/assets/{timeline-definition-Z64GVDOM-BWDAGTHz.js → timeline-definition-24CTP7MA-Lj_yTNlY.js} +1 -1
- package/dist/client/assets/treeView-Q6P3EWNA-BTTYcvrF.js +1 -0
- package/dist/client/assets/treemap-WGGIJYW6-Cg7tyfH8.js +1 -0
- package/dist/client/assets/vault-api-client-_LpV1aIn.js +6 -0
- package/dist/client/assets/{vennDiagram-T6HMQDX7-LOSsnlMB.js → vennDiagram-4TSXK5OY-BekRp5Y0.js} +1 -1
- package/dist/client/assets/wardley-WFR3VGLG-C6N1rULY.js +1 -0
- package/dist/client/assets/{wardleyDiagram-T6FBY63Y-BxII3foY.js → wardleyDiagram-VM6X3IG4-kdnV_Hdm.js} +1 -1
- package/dist/client/assets/worker-engine-m0rlHn8R-S8mpn_O0.js +17369 -0
- package/dist/client/assets/{xychartDiagram-ELKLHX3M-B-pTEjju.js → xychartDiagram-S5SC5T6Z-DufGwNSB.js} +3 -3
- package/dist/client/drawio-editor.html +1 -1
- package/dist/client/excalidraw-editor.html +1 -1
- package/dist/client/export-document.html +3 -3
- package/dist/client/index.html +30 -8
- package/docker-compose.yml +42 -0
- package/package.json +32 -18
- package/scripts/local-structurizr-compose.mjs +101 -0
- package/src/client/app/index.html +27 -5
- package/src/client/application/app-shell/comments-feature.js +21 -13
- package/src/client/application/app-shell/git-feature.js +14 -2
- package/src/client/application/app-shell/presence-feature.js +4 -3
- package/src/client/application/app-shell/ui-feature-shell.js +109 -2
- package/src/client/application/app-shell/ui-feature-toolbar.js +2 -52
- package/src/client/application/app-shell/workspace-feature.js +5 -1
- package/src/client/application/app-shell-elements.js +3 -0
- package/src/client/application/pdf-preview-controller.js +75 -0
- package/src/client/application/preview-render-compiler.js +3 -0
- package/src/client/application/quick-switcher-loader.js +1 -1
- package/src/client/application/structurizr-preview-controller.js +395 -0
- package/src/client/application/workspace-coordinator.js +25 -3
- package/src/client/application/workspace-preview-controller.js +88 -2
- package/src/client/assets/vendor/highlight/github-dark.min.css +2 -10
- package/src/client/assets/vendor/highlight/github.min.css +2 -10
- package/src/client/bootstrap/collabmd-app-shell.js +39 -6
- package/src/client/browser-utils.js +44 -0
- package/src/client/domain/runtime-paths.js +26 -5
- package/src/client/domain/structurizr-language.js +99 -0
- package/src/client/domain/vault-paths.js +48 -0
- package/src/client/excalidraw-editor.js +844 -51
- package/src/client/export/export-host.js +1 -1
- package/src/client/export/export-page.js +6 -2
- package/src/client/export/export-pipeline.js +60 -1
- package/src/client/infrastructure/browser-preferences-port.js +10 -0
- package/src/client/infrastructure/comment-thread-store.js +34 -13
- package/src/client/infrastructure/editor-session.js +10 -0
- package/src/client/infrastructure/editor-view-adapter.js +46 -2
- package/src/client/infrastructure/excalidraw-room-client.js +103 -14
- package/src/client/infrastructure/git-api-client.js +5 -0
- package/src/client/infrastructure/vault-api-client.js +26 -0
- package/src/client/presentation/comment-ui/comment-ui-render.js +4 -0
- package/src/client/presentation/comment-ui/comment-ui-shared.js +4 -0
- package/src/client/presentation/comment-ui-controller.js +2 -0
- package/src/client/presentation/drawio-embed-controller.js +9 -102
- package/src/client/presentation/drawio-viewer.js +118 -0
- package/src/client/presentation/excalidraw-embed-controller.js +81 -8
- package/src/client/presentation/file-action-controller.js +102 -0
- package/src/client/presentation/file-explorer-controller.js +0 -5
- package/src/client/presentation/file-explorer-view.js +51 -73
- package/src/client/presentation/file-icon-svg.js +40 -0
- package/src/client/presentation/file-tree-state.js +6 -3
- package/src/client/presentation/git-diff-view-controller.js +731 -3
- package/src/client/presentation/git-panel-controller.js +2 -2
- package/src/client/presentation/outline-controller.js +86 -0
- package/src/client/presentation/quick-switcher-controller.js +73 -22
- package/src/client/presentation/quick-switcher-text-search.js +1 -1
- package/src/client/styles/components/navigation.css +11 -1
- package/src/client/styles/features/diagram-preview.css +76 -0
- package/src/client/styles/features/diff-special.css +309 -0
- package/src/client/styles/features/preview-markdown.css +25 -0
- package/src/client/styles/features/quick-switcher.css +8 -0
- package/src/client/styles/foundation/themes.css +7 -0
- package/src/client/styles/layout/shell.css +40 -1
- package/src/client/styles/layout/sidebar.css +42 -4
- package/src/client/styles/layout/view-modes.css +1 -0
- package/src/client/styles/overrides/highlightjs.css +20 -4
- package/src/client/styles/style.css +1 -0
- package/src/client/styles/surfaces/excalidraw-editor.css +294 -0
- package/src/domain/comment-threads.js +63 -5
- package/src/domain/excalidraw-room-codec.js +6 -4
- package/src/domain/file-kind.js +35 -3
- package/src/server/config/env.js +79 -0
- package/src/server/create-app-server.js +12 -0
- package/src/server/domain/bases/base-definition.js +1 -1
- package/src/server/domain/bases/base-expression-runtime.js +1 -4
- package/src/server/domain/bases/base-index-snapshot-store.js +1 -4
- package/src/server/domain/bases/base-transform.js +1 -4
- package/src/server/domain/collaboration/collaboration-room.js +55 -21
- package/src/server/domain/comment-overview.js +15 -5
- package/src/server/domain/ripgrep-search-service.js +4 -0
- package/src/server/infrastructure/git/diff-service.js +5 -0
- package/src/server/infrastructure/git/git-service.js +44 -11
- package/src/server/infrastructure/git/history-service.js +54 -0
- package/src/server/infrastructure/git/image-mime.js +14 -0
- package/src/server/infrastructure/git/untracked-files.js +28 -1
- package/src/server/infrastructure/http/create-git-api-command-handler.js +3 -1
- package/src/server/infrastructure/http/create-git-api-query-handler.js +31 -1
- package/src/server/infrastructure/http/create-request-handler.js +16 -23
- package/src/server/infrastructure/http/create-static-handler.js +5 -2
- package/src/server/infrastructure/http/create-structurizr-api-handler.js +147 -0
- package/src/server/infrastructure/http/create-vault-api-command-handler.js +66 -4
- package/src/server/infrastructure/http/create-vault-api-query-handler.js +51 -3
- package/src/server/infrastructure/http/http-request-helpers.js +22 -0
- package/src/server/infrastructure/persistence/path-utils.js +1 -1
- package/src/server/infrastructure/persistence/vault-file-store.js +3 -0
- package/src/server/infrastructure/structurizr/structurizr-embed.css +43 -0
- package/src/server/infrastructure/structurizr/structurizr-workspace-service.js +400 -0
- package/src/server/infrastructure/websocket/attach-collaboration-gateway.js +4 -22
- package/dist/client/assets/CodeMirrorEditor-UCMRAMCV-CbSISC1w.js +0 -1
- package/dist/client/assets/architecture-TIHT7OUA-CsHfPErM.js +0 -1
- package/dist/client/assets/base-CxPEiHuy.js +0 -1
- package/dist/client/assets/blockDiagram-VBNYF7ZC-CipJt9Jl.js +0 -132
- package/dist/client/assets/browser-utils-CKtI_rZl.js +0 -1
- package/dist/client/assets/c4Diagram-5PPSVZJV-B5ktVx6g.js +0 -10
- package/dist/client/assets/channel-4Jkmq93I.js +0 -1
- package/dist/client/assets/chunk-7BUUIJ7U-Bb538aSH.js +0 -1
- package/dist/client/assets/chunk-7Z6QIM7H-BP9Pdsm9.js +0 -10
- package/dist/client/assets/chunk-ERSWUTIN-ME9RVNel.js +0 -41
- package/dist/client/assets/chunk-I66GZJ75-CVFiiffQ.js +0 -127
- package/dist/client/assets/chunk-J7OUQ5F2-4CEb7pvH.js +0 -2
- package/dist/client/assets/chunk-JQJVKLGR-cx8X_24v.js +0 -156
- package/dist/client/assets/chunk-QR6OTTB3-CDAA_5Ib.js +0 -62
- package/dist/client/assets/chunk-RYQCIY6F-D-a0zH8K.js +0 -1
- package/dist/client/assets/chunk-UBXNYLIW-Bhk-PbFK.js +0 -1
- package/dist/client/assets/chunk-W5SLKNZC-BdNSCxZ9.js +0 -1
- package/dist/client/assets/chunk-WRU74C26-h6_XkD3_.js +0 -70
- package/dist/client/assets/chunk-ZIRB5QZD-O39ZBUk3.js +0 -32
- package/dist/client/assets/classDiagram-JCYQIIEL-L7lsyW_w.js +0 -1
- package/dist/client/assets/classDiagram-v2-OCEON4UE-L7lsyW_w.js +0 -1
- package/dist/client/assets/comment-threads-DDegmaFO.js +0 -4
- package/dist/client/assets/cynefin-VYW2F7L2-Ds2Fw2Y0.js +0 -1
- package/dist/client/assets/dagre-Buvkdvvj.js +0 -1
- package/dist/client/assets/dagre-VZM6K2ZE-L1xArOGs.js +0 -4
- package/dist/client/assets/dist-BH87JoHx.js +0 -11
- package/dist/client/assets/dist-BIkPRZO7.js +0 -6
- package/dist/client/assets/dist-BqCsFpx4.js +0 -1
- package/dist/client/assets/dist-C2JHCt8U.js +0 -1
- package/dist/client/assets/dist-CZjTtmTu.js +0 -1
- package/dist/client/assets/dist-Cig4Ov_X.js +0 -1
- package/dist/client/assets/dist-CqQEC8gR.js +0 -1
- package/dist/client/assets/dist-D4Rzqod1.js +0 -1
- package/dist/client/assets/dist-D5sn-mwk.js +0 -9
- package/dist/client/assets/dist-D7G-n87v.js +0 -1
- package/dist/client/assets/dist-DRqOrNgN.js +0 -1
- package/dist/client/assets/dist-DetkMS_4.js +0 -1
- package/dist/client/assets/dist-DhLvC8DS.js +0 -2
- package/dist/client/assets/dist-Dp6FVkQ1.js +0 -1
- package/dist/client/assets/dist-DtbjNB28.js +0 -1
- package/dist/client/assets/dist-DyrYcvpo2.js +0 -1
- package/dist/client/assets/dist-GrygD2zE.js +0 -1
- package/dist/client/assets/dist-HmEpWUow.js +0 -1
- package/dist/client/assets/dist-RTa81Km7.js +0 -1
- package/dist/client/assets/drawioEditor-CXaTM9Ds.js +0 -2
- package/dist/client/assets/editor-session-GTwZS6Df.js +0 -16
- package/dist/client/assets/embedded-editor-base-CiNEc8vy.css +0 -1
- package/dist/client/assets/erDiagram-JOGREHBK-cYUpEKpf.js +0 -85
- package/dist/client/assets/eventmodeling-45OFAUF4-CLEiVx5s.js +0 -1
- package/dist/client/assets/excalidraw-editor-BZVM81BO.js +0 -9
- package/dist/client/assets/excalidraw-editor-CyGwOhLz.css +0 -1
- package/dist/client/assets/excalidraw-scene-C8n9CHsK.js +0 -176
- package/dist/client/assets/excalidrawEditor-DxJanCze.js +0 -2
- package/dist/client/assets/export-page-CUfws2T-.js +0 -39
- package/dist/client/assets/exportDocument-BCuxqXDY.js +0 -2
- package/dist/client/assets/exportDocument-DV-OX74E.css +0 -1
- package/dist/client/assets/file-kind-BKPOIRPE.js +0 -1
- package/dist/client/assets/flowDiagram-UKHOOZJN-D0ypP0Ez.js +0 -1
- package/dist/client/assets/gitGraph-TEB2WS4Q-CZFBqwW-.js +0 -1
- package/dist/client/assets/github-dark.min-Z5exjX_n.css +0 -1
- package/dist/client/assets/github.min-D2BCvnWf.css +0 -1
- package/dist/client/assets/image-QXRYHUNP-lfTHE3bb.js +0 -1
- package/dist/client/assets/index-C3YnUgMD.css +0 -1
- package/dist/client/assets/index-D2wXraJ1.js +0 -2
- package/dist/client/assets/info-DKCQHKI2--1InqQeT.js +0 -1
- package/dist/client/assets/main-DtiGz7uI.js +0 -795
- package/dist/client/assets/map-BaFkSB1l.js +0 -1
- package/dist/client/assets/mermaid.core-DN-lF51U.js +0 -11
- package/dist/client/assets/packet-7NZHBO7P-BGMXB0XL.js +0 -1
- package/dist/client/assets/pie-RZYD4A2V-DgYg3tCt.js +0 -1
- package/dist/client/assets/preview-render-compiler-BSaQO_p3.js +0 -35
- package/dist/client/assets/preview-render-compiler-csGM5ZFz.js +0 -1
- package/dist/client/assets/preview-render-profile-BZzGSg6K.js +0 -22
- package/dist/client/assets/preview-render-worker-B42LWvrD.js +0 -60
- package/dist/client/assets/quick-switcher-controller-shW_6vPY.js +0 -12
- package/dist/client/assets/radar-I7S5WNFK-Ag-zp_Rq.js +0 -1
- package/dist/client/assets/railroad-3IZDKUUU-aibJDIDV.js +0 -1
- package/dist/client/assets/railroad-abnf-AHOZXSZD-BBMEuvIl.js +0 -1
- package/dist/client/assets/railroad-ebnf-EBAXGLYW-Be1nseej.js +0 -1
- package/dist/client/assets/railroad-peg-LSFZ7HO6-DIvD-Eyb.js +0 -1
- package/dist/client/assets/room-CQLoqtMo.js +0 -1
- package/dist/client/assets/runtime-config-DSGmGE9V.js +0 -1
- package/dist/client/assets/stateDiagram-v2-UEYNNEHI-B1-BufUk.js +0 -1
- package/dist/client/assets/swimlanes-SLNWSIFB-oVTWEJIj.js +0 -2
- package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-C5OTVwEu.js +0 -8
- package/dist/client/assets/treeView-QDETBFTQ-uHZ-3Fz8.js +0 -1
- package/dist/client/assets/treemap-6X3UGDF4-BnUKyy3l.js +0 -1
- package/dist/client/assets/vault-api-client-C6bcGwy-.js +0 -5
- package/dist/client/assets/wardley-OPB4EBWU-Da7TLC2F.js +0 -1
- package/src/server/domain/collaboration/room-persistence-controller.js +0 -80
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
import { resolveAppPath } from '../domain/runtime-paths.js';
|
|
2
|
+
import { setDiagramActionButtonIcon } from '../domain/diagram-action-icons.js';
|
|
3
|
+
|
|
4
|
+
const SYNC_DEBOUNCE_MS = 300;
|
|
5
|
+
const FRAME_FIT_ATTEMPTS = 20;
|
|
6
|
+
const FRAME_FIT_INTERVAL_MS = 50;
|
|
7
|
+
|
|
8
|
+
function decodeViewKey(hash = '') {
|
|
9
|
+
const normalized = String(hash ?? '').replace(/^#/, '');
|
|
10
|
+
if (!normalized) {
|
|
11
|
+
return '';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
return decodeURIComponent(normalized);
|
|
16
|
+
} catch {
|
|
17
|
+
return normalized;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function readFrameState(iframe) {
|
|
22
|
+
try {
|
|
23
|
+
const frameDocument = iframe?.contentDocument;
|
|
24
|
+
const layer = frameDocument?.querySelector('.joint-layers');
|
|
25
|
+
const viewport = frameDocument?.querySelector('#diagram-viewport');
|
|
26
|
+
const zoom = layer ? new DOMMatrixReadOnly(getComputedStyle(layer).transform).a : 0;
|
|
27
|
+
return {
|
|
28
|
+
scrollLeft: viewport?.scrollLeft ?? 0,
|
|
29
|
+
scrollTop: viewport?.scrollTop ?? 0,
|
|
30
|
+
zoom: Number.isFinite(zoom) && zoom > 0 ? zoom : null,
|
|
31
|
+
};
|
|
32
|
+
} catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class StructurizrPreviewController {
|
|
38
|
+
constructor({
|
|
39
|
+
enabled = false,
|
|
40
|
+
syncWorkspace,
|
|
41
|
+
}) {
|
|
42
|
+
this.enabled = Boolean(enabled);
|
|
43
|
+
this.syncWorkspace = syncWorkspace;
|
|
44
|
+
this.iframe = null;
|
|
45
|
+
this.shell = null;
|
|
46
|
+
this.status = null;
|
|
47
|
+
this.maximizeButton = null;
|
|
48
|
+
this.filePath = null;
|
|
49
|
+
this.viewKey = '';
|
|
50
|
+
this.lastVersion = null;
|
|
51
|
+
this.syncTimer = null;
|
|
52
|
+
this.syncToken = 0;
|
|
53
|
+
this.frameFitTimer = null;
|
|
54
|
+
this.frameHost = null;
|
|
55
|
+
this.pendingIframe = null;
|
|
56
|
+
this.pendingVersion = null;
|
|
57
|
+
this.handleFrameLoad = (event) => {
|
|
58
|
+
const iframe = event?.currentTarget || this.iframe;
|
|
59
|
+
if (!iframe) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
try {
|
|
64
|
+
if (iframe === this.iframe) {
|
|
65
|
+
this.viewKey = decodeViewKey(iframe.contentWindow?.location?.hash || '') || this.viewKey;
|
|
66
|
+
iframe.contentWindow?.addEventListener('hashchange', this.handleFrameHashChange);
|
|
67
|
+
}
|
|
68
|
+
this.prepareFrame(iframe);
|
|
69
|
+
} catch {
|
|
70
|
+
if (iframe === this.pendingIframe) {
|
|
71
|
+
this.commitPendingIframe(iframe);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
this.handleFrameHashChange = () => {
|
|
76
|
+
try {
|
|
77
|
+
this.viewKey = decodeViewKey(this.iframe?.contentWindow?.location?.hash || '') || this.viewKey;
|
|
78
|
+
} catch {
|
|
79
|
+
// Ignore inaccessible frame locations.
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
setStatus(message = '', { error = false } = {}) {
|
|
85
|
+
if (!this.status) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
this.status.textContent = message;
|
|
90
|
+
this.status.hidden = !message;
|
|
91
|
+
this.status.classList.toggle('is-error', error);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
prepareFrame(iframe = this.iframe) {
|
|
95
|
+
const frameDocument = iframe?.contentDocument;
|
|
96
|
+
if (!frameDocument?.head) {
|
|
97
|
+
if (iframe === this.pendingIframe) {
|
|
98
|
+
this.commitPendingIframe(iframe);
|
|
99
|
+
}
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
iframe.contentWindow?.dispatchEvent(new Event('resize'));
|
|
104
|
+
this.scheduleFrameFit(iframe, iframe === this.pendingIframe ? () => this.commitPendingIframe(iframe) : null);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
fitFrameToCanvas(iframe = this.iframe) {
|
|
108
|
+
const frameDocument = iframe?.contentDocument;
|
|
109
|
+
const canvas = frameDocument?.querySelector('#diagram-canvas');
|
|
110
|
+
if (!canvas) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
if (iframe === this.pendingIframe && !frameDocument.querySelector('.joint-layers')) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
try {
|
|
118
|
+
const diagram = iframe?.contentWindow?.structurizr?.diagram;
|
|
119
|
+
diagram?.setEmbedded?.(true);
|
|
120
|
+
diagram?.resize?.();
|
|
121
|
+
diagram?.zoomToWidthOrHeight?.();
|
|
122
|
+
} catch {
|
|
123
|
+
// The frame can be cross-origin in custom deployments; the CSS crop still applies.
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const { width, height } = canvas.getBoundingClientRect();
|
|
127
|
+
if (!width || !height) {
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
disposeFrame(iframe) {
|
|
135
|
+
if (!iframe) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
try {
|
|
140
|
+
iframe.contentWindow?.removeEventListener?.('hashchange', this.handleFrameHashChange);
|
|
141
|
+
} catch {
|
|
142
|
+
// Ignore inaccessible frame windows during cleanup.
|
|
143
|
+
}
|
|
144
|
+
iframe.removeEventListener('load', this.handleFrameLoad);
|
|
145
|
+
iframe.remove();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
discardPendingIframe() {
|
|
149
|
+
if (!this.pendingIframe) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
clearTimeout(this.frameFitTimer);
|
|
154
|
+
this.frameFitTimer = null;
|
|
155
|
+
this.disposeFrame(this.pendingIframe);
|
|
156
|
+
this.pendingIframe = null;
|
|
157
|
+
this.pendingVersion = null;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
commitPendingIframe(iframe) {
|
|
161
|
+
if (iframe !== this.pendingIframe || !this.shell?.isConnected) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const previousIframe = this.iframe;
|
|
166
|
+
const nextVersion = this.pendingVersion;
|
|
167
|
+
const frameState = readFrameState(previousIframe);
|
|
168
|
+
this.pendingIframe = null;
|
|
169
|
+
this.pendingVersion = null;
|
|
170
|
+
if (frameState?.zoom) {
|
|
171
|
+
try {
|
|
172
|
+
iframe.contentWindow?.structurizr?.diagram?.zoomTo?.(frameState.zoom);
|
|
173
|
+
} catch {
|
|
174
|
+
// Keep the new diagram usable when a custom viewer does not expose zoom controls.
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
try {
|
|
178
|
+
const viewport = iframe.contentDocument?.querySelector('#diagram-viewport');
|
|
179
|
+
if (viewport && frameState) {
|
|
180
|
+
viewport.scrollLeft = frameState.scrollLeft;
|
|
181
|
+
viewport.scrollTop = frameState.scrollTop;
|
|
182
|
+
}
|
|
183
|
+
} catch {
|
|
184
|
+
// Cross-origin custom viewers cannot restore viewport coordinates.
|
|
185
|
+
}
|
|
186
|
+
this.disposeFrame(previousIframe);
|
|
187
|
+
iframe.style.visibility = '';
|
|
188
|
+
iframe.style.pointerEvents = '';
|
|
189
|
+
iframe.removeAttribute('aria-hidden');
|
|
190
|
+
this.iframe = iframe;
|
|
191
|
+
this.lastVersion = nextVersion;
|
|
192
|
+
|
|
193
|
+
try {
|
|
194
|
+
this.viewKey = decodeViewKey(iframe.contentWindow?.location?.hash || '') || this.viewKey;
|
|
195
|
+
iframe.contentWindow?.addEventListener('hashchange', this.handleFrameHashChange);
|
|
196
|
+
} catch {
|
|
197
|
+
// Cross-origin deployments cannot expose the frame hash.
|
|
198
|
+
}
|
|
199
|
+
this.setStatus('');
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
createIframe() {
|
|
203
|
+
const iframe = document.createElement('iframe');
|
|
204
|
+
iframe.className = 'structurizr-preview-iframe';
|
|
205
|
+
iframe.title = 'Structurizr architecture diagram';
|
|
206
|
+
iframe.loading = 'eager';
|
|
207
|
+
iframe.referrerPolicy = 'same-origin';
|
|
208
|
+
iframe.addEventListener('load', this.handleFrameLoad);
|
|
209
|
+
return iframe;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
syncMaximizeButtonState() {
|
|
213
|
+
if (!this.maximizeButton || !this.shell) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const isMaximized = this.shell.classList.contains('is-maximized');
|
|
218
|
+
setDiagramActionButtonIcon(this.maximizeButton, isMaximized ? 'restore' : 'maximize');
|
|
219
|
+
const label = isMaximized ? 'Restore diagram size' : 'Maximize diagram';
|
|
220
|
+
this.maximizeButton.title = label;
|
|
221
|
+
this.maximizeButton.setAttribute('aria-label', label);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
setMaximized(shouldMaximize) {
|
|
225
|
+
const isMaximized = Boolean(shouldMaximize);
|
|
226
|
+
this.shell?.classList.toggle('is-maximized', isMaximized);
|
|
227
|
+
document.body?.classList.toggle('structurizr-maximized-open', isMaximized);
|
|
228
|
+
this.syncMaximizeButtonState();
|
|
229
|
+
this.iframe?.contentWindow?.dispatchEvent(new Event('resize'));
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
scheduleFrameFit(iframe = this.iframe, onReady = null) {
|
|
233
|
+
if (!iframe) {
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
clearTimeout(this.frameFitTimer);
|
|
238
|
+
let attempts = 0;
|
|
239
|
+
const fit = () => {
|
|
240
|
+
this.frameFitTimer = null;
|
|
241
|
+
if (this.fitFrameToCanvas(iframe) || attempts >= FRAME_FIT_ATTEMPTS) {
|
|
242
|
+
onReady?.();
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
attempts += 1;
|
|
247
|
+
this.frameFitTimer = setTimeout(fit, FRAME_FIT_INTERVAL_MS);
|
|
248
|
+
};
|
|
249
|
+
fit();
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
mount(renderHost, filePath) {
|
|
253
|
+
const fileChanged = Boolean(this.filePath && this.filePath !== filePath);
|
|
254
|
+
if (fileChanged) {
|
|
255
|
+
this.setMaximized(false);
|
|
256
|
+
this.discardPendingIframe();
|
|
257
|
+
this.disposeFrame(this.iframe);
|
|
258
|
+
this.iframe = null;
|
|
259
|
+
this.lastVersion = null;
|
|
260
|
+
this.viewKey = '';
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
this.filePath = filePath;
|
|
264
|
+
|
|
265
|
+
if (this.shell?.isConnected && this.shell.parentElement === renderHost) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
clearTimeout(this.frameFitTimer);
|
|
270
|
+
this.frameFitTimer = null;
|
|
271
|
+
this.shell = document.createElement('section');
|
|
272
|
+
this.shell.className = 'structurizr-preview-shell diagram-preview-shell';
|
|
273
|
+
this.shell.dataset.structurizrPreview = 'true';
|
|
274
|
+
|
|
275
|
+
const header = document.createElement('div');
|
|
276
|
+
header.className = 'structurizr-preview-header diagram-preview-toolbar';
|
|
277
|
+
|
|
278
|
+
const label = document.createElement('span');
|
|
279
|
+
label.className = 'structurizr-preview-label';
|
|
280
|
+
label.textContent = String(filePath).split('/').pop()?.replace(/\.dsl$/i, '') || 'Structurizr';
|
|
281
|
+
|
|
282
|
+
this.maximizeButton = document.createElement('button');
|
|
283
|
+
this.maximizeButton.type = 'button';
|
|
284
|
+
this.maximizeButton.className = 'structurizr-preview-btn ui-preview-action ui-preview-action--icon-only';
|
|
285
|
+
this.maximizeButton.dataset.action = 'toggle-maximize';
|
|
286
|
+
this.maximizeButton.addEventListener('click', (event) => {
|
|
287
|
+
event.preventDefault();
|
|
288
|
+
this.setMaximized(!this.shell?.classList.contains('is-maximized'));
|
|
289
|
+
});
|
|
290
|
+
header.append(label, this.maximizeButton);
|
|
291
|
+
this.syncMaximizeButtonState();
|
|
292
|
+
|
|
293
|
+
this.status = document.createElement('div');
|
|
294
|
+
this.status.className = 'structurizr-preview-status';
|
|
295
|
+
this.status.setAttribute('aria-live', 'polite');
|
|
296
|
+
this.status.setAttribute('role', 'status');
|
|
297
|
+
this.status.hidden = true;
|
|
298
|
+
|
|
299
|
+
this.frameHost = document.createElement('div');
|
|
300
|
+
this.frameHost.className = 'structurizr-preview-stage';
|
|
301
|
+
this.shell.append(header, this.status, this.frameHost);
|
|
302
|
+
|
|
303
|
+
renderHost?.replaceChildren(this.shell);
|
|
304
|
+
this.iframe = null;
|
|
305
|
+
this.pendingIframe = null;
|
|
306
|
+
this.pendingVersion = null;
|
|
307
|
+
this.lastVersion = null;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
async render({ filePath, renderHost, source = '' }) {
|
|
311
|
+
this.mount(renderHost, filePath);
|
|
312
|
+
return this.syncNow({ filePath, source: String(source ?? '') });
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
queueSync({ filePath, source = '' } = {}) {
|
|
316
|
+
clearTimeout(this.syncTimer);
|
|
317
|
+
this.syncTimer = setTimeout(() => {
|
|
318
|
+
this.syncTimer = null;
|
|
319
|
+
void this.syncNow({ filePath, source: String(source ?? '') });
|
|
320
|
+
}, SYNC_DEBOUNCE_MS);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
async syncNow({ filePath, source = '' } = {}) {
|
|
324
|
+
if (filePath !== this.filePath) {
|
|
325
|
+
return false;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
const token = ++this.syncToken;
|
|
329
|
+
if (!this.enabled) {
|
|
330
|
+
this.setStatus('Structurizr preview is not configured. Start CollabMD with --local-structurizr.', { error: true });
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
if (!this.iframe) {
|
|
335
|
+
this.setStatus('Validating Structurizr workspace…');
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
try {
|
|
339
|
+
const payload = await this.syncWorkspace({ path: filePath, source });
|
|
340
|
+
if (token !== this.syncToken || filePath !== this.filePath) {
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
const nextVersion = payload?.version || null;
|
|
345
|
+
const route = resolveAppPath('/workspace/1/diagrams');
|
|
346
|
+
const hash = this.viewKey ? `#${encodeURIComponent(this.viewKey)}` : '';
|
|
347
|
+
if (!this.iframe) {
|
|
348
|
+
const iframe = this.createIframe();
|
|
349
|
+
this.iframe = iframe;
|
|
350
|
+
this.frameHost?.appendChild(iframe);
|
|
351
|
+
iframe.src = `${route}${hash}`;
|
|
352
|
+
this.lastVersion = nextVersion;
|
|
353
|
+
} else if (nextVersion !== this.lastVersion) {
|
|
354
|
+
this.discardPendingIframe();
|
|
355
|
+
const iframe = this.createIframe();
|
|
356
|
+
iframe.style.visibility = 'hidden';
|
|
357
|
+
iframe.style.pointerEvents = 'none';
|
|
358
|
+
iframe.setAttribute('aria-hidden', 'true');
|
|
359
|
+
this.pendingIframe = iframe;
|
|
360
|
+
this.pendingVersion = nextVersion;
|
|
361
|
+
this.frameHost?.appendChild(iframe);
|
|
362
|
+
iframe.src = `${route}${hash}`;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
this.setStatus('');
|
|
366
|
+
return true;
|
|
367
|
+
} catch (error) {
|
|
368
|
+
if (token !== this.syncToken || filePath !== this.filePath) {
|
|
369
|
+
return false;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
this.setStatus(error?.message || 'Failed to load Structurizr workspace.', { error: true });
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
reset() {
|
|
378
|
+
this.setMaximized(false);
|
|
379
|
+
clearTimeout(this.syncTimer);
|
|
380
|
+
this.syncTimer = null;
|
|
381
|
+
clearTimeout(this.frameFitTimer);
|
|
382
|
+
this.frameFitTimer = null;
|
|
383
|
+
this.syncToken += 1;
|
|
384
|
+
this.discardPendingIframe();
|
|
385
|
+
this.disposeFrame(this.iframe);
|
|
386
|
+
this.iframe = null;
|
|
387
|
+
this.frameHost = null;
|
|
388
|
+
this.shell = null;
|
|
389
|
+
this.status = null;
|
|
390
|
+
this.maximizeButton = null;
|
|
391
|
+
this.filePath = null;
|
|
392
|
+
this.lastVersion = null;
|
|
393
|
+
this.viewKey = '';
|
|
394
|
+
}
|
|
395
|
+
}
|
|
@@ -21,6 +21,7 @@ export class WorkspaceCoordinator {
|
|
|
21
21
|
getDisplayName,
|
|
22
22
|
getFileList,
|
|
23
23
|
getLineWrappingEnabled,
|
|
24
|
+
getVimModeEnabled,
|
|
24
25
|
getLocalUser,
|
|
25
26
|
getStoredUserName,
|
|
26
27
|
getTheme,
|
|
@@ -28,8 +29,10 @@ export class WorkspaceCoordinator {
|
|
|
28
29
|
isDrawioFile,
|
|
29
30
|
isExcalidrawFile,
|
|
30
31
|
isImageFile,
|
|
32
|
+
isPdfFile,
|
|
31
33
|
isMermaidFile,
|
|
32
34
|
isPlantUmlFile,
|
|
35
|
+
isStructurizrWorkspaceFile,
|
|
33
36
|
isTabActive,
|
|
34
37
|
loadBootstrapContent = null,
|
|
35
38
|
loadEditorSessionClass,
|
|
@@ -49,6 +52,8 @@ export class WorkspaceCoordinator {
|
|
|
49
52
|
onRenderExcalidrawPreview,
|
|
50
53
|
onRenderDrawioPreview,
|
|
51
54
|
onRenderImagePreview,
|
|
55
|
+
onRenderPdfPreview,
|
|
56
|
+
onRenderStructurizrPreview,
|
|
52
57
|
onSyncWrapToggle,
|
|
53
58
|
onUpdateActiveFile,
|
|
54
59
|
onUpdateCurrentFile,
|
|
@@ -68,6 +73,7 @@ export class WorkspaceCoordinator {
|
|
|
68
73
|
this.getDisplayName = getDisplayName;
|
|
69
74
|
this.getFileList = getFileList;
|
|
70
75
|
this.getLineWrappingEnabled = getLineWrappingEnabled;
|
|
76
|
+
this.getVimModeEnabled = getVimModeEnabled ?? (() => false);
|
|
71
77
|
this.getLocalUser = getLocalUser;
|
|
72
78
|
this.getStoredUserName = getStoredUserName;
|
|
73
79
|
this.getTheme = getTheme;
|
|
@@ -75,8 +81,10 @@ export class WorkspaceCoordinator {
|
|
|
75
81
|
this.isDrawioFile = isDrawioFile ?? (() => false);
|
|
76
82
|
this.isExcalidrawFile = isExcalidrawFile ?? (() => false);
|
|
77
83
|
this.isImageFile = isImageFile ?? (() => false);
|
|
84
|
+
this.isPdfFile = isPdfFile ?? (() => false);
|
|
78
85
|
this.isMermaidFile = isMermaidFile ?? (() => false);
|
|
79
86
|
this.isPlantUmlFile = isPlantUmlFile ?? (() => false);
|
|
87
|
+
this.isStructurizrWorkspaceFile = isStructurizrWorkspaceFile ?? (() => false);
|
|
80
88
|
this.isTabActive = isTabActive;
|
|
81
89
|
this.loadBootstrapContent = loadBootstrapContent;
|
|
82
90
|
this.loadEditorSessionClassPort = loadEditorSessionClass;
|
|
@@ -96,6 +104,8 @@ export class WorkspaceCoordinator {
|
|
|
96
104
|
this.onRenderDrawioPreview = onRenderDrawioPreview;
|
|
97
105
|
this.onRenderExcalidrawPreview = onRenderExcalidrawPreview;
|
|
98
106
|
this.onRenderImagePreview = onRenderImagePreview;
|
|
107
|
+
this.onRenderPdfPreview = onRenderPdfPreview;
|
|
108
|
+
this.onRenderStructurizrPreview = onRenderStructurizrPreview;
|
|
99
109
|
this.onSyncWrapToggle = onSyncWrapToggle;
|
|
100
110
|
this.onUpdateActiveFile = onUpdateActiveFile;
|
|
101
111
|
this.onUpdateCurrentFile = onUpdateCurrentFile;
|
|
@@ -171,12 +181,19 @@ export class WorkspaceCoordinator {
|
|
|
171
181
|
filePath,
|
|
172
182
|
isExcalidraw = false,
|
|
173
183
|
isImage = false,
|
|
184
|
+
isPdf = false,
|
|
174
185
|
supportsBacklinks,
|
|
175
186
|
}) {
|
|
176
187
|
if (isExcalidraw) this.onRenderExcalidrawPreview(filePath);
|
|
177
188
|
if (isBase || isBaseFilePath(filePath)) this.onRenderBasePreview(filePath);
|
|
178
189
|
if (isDrawio) this.onRenderDrawioPreview(filePath);
|
|
179
190
|
if (isImage) this.onRenderImagePreview(filePath);
|
|
191
|
+
if (isPdf) this.onRenderPdfPreview(filePath);
|
|
192
|
+
if (this.isStructurizrWorkspaceFile(filePath)) {
|
|
193
|
+
this.onRenderStructurizrPreview(filePath, {
|
|
194
|
+
source: this.session?.getText?.() ?? '',
|
|
195
|
+
});
|
|
196
|
+
}
|
|
180
197
|
this.onSyncWrapToggle();
|
|
181
198
|
if (supportsBacklinks) this.loadBacklinks(filePath);
|
|
182
199
|
}
|
|
@@ -192,13 +209,15 @@ export class WorkspaceCoordinator {
|
|
|
192
209
|
const isExcalidraw = this.isExcalidrawFile(filePath);
|
|
193
210
|
const isBase = this.isBaseFile(filePath);
|
|
194
211
|
const isImage = this.isImageFile(filePath);
|
|
212
|
+
const isPdf = this.isPdfFile(filePath);
|
|
195
213
|
const isMermaid = this.isMermaidFile(filePath);
|
|
196
214
|
const isPlantUml = this.isPlantUmlFile(filePath);
|
|
215
|
+
const isStructurizrWorkspace = this.isStructurizrWorkspaceFile(filePath);
|
|
197
216
|
|
|
198
217
|
if (
|
|
199
218
|
filePath === this.stateStore.currentFilePath
|
|
200
219
|
&& normalizedDrawioMode === currentDrawioMode
|
|
201
|
-
&& (this.session || isDrawio || isExcalidraw || isImage)
|
|
220
|
+
&& (this.session || isDrawio || isExcalidraw || isImage || isPdf)
|
|
202
221
|
) {
|
|
203
222
|
this.onUpdateActiveFile(filePath);
|
|
204
223
|
this.onUpdateLobbyCurrentFile(filePath);
|
|
@@ -211,11 +230,11 @@ export class WorkspaceCoordinator {
|
|
|
211
230
|
this.cleanupSession();
|
|
212
231
|
const chromeState = this.prepareForFileOpen(filePath, {
|
|
213
232
|
drawioMode: normalizedDrawioMode,
|
|
214
|
-
resetConnectionState: !isDrawio && !isExcalidraw && !isImage,
|
|
233
|
+
resetConnectionState: !isDrawio && !isExcalidraw && !isImage && !isPdf,
|
|
215
234
|
});
|
|
216
235
|
this.reportFileOpenMetric('open_started', loadToken, { filePath });
|
|
217
236
|
|
|
218
|
-
if (isDrawio || isExcalidraw || isImage) {
|
|
237
|
+
if (isDrawio || isExcalidraw || isImage || isPdf) {
|
|
219
238
|
this.onSessionAssigned?.(null);
|
|
220
239
|
|
|
221
240
|
if (loadToken !== this.stateStore.sessionLoadToken) {
|
|
@@ -229,6 +248,7 @@ export class WorkspaceCoordinator {
|
|
|
229
248
|
isDrawio,
|
|
230
249
|
isExcalidraw,
|
|
231
250
|
isImage,
|
|
251
|
+
isPdf,
|
|
232
252
|
session: null,
|
|
233
253
|
supportsBacklinks: chromeState.supportsBacklinks,
|
|
234
254
|
});
|
|
@@ -241,6 +261,7 @@ export class WorkspaceCoordinator {
|
|
|
241
261
|
getFileList: this.getFileList,
|
|
242
262
|
lineWrappingEnabled: this.getLineWrappingEnabled(),
|
|
243
263
|
localUser: this.getLocalUser(),
|
|
264
|
+
vimModeEnabled: this.getVimModeEnabled(),
|
|
244
265
|
onAwarenessChange: (users) => this.onFileAwarenessChange(users),
|
|
245
266
|
onConnectionChange: (state) => this.onConnectionChange(state),
|
|
246
267
|
onCommentsChange: (threads) => this.onCommentsChange?.(threads),
|
|
@@ -253,6 +274,7 @@ export class WorkspaceCoordinator {
|
|
|
253
274
|
isBase,
|
|
254
275
|
isMermaid,
|
|
255
276
|
isPlantUml,
|
|
277
|
+
isStructurizrWorkspace,
|
|
256
278
|
});
|
|
257
279
|
},
|
|
258
280
|
onImagePaste: (file) => this.onImagePaste?.(file),
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
isBaseFilePath,
|
|
3
3
|
isDiagramFilePath,
|
|
4
4
|
isMarkdownFilePath,
|
|
5
|
+
isStructurizrFilePath,
|
|
5
6
|
} from '../../domain/file-kind.js';
|
|
6
7
|
import { resolveApiUrl } from '../domain/runtime-paths.js';
|
|
7
8
|
|
|
@@ -18,13 +19,16 @@ export class WorkspacePreviewController {
|
|
|
18
19
|
isExcalidrawFile,
|
|
19
20
|
isBaseFile,
|
|
20
21
|
isImageFile,
|
|
22
|
+
isPdfFile,
|
|
21
23
|
isMermaidFile,
|
|
22
24
|
isPlantUmlFile,
|
|
23
25
|
layoutController,
|
|
24
26
|
outlineController,
|
|
25
27
|
previewRenderer,
|
|
28
|
+
pdfPreview = null,
|
|
26
29
|
schedulePreviewLayoutSync,
|
|
27
30
|
scrollSyncController,
|
|
31
|
+
structurizrPreview = null,
|
|
28
32
|
videoEmbed,
|
|
29
33
|
}) {
|
|
30
34
|
this.backlinksPanel = backlinksPanel;
|
|
@@ -46,13 +50,20 @@ export class WorkspacePreviewController {
|
|
|
46
50
|
this.isExcalidrawFile = isExcalidrawFile ?? (() => false);
|
|
47
51
|
this.isBaseFile = isBaseFile ?? isBaseFilePath;
|
|
48
52
|
this.isImageFile = isImageFile ?? (() => false);
|
|
53
|
+
this.isPdfFile = isPdfFile ?? (() => false);
|
|
49
54
|
this.isMermaidFile = isMermaidFile ?? (() => false);
|
|
50
55
|
this.isPlantUmlFile = isPlantUmlFile ?? (() => false);
|
|
51
56
|
this.layoutController = layoutController;
|
|
52
57
|
this.outlineController = outlineController;
|
|
53
58
|
this.previewRenderer = previewRenderer;
|
|
59
|
+
this.pdfPreview = pdfPreview ?? { cancel() {}, render() {} };
|
|
54
60
|
this.schedulePreviewLayoutSyncCallback = schedulePreviewLayoutSync;
|
|
55
61
|
this.scrollSyncController = scrollSyncController;
|
|
62
|
+
this.structurizrPreview = structurizrPreview ?? {
|
|
63
|
+
queueSync() {},
|
|
64
|
+
render: async () => false,
|
|
65
|
+
reset() {},
|
|
66
|
+
};
|
|
56
67
|
this.videoEmbed = videoEmbed;
|
|
57
68
|
}
|
|
58
69
|
|
|
@@ -81,12 +92,16 @@ export class WorkspacePreviewController {
|
|
|
81
92
|
}
|
|
82
93
|
|
|
83
94
|
resetPreviewMode() {
|
|
95
|
+
this.pdfPreview.cancel();
|
|
84
96
|
this.elements.previewContent?.classList.remove('is-drawio-file-preview');
|
|
85
97
|
this.elements.previewContent?.classList.remove('is-excalidraw-file-preview');
|
|
86
98
|
this.elements.previewContent?.classList.remove('is-base-file-preview');
|
|
87
99
|
this.elements.previewContent?.classList.remove('is-image-file-preview');
|
|
100
|
+
this.elements.previewContent?.classList.remove('is-pdf-file-preview');
|
|
88
101
|
this.elements.previewContent?.classList.remove('is-mermaid-file-preview');
|
|
89
102
|
this.elements.previewContent?.classList.remove('is-plantuml-file-preview');
|
|
103
|
+
this.elements.previewContent?.classList.remove('is-structurizr-file-preview');
|
|
104
|
+
this.structurizrPreview.reset();
|
|
90
105
|
}
|
|
91
106
|
|
|
92
107
|
syncFileChrome(filePath, { drawioMode = null, preferPreviewForBase = false } = {}) {
|
|
@@ -94,9 +109,11 @@ export class WorkspacePreviewController {
|
|
|
94
109
|
const isExcalidraw = this.isExcalidrawFile(filePath);
|
|
95
110
|
const isBase = this.isBaseFile(filePath);
|
|
96
111
|
const isImage = this.isImageFile(filePath);
|
|
112
|
+
const isPdf = this.isPdfFile(filePath);
|
|
97
113
|
const isMarkdown = isMarkdownFilePath(filePath);
|
|
98
114
|
const isMermaid = this.isMermaidFile(filePath);
|
|
99
115
|
const isPlantUml = this.isPlantUmlFile(filePath);
|
|
116
|
+
const isStructurizr = isStructurizrFilePath(filePath);
|
|
100
117
|
const isDiagramFile = isDiagramFilePath(filePath);
|
|
101
118
|
const usesHeaderBacklinks = isExcalidraw || (isDrawio && drawioMode !== 'text');
|
|
102
119
|
|
|
@@ -105,11 +122,17 @@ export class WorkspacePreviewController {
|
|
|
105
122
|
this.elements.editorFindButton?.classList.toggle('hidden', !isMarkdown);
|
|
106
123
|
this.elements.markdownToolbar?.classList.toggle('hidden', !isMarkdown);
|
|
107
124
|
this.elements.exportMenuGroup?.classList.toggle('hidden', !isMarkdown);
|
|
108
|
-
this.elements.outlineToggle?.classList.toggle('hidden', isDiagramFile || isImage || isBase);
|
|
125
|
+
this.elements.outlineToggle?.classList.toggle('hidden', isDiagramFile || isImage || isPdf || isBase);
|
|
109
126
|
this.elements.previewContent?.classList.toggle('is-mermaid-file-preview', isMermaid);
|
|
110
127
|
this.elements.previewContent?.classList.toggle('is-plantuml-file-preview', isPlantUml);
|
|
128
|
+
this.elements.previewContent?.classList.toggle('is-structurizr-file-preview', isStructurizr);
|
|
129
|
+
|
|
130
|
+
if (isStructurizr) {
|
|
131
|
+
this.outlineController.close();
|
|
132
|
+
this.backlinksPanel.clear();
|
|
133
|
+
}
|
|
111
134
|
|
|
112
|
-
if ((isDrawio && drawioMode !== 'text') || isExcalidraw || isImage || (isBase && preferPreviewForBase)) {
|
|
135
|
+
if ((isDrawio && drawioMode !== 'text') || isExcalidraw || isImage || isPdf || (isBase && preferPreviewForBase)) {
|
|
113
136
|
this.layoutController.setView('preview', { persist: false });
|
|
114
137
|
this.outlineController.close();
|
|
115
138
|
this.backlinksPanel.clear();
|
|
@@ -238,6 +261,37 @@ export class WorkspacePreviewController {
|
|
|
238
261
|
this.schedulePreviewLayoutSyncCallback({ delayMs: 0 });
|
|
239
262
|
}
|
|
240
263
|
|
|
264
|
+
renderPdfFilePreview(filePath) {
|
|
265
|
+
const previewElement = this.elements.previewContent;
|
|
266
|
+
if (!previewElement) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
this.videoEmbed?.detachForCommit();
|
|
271
|
+
this.drawioEmbed.detachForCommit();
|
|
272
|
+
this.excalidrawEmbed.detachForCommit();
|
|
273
|
+
this.resetPreviewMode();
|
|
274
|
+
previewElement.classList.add('is-pdf-file-preview');
|
|
275
|
+
const renderHost = this.previewRenderer.ensureRenderHost();
|
|
276
|
+
this.previewRenderer.normalizePreviewChildren(renderHost);
|
|
277
|
+
|
|
278
|
+
if (renderHost) {
|
|
279
|
+
this.pdfPreview.render({
|
|
280
|
+
filePath,
|
|
281
|
+
renderHost,
|
|
282
|
+
});
|
|
283
|
+
renderHost.style.minHeight = '';
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
previewElement.dataset.renderPhase = 'ready';
|
|
287
|
+
this.outlineController.close();
|
|
288
|
+
this.backlinksPanel.clear();
|
|
289
|
+
this.scrollSyncController.setLargeDocumentMode(false);
|
|
290
|
+
this.scrollSyncController.invalidatePreviewBlocks();
|
|
291
|
+
this.videoEmbed?.reconcileEmbeds(previewElement);
|
|
292
|
+
this.schedulePreviewLayoutSyncCallback({ delayMs: 0 });
|
|
293
|
+
}
|
|
294
|
+
|
|
241
295
|
async renderBaseFilePreview(filePath, { source = null } = {}) {
|
|
242
296
|
const previewElement = this.elements.previewContent;
|
|
243
297
|
if (!previewElement) {
|
|
@@ -272,6 +326,38 @@ export class WorkspacePreviewController {
|
|
|
272
326
|
this.schedulePreviewLayoutSyncCallback({ delayMs: 0 });
|
|
273
327
|
}
|
|
274
328
|
|
|
329
|
+
async renderStructurizrFilePreview(filePath, { source = null } = {}) {
|
|
330
|
+
const previewElement = this.elements.previewContent;
|
|
331
|
+
if (!previewElement) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
this.videoEmbed?.detachForCommit();
|
|
336
|
+
this.drawioEmbed.detachForCommit();
|
|
337
|
+
this.excalidrawEmbed.detachForCommit();
|
|
338
|
+
this.resetPreviewMode();
|
|
339
|
+
previewElement.classList.add('is-structurizr-file-preview');
|
|
340
|
+
const renderHost = this.previewRenderer.ensureRenderHost();
|
|
341
|
+
this.previewRenderer.normalizePreviewChildren(renderHost);
|
|
342
|
+
if (renderHost) {
|
|
343
|
+
renderHost.style.minHeight = '';
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
await this.structurizrPreview.render({
|
|
347
|
+
filePath,
|
|
348
|
+
renderHost,
|
|
349
|
+
source: typeof source === 'string' ? source : (this.getSession()?.getText?.() ?? ''),
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
previewElement.dataset.renderPhase = 'ready';
|
|
353
|
+
this.outlineController.close();
|
|
354
|
+
this.backlinksPanel.clear();
|
|
355
|
+
this.scrollSyncController.setLargeDocumentMode(false);
|
|
356
|
+
this.scrollSyncController.invalidatePreviewBlocks();
|
|
357
|
+
this.videoEmbed?.reconcileEmbeds(previewElement);
|
|
358
|
+
this.schedulePreviewLayoutSyncCallback({ delayMs: 0 });
|
|
359
|
+
}
|
|
360
|
+
|
|
275
361
|
renderTextFilePreview({ content = '' } = {}) {
|
|
276
362
|
const previewElement = this.elements.previewContent;
|
|
277
363
|
if (!previewElement) {
|