@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,9 +1,11 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
const key = 'locus-map.inspector.reading.
|
|
3
|
+
const key = 'locus-map.inspector.reading.v2';
|
|
4
|
+
const legacyKey = 'locus-map.inspector.reading.v1';
|
|
5
|
+
const legacyDefaults = { width: 640, height: 500, zoom: 100 };
|
|
4
6
|
const settings = {
|
|
5
|
-
width: { label: 'Width', unit: 'px', initial:
|
|
6
|
-
height: { label: 'Height', unit: 'px', initial:
|
|
7
|
+
width: { label: 'Width', unit: 'px', initial: 760, min: 280, max: 1280, step: 10 },
|
|
8
|
+
height: { label: 'Height', unit: 'px', initial: 720, min: 180, max: 1200, step: 10 },
|
|
7
9
|
zoom: { label: 'Text zoom', unit: '%', initial: 100, min: 75, max: 200, step: 5 },
|
|
8
10
|
};
|
|
9
11
|
|
|
@@ -12,24 +14,47 @@ function bounded(name, value) {
|
|
|
12
14
|
return Number.isFinite(value) ? Math.min(max, Math.max(min, Math.round(value))) : initial;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
function
|
|
17
|
+
function readStored(storageKey) {
|
|
16
18
|
let stored;
|
|
17
19
|
try {
|
|
18
|
-
const cookie = document.cookie.split('; ').find(entry => entry.startsWith(
|
|
19
|
-
if (cookie) stored = JSON.parse(decodeURIComponent(cookie.slice(
|
|
20
|
+
const cookie = document.cookie.split('; ').find(entry => entry.startsWith(storageKey + '='));
|
|
21
|
+
if (cookie) stored = JSON.parse(decodeURIComponent(cookie.slice(storageKey.length + 1)));
|
|
20
22
|
} catch { /* Browser privacy settings can disable cookies. */ }
|
|
21
23
|
if (!stored) {
|
|
22
|
-
try { stored = JSON.parse(window.localStorage.getItem(
|
|
24
|
+
try { stored = JSON.parse(window.localStorage.getItem(storageKey)); } catch { /* Storage is optional. */ }
|
|
25
|
+
}
|
|
26
|
+
return stored && typeof stored === 'object' ? stored : null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function resolveInspectorReadingPreferences(stored, legacy = null) {
|
|
30
|
+
if (stored && typeof stored === 'object') {
|
|
31
|
+
return Object.fromEntries(Object.keys(settings).map(name => [name, bounded(name, stored[name])]));
|
|
32
|
+
}
|
|
33
|
+
if (legacy && typeof legacy === 'object') {
|
|
34
|
+
return Object.fromEntries(Object.keys(settings).map(name => [
|
|
35
|
+
name,
|
|
36
|
+
Number.isFinite(legacy[name]) && legacy[name] !== legacyDefaults[name]
|
|
37
|
+
? bounded(name, legacy[name])
|
|
38
|
+
: settings[name].initial,
|
|
39
|
+
]));
|
|
23
40
|
}
|
|
24
|
-
return Object.fromEntries(Object.keys(settings).map(name => [name,
|
|
41
|
+
return Object.fromEntries(Object.keys(settings).map(name => [name, settings[name].initial]));
|
|
25
42
|
}
|
|
26
43
|
|
|
27
|
-
|
|
44
|
+
function readPreferences() {
|
|
45
|
+
return resolveInspectorReadingPreferences(readStored(key), readStored(legacyKey));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function useInspectorReadingSettings(cardRef, onResize) {
|
|
28
49
|
const [values, setValues] = useState(readPreferences);
|
|
50
|
+
const dirtyRef = useRef(false);
|
|
51
|
+
const onResizeRef = useRef(onResize);
|
|
52
|
+
onResizeRef.current = onResize;
|
|
29
53
|
useEffect(() => {
|
|
54
|
+
if (!dirtyRef.current) return;
|
|
30
55
|
const data = JSON.stringify(values);
|
|
31
56
|
// Host-only preferences survive the local viewer choosing a new port.
|
|
32
|
-
// Store only these three bounded display numbers.
|
|
57
|
+
// Store only these three bounded display numbers once customized.
|
|
33
58
|
try { document.cookie = key + '=' + encodeURIComponent(data) + '; Path=/; Max-Age=31536000; SameSite=Strict'; }
|
|
34
59
|
catch { /* A per-origin fallback remains available. */ }
|
|
35
60
|
try { window.localStorage.setItem(key, data); } catch { /* Keep the session controls usable. */ }
|
|
@@ -45,12 +70,24 @@ export function useInspectorReadingSettings(cardRef) {
|
|
|
45
70
|
size[name] = bounded(name, Number.parseFloat(card.style[name]));
|
|
46
71
|
card.style.removeProperty(name);
|
|
47
72
|
}
|
|
48
|
-
if (Object.keys(size).length)
|
|
73
|
+
if (Object.keys(size).length) {
|
|
74
|
+
dirtyRef.current = true;
|
|
75
|
+
onResizeRef.current?.(size);
|
|
76
|
+
setValues(previous => ({ ...previous, ...size }));
|
|
77
|
+
}
|
|
49
78
|
});
|
|
50
79
|
observer.observe(card, { attributes: true, attributeFilter: ['style'] });
|
|
51
80
|
return () => observer.disconnect();
|
|
52
81
|
}, [cardRef]);
|
|
53
|
-
return {
|
|
82
|
+
return {
|
|
83
|
+
values,
|
|
84
|
+
change: (name, value) => {
|
|
85
|
+
const next = bounded(name, value);
|
|
86
|
+
dirtyRef.current = true;
|
|
87
|
+
if (name === 'width' || name === 'height') onResizeRef.current?.({ [name]: next });
|
|
88
|
+
setValues(previous => ({ ...previous, [name]: next }));
|
|
89
|
+
},
|
|
90
|
+
};
|
|
54
91
|
}
|
|
55
92
|
|
|
56
93
|
export function InspectorReadingSettings({ values, change }) {
|
|
@@ -4,7 +4,7 @@ import { isDiagramPresentationProfile } from '../../contract/diagramPresentation
|
|
|
4
4
|
import { parseRelationshipBody } from '../../contract/relationshipBody.js';
|
|
5
5
|
import { BodyBlocks, InlineText } from './RelationshipBody.jsx';
|
|
6
6
|
import { RelationshipPhrase, relationshipParts } from './PhraseAndCondition.jsx';
|
|
7
|
-
import {
|
|
7
|
+
import { NoteMarkdownBody } from './ReadingMarkdown.jsx';
|
|
8
8
|
|
|
9
9
|
const textField = value => typeof value === 'string' ? value.trim() : '';
|
|
10
10
|
|
|
@@ -47,7 +47,7 @@ function Relations({ nodeId, edges, indexes, onChoose }) {
|
|
|
47
47
|
|
|
48
48
|
/** Diagram-profile node details in the shared grammar; text it rejects stays plain paragraphs. */
|
|
49
49
|
export function NodeNoteBody({ item, model }) {
|
|
50
|
-
if (item.bodyFormat === 'commonmark-v1') return <
|
|
50
|
+
if (item.bodyFormat === 'commonmark-v1') return <NoteMarkdownBody body={item.body} />;
|
|
51
51
|
const paragraphs = textField(item.body).split(/\n\s*\n/u).map(text => text.trim()).filter(Boolean);
|
|
52
52
|
if (isDiagramPresentationProfile(model.presentationProfile)) {
|
|
53
53
|
const { blocks, error } = parseRelationshipBody(item.body);
|
|
@@ -2,6 +2,20 @@ import React, { useEffect, useState } from 'react';
|
|
|
2
2
|
import { hasHtmlOriginal, reportTags } from '../../contract/readingMaterials.js';
|
|
3
3
|
import { ReadingMarkdown } from './ReadingMarkdown.jsx';
|
|
4
4
|
|
|
5
|
+
export function StaticCanvasPreview({ title, onOpenFull, compact = false }) {
|
|
6
|
+
const displayTitle = title || 'Diagram preview';
|
|
7
|
+
return <section className="lm-canvas-preview" data-compact={compact || undefined} aria-label={`Canvas preview: ${displayTitle}`}>
|
|
8
|
+
<header className="lm-canvas-preview-bar">
|
|
9
|
+
<span className="lm-canvas-preview-title" title={displayTitle}>{displayTitle}</span>
|
|
10
|
+
{onOpenFull && <div className="lm-canvas-preview-actions">
|
|
11
|
+
<button type="button" className="lm-canvas-open-full" aria-label={`Open full canvas: ${displayTitle}`}
|
|
12
|
+
title={`Open full canvas: ${displayTitle}`} onClick={onOpenFull}>↗</button>
|
|
13
|
+
</div>}
|
|
14
|
+
</header>
|
|
15
|
+
<p className="lm-canvas-preview-fallback" role="status">Canvas preview is unavailable.</p>
|
|
16
|
+
</section>;
|
|
17
|
+
}
|
|
18
|
+
|
|
5
19
|
function reportElement(node, key, assetUrls) {
|
|
6
20
|
if (typeof node === 'string') return node;
|
|
7
21
|
if (node.tag === 'img') {
|
|
@@ -72,7 +86,7 @@ function MaterialSource({ file, id, binding }) {
|
|
|
72
86
|
</footer>;
|
|
73
87
|
}
|
|
74
88
|
|
|
75
|
-
function Material({ file, id, assetUrls, binding }) {
|
|
89
|
+
function Material({ file, id, assetUrls, binding, canvasAttachments, onOpenCanvas, PreviewComponent = StaticCanvasPreview }) {
|
|
76
90
|
const source = <MaterialSource file={file} id={id} binding={binding} />;
|
|
77
91
|
const href = hasHtmlOriginal(file) && reportAddress(binding?.originalReports?.[id]);
|
|
78
92
|
const original = href && <a className="lm-open-original" href={href} target="_blank" rel="noopener noreferrer">Open full original HTML ↗</a>;
|
|
@@ -80,6 +94,18 @@ function Material({ file, id, assetUrls, binding }) {
|
|
|
80
94
|
if (file.kind === 'original') return <>
|
|
81
95
|
<p>This document is available as a separate original.{unavailable} {original}</p>{source}
|
|
82
96
|
</>;
|
|
97
|
+
if (file.kind === 'canvas') {
|
|
98
|
+
const canvas = canvasAttachments?.get?.(file.canvasId) ?? null;
|
|
99
|
+
const canvasTitle = file.title || file.name;
|
|
100
|
+
return <article className="lm-reading-canvas" aria-label={canvasTitle}>
|
|
101
|
+
<PreviewComponent
|
|
102
|
+
canvas={canvas}
|
|
103
|
+
title={canvasTitle}
|
|
104
|
+
onOpenFull={onOpenCanvas ? () => onOpenCanvas(file.canvasId, file) : undefined}
|
|
105
|
+
/>
|
|
106
|
+
{source}
|
|
107
|
+
</article>;
|
|
108
|
+
}
|
|
83
109
|
return <article aria-label={file.name}>
|
|
84
110
|
{file.kind === 'report' && <p className="lm-material-source">Static HTML view. Interactive content and the original layout are omitted.{unavailable} {original}</p>}
|
|
85
111
|
{file.kind === 'markdown'
|
|
@@ -97,15 +123,17 @@ function SupportingMaterial({ id, title, initiallyOpen, children }) {
|
|
|
97
123
|
</details>;
|
|
98
124
|
}
|
|
99
125
|
|
|
100
|
-
export function ReadingFiles({ reading, elementId, assetUrls, originalBinding, openMaterials = [] }) {
|
|
126
|
+
export function ReadingFiles({ reading, elementId, assetUrls, originalBinding, openMaterials = [], canvasAttachments, onOpenCanvas, PreviewComponent = StaticCanvasPreview }) {
|
|
101
127
|
const ids = reading?.items[elementId];
|
|
102
128
|
if (!ids?.length) return null;
|
|
103
129
|
return <section className="lm-card-section lm-reading-files" aria-label="Reading materials">
|
|
104
130
|
{ids.map((id, index) => {
|
|
105
131
|
const file = reading.files[id];
|
|
106
|
-
const material = <Material file={file} id={id} assetUrls={assetUrls} binding={originalBinding}
|
|
132
|
+
const material = <Material file={file} id={id} assetUrls={assetUrls} binding={originalBinding}
|
|
133
|
+
canvasAttachments={canvasAttachments} onOpenCanvas={onOpenCanvas} PreviewComponent={PreviewComponent} />;
|
|
134
|
+
const summaryTitle = file.kind === 'canvas' ? (file.title || file.sourcePath || file.name) : (file.sourcePath || file.name);
|
|
107
135
|
return index === 0 ? <section key={id} aria-label="Primary document">{material}</section>
|
|
108
|
-
: <SupportingMaterial key={id} id={id} title={
|
|
136
|
+
: <SupportingMaterial key={id} id={id} title={summaryTitle} initiallyOpen={openMaterials.includes(id)}>{material}</SupportingMaterial>;
|
|
109
137
|
})}
|
|
110
138
|
</section>;
|
|
111
139
|
}
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import katex from 'katex';
|
|
3
|
+
import { isSafeUrl } from '../../contract/safety.js';
|
|
4
|
+
import { parseNoteMath, parseReadingMarkdown, parseStoredMarkdown } from '../../contract/readingMarkdown.js';
|
|
3
5
|
import { CommonMarkBody, LocalMarkdownBody as CommonMarkOriginal } from './CommonMarkBody.jsx';
|
|
4
6
|
import { SourceLink } from './SourceEvidence.jsx';
|
|
5
7
|
|
|
8
|
+
function MathFormula({ source, displayMode }) {
|
|
9
|
+
const Element = displayMode ? 'div' : 'span';
|
|
10
|
+
const props = displayMode ? { className: 'lm-math-block', tabIndex: 0 } : {};
|
|
11
|
+
try {
|
|
12
|
+
const html = katex.renderToString(source, { displayMode, trust: false, maxSize: 100 });
|
|
13
|
+
return <Element {...props} dangerouslySetInnerHTML={{ __html: html }} />;
|
|
14
|
+
} catch {
|
|
15
|
+
return <Element {...props}><code>{source}</code></Element>;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
6
19
|
// Build React children only from the Markdown grammar. HTML tokens are text;
|
|
7
|
-
// token attributes
|
|
20
|
+
// selected token attributes go through the image or link policy.
|
|
8
21
|
function renderTokens(tokens, file, assetUrls) {
|
|
9
22
|
const output = [], stack = [{ children: output }];
|
|
10
23
|
for (const token of tokens) {
|
|
@@ -16,7 +29,10 @@ function renderTokens(tokens, file, assetUrls) {
|
|
|
16
29
|
const { token: open, children } = stack.pop();
|
|
17
30
|
const parent = stack.at(-1).children, key = parent.length;
|
|
18
31
|
if (open.hidden) parent.push(<React.Fragment key={key}>{children}</React.Fragment>);
|
|
19
|
-
else if (open.tag === 'a')
|
|
32
|
+
else if (open.tag === 'a') {
|
|
33
|
+
const link = <SourceLink key={key} href={open.attrGet('href')}>{children}</SourceLink>;
|
|
34
|
+
parent.push(file ? link : <span key={key} title={open.attrGet('title') || undefined}>{link}</span>);
|
|
35
|
+
}
|
|
20
36
|
else parent.push(React.createElement(open.tag, { key, ...(open.tag === 'ol' && { start: open.attrGet('start') }) }, children));
|
|
21
37
|
continue;
|
|
22
38
|
}
|
|
@@ -24,26 +40,37 @@ function renderTokens(tokens, file, assetUrls) {
|
|
|
24
40
|
switch (token.type) {
|
|
25
41
|
case 'inline': children.push(<React.Fragment key={key}>{renderTokens(token.children, file, assetUrls)}</React.Fragment>); break;
|
|
26
42
|
case 'image': {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
43
|
+
const destination = token.attrGet('src');
|
|
44
|
+
const packaged = file && assetUrls?.get(file.images[destination]);
|
|
45
|
+
const src = file ? typeof packaged === 'string' && packaged.startsWith('blob:') && packaged
|
|
46
|
+
: isSafeUrl(destination) && destination;
|
|
47
|
+
children.push(src ? <img key={key} src={src} alt={token.meta.alt} loading="lazy"
|
|
48
|
+
{...(!file && { title: token.attrGet('title') || undefined, referrerPolicy: 'no-referrer' })} /> : token.meta.alt);
|
|
30
49
|
break;
|
|
31
50
|
}
|
|
51
|
+
case 'math_inline': case 'math_block':
|
|
52
|
+
children.push(<MathFormula key={key} source={token.content} displayMode={token.type === 'math_block'} />); break;
|
|
32
53
|
case 'fence': case 'code_block':
|
|
33
|
-
children.push(<pre key={key} tabIndex={0}><code>{token.content}</code></pre>); break;
|
|
54
|
+
children.push(<pre key={key} tabIndex={0} aria-label={file ? undefined : 'Code text'}><code>{token.content}</code></pre>); break;
|
|
34
55
|
case 'code_inline': children.push(<code key={key}>{token.content}</code>); break;
|
|
35
56
|
case 'hardbreak': children.push(<br key={key} />); break;
|
|
36
57
|
case 'softbreak': children.push(' '); break;
|
|
37
58
|
case 'hr': children.push(<hr key={key} />); break;
|
|
38
|
-
case 'html_block': children.push(<pre key={key}>{token.content}</pre>); break;
|
|
59
|
+
case 'html_block': children.push(<pre key={key} className={file ? undefined : 'lm-commonmark-html'}>{token.content}</pre>); break;
|
|
39
60
|
default: children.push(token.content);
|
|
40
61
|
}
|
|
41
62
|
}
|
|
42
63
|
return output;
|
|
43
64
|
}
|
|
44
65
|
|
|
66
|
+
export function NoteMarkdownBody({ body }) {
|
|
67
|
+
const parsed = React.useMemo(() => parseNoteMath(body), [body]);
|
|
68
|
+
if (!parsed?.hasMath) return <CommonMarkBody body={body} />;
|
|
69
|
+
return <div className="lm-commonmark-body">{renderTokens(parsed.tokens)}</div>;
|
|
70
|
+
}
|
|
71
|
+
|
|
45
72
|
export function ReadingMarkdown({ file, assetUrls }) {
|
|
46
|
-
const parsed = React.useMemo(() => parseStoredMarkdown(file), [file]);
|
|
73
|
+
const parsed = React.useMemo(() => parseStoredMarkdown(file, { math: true }), [file]);
|
|
47
74
|
if (!parsed) return <p role="alert">Unable to render this Markdown. Open its original below.</p>;
|
|
48
75
|
if ('legacyBody' in parsed) return <CommonMarkBody body={parsed.legacyBody} images={file.images} assetUrls={assetUrls} />;
|
|
49
76
|
return <div className="lm-commonmark-body">{renderTokens(parsed.tokens, file, assetUrls)}</div>;
|
|
@@ -52,13 +79,17 @@ export function ReadingMarkdown({ file, assetUrls }) {
|
|
|
52
79
|
// Task metadata has already been separated. Use the same document presentation
|
|
53
80
|
// as the Inspector, retaining the original reader for files outside its budget.
|
|
54
81
|
export function LocalMarkdownBody({ body, title, id }) {
|
|
55
|
-
const parsed = React.useMemo(() => parseReadingMarkdown(body,
|
|
82
|
+
const parsed = React.useMemo(() => parseReadingMarkdown(body, { frontMatter: false, math: true }), [body]);
|
|
56
83
|
if (!parsed) return <CommonMarkOriginal body={body} title={title} id={id} />;
|
|
57
84
|
let tokens = parsed.tokens;
|
|
58
85
|
if (tokens[0]?.type === 'heading_open' && tokens[0].tag === 'h1') {
|
|
59
86
|
const inline = tokens[1];
|
|
60
|
-
const visible = inline.children.map(
|
|
61
|
-
|
|
87
|
+
const visible = inline.children.map(token => {
|
|
88
|
+
if (token.type === 'image') return token.meta.alt;
|
|
89
|
+
if (token.type === 'softbreak' || token.type === 'hardbreak') return ' ';
|
|
90
|
+
if (token.type === 'math_inline') return token.markup === '$' ? '$' + token.content + '$' : '(' + token.content + ')';
|
|
91
|
+
return token.content;
|
|
92
|
+
}).join('');
|
|
62
93
|
if ([title, `${id}: ${title}`].some(value => value === inline.content || value === visible)) tokens = tokens.slice(3);
|
|
63
94
|
}
|
|
64
95
|
return <div className="lm-commonmark-body">{renderTokens(tokens, { images: {} })}</div>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { parseRelationshipBody } from '../../contract/relationshipBody.js';
|
|
3
|
-
import {
|
|
3
|
+
import { NoteMarkdownBody } from './ReadingMarkdown.jsx';
|
|
4
4
|
|
|
5
5
|
function CodeBlock({ block }) {
|
|
6
6
|
const [message, setMessage] = useState('');
|
|
@@ -38,7 +38,7 @@ export function BodyBlocks({ blocks }) {
|
|
|
38
38
|
|
|
39
39
|
export function RelationshipBody({ body, bodyFormat }) {
|
|
40
40
|
if (body === undefined) return null;
|
|
41
|
-
if (bodyFormat === 'commonmark-v1') return <section className="lm-relationship-body" data-card-section="explanation" aria-label="Relationship explanation"><
|
|
41
|
+
if (bodyFormat === 'commonmark-v1') return <section className="lm-relationship-body" data-card-section="explanation" aria-label="Relationship explanation"><NoteMarkdownBody body={body} /></section>;
|
|
42
42
|
const { blocks, error } = parseRelationshipBody(body);
|
|
43
43
|
if (error) return <p role="alert">Relationship explanation is unavailable.</p>;
|
|
44
44
|
return <section className="lm-relationship-body" data-card-section="explanation" aria-label="Relationship explanation"><BodyBlocks blocks={blocks} /></section>;
|
|
@@ -1,24 +1,31 @@
|
|
|
1
|
+
@import 'katex/dist/katex.min.css';
|
|
2
|
+
|
|
1
3
|
/* Deliberately keep the evidence card opaque/light in both native themes. */
|
|
2
|
-
.lm-inspector { position: absolute; z-index: 4; top: 16px; left: 50%; transform: translateX(-50%); width: min(var(--lm-inspector-width,
|
|
4
|
+
.lm-inspector { position: absolute; z-index: 4; top: 16px; left: 50%; transform: translateX(-50%); width: min(var(--lm-inspector-width, 760px), calc(100% - 24px)); min-width: min(280px, var(--lm-inspector-width, 100%), var(--lm-inspector-max-width, 100%), calc(100% - 24px)); height: min(var(--lm-inspector-height, 720px), calc(100% - 24px)); min-height: min(180px, var(--lm-inspector-height, 100%), var(--lm-inspector-max-height, 100%), calc(100% - 24px)); max-width: min(var(--lm-inspector-max-width, 100%), calc(100% - 24px)); max-height: min(var(--lm-inspector-max-height, 100%), calc(100% - 24px)); resize: both; overflow: auto; overscroll-behavior: contain; padding: 16px 18px; background: #fff; opacity: 1; color: var(--lm-text); color-scheme: light; border: 0; border-radius: 10px; box-shadow: 0 3px 18px rgb(0 0 0 / 12%); }
|
|
3
5
|
.lm-inspector[data-parked] { visibility: hidden; }
|
|
4
6
|
.lm-inspector-return { position: absolute; z-index: 5; top: 8px; right: 8px; max-width: calc(100% - 16px); min-height: 32px; padding: 4px 10px; border: 1px solid var(--lm-border); border-radius: 6px; background: white; color: var(--lm-text); cursor: pointer; }
|
|
5
7
|
/* Keep the focused control mounted until focus returns to the visible header. */
|
|
6
8
|
.lm-inspector-return:not([data-needed]):not(:focus) { display: none; }
|
|
7
9
|
.lm-inspector-return:focus-visible { outline: 3px solid #2865c7; }
|
|
8
|
-
|
|
10
|
+
/* Minimalist quiet chrome: borderless circular icon buttons and a soft Path pill. */
|
|
11
|
+
.lm-inspector-top { cursor: grab; touch-action: none; user-select: none; position: sticky; z-index: 1; top: -16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "back title actions close"; align-items: center; gap: 6px; margin: -16px -18px 8px; padding: 8px 10px 6px; background: #fff; font-size: 11px; line-height: 12px; color: var(--lm-muted); }
|
|
9
12
|
.lm-inspector-top:focus-visible { outline: 3px solid #2865c7; outline-offset: -3px; }
|
|
10
13
|
.lm-inspector[data-dragging] .lm-inspector-top { cursor: grabbing; }
|
|
11
|
-
|
|
12
|
-
.lm-inspector-top {
|
|
13
|
-
.lm-inspector-top button {
|
|
14
|
+
.lm-inspector-top .lm-inspector-title { grid-area: title; margin: 0; min-width: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--lm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
15
|
+
.lm-inspector .lm-inspector-top button { border: 0; background: transparent; color: #5b6570; padding: 0; display: inline-flex; align-items: center; justify-content: center; transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease; }
|
|
16
|
+
.lm-inspector .lm-inspector-top button:hover:not(:disabled) { background: rgb(15 23 42 / 7%); color: #0f172a; }
|
|
17
|
+
.lm-inspector .lm-inspector-top button:disabled { opacity: .3; }
|
|
18
|
+
.lm-inspector .lm-inspector-top button:focus-visible { outline: 2px solid #2865c7; outline-offset: 1px; }
|
|
19
|
+
.lm-inspector-top svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
|
|
20
|
+
.lm-inspector .lm-inspector-top :is(.lm-back, .lm-settings-toggle, .lm-close) { width: 28px; height: 28px; min-width: 28px; min-height: 28px; border-radius: 999px; }
|
|
14
21
|
.lm-inspector-top .lm-back { grid-area: back; }
|
|
15
|
-
.lm-inspector-controls { grid-area: actions; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
|
|
16
|
-
.lm-inspector-top .lm-settings-toggle {
|
|
22
|
+
.lm-inspector-controls { grid-area: actions; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; }
|
|
23
|
+
.lm-inspector .lm-inspector-top .lm-settings-toggle[aria-expanded="true"] { background: rgb(15 23 42 / 9%); color: #0f172a; }
|
|
17
24
|
.lm-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
18
|
-
.lm-inspector .lm-close { grid-area: close;
|
|
25
|
+
.lm-inspector .lm-close { grid-area: close; }
|
|
19
26
|
.lm-inspector-content { font-size: 14px; line-height: 21px; }
|
|
20
|
-
.lm-inspector h2 { margin: 0 0 3px; font-size: 20px; line-height: 26px; font-weight: 600; white-space: pre-line; overflow-wrap: break-word; }
|
|
21
|
-
.lm-inspector h3 { margin: 0 0 6px; font-size: 12px; line-height: 17px; text-transform: none; letter-spacing: 0; }
|
|
27
|
+
:is(.lm-inspector, .lm-docked-inspector) h2 { margin: 0 0 3px; font-size: 20px; line-height: 26px; font-weight: 600; white-space: pre-line; overflow-wrap: break-word; }
|
|
28
|
+
:is(.lm-inspector, .lm-docked-inspector) h3 { margin: 0 0 6px; font-size: 12px; line-height: 17px; text-transform: none; letter-spacing: 0; }
|
|
22
29
|
.lm-card-section { margin-top: 14px; }
|
|
23
30
|
.lm-citation-state { margin: 4px 0 8px; color: #80511c; font-size: 12px; }
|
|
24
31
|
.lm-cited-sources ul { margin: 0; padding-left: 18px; }
|
|
@@ -71,7 +78,7 @@
|
|
|
71
78
|
.lm-source-group-heading code { font-size: 11px; }
|
|
72
79
|
.lm-source-reference > a, .lm-source-reference > span { font-size: 12px; line-height: 17px; font-weight: bold; overflow-wrap: anywhere; }
|
|
73
80
|
.lm-source-reference .lm-source-story { margin: 0; color: var(--lm-muted); font-size: 12px; line-height: 17px; white-space: pre-wrap; }
|
|
74
|
-
.lm-inspector .lm-source-toggle { min-height: 34px; margin-top: 5px; padding: 4px 0; border: 0; background: transparent; color: var(--lm-accent); font-size: 11px; line-height: 12px; font-weight: 700; }
|
|
81
|
+
:is(.lm-inspector, .lm-docked-inspector) .lm-source-toggle { min-height: 34px; margin-top: 5px; padding: 4px 0; border: 0; background: transparent; color: var(--lm-accent); font-size: 11px; line-height: 12px; font-weight: 700; }
|
|
75
82
|
.lm-source-details { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--lm-border); }
|
|
76
83
|
.lm-source-details > summary { box-sizing: border-box; min-height: 34px; padding: 8px 0; color: var(--lm-accent); font-size: 11px; line-height: 12px; font-weight: 700; }
|
|
77
84
|
.lm-source-provenance { margin: 5px 0 10px; }
|
|
@@ -79,15 +86,16 @@
|
|
|
79
86
|
.lm-related-links li { font-size: 14px; line-height: 21px; }
|
|
80
87
|
.lm-related-links li + li { margin-top: 3px; }
|
|
81
88
|
.lm-evidence-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--lm-border); }
|
|
82
|
-
.lm-inspector summary { cursor: pointer; }
|
|
83
|
-
.lm-inspector a { color: var(--lm-accent); overflow-wrap: anywhere; }
|
|
89
|
+
:is(.lm-inspector, .lm-docked-inspector) summary { cursor: pointer; }
|
|
90
|
+
:is(.lm-inspector, .lm-docked-inspector) a { color: var(--lm-accent); overflow-wrap: anywhere; }
|
|
84
91
|
|
|
85
92
|
.lm-body li + li { margin-top: 7px; }
|
|
86
93
|
.lm-proposal-note { padding: 9px 11px; background: #fff9e8; color: #664d14; border-radius: 6px; font-size: 12px; line-height: 18px; }
|
|
87
|
-
@container (max-width: 600px) { .lm-inspector {
|
|
94
|
+
@container (max-width: 600px) { .lm-inspector { padding: 12px; top: 12px; min-width: 0; } .lm-inspector-top { top: -12px; margin: -12px -12px 6px; padding: 7px 10px 5px; cursor: grab; } .lm-metadata, .lm-endpoints > div { grid-template-columns: minmax(0, 1fr); gap: 6px 9px; } }
|
|
95
|
+
@container (max-width: 380px) { .lm-inspector { resize: none; } }
|
|
88
96
|
|
|
89
|
-
.lm-inspector .lm-proposal-source { padding: 0; border: 0; background: transparent; color: var(--lm-accent); font: inherit; text-decoration: underline; }
|
|
90
|
-
.lm-inspector .lm-details-action { width: auto; min-height: 30px; padding: 4px 0; border: 0; background: transparent; color: var(--lm-accent); text-align: left; font-size: 13px; font-weight: 500; }
|
|
97
|
+
:is(.lm-inspector, .lm-docked-inspector) .lm-proposal-source { padding: 0; border: 0; background: transparent; color: var(--lm-accent); font: inherit; text-decoration: underline; }
|
|
98
|
+
:is(.lm-inspector, .lm-docked-inspector) .lm-details-action { width: auto; min-height: 30px; padding: 4px 0; border: 0; background: transparent; color: var(--lm-accent); text-align: left; font-size: 13px; font-weight: 500; }
|
|
91
99
|
.lm-condition { padding: 10px 12px; border: 1px solid var(--lm-border); border-radius: 10px; background: #f5f5f8; }
|
|
92
100
|
.lm-condition h3 { color: var(--lm-muted); font-weight: 400; }
|
|
93
101
|
.lm-condition p { margin: 0; font-size: 14px; line-height: 1.45; font-style: italic; }
|
|
@@ -95,12 +103,12 @@
|
|
|
95
103
|
.lm-connections, .lm-evidence-section { border-top: 1px solid var(--lm-border); margin-top: 8px; }
|
|
96
104
|
.lm-connections > summary, .lm-evidence-section > summary { padding: 6px 0; cursor: pointer; font-size: 12px; line-height: 16px; font-weight: 600; }
|
|
97
105
|
.lm-connections .lm-relations li + li { margin-top: 2px; }
|
|
98
|
-
.lm-inspector .lm-connections .lm-relations button { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; align-items: baseline; min-height: 28px; padding: 3px 5px; margin: 0; border: 0; }
|
|
106
|
+
:is(.lm-inspector, .lm-docked-inspector) .lm-connections .lm-relations button { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; align-items: baseline; min-height: 28px; padding: 3px 5px; margin: 0; border: 0; }
|
|
99
107
|
.lm-connections .lm-relation-direction, .lm-connections .lm-relation-phrase, .lm-connections .lm-relation-action, .lm-connections .lm-relation-when { font-size: 12px; line-height: 16px; }
|
|
100
108
|
.lm-connections .lm-relation-direction { color: var(--lm-muted); }
|
|
101
109
|
.lm-connections .lm-relation-when { grid-column: 2; }
|
|
102
|
-
.lm-inspector .lm-relations button { padding: 7px 8px; margin: 0 -8px; border-radius: 8px; }
|
|
103
|
-
.lm-inspector .lm-relations button:hover { background: var(--lm-accent-soft); }
|
|
110
|
+
:is(.lm-inspector, .lm-docked-inspector) .lm-relations button { padding: 7px 8px; margin: 0 -8px; border-radius: 8px; }
|
|
111
|
+
:is(.lm-inspector, .lm-docked-inspector) .lm-relations button:hover { background: var(--lm-accent-soft); }
|
|
104
112
|
|
|
105
113
|
.lm-relation-phrase { display: block; font-size: 14px; line-height: 21px; }
|
|
106
114
|
.lm-relation-phrase .lm-relation-action { display: inline; }
|
|
@@ -126,6 +134,8 @@
|
|
|
126
134
|
.lm-commonmark-body blockquote { margin: 12px 0; padding-left: 12px; border-left: 3px solid var(--lm-border); }
|
|
127
135
|
.lm-commonmark-body pre { max-width: 100%; padding: 12px; overflow: auto; white-space: pre; overflow-wrap: normal; background: #f7f7f9; font: 12px/1.7 monospace; tab-size: 4; }
|
|
128
136
|
.lm-commonmark-body pre:focus-visible { outline: 2px solid var(--lm-accent); outline-offset: -2px; }
|
|
137
|
+
.lm-commonmark-body .lm-math-block { overflow-x: auto; }
|
|
138
|
+
.lm-math-block > .katex-display { min-width: 100%; width: max-content; }
|
|
129
139
|
.lm-commonmark-body img { max-width: 100%; height: auto; }
|
|
130
140
|
.lm-explanation-code { margin: 10px 0 14px; border: 1px solid var(--lm-border); border-radius: 9px; background: #f7f7f9; overflow: hidden; }
|
|
131
141
|
.lm-explanation-code pre { margin: 0; padding: 12px; overflow: auto; white-space: pre; font: 12px/1.7 monospace; tab-size: 2; }
|
|
@@ -142,7 +152,14 @@
|
|
|
142
152
|
.lm-source-observation code { overflow-wrap: anywhere; }
|
|
143
153
|
.lm-source-warning { padding: 10px 12px; border-radius: 8px; background: #fff8ed; line-height: 1.5; }
|
|
144
154
|
|
|
145
|
-
|
|
155
|
+
/* Keep Excalidraw preview stages unzoomed (zoom: 1) so pointer hit coordinates stay exact. */
|
|
156
|
+
.lm-inspector-content:not(:has(.lm-canvas-preview)) { zoom: var(--lm-inspector-zoom, 1); }
|
|
157
|
+
.lm-inspector-content:has(.lm-canvas-preview) > :not(.lm-reading-files):not(.lm-details-section),
|
|
158
|
+
.lm-inspector-content:has(.lm-canvas-preview) .lm-reading-files > :not(:has(.lm-canvas-preview)),
|
|
159
|
+
.lm-inspector-content:has(.lm-canvas-preview) .lm-reading-files > section:has(.lm-canvas-preview) > :not(.lm-canvas-preview):not(:has(.lm-canvas-preview)),
|
|
160
|
+
.lm-inspector-content:has(.lm-canvas-preview) .lm-reading-files > details:has(.lm-canvas-preview) > :not(.lm-canvas-preview):not(:has(.lm-canvas-preview)),
|
|
161
|
+
.lm-inspector-content:has(.lm-canvas-preview) .lm-reading-files article:has(.lm-canvas-preview) > :not(.lm-canvas-preview),
|
|
162
|
+
.lm-inspector-content:has(.lm-canvas-preview) .lm-details-section > :not(.lm-canvas-preview) { zoom: var(--lm-inspector-zoom, 1); }
|
|
146
163
|
.lm-reading-settings { min-width: 0; margin: 12px 0; border: 1px solid var(--lm-border); border-radius: 6px; }
|
|
147
164
|
.lm-reading-settings label { display: grid; grid-template-columns: 5em minmax(52px, 1fr) 4.5em; gap: 6px; align-items: center; }
|
|
148
165
|
.lm-reading-settings input { width: 100%; min-width: 0; }
|
|
@@ -155,21 +172,25 @@
|
|
|
155
172
|
.lm-reading-report { overflow-x: auto; line-height: 1.5; }
|
|
156
173
|
.lm-reading-report table { border-collapse: collapse; margin-block: .75em; }
|
|
157
174
|
.lm-reading-report th, .lm-reading-report td { padding: .3em .6em; border: 1px solid #c6cbd2; }
|
|
158
|
-
.lm-inspector-top .lm-path-actions { display: flex; align-items: center; gap:
|
|
175
|
+
.lm-inspector .lm-inspector-top .lm-path-actions { display: inline-flex; align-items: center; gap: 1px; margin: 0; padding: 2px; border-radius: 7px; background: #f1f5f9; }
|
|
176
|
+
.lm-inspector .lm-inspector-top .lm-path-label { padding: 0 6px; font-size: 10.5px; font-weight: 500; color: #64748b; user-select: none; }
|
|
177
|
+
.lm-inspector .lm-inspector-top .lm-path-actions button { width: auto; min-width: 0; height: 22px; min-height: 22px; padding: 0 8px; border-radius: 5px; color: #334155; font-size: 11.5px; font-weight: 500; }
|
|
178
|
+
.lm-inspector .lm-inspector-top .lm-path-actions button:is(:hover, :focus-visible):not(:disabled) { background: #fff; color: #0f172a; box-shadow: 0 1px 2px rgb(15 23 42 / 10%); }
|
|
179
|
+
.lm-inspector .lm-inspector-top .lm-details-action { height: 26px; min-height: 26px; padding: 0 8px; border-radius: 6px; font-size: 12px; }
|
|
159
180
|
.lm-material-source { font-size: 12px; line-height: 1.5; color: var(--lm-muted); margin: 8px 0; }
|
|
160
181
|
.lm-material-source code, .lm-reading-files summary { overflow-wrap: anywhere; }
|
|
161
182
|
.lm-material-source button { font: inherit; }
|
|
162
183
|
|
|
163
184
|
.lm-inspector { container-type: inline-size; }
|
|
164
|
-
@container (max-width:
|
|
165
|
-
.lm-inspector-top { grid-template-columns: auto minmax(
|
|
166
|
-
.lm-inspector-controls { justify-self:
|
|
185
|
+
@container (max-width: 420px) {
|
|
186
|
+
.lm-inspector-top { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "back title close" "actions actions actions"; row-gap: 4px; }
|
|
187
|
+
.lm-inspector-controls { justify-self: end; }
|
|
167
188
|
}
|
|
168
189
|
.lm-material-source small { display: block; font-size: inherit; }
|
|
169
190
|
|
|
170
191
|
.lm-source-path { display: flex; align-items: center; gap: 3px; }
|
|
171
192
|
.lm-source-path code { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
172
|
-
.lm-inspector .lm-source-path :is(button, a) { position: relative; flex: none; display: grid; place-items: center; width: 24px; height: 24px; min-height: 0; padding: 3px; border: 0; background: transparent; color: inherit; cursor: pointer; }
|
|
193
|
+
:is(.lm-inspector, .lm-docked-inspector) .lm-source-path :is(button, a) { position: relative; flex: none; display: grid; place-items: center; width: 24px; height: 24px; min-height: 0; padding: 3px; border: 0; background: transparent; color: inherit; cursor: pointer; }
|
|
173
194
|
.lm-source-path [aria-disabled="true"] { opacity: .6; cursor: default; }
|
|
174
195
|
.lm-source-path svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
|
|
175
196
|
.lm-source-path :is(button, a) span { display: none; position: absolute; z-index: 2; bottom: 100%; right: 0; padding: 2px 6px; white-space: nowrap; background: var(--lm-text); color: var(--lm-surface); border-radius: 4px; }
|
|
@@ -183,4 +204,26 @@
|
|
|
183
204
|
.lm-reading-files table { border-collapse: collapse; }
|
|
184
205
|
.lm-reading-files :is(th, td) { border: 1px solid var(--lm-border); padding: .3em .6em; }
|
|
185
206
|
.lm-markdown-source pre { overflow-x: auto; }
|
|
186
|
-
.lm-inspector .lm-open-original { display: inline-block; font-size: 14px; padding-block: 4px; }
|
|
207
|
+
:is(.lm-inspector, .lm-docked-inspector) .lm-open-original { display: inline-block; font-size: 14px; padding-block: 4px; }
|
|
208
|
+
|
|
209
|
+
.lm-canvas-preview { zoom: 1; margin: 8px 0; border: 1px solid var(--lm-border); border-radius: 8px; overflow: hidden; background: #fff; }
|
|
210
|
+
.lm-canvas-preview-bar { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-bottom: 1px solid var(--lm-border); background: #f8fafc; font-size: 12px; line-height: 16px; color: var(--lm-text); }
|
|
211
|
+
.lm-canvas-preview-title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
212
|
+
.lm-canvas-preview-actions { display: inline-flex; align-items: center; gap: 4px; flex: none; }
|
|
213
|
+
:is(.lm-inspector, .lm-docked-inspector) .lm-canvas-preview-bar button { display: inline-flex; align-items: center; justify-content: center; height: 24px; min-height: 24px; padding: 0 7px; border: 1px solid var(--lm-border); border-radius: 5px; background: #fff; color: #334155; font-size: 11.5px; font-weight: 500; line-height: 1; }
|
|
214
|
+
:is(.lm-inspector, .lm-docked-inspector) .lm-canvas-preview-bar button:hover:not(:disabled) { background: var(--lm-accent-soft); color: #0f172a; }
|
|
215
|
+
:is(.lm-inspector, .lm-docked-inspector) .lm-canvas-preview-bar .lm-canvas-open-full { width: 24px; padding: 0; }
|
|
216
|
+
.lm-canvas-open-full svg { width: 14px; height: 14px; }
|
|
217
|
+
.lm-canvas-preview-stage { position: relative; width: 100%; height: 268px; overflow: hidden; background: #fff; isolation: isolate; }
|
|
218
|
+
.lm-canvas-preview[data-compact] .lm-canvas-preview-stage { height: 210px; }
|
|
219
|
+
.lm-canvas-preview-fallback { margin: 0; padding: 14px 12px; color: var(--lm-muted); font-size: 12px; line-height: 1.5; }
|
|
220
|
+
.lm-canvas-preview-stage .excalidraw .App-bottom-bar,
|
|
221
|
+
.lm-canvas-preview-stage .excalidraw .App-menu_bottom,
|
|
222
|
+
.lm-canvas-preview-stage .excalidraw .App-menu_top,
|
|
223
|
+
.lm-canvas-preview-stage .excalidraw .zoom-actions,
|
|
224
|
+
.lm-canvas-preview-stage .excalidraw .footer-center,
|
|
225
|
+
.lm-canvas-preview-stage .excalidraw .HelpDialog,
|
|
226
|
+
.lm-canvas-preview-stage .excalidraw .layer-ui__wrapper__footer,
|
|
227
|
+
.lm-canvas-preview-stage .excalidraw .layer-ui__wrapper__top-right,
|
|
228
|
+
.lm-canvas-preview-stage .excalidraw .main-menu-trigger,
|
|
229
|
+
.lm-canvas-preview-stage .excalidraw .HintViewer { display: none !important; }
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
.lm-viewer[data-mode="view"] .App-toolbar-content > .dropdown-menu--mobile { left: auto; right: 0; width: min(260px, calc(100cqw - 28px)); }
|
|
41
41
|
/* View links and fold handles sit above the editor canvas, including its
|
|
42
42
|
native mobile menu. Suspend those hotspots until the menu closes. */
|
|
43
|
-
.lm-viewer-stage:has(.dropdown-menu--mobile) > .lm-drilldowns { visibility: hidden; }
|
|
43
|
+
.lm-viewer-stage:has(.dropdown-menu--mobile) > :is(.lm-drilldowns, .lm-drilldown-tooltips) { visibility: hidden; }
|
|
44
44
|
@container (max-width: 210px) {
|
|
45
45
|
.lm-viewer[data-mode="view"] .App-bottom-bar > .Island:has(.App-toolbar-content > .main-menu-trigger) { margin-bottom: 74px; }
|
|
46
46
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export const NETWORK_SERVER_HINT = 'The local viewer server may be unreachable or stopped.';
|
|
2
|
+
|
|
3
|
+
export function isNetworkFetchError(error, depth = 0) {
|
|
4
|
+
if (!error || typeof error !== 'object' || depth > 4) return false;
|
|
5
|
+
const text = String(error.message ?? '').trim();
|
|
6
|
+
if (text && ((error.name === 'TypeError' && /failed to fetch|load failed|networkerror/iu.test(text))
|
|
7
|
+
|| /^failed to fetch$/iu.test(text))) {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
return Boolean(error.cause && isNetworkFetchError(error.cause, depth + 1));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const trimTrailingSlashes = value => value.replace(/\/+$/u, '');
|
|
14
|
+
|
|
15
|
+
function joinTargetPath(base, relative) {
|
|
16
|
+
if (!base) return relative;
|
|
17
|
+
const prefix = trimTrailingSlashes(base);
|
|
18
|
+
if (!prefix) return relative;
|
|
19
|
+
return `${prefix}/${relative}`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Resolve the most informative target file path available for an open/save error. */
|
|
23
|
+
export function targetFilePath(catalog, route, { saved, file } = {}) {
|
|
24
|
+
if (typeof saved?.documentPath === 'string' && saved.documentPath) return saved.documentPath;
|
|
25
|
+
const member = route?.map ? catalog?.documents?.find(item => item.id === route.map) : null;
|
|
26
|
+
if (typeof member?.documentPath === 'string' && member.documentPath) return member.documentPath;
|
|
27
|
+
const relative = member?.relativePath
|
|
28
|
+
|| (typeof saved?.path === 'string' && saved.path)
|
|
29
|
+
|| (typeof route?.map === 'string' && /\.(?:locus-map\.json|excalidraw)$/u.test(route.map) ? route.map : null);
|
|
30
|
+
if (relative) {
|
|
31
|
+
if (relative.startsWith('/')) return relative;
|
|
32
|
+
const base = catalog?.library?.path
|
|
33
|
+
|| (catalog?.library ? (catalog.library.folder ?? '.locus-map') : catalog?.folder);
|
|
34
|
+
return joinTargetPath(base, relative);
|
|
35
|
+
}
|
|
36
|
+
if (typeof file?.name === 'string' && file.name) return file.name;
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Attach file path and network guidance to an error without mutating the original object. */
|
|
41
|
+
export function attachFileErrorContext(error, filePath) {
|
|
42
|
+
if (!error || typeof error !== 'object') return error;
|
|
43
|
+
const cause = error.diagnostics?.[0] ?? error;
|
|
44
|
+
const resolvedPath = error.nestedCanvas ? error.filePath : (error.filePath || filePath || undefined);
|
|
45
|
+
const hint = error.hint ?? (isNetworkFetchError(error) || isNetworkFetchError(cause) ? NETWORK_SERVER_HINT : undefined);
|
|
46
|
+
if (resolvedPath === error.filePath && hint === error.hint) return error;
|
|
47
|
+
const next = Object.assign(new Error(error.message), error);
|
|
48
|
+
next.name = error.name;
|
|
49
|
+
if (error.cause !== undefined) next.cause = error.cause;
|
|
50
|
+
if (resolvedPath) next.filePath = resolvedPath;
|
|
51
|
+
if (hint) next.hint = hint;
|
|
52
|
+
return next;
|
|
53
|
+
}
|
package/src/viewer/geometry.js
CHANGED
|
@@ -46,6 +46,18 @@ export function placeTargetTooltip(point, buttonSize, tooltip, stage) {
|
|
|
46
46
|
return {left:left-point.x,top:top-point.y};
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
/** Compute clickable hit-area (>= 22px) and zoom-scaled visual badge size (12-24px) for a drilldown control. */
|
|
50
|
+
export function drilldownSizing(shape, zoom) {
|
|
51
|
+
const safeZoom = Number.isFinite(zoom) && zoom > 0 ? zoom : 1;
|
|
52
|
+
const screenMin = shape && Number.isFinite(shape.width) && Number.isFinite(shape.height)
|
|
53
|
+
? Math.min(shape.width, shape.height) * safeZoom
|
|
54
|
+
: 120 * safeZoom;
|
|
55
|
+
const scale = Math.max(0, Math.min(1, (Math.min(safeZoom, screenMin / 120) - 0.25) / 0.75));
|
|
56
|
+
const visual = Math.round(12 + 12 * scale);
|
|
57
|
+
const hit = visual <= 16 ? 22 : visual <= 20 ? 24 : 28;
|
|
58
|
+
return { hit, visual };
|
|
59
|
+
}
|
|
60
|
+
|
|
49
61
|
/** Prefer a fully visible card-corner anchor, including after node rotation. */
|
|
50
62
|
export function placeDrilldownButton(points, size, stage) {
|
|
51
63
|
const candidates = points.map(point => ({ x: point.x - size / 2, y: point.y - size / 2 }));
|
package/src/viewer/highlight.js
CHANGED
|
@@ -40,22 +40,36 @@ export function neighbourhood(indexes, focus) {
|
|
|
40
40
|
return { nodeIds, edgeIds };
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
export function focusStrokes(elements, indexes, focus) {
|
|
44
|
+
if (!focus) return [];
|
|
45
45
|
const { nodeIds, edgeIds } = neighbourhood(indexes, focus);
|
|
46
|
-
const
|
|
46
|
+
const byId = new Map(elements.filter(element => !element.isDeleted).map(element => [element.id, element]));
|
|
47
|
+
const strokes = [];
|
|
48
|
+
const add = (id, selected, clip) => {
|
|
49
|
+
const element = byId.get(id);
|
|
50
|
+
if (!element || element.strokeColor === 'transparent') return;
|
|
51
|
+
const strokeWidth = element.strokeWidth + (selected ? 2.5 : 1);
|
|
52
|
+
strokes.push({ source: element, strokeWidth, clip });
|
|
53
|
+
};
|
|
47
54
|
for (const id of nodeIds) {
|
|
48
55
|
const selected = focus.kind === 'node' && focus.id === id;
|
|
49
|
-
|
|
50
|
-
|
|
56
|
+
add(semanticElementId('node', id), selected);
|
|
57
|
+
add(semanticElementId('node', id, 'lifeline'), selected);
|
|
58
|
+
const capId = semanticElementId('node', id, 'card-cap'), cap = byId.get(capId);
|
|
59
|
+
add(semanticElementId('node', id, 'card-outline'), selected, cap);
|
|
60
|
+
add(capId, selected);
|
|
61
|
+
add(semanticElementId('node', id, 'card-fold'), selected);
|
|
62
|
+
}
|
|
63
|
+
for (const id of edgeIds) {
|
|
64
|
+
const arrowId = semanticElementId('edge', id);
|
|
65
|
+
const arrow = byId.get(arrowId), label = byId.get(semanticElementId('edge', id, 'label'));
|
|
66
|
+
const mask = byId.get(semanticElementId('edge', id, 'label-mask'));
|
|
67
|
+
const clip = mask || (label?.containerId === arrowId && arrow ? boundTextBox(label, arrow) : null);
|
|
68
|
+
add(arrowId, focus.kind === 'edge' && focus.id === id, clip);
|
|
51
69
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
height: element.height, angle: element.angle || 0, points: element.points?.map(point => [...point]),
|
|
56
|
-
color: ids.get(element.id) ? '#b46900' : '#087f5b', lineWidth: ids.get(element.id) ? 4 : 2.5,
|
|
57
|
-
dashed: element.strokeStyle !== 'solid',
|
|
58
|
-
}));
|
|
70
|
+
// Paint in native order so a highlighted line never crosses a later outline.
|
|
71
|
+
const order = new Map(elements.map((element, index) => [element.id, index]));
|
|
72
|
+
return strokes.sort((a, b) => order.get(a.source.id) - order.get(b.source.id));
|
|
59
73
|
}
|
|
60
74
|
|
|
61
75
|
/** Path order is independent of scene paint order. Badges belong to node shapes,
|