@diagrammo/dgmo 0.96.0 → 0.97.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/dist/advanced.d.ts +172 -8
- package/dist/advanced.js +225 -243
- package/dist/block.d.ts +8 -0
- package/dist/block.js +138 -66
- package/dist/{calculator-GIB7POFX.js → calculator-CIGGTURF.js} +2 -2
- package/dist/{chart-meta-uImk4eTn.d.ts → chart-meta-B7niEd52.d.ts} +3 -1
- package/dist/chart-meta.d.ts +2 -2
- package/dist/chart-meta.js +19 -19
- package/dist/{chart-types-CBVYiLqy.d.ts → chart-types-Dxtv4XSz.d.ts} +3 -0
- package/dist/{charts-d3-IRP5VANE.js → charts-d3-INWEGMSD.js} +14 -14
- package/dist/{chunk-MVUNMJKO.js → chunk-2FMOLWX4.js} +71 -57
- package/dist/{chunk-2BYFNZVM.js → chunk-2SZILMQT.js} +57 -15
- package/dist/{chunk-VLI6AWS3.js → chunk-3C4OXVZJ.js} +2 -2
- package/dist/{chunk-OO4GUE4E.js → chunk-3HL6NSSQ.js} +63 -18
- package/dist/{chunk-RGFVHYDP.js → chunk-3IUMSK72.js} +2 -2
- package/dist/{chunk-LRHPBWOY.js → chunk-44RLIAYC.js} +17 -10
- package/dist/{chunk-H7AXCRO7.js → chunk-453IWXZ3.js} +0 -11
- package/dist/{chunk-FHX373L5.js → chunk-47INRTZ6.js} +2 -2
- package/dist/{chunk-IN7XI6NO.js → chunk-4NMRS6HW.js} +1 -1
- package/dist/{chunk-HH3DHNQA.js → chunk-4TK26YHH.js} +2 -2
- package/dist/{chunk-5LG526X7.js → chunk-5TGZBHEJ.js} +1 -1
- package/dist/{chunk-BD4O4D2A.js → chunk-5WZYJC2P.js} +2 -2
- package/dist/{chunk-DPNSDCR3.js → chunk-65JFUANT.js} +1 -1
- package/dist/{chunk-EZ6BI5LL.js → chunk-6OUMYNAJ.js} +1 -1
- package/dist/{chunk-U6N547QA.js → chunk-6PUBFB6D.js} +24 -3
- package/dist/{chunk-5GU6C5WB.js → chunk-6S2H6EKN.js} +3 -3
- package/dist/{chunk-OYGJZA24.js → chunk-6SDEXSJY.js} +39 -19
- package/dist/{chunk-IKXQ6NVR.js → chunk-6YBZFOTA.js} +13 -13
- package/dist/{chunk-4B45SNZH.js → chunk-74XR7Z3I.js} +13 -13
- package/dist/{chunk-VNAPEZX2.js → chunk-7ASVGFW3.js} +1 -1
- package/dist/{chunk-RTRORHSP.js → chunk-7QKWU7FX.js} +3 -3
- package/dist/{chunk-A6YINTY6.js → chunk-7RACGVUY.js} +1 -1
- package/dist/{chunk-5G4DOOX2.js → chunk-7TEAFIEJ.js} +9 -5
- package/dist/{chunk-UNCCZ3NU.js → chunk-A3V72YIL.js} +14 -1
- package/dist/{chunk-VJ7NLYFE.js → chunk-A5LFM62B.js} +3 -3
- package/dist/{chunk-P3PSLC2K.js → chunk-AULFF7L2.js} +2 -2
- package/dist/{chunk-SCYVGPLI.js → chunk-B7ZH5EQ2.js} +2 -2
- package/dist/{chunk-VGAMBOOC.js → chunk-C6ME2L4T.js} +2 -2
- package/dist/{chunk-B2YVZ3QU.js → chunk-CGP7RGLJ.js} +1 -1
- package/dist/{chunk-67N26CER.js → chunk-CLW45YKE.js} +2 -1
- package/dist/{chunk-THTYCJGF.js → chunk-CUOMNKYW.js} +4 -4
- package/dist/{chunk-34JOHSVE.js → chunk-CUTEHGXO.js} +2 -2
- package/dist/{chunk-NERQSSYD.js → chunk-D67YE4LR.js} +1 -1
- package/dist/{chunk-DKCVAQU3.js → chunk-D7KZE2XJ.js} +39 -17
- package/dist/{chunk-PGD6CNWO.js → chunk-DFEVFLEG.js} +3 -3
- package/dist/{chunk-VVTCUIPN.js → chunk-DKMZ4VMV.js} +1 -1
- package/dist/{chunk-H7JVKUA5.js → chunk-DRY4W4W6.js} +36 -15
- package/dist/{chunk-IQZSKWE5.js → chunk-E6GHXMH2.js} +8 -8
- package/dist/{chunk-I2I2FKAK.js → chunk-EBJLT7PH.js} +1 -1
- package/dist/{chunk-GEHK4UD5.js → chunk-EEIGHOJR.js} +92 -23
- package/dist/{chunk-FKJWZWNU.js → chunk-EUPUVYWO.js} +1 -1
- package/dist/{chunk-3W73ZP6W.js → chunk-F2OAZHOX.js} +3 -3
- package/dist/{chunk-IU7XKZA6.js → chunk-FK6HZYGK.js} +4 -14
- package/dist/{chunk-2M3K6GD2.js → chunk-FTW2E2YH.js} +6 -6
- package/dist/{chunk-5P2L5QXE.js → chunk-FZVCS2XY.js} +4 -2
- package/dist/chunk-G24NSISJ.js +69 -0
- package/dist/{chunk-5H7SA5ZD.js → chunk-GFQFLLP3.js} +2 -2
- package/dist/{chunk-BUVLLK3D.js → chunk-GLLYHYGT.js} +27 -17
- package/dist/{chunk-VLC6WNRD.js → chunk-GULGSH2Z.js} +4 -0
- package/dist/{chunk-H5NVCOEJ.js → chunk-GXBH7WNN.js} +2 -2
- package/dist/{chunk-7UWVHNPM.js → chunk-H242TVAE.js} +9 -9
- package/dist/{chunk-M4ZUIW3J.js → chunk-H7DZYHQF.js} +3 -3
- package/dist/{chunk-GLCMUTO5.js → chunk-HQNZJMNS.js} +1 -1
- package/dist/{chunk-H7RQG4PH.js → chunk-IAM3IDL4.js} +2 -2
- package/dist/{chunk-WTPS73RM.js → chunk-II6D6NWX.js} +8 -8
- package/dist/{chunk-5ARANBIE.js → chunk-IUFTAFGN.js} +2 -2
- package/dist/{chunk-AQRSEQZV.js → chunk-IZEKHIV6.js} +3 -3
- package/dist/{chunk-WGNP5ND2.js → chunk-J3YM6RA5.js} +3 -3
- package/dist/{chunk-YFIUABSF.js → chunk-J467QBZF.js} +23 -3
- package/dist/{chunk-CD7VQCDL.js → chunk-J7JF4QKA.js} +40 -30
- package/dist/{chunk-MYHR3PMH.js → chunk-JULBDTNU.js} +7 -7
- package/dist/{chunk-EPDBWATV.js → chunk-K7RRXZHS.js} +4 -2
- package/dist/{chunk-YVIPJGFG.js → chunk-KMB754DO.js} +33 -6
- package/dist/chunk-KNKZGRRB.js +439 -0
- package/dist/{chunk-SIABEREK.js → chunk-KTGJQJB3.js} +2 -2
- package/dist/{chunk-LGUFJ7Y2.js → chunk-KW3CC7SB.js} +1 -1
- package/dist/{chunk-ITDF3MWD.js → chunk-L3K5O3Z5.js} +3 -3
- package/dist/chunk-LRTSTDJ6.js +126 -0
- package/dist/{chunk-NI4L6HEU.js → chunk-LZATSXAA.js} +1 -1
- package/dist/{chunk-RVOSA4RR.js → chunk-MJ725XHD.js} +441 -267
- package/dist/{chunk-EPB3UEMD.js → chunk-NBISN6FH.js} +2 -2
- package/dist/{chunk-IZFJZCF6.js → chunk-NN5RUHXV.js} +84 -16
- package/dist/{chunk-KDWEOT54.js → chunk-NOZMRPXI.js} +96 -153
- package/dist/{chunk-EM5SA7NC.js → chunk-NQFZ7LXC.js} +4 -4
- package/dist/chunk-NTDWVTEY.js +12 -0
- package/dist/{chunk-AUXUNV73.js → chunk-O3HRF25Z.js} +1 -1
- package/dist/{chunk-GLL237AP.js → chunk-OSSA5UWA.js} +3 -3
- package/dist/{chunk-UOCWYLYT.js → chunk-OZXKW5NA.js} +1 -1
- package/dist/{chunk-QEU6VM4O.js → chunk-PLQZJZ2K.js} +1 -1
- package/dist/chunk-PRG7NIUU.js +272 -0
- package/dist/{chunk-MAYTYF5S.js → chunk-PSNRB75I.js} +3 -3
- package/dist/{chunk-B5CEV7IR.js → chunk-PT5VFY3B.js} +38 -14
- package/dist/{chunk-KAO7JL4I.js → chunk-PU5X3P3T.js} +6 -5
- package/dist/{chunk-B7BSRVNC.js → chunk-PZ5LAAO3.js} +2 -2
- package/dist/{chunk-TOHTKLKE.js → chunk-Q5Q5JLRT.js} +1 -1
- package/dist/{chunk-TUOZ6AXC.js → chunk-Q6V342WS.js} +16 -4
- package/dist/{chunk-ZOKD5F7M.js → chunk-QDPTOIG7.js} +5 -5
- package/dist/{chunk-ERT7XDQW.js → chunk-QIITSGI5.js} +1 -1
- package/dist/{chunk-K2WXMXI2.js → chunk-QLIZ7SB7.js} +1 -1
- package/dist/chunk-QLNLRZ37.js +181 -0
- package/dist/{chunk-P6LKX3IQ.js → chunk-QOLRTPGH.js} +6 -6
- package/dist/{chunk-FBK32S4D.js → chunk-R4SXMBGF.js} +1 -1
- package/dist/chunk-R4U7IIRX.js +178 -0
- package/dist/{chunk-DWMQ24JR.js → chunk-RC6PISCK.js} +4 -2
- package/dist/{chunk-R5L5E3TC.js → chunk-REKLKGR6.js} +3 -3
- package/dist/{chunk-FUYEXLAN.js → chunk-RFGQDIOI.js} +837 -220
- package/dist/{chunk-W5MMPPGX.js → chunk-ROFSIFSY.js} +4 -4
- package/dist/{chunk-JCC3B2GS.js → chunk-ROH4LYBL.js} +65 -21
- package/dist/{chunk-OAZ6BIIB.js → chunk-SNDCXT5R.js} +9 -7
- package/dist/{chunk-JRN2CRXJ.js → chunk-TDUBTDXS.js} +1 -1
- package/dist/{chunk-GM2SLMQW.js → chunk-TMB4YY3J.js} +34 -4
- package/dist/{chunk-ZBOIYC2G.js → chunk-V3ICBS2O.js} +5 -5
- package/dist/{chunk-HZX4QZGR.js → chunk-V65EDV6S.js} +3 -3
- package/dist/{chunk-67RKJEKF.js → chunk-VKT3BVRO.js} +35 -11
- package/dist/{chunk-5BG4OSWJ.js → chunk-VOO65FKC.js} +12 -12
- package/dist/{chunk-KQAPFIYF.js → chunk-VQWLASDC.js} +2 -2
- package/dist/{chunk-JILEYZ2V.js → chunk-VVL2KKG4.js} +1 -1
- package/dist/{chunk-D7DGLJ7N.js → chunk-VVZDBUHA.js} +2 -2
- package/dist/{chunk-JBAFAKGX.js → chunk-W46OMHOK.js} +23 -27
- package/dist/{chunk-XCKNFFKM.js → chunk-WH6E6SHC.js} +2 -4
- package/dist/{chunk-P2GNNEMN.js → chunk-WPYJAHRP.js} +1 -1
- package/dist/{chunk-TPCP2UOI.js → chunk-WXGFB2O2.js} +3 -3
- package/dist/{chunk-RIK6WUMO.js → chunk-XCYGOCMS.js} +43 -26
- package/dist/{chunk-I3ZRIMR7.js → chunk-XEMCNQQW.js} +15 -15
- package/dist/{chunk-PWZEJNO6.js → chunk-XMUFXJI2.js} +6 -6
- package/dist/{chunk-EMGNCG5C.js → chunk-XZGXVN4T.js} +5 -5
- package/dist/{chunk-WLGOIMTI.js → chunk-YCIBBVI2.js} +2 -2
- package/dist/{chunk-V2NQV7VL.js → chunk-YFIDR7JH.js} +2 -2
- package/dist/{chunk-K2SFH3GJ.js → chunk-YFWIFKRQ.js} +3 -3
- package/dist/{chunk-6XLMTAEX.js → chunk-YIHRLY55.js} +33 -6
- package/dist/{chunk-CYRB2JTN.js → chunk-YLKPRT6U.js} +1 -1
- package/dist/{chunk-KMU65FYM.js → chunk-YSDSFXQD.js} +1 -1
- package/dist/{chunk-ZI6WC24V.js → chunk-ZBJV4KNU.js} +1 -1
- package/dist/{chunk-TIPNNOZC.js → chunk-ZCKVTZHD.js} +41 -19
- package/dist/{chunk-YSGOXZBB.js → chunk-ZMVMGZAJ.js} +1 -1
- package/dist/{chunk-CP73WWLN.js → chunk-ZRW4B4KF.js} +48 -14
- package/dist/{chunk-O2HNVNKO.js → chunk-ZTKO2RD4.js} +5 -5
- package/dist/collapse-6IGH2B24.js +31 -0
- package/dist/collapse-GOWNCVHZ.js +7 -0
- package/dist/collapse-HNTPLB2Q.js +11 -0
- package/dist/collapse-NUM7DPJA.js +10 -0
- package/dist/completion-registry.js +27 -4
- package/dist/dgmo-router-RSYWR5IS.js +101 -0
- package/dist/dimensions-KXAI7U2B.js +21 -0
- package/dist/editor.js +882 -215
- package/dist/{flowchart-parser-SM5LHF2D.js → flowchart-parser-UI5VZNGJ.js} +5 -5
- package/dist/{flowchart-renderer-PPS2GTTD.js → flowchart-renderer-IYWPKPCF.js} +18 -18
- package/dist/fold-at-line-DmSAa1eU.d.ts +11 -0
- package/dist/highlight.js +883 -216
- package/dist/index.d.ts +52 -5
- package/dist/index.js +79 -63
- package/dist/{layout-AF4KA5B2.js → layout-6VY3DHYD.js} +6 -6
- package/dist/{layout-FCFUVCRI.js → layout-7C2QZCEZ.js} +10 -10
- package/dist/{layout-2WESJYRE.js → layout-7E7BNOGO.js} +3 -2
- package/dist/layout-BSK374N6.js +11 -0
- package/dist/{layout-R6G4MEO3.js → layout-FJDBY3WG.js} +5 -5
- package/dist/{layout-KELSNWBD.js → layout-G3RVKEC4.js} +10 -10
- package/dist/{layout-H2KP5A6M.js → layout-GC5XX2RH.js} +2 -2
- package/dist/{layout-LNVIH45F.js → layout-R6ULGQJK.js} +6 -6
- package/dist/{layout-PPIVGJXD.js → layout-ROI5KVSO.js} +3 -3
- package/dist/{layout-3TSVAGWH.js → layout-SPPS225I.js} +3 -3
- package/dist/{layout-HF3PMI4H.js → layout-VTGOYGRC.js} +2 -2
- package/dist/{layout-MPSH3YWE.js → layout-WBH5IHYK.js} +10 -10
- package/dist/layout-WTHBGTH2.js +15 -0
- package/dist/layout-ZCCABSV7.js +15 -0
- package/dist/{layout-search-C2TYUH4L.js → layout-search-DSIDKKQO.js} +8 -8
- package/dist/{legend-constants-55MFBXYF.js → legend-constants-KF3MKWL2.js} +2 -2
- package/dist/{parser-DGLKH4NT.js → parser-3PMYAVFL.js} +2 -2
- package/dist/{parser-OHBBDCG4.js → parser-5KVFS4RN.js} +2 -2
- package/dist/{parser-UHKROC7Z.js → parser-BA43YPIQ.js} +3 -3
- package/dist/{parser-F75WNYMK.js → parser-CFAYEWLF.js} +3 -3
- package/dist/{parser-MWINQNQW.js → parser-DRFEX6OX.js} +3 -3
- package/dist/{parser-W6NX3AIV.js → parser-DWVBRBB2.js} +3 -3
- package/dist/{parser-6WURFLOB.js → parser-E4B7HJT2.js} +3 -3
- package/dist/{parser-DRUGM3R6.js → parser-FWQY3HJX.js} +2 -2
- package/dist/{parser-GBQY3WOZ.js → parser-GMCXCJSP.js} +3 -3
- package/dist/{parser-BPYHIG24.js → parser-IHFHPFL7.js} +3 -3
- package/dist/{parser-QWTECQEC.js → parser-IU6425JW.js} +6 -6
- package/dist/{parser-ZV756RMP.js → parser-IZYIXDJX.js} +6 -6
- package/dist/{parser-TTGZYLYD.js → parser-JQGUTDSX.js} +3 -3
- package/dist/{parser-BNRX35NT.js → parser-JRKPOO2Z.js} +3 -3
- package/dist/{parser-B7SCN7FG.js → parser-KI2XYB2R.js} +2 -2
- package/dist/parser-LDVVBP7S.js +12 -0
- package/dist/{parser-L7SI3PW4.js → parser-MAGFK6OK.js} +4 -4
- package/dist/{parser-722KLLAQ.js → parser-MH5BDN7X.js} +3 -3
- package/dist/{parser-5RUD4A3X.js → parser-MUHFEM4G.js} +3 -3
- package/dist/{parser-Y7QXD2UR.js → parser-P375HO7Q.js} +2 -2
- package/dist/{parser-LUJX7AXO.js → parser-PYY5BRLQ.js} +2 -2
- package/dist/parser-QEMFMVF5.js +12 -0
- package/dist/{parser-WIKXZP4X.js → parser-QIPDBT5M.js} +2 -2
- package/dist/{parser-2AXU2MHJ.js → parser-RNBDDEGL.js} +3 -3
- package/dist/{parser-4GHAYZKZ.js → parser-RSWZGQA7.js} +6 -6
- package/dist/{parser-H6HT2WFQ.js → parser-SGX2PVR5.js} +2 -2
- package/dist/{parser-ZWWQZ4XZ.js → parser-SJUEFKNM.js} +3 -3
- package/dist/{parser-4BOP77CD.js → parser-UMNBPXG2.js} +2 -2
- package/dist/{parser-GM5B2EPW.js → parser-WE4VSBBY.js} +3 -3
- package/dist/{parser-XEJP37GQ.js → parser-WKEYS7N3.js} +3 -3
- package/dist/{parser-DWV2CYBS.js → parser-WPXUUNA2.js} +3 -3
- package/dist/{parser-5HQPPVHJ.js → parser-XP3RCOTN.js} +3 -3
- package/dist/{parser-F3JJNIFC.js → parser-YV4RBHG7.js} +3 -3
- package/dist/{parser-CRJYLOHA.js → parser-YZ3J542U.js} +2 -2
- package/dist/{renderer-BYLQ37T2.js → renderer-2V5NVI3V.js} +15 -15
- package/dist/renderer-4PKYVOYL.js +39 -0
- package/dist/{renderer-ONENGXFQ.js → renderer-66SCERH7.js} +14 -12
- package/dist/renderer-6IAXRZLK.js +85 -0
- package/dist/{renderer-GKY55M4Z.js → renderer-6O5SV5YE.js} +10 -10
- package/dist/{renderer-F7YGMEGQ.js → renderer-7OXMSF4R.js} +4 -4
- package/dist/{renderer-6HU44IGJ.js → renderer-A36NL2SS.js} +8 -8
- package/dist/{renderer-66NCRXSC.js → renderer-ASPBBACI.js} +13 -11
- package/dist/{renderer-5GP7YUS4.js → renderer-BXVTYE27.js} +7 -6
- package/dist/renderer-CC6O6GQK.js +18 -0
- package/dist/{renderer-VNJOZPSH.js → renderer-CNDB4JTZ.js} +17 -17
- package/dist/renderer-COV2DXTM.js +41 -0
- package/dist/renderer-DXCATVLO.js +30 -0
- package/dist/{renderer-VUXAAGUG.js → renderer-E5E3OJ42.js} +12 -11
- package/dist/{renderer-MGF2NNGG.js → renderer-E7LC7HCU.js} +5 -5
- package/dist/{renderer-PEJF6R2I.js → renderer-F3JYZERE.js} +4 -4
- package/dist/{renderer-CVCCW7UT.js → renderer-FAFSRFGR.js} +9 -9
- package/dist/renderer-HIB6LZWZ.js +26 -0
- package/dist/renderer-HLDRRFZB.js +28 -0
- package/dist/renderer-INQMQPNN.js +22 -0
- package/dist/renderer-ITJ67HXO.js +27 -0
- package/dist/{renderer-SYRH3B62.js → renderer-JLOKFKOZ.js} +14 -13
- package/dist/{renderer-LJPUCG3U.js → renderer-KOPJ76GS.js} +10 -10
- package/dist/{renderer-N6PM5CSG.js → renderer-M2467III.js} +14 -13
- package/dist/{renderer-MVBAQP3M.js → renderer-MYKL6VG6.js} +6 -6
- package/dist/{renderer-YJVQT7QG.js → renderer-S6L3JR6C.js} +11 -11
- package/dist/{renderer-NOYLNVTI.js → renderer-SYWVZ4CY.js} +3 -3
- package/dist/renderer-TCTZZ5Y6.js +32 -0
- package/dist/{renderer-D6EH5UQ6.js → renderer-UIHCYXBY.js} +12 -12
- package/dist/{renderer-QZJZIAT3.js → renderer-WIBVOPRC.js} +6 -4
- package/dist/{renderer-TS5NHOQD.js → renderer-XMJ6XZGL.js} +12 -11
- package/dist/{renderer-2V2XY2V7.js → renderer-ZTHXOBXW.js} +8 -8
- package/dist/{renderer-radial-4R7AKETK.js → renderer-radial-FC25BDCZ.js} +8 -8
- package/dist/{state-parser-EQBBEKHR.js → state-parser-2PQRH5JE.js} +6 -6
- package/dist/state-renderer-YP6HWLJR.js +43 -0
- package/dist/{themes-CbJL3w8L.d.ts → themes-DoLdhUXV.d.ts} +1 -1
- package/docs/ai-integration.md +4 -3
- package/docs/language-reference.md +99 -13
- package/gallery/fixtures/swot-relabel.dgmo +19 -0
- package/gallery/fixtures/swot-tags.dgmo +16 -0
- package/gallery/fixtures/swot.dgmo +13 -0
- package/package.json +1 -1
- package/dist/chunk-R2K5L4UA.js +0 -49
- package/dist/collapse-TCVK3RPO.js +0 -8
- package/dist/dgmo-router-EPBQKQW2.js +0 -100
- package/dist/dimensions-DBCRBZIU.js +0 -21
- package/dist/layout-3J72UULM.js +0 -15
- package/dist/layout-IXQNVRBE.js +0 -15
- package/dist/layout-VDCJOZSH.js +0 -11
- package/dist/parser-HM6FEX5K.js +0 -14
- package/dist/renderer-2MCV75JQ.js +0 -41
- package/dist/renderer-5AEDVLAA.js +0 -31
- package/dist/renderer-7C76HP5W.js +0 -30
- package/dist/renderer-7RAMBMTH.js +0 -22
- package/dist/renderer-E3334XLT.js +0 -84
- package/dist/renderer-LFZKG2GR.js +0 -26
- package/dist/renderer-MZIWP55B.js +0 -28
- package/dist/renderer-N75E3UVY.js +0 -25
- package/dist/renderer-VNUDN6F5.js +0 -39
- package/dist/state-renderer-SOGZ2CNN.js +0 -42
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
tagAttrKey,
|
|
9
9
|
validateTagGroupNames,
|
|
10
10
|
validateTagValues
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KW3CC7SB.js";
|
|
12
12
|
import {
|
|
13
13
|
TREEMAP_REGISTRY,
|
|
14
14
|
extractColor,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
stripQuotes,
|
|
22
22
|
warnUnknownMetaKeys,
|
|
23
23
|
withTagAliases
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-RFGQDIOI.js";
|
|
25
25
|
import {
|
|
26
26
|
emit,
|
|
27
27
|
formatDgmoError,
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseKanban
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-B7ZH5EQ2.js";
|
|
4
4
|
import {
|
|
5
5
|
serializeSvg
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YLKPRT6U.js";
|
|
7
7
|
import {
|
|
8
8
|
ScaleContext
|
|
9
9
|
} from "./chunk-24YPR5EH.js";
|
|
10
|
+
import {
|
|
11
|
+
renderCollapseBar
|
|
12
|
+
} from "./chunk-LRTSTDJ6.js";
|
|
10
13
|
import {
|
|
11
14
|
TITLE_FONT_SIZE,
|
|
12
15
|
TITLE_FONT_WEIGHT
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GULGSH2Z.js";
|
|
14
17
|
import {
|
|
15
18
|
CARD_RADIUS
|
|
16
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WH6E6SHC.js";
|
|
17
20
|
import {
|
|
18
21
|
keepSwimlaneToggleFocus,
|
|
19
22
|
renderIntegratedLegend,
|
|
20
23
|
wireSwimlaneToggle
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-DFEVFLEG.js";
|
|
22
25
|
import {
|
|
23
26
|
getMaxLegendReservedHeight
|
|
24
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-VVL2KKG4.js";
|
|
25
28
|
import {
|
|
29
|
+
parseInlineMarkdown,
|
|
26
30
|
renderInlineText
|
|
27
31
|
} from "./chunk-QKPOIJBT.js";
|
|
28
32
|
import {
|
|
@@ -30,18 +34,19 @@ import {
|
|
|
30
34
|
} from "./chunk-ICLB27PZ.js";
|
|
31
35
|
import {
|
|
32
36
|
tagAttrKey
|
|
33
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-KW3CC7SB.js";
|
|
34
38
|
import {
|
|
35
39
|
fillModeFromOptions,
|
|
36
40
|
legendSuppressed
|
|
37
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-RFGQDIOI.js";
|
|
38
42
|
import {
|
|
39
43
|
LEGEND_HEIGHT,
|
|
40
44
|
measureLegendText
|
|
41
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-OZXKW5NA.js";
|
|
42
46
|
import {
|
|
43
|
-
measureText
|
|
44
|
-
|
|
47
|
+
measureText,
|
|
48
|
+
truncateText
|
|
49
|
+
} from "./chunk-PU5X3P3T.js";
|
|
45
50
|
import {
|
|
46
51
|
contrastText,
|
|
47
52
|
mix,
|
|
@@ -154,6 +159,7 @@ var COLUMN_GAP = 16;
|
|
|
154
159
|
var COLUMN_HEADER_HEIGHT = 36;
|
|
155
160
|
var COLUMN_PADDING = 12;
|
|
156
161
|
var COLUMN_MIN_WIDTH = 200;
|
|
162
|
+
var CARD_TITLE_MAX_WIDTH = COLUMN_MIN_WIDTH * 2;
|
|
157
163
|
var CARD_HEADER_HEIGHT = 24;
|
|
158
164
|
var CARD_META_LINE_HEIGHT = 14;
|
|
159
165
|
var CARD_SEPARATOR_GAP = 4;
|
|
@@ -253,7 +259,27 @@ function collapsedChips(cards, group) {
|
|
|
253
259
|
function collapsedLaneLabel(laneName, total) {
|
|
254
260
|
return `${laneName} (${total})`;
|
|
255
261
|
}
|
|
256
|
-
|
|
262
|
+
var RTL_START = /^[\P{L}]*[\u0590-\u08ff\ufb1d-\ufdff\ufe70-\ufeff]/u;
|
|
263
|
+
function renderCardTitle(titleEl, title, palette, fontSize, maxWidth) {
|
|
264
|
+
if (measureText(title, fontSize) > maxWidth) {
|
|
265
|
+
const plain = parseInlineMarkdown(title).map((span) => span.text).join("");
|
|
266
|
+
const shown = truncateText(plain, fontSize, maxWidth);
|
|
267
|
+
if (shown !== plain) {
|
|
268
|
+
if (RTL_START.test(plain)) {
|
|
269
|
+
const x = Number(titleEl.attr("x"));
|
|
270
|
+
const ellipsisEl = titleEl.clone(false).text("\u2026");
|
|
271
|
+
ellipsisEl.attr("x", x);
|
|
272
|
+
titleEl.attr("x", x + measureText("\u2026", fontSize)).text(shown.slice(0, -1));
|
|
273
|
+
} else {
|
|
274
|
+
titleEl.text(shown);
|
|
275
|
+
}
|
|
276
|
+
titleEl.append("title").text(plain);
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
renderInlineText(titleEl, title, palette, fontSize);
|
|
281
|
+
}
|
|
282
|
+
function computeLayout(parsed, _palette, collapsedColumns, hiddenMetaGroups, sDiagramPadding = DIAGRAM_PADDING, sTitleHeight = TITLE_HEIGHT, sCardTitleFontSize = CARD_TITLE_FONT_SIZE, sColumnHeaderFontSize = COLUMN_HEADER_FONT_SIZE, sColumnHeaderHeight = COLUMN_HEADER_HEIGHT, sColumnPadding = COLUMN_PADDING, sCardPaddingX = CARD_PADDING_X, sCardPaddingY = CARD_PADDING_Y, sCardSeparatorGap = CARD_SEPARATOR_GAP, sCardMetaLineHeight = CARD_META_LINE_HEIGHT, sCardHeaderHeight = CARD_HEADER_HEIGHT, sCardMetaFontSize = CARD_META_FONT_SIZE, sCardGap = CARD_GAP, sColumnMinWidth = COLUMN_MIN_WIDTH, sColumnGap = COLUMN_GAP, sCollapsedColumnWidth = COLLAPSED_COLUMN_WIDTH, activeTagGroup = null, sCollapsedChipHeight = COLLAPSED_CHIP_HEIGHT, sCollapsedChipGap = COLLAPSED_CHIP_GAP, sCollapsedNameGap = COLLAPSED_NAME_GAP, sCardTitleMaxWidth = CARD_TITLE_MAX_WIDTH) {
|
|
257
283
|
const showTitle = !!parsed.title && parsed.options["no-title"] !== "on";
|
|
258
284
|
const headerHeight = showTitle ? sTitleHeight + 8 : 0;
|
|
259
285
|
const startY = sDiagramPadding + headerHeight;
|
|
@@ -279,7 +305,10 @@ function computeLayout(parsed, _palette, collapsedColumns, hiddenMetaGroups, sDi
|
|
|
279
305
|
const cardLayouts = [];
|
|
280
306
|
let cardY = sColumnHeaderHeight + sColumnPadding;
|
|
281
307
|
for (const card of col.cards) {
|
|
282
|
-
const titleWidth =
|
|
308
|
+
const titleWidth = Math.min(
|
|
309
|
+
measureText(card.title, sCardTitleFontSize),
|
|
310
|
+
sCardTitleMaxWidth
|
|
311
|
+
);
|
|
283
312
|
maxCardTextWidth = Math.max(
|
|
284
313
|
maxCardTextWidth,
|
|
285
314
|
titleWidth + sCardPaddingX * 2
|
|
@@ -443,7 +472,10 @@ function drawKanban(container, parsed, palette, isDark, options) {
|
|
|
443
472
|
activeTagGroup,
|
|
444
473
|
sCollapsedChipHeight,
|
|
445
474
|
sCollapsedChipGap,
|
|
446
|
-
sCollapsedNameGap
|
|
475
|
+
sCollapsedNameGap,
|
|
476
|
+
// Reserved at the size the title is DRAWN at, which a shrunken screen layout
|
|
477
|
+
// does not shrink as far as its boxes, so the cap holds the same characters.
|
|
478
|
+
CARD_TITLE_MAX_WIDTH * (sCardTitleFontSize / CARD_TITLE_FONT_SIZE)
|
|
447
479
|
);
|
|
448
480
|
const width = exportDims?.width ?? layout.totalWidth;
|
|
449
481
|
const height = exportDims?.height ?? layout.totalHeight;
|
|
@@ -561,6 +593,7 @@ function drawKanban(container, parsed, palette, isDark, options) {
|
|
|
561
593
|
const col = colLayout.column;
|
|
562
594
|
const isColCollapsed = collapsedColumns?.has(col.id) ?? false;
|
|
563
595
|
const g = svg.append("g").attr("class", "kanban-column").attr("data-column-id", col.id).attr("data-line-number", col.lineNumber);
|
|
596
|
+
g.attr("data-group-toggle", col.id).attr("role", "button").attr("aria-expanded", String(!isColCollapsed)).attr("aria-label", col.name);
|
|
564
597
|
const thisColBg = defaultColBg;
|
|
565
598
|
const colColor = resolveColumnTagColor(col, parsed.tagGroups, activeTagGroup ?? null) ?? col.color;
|
|
566
599
|
const thisColHeaderBg = colColor ? shapeFill(palette, colColor, isDark, { mode: fillMode }) : defaultColHeaderBg;
|
|
@@ -577,6 +610,17 @@ function drawKanban(container, parsed, palette, isDark, options) {
|
|
|
577
610
|
g.append("rect").attr("x", colLayout.x).attr("y", colLayout.y).attr("width", sCollapsedColumnWidth).attr("height", sColumnHeaderHeight).attr("rx", sColumnHeaderRadius).attr("fill", thisColHeaderBg);
|
|
578
611
|
g.append("text").attr("x", colLayout.x + sCollapsedColumnWidth / 2).attr("y", colLayout.y + sColumnHeaderHeight / 2).attr("dominant-baseline", "central").attr("font-size", sWipFontSize).attr("font-weight", "bold").attr("fill", col.color ? onHeaderText : palette.textMuted).attr("text-anchor", "middle").text(String(col.cards.length));
|
|
579
612
|
g.append("text").attr("x", colLayout.x + sCollapsedColumnWidth / 2).attr("y", colLayout.y + sColumnHeaderHeight + sColumnPadding).attr("font-size", sCardTitleFontSize).attr("font-weight", "bold").attr("fill", palette.text).attr("text-anchor", "middle").attr("writing-mode", "tb").text(col.name);
|
|
613
|
+
renderCollapseBar(g, {
|
|
614
|
+
x: colLayout.x,
|
|
615
|
+
y: colLayout.y,
|
|
616
|
+
width: sCollapsedColumnWidth,
|
|
617
|
+
height: colLayout.height,
|
|
618
|
+
rx: sColumnRadius,
|
|
619
|
+
fill: colColor ?? wellStroke,
|
|
620
|
+
clipId: `kanban-col-clip-${col.id.replace(/[^A-Za-z0-9_-]/g, "_")}`,
|
|
621
|
+
prefix: "kanban",
|
|
622
|
+
scale: ctx
|
|
623
|
+
});
|
|
580
624
|
const chips = collapsedChips(col.cards, activeGroup);
|
|
581
625
|
if (chips.length > 0) {
|
|
582
626
|
const chipX = colLayout.x + sCollapsedChipInset;
|
|
@@ -640,6 +684,18 @@ function drawKanban(container, parsed, palette, isDark, options) {
|
|
|
640
684
|
wipExceeded ? palette.colors.red : col.color ? onHeaderText : palette.textMuted
|
|
641
685
|
).attr("font-weight", wipExceeded ? "bold" : "normal").text(badgeText);
|
|
642
686
|
}
|
|
687
|
+
renderCollapseBar(g, {
|
|
688
|
+
expanded: true,
|
|
689
|
+
x: colLayout.x,
|
|
690
|
+
y: colLayout.y,
|
|
691
|
+
width: colLayout.width,
|
|
692
|
+
height: colLayout.height,
|
|
693
|
+
rx: sColumnRadius,
|
|
694
|
+
fill: colColor ?? wellStroke,
|
|
695
|
+
clipId: `kanban-col-clip-${col.id.replace(/[^A-Za-z0-9_-]/g, "_")}`,
|
|
696
|
+
prefix: "kanban",
|
|
697
|
+
scale: ctx
|
|
698
|
+
});
|
|
643
699
|
for (const cardLayout of colLayout.cardLayouts) {
|
|
644
700
|
const card = cardLayout.card;
|
|
645
701
|
const resolvedColor = resolveCardTagColor(
|
|
@@ -681,7 +737,13 @@ function drawKanban(container, parsed, palette, isDark, options) {
|
|
|
681
737
|
const cy = colLayout.y + cardLayout.y;
|
|
682
738
|
cg.append("rect").attr("x", cx).attr("y", cy).attr("width", cardLayout.width).attr("height", cardLayout.height).attr("rx", sCardRadius).attr("fill", cardFill).attr("stroke", cardStroke).attr("stroke-width", sCardStrokeWidth);
|
|
683
739
|
const titleEl = cg.append("text").attr("x", cx + sCardPaddingX).attr("y", cy + sCardPaddingY + sCardTitleFontSize).attr("font-size", sCardTitleFontSize).attr("font-weight", "normal").attr("fill", onCardText);
|
|
684
|
-
|
|
740
|
+
renderCardTitle(
|
|
741
|
+
titleEl,
|
|
742
|
+
card.title,
|
|
743
|
+
palette,
|
|
744
|
+
sCardTitleFontSize,
|
|
745
|
+
cardLayout.width - sCardPaddingX * 2
|
|
746
|
+
);
|
|
685
747
|
if (hasMeta) {
|
|
686
748
|
const separatorY = cy + sCardHeaderHeight;
|
|
687
749
|
cg.append("line").attr("x1", cx).attr("y1", separatorY).attr("x2", cx + cardLayout.width).attr("y2", separatorY).attr("stroke", fillMode === "solid" ? onCardText : cardStroke).attr("stroke-opacity", 0.3).attr("stroke-width", 1);
|
|
@@ -1147,7 +1209,13 @@ function renderSwimlaneCard(parent, cardLayout, tagGroups, activeTagGroup, palet
|
|
|
1147
1209
|
const cy = cardLayout.y;
|
|
1148
1210
|
cg.append("rect").attr("x", cx).attr("y", cy).attr("width", cardLayout.width).attr("height", cardLayout.height).attr("rx", sCardRadius).attr("fill", cardFill).attr("stroke", cardStroke).attr("stroke-width", sCardStrokeWidth);
|
|
1149
1211
|
const titleEl = cg.append("text").attr("x", cx + sCardPaddingX).attr("y", cy + sCardPaddingY + sCardTitleFontSize).attr("font-size", sCardTitleFontSize).attr("font-weight", "normal").attr("fill", onCardText);
|
|
1150
|
-
|
|
1212
|
+
renderCardTitle(
|
|
1213
|
+
titleEl,
|
|
1214
|
+
card.title,
|
|
1215
|
+
palette,
|
|
1216
|
+
sCardTitleFontSize,
|
|
1217
|
+
cardLayout.width - sCardPaddingX * 2
|
|
1218
|
+
);
|
|
1151
1219
|
if (hasMeta) {
|
|
1152
1220
|
const separatorY = cy + sCardHeaderHeight;
|
|
1153
1221
|
cg.append("line").attr("x1", cx).attr("y1", separatorY).attr("x2", cx + cardLayout.width).attr("y2", separatorY).attr("stroke", cardStroke).attr("stroke-opacity", 0.3).attr("stroke-width", 1);
|
|
@@ -1,33 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
applyCollapseProjection,
|
|
3
|
+
collapsedGroupId,
|
|
4
|
+
collapsedSequenceNoteLinesFromSource,
|
|
5
|
+
isCollapsibleGroup,
|
|
6
|
+
isFoldableSequenceNote
|
|
7
|
+
} from "./chunk-R4U7IIRX.js";
|
|
1
8
|
import {
|
|
2
9
|
ScaleContext
|
|
3
10
|
} from "./chunk-24YPR5EH.js";
|
|
11
|
+
import {
|
|
12
|
+
collapseBarHeight,
|
|
13
|
+
renderCollapseBar
|
|
14
|
+
} from "./chunk-LRTSTDJ6.js";
|
|
4
15
|
import {
|
|
5
16
|
layoutInlineHeader
|
|
6
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-REKLKGR6.js";
|
|
7
18
|
import {
|
|
8
19
|
TITLE_FONT_SIZE,
|
|
9
20
|
TITLE_FONT_WEIGHT,
|
|
10
21
|
TITLE_Y
|
|
11
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GULGSH2Z.js";
|
|
12
23
|
import {
|
|
13
24
|
ARROWHEAD_HEIGHT,
|
|
14
25
|
ARROWHEAD_WIDTH,
|
|
15
|
-
COLLAPSE_BAR_HEIGHT,
|
|
16
26
|
EDGE_DASH,
|
|
17
27
|
HAIRLINE_DASH
|
|
18
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-WH6E6SHC.js";
|
|
19
29
|
import {
|
|
20
30
|
renderIntegratedLegend
|
|
21
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-DFEVFLEG.js";
|
|
22
32
|
import {
|
|
23
33
|
getLegendExtent,
|
|
24
34
|
getMaxLegendReservedHeight
|
|
25
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-VVL2KKG4.js";
|
|
26
36
|
import {
|
|
27
37
|
isSequenceBlock,
|
|
28
38
|
isSequenceNote,
|
|
29
39
|
isSequenceSection
|
|
30
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-ROH4LYBL.js";
|
|
31
41
|
import {
|
|
32
42
|
wrapDescriptionLines
|
|
33
43
|
} from "./chunk-7WEYXYLC.js";
|
|
@@ -40,19 +50,19 @@ import {
|
|
|
40
50
|
import {
|
|
41
51
|
resolveActiveTagGroup,
|
|
42
52
|
tagAttrKey
|
|
43
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-KW3CC7SB.js";
|
|
44
54
|
import {
|
|
45
55
|
fillModeFromOptions,
|
|
46
56
|
legendInlineRequested,
|
|
47
57
|
legendSuppressed
|
|
48
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-RFGQDIOI.js";
|
|
49
59
|
import {
|
|
50
60
|
legendChromeColors
|
|
51
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-OZXKW5NA.js";
|
|
52
62
|
import {
|
|
53
63
|
measureText,
|
|
54
64
|
truncateText
|
|
55
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-PU5X3P3T.js";
|
|
56
66
|
import {
|
|
57
67
|
contrastText,
|
|
58
68
|
mix,
|
|
@@ -63,135 +73,6 @@ import {
|
|
|
63
73
|
// src/sequence/renderer.ts
|
|
64
74
|
import * as d3Selection from "d3-selection";
|
|
65
75
|
|
|
66
|
-
// src/sequence/collapse.ts
|
|
67
|
-
function isCollapsibleGroup(group) {
|
|
68
|
-
return group.participantIds.length > 1;
|
|
69
|
-
}
|
|
70
|
-
function collapsedGroupId(group, groups) {
|
|
71
|
-
const shared = groups.some((g) => g !== group && g.name === group.name);
|
|
72
|
-
return shared ? `${group.name}@${group.lineNumber}` : group.name;
|
|
73
|
-
}
|
|
74
|
-
function applyCollapseProjection(parsed, requestedGroups) {
|
|
75
|
-
const collapsedGroups = new Set(
|
|
76
|
-
parsed.groups.filter((g) => requestedGroups.has(g.lineNumber) && isCollapsibleGroup(g)).map((g) => g.lineNumber)
|
|
77
|
-
);
|
|
78
|
-
if (collapsedGroups.size === 0) {
|
|
79
|
-
return {
|
|
80
|
-
participants: parsed.participants,
|
|
81
|
-
messages: parsed.messages,
|
|
82
|
-
elements: parsed.elements,
|
|
83
|
-
groups: parsed.groups,
|
|
84
|
-
collapsedGroupIds: /* @__PURE__ */ new Map()
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
const byName = new Map(parsed.groups.map((g) => [g.name, g]));
|
|
88
|
-
const insideCollapsed = (group) => {
|
|
89
|
-
let parentName = group.parent;
|
|
90
|
-
const seen = /* @__PURE__ */ new Set();
|
|
91
|
-
while (parentName !== void 0 && !seen.has(parentName)) {
|
|
92
|
-
seen.add(parentName);
|
|
93
|
-
const ancestor = byName.get(parentName);
|
|
94
|
-
if (!ancestor) return false;
|
|
95
|
-
if (collapsedGroups.has(ancestor.lineNumber)) return true;
|
|
96
|
-
parentName = ancestor.parent;
|
|
97
|
-
}
|
|
98
|
-
return false;
|
|
99
|
-
};
|
|
100
|
-
const memberToGroup = /* @__PURE__ */ new Map();
|
|
101
|
-
const virtualIds = /* @__PURE__ */ new Set();
|
|
102
|
-
const groupById = /* @__PURE__ */ new Map();
|
|
103
|
-
const byDepth = [...parsed.groups].sort((a, b) => a.depth - b.depth);
|
|
104
|
-
for (const group of byDepth) {
|
|
105
|
-
if (!collapsedGroups.has(group.lineNumber)) continue;
|
|
106
|
-
if (insideCollapsed(group)) continue;
|
|
107
|
-
const id = collapsedGroupId(group, parsed.groups);
|
|
108
|
-
virtualIds.add(id);
|
|
109
|
-
groupById.set(id, group);
|
|
110
|
-
for (const memberId of group.participantIds) {
|
|
111
|
-
if (!memberToGroup.has(memberId)) {
|
|
112
|
-
memberToGroup.set(memberId, id);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
const participants = [];
|
|
117
|
-
const insertedGroups = /* @__PURE__ */ new Set();
|
|
118
|
-
for (const p of parsed.participants) {
|
|
119
|
-
const groupId = memberToGroup.get(p.id);
|
|
120
|
-
if (groupId) {
|
|
121
|
-
if (!insertedGroups.has(groupId)) {
|
|
122
|
-
insertedGroups.add(groupId);
|
|
123
|
-
const group = groupById.get(groupId);
|
|
124
|
-
participants.push({
|
|
125
|
-
id: groupId,
|
|
126
|
-
label: group.name,
|
|
127
|
-
type: "default",
|
|
128
|
-
lineNumber: group.lineNumber
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
} else if (virtualIds.has(p.id)) {
|
|
132
|
-
} else {
|
|
133
|
-
participants.push(p);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
const remap = (id) => memberToGroup.get(id) ?? id;
|
|
137
|
-
const messages = parsed.messages.map((msg) => ({
|
|
138
|
-
...msg,
|
|
139
|
-
from: remap(msg.from),
|
|
140
|
-
to: remap(msg.to)
|
|
141
|
-
}));
|
|
142
|
-
const elements = remapElements(parsed.elements, memberToGroup);
|
|
143
|
-
const groups = parsed.groups.filter((g) => !collapsedGroups.has(g.lineNumber) && !insideCollapsed(g)).map((g) => {
|
|
144
|
-
const remapped = [];
|
|
145
|
-
for (const id of g.participantIds) {
|
|
146
|
-
const to = memberToGroup.get(id) ?? id;
|
|
147
|
-
if (!remapped.includes(to)) remapped.push(to);
|
|
148
|
-
}
|
|
149
|
-
return { ...g, participantIds: remapped };
|
|
150
|
-
});
|
|
151
|
-
return {
|
|
152
|
-
participants,
|
|
153
|
-
messages,
|
|
154
|
-
elements,
|
|
155
|
-
groups,
|
|
156
|
-
collapsedGroupIds: memberToGroup
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
function remapElements(elements, memberToGroup) {
|
|
160
|
-
const remap = (id) => memberToGroup.get(id) ?? id;
|
|
161
|
-
const result = [];
|
|
162
|
-
for (const el of elements) {
|
|
163
|
-
if (isSequenceSection(el)) {
|
|
164
|
-
result.push(el);
|
|
165
|
-
} else if (isSequenceNote(el)) {
|
|
166
|
-
result.push({
|
|
167
|
-
...el,
|
|
168
|
-
participantId: remap(el.participantId)
|
|
169
|
-
});
|
|
170
|
-
} else if (isSequenceBlock(el)) {
|
|
171
|
-
result.push({
|
|
172
|
-
...el,
|
|
173
|
-
children: remapElements(el.children, memberToGroup),
|
|
174
|
-
elseChildren: remapElements(el.elseChildren, memberToGroup),
|
|
175
|
-
...el.elseIfBranches ? {
|
|
176
|
-
elseIfBranches: el.elseIfBranches.map((branch) => ({
|
|
177
|
-
...branch,
|
|
178
|
-
children: remapElements(branch.children, memberToGroup)
|
|
179
|
-
}))
|
|
180
|
-
} : {}
|
|
181
|
-
});
|
|
182
|
-
} else {
|
|
183
|
-
const msg = el;
|
|
184
|
-
const from = remap(msg.from);
|
|
185
|
-
const to = remap(msg.to);
|
|
186
|
-
if (from === to && from !== msg.from && !msg.label) {
|
|
187
|
-
continue;
|
|
188
|
-
}
|
|
189
|
-
result.push({ ...msg, from, to });
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return result;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
76
|
// src/sequence/tag-resolution.ts
|
|
196
77
|
function propagateGroupTags(participantMeta, groups) {
|
|
197
78
|
for (const group of [...groups].sort((a, b) => b.depth - a.depth)) {
|
|
@@ -762,6 +643,9 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
|
|
|
762
643
|
const elements = collapsed ? collapsed.elements : parsed.elements;
|
|
763
644
|
const groups = collapsed ? collapsed.groups : parsed.groups;
|
|
764
645
|
const collapsedSections = options?.collapsedSections;
|
|
646
|
+
const collapsedNoteLines = options?.collapsedNotes ?? collapsedSequenceNoteLinesFromSource(parsed);
|
|
647
|
+
const isNoteFolded = (note) => isFoldableSequenceNote(note) && collapsedNoteLines.has(note.lineNumber);
|
|
648
|
+
const shownNoteText = (note) => isNoteFolded(note) ? note.text.split("\n")[0] : note.text;
|
|
765
649
|
const autonumber = parsedOptions["autonumber"]?.toLowerCase() === "on";
|
|
766
650
|
const sourceMessageNumberByLine = new Map(
|
|
767
651
|
parsed.messages.map((message, index) => [message.lineNumber, index + 1])
|
|
@@ -1050,7 +934,10 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
|
|
|
1050
934
|
const note = els[j];
|
|
1051
935
|
const sc = isNoteAfterSelfCall(note);
|
|
1052
936
|
const maxW = noteEffectiveMaxW(note.participantId, note.position, sc);
|
|
1053
|
-
const noteH = computeNoteHeight(
|
|
937
|
+
const noteH = computeNoteHeight(
|
|
938
|
+
shownNoteText(note),
|
|
939
|
+
noteTextWidth(maxW)
|
|
940
|
+
);
|
|
1054
941
|
totalExtent += noteH + NOTE_OFFSET_BELOW;
|
|
1055
942
|
j++;
|
|
1056
943
|
}
|
|
@@ -1377,7 +1264,7 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
|
|
|
1377
1264
|
effectiveNotePosition(note),
|
|
1378
1265
|
isNoteAfterSelfCall(note)
|
|
1379
1266
|
);
|
|
1380
|
-
const noteH = computeNoteHeight(note
|
|
1267
|
+
const noteH = computeNoteHeight(shownNoteText(note), noteTextWidth(maxW));
|
|
1381
1268
|
contentBottomY = Math.max(
|
|
1382
1269
|
contentBottomY,
|
|
1383
1270
|
noteTopY + noteH + NOTE_TRAILING_GAP
|
|
@@ -1539,7 +1426,7 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
|
|
|
1539
1426
|
const padTop = hasExpandedGroup ? (maxGroupDepth + 1 - group.depth) * GROUP_PADDING_TOP : 0;
|
|
1540
1427
|
const padBottom = hasExpandedGroup ? groupBottomPad(group.depth, maxGroupDepth) : 0;
|
|
1541
1428
|
const height = sBoxH + padTop + padBottom;
|
|
1542
|
-
const barHeight = ctx
|
|
1429
|
+
const barHeight = collapseBarHeight(ctx);
|
|
1543
1430
|
collapsedGroupBoxes.set(collapsedGroupId(group, parsed.groups), {
|
|
1544
1431
|
name: group.name,
|
|
1545
1432
|
lineNumber: group.lineNumber,
|
|
@@ -1551,9 +1438,7 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
|
|
|
1551
1438
|
height,
|
|
1552
1439
|
// Centred in the box ABOVE the bar, so the bar does not push the name
|
|
1553
1440
|
// off-centre the way it would if the whole box were used.
|
|
1554
|
-
nameY: -padTop + (height - barHeight) / 2
|
|
1555
|
-
barY: -padTop + height - barHeight,
|
|
1556
|
-
barHeight
|
|
1441
|
+
nameY: -padTop + (height - barHeight) / 2
|
|
1557
1442
|
});
|
|
1558
1443
|
}
|
|
1559
1444
|
const framedGroups = [...groups].sort((a, b) => a.depth - b.depth);
|
|
@@ -1875,7 +1760,11 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
|
|
|
1875
1760
|
if (px === void 0) continue;
|
|
1876
1761
|
const { topY, position, afterSelfCall, maxW, textWidth } = noteLayout;
|
|
1877
1762
|
const isRight = position === "right";
|
|
1878
|
-
const wrappedLines = wrapTextLines(
|
|
1763
|
+
const wrappedLines = wrapTextLines(
|
|
1764
|
+
shownNoteText(note),
|
|
1765
|
+
textWidth,
|
|
1766
|
+
sNoteFontSize
|
|
1767
|
+
);
|
|
1879
1768
|
const noteH = wrappedLines.length * sNoteLineH + sNotePadV * 2;
|
|
1880
1769
|
const maxLineW = Math.max(
|
|
1881
1770
|
...wrappedLines.map((l) => measureText(l.text, sNoteFontSize))
|
|
@@ -1887,6 +1776,8 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
|
|
|
1887
1776
|
const rightOffset = afterSelfCall && isRight ? sActivationWidth / 2 + sSelfCallWidth + sNoteGap : sActivationWidth + sNoteGap;
|
|
1888
1777
|
const noteX = isRight ? px + rightOffset : px - sActivationWidth - sNoteGap - noteW;
|
|
1889
1778
|
noteBoxes.set(note, {
|
|
1779
|
+
foldable: isFoldableSequenceNote(note),
|
|
1780
|
+
folded: isNoteFolded(note),
|
|
1890
1781
|
x: noteX,
|
|
1891
1782
|
y: topY,
|
|
1892
1783
|
width: noteW,
|
|
@@ -2094,9 +1985,24 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
2094
1985
|
if (collapsible) {
|
|
2095
1986
|
groupG.attr("data-line-number", String(group.lineNumber)).attr("role", "button").attr("aria-expanded", "true").attr("aria-label", groupToggleName(group.name, group.participantIds)).attr("cursor", "pointer");
|
|
2096
1987
|
}
|
|
2097
|
-
groupG.append("rect").attr("x", frame.x).attr("y", frame.y).attr("width", frame.width).attr("height", frame.height).attr("rx", 6).attr("fill", fillColor).attr("stroke", strokeColor).attr("stroke-width", 1).attr("stroke-opacity", 0.5).attr("
|
|
1988
|
+
const frameRect = groupG.append("rect").attr("x", frame.x).attr("y", frame.y).attr("width", frame.width).attr("height", frame.height).attr("rx", 6).attr("fill", fillColor).attr("stroke", strokeColor).attr("stroke-width", 1).attr("stroke-opacity", 0.5).attr("class", "group-box");
|
|
1989
|
+
if (!collapsible) frameRect.attr("pointer-events", "none");
|
|
2098
1990
|
groupG.append("rect").attr("x", frame.x).attr("y", frame.y).attr("width", frame.width).attr("height", frame.headerHeight).attr("fill", "transparent").attr("class", "group-label-hit");
|
|
2099
1991
|
groupG.append("text").attr("x", frame.labelX).attr("y", frame.labelY).attr("text-anchor", "middle").attr("fill", strokeColor).attr("font-size", sGroupLabelSize).attr("font-weight", GROUP_LABEL_WEIGHT).attr("opacity", 0.7).attr("pointer-events", "none").attr("class", "group-label").text(group.name);
|
|
1992
|
+
if (collapsible) {
|
|
1993
|
+
renderCollapseBar(groupG, {
|
|
1994
|
+
expanded: true,
|
|
1995
|
+
x: frame.x,
|
|
1996
|
+
y: frame.y,
|
|
1997
|
+
width: frame.width,
|
|
1998
|
+
height: frame.height,
|
|
1999
|
+
rx: 6,
|
|
2000
|
+
fill: strokeColor,
|
|
2001
|
+
clipId: `clip-group-frame-${group.lineNumber}`,
|
|
2002
|
+
prefix: "sequence",
|
|
2003
|
+
scale: ctx
|
|
2004
|
+
});
|
|
2005
|
+
}
|
|
2100
2006
|
}
|
|
2101
2007
|
participants.forEach((participant) => {
|
|
2102
2008
|
const cx = participantX.get(participant.id);
|
|
@@ -2125,7 +2031,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
2125
2031
|
const meta = collapsedGroupBoxes.get(participant.id);
|
|
2126
2032
|
const drillColor = effectiveTagColor ?? mix(palette.textMuted, themeBaseBg(palette, isDark), 55);
|
|
2127
2033
|
const boxW = sBoxW;
|
|
2128
|
-
const { padTop, height: fullH, nameY
|
|
2034
|
+
const { padTop, height: fullH, nameY } = meta;
|
|
2129
2035
|
const clipId = `clip-drill-group-${participant.id.replace(/[^a-zA-Z0-9-]/g, "-")}`;
|
|
2130
2036
|
const participantG = svg.select(
|
|
2131
2037
|
`.participant[data-participant-id="${participant.id}"]`
|
|
@@ -2135,8 +2041,17 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
2135
2041
|
const pStroke = effectiveTagColor ?? palette.border;
|
|
2136
2042
|
participantG.append("rect").attr("x", -boxW / 2).attr("y", -padTop).attr("width", boxW).attr("height", fullH).attr("rx", 6).attr("fill", pFill).attr("stroke", pStroke).attr("stroke-width", 1.5);
|
|
2137
2043
|
participantG.append("text").attr("x", 0).attr("y", nameY).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("fill", palette.text).attr("font-size", sLabelFontSize).attr("font-weight", "normal").attr("class", "collapsed-group-label").text(truncateText(participant.label, sLabelFontSize, sLabelTextWidth));
|
|
2138
|
-
participantG
|
|
2139
|
-
|
|
2044
|
+
renderCollapseBar(participantG, {
|
|
2045
|
+
x: -boxW / 2,
|
|
2046
|
+
y: -padTop,
|
|
2047
|
+
width: boxW,
|
|
2048
|
+
height: fullH,
|
|
2049
|
+
rx: 6,
|
|
2050
|
+
fill: drillColor,
|
|
2051
|
+
clipId,
|
|
2052
|
+
prefix: "sequence",
|
|
2053
|
+
scale: ctx
|
|
2054
|
+
});
|
|
2140
2055
|
}
|
|
2141
2056
|
const llColor = effectiveTagColor ?? palette.textMuted;
|
|
2142
2057
|
for (const [segTop, segBottom] of lifelines.get(participant.id) ?? []) {
|
|
@@ -2201,6 +2116,18 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
2201
2116
|
const bandFill = isCollapsed ? legendChromeColors(palette, isDark).groupBg : lineColor;
|
|
2202
2117
|
const bandOpacity = isCollapsed ? 1 : isDark ? 0.1 : 0.08;
|
|
2203
2118
|
sectionG.append("rect").attr("x", band.x).attr("y", secY - BAND_HEIGHT / 2).attr("width", band.width).attr("height", BAND_HEIGHT).attr("fill", bandFill).attr("opacity", bandOpacity).attr("rx", 2).attr("pointer-events", "none").attr("class", "section-divider");
|
|
2119
|
+
renderCollapseBar(sectionG, {
|
|
2120
|
+
expanded: !isCollapsed,
|
|
2121
|
+
x: band.x,
|
|
2122
|
+
y: secY - BAND_HEIGHT / 2,
|
|
2123
|
+
width: band.width,
|
|
2124
|
+
height: BAND_HEIGHT,
|
|
2125
|
+
rx: 2,
|
|
2126
|
+
fill: lineColor,
|
|
2127
|
+
clipId: `seq-section-clip-${sec.lineNumber}`,
|
|
2128
|
+
prefix: "sequence-section",
|
|
2129
|
+
scale: ctx
|
|
2130
|
+
});
|
|
2204
2131
|
const { labelText, labelWidth, labelX, labelBaseline } = band;
|
|
2205
2132
|
const labelHitW = Math.max(80, labelWidth + 24);
|
|
2206
2133
|
sectionG.append("rect").attr("x", labelX - labelHitW / 2).attr("y", secY - BAND_HEIGHT / 2).attr("width", labelHitW).attr("height", BAND_HEIGHT).attr("fill", "transparent").attr("class", "section-label-hit");
|
|
@@ -2318,7 +2245,10 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
2318
2245
|
const box = noteBoxes.get(el);
|
|
2319
2246
|
if (box === void 0) continue;
|
|
2320
2247
|
const { x: noteX, y: noteTopY, width: noteW, height: noteH } = box;
|
|
2321
|
-
const noteG = svg.append("g").attr("class",
|
|
2248
|
+
const noteG = svg.append("g").attr("class", box.folded ? "note note-collapsed" : "note").attr("data-line-number", String(el.lineNumber)).attr("data-line-end", String(el.endLineNumber));
|
|
2249
|
+
if (box.foldable) {
|
|
2250
|
+
noteG.attr("data-note-toggle", String(el.lineNumber)).attr("role", "button").attr("aria-expanded", box.folded ? "false" : "true").attr("aria-label", el.text.split("\n")[0]).style("cursor", "pointer");
|
|
2251
|
+
}
|
|
2322
2252
|
noteG.append("path").attr(
|
|
2323
2253
|
"d",
|
|
2324
2254
|
[
|
|
@@ -2345,6 +2275,20 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
2345
2275
|
const textEl = noteG.append("text").attr("x", line.x).attr("y", line.y).attr("fill", palette.text).attr("font-size", sNoteFontSize).attr("class", "note-text");
|
|
2346
2276
|
renderInlineText(textEl, line.text, palette, sNoteFontSize);
|
|
2347
2277
|
}
|
|
2278
|
+
if (box.foldable) {
|
|
2279
|
+
renderCollapseBar(noteG, {
|
|
2280
|
+
expanded: !box.folded,
|
|
2281
|
+
x: noteX,
|
|
2282
|
+
y: noteTopY,
|
|
2283
|
+
width: noteW,
|
|
2284
|
+
height: noteH,
|
|
2285
|
+
rx: 0,
|
|
2286
|
+
fill: palette.textMuted,
|
|
2287
|
+
clipId: `clip-note-${String(el.lineNumber)}`,
|
|
2288
|
+
prefix: "sequence-note",
|
|
2289
|
+
scale: ctx
|
|
2290
|
+
});
|
|
2291
|
+
}
|
|
2348
2292
|
} else if (isSequenceBlock(el)) {
|
|
2349
2293
|
renderNoteElements(el.children);
|
|
2350
2294
|
if (el.elseIfBranches) {
|
|
@@ -2468,7 +2412,6 @@ function renderParticipant(svg, participant, cx, cy, palette, isDark, color, tag
|
|
|
2468
2412
|
}
|
|
2469
2413
|
|
|
2470
2414
|
export {
|
|
2471
|
-
applyCollapseProjection,
|
|
2472
2415
|
groupMessagesBySection,
|
|
2473
2416
|
summarizeSectionParticipation,
|
|
2474
2417
|
buildRenderSequence,
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
META_FONT_SIZE,
|
|
5
5
|
META_LINE_HEIGHT,
|
|
6
6
|
SEPARATOR_GAP
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WH6E6SHC.js";
|
|
8
8
|
import {
|
|
9
9
|
injectDefaultTagMetadata,
|
|
10
10
|
resolveTagColor,
|
|
11
11
|
tagAttrKey
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KW3CC7SB.js";
|
|
13
13
|
import {
|
|
14
14
|
LEGEND_CAPSULE_PAD,
|
|
15
15
|
LEGEND_DOT_R,
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
LEGEND_PILL_FONT_SIZE,
|
|
24
24
|
LEGEND_PILL_PAD,
|
|
25
25
|
measureLegendText
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-OZXKW5NA.js";
|
|
27
27
|
import {
|
|
28
28
|
measureText
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-PU5X3P3T.js";
|
|
30
30
|
|
|
31
31
|
// src/sitemap/layout.ts
|
|
32
32
|
import dagre from "@dagrejs/dagre";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/journey-map/collapse.ts
|
|
2
|
+
function collapsedJourneyPhasesFromSource(parsed, interactive) {
|
|
3
|
+
const names = new Set(interactive ?? []);
|
|
4
|
+
for (const phase of parsed.phases) {
|
|
5
|
+
if (phase.collapsed) names.add(phase.name);
|
|
6
|
+
}
|
|
7
|
+
return names;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
collapsedJourneyPhasesFromSource
|
|
12
|
+
};
|