@locus-forge/locus-map 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -4
- 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-BnTGKKaL.js} +1 -1
- package/dist/assets/{ar-SA-G6X2FPQ2-BQNIWg05.js → ar-SA-G6X2FPQ2-LY3czoz9.js} +1 -1
- package/dist/assets/{architectureDiagram-5GKGNRK7-D1SjeTh7.js → architectureDiagram-5GKGNRK7-BG9h9KRx.js} +1 -1
- package/dist/assets/{az-AZ-76LH7QW2-BAQK4UQr.js → az-AZ-76LH7QW2-Brv6kuM6.js} +1 -1
- package/dist/assets/{bg-BG-XCXSNQG7-BDvRwwoU.js → bg-BG-XCXSNQG7-tsQwwvMW.js} +1 -1
- package/dist/assets/{blockDiagram-I7D4REHJ-xOWzl6z3.js → blockDiagram-I7D4REHJ-V9bUuR63.js} +1 -1
- package/dist/assets/{bn-BD-2XOGV67Q-B-osMrPA.js → bn-BD-2XOGV67Q-0Cou5nNv.js} +1 -1
- package/dist/assets/{c4Diagram-7LVT6UL2-D5e6bidF.js → c4Diagram-7LVT6UL2-BmCtzbrY.js} +1 -1
- package/dist/assets/{ca-ES-6MX7JW3Y-BqurRCRN.js → ca-ES-6MX7JW3Y-pZF7WJUL.js} +1 -1
- package/dist/assets/channel-Dx9OTBrx.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-CQmSUQUU.js → chunk-2Q5K7J3B-D2iTDmHh.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-iLXee7yJ.js → chunk-5VM5RSS4-CTxdXZIx.js} +1 -1
- package/dist/assets/{chunk-F27PBJKO-BSQMcINP.js → chunk-F27PBJKO-Hic1X1pm.js} +1 -1
- package/dist/assets/{chunk-IMKFNOWR-l-2241K-.js → chunk-IMKFNOWR-DhLW1JVb.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-Cu7ldP_G.js → chunk-JWPE2WC7-_g5twKlC.js} +1 -1
- package/dist/assets/{chunk-POPQ4Y6H-BkgM8HKl.js → chunk-POPQ4Y6H-DMV4qmkd.js} +1 -1
- package/dist/assets/{chunk-SVP7TREG-BR7R6F9G.js → chunk-SVP7TREG-BWg83oEL.js} +1 -1
- package/dist/assets/{chunk-TICWLB2K-DzFEizqD.js → chunk-TICWLB2K-CPmkpa7J.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-B3V5ae8Q.js → chunk-XXDRQBXY-KnXvIZ_8.js} +1 -1
- package/dist/assets/classDiagram-ZZMXUADV-Da4s894j.js +1 -0
- package/dist/assets/classDiagram-v2-VYDZK3BY--H9NrCfO.js +1 -0
- package/dist/assets/{cose-bilkent-JH36ORCC-BSUyEU78.js → cose-bilkent-JH36ORCC-BChK_CGh.js} +1 -1
- package/dist/assets/{cs-CZ-2BRQDIVT-BtaYa8qS.js → cs-CZ-2BRQDIVT-CtAC2Qjy.js} +1 -1
- package/dist/assets/{cynefin-OW5HDTMX-BQ6G1FGd.js → cynefin-OW5HDTMX-CdsltaMX.js} +1 -1
- package/dist/assets/{cynefinDiagram-5FMLGOSQ-BmH3cQU1.js → cynefinDiagram-5FMLGOSQ-bXvXX3Fx.js} +1 -1
- package/dist/assets/{d3-scale-6PaX2_v-.js → d3-scale-sM87TD1Z.js} +1 -1
- package/dist/assets/{da-DK-5WZEPLOC-Dk88jbcE.js → da-DK-5WZEPLOC-DyWwaclV.js} +1 -1
- package/dist/assets/{dagre-GXQ25YYZ-DzqDTRYR.js → dagre-GXQ25YYZ-CTmiZZVO.js} +1 -1
- package/dist/assets/{de-DE-XR44H4JA-BtkAzckW.js → de-DE-XR44H4JA-BDXUBHki.js} +1 -1
- package/dist/assets/{diagram-S7CK7UJ4-CKkad9LS.js → diagram-S7CK7UJ4-Bm8Fy0R_.js} +1 -1
- package/dist/assets/{diagram-UQ7AKVKN-HnH6kGvY.js → diagram-UQ7AKVKN-BU_AmM_A.js} +1 -1
- package/dist/assets/{diagram-VSXAHHWV-BGbiUlE1.js → diagram-VSXAHHWV-B78LUoXq.js} +1 -1
- package/dist/assets/{diagram-VX7I27RA-MPt2qzsq.js → diagram-VX7I27RA-DNvWjMlf.js} +1 -1
- package/dist/assets/{diagram-Z3DM3KII-hcUL0DLm.js → diagram-Z3DM3KII-DmFVt1fa.js} +1 -1
- package/dist/assets/{ebnfDiagram-PWID7BFC-hUZUNK__.js → ebnfDiagram-PWID7BFC-CpDna0Jp.js} +1 -1
- package/dist/assets/{el-GR-BZB4AONW-DOnEE5fq.js → el-GR-BZB4AONW-CNhF7oN2.js} +1 -1
- package/dist/assets/{engines-C6k3bUFA.js → engines-a8mi_N6S.js} +1 -1
- package/dist/assets/{erDiagram-RLTQ6QDP-DoHgp3nM.js → erDiagram-RLTQ6QDP-BGD-9OAS.js} +1 -1
- package/dist/assets/{es-ES-U4NZUMDT-VFRkCKl6.js → es-ES-U4NZUMDT-DXMrJcKL.js} +1 -1
- package/dist/assets/{eu-ES-A7QVB2H4-CWlqsMWd.js → eu-ES-A7QVB2H4-BTkMEwMi.js} +1 -1
- package/dist/assets/{fa-IR-HGAKTJCU-CxtwUetE.js → fa-IR-HGAKTJCU-CgkknSS7.js} +1 -1
- package/dist/assets/{fi-FI-Z5N7JZ37-Djl1mow5.js → fi-FI-Z5N7JZ37-B1K83nId.js} +1 -1
- package/dist/assets/{flowDiagram-HODETNUW-CCs8KCI7.js → flowDiagram-HODETNUW-CjU1yR1F.js} +1 -1
- package/dist/assets/{fr-FR-RHASNOE6-CTSI58QE.js → fr-FR-RHASNOE6-CBFZBGMr.js} +1 -1
- package/dist/assets/{ganttDiagram-EL5Y4UJY-V39NrnLQ.js → ganttDiagram-EL5Y4UJY-bvb8BjSh.js} +1 -1
- package/dist/assets/{gitGraphDiagram-WWUBYQGX-DsfCYVRX.js → gitGraphDiagram-WWUBYQGX-DZXQ_x8t.js} +1 -1
- package/dist/assets/{gl-ES-HMX3MZ6V-9X19A7Co.js → gl-ES-HMX3MZ6V-CON98Mma.js} +1 -1
- package/dist/assets/{he-IL-6SHJWFNN-CCWn0aTE.js → he-IL-6SHJWFNN-CBoFaEdB.js} +1 -1
- package/dist/assets/{hi-IN-IWLTKZ5I-Czvn3Cqk.js → hi-IN-IWLTKZ5I-BJuoh3dl.js} +1 -1
- package/dist/assets/{hu-HU-A5ZG7DT2-CSA0xyZy.js → hu-HU-A5ZG7DT2-CQruu8XR.js} +1 -1
- package/dist/assets/{id-ID-SAP4L64H-C8Y8IY1j.js → id-ID-SAP4L64H-VhaoENjR.js} +1 -1
- package/dist/assets/{index-C_ek_ppO.css → index-CDNl17QJ.css} +1 -1
- package/dist/assets/{index-0Kge4otW.js → index-CboxqaL5.js} +5 -5
- package/dist/assets/index-DBGHN_5E.js +624 -0
- package/dist/assets/{infoDiagram-27XIBGKW-C0Ivywz2.js → infoDiagram-27XIBGKW-CM9Hap0f.js} +1 -1
- package/dist/assets/{ishikawaDiagram-5VMMS53U-CMmE4k9T.js → ishikawaDiagram-5VMMS53U-i8pQztJI.js} +1 -1
- package/dist/assets/{it-IT-JPQ66NNP-gVSFrMB6.js → it-IT-JPQ66NNP-Dj9BkXfh.js} +1 -1
- package/dist/assets/{ja-JP-DBVTYXUO-HnD6OZRp.js → ja-JP-DBVTYXUO-CB2BlfIS.js} +1 -1
- package/dist/assets/{journeyDiagram-3NMN7TZE-CpkEKmSl.js → journeyDiagram-3NMN7TZE-PxcdqONT.js} +1 -1
- package/dist/assets/{kaa-6HZHGXH3-C29qXHap.js → kaa-6HZHGXH3-CLnR_zY5.js} +1 -1
- package/dist/assets/{kab-KAB-ZGHBKWFO-CLNG0bT_.js → kab-KAB-ZGHBKWFO-8TJr4nPf.js} +1 -1
- package/dist/assets/{kanban-definition-UXKFOSKX-hOCBBBFh.js → kanban-definition-UXKFOSKX-B2p5NBhO.js} +1 -1
- package/dist/assets/{kk-KZ-P5N5QNE5-DNoNNWtH.js → kk-KZ-P5N5QNE5-5uZYjZ2e.js} +1 -1
- package/dist/assets/{km-KH-HSX4SM5Z-eQMwEzV_.js → km-KH-HSX4SM5Z-D54aOpMd.js} +1 -1
- package/dist/assets/{ko-KR-MTYHY66A-DP3yaFyg.js → ko-KR-MTYHY66A-Bnm0G6eo.js} +1 -1
- package/dist/assets/{ku-TR-6OUDTVRD-B2GUIkso.js → ku-TR-6OUDTVRD-CtGCn_eB.js} +1 -1
- package/dist/assets/{layout-D_xIMZTq.js → layout-BBV3_Svw.js} +1 -1
- package/dist/assets/{lt-LT-XHIRWOB4-CuDegLO4.js → lt-LT-XHIRWOB4-Bl8G0yv6.js} +1 -1
- package/dist/assets/{lv-LV-5QDEKY6T-DOjbM5AK.js → lv-LV-5QDEKY6T-Cax93Eua.js} +1 -1
- package/dist/assets/{mindmap-definition-YA3MSWOX-DL4r3hzu.js → mindmap-definition-YA3MSWOX-CsOezwmE.js} +1 -1
- package/dist/assets/{mr-IN-CRQNXWMA-C0vzd3Vl.js → mr-IN-CRQNXWMA-Br7GVyJH.js} +1 -1
- package/dist/assets/{my-MM-5M5IBNSE-Dirjg8Yf.js → my-MM-5M5IBNSE-xC6lzTDV.js} +1 -1
- package/dist/assets/{nb-NO-T6EIAALU-IpjtB42R.js → nb-NO-T6EIAALU-B0i5THqA.js} +1 -1
- package/dist/assets/{nl-NL-IS3SIHDZ-BiVBDlHI.js → nl-NL-IS3SIHDZ-CqYhUjP3.js} +1 -1
- package/dist/assets/{nn-NO-6E72VCQL-kbUyKFiJ.js → nn-NO-6E72VCQL-rpjr_9Z5.js} +1 -1
- package/dist/assets/{oc-FR-POXYY2M6-C-zRRb5B.js → oc-FR-POXYY2M6-BlhQ99Ty.js} +1 -1
- package/dist/assets/{pa-IN-N4M65BXN-Dhh3bH7-.js → pa-IN-N4M65BXN-N2XbQgZ_.js} +1 -1
- package/dist/assets/{pegDiagram-XKGWAZYB-CtbYRYVR.js → pegDiagram-XKGWAZYB-C2iSJgYQ.js} +1 -1
- package/dist/assets/{pica-HSHSc6s6.js → pica-DvYcrBvx.js} +1 -1
- package/dist/assets/{pieDiagram-E7YTZNPT-Cwv0hsvK.js → pieDiagram-E7YTZNPT-CUjgOGBw.js} +1 -1
- package/dist/assets/{pl-PL-T2D74RX3-CuDP0Pq6.js → pl-PL-T2D74RX3-CnMxn1dA.js} +1 -1
- package/dist/assets/{pt-BR-5N22H2LF-BlvJqOgZ.js → pt-BR-5N22H2LF-Di-jnHb3.js} +1 -1
- package/dist/assets/{pt-PT-UZXXM6DQ-C3RUoC5C.js → pt-PT-UZXXM6DQ-BaAKq8Sh.js} +1 -1
- package/dist/assets/{quadrantDiagram-AXDQQJYC-C_u4_Oxh.js → quadrantDiagram-AXDQQJYC-DwwqgJXZ.js} +1 -1
- package/dist/assets/{railroadDiagram-O6MQD6OU-FHKPLH9r.js → railroadDiagram-O6MQD6OU-DyRgYGPF.js} +1 -1
- package/dist/assets/{requirementDiagram-BXWQKSXE-B_8MbGxf.js → requirementDiagram-BXWQKSXE-C3ixXeHJ.js} +1 -1
- package/dist/assets/{ro-RO-JPDTUUEW-QUZCSbcA.js → ro-RO-JPDTUUEW-BWrclVyo.js} +1 -1
- package/dist/assets/{ru-RU-B4JR7IUQ-BCk_AmNC.js → ru-RU-B4JR7IUQ-_z0DINaG.js} +1 -1
- package/dist/assets/{sankeyDiagram-P5KCCOFB-DsfunxYA.js → sankeyDiagram-P5KCCOFB-mKpKYI_w.js} +1 -1
- package/dist/assets/{sequenceDiagram-WJ2MYXX4-cRf71lBb.js → sequenceDiagram-WJ2MYXX4-ZkNd0Wnj.js} +1 -1
- package/dist/assets/{si-LK-N5RQ5JYF-jo1qm6JU.js → si-LK-N5RQ5JYF-CdKOb383.js} +1 -1
- package/dist/assets/{sizeCapture-INFHLROL-COrYinZO.js → sizeCapture-INFHLROL-hQLGO-0z.js} +1 -1
- package/dist/assets/{sk-SK-C5VTKIMK-BnMkvGRK.js → sk-SK-C5VTKIMK-MHJC6ZIe.js} +1 -1
- package/dist/assets/{sl-SI-NN7IZMDC-DIkgazuw.js → sl-SI-NN7IZMDC-BF9YWbZx.js} +1 -1
- package/dist/assets/{stateDiagram-D77RDMKH-BvBlef2E.js → stateDiagram-D77RDMKH-CRWj3j-B.js} +1 -1
- package/dist/assets/stateDiagram-v2-MP3YSRHH-B2DcVJGG.js +1 -0
- package/dist/assets/{subset-shared.chunk-Cp0oS3tn.js → subset-shared.chunk-DtxXjVIA.js} +1 -1
- package/dist/assets/{subset-worker.chunk-BEbN9HM2.js → subset-worker.chunk-DONNSbUF.js} +1 -1
- package/dist/assets/{sv-SE-XGPEYMSR-CxQiCAkW.js → sv-SE-XGPEYMSR-DkaTkfUY.js} +1 -1
- package/dist/assets/{swimlanes-42K2YHIH-BjR8lfsn.js → swimlanes-42K2YHIH-CFf6j7jO.js} +1 -1
- package/dist/assets/swimlanesDiagram-VR7AAH4N-DO_W2uN2.js +8 -0
- package/dist/assets/{ta-IN-2NMHFXQM-e_HiIsgP.js → ta-IN-2NMHFXQM-BfxqXEDI.js} +1 -1
- package/dist/assets/{th-TH-HPSO5L25-DTp8x86q.js → th-TH-HPSO5L25-DT3vLA39.js} +1 -1
- package/dist/assets/{timeline-definition-24CTP7MA-B0uf0zYu.js → timeline-definition-24CTP7MA-BGP2Dq8M.js} +1 -1
- package/dist/assets/{tr-TR-DEFEU3FU-BfTQG1sR.js → tr-TR-DEFEU3FU-CdfsG7py.js} +1 -1
- package/dist/assets/{uk-UA-QMV73CPH-DMHmllj-.js → uk-UA-QMV73CPH-CZrQuC1S.js} +1 -1
- package/dist/assets/{vennDiagram-4TSXK5OY-AxXlA6VW.js → vennDiagram-4TSXK5OY-CaxGPIab.js} +1 -1
- package/dist/assets/{vi-VN-M7AON7JQ-BtoynmIl.js → vi-VN-M7AON7JQ-DQJk1_KV.js} +1 -1
- package/dist/assets/{wardleyDiagram-VM6X3IG4-BiKqKrb1.js → wardleyDiagram-VM6X3IG4-DQxQ-zXH.js} +1 -1
- package/dist/assets/{xychartDiagram-S5SC5T6Z-DKJ6ufCR.js → xychartDiagram-S5SC5T6Z-DoxdZQ6R.js} +1 -1
- package/dist/assets/{zh-CN-LNUGB5OW-BiSoyhtF.js → zh-CN-LNUGB5OW-DRVBfkOy.js} +1 -1
- package/dist/assets/{zh-HK-E62DVLB3-C6DC7GXY.js → zh-HK-E62DVLB3-BJHrltss.js} +1 -1
- package/dist/assets/{zh-TW-RAJ6MFWO-D1A1a-SQ.js → zh-TW-RAJ6MFWO-DpMZ5m2x.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/licenses/markdown-reading-notices.txt +76 -0
- package/docs/VIEWER-LAUNCH.md +5 -0
- package/docs/VIEWER.md +32 -16
- 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 +7 -2
- package/docs/decisions.md +3 -1
- package/licenses/markdown-reading-notices.txt +76 -0
- package/package.json +4 -2
- package/scripts/vite-browser-dependencies.mjs +2 -1
- package/src/contract/readingMarkdown.js +57 -13
- package/src/viewer/DiagramViewer.jsx +34 -33
- package/src/viewer/HighlightOverlay.jsx +93 -8
- package/src/viewer/Inspector.jsx +11 -4
- package/src/viewer/ProjectTabs.jsx +9 -6
- package/src/viewer/ProjectViewChainViewer.jsx +15 -9
- package/src/viewer/SketchCanvas.jsx +23 -16
- package/src/viewer/ViewChainViewer.jsx +48 -37
- package/src/viewer/chainEditorSession.js +1 -0
- package/src/viewer/details/MeaningFirst.jsx +2 -2
- package/src/viewer/details/ReadingMarkdown.jsx +43 -12
- package/src/viewer/details/RelationshipBody.jsx +2 -2
- package/src/viewer/details/details.css +6 -2
- package/src/viewer/highlight.js +26 -12
- package/src/viewer/inspectorPosition.js +45 -16
- package/src/viewer/projectTasks.css +1 -2
- package/src/viewer/sceneState.js +0 -4
- package/src/viewer/useInspectorPosition.js +42 -36
- package/src/viewer/viewChain.css +15 -20
- 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
|
@@ -237,54 +237,65 @@ export function InstalledViewChain({ installation, busy, fileError, rebuildAvail
|
|
|
237
237
|
|
|
238
238
|
const workspace = project?.route && project.catalog.workspace;
|
|
239
239
|
const binding = installation.binding;
|
|
240
|
+
const compactHeader = project?.compactHeader;
|
|
241
|
+
const showLocation = Boolean(binding || project?.libraryActions || compactHeader);
|
|
240
242
|
const fileStatus = saveStatus || (binding?.writable ? 'Файл результата' : 'Только чтение');
|
|
241
243
|
const returnLabel = returnTarget && `Return to ${returnTitle}`;
|
|
242
244
|
const sourceBack = returnTarget && <button type="button" className="lm-return-source lm-icon-button" title={returnLabel} aria-label={returnLabel}
|
|
243
245
|
onClick={() => project.navigate(returnTarget.route)}><ControlIcon name="back" /></button>;
|
|
244
246
|
const downloadLabel = 'Download a copy';
|
|
245
247
|
|
|
248
|
+
const documentControls = <>
|
|
249
|
+
<nav className="lm-chain-breadcrumb" aria-label={savedDocument ? 'Document title' : 'View breadcrumb'}>
|
|
250
|
+
{savedDocument ? <span aria-current="page" title={documentTitle}>{documentTitle}</span> : viewTrail}
|
|
251
|
+
</nav>
|
|
252
|
+
<div className="lm-shell-controls" id={toolbarId} ref={setToolbarTarget} />
|
|
253
|
+
<div className="lm-chain-actions" role="group" aria-label="Chain file actions">
|
|
254
|
+
{(previous || project?.canBack) && <button className="lm-chain-back lm-icon-button" type="button" title={previous ? `Back to ${previous.title}` : 'Back to previous diagram'} aria-label="Back to previous diagram" onClick={back}><ControlIcon name="back" /></button>}
|
|
255
|
+
<button className="lm-icon-button" type="button" disabled={busy} aria-label="Open chain file" title="Open chain file" onClick={onOpen}><ControlIcon name="open" /></button>
|
|
256
|
+
<button className="lm-icon-button" type="button" disabled={saving || (!stage && busy) || writeBlocked || (binding && !binding.writable)} aria-label={binding ? 'Save chain file' : downloadLabel}
|
|
257
|
+
title={binding ? (binding.writable ? 'Save chain file' : binding.readOnlyReason || 'Read-only file') : downloadLabel} onClick={save}><ControlIcon name={binding ? 'save' : 'download'} /></button>
|
|
258
|
+
{binding && <button className="lm-icon-button" type="button" disabled={saving || (!stage && busy)} title={downloadLabel} aria-label={downloadLabel} onClick={() => save({ copy: true })}><ControlIcon name="download" /></button>}
|
|
259
|
+
<SavedDiagramLink key={viewId} group={toolbarId} address={typeof window !== 'undefined' && savedDiagramAddress(window.location, binding, project, viewId)} dirty={dirty}
|
|
260
|
+
status={binding && fileStatus} readOnlyReason={!binding?.writable && binding?.readOnlyReason} />
|
|
261
|
+
</div>
|
|
262
|
+
</>;
|
|
263
|
+
|
|
264
|
+
const documentNotices = <>
|
|
265
|
+
{(saveStatus || binding?.readOnlyReason || writeBlocked) && binding && <div className="lm-save-status" role="status">{saveStatus || binding.readOnlyReason}
|
|
266
|
+
{project?.route && writeBlocked && <button type="button" onClick={() => project.navigate(project.route)}>Reopen file</button>}
|
|
267
|
+
</div>}
|
|
268
|
+
<div className="lm-scene-warning-target" ref={setStatusTarget} />
|
|
269
|
+
<RegenerationComparison comparison={comparison} dirty={dirty} candidatePath={installation.binding?.path} />
|
|
270
|
+
<FileMessage error={fileError} rebuildAvailable={rebuildAvailable} busy={busy} onRebuild={onRebuild} onDismiss={onDismissError} />
|
|
271
|
+
{layoutDiagnostics.length > 0 && <details className="lm-layout-warnings" role="status">
|
|
272
|
+
<summary>Layout warnings ({layoutDiagnostics.length})</summary>
|
|
273
|
+
<ul>{layoutDiagnostics.map((item, index) => <li key={`${item.code}:${item.path}:${index}`}>
|
|
274
|
+
<strong>{item.code}</strong>: {item.message} <code>{item.path}</code>
|
|
275
|
+
{item.baselineDiagnostics?.length > 0 && <ul>{item.baselineDiagnostics.map((cause, causeIndex) =>
|
|
276
|
+
<li key={causeIndex}>{cause.code}: {cause.message} <code>{cause.path}</code></li>)}</ul>}
|
|
277
|
+
</li>)}</ul>
|
|
278
|
+
</details>}
|
|
279
|
+
</>;
|
|
280
|
+
|
|
246
281
|
return <article className="lm-view-chain" data-view-id={viewId} data-map-id={project?.route?.map}>
|
|
247
282
|
<header className="lm-chain-header">
|
|
248
|
-
{
|
|
249
|
-
|
|
250
|
-
{savedDocument ? <span aria-current="page" title={documentTitle}>{documentTitle}</span> : viewTrail}
|
|
251
|
-
</nav>
|
|
252
|
-
<div className="lm-shell-controls" id={toolbarId} ref={setToolbarTarget} />
|
|
253
|
-
<div className="lm-chain-actions" role="group" aria-label="Chain file actions">
|
|
254
|
-
{(previous || project?.canBack) && <button className="lm-chain-back lm-icon-button" type="button" title={previous ? `Back to ${previous.title}` : 'Back to previous diagram'} aria-label="Back to previous diagram" onClick={back}><ControlIcon name="back" /></button>}
|
|
255
|
-
<button className="lm-icon-button" type="button" disabled={busy} aria-label="Open chain file" title="Open chain file" onClick={onOpen}><ControlIcon name="open" /></button>
|
|
256
|
-
<button className="lm-icon-button" type="button" disabled={saving || (!stage && busy) || writeBlocked || (binding && !binding.writable)} aria-label={binding ? 'Save chain file' : downloadLabel}
|
|
257
|
-
title={binding ? (binding.writable ? 'Save chain file' : binding.readOnlyReason || 'Read-only file') : downloadLabel} onClick={save}><ControlIcon name={binding ? 'save' : 'download'} /></button>
|
|
258
|
-
{binding && <button className="lm-icon-button" type="button" disabled={saving || (!stage && busy)} title={downloadLabel} aria-label={downloadLabel} onClick={() => save({ copy: true })}><ControlIcon name="download" /></button>}
|
|
259
|
-
<SavedDiagramLink key={viewId} group={toolbarId} address={typeof window !== 'undefined' && savedDiagramAddress(window.location, binding, project, viewId)} dirty={dirty}
|
|
260
|
-
status={binding && fileStatus} readOnlyReason={!binding?.writable && binding?.readOnlyReason} />
|
|
261
|
-
</div>
|
|
283
|
+
{project?.projectTabs ?? <div className="lm-chain-brand">Locus Map</div>}
|
|
284
|
+
{!compactHeader && documentControls}
|
|
262
285
|
</header>
|
|
263
|
-
{
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
<FileMessage error={fileError} rebuildAvailable={rebuildAvailable} busy={busy} onRebuild={onRebuild} onDismiss={onDismissError} />
|
|
269
|
-
{layoutDiagnostics.length > 0 && <details className="lm-layout-warnings" role="status">
|
|
270
|
-
<summary>Layout warnings ({layoutDiagnostics.length})</summary>
|
|
271
|
-
<ul>{layoutDiagnostics.map((item, index) => <li key={`${item.code}:${item.path}:${index}`}>
|
|
272
|
-
<strong>{item.code}</strong>: {item.message} <code>{item.path}</code>
|
|
273
|
-
{item.baselineDiagnostics?.length > 0 && <ul>{item.baselineDiagnostics.map((cause, causeIndex) =>
|
|
274
|
-
<li key={causeIndex}>{cause.code}: {cause.message} <code>{cause.path}</code></li>)}</ul>}
|
|
275
|
-
</li>)}</ul>
|
|
276
|
-
</details>}
|
|
277
|
-
{!binding && (project?.navigationBelowHeader || project?.libraryActions) && <div className="lm-document-location">
|
|
278
|
-
{project.navigationBelowHeader && project.projectTabs}{project.libraryActions}
|
|
279
|
-
</div>}
|
|
280
|
-
<div className={binding ? 'lm-chain-current lm-current-with-location' : 'lm-chain-current'}>
|
|
281
|
-
{binding && <div className="lm-document-location">
|
|
282
|
-
{project?.navigationBelowHeader && project.projectTabs}{sourceBack}
|
|
283
|
-
{workspace ? <ProjectLocation workspace={workspace} folder={folder} documentPath={binding.documentPath}
|
|
286
|
+
{!showLocation && documentNotices}
|
|
287
|
+
<div className={showLocation ? 'lm-chain-current lm-current-with-location' : 'lm-chain-current'}>
|
|
288
|
+
{showLocation && <div className="lm-document-location">
|
|
289
|
+
{binding && sourceBack}
|
|
290
|
+
{binding && (workspace ? <ProjectLocation workspace={workspace} folder={folder} documentPath={binding.documentPath}
|
|
284
291
|
onOpenProject={project.openProjectInZed} onOpenDocument={project.openMapInZed} />
|
|
285
|
-
: <span title={binding.path}>{folder || binding.path}</span>}{project?.libraryActions}
|
|
292
|
+
: <span title={binding.path}>{folder || binding.path}</span>)}{project?.libraryActions}
|
|
286
293
|
</div>}
|
|
287
294
|
<RailToggle open={railOpen} controls={navigationId} onClick={(project?.route && project.toggleRail) || (() => setLocalRailOpen(value => !value))} />
|
|
295
|
+
{showLocation && <div className="lm-document-chrome">
|
|
296
|
+
{compactHeader && <div className="lm-chain-header lm-document-controls">{documentControls}</div>}
|
|
297
|
+
{documentNotices}
|
|
298
|
+
</div>}
|
|
288
299
|
{railOpen && (project?.route ? <ProjectRail id={navigationId} catalog={project.catalog} route={project.route} active={stage?.active} onNavigate={project.navigate} {...project.libraryRail} />
|
|
289
300
|
: <aside id={navigationId} className="lm-chain-navigation" aria-label="Diagram navigation">
|
|
290
301
|
<div className="lm-rail-heading"><h2>Diagrams</h2><span>{navigation.length} {navigation.length === 1 ? 'diagram' : 'diagrams'}</span></div>
|
|
@@ -305,7 +316,7 @@ export function InstalledViewChain({ installation, busy, fileError, rebuildAvail
|
|
|
305
316
|
{!view.page && <div className="lm-chain-heading"><h1>{view.title}</h1>{view.question && <p>{view.question}</p>}</div>}
|
|
306
317
|
<section className="lm-chain-canvas" aria-label={`${view.title} diagram`}>
|
|
307
318
|
<DiagramViewer editSource={editSource} originalBinding={installation.binding} sourceDescription={installation.model.description} model={installation.projected.get(viewId)} scene={scene} readingTree={view.readingTree} initialCamera={initialCamera}
|
|
308
|
-
toolbarTarget={toolbarTarget} statusTarget={statusTarget} inspectActionTarget={inspectActionTarget} assetUrls={installation.assetUrls} detailTargets={detailTargets} onOpenDetails={project?.route ? project.openDetail : navigate}
|
|
319
|
+
toolbarTarget={toolbarTarget} statusTarget={statusTarget} inspectActionTarget={inspectActionTarget} assetUrls={installation.assetUrls} detailTargets={detailTargets} inspectorPositions={session.inspectorPositions} onOpenDetails={project?.route ? project.openDetail : navigate}
|
|
309
320
|
inspectScene={inspectInstalledScene} resolveSelection={resolveInstalledSelection} restoreDraft={stage?.restoreDraft ?? scene !== installation.scenes.get(viewId)}
|
|
310
321
|
onReady={value => {
|
|
311
322
|
api.current = value;
|
|
@@ -33,6 +33,7 @@ export function createChainEditorSession(installation) {
|
|
|
33
33
|
};
|
|
34
34
|
const session = {
|
|
35
35
|
scenes,
|
|
36
|
+
inspectorPositions: new Map(),
|
|
36
37
|
subscribe(listener) { listeners.add(listener); return () => listeners.delete(listener); },
|
|
37
38
|
snapshot: () => status,
|
|
38
39
|
get version() { return editVersion; },
|
|
@@ -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);
|
|
@@ -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,5 +1,7 @@
|
|
|
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, 640px), calc(100% - 24px)); min-width: min(280px, calc(100% - 24px)); height: min(var(--lm-inspector-height, 500px), calc(100% - 24px)); min-height: min(180px, calc(100% - 24px)); max-width: calc(100% - 24px); max-height: 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: 8px; box-shadow: 0 3px 18px rgb(0 0 0 / 12%); }
|
|
4
|
+
.lm-inspector { position: absolute; z-index: 4; top: 16px; left: 50%; transform: translateX(-50%); width: min(var(--lm-inspector-width, 640px), calc(100% - 24px)); min-width: min(280px, var(--lm-inspector-max-width, 100%), calc(100% - 24px)); height: min(var(--lm-inspector-height, 500px), calc(100% - 24px)); min-height: min(180px, 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: 8px; 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. */
|
|
@@ -84,7 +86,7 @@
|
|
|
84
86
|
|
|
85
87
|
.lm-body li + li { margin-top: 7px; }
|
|
86
88
|
.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 {
|
|
89
|
+
@container (max-width: 600px) { .lm-inspector { padding: 12px; top: 12px; resize: none; min-width: 0; } .lm-inspector-top { top: -12px; margin: -12px -12px 0; padding: 8px 12px; cursor: grab; } .lm-metadata, .lm-endpoints > div { grid-template-columns: minmax(0, 1fr); gap: 6px 9px; } }
|
|
88
90
|
|
|
89
91
|
.lm-inspector .lm-proposal-source { padding: 0; border: 0; background: transparent; color: var(--lm-accent); font: inherit; text-decoration: underline; }
|
|
90
92
|
.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; }
|
|
@@ -126,6 +128,8 @@
|
|
|
126
128
|
.lm-commonmark-body blockquote { margin: 12px 0; padding-left: 12px; border-left: 3px solid var(--lm-border); }
|
|
127
129
|
.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
130
|
.lm-commonmark-body pre:focus-visible { outline: 2px solid var(--lm-accent); outline-offset: -2px; }
|
|
131
|
+
.lm-commonmark-body .lm-math-block { overflow-x: auto; }
|
|
132
|
+
.lm-math-block > .katex-display { min-width: 100%; width: max-content; }
|
|
129
133
|
.lm-commonmark-body img { max-width: 100%; height: auto; }
|
|
130
134
|
.lm-explanation-code { margin: 10px 0 14px; border: 1px solid var(--lm-border); border-radius: 9px; background: #f7f7f9; overflow: hidden; }
|
|
131
135
|
.lm-explanation-code pre { margin: 0; padding: 12px; overflow: auto; white-space: pre; font: 12px/1.7 monospace; tab-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,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const INSET = 12;
|
|
2
2
|
|
|
3
3
|
/** Coordinates are local to the viewer stage, never part of a saved scene. */
|
|
4
|
-
export function clampInspectorPosition(position, card, stage) {
|
|
4
|
+
export function clampInspectorPosition(position, card, stage, padding = INSET) {
|
|
5
5
|
const clampAxis = (value, size, available) => {
|
|
6
6
|
const space = Math.max(0, available - size);
|
|
7
|
-
const inset = Math.min(
|
|
7
|
+
const inset = Math.min(padding, space / 2);
|
|
8
8
|
return Math.min(Math.max(value, inset), space - inset);
|
|
9
9
|
};
|
|
10
10
|
return {
|
|
@@ -32,19 +32,48 @@ export function inspectorKeyOffset(key, largeStep = false) {
|
|
|
32
32
|
ArrowUp: { x: 0, y: -step }, ArrowDown: { x: 0, y: step } }[key] || null;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
export function placeInspectorBeside(anchor, card, stage) {
|
|
36
|
-
if (
|
|
37
|
-
if (!anchor) return clampInspectorPosition({ x: stage.width - card.width - 12, y: 16 }, card, stage);
|
|
35
|
+
export function placeInspectorBeside(anchor, card, stage, obstacles = []) {
|
|
36
|
+
if (!anchor) return clampInspectorPosition({ x: stage.width - card.width - INSET, y: 16 }, card, stage);
|
|
38
37
|
const gap = 16;
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
{ x:
|
|
43
|
-
{ x:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
38
|
+
const right = anchor.x + anchor.width + gap, below = anchor.y + anchor.height + gap;
|
|
39
|
+
const left = anchor.x - gap, above = anchor.y - gap;
|
|
40
|
+
const positions = [
|
|
41
|
+
{ x: right, y: anchor.y }, { x: anchor.x, y: below },
|
|
42
|
+
{ x: left - card.width, y: anchor.y }, { x: anchor.x, y: above - card.height },
|
|
43
|
+
];
|
|
44
|
+
const overlap = (p, target) => Math.max(0, Math.min(p.x + p.width, target.x + target.width) - Math.max(p.x, target.x))
|
|
45
|
+
* Math.max(0, Math.min(p.y + p.height, target.y + target.height) - Math.max(p.y, target.y));
|
|
46
|
+
const candidate = (point, size = card, inset = INSET) => ({ ...clampInspectorPosition(point, size, stage, inset), ...size });
|
|
47
|
+
const beside = positions.map(point => candidate(point));
|
|
48
|
+
// Shrink on the constrained axis before falling back to a position over the card.
|
|
49
|
+
const fitted = (spacing, inset, minWidth = 280, minHeight = 180) => {
|
|
50
|
+
const r = anchor.x + anchor.width + spacing, b = anchor.y + anchor.height + spacing;
|
|
51
|
+
const l = anchor.x - spacing, a = anchor.y - spacing;
|
|
52
|
+
const rightWidth = Math.min(card.width, stage.width - r - inset);
|
|
53
|
+
const belowHeight = Math.min(card.height, stage.height - b - inset);
|
|
54
|
+
const leftWidth = Math.min(card.width, l - inset);
|
|
55
|
+
const aboveHeight = Math.min(card.height, a - inset);
|
|
56
|
+
return [
|
|
57
|
+
{ x: r, y: anchor.y, width: rightWidth, height: card.height },
|
|
58
|
+
{ x: anchor.x, y: b, width: card.width, height: belowHeight },
|
|
59
|
+
{ x: l - leftWidth, y: anchor.y, width: leftWidth, height: card.height },
|
|
60
|
+
{ x: anchor.x, y: a - aboveHeight, width: card.width, height: aboveHeight },
|
|
61
|
+
].filter(({ width, height }) => width >= Math.min(minWidth, card.width) && height >= Math.min(minHeight, card.height))
|
|
62
|
+
.map(({ x, y, width, height }) => candidate({ x, y }, { width, height }, inset));
|
|
63
|
+
};
|
|
64
|
+
const corners = [
|
|
65
|
+
{ x: 0, y: 0 }, { x: stage.width, y: 0 },
|
|
66
|
+
{ x: 0, y: stage.height }, { x: stage.width, y: stage.height },
|
|
67
|
+
].map(point => candidate(point));
|
|
68
|
+
const rank = points => points.map(point => ({
|
|
69
|
+
point, coveredAnchor: overlap(point, anchor), lostArea: card.width * card.height - point.width * point.height,
|
|
70
|
+
coveredOthers: obstacles.reduce((area, obstacle) => area + overlap(point, obstacle), 0),
|
|
71
|
+
})).reduce((best, next) =>
|
|
72
|
+
(next.coveredAnchor - best.coveredAnchor || next.coveredOthers - best.coveredOthers || next.lostArea - best.lostArea) < 0
|
|
73
|
+
? next : best);
|
|
74
|
+
let chosen = rank([...beside, ...fitted(gap, INSET), ...corners]);
|
|
75
|
+
if (chosen.coveredAnchor) chosen = rank([...fitted(3, 0, 260, 144), chosen.point]);
|
|
76
|
+
if (chosen.coveredAnchor) chosen = rank([...fitted(0, 0, 260, 144), chosen.point]);
|
|
77
|
+
const { x, y, width, height } = chosen.point;
|
|
78
|
+
return { x, y, ...(width < card.width && { maxWidth: width }), ...(height < card.height && { maxHeight: height }) };
|
|
50
79
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.lm-project-sections { display: flex; flex: none; gap: 1px; padding: 1px; border: 1px solid var(--lm-border); border-radius: 8px; }
|
|
2
2
|
.lm-project-sections button { padding: 2px 8px; font: inherit; }
|
|
3
|
-
.lm-view-chain:has(.lm-project-sections) .lm-project-
|
|
4
|
-
.lm-document-location .lm-project-sections button, .lm-document-location .lm-project-strip button { background: transparent; border: 0; border-radius: 6px; color: var(--lm-text); cursor: pointer; }
|
|
3
|
+
.lm-view-chain:has(.lm-project-sections) .lm-project-strip button { min-height: 30px; }
|
|
5
4
|
.lm-project-sections button[aria-pressed="true"], .lm-task-rail [aria-pressed="true"] { background: var(--lm-accent-soft); color: var(--lm-accent); font-weight: 650; }
|
|
6
5
|
.lm-task-source, .lm-task-rail-heading { display: flex; align-items: center; gap: 12px; }
|
|
7
6
|
.lm-task-source { padding: 6px 16px; border-bottom: 1px solid var(--lm-border); font-size: 12px; }
|
package/src/viewer/sceneState.js
CHANGED
|
@@ -15,10 +15,6 @@ export function sameInstallation(installed, model, scene) {
|
|
|
15
15
|
return Boolean(installed && installed.model === model && installed.scene === scene);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export function selectionKey(selectedIds = {}) {
|
|
19
|
-
return Object.keys(selectedIds).filter(id => selectedIds[id]).sort().join('\n');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
18
|
// Native Undo retains deleted copies for Redo. They were never part of the
|
|
23
19
|
// opened document. Deletions of its actual elements still go through admission.
|
|
24
20
|
export function documentDraftElements(elements, openedIds) {
|
|
@@ -9,62 +9,61 @@ function measure(card) {
|
|
|
9
9
|
return { box, stage, clipped, x: box.left - stage.left, y: box.top - stage.top };
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export function useInspectorPosition(
|
|
13
|
-
const
|
|
12
|
+
export function useInspectorPosition(cardRef, getPlacement, placementKey, positions, preferredSize) {
|
|
13
|
+
const headerRef = useRef(null), returnRef = useRef(null), dragRef = useRef(null);
|
|
14
14
|
const manuallyMoved = useRef(false), focusAfterReturn = useRef(false);
|
|
15
|
+
const placementRef = useRef(getPlacement);
|
|
16
|
+
placementRef.current = getPlacement;
|
|
15
17
|
const [position, setPosition] = useState(null), [dragging, setDragging] = useState(false);
|
|
16
18
|
const [exposure, setExposure] = useState('inside');
|
|
17
19
|
const parked = position?.parkedFor === placementKey;
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const placeBeside = useCallback(saved => {
|
|
22
|
+
const stage = cardRef.current.parentElement.getBoundingClientRect();
|
|
23
|
+
const size = {
|
|
24
|
+
width: Math.max(0, Math.min(preferredSize.width, stage.width - 24, saved?.maxWidth ?? Infinity)),
|
|
25
|
+
height: Math.max(0, Math.min(preferredSize.height, stage.height - 24, saved?.maxHeight ?? Infinity)),
|
|
26
|
+
};
|
|
27
|
+
manuallyMoved.current = Boolean(saved);
|
|
28
|
+
if (saved) {
|
|
29
|
+
setPosition({ ...saved, ...clampInspectorPosition(saved, size, stage, 0), key: placementKey });
|
|
30
|
+
} else {
|
|
31
|
+
const { anchor, obstacles } = placementRef.current?.() ?? {};
|
|
32
|
+
setPosition({ ...placeInspectorBeside(anchor, size, stage, obstacles), key: placementKey });
|
|
33
|
+
}
|
|
34
|
+
}, [cardRef, placementKey, preferredSize.width, preferredSize.height]);
|
|
26
35
|
|
|
27
36
|
useBrowserLayoutEffect(() => {
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
if (position?.parkedFor || (manuallyMoved.current && wasClipped)) {
|
|
31
|
-
placeBeside();
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (manuallyMoved.current || (position && keepPosition)) return;
|
|
35
|
-
const anchor = getAnchor?.();
|
|
36
|
-
const overlaps = position && anchor && position.x < anchor.x + anchor.width && position.x + box.width > anchor.x
|
|
37
|
-
&& position.y < anchor.y + anchor.height && position.y + box.height > anchor.y;
|
|
38
|
-
if (!position || overlaps) setPosition(placeInspectorBeside(anchor, box, stage));
|
|
39
|
-
}, [placementKey]);
|
|
37
|
+
if (cardRef.current) placeBeside(positions?.get(placementKey));
|
|
38
|
+
}, [cardRef, placementKey, placeBeside, positions]);
|
|
40
39
|
|
|
41
40
|
const syncBounds = useCallback(() => {
|
|
42
41
|
const card = cardRef.current;
|
|
43
42
|
if (!card) return;
|
|
44
|
-
const { box, stage, clipped
|
|
43
|
+
const { box, stage, clipped } = measure(card);
|
|
45
44
|
const header = headerRef.current.getBoundingClientRect();
|
|
46
45
|
const outside = rect => rect.right <= stage.left || rect.left >= stage.right || rect.bottom <= stage.top || rect.top >= stage.bottom;
|
|
47
46
|
let visible = 'inside';
|
|
48
47
|
if (clipped) visible = outside(box) ? 'outside' : outside(header) ? 'body-only' : 'partial';
|
|
49
48
|
setExposure(visible);
|
|
50
|
-
|
|
51
|
-
const next = clampInspectorPosition({ x, y }, box, stage);
|
|
52
|
-
if (Math.abs(next.x - x) > 0.02 || Math.abs(next.y - y) > 0.02) setPosition(next);
|
|
53
|
-
}, []);
|
|
49
|
+
}, [cardRef]);
|
|
54
50
|
|
|
55
51
|
useBrowserLayoutEffect(() => { syncBounds(); }, [position, syncBounds]);
|
|
56
52
|
useBrowserLayoutEffect(() => {
|
|
57
53
|
const card = cardRef.current;
|
|
58
54
|
if (!card) return;
|
|
59
|
-
const observer = new ResizeObserver(
|
|
55
|
+
const observer = new ResizeObserver(entries => {
|
|
56
|
+
if (!manuallyMoved.current && entries.some(entry => entry.target === card.parentElement)) placeBeside();
|
|
57
|
+
syncBounds();
|
|
58
|
+
});
|
|
60
59
|
observer.observe(card.parentElement); observer.observe(card);
|
|
61
60
|
return () => observer.disconnect();
|
|
62
|
-
}, [syncBounds]);
|
|
61
|
+
}, [cardRef, placeBeside, syncBounds]);
|
|
63
62
|
|
|
64
63
|
useBrowserLayoutEffect(() => {
|
|
65
64
|
const card = cardRef.current;
|
|
66
65
|
if (!card) return;
|
|
67
|
-
const settled = manuallyMoved.current && !dragging;
|
|
66
|
+
const settled = manuallyMoved.current && !dragging && position?.key === placementKey;
|
|
68
67
|
const cardUnavailable = parked || (settled && exposure === 'outside');
|
|
69
68
|
const headerUnavailable = settled && exposure === 'body-only';
|
|
70
69
|
const unavailable = cardUnavailable ? card : headerUnavailable ? headerRef.current : null;
|
|
@@ -78,11 +77,12 @@ export function useInspectorPosition(getAnchor, placementKey, keepPosition) {
|
|
|
78
77
|
focusAfterReturn.current = false;
|
|
79
78
|
headerRef.current.focus({ preventScroll: true });
|
|
80
79
|
}
|
|
81
|
-
}, [dragging, exposure, parked, position, placementKey]);
|
|
80
|
+
}, [cardRef, dragging, exposure, parked, position, placementKey]);
|
|
82
81
|
|
|
83
82
|
function recover() {
|
|
84
83
|
stopDrag();
|
|
85
84
|
focusAfterReturn.current = true;
|
|
85
|
+
positions?.delete(placementKey);
|
|
86
86
|
placeBeside();
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -92,6 +92,12 @@ export function useInspectorPosition(getAnchor, placementKey, keepPosition) {
|
|
|
92
92
|
setDragging(false);
|
|
93
93
|
if (drag?.handle.hasPointerCapture(drag.pointerId)) drag.handle.releasePointerCapture(drag.pointerId);
|
|
94
94
|
}, []);
|
|
95
|
+
const moveTo = useCallback((x, y, parked, limits) => {
|
|
96
|
+
const { maxWidth, maxHeight } = limits ?? {};
|
|
97
|
+
const moved = { x, y, maxWidth, maxHeight };
|
|
98
|
+
if (!parked) positions?.set(placementKey, moved);
|
|
99
|
+
setPosition({ ...moved, key: placementKey, parkedFor: parked ? placementKey : undefined });
|
|
100
|
+
}, [positions, placementKey]);
|
|
95
101
|
const finishDrag = useCallback(event => {
|
|
96
102
|
const drag = dragRef.current;
|
|
97
103
|
if (!drag || event.pointerId !== drag.pointerId) return;
|
|
@@ -99,16 +105,16 @@ export function useInspectorPosition(getAnchor, placementKey, keepPosition) {
|
|
|
99
105
|
const { box, stage } = measure(cardRef.current);
|
|
100
106
|
manuallyMoved.current = true;
|
|
101
107
|
const { x, y, parked } = releasedInspectorPosition(drag, event, box, stage);
|
|
102
|
-
|
|
108
|
+
moveTo(x, y, parked, drag.position);
|
|
103
109
|
}
|
|
104
110
|
stopDrag();
|
|
105
|
-
}, [
|
|
111
|
+
}, [cardRef, moveTo, stopDrag]);
|
|
106
112
|
useEffect(() => {
|
|
107
113
|
const move = event => {
|
|
108
114
|
const drag = dragRef.current;
|
|
109
115
|
if (!drag || event.pointerId !== drag.pointerId) return;
|
|
110
116
|
manuallyMoved.current = true;
|
|
111
|
-
setPosition({ x: drag.x + event.clientX - drag.clientX, y: drag.y + event.clientY - drag.clientY });
|
|
117
|
+
setPosition({ ...drag.position, x: drag.x + event.clientX - drag.clientX, y: drag.y + event.clientY - drag.clientY });
|
|
112
118
|
};
|
|
113
119
|
window.addEventListener('pointermove', move);
|
|
114
120
|
window.addEventListener('pointerup', finishDrag); window.addEventListener('pointercancel', finishDrag);
|
|
@@ -127,7 +133,7 @@ export function useInspectorPosition(getAnchor, placementKey, keepPosition) {
|
|
|
127
133
|
const { x, y } = measure(cardRef.current), handle = event.currentTarget;
|
|
128
134
|
event.preventDefault();
|
|
129
135
|
handle.focus({ preventScroll: true });
|
|
130
|
-
dragRef.current = { x, y, clientX: event.clientX, clientY: event.clientY, pointerId: event.pointerId, handle };
|
|
136
|
+
dragRef.current = { x, y, clientX: event.clientX, clientY: event.clientY, pointerId: event.pointerId, handle, position };
|
|
131
137
|
try { handle.setPointerCapture(event.pointerId); } catch { /* Window listeners remain available without capture. */ }
|
|
132
138
|
setDragging(true);
|
|
133
139
|
}
|
|
@@ -142,8 +148,8 @@ export function useInspectorPosition(getAnchor, placementKey, keepPosition) {
|
|
|
142
148
|
const { x, y, box, stage } = measure(cardRef.current);
|
|
143
149
|
const next = { x: x + offset.x, y: y + offset.y };
|
|
144
150
|
const outside = next.x >= stage.width || next.x + box.width <= 0 || next.y >= stage.height || next.y + box.height <= 0;
|
|
145
|
-
|
|
151
|
+
moveTo(next.x, next.y, outside, position);
|
|
146
152
|
}
|
|
147
|
-
return {
|
|
153
|
+
return { headerRef, returnRef, position, dragging, parked, showReturn: parked || exposure !== 'inside',
|
|
148
154
|
startDrag, finishDrag, moveByKeyboard, recover };
|
|
149
155
|
}
|