@locus-forge/locus-map 0.1.0 → 0.2.2-dev.20261206.g5e970d2
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/CONTRIBUTING.md +2 -2
- package/README.md +35 -10
- package/THIRD_PARTY_NOTICES.md +3 -1
- package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/assets/{abnfDiagram-VCTEODGH-tB0FidS0.js → abnfDiagram-VCTEODGH-JiCO6vo-.js} +1 -1
- package/dist/assets/{ar-SA-G6X2FPQ2-BQNIWg05.js → ar-SA-G6X2FPQ2-BdzEBmp3.js} +1 -1
- package/dist/assets/{architectureDiagram-5GKGNRK7-D1SjeTh7.js → architectureDiagram-5GKGNRK7-D7T_vJwe.js} +1 -1
- package/dist/assets/{az-AZ-76LH7QW2-BAQK4UQr.js → az-AZ-76LH7QW2-BQ_SoVB7.js} +1 -1
- package/dist/assets/{bg-BG-XCXSNQG7-BDvRwwoU.js → bg-BG-XCXSNQG7-DlH1olUf.js} +1 -1
- package/dist/assets/{blockDiagram-I7D4REHJ-xOWzl6z3.js → blockDiagram-I7D4REHJ-DPz0LEjY.js} +1 -1
- package/dist/assets/{bn-BD-2XOGV67Q-B-osMrPA.js → bn-BD-2XOGV67Q-CFIZU06C.js} +1 -1
- package/dist/assets/{c4Diagram-7LVT6UL2-D5e6bidF.js → c4Diagram-7LVT6UL2-B6uCi0Ol.js} +1 -1
- package/dist/assets/{ca-ES-6MX7JW3Y-BqurRCRN.js → ca-ES-6MX7JW3Y-Bpe3kOti.js} +1 -1
- package/dist/assets/channel-DB3atv5o.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-CQmSUQUU.js → chunk-2Q5K7J3B-DTWRWhpx.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-iLXee7yJ.js → chunk-5VM5RSS4-Dfr1HUAN.js} +1 -1
- package/dist/assets/{chunk-F27PBJKO-BSQMcINP.js → chunk-F27PBJKO-D_IVoCIK.js} +1 -1
- package/dist/assets/{chunk-IMKFNOWR-l-2241K-.js → chunk-IMKFNOWR-Boa_chn8.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-Cu7ldP_G.js → chunk-JWPE2WC7-RaK8jzc2.js} +1 -1
- package/dist/assets/{chunk-POPQ4Y6H-BkgM8HKl.js → chunk-POPQ4Y6H-D7xOpv6O.js} +1 -1
- package/dist/assets/{chunk-SVP7TREG-BR7R6F9G.js → chunk-SVP7TREG-XvJsx1jt.js} +1 -1
- package/dist/assets/{chunk-TICWLB2K-DzFEizqD.js → chunk-TICWLB2K-DZCVWmZG.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-B3V5ae8Q.js → chunk-XXDRQBXY-Djk-REAy.js} +1 -1
- package/dist/assets/classDiagram-ZZMXUADV-CzvsXoj_.js +1 -0
- package/dist/assets/classDiagram-v2-VYDZK3BY-HxwJpdPt.js +1 -0
- package/dist/assets/{cose-bilkent-JH36ORCC-BSUyEU78.js → cose-bilkent-JH36ORCC-D6XaIbtG.js} +1 -1
- package/dist/assets/{cs-CZ-2BRQDIVT-BtaYa8qS.js → cs-CZ-2BRQDIVT-BdzgSHdJ.js} +1 -1
- package/dist/assets/{cynefin-OW5HDTMX-BQ6G1FGd.js → cynefin-OW5HDTMX-BMTkMDG1.js} +1 -1
- package/dist/assets/{cynefinDiagram-5FMLGOSQ-BmH3cQU1.js → cynefinDiagram-5FMLGOSQ-C2s5i9h9.js} +1 -1
- package/dist/assets/{d3-scale-6PaX2_v-.js → d3-scale-BMIMKl27.js} +1 -1
- package/dist/assets/{da-DK-5WZEPLOC-Dk88jbcE.js → da-DK-5WZEPLOC-Bj-GFWHU.js} +1 -1
- package/dist/assets/{dagre-GXQ25YYZ-DzqDTRYR.js → dagre-GXQ25YYZ-CMT8wlz0.js} +1 -1
- package/dist/assets/{de-DE-XR44H4JA-BtkAzckW.js → de-DE-XR44H4JA-JmpondAB.js} +1 -1
- package/dist/assets/{diagram-S7CK7UJ4-CKkad9LS.js → diagram-S7CK7UJ4-DU1blS3M.js} +1 -1
- package/dist/assets/{diagram-UQ7AKVKN-HnH6kGvY.js → diagram-UQ7AKVKN-0lWi4KDV.js} +1 -1
- package/dist/assets/{diagram-VSXAHHWV-BGbiUlE1.js → diagram-VSXAHHWV-CrseWrhn.js} +1 -1
- package/dist/assets/{diagram-VX7I27RA-MPt2qzsq.js → diagram-VX7I27RA-C5BMS8Ql.js} +1 -1
- package/dist/assets/{diagram-Z3DM3KII-hcUL0DLm.js → diagram-Z3DM3KII-Cc3vq6b8.js} +1 -1
- package/dist/assets/{ebnfDiagram-PWID7BFC-hUZUNK__.js → ebnfDiagram-PWID7BFC-ZF78imma.js} +1 -1
- package/dist/assets/{el-GR-BZB4AONW-DOnEE5fq.js → el-GR-BZB4AONW-BFslUpdm.js} +1 -1
- package/dist/assets/{engines-C6k3bUFA.js → engines-BtEtIBXt.js} +1 -1
- package/dist/assets/{erDiagram-RLTQ6QDP-DoHgp3nM.js → erDiagram-RLTQ6QDP-CjPjDn2i.js} +1 -1
- package/dist/assets/{es-ES-U4NZUMDT-VFRkCKl6.js → es-ES-U4NZUMDT-B0ezBTxQ.js} +1 -1
- package/dist/assets/{eu-ES-A7QVB2H4-CWlqsMWd.js → eu-ES-A7QVB2H4-DP_gx2kf.js} +1 -1
- package/dist/assets/{fa-IR-HGAKTJCU-CxtwUetE.js → fa-IR-HGAKTJCU-BuT1ELty.js} +1 -1
- package/dist/assets/{fi-FI-Z5N7JZ37-Djl1mow5.js → fi-FI-Z5N7JZ37-BAu_Cj7n.js} +1 -1
- package/dist/assets/{flowDiagram-HODETNUW-CCs8KCI7.js → flowDiagram-HODETNUW-yqPGWNdd.js} +1 -1
- package/dist/assets/{fr-FR-RHASNOE6-CTSI58QE.js → fr-FR-RHASNOE6-OF1CpgtN.js} +1 -1
- package/dist/assets/{ganttDiagram-EL5Y4UJY-V39NrnLQ.js → ganttDiagram-EL5Y4UJY-zUY5je2K.js} +1 -1
- package/dist/assets/{gitGraphDiagram-WWUBYQGX-DsfCYVRX.js → gitGraphDiagram-WWUBYQGX-oWrs7wy0.js} +1 -1
- package/dist/assets/{gl-ES-HMX3MZ6V-9X19A7Co.js → gl-ES-HMX3MZ6V-CkJ47l98.js} +1 -1
- package/dist/assets/{he-IL-6SHJWFNN-CCWn0aTE.js → he-IL-6SHJWFNN-D7CecRlh.js} +1 -1
- package/dist/assets/{hi-IN-IWLTKZ5I-Czvn3Cqk.js → hi-IN-IWLTKZ5I-CGlW2X-h.js} +1 -1
- package/dist/assets/{hu-HU-A5ZG7DT2-CSA0xyZy.js → hu-HU-A5ZG7DT2-Dq_n_tbp.js} +1 -1
- package/dist/assets/{id-ID-SAP4L64H-C8Y8IY1j.js → id-ID-SAP4L64H-CotwO_06.js} +1 -1
- package/dist/assets/index-CdVc9Lmz.js +624 -0
- package/dist/assets/{index-C_ek_ppO.css → index-Cv-tTxNC.css} +1 -1
- package/dist/assets/{index-0Kge4otW.js → index-VaWCb9bx.js} +5 -5
- package/dist/assets/{infoDiagram-27XIBGKW-C0Ivywz2.js → infoDiagram-27XIBGKW-CYzIkNFW.js} +1 -1
- package/dist/assets/{ishikawaDiagram-5VMMS53U-CMmE4k9T.js → ishikawaDiagram-5VMMS53U-DkgUsuk5.js} +1 -1
- package/dist/assets/{it-IT-JPQ66NNP-gVSFrMB6.js → it-IT-JPQ66NNP-h97o81us.js} +1 -1
- package/dist/assets/{ja-JP-DBVTYXUO-HnD6OZRp.js → ja-JP-DBVTYXUO-M6EVfh0o.js} +1 -1
- package/dist/assets/{journeyDiagram-3NMN7TZE-CpkEKmSl.js → journeyDiagram-3NMN7TZE-CuKkNrJy.js} +1 -1
- package/dist/assets/{kaa-6HZHGXH3-C29qXHap.js → kaa-6HZHGXH3-DUy85zzz.js} +1 -1
- package/dist/assets/{kab-KAB-ZGHBKWFO-CLNG0bT_.js → kab-KAB-ZGHBKWFO-ChL-fKtk.js} +1 -1
- package/dist/assets/{kanban-definition-UXKFOSKX-hOCBBBFh.js → kanban-definition-UXKFOSKX-DkOxt3kf.js} +1 -1
- package/dist/assets/{kk-KZ-P5N5QNE5-DNoNNWtH.js → kk-KZ-P5N5QNE5-DY6ucSGD.js} +1 -1
- package/dist/assets/{km-KH-HSX4SM5Z-eQMwEzV_.js → km-KH-HSX4SM5Z-BAaS4014.js} +1 -1
- package/dist/assets/{ko-KR-MTYHY66A-DP3yaFyg.js → ko-KR-MTYHY66A-D-r3mJ1R.js} +1 -1
- package/dist/assets/{ku-TR-6OUDTVRD-B2GUIkso.js → ku-TR-6OUDTVRD-Dk1GCoOP.js} +1 -1
- package/dist/assets/{layout-D_xIMZTq.js → layout-DtNEGI4_.js} +1 -1
- package/dist/assets/{lt-LT-XHIRWOB4-CuDegLO4.js → lt-LT-XHIRWOB4-3Z2Ui1VZ.js} +1 -1
- package/dist/assets/{lv-LV-5QDEKY6T-DOjbM5AK.js → lv-LV-5QDEKY6T-Bg59rOkR.js} +1 -1
- package/dist/assets/{mindmap-definition-YA3MSWOX-DL4r3hzu.js → mindmap-definition-YA3MSWOX-Dcs8eV7p.js} +1 -1
- package/dist/assets/{mr-IN-CRQNXWMA-C0vzd3Vl.js → mr-IN-CRQNXWMA-DepTOG29.js} +1 -1
- package/dist/assets/{my-MM-5M5IBNSE-Dirjg8Yf.js → my-MM-5M5IBNSE-4KqL4Tav.js} +1 -1
- package/dist/assets/{nb-NO-T6EIAALU-IpjtB42R.js → nb-NO-T6EIAALU-5YWO_l3W.js} +1 -1
- package/dist/assets/{nl-NL-IS3SIHDZ-BiVBDlHI.js → nl-NL-IS3SIHDZ-QlAndkM2.js} +1 -1
- package/dist/assets/{nn-NO-6E72VCQL-kbUyKFiJ.js → nn-NO-6E72VCQL-BscwhEDW.js} +1 -1
- package/dist/assets/{oc-FR-POXYY2M6-C-zRRb5B.js → oc-FR-POXYY2M6-k7bYbSQj.js} +1 -1
- package/dist/assets/{pa-IN-N4M65BXN-Dhh3bH7-.js → pa-IN-N4M65BXN-jxBFwrWj.js} +1 -1
- package/dist/assets/{pegDiagram-XKGWAZYB-CtbYRYVR.js → pegDiagram-XKGWAZYB-zM-VZA3r.js} +1 -1
- package/dist/assets/{pica-HSHSc6s6.js → pica-CsWQ4DPU.js} +1 -1
- package/dist/assets/{pieDiagram-E7YTZNPT-Cwv0hsvK.js → pieDiagram-E7YTZNPT-C60FE0D8.js} +1 -1
- package/dist/assets/{pl-PL-T2D74RX3-CuDP0Pq6.js → pl-PL-T2D74RX3-be8atU_l.js} +1 -1
- package/dist/assets/{pt-BR-5N22H2LF-BlvJqOgZ.js → pt-BR-5N22H2LF-CSE0O2fj.js} +1 -1
- package/dist/assets/{pt-PT-UZXXM6DQ-C3RUoC5C.js → pt-PT-UZXXM6DQ-5rnYJhy1.js} +1 -1
- package/dist/assets/{quadrantDiagram-AXDQQJYC-C_u4_Oxh.js → quadrantDiagram-AXDQQJYC-DyH84hx6.js} +1 -1
- package/dist/assets/{railroadDiagram-O6MQD6OU-FHKPLH9r.js → railroadDiagram-O6MQD6OU-DCrJgP9s.js} +1 -1
- package/dist/assets/{requirementDiagram-BXWQKSXE-B_8MbGxf.js → requirementDiagram-BXWQKSXE-C78-QlFo.js} +1 -1
- package/dist/assets/{ro-RO-JPDTUUEW-QUZCSbcA.js → ro-RO-JPDTUUEW-Gh6EgC27.js} +1 -1
- package/dist/assets/{ru-RU-B4JR7IUQ-BCk_AmNC.js → ru-RU-B4JR7IUQ-BUWESZhq.js} +1 -1
- package/dist/assets/{sankeyDiagram-P5KCCOFB-DsfunxYA.js → sankeyDiagram-P5KCCOFB-D_MOkKEs.js} +1 -1
- package/dist/assets/{sequenceDiagram-WJ2MYXX4-cRf71lBb.js → sequenceDiagram-WJ2MYXX4-BeQbHZRB.js} +1 -1
- package/dist/assets/{si-LK-N5RQ5JYF-jo1qm6JU.js → si-LK-N5RQ5JYF-C9pnvQMf.js} +1 -1
- package/dist/assets/{sizeCapture-INFHLROL-COrYinZO.js → sizeCapture-INFHLROL-DUn-Mus_.js} +1 -1
- package/dist/assets/{sk-SK-C5VTKIMK-BnMkvGRK.js → sk-SK-C5VTKIMK-FnkPBibb.js} +1 -1
- package/dist/assets/{sl-SI-NN7IZMDC-DIkgazuw.js → sl-SI-NN7IZMDC-Cwrqj_B9.js} +1 -1
- package/dist/assets/{stateDiagram-D77RDMKH-BvBlef2E.js → stateDiagram-D77RDMKH-C3EF3jQ3.js} +1 -1
- package/dist/assets/stateDiagram-v2-MP3YSRHH-CVQHmIvK.js +1 -0
- package/dist/assets/{subset-shared.chunk-Cp0oS3tn.js → subset-shared.chunk-8ifLcT_D.js} +1 -1
- package/dist/assets/{subset-worker.chunk-BEbN9HM2.js → subset-worker.chunk-DrNTybDR.js} +1 -1
- package/dist/assets/{sv-SE-XGPEYMSR-CxQiCAkW.js → sv-SE-XGPEYMSR-Btz80pGx.js} +1 -1
- package/dist/assets/{swimlanes-42K2YHIH-BjR8lfsn.js → swimlanes-42K2YHIH-B2_kGhPA.js} +1 -1
- package/dist/assets/swimlanesDiagram-VR7AAH4N-C1rOmrkT.js +8 -0
- package/dist/assets/{ta-IN-2NMHFXQM-e_HiIsgP.js → ta-IN-2NMHFXQM-B0bWtgu1.js} +1 -1
- package/dist/assets/{th-TH-HPSO5L25-DTp8x86q.js → th-TH-HPSO5L25-DgC0yFw3.js} +1 -1
- package/dist/assets/{timeline-definition-24CTP7MA-B0uf0zYu.js → timeline-definition-24CTP7MA-Bu0W3Mcy.js} +1 -1
- package/dist/assets/{tr-TR-DEFEU3FU-BfTQG1sR.js → tr-TR-DEFEU3FU-C9Mmy6ri.js} +1 -1
- package/dist/assets/{uk-UA-QMV73CPH-DMHmllj-.js → uk-UA-QMV73CPH-rxEnqB_i.js} +1 -1
- package/dist/assets/{vennDiagram-4TSXK5OY-AxXlA6VW.js → vennDiagram-4TSXK5OY-63JTeOph.js} +1 -1
- package/dist/assets/{vi-VN-M7AON7JQ-BtoynmIl.js → vi-VN-M7AON7JQ-DOVa-vAT.js} +1 -1
- package/dist/assets/{wardleyDiagram-VM6X3IG4-BiKqKrb1.js → wardleyDiagram-VM6X3IG4-Bct0TRuC.js} +1 -1
- package/dist/assets/{xychartDiagram-S5SC5T6Z-DKJ6ufCR.js → xychartDiagram-S5SC5T6Z-C21zgvSM.js} +1 -1
- package/dist/assets/{zh-CN-LNUGB5OW-BiSoyhtF.js → zh-CN-LNUGB5OW-MyifsmQ8.js} +1 -1
- package/dist/assets/{zh-HK-E62DVLB3-C6DC7GXY.js → zh-HK-E62DVLB3-Cp55UViv.js} +1 -1
- package/dist/assets/{zh-TW-RAJ6MFWO-D1A1a-SQ.js → zh-TW-RAJ6MFWO-DMy6SZap.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/licenses/markdown-reading-notices.txt +76 -0
- package/docs/BUNDLE-FORMAT.md +18 -5
- package/docs/DIAGRAM-SOURCE.md +59 -12
- package/docs/LOCAL-DOCUMENT.md +17 -14
- package/docs/MODEL-CONTRACT.md +7 -4
- package/docs/PLANTUML-SOURCE.md +3 -2
- package/docs/VIEWER-LAUNCH.md +18 -3
- package/docs/VIEWER.md +118 -35
- package/docs/adr/ADR-001-2026-12-03-inspector-original-document-first/ADR-001-2026-12-03-inspector-original-document-first.md +1 -1
- package/docs/adr/ADR-006-2026-12-05-workspace-navigation-rows/ADR-006-2026-12-05-workspace-navigation-rows.md +29 -0
- package/docs/adr/ADR-007-2026-12-05-native-edit-selection/ADR-007-2026-12-05-native-edit-selection.md +25 -0
- package/docs/capabilities.json +27 -4
- package/docs/decisions.md +3 -1
- package/licenses/markdown-reading-notices.txt +76 -0
- package/package.json +5 -2
- package/scripts/build-map.mjs +1 -1
- package/scripts/lib/map-viewer-server.mjs +48 -24
- package/scripts/lib/original-materials.mjs +1 -1
- package/scripts/lib/original-report-server.mjs +7 -3
- package/scripts/lib/project-catalog.mjs +14 -2
- package/scripts/lib/project-map-inputs.mjs +1 -1
- package/scripts/lib/sketch-publication.mjs +1 -1
- package/scripts/lib/task-map-build.mjs +1 -1
- package/scripts/lib/view-args.mjs +183 -0
- package/scripts/lib/workflow/reader-surface.mjs +29 -11
- package/scripts/locus-map.mjs +14 -20
- package/scripts/open-map.mjs +84 -49
- package/scripts/vite-browser-dependencies.mjs +2 -1
- package/skills/README.md +2 -1
- package/skills/locus-map/SKILL.md +27 -25
- package/skills/locus-map/assets/artifact-handoff.md +2 -1
- package/skills/locus-map/references/build-environment.md +11 -7
- package/skills/locus-map/references/checks.md +16 -4
- package/skills/locus-map/references/component-checkpoint.md +35 -0
- package/skills/locus-map/references/draw-skill.md +2 -1
- package/skills/locus-map/references/selection.md +36 -13
- package/skills/locus-map/references/task-maps.md +5 -0
- package/skills/locus-map/references/visual-composition.md +69 -0
- package/skills/locus-map-draft/SKILL.md +95 -0
- package/skills/locus-map-draft/assets/chosen-direction.md +47 -0
- package/skills/locus-map-draft/references/divergence-and-formats.md +127 -0
- package/skills/locus-map-primitives/SKILL.md +6 -2
- package/skills/locus-map-primitives/references/card-presentation.md +57 -3
- package/skills/locus-map-primitives/references/reading-files.md +1 -1
- package/src/adapter/areas.js +1 -0
- package/src/adapter/semanticAdmission.js +118 -5
- package/src/authoring/buildDiagram.mjs +99 -19
- package/src/authoring/canvas-source-worker.mjs +96 -0
- package/src/authoring/canvasSource.mjs +41 -0
- package/src/authoring/diagramChecks.js +143 -1
- package/src/authoring/diagramSource.js +31 -5
- package/src/authoring/printPlantumlSource.js +13 -2
- package/src/authoring/readDetailsFiles.mjs +100 -19
- package/src/bundle/chain.js +129 -32
- package/src/bundle/chainBrowser.js +26 -2
- package/src/bundle/localDocument.mjs +87 -22
- package/src/bundle/localDocumentClient.js +5 -1
- package/src/bundle/projectClient.js +59 -18
- package/src/chain/validation.js +7 -1
- package/src/contract/readingMarkdown.js +57 -13
- package/src/contract/readingMaterials.js +18 -2
- package/src/contract/readingTable.js +66 -0
- package/src/viewer/ControlIcon.jsx +1 -0
- package/src/viewer/DiagramViewer.jsx +97 -56
- package/src/viewer/EmbeddedExcalidrawEditor.jsx +305 -0
- package/src/viewer/HighlightOverlay.jsx +146 -33
- package/src/viewer/Inspector.jsx +110 -33
- package/src/viewer/ProjectRail.jsx +11 -5
- package/src/viewer/ProjectTabs.jsx +9 -6
- package/src/viewer/ProjectViewChainViewer.jsx +235 -77
- package/src/viewer/ReadingTable.jsx +151 -0
- package/src/viewer/SketchCanvas.jsx +34 -87
- package/src/viewer/ViewChainViewer.jsx +583 -81
- package/src/viewer/camera.js +50 -18
- package/src/viewer/chainEditorSession.js +161 -35
- package/src/viewer/chainInstallation.js +3 -3
- package/src/viewer/details/CanvasPreview.jsx +303 -0
- package/src/viewer/details/InspectorReadingSettings.jsx +50 -13
- package/src/viewer/details/MeaningFirst.jsx +2 -2
- package/src/viewer/details/ReadingFiles.jsx +32 -4
- package/src/viewer/details/ReadingMarkdown.jsx +43 -12
- package/src/viewer/details/RelationshipBody.jsx +2 -2
- package/src/viewer/details/details.css +69 -26
- package/src/viewer/diagramControls.css +1 -1
- package/src/viewer/fileError.js +53 -0
- package/src/viewer/geometry.js +12 -0
- package/src/viewer/highlight.js +26 -12
- package/src/viewer/inspectorPosition.js +68 -16
- package/src/viewer/projectTasks.css +1 -2
- package/src/viewer/readingTable.css +47 -0
- package/src/viewer/sceneState.js +0 -4
- package/src/viewer/sketchSettling.js +71 -0
- package/src/viewer/useInspectorPosition.js +126 -39
- package/src/viewer/viewChain.css +55 -24
- package/src/viewer/viewer.css +23 -12
- package/dist/assets/channel-DP1yLO71.js +0 -1
- package/dist/assets/classDiagram-ZZMXUADV-DKQje2st.js +0 -1
- package/dist/assets/classDiagram-v2-VYDZK3BY-C3KVT455.js +0 -1
- package/dist/assets/index-BaHpjra6.js +0 -362
- package/dist/assets/stateDiagram-v2-MP3YSRHH-jeUVI-Q4.js +0 -1
- package/dist/assets/swimlanesDiagram-VR7AAH4N-Dp8eikhA.js +0 -8
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { RailToggle } from './ControlIcon.jsx';
|
|
2
|
-
import React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { flushSync } from 'react-dom';
|
|
4
4
|
import { loadChainBundleForRebuild } from '../bundle/chain.js';
|
|
5
5
|
import { createChainEditorSession } from './chainEditorSession.js';
|
|
6
6
|
import { generateInstallation, openChainBundle } from './chainInstallation.js';
|
|
7
|
-
import { createProjectHistory, qualifiedDetailTargets, projectReturnTarget, sectionEntry, readProjectRoute, sameProjectRoute } from './projectNavigation.js';
|
|
7
|
+
import { createProjectHistory, destinationTitle, qualifiedDetailTargets, projectReturnTarget, sectionEntry, readProjectRoute, sameProjectRoute } from './projectNavigation.js';
|
|
8
8
|
import { createViewChainState } from './viewChainState.js';
|
|
9
9
|
import { FileMessage, InstalledViewChain } from './ViewChainViewer.jsx';
|
|
10
10
|
import { projectContents } from './projectContents.js';
|
|
@@ -15,9 +15,29 @@ import { ProjectTabs } from './ProjectTabs.jsx';
|
|
|
15
15
|
import { ProjectRail } from './ProjectRail.jsx';
|
|
16
16
|
import { SketchCanvas, createSketchSession } from './SketchCanvas.jsx';
|
|
17
17
|
import { sketchView } from '../bundle/sketch.js';
|
|
18
|
+
import { NETWORK_SERVER_HINT, attachFileErrorContext, isNetworkFetchError, targetFilePath } from './fileError.js';
|
|
18
19
|
|
|
20
|
+
const EXPLICIT_FILE_PATH = Symbol('explicitFilePath');
|
|
19
21
|
const offersTasks = project => Boolean(project?.legacy || project?.taskSources?.length);
|
|
20
22
|
const unfinishedEdit = () => new Error('Finish the current edit and try opening the diagram again.');
|
|
23
|
+
const editFailure = editor => editor?.lastError?.() ?? unfinishedEdit();
|
|
24
|
+
|
|
25
|
+
function tagFailure(error, filePath) {
|
|
26
|
+
const next = error instanceof Error ? Object.assign(new Error(error.message), error) : new Error(String(error));
|
|
27
|
+
if (error instanceof Error) {
|
|
28
|
+
next.name = error.name;
|
|
29
|
+
if (error.cause !== undefined) next.cause = error.cause;
|
|
30
|
+
}
|
|
31
|
+
next[EXPLICIT_FILE_PATH] = filePath ?? null;
|
|
32
|
+
return next;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function slotFilePath(slot, catalog) {
|
|
36
|
+
if (!slot) return null;
|
|
37
|
+
if (slot.sketch) return targetFilePath(catalog, slot.entry?.route, { saved: slot.session?.binding });
|
|
38
|
+
const file = slot.installation?.fileName ? { name: slot.installation.fileName } : undefined;
|
|
39
|
+
return targetFilePath(catalog, slot.entry?.route, { saved: slot.installation?.binding, file });
|
|
40
|
+
}
|
|
21
41
|
|
|
22
42
|
function labelFor(catalog, route) {
|
|
23
43
|
const address = `${route.map}/${route.view}`;
|
|
@@ -25,9 +45,15 @@ function labelFor(catalog, route) {
|
|
|
25
45
|
return title ? `${title} (${address})` : address;
|
|
26
46
|
}
|
|
27
47
|
|
|
28
|
-
function describeFailure(label, error) {
|
|
48
|
+
function describeFailure(label, error, filePath, { explicitPath = false } = {}) {
|
|
29
49
|
const cause = error.diagnostics?.[0] ?? error;
|
|
30
|
-
|
|
50
|
+
const resolvedPath = explicitPath ? (filePath || undefined) : (error.filePath || filePath || undefined);
|
|
51
|
+
const hint = error.hint ?? (isNetworkFetchError(error) || isNetworkFetchError(cause) ? NETWORK_SERVER_HINT : undefined);
|
|
52
|
+
return Object.assign(new Error(`Could not open ${label}. ${cause.message}`), {
|
|
53
|
+
code: cause.code ?? error.code,
|
|
54
|
+
...(resolvedPath && { filePath: resolvedPath }),
|
|
55
|
+
...(hint && { hint }),
|
|
56
|
+
});
|
|
31
57
|
}
|
|
32
58
|
|
|
33
59
|
function catalogWithAdmittedMember(catalog, route, installation) {
|
|
@@ -170,24 +196,52 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
170
196
|
return () => { installation?.dispose(); };
|
|
171
197
|
}, [active?.installation]);
|
|
172
198
|
|
|
173
|
-
async function transition(entry, position, refresh = false) {
|
|
199
|
+
async function transition(entry, position, { refresh = false, retryWrite = false } = {}) {
|
|
174
200
|
attemptRef.current?.abort();
|
|
175
201
|
const attempt = new AbortController();
|
|
176
202
|
attemptRef.current = attempt;
|
|
177
203
|
const { signal } = attempt;
|
|
178
204
|
const aborted = new Promise(resolve => signal.addEventListener('abort', resolve, { once: true }));
|
|
179
205
|
const source = activeRef.current;
|
|
206
|
+
const sourceCatalog = catalogRef.current;
|
|
180
207
|
const projectId = entry?.project ?? selected.current;
|
|
181
208
|
const switching = projectId !== selected.current;
|
|
182
209
|
const targetClient = workspace?.client(projectId) ?? projectClient;
|
|
183
|
-
let index = catalogRef.current;
|
|
210
|
+
let index = switching ? null : catalogRef.current;
|
|
184
211
|
let route = entry?.route;
|
|
185
212
|
const label = entry?.sketchDraft ? 'a new drawing' : switching ? (projectsRef.current?.find(item => item.id === projectId)?.name ?? 'the project')
|
|
186
213
|
: route ? labelFor(index, route) : entry?.file?.name ?? 'the chain file';
|
|
187
214
|
const opener = document.activeElement;
|
|
188
215
|
let owned;
|
|
189
216
|
let slot;
|
|
217
|
+
let saved;
|
|
218
|
+
let sameRoute = false;
|
|
219
|
+
let inFile = false;
|
|
190
220
|
let prompted = false;
|
|
221
|
+
const sourceFilePath = () => (!source || source.editor?.hasOpenCanvas?.() ? null : slotFilePath(source, sourceCatalog));
|
|
222
|
+
const runAttributed = async (operation, filePath) => {
|
|
223
|
+
try { return await operation(); }
|
|
224
|
+
catch (failure) {
|
|
225
|
+
if (signal.aborted) throw failure;
|
|
226
|
+
throw tagFailure(failure, filePath);
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
const flushSource = async () => {
|
|
230
|
+
const ok = await runAttributed(() => wait(source.editor.flush()), sourceFilePath());
|
|
231
|
+
if (!ok) throw tagFailure(editFailure(source.editor), sourceFilePath());
|
|
232
|
+
};
|
|
233
|
+
const captureSource = () => {
|
|
234
|
+
let ok;
|
|
235
|
+
try { ok = source.editor.capture(); }
|
|
236
|
+
catch (failure) { throw tagFailure(failure, sourceFilePath()); }
|
|
237
|
+
if (!ok) throw tagFailure(editFailure(source.editor), sourceFilePath());
|
|
238
|
+
};
|
|
239
|
+
const commitHistory = (nextEntry, visitIndex, message) => {
|
|
240
|
+
let committed;
|
|
241
|
+
try { committed = history.commit(nextEntry, visitIndex); }
|
|
242
|
+
catch (failure) { throw tagFailure(failure, null); }
|
|
243
|
+
if (!committed) throw tagFailure(new Error(message), null);
|
|
244
|
+
};
|
|
191
245
|
const startingWrite = source?.session.latestWrite;
|
|
192
246
|
let observedWrite = startingWrite?.result ? startingWrite : null;
|
|
193
247
|
const wait = async promise => {
|
|
@@ -205,13 +259,15 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
205
259
|
setPrompt(null);
|
|
206
260
|
setPending(label);
|
|
207
261
|
try {
|
|
208
|
-
if (position === undefined) await wait(history.restore());
|
|
209
|
-
if (!entry) throw new Error('This history entry is no longer available.');
|
|
262
|
+
if (position === undefined) await runAttributed(() => wait(history.restore()), null);
|
|
263
|
+
if (!entry) throw tagFailure(new Error('This history entry is no longer available.'), null);
|
|
210
264
|
let unavailable;
|
|
211
265
|
if (switching || (!index && entry.project)) {
|
|
212
266
|
try { index = await wait(targetClient.readCatalog({ signal })); }
|
|
213
267
|
catch (failure) {
|
|
214
|
-
if (failure.code !== 'PROJECT_UNAVAILABLE' || (source && route && !switching))
|
|
268
|
+
if (failure.code !== 'PROJECT_UNAVAILABLE' || (source && route && !switching)) {
|
|
269
|
+
throw tagFailure(failure, switching ? null : (catalogRef.current?.library?.path ?? null));
|
|
270
|
+
}
|
|
215
271
|
entry = { ...entry, unavailableRoute: route };
|
|
216
272
|
route = null;
|
|
217
273
|
unavailable = failure;
|
|
@@ -229,26 +285,40 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
229
285
|
if (sketch && (!index?.library?.sketches || (route && (route.view !== sketchView || route.node)))) {
|
|
230
286
|
throw new Error('The address must identify a drawing in the selected library.');
|
|
231
287
|
}
|
|
232
|
-
|
|
288
|
+
sameRoute = !switching && sameProjectRoute(source?.entry.route, route);
|
|
233
289
|
const sameVisit = sameRoute && source.entry.route.node === route.node;
|
|
234
290
|
let reopen = sameRoute && source.session.snapshot().writeBlocked;
|
|
235
291
|
let refreshed;
|
|
236
|
-
if (sameRoute && refresh && !reopen) {
|
|
292
|
+
if (sameRoute && (refresh || retryWrite) && !reopen) {
|
|
237
293
|
refreshed = await wait((sketch ? targetClient.sketch(route.map) : targetClient.document(route.map)).read());
|
|
238
294
|
reopen = refreshed.revision !== source.session.savedRevision ||
|
|
239
295
|
(targetClient.canWrite && !refreshed.readOnly) !== (sketch ? source.session.canSave : source.installation.binding.writable);
|
|
240
296
|
}
|
|
241
297
|
if (sameRoute && !reopen) {
|
|
242
298
|
const changedNode = source.entry.route.node !== route.node;
|
|
243
|
-
|
|
299
|
+
await flushSource();
|
|
244
300
|
const applyLocation = source.editor.prepareLocation?.(route.node);
|
|
245
301
|
const visitIndex = changedNode ? position : position ?? history.currentIndex;
|
|
246
|
-
|
|
302
|
+
commitHistory(entry, visitIndex, 'The browser address changed during navigation.');
|
|
303
|
+
let lockChanged = false;
|
|
247
304
|
if (refreshed && !sketch) {
|
|
248
305
|
source.installation.binding.originals = refreshed.originals;
|
|
249
306
|
source.installation.binding.originalReports = refreshed.originalReports;
|
|
307
|
+
const nextReason = typeof refreshed.readOnlyReason === 'string'
|
|
308
|
+
? refreshed.readOnlyReason
|
|
309
|
+
: typeof refreshed.readOnlyReason?.message === 'string'
|
|
310
|
+
? refreshed.readOnlyReason.message
|
|
311
|
+
: undefined;
|
|
312
|
+
const nextCode = typeof refreshed.readOnlyReason?.code === 'string' ? refreshed.readOnlyReason.code : undefined;
|
|
313
|
+
const nextLock = refreshed.readOnlyReason?.lock;
|
|
314
|
+
lockChanged = source.installation.binding.readOnlyReason !== nextReason
|
|
315
|
+
|| source.installation.binding.readOnlyCode !== nextCode
|
|
316
|
+
|| JSON.stringify(source.installation.binding.readOnlyLock) !== JSON.stringify(nextLock);
|
|
317
|
+
source.installation.binding.readOnlyReason = nextReason;
|
|
318
|
+
source.installation.binding.readOnlyCode = nextCode;
|
|
319
|
+
source.installation.binding.readOnlyLock = nextLock;
|
|
250
320
|
}
|
|
251
|
-
if (changedNode || position !== undefined || source.entry.returnTo !== entry.returnTo) {
|
|
321
|
+
if (changedNode || lockChanged || position !== undefined || source.entry.returnTo !== entry.returnTo) {
|
|
252
322
|
const updated = { ...source, entry };
|
|
253
323
|
activeRef.current = updated;
|
|
254
324
|
flushSync(() => setActive(updated));
|
|
@@ -258,9 +328,9 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
258
328
|
return true;
|
|
259
329
|
}
|
|
260
330
|
|
|
261
|
-
|
|
331
|
+
inFile = !switching && !reopen && route && source?.entry.route?.map === route.map;
|
|
262
332
|
const client = route && (!inFile || sketch) ? (sketch ? targetClient.sketch(route.map) : targetClient.document(route.map)) : null;
|
|
263
|
-
if (source
|
|
333
|
+
if (source) await flushSource();
|
|
264
334
|
|
|
265
335
|
async function stage(editorInfo) {
|
|
266
336
|
const ready = new Promise((resolve, reject) => {
|
|
@@ -291,7 +361,7 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
291
361
|
if (!inFile) {
|
|
292
362
|
if (entry.rebuild) {
|
|
293
363
|
const bundle = await loadChainBundleForRebuild(entry.file);
|
|
294
|
-
installation = await generateInstallation(bundle.model, bundle.chain, bundle.assets);
|
|
364
|
+
installation = await generateInstallation(bundle.model, bundle.chain, bundle.assets, bundle.canvases);
|
|
295
365
|
} else {
|
|
296
366
|
installation = await openChainBundle(route ? saved.bundle : entry.file);
|
|
297
367
|
}
|
|
@@ -303,7 +373,13 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
303
373
|
installation.binding = {
|
|
304
374
|
client, revision: saved.revision, path: saved.path, documentPath: saved.documentPath, originals: saved.originals, originalReports: saved.originalReports,
|
|
305
375
|
writable: targetClient.canWrite && !saved.readOnly,
|
|
306
|
-
readOnlyReason: saved.readOnlyReason
|
|
376
|
+
readOnlyReason: typeof saved.readOnlyReason === 'string'
|
|
377
|
+
? saved.readOnlyReason
|
|
378
|
+
: typeof saved.readOnlyReason?.message === 'string'
|
|
379
|
+
? saved.readOnlyReason.message
|
|
380
|
+
: undefined,
|
|
381
|
+
readOnlyCode: typeof saved.readOnlyReason?.code === 'string' ? saved.readOnlyReason.code : undefined,
|
|
382
|
+
readOnlyLock: saved.readOnlyReason?.lock,
|
|
307
383
|
};
|
|
308
384
|
}
|
|
309
385
|
}
|
|
@@ -311,56 +387,68 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
311
387
|
if (!installation.scenes.has(viewId)) throw new Error('The document has no such diagram.');
|
|
312
388
|
const session = inFile ? source.session : createChainEditorSession(installation);
|
|
313
389
|
await stage({
|
|
314
|
-
installation, session, viewId,
|
|
390
|
+
installation, session, viewId, canWrite: targetClient.canWrite,
|
|
315
391
|
camera: sameRoute ? source.editor.cameraForVisit?.() : history.cameraFor(route, projectId),
|
|
316
392
|
canBack: position === undefined ? Boolean(source) || history.canBack : position > 0,
|
|
317
393
|
restoreDraft: Boolean(inFile && session.hasChanged(viewId)),
|
|
318
394
|
});
|
|
319
395
|
};
|
|
320
396
|
|
|
321
|
-
|
|
397
|
+
saved = refreshed ?? (client ? await wait(client.read()) : null);
|
|
322
398
|
if (!entry.empty) await prepare(saved);
|
|
323
399
|
while (true) {
|
|
324
400
|
let departureVersion;
|
|
325
401
|
if (source && !inFile) {
|
|
326
|
-
|
|
402
|
+
await flushSource();
|
|
327
403
|
const pendingSave = source.session.pendingSave;
|
|
328
404
|
if (pendingSave) {
|
|
329
|
-
const result = await wait(pendingSave);
|
|
330
|
-
if (result.error) throw result.error;
|
|
331
|
-
|
|
405
|
+
const result = await runAttributed(() => wait(pendingSave), sourceFilePath());
|
|
406
|
+
if (result.error) throw tagFailure(result.error, sourceFilePath());
|
|
407
|
+
await flushSource();
|
|
332
408
|
}
|
|
333
409
|
const write = source.session.latestWrite;
|
|
334
410
|
if (write && write !== observedWrite) {
|
|
335
|
-
const result = await wait(write.promise);
|
|
336
|
-
if (result.error) throw result.error;
|
|
411
|
+
const result = await runAttributed(() => wait(write.promise), sourceFilePath());
|
|
412
|
+
if (result.error) throw tagFailure(result.error, sourceFilePath());
|
|
337
413
|
observedWrite = write;
|
|
338
414
|
}
|
|
339
415
|
departureVersion = source.session.version;
|
|
340
416
|
if (source.session.snapshot().dirty) {
|
|
341
417
|
prompted = true;
|
|
342
|
-
const { action, version } = await wait(new Promise(resolve => {
|
|
418
|
+
const { action, version } = await wait(new Promise((resolve, reject) => {
|
|
343
419
|
setPrompt({
|
|
344
420
|
label, canSave: source.session.canSave,
|
|
345
421
|
choose: action => {
|
|
346
|
-
if (action !== 'stay')
|
|
422
|
+
if (action !== 'stay') {
|
|
423
|
+
try { source.editor.capture(); }
|
|
424
|
+
catch (failure) { reject(tagFailure(failure, sourceFilePath())); return; }
|
|
425
|
+
}
|
|
347
426
|
resolve({ action, version: source.session.version });
|
|
348
427
|
},
|
|
349
428
|
download: async () => {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
429
|
+
try {
|
|
430
|
+
const ok = await source.editor.flush();
|
|
431
|
+
if (signal.aborted) return;
|
|
432
|
+
if (!ok) {
|
|
433
|
+
reject(tagFailure(editFailure(source.editor), sourceFilePath()));
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
const { error: failure } = await source.session.save({ copy: true });
|
|
437
|
+
if (!signal.aborted && failure) reject(tagFailure(failure, sourceFilePath()));
|
|
438
|
+
} catch (failure) {
|
|
439
|
+
if (!signal.aborted) reject(tagFailure(failure, sourceFilePath()));
|
|
440
|
+
}
|
|
353
441
|
},
|
|
354
442
|
});
|
|
355
443
|
}));
|
|
356
444
|
setPrompt(null);
|
|
357
445
|
if (action === 'stay') return;
|
|
358
|
-
|
|
446
|
+
await flushSource();
|
|
359
447
|
if (source.session.version !== version) continue;
|
|
360
448
|
departureVersion = version;
|
|
361
449
|
if (action === 'save') {
|
|
362
|
-
const result = await wait(source.session.save());
|
|
363
|
-
if (result.error) throw result.error;
|
|
450
|
+
const result = await runAttributed(() => wait(source.session.save()), sourceFilePath());
|
|
451
|
+
if (result.error) throw tagFailure(result.error, sourceFilePath());
|
|
364
452
|
if (!result.confirmed) {
|
|
365
453
|
if (source.sketch) return;
|
|
366
454
|
continue;
|
|
@@ -374,22 +462,22 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
374
462
|
while (client) {
|
|
375
463
|
// Every staged editor must match a read made after its installation.
|
|
376
464
|
const latest = await wait(client.read());
|
|
377
|
-
if (latest.revision === saved.revision && latest.readOnly === saved.readOnly && latest.path === saved.path
|
|
465
|
+
if (latest.revision === saved.revision && latest.readOnly === saved.readOnly && latest.path === saved.path
|
|
466
|
+
&& JSON.stringify(latest.readOnlyReason) === JSON.stringify(saved.readOnlyReason)) break;
|
|
378
467
|
if (restaged) throw new Error('The document keeps changing. Try opening it again.');
|
|
379
468
|
releaseStage();
|
|
380
469
|
saved = latest;
|
|
381
470
|
await prepare(saved);
|
|
382
471
|
restaged = true;
|
|
383
472
|
}
|
|
384
|
-
if (source
|
|
473
|
+
if (source) captureSource();
|
|
385
474
|
if (source && !inFile && (source.session.version !== departureVersion || source.session.pendingSave
|
|
386
475
|
|| source.session.latestWrite !== observedWrite)) continue;
|
|
387
476
|
|
|
388
477
|
const currentIndex = !switching && catalogRef.current?.project === index?.project ? catalogRef.current : index;
|
|
389
478
|
const nextCatalog = route && !inFile && !sketch ? catalogWithAdmittedMember(currentIndex, route, slot.installation) : currentIndex;
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}
|
|
479
|
+
commitHistory(entry, reopen && sameVisit ? (position ?? history.currentIndex) : position,
|
|
480
|
+
'The browser address changed during navigation. Choose the diagram again.');
|
|
393
481
|
if (source) history.rememberCamera(source.entry.route, source.editor.cameraForVisit?.(), selected.current);
|
|
394
482
|
// Publish the admitted editor, Save binding and selected URL in the same turn.
|
|
395
483
|
owned = undefined;
|
|
@@ -420,8 +508,17 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
420
508
|
}
|
|
421
509
|
} catch (failure) {
|
|
422
510
|
if (!signal.aborted) {
|
|
423
|
-
const
|
|
424
|
-
|
|
511
|
+
const explicitPath = Boolean(failure && typeof failure === 'object' && (EXPLICIT_FILE_PATH in failure || failure.nestedCanvas));
|
|
512
|
+
const filePath = failure?.nestedCanvas
|
|
513
|
+
? null
|
|
514
|
+
: explicitPath
|
|
515
|
+
? failure[EXPLICIT_FILE_PATH]
|
|
516
|
+
: targetFilePath(index, route ?? entry?.unavailableRoute, {
|
|
517
|
+
saved: saved ?? ((sameRoute || inFile) ? (source?.sketch ? source.session?.binding : source?.installation?.binding) : undefined),
|
|
518
|
+
file: entry?.file,
|
|
519
|
+
});
|
|
520
|
+
const nextError = describeFailure(label, failure, filePath, { explicitPath });
|
|
521
|
+
if (!explicitPath && entry?.file && !entry.rebuild && failure.code === 'UNSUPPORTED_MAPPING_VERSION' && failure.rebuildAvailable) {
|
|
425
522
|
nextError.rebuildFile = entry.file;
|
|
426
523
|
}
|
|
427
524
|
setError(nextError);
|
|
@@ -462,7 +559,7 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
462
559
|
if (disposed) return;
|
|
463
560
|
history.selectSection(false);
|
|
464
561
|
setTasksOpen(false);
|
|
465
|
-
setWorkspaceError(failure);
|
|
562
|
+
setWorkspaceError(attachFileErrorContext(failure));
|
|
466
563
|
});
|
|
467
564
|
const visit = (entry, position, url) => {
|
|
468
565
|
if (position === null && activeRef.current) {
|
|
@@ -506,7 +603,7 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
506
603
|
try {
|
|
507
604
|
const route = new URL(launchUrl).searchParams.has('project') ? readProjectRoute(launchUrl, projectClient.id, null) : null;
|
|
508
605
|
transition({ project: projectClient.id, route });
|
|
509
|
-
} catch (failure) { setError(failure); }
|
|
606
|
+
} catch (failure) { setError(attachFileErrorContext(failure)); }
|
|
510
607
|
} else projectClient.readCatalog().then(loaded => {
|
|
511
608
|
if (disposed) return;
|
|
512
609
|
// Library launch IDs are unique. An explicit catalog may reuse an ID
|
|
@@ -520,7 +617,7 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
520
617
|
if (!new URL(launchUrl).searchParams.has('project')) return;
|
|
521
618
|
const route = readProjectRoute(launchUrl, projectClient.id, loaded.entry);
|
|
522
619
|
if (route) return transition({ route });
|
|
523
|
-
}).catch(failure => { if (!disposed) setError(failure); });
|
|
620
|
+
}).catch(failure => { if (!disposed) setError(attachFileErrorContext(failure)); });
|
|
524
621
|
return () => {
|
|
525
622
|
disposed = true;
|
|
526
623
|
mounted.current = false;
|
|
@@ -536,7 +633,7 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
536
633
|
const source = activeRef.current?.entry;
|
|
537
634
|
const insideSubpage = sameProjectRoute(source?.route, route) && !sameProjectRoute(source.returnTo?.route, route) && !sameProjectRoute(sectionEntry(catalogRef.current, route, contents), route);
|
|
538
635
|
const returnTo = origin ?? (insideSubpage ? source.returnTo : null);
|
|
539
|
-
const committed = await transition({ route, returnTo }, undefined, true);
|
|
636
|
+
const committed = await transition({ route, returnTo }, undefined, { refresh: true });
|
|
540
637
|
const current = activeRef.current;
|
|
541
638
|
if (committed && railOpen && window.innerWidth <= 600 && sameProjectRoute(current?.entry.route, route)
|
|
542
639
|
&& current.entry.route.node === route.node) {
|
|
@@ -551,7 +648,15 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
551
648
|
const owner = activeRef.current;
|
|
552
649
|
const projectId = selected.current;
|
|
553
650
|
(workspace?.client(projectId) ?? projectClient).openInZed(map).catch(failure => {
|
|
554
|
-
if (mounted.current && projectId === selected.current && owner === activeRef.current)
|
|
651
|
+
if (mounted.current && projectId === selected.current && owner === activeRef.current) {
|
|
652
|
+
const ownerSaved = owner?.entry?.route?.map === map
|
|
653
|
+
? (owner.sketch ? owner.session?.binding : owner.installation?.binding)
|
|
654
|
+
: undefined;
|
|
655
|
+
const filePath = map
|
|
656
|
+
? targetFilePath(catalogRef.current, { map }, { saved: ownerSaved })
|
|
657
|
+
: catalogRef.current?.workspace?.projectPath;
|
|
658
|
+
setError(attachFileErrorContext(failure, filePath));
|
|
659
|
+
}
|
|
555
660
|
});
|
|
556
661
|
};
|
|
557
662
|
const toggleGroup = folder => setCollapsedGroups(previous => {
|
|
@@ -574,7 +679,7 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
574
679
|
setCatalog(refreshed);
|
|
575
680
|
dismissError();
|
|
576
681
|
} catch (failure) {
|
|
577
|
-
if (isCurrent()) setError(failure);
|
|
682
|
+
if (isCurrent()) setError(attachFileErrorContext(failure, catalogRef.current?.library?.path));
|
|
578
683
|
} finally {
|
|
579
684
|
if (isCurrent()) {
|
|
580
685
|
refreshRef.current = null;
|
|
@@ -582,9 +687,12 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
582
687
|
}
|
|
583
688
|
}
|
|
584
689
|
}
|
|
690
|
+
const compactHeader = Boolean(workspace && projects?.length && narrow);
|
|
585
691
|
const libraryActions = catalog?.library && <div className="lm-library-actions">
|
|
586
|
-
{catalog.library.sketches && <button type="button"
|
|
587
|
-
|
|
692
|
+
{catalog.library.sketches && <button type="button" aria-label="New drawing" title="New drawing"
|
|
693
|
+
onClick={() => transition({ project: selected.current, sketchDraft: true })}>{compactHeader ? 'New' : 'New drawing'}</button>}
|
|
694
|
+
<button type="button" aria-label="Refresh library" title="Refresh library" disabled={refreshing || Boolean(pending)}
|
|
695
|
+
onClick={refreshLibrary}>{compactHeader ? 'Refresh' : 'Refresh library'}</button>
|
|
588
696
|
</div>;
|
|
589
697
|
const libraryRail = { contents, width, onResize, railScroll, collapsedGroups, onToggleGroup: toggleGroup };
|
|
590
698
|
function librarySide(id, index, route, tree, visible) {
|
|
@@ -603,6 +711,41 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
603
711
|
navigate(target.destination.to, { route: { map: slot.entry.route.map, view: slot.entry.route.view, ...(node && { node: node.id }) },
|
|
604
712
|
title: node?.label || slot.installation.model.title });
|
|
605
713
|
};
|
|
714
|
+
const resolveDetailPreview = useCallback(async target => {
|
|
715
|
+
const destination = target?.destination;
|
|
716
|
+
if (!destination?.to?.map || target.disabled) return null;
|
|
717
|
+
const targetClient = workspace?.client(selected.current) ?? projectClient;
|
|
718
|
+
if (typeof targetClient?.previewDocument !== 'function') return null;
|
|
719
|
+
let previewInstallation = null;
|
|
720
|
+
try {
|
|
721
|
+
const saved = await targetClient.previewDocument(destination.to.map);
|
|
722
|
+
if (!saved?.bundle) return null;
|
|
723
|
+
if (saved.kind === 'sketch') {
|
|
724
|
+
return { format: 'excalidraw', drawing: saved.bundle, title: target.title };
|
|
725
|
+
}
|
|
726
|
+
previewInstallation = await openChainBundle(saved.bundle);
|
|
727
|
+
const targetViewId = destination.to.view ?? previewInstallation.chain.rootViewId;
|
|
728
|
+
const targetModel = previewInstallation.projected.get(targetViewId);
|
|
729
|
+
const targetScene = previewInstallation.scenes.get(targetViewId);
|
|
730
|
+
if (!targetModel || !targetScene) {
|
|
731
|
+
previewInstallation.dispose();
|
|
732
|
+
return null;
|
|
733
|
+
}
|
|
734
|
+
const owned = previewInstallation;
|
|
735
|
+
previewInstallation = null;
|
|
736
|
+
return {
|
|
737
|
+
format: 'locus-map',
|
|
738
|
+
model: targetModel,
|
|
739
|
+
scene: targetScene,
|
|
740
|
+
assetUrls: owned.assetUrls,
|
|
741
|
+
title: target.title,
|
|
742
|
+
dispose: () => owned.dispose(),
|
|
743
|
+
};
|
|
744
|
+
} catch {
|
|
745
|
+
previewInstallation?.dispose?.();
|
|
746
|
+
return null;
|
|
747
|
+
}
|
|
748
|
+
}, [workspace, projectClient]);
|
|
606
749
|
const openFile = () => input.current?.click();
|
|
607
750
|
const rebuild = () => transition({ file: rebuildInput, rebuild: true });
|
|
608
751
|
const showTasks = open => {
|
|
@@ -618,34 +761,48 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
618
761
|
<button type="button" aria-pressed={!tasksOpen} onClick={() => showTasks(false)}>Maps</button>
|
|
619
762
|
<button type="button" aria-pressed={tasksOpen} disabled={Boolean(prompt || pending)} onClick={() => showTasks(true)}>Tasks</button>
|
|
620
763
|
</nav>}</>;
|
|
621
|
-
const renderSlot = (slot, visible) =>
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
764
|
+
const renderSlot = (slot, visible) => {
|
|
765
|
+
const slotCatalog = visible ? catalog : slot.catalog;
|
|
766
|
+
const slotContents = visible ? contents : slot.contents;
|
|
767
|
+
const slotReturnTo = projectReturnTarget(slotCatalog, slot.entry.route, slot.entry.returnTo, slotContents, slot.installation);
|
|
768
|
+
const sketchReturn = slotReturnTo ? {
|
|
769
|
+
title: destinationTitle(slotCatalog?.documents?.find(doc => doc.id === slotReturnTo.route.map), slotReturnTo.route.view, slotReturnTo.title),
|
|
770
|
+
onReturn: () => navigate(slotReturnTo.route),
|
|
771
|
+
} : null;
|
|
772
|
+
return <div key={slot.key} className={visible ? 'lm-project-active' : 'lm-project-staged'}
|
|
773
|
+
aria-hidden={!visible || undefined} inert={!visible ? '' : undefined}>
|
|
774
|
+
{slot.sketch ? <SketchCanvas session={slot.session} active={visible} onInstalled={editor => slot.onInstalled(editor)}
|
|
775
|
+
onInstallError={slot.onInstallError} controls={projectTabs} route={slot.entry.route} openFile={openFile} error={visible ? message : null} onFileError={setError}
|
|
776
|
+
fileMessage={visible ? <FileMessage error={message} rebuildAvailable={Boolean(rebuildInput)} onRebuild={rebuild} onDismiss={dismissMessage} /> : null}
|
|
777
|
+
compactHeader={compactHeader} returnTo={visible ? sketchReturn : null}
|
|
778
|
+
side={librarySide('lm-sketch-contents-' + slot.key, slotCatalog, slot.entry.route, slotContents, visible)}
|
|
779
|
+
location={visible && <>
|
|
780
|
+
{catalog?.workspace && <ProjectLocation workspace={catalog.workspace}
|
|
781
|
+
documentPath={slot.session.binding?.documentPath} folder={slot.session.binding?.path}
|
|
782
|
+
documentLabel="Open drawing in Zed" onOpenProject={() => openInZed()} onOpenDocument={() => openInZed(slot.entry.route?.map)} />}
|
|
783
|
+
{libraryActions}
|
|
784
|
+
</>} /> : <InstalledViewChain installation={slot.installation} editorSession={slot.session}
|
|
785
|
+
stage={{ viewId: slot.viewId, camera: slot.camera, active: visible, restoreDraft: slot.restoreDraft,
|
|
786
|
+
onInstalled: editor => slot.onInstalled(editor), onInstallError: slot.onInstallError }}
|
|
787
|
+
project={{ projectTabs, libraryActions: visible ? libraryActions : null, compactHeader, returnTo: slotReturnTo, route: slot.entry.route, contents: slotContents, catalog: slotCatalog, railOpen, toggleRail, navigate, back: history.back,
|
|
788
|
+
libraryRail: visible ? libraryRail : { ...libraryRail, contents: slot.contents, collapsedGroups: slot.contents?.initiallyCollapsed },
|
|
789
|
+
openProjectInZed: () => openInZed(), openMapInZed: () => openInZed(slot.entry.route?.map),
|
|
790
|
+
canBack: visible ? history.canBack : slot.canBack, openDetail: destination => openDetail(slot, destination),
|
|
791
|
+
resolveDetailPreview, canWrite: slot.canWrite, opening: Boolean(pending),
|
|
792
|
+
retryWrite: () => transition(slot.entry, undefined, { retryWrite: true }) }}
|
|
793
|
+
fileError={visible ? message : null} rebuildAvailable={Boolean(rebuildInput)}
|
|
794
|
+
onOpen={openFile} onRebuild={rebuild} onDismissError={dismissMessage}
|
|
795
|
+
onFileError={failure => { if (slot.session === activeRef.current?.session) setError(failure); }} />}
|
|
796
|
+
</div>;
|
|
797
|
+
};
|
|
643
798
|
|
|
799
|
+
const startupFileMessage = <FileMessage error={message} rebuildAvailable={Boolean(rebuildInput)}
|
|
800
|
+
onRebuild={rebuild} onDismiss={dismissMessage} />;
|
|
644
801
|
const monitoredMap = !tasksOpen && active?.entry.route?.map;
|
|
645
802
|
const configuredInputs = monitoredMap && projects?.find(item => item.id === selectedId)?.inputMaps?.includes(monitoredMap);
|
|
646
803
|
return <div ref={host} className="lm-chain-host lm-project-host">
|
|
647
804
|
{configuredInputs && <MapInputNotice key={selectedId + ':' + monitoredMap} workspace={workspace} project={selectedId} documentId={monitoredMap}
|
|
648
|
-
session={active.session} refreshDocument={() => transition(active.entry, undefined, true)} />}
|
|
805
|
+
session={active.session} refreshDocument={() => transition(active.entry, undefined, { refresh: true })} />}
|
|
649
806
|
<input ref={input} className="lm-chain-file-input" type="file" accept=".json,.locus-map.json,application/json" aria-label="Choose a chain file"
|
|
650
807
|
onChange={event => {
|
|
651
808
|
const [file] = event.target.files ?? [];
|
|
@@ -658,12 +815,13 @@ export function ProjectViewChainViewer({ projectClient, workspace, initialUrl, o
|
|
|
658
815
|
{projectTabs}
|
|
659
816
|
<div className="lm-chain-actions"><button type="button" disabled={!catalog} onClick={openFile}>Open chain file</button></div>
|
|
660
817
|
</header>
|
|
661
|
-
{catalog?.workspace &&
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
818
|
+
{!catalog?.workspace && startupFileMessage}
|
|
819
|
+
<div className={catalog?.workspace ? 'lm-chain-current lm-current-with-location' : 'lm-chain-current'}>
|
|
820
|
+
{catalog?.workspace && <div className="lm-document-location">
|
|
821
|
+
<ProjectLocation workspace={catalog.workspace} onOpenProject={() => openInZed()} />{libraryActions}
|
|
822
|
+
</div>}
|
|
666
823
|
{catalog && <RailToggle open={railOpen} controls="lm-startup-contents" onClick={toggleRail} />}
|
|
824
|
+
{catalog?.workspace && message && <div className="lm-document-chrome">{startupFileMessage}</div>}
|
|
667
825
|
{catalog && railOpen && <ProjectRail id="lm-startup-contents" catalog={catalog} onNavigate={navigate} {...libraryRail} />}
|
|
668
826
|
<div className="lm-chain-layout">
|
|
669
827
|
{!message && <div className="lm-empty" role="status">{pending ? `Opening ${pending}…` : projectProblem ? projectProblem.message : catalog?.library && !catalog.entry ? 'No saved maps found in this library.' : catalog ? 'Откройте сохранённую карту проекта.' : 'Loading project…'}</div>}
|