@diagrammo/dgmo 0.88.0 → 0.90.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 +5 -3
- package/dist/advanced.d.ts +472 -22
- package/dist/advanced.js +401 -240
- package/dist/{analyzer-R5UBTRO2.js → analyzer-7ZGAZIE6.js} +2 -2
- package/dist/block.d.ts +1 -1
- package/dist/block.js +95 -72
- package/dist/{calculator-35YVW4QO.js → calculator-PX3JHKAS.js} +2 -2
- package/dist/{chart-meta-PbgpGwYo.d.ts → chart-meta-B_WTMP0y.d.ts} +1 -1
- package/dist/chart-meta.d.ts +2 -2
- package/dist/chart-meta.js +22 -21
- package/dist/{chart-types-Db_EGf1o.d.ts → chart-types-V2NcgN5O.d.ts} +5 -1
- package/dist/{charts-d3-3BZRSZV6.js → charts-d3-QW4ERNUE.js} +13 -12
- package/dist/{chunk-O6MMQQLF.js → chunk-2EDJPHXQ.js} +17 -17
- package/dist/{chunk-7WGCQE2E.js → chunk-2ZVLI6GQ.js} +1 -1
- package/dist/{chunk-JLETTWUJ.js → chunk-3BQCSQQJ.js} +57 -28
- package/dist/{chunk-MVCPO6LI.js → chunk-3HBR3YAN.js} +37 -27
- package/dist/chunk-3UR4F7FE.js +14 -0
- package/dist/{chunk-IDJGV6VM.js → chunk-4HG4PYHM.js} +209 -1
- package/dist/{chunk-YMG7JDEY.js → chunk-4IYJOXGS.js} +78 -31
- package/dist/{chunk-BOO24UMJ.js → chunk-4YO7VJTP.js} +1 -1
- package/dist/{chunk-AAMCXQPP.js → chunk-54YUDXGP.js} +6 -6
- package/dist/{chunk-UG2XG57E.js → chunk-5M52RPAS.js} +2 -2
- package/dist/{chunk-UNAP6O26.js → chunk-5M6PMV5Z.js} +14 -14
- package/dist/{chunk-BMUWF77V.js → chunk-5MDQMB6A.js} +4 -4
- package/dist/{chunk-WPL5PFXE.js → chunk-5TZPIKNV.js} +5 -5
- package/dist/{chunk-VPASQOR3.js → chunk-62VWZ3SE.js} +6 -5
- package/dist/{chunk-N4XHXBDQ.js → chunk-64KSPLU2.js} +6 -5
- package/dist/{chunk-VEPIAUSK.js → chunk-6BQSDF77.js} +1 -5
- package/dist/{chunk-LNO3ASX5.js → chunk-A5EE66RQ.js} +2 -2
- package/dist/{chunk-5KGM44TG.js → chunk-A5PUOHIS.js} +4 -4
- package/dist/{chunk-UNNJCSSQ.js → chunk-AAC3XQWV.js} +3 -3
- package/dist/{chunk-VJ2KROJ5.js → chunk-AHWA36O7.js} +1 -1
- package/dist/{chunk-FKZ2Y3Q5.js → chunk-C4W62JZO.js} +2 -2
- package/dist/{chunk-6I5UN4FD.js → chunk-CDT33RHG.js} +4 -4
- package/dist/{chunk-3DOQOXXI.js → chunk-CNUN5GO6.js} +1 -1
- package/dist/{chunk-NF5YKFRH.js → chunk-COPSI54O.js} +3 -3
- package/dist/{chunk-GUTZCRBT.js → chunk-CUY56BK4.js} +2 -2
- package/dist/{chunk-HSRQDWV7.js → chunk-CYF2X3CG.js} +2 -11
- package/dist/{chunk-NGC3IZRY.js → chunk-DNMICILX.js} +2 -2
- package/dist/{chunk-CFBY77QJ.js → chunk-DXPT2HPH.js} +145 -156
- package/dist/{chunk-J7Q4VPBJ.js → chunk-EB7AEM2H.js} +28 -22
- package/dist/{chunk-MGBV4JEI.js → chunk-EDXGEQW3.js} +1 -1
- package/dist/{chunk-H2GEIFUF.js → chunk-EEYQFJVK.js} +154 -48
- package/dist/{chunk-FPXMCGS5.js → chunk-EK7JYFCL.js} +2 -2
- package/dist/{chunk-3C2FWS2J.js → chunk-EWERNTOX.js} +1 -1
- package/dist/{chunk-WZ23JJ7U.js → chunk-FDRHBQUG.js} +26 -24
- package/dist/{chunk-FJNXXGTR.js → chunk-FS2LZBHG.js} +2 -2
- package/dist/{chunk-ERNCPKD4.js → chunk-G2KHLANR.js} +1 -1
- package/dist/{chunk-XVSJYAK7.js → chunk-G5BGW4BX.js} +2 -2
- package/dist/{chunk-33FQ6HNV.js → chunk-GQVXYRPC.js} +9 -9
- package/dist/{chunk-MHAYUS65.js → chunk-GXP344YZ.js} +3 -3
- package/dist/{chunk-NJIGYGZS.js → chunk-GYBKG4Z6.js} +15 -10
- package/dist/{chunk-MSXRNVHB.js → chunk-HIVJBESO.js} +311 -72
- package/dist/{chunk-UY6TEJJH.js → chunk-HJRP6PXL.js} +1 -1
- package/dist/{chunk-DOXBS7F5.js → chunk-HLE5QGZJ.js} +4 -4
- package/dist/{chunk-L5AFONQU.js → chunk-HX2KJEPD.js} +1 -1
- package/dist/{chunk-LL6D3MES.js → chunk-I6FWHICD.js} +19 -19
- package/dist/{chunk-RH2PROYG.js → chunk-I6GGMCTV.js} +4 -2
- package/dist/{chunk-3RYBTEF5.js → chunk-I74AQRVD.js} +6 -12
- package/dist/{chunk-PLE2432T.js → chunk-ICYPGWOV.js} +3 -3
- package/dist/chunk-IHK3Y2HG.js +781 -0
- package/dist/{chunk-JD4RHBNX.js → chunk-IMHNZITR.js} +9 -9
- package/dist/{chunk-GUYVKGFN.js → chunk-IRVQT4GR.js} +3 -3
- package/dist/{chunk-XUDGZJTJ.js → chunk-J3ODKAWN.js} +8 -8
- package/dist/{chunk-UMRZPRAN.js → chunk-JRQ4LBQI.js} +20 -20
- package/dist/{chunk-MY6GUH26.js → chunk-JX4RCC6B.js} +2 -2
- package/dist/{chunk-DSG6GBUQ.js → chunk-K4GUO7FV.js} +8 -8
- package/dist/{chunk-HAH5X345.js → chunk-KATED53P.js} +1 -1
- package/dist/{chunk-J64NZ6NF.js → chunk-KSZHIAI2.js} +1 -1
- package/dist/{chunk-7HWY4QAJ.js → chunk-L24LESXF.js} +1 -0
- package/dist/{chunk-UIUXIDBX.js → chunk-LBRHDWEA.js} +5 -5
- package/dist/{chunk-GSYZZFI5.js → chunk-LC5LY5V2.js} +2 -2
- package/dist/{chunk-P5V63L35.js → chunk-LNQDICFJ.js} +22 -22
- package/dist/{chunk-PIXJL77H.js → chunk-M6J25PAZ.js} +1 -1
- package/dist/{chunk-RGI64U3A.js → chunk-MIVSVEK4.js} +14 -14
- package/dist/{chunk-6K7RODXG.js → chunk-MKFQ5E7J.js} +1 -1
- package/dist/{chunk-44GP7PD5.js → chunk-MPJQMMBZ.js} +12 -0
- package/dist/{chunk-WQ6G6FFM.js → chunk-NFWRIC2V.js} +1 -1
- package/dist/{chunk-LHL6HDUL.js → chunk-NJYA4QSN.js} +84 -12
- package/dist/{chunk-RU725VCJ.js → chunk-NMKLX57Y.js} +10 -35
- package/dist/{chunk-PPH6ILHL.js → chunk-NP2SE6MQ.js} +4 -4
- package/dist/{chunk-FM3WAVB6.js → chunk-NS7L7YKH.js} +1 -1
- package/dist/{chunk-HEYGGSNQ.js → chunk-NTJ5HVV6.js} +5 -5
- package/dist/{chunk-BAZT6CIF.js → chunk-NUYWNKHH.js} +9 -9
- package/dist/{chunk-DV2VEJCC.js → chunk-NWSPPGIE.js} +6 -6
- package/dist/{chunk-AYOVY75O.js → chunk-NY56FM55.js} +3 -3
- package/dist/{chunk-LD2JSKU3.js → chunk-OOCVGX4W.js} +15 -0
- package/dist/{chunk-A4XPI4YN.js → chunk-OSIUWQ3N.js} +29 -2
- package/dist/{chunk-LJFXC3IP.js → chunk-OWJVSJLA.js} +17 -17
- package/dist/{chunk-GDJW64XE.js → chunk-OYKNMFUY.js} +1 -1
- package/dist/{chunk-YK4N6TBN.js → chunk-PIHAUVA4.js} +10 -10
- package/dist/{chunk-C7QRRTAW.js → chunk-PNCKZFPE.js} +2 -2
- package/dist/{chunk-D4M25W6R.js → chunk-POBNN5DP.js} +6 -6
- package/dist/{chunk-N7XRBWXA.js → chunk-PQ5NW3QZ.js} +15 -15
- package/dist/{chunk-HTPZDZKQ.js → chunk-PXEUQ7EG.js} +22 -22
- package/dist/{chunk-XWYR5T52.js → chunk-QOZ4RVQY.js} +19 -19
- package/dist/{chunk-BV6PKJUS.js → chunk-QRIW46LR.js} +8 -8
- package/dist/{chunk-LSQGJN5H.js → chunk-R2PTZ6QM.js} +21 -21
- package/dist/{chunk-VW52W5F6.js → chunk-RCBHL2B5.js} +229 -159
- package/dist/{chunk-66YFDTT6.js → chunk-RJYFHEP4.js} +3 -3
- package/dist/{chunk-P3SKSKJI.js → chunk-RNXX2GOQ.js} +2 -2
- package/dist/{chunk-BT2WH2XT.js → chunk-RRBV4HIM.js} +3 -3
- package/dist/{chunk-WXPBP4IT.js → chunk-RY5RRKYN.js} +14 -14
- package/dist/{chunk-NZCSVD4M.js → chunk-S4LLHDGK.js} +8 -8
- package/dist/chunk-S7C32S2T.js +825 -0
- package/dist/{chunk-QFIXL3OK.js → chunk-SEKNYIMO.js} +1 -1
- package/dist/{chunk-JRUEIRJB.js → chunk-SLO22FPS.js} +2 -2
- package/dist/{chunk-47E5UTXE.js → chunk-SMEVBJJJ.js} +2 -2
- package/dist/{chunk-QFHWYWQL.js → chunk-SVQDLYX7.js} +1 -1
- package/dist/{chunk-WP2RLGDI.js → chunk-TCX5PMEY.js} +1 -1
- package/dist/{chunk-5LD7SHXO.js → chunk-TQ644YGV.js} +18 -18
- package/dist/{chunk-PUVTFUNH.js → chunk-U762HK4D.js} +28 -28
- package/dist/{chunk-DAX42XVH.js → chunk-VCHYS3RD.js} +14 -9
- package/dist/{chunk-XIFK423U.js → chunk-W7QN5BC5.js} +4 -4
- package/dist/{chunk-7UDAIP6W.js → chunk-WHRIN7N3.js} +1 -1
- package/dist/{chunk-ZUCXFXLD.js → chunk-X3WYJ5T7.js} +2 -2
- package/dist/{chunk-RE6TVIAV.js → chunk-X6IZP2BD.js} +4 -4
- package/dist/{chunk-LCJURK7L.js → chunk-Y6GQQ4Y2.js} +1 -1
- package/dist/{chunk-HTWH2XQL.js → chunk-YE7D2S75.js} +2 -2
- package/dist/{chunk-B7CU2HW5.js → chunk-YKGUSW6D.js} +17 -17
- package/dist/{chunk-AQIBKTPG.js → chunk-YWRZG6GN.js} +10 -10
- package/dist/{chunk-JQ57AWDL.js → chunk-ZJ4PYTCK.js} +1 -1
- package/dist/completion-registry.d.ts +7 -1
- package/dist/completion-registry.js +64 -20
- package/dist/countdown.js +1 -1
- package/dist/{d3-B6524aaP.d.ts → d3-2S3PrXik.d.ts} +11 -0
- package/dist/dgmo-router-BJBXSZMV.js +94 -0
- package/dist/{dimensions-6QAWEGIR.js → dimensions-AMA2S7RO.js} +7 -7
- package/dist/editor.js +12 -0
- package/dist/{flowchart-parser-GG7XBLQH.js → flowchart-parser-ADZIFVCH.js} +3 -3
- package/dist/{flowchart-renderer-THC6Y7EH.js → flowchart-renderer-CAG6ZNJ6.js} +10 -9
- package/dist/highlight.js +12 -0
- package/dist/index.d.ts +26 -5
- package/dist/index.js +94 -67
- package/dist/{layout-P6DTD4RT.js → layout-4RRC7XU7.js} +2 -2
- package/dist/{layout-LUQKAGGT.js → layout-6OSF2UGP.js} +5 -5
- package/dist/{layout-AM57TGN5.js → layout-C6MKMOBI.js} +3 -3
- package/dist/{layout-EHTYSMV4.js → layout-H4K54IW3.js} +2 -2
- package/dist/{layout-XUW444O5.js → layout-QS2SESBU.js} +3 -3
- package/dist/{layout-5NPBHV5F.js → layout-T2PGKQUQ.js} +4 -4
- package/dist/{layout-CUFA7XJD.js → layout-UFB2O4AO.js} +5 -5
- package/dist/{layout-MSSHF45T.js → layout-UPQGIT3N.js} +2 -2
- package/dist/{layout-QX5T6ZNE.js → layout-VQ2USZJ3.js} +5 -5
- package/dist/{layout-SOPAVXIH.js → layout-VRJ5YFUE.js} +3 -3
- package/dist/{layout-BOVTLAOT.js → layout-ZP7XYVXF.js} +2 -2
- package/dist/{layout-search-VKSBUCDM.js → layout-search-YKUL4VBV.js} +105 -6
- package/dist/{legend-constants-ZVO4FLAK.js → legend-constants-HE7FVDJP.js} +4 -2
- package/dist/{palettes-BIV54XLS.js → palettes-WQHELGVQ.js} +7 -4
- package/dist/{parser-KYPP2DX6.js → parser-223VOHSB.js} +4 -4
- package/dist/{parser-JOOAVBJI.js → parser-2PNV7UI3.js} +3 -3
- package/dist/{parser-GZ3LVF72.js → parser-3MGA2MTM.js} +2 -2
- package/dist/{parser-NOANDFJ4.js → parser-4AR25MAS.js} +2 -2
- package/dist/{parser-ACW6C6OY.js → parser-4B2PIXHI.js} +3 -3
- package/dist/{parser-KZMJNKDW.js → parser-57YQEEMC.js} +2 -2
- package/dist/{parser-J4DVNL4W.js → parser-5ZD2NKGU.js} +4 -4
- package/dist/{parser-LANGKWRG.js → parser-6LMB7BQQ.js} +2 -2
- package/dist/parser-AL6YL7KM.js +12 -0
- package/dist/{parser-5655XSOR.js → parser-B2FWP7ZO.js} +3 -3
- package/dist/{parser-GEKPWSSK.js → parser-BJDQX4KV.js} +3 -3
- package/dist/{parser-C327BBE3.js → parser-CA5WC5HF.js} +3 -3
- package/dist/{parser-KZMALSB2.js → parser-E5HFYL7B.js} +4 -4
- package/dist/{parser-WUK6CP5X.js → parser-ESZ5J5IJ.js} +6 -5
- package/dist/{parser-256EIWB2.js → parser-FDXUQ5TI.js} +2 -2
- package/dist/{parser-AN3MGHRL.js → parser-FV6RGALQ.js} +3 -3
- package/dist/{parser-DGF3ZEO6.js → parser-HPR7G7F6.js} +3 -3
- package/dist/{parser-OKB64MMN.js → parser-I4HZVIHX.js} +3 -3
- package/dist/{parser-JXS4426S.js → parser-J3BM2AP2.js} +4 -4
- package/dist/{parser-NPXPJHWN.js → parser-JFNDS5E5.js} +3 -3
- package/dist/{parser-PVIWHVGY.js → parser-KFIK3EOO.js} +3 -3
- package/dist/{parser-GPW4ZHPQ.js → parser-LGUT7KKH.js} +4 -3
- package/dist/{parser-KFYRTGTC.js → parser-MYRGCK7Q.js} +4 -4
- package/dist/{parser-ZLKYDFI5.js → parser-NAUUUCI3.js} +3 -3
- package/dist/{parser-DHSFIUPU.js → parser-NJ5VEZA3.js} +3 -3
- package/dist/{parser-OVQTTTUJ.js → parser-OFTMA36M.js} +2 -2
- package/dist/{parser-AKBVJHMK.js → parser-OV2WDSEV.js} +3 -3
- package/dist/{parser-LGS65QPN.js → parser-Q3UAOLEZ.js} +2 -2
- package/dist/{parser-XYY5NHP4.js → parser-R6OETHWM.js} +2 -2
- package/dist/{parser-7OEE7QT6.js → parser-RARXAHC7.js} +2 -2
- package/dist/{parser-NGHQQGD2.js → parser-T2RVIRDG.js} +3 -3
- package/dist/{parser-WEVTMBJ5.js → parser-W2DWCCLO.js} +3 -3
- package/dist/{parser-HCGXNHHL.js → parser-WFY4ZJUW.js} +3 -3
- package/dist/{parser-SA3RAJFS.js → parser-WSONWDFN.js} +2 -2
- package/dist/{renderer-2OOPQ4CH.js → renderer-3N64GVNM.js} +3 -3
- package/dist/{renderer-4BIMRO4X.js → renderer-3QM2DK7I.js} +7 -7
- package/dist/{renderer-4NZZ5J2F.js → renderer-3W5T3IU6.js} +8 -8
- package/dist/{renderer-RWJ45DWH.js → renderer-4Z7FRQ2A.js} +3 -3
- package/dist/{renderer-LODEVN3V.js → renderer-52CHSV6S.js} +13 -13
- package/dist/{renderer-X5A5VIRD.js → renderer-6OOJNEQE.js} +10 -10
- package/dist/{renderer-YDAVCRTP.js → renderer-A3PMPUO6.js} +15 -11
- package/dist/{renderer-NHPKNNBD.js → renderer-AM4VZSBQ.js} +11 -11
- package/dist/{renderer-SDUSBCJI.js → renderer-B3CPMS5R.js} +10 -10
- package/dist/{renderer-TPOZOAXR.js → renderer-B4KE3NM4.js} +17 -16
- package/dist/renderer-COSJM7UG.js +80 -0
- package/dist/{renderer-R34GJL7U.js → renderer-FXCVH2M5.js} +16 -15
- package/dist/{renderer-QM23SWAM.js → renderer-GWH5ACJ5.js} +4 -4
- package/dist/{renderer-222OTVQV.js → renderer-IG72UJHW.js} +5 -5
- package/dist/{renderer-A6ACVK4X.js → renderer-IO3D5E4E.js} +7 -7
- package/dist/{renderer-RMGN3Q7D.js → renderer-IPDCAACY.js} +5 -5
- package/dist/{renderer-XUPLAO4B.js → renderer-KK5BU5K2.js} +8 -8
- package/dist/{renderer-DCFQDBGJ.js → renderer-LD2H7WGP.js} +3 -3
- package/dist/{renderer-KVAQE7PQ.js → renderer-MK47ESCB.js} +8 -8
- package/dist/{renderer-4BHOELCE.js → renderer-MRMFYYZT.js} +3 -3
- package/dist/{renderer-6BUUTWVS.js → renderer-O5RQHGK2.js} +9 -9
- package/dist/{renderer-2KVQGGTT.js → renderer-OA5D3ZKB.js} +10 -10
- package/dist/{renderer-RENDISO5.js → renderer-ON4PTUHJ.js} +14 -14
- package/dist/{renderer-JKV2DBYP.js → renderer-OPDSKCQS.js} +7 -7
- package/dist/{renderer-XRALFCIN.js → renderer-PLRMST57.js} +10 -10
- package/dist/{renderer-WH2HWE5Z.js → renderer-PSMRAL72.js} +11 -11
- package/dist/{renderer-RNCYODNF.js → renderer-PXGCR7N4.js} +11 -10
- package/dist/{renderer-PQYO2HCE.js → renderer-R7OYCJEA.js} +4 -4
- package/dist/{renderer-36JH4OMC.js → renderer-SBXCPA3S.js} +12 -12
- package/dist/{renderer-A4LMOBZL.js → renderer-TMQNTUQS.js} +15 -15
- package/dist/renderer-TTKTBB4C.js +46 -0
- package/dist/{renderer-RAATRF6W.js → renderer-UVFGW2O6.js} +12 -10
- package/dist/{renderer-3FF4QVGW.js → renderer-W22GX72R.js} +10 -10
- package/dist/{renderer-BICLPGAH.js → renderer-WQ654YT5.js} +2 -2
- package/dist/{renderer-radial-XZ5TKUT4.js → renderer-radial-42LVSG74.js} +8 -8
- package/dist/{state-parser-FE3RF6XY.js → state-parser-ROKY5KSI.js} +4 -4
- package/dist/{state-renderer-5IQ4OJUI.js → state-renderer-MMG23G4W.js} +14 -14
- package/dist/{themes-CzuBdx1T.d.ts → themes-Cm2YBcT8.d.ts} +38 -2
- package/docs/ai-integration.md +8 -5
- package/docs/language-reference.md +163 -13
- package/gallery/fixtures/sketch.dgmo +2 -2
- package/gallery/fixtures/whiteboard.dgmo +18 -0
- package/package.json +2 -1
- package/dist/dgmo-router-F2DSURTR.js +0 -92
- package/dist/renderer-YIZ7G4HU.js +0 -78
- package/dist/{chunk-3TYUXC7D.js → chunk-2SKMEL7V.js} +0 -0
- package/dist/{chunk-CLQIXD2C.js → chunk-7Z2VFRP5.js} +3 -3
- package/dist/{chunk-2A4DQAXG.js → chunk-IIOLFAGJ.js} +3 -3
|
@@ -5,6 +5,11 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
ScaleContext
|
|
7
7
|
} from "./chunk-24YPR5EH.js";
|
|
8
|
+
import {
|
|
9
|
+
keepSwimlaneToggleFocus,
|
|
10
|
+
renderIntegratedLegend,
|
|
11
|
+
wireSwimlaneToggle
|
|
12
|
+
} from "./chunk-NJYA4QSN.js";
|
|
8
13
|
import {
|
|
9
14
|
EDGE_DASH,
|
|
10
15
|
GRID_DASH,
|
|
@@ -13,23 +18,29 @@ import {
|
|
|
13
18
|
import {
|
|
14
19
|
INLINE_HEADER_PAD,
|
|
15
20
|
layoutInlineHeader
|
|
16
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-CNUN5GO6.js";
|
|
22
|
+
import {
|
|
23
|
+
controlsGroupCapsuleWidth,
|
|
24
|
+
getLegendExtent,
|
|
25
|
+
getMaxLegendReservedHeight
|
|
26
|
+
} from "./chunk-NS7L7YKH.js";
|
|
17
27
|
import {
|
|
18
28
|
TITLE_FONT_SIZE,
|
|
19
29
|
TITLE_FONT_WEIGHT,
|
|
20
30
|
TITLE_Y
|
|
21
31
|
} from "./chunk-VLC6WNRD.js";
|
|
22
|
-
import {
|
|
23
|
-
renderIntegratedLegend
|
|
24
|
-
} from "./chunk-LHL6HDUL.js";
|
|
25
|
-
import {
|
|
26
|
-
controlsGroupCapsuleWidth,
|
|
27
|
-
getLegendExtent,
|
|
28
|
-
getMaxLegendReservedHeight
|
|
29
|
-
} from "./chunk-FM3WAVB6.js";
|
|
30
32
|
import {
|
|
31
33
|
FONT_FAMILY
|
|
32
34
|
} from "./chunk-ICLB27PZ.js";
|
|
35
|
+
import {
|
|
36
|
+
normalizeName
|
|
37
|
+
} from "./chunk-NOTA6TEI.js";
|
|
38
|
+
import {
|
|
39
|
+
UNTAGGED_TAG_COLOR,
|
|
40
|
+
resolveActiveTagGroup,
|
|
41
|
+
resolveTagColor,
|
|
42
|
+
tagAttrKey
|
|
43
|
+
} from "./chunk-HX2KJEPD.js";
|
|
33
44
|
import {
|
|
34
45
|
LEGEND_CAPSULE_PAD,
|
|
35
46
|
LEGEND_DOT_R,
|
|
@@ -44,28 +55,19 @@ import {
|
|
|
44
55
|
LEGEND_PILL_PAD,
|
|
45
56
|
measureLegendText,
|
|
46
57
|
truncateLegendText
|
|
47
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-I6GGMCTV.js";
|
|
48
59
|
import {
|
|
49
60
|
CHAR_WIDTH_RATIO,
|
|
50
61
|
measureText,
|
|
51
62
|
truncateText
|
|
52
63
|
} from "./chunk-KAO7JL4I.js";
|
|
53
|
-
import {
|
|
54
|
-
normalizeName
|
|
55
|
-
} from "./chunk-NOTA6TEI.js";
|
|
56
|
-
import {
|
|
57
|
-
UNTAGGED_TAG_COLOR,
|
|
58
|
-
resolveActiveTagGroup,
|
|
59
|
-
resolveTagColor,
|
|
60
|
-
tagAttrKey
|
|
61
|
-
} from "./chunk-L5AFONQU.js";
|
|
62
64
|
import {
|
|
63
65
|
contrastText,
|
|
64
66
|
getEraColors,
|
|
65
67
|
getSeriesColors,
|
|
66
68
|
mix,
|
|
67
69
|
shapeFill
|
|
68
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-L24LESXF.js";
|
|
69
71
|
|
|
70
72
|
// src/gantt/renderer.ts
|
|
71
73
|
import * as d3Scale from "d3-scale";
|
|
@@ -131,6 +133,12 @@ function appendTaskIcon(textEl, label, isMilestone, iconColor, textColor) {
|
|
|
131
133
|
textEl.append("tspan").attr("fill", textColor).text(" " + label);
|
|
132
134
|
}
|
|
133
135
|
function renderGantt(container, resolved, palette, isDark, options, exportDims) {
|
|
136
|
+
keepSwimlaneToggleFocus(
|
|
137
|
+
container,
|
|
138
|
+
() => drawGantt(container, resolved, palette, isDark, options, exportDims)
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
function drawGantt(container, resolved, palette, isDark, options, exportDims) {
|
|
134
142
|
container.innerHTML = "";
|
|
135
143
|
bandClipCounter = 0;
|
|
136
144
|
if (resolved.tasks.length === 0) return;
|
|
@@ -1243,7 +1251,7 @@ function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargi
|
|
|
1243
1251
|
const showIcon = !legendViewMode && tagGroups.length > 0;
|
|
1244
1252
|
const iconReserve = showIcon ? LEGEND_ICON_W : 0;
|
|
1245
1253
|
const legendGroups = visibleGroups.map((g) => {
|
|
1246
|
-
const key = g.name
|
|
1254
|
+
const key = tagAttrKey(g.name);
|
|
1247
1255
|
const entries = filteredEntries.get(key) ?? g.entries;
|
|
1248
1256
|
return {
|
|
1249
1257
|
name: g.name,
|
|
@@ -1326,15 +1334,17 @@ function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargi
|
|
|
1326
1334
|
isSwimlane,
|
|
1327
1335
|
palette
|
|
1328
1336
|
);
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1337
|
+
wireSwimlaneToggle(
|
|
1338
|
+
iconEl,
|
|
1339
|
+
groupName,
|
|
1340
|
+
isSwimlane,
|
|
1341
|
+
!!onSwimlaneChange,
|
|
1342
|
+
() => {
|
|
1343
|
+
onSwimlaneChange?.(
|
|
1334
1344
|
currentSwimlaneGroup?.toLowerCase() === groupName.toLowerCase() ? null : groupName
|
|
1335
1345
|
);
|
|
1336
1346
|
}
|
|
1337
|
-
|
|
1347
|
+
);
|
|
1338
1348
|
}
|
|
1339
1349
|
}
|
|
1340
1350
|
};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BUILT_IN_PALETTE_IDS
|
|
3
|
+
} from "./chunk-3UR4F7FE.js";
|
|
4
|
+
import {
|
|
5
|
+
apcaContrast,
|
|
6
|
+
contrastRatio,
|
|
7
|
+
contrastText,
|
|
8
|
+
shapeFill
|
|
9
|
+
} from "./chunk-L24LESXF.js";
|
|
10
|
+
|
|
1
11
|
// src/palettes/registry.ts
|
|
2
12
|
var PALETTE_REGISTRY = /* @__PURE__ */ new Map();
|
|
3
13
|
var DEFAULT_PALETTE_ID = "slate";
|
|
@@ -13,7 +23,9 @@ var COLOR_KEYS = [
|
|
|
13
23
|
"purple",
|
|
14
24
|
"teal",
|
|
15
25
|
"cyan",
|
|
16
|
-
"gray"
|
|
26
|
+
"gray",
|
|
27
|
+
"black",
|
|
28
|
+
"white"
|
|
17
29
|
];
|
|
18
30
|
var SEMANTIC_KEYS = [
|
|
19
31
|
"bg",
|
|
@@ -22,6 +34,8 @@ var SEMANTIC_KEYS = [
|
|
|
22
34
|
"border",
|
|
23
35
|
"text",
|
|
24
36
|
"textMuted",
|
|
37
|
+
"textOnFillLight",
|
|
38
|
+
"textOnFillDark",
|
|
25
39
|
"primary",
|
|
26
40
|
"secondary",
|
|
27
41
|
"accent",
|
|
@@ -67,6 +81,197 @@ function getAvailablePalettes() {
|
|
|
67
81
|
);
|
|
68
82
|
}
|
|
69
83
|
|
|
84
|
+
// src/palettes/theme-file.ts
|
|
85
|
+
var CONTRAST_FLOOR = 4.5;
|
|
86
|
+
var SOLID_FLOOR_LC = 45;
|
|
87
|
+
var FILL_ACCENT_KEYS = [
|
|
88
|
+
"primary",
|
|
89
|
+
"secondary",
|
|
90
|
+
"accent",
|
|
91
|
+
"destructive"
|
|
92
|
+
];
|
|
93
|
+
var CONTRAST_EXEMPT = /* @__PURE__ */ new Set([
|
|
94
|
+
"black",
|
|
95
|
+
"white"
|
|
96
|
+
]);
|
|
97
|
+
function isRecord(value) {
|
|
98
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
99
|
+
}
|
|
100
|
+
function collectShapeErrors(value, mode, errors) {
|
|
101
|
+
if (!isRecord(value)) {
|
|
102
|
+
errors.push(
|
|
103
|
+
`${mode}: expected an object of colors, got ${describe(value)}`
|
|
104
|
+
);
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
const before = errors.length;
|
|
108
|
+
const fields = /* @__PURE__ */ new Set([...SEMANTIC_KEYS, "colors"]);
|
|
109
|
+
for (const key of Object.keys(value)) {
|
|
110
|
+
if (!fields.has(key)) {
|
|
111
|
+
errors.push(`${mode}.${key}: not a palette field`);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
for (const key of SEMANTIC_KEYS) {
|
|
115
|
+
const hex = value[key];
|
|
116
|
+
if (typeof hex !== "string" || !isValidHex(hex)) {
|
|
117
|
+
errors.push(`${mode}.${key}: invalid hex ${describe(hex)}`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
const named = value["colors"];
|
|
121
|
+
if (!isRecord(named)) {
|
|
122
|
+
errors.push(
|
|
123
|
+
`${mode}.colors: expected an object of named colors, got ${describe(named)}`
|
|
124
|
+
);
|
|
125
|
+
} else {
|
|
126
|
+
const names = new Set(COLOR_KEYS);
|
|
127
|
+
for (const key of Object.keys(named)) {
|
|
128
|
+
if (!names.has(key)) {
|
|
129
|
+
errors.push(
|
|
130
|
+
`${mode}.colors.${key}: not a palette color \u2014 a theme sets the existing color names and cannot add one`
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
for (const key of COLOR_KEYS) {
|
|
135
|
+
const hex = named[key];
|
|
136
|
+
if (typeof hex !== "string" || !isValidHex(hex)) {
|
|
137
|
+
errors.push(`${mode}.colors.${key}: invalid hex ${describe(hex)}`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return errors.length === before;
|
|
142
|
+
}
|
|
143
|
+
function describe(value) {
|
|
144
|
+
if (value === void 0) return "nothing";
|
|
145
|
+
if (typeof value === "string") return `"${value}"`;
|
|
146
|
+
if (value === null) return "null";
|
|
147
|
+
return typeof value;
|
|
148
|
+
}
|
|
149
|
+
function intents(colors) {
|
|
150
|
+
const out = [];
|
|
151
|
+
for (const key of COLOR_KEYS) {
|
|
152
|
+
if (CONTRAST_EXEMPT.has(key)) continue;
|
|
153
|
+
out.push([`colors.${key}`, colors.colors[key]]);
|
|
154
|
+
}
|
|
155
|
+
for (const key of FILL_ACCENT_KEYS) out.push([key, colors[key]]);
|
|
156
|
+
return out;
|
|
157
|
+
}
|
|
158
|
+
function drawnToken(colors, bg) {
|
|
159
|
+
const drawn = contrastText(bg, colors.textOnFillLight, colors.textOnFillDark);
|
|
160
|
+
return drawn === colors.textOnFillDark ? "textOnFillDark" : "textOnFillLight";
|
|
161
|
+
}
|
|
162
|
+
function worstTintedFill(colors, isDark) {
|
|
163
|
+
let worst;
|
|
164
|
+
for (const [fill, intent] of intents(colors)) {
|
|
165
|
+
const fillHex = shapeFill(colors, intent, isDark);
|
|
166
|
+
const token = drawnToken(colors, fillHex);
|
|
167
|
+
const ratio = contrastRatio(colors[token], fillHex);
|
|
168
|
+
if (!worst || ratio < worst.ratio) {
|
|
169
|
+
worst = { ratio, token, fill, fillHex };
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return worst;
|
|
173
|
+
}
|
|
174
|
+
function worstSolidFill(colors) {
|
|
175
|
+
let worst;
|
|
176
|
+
for (const [fill, intent] of intents(colors)) {
|
|
177
|
+
const token = drawnToken(colors, intent);
|
|
178
|
+
const lc = Math.abs(apcaContrast(colors[token], intent));
|
|
179
|
+
if (!worst || lc < worst.lc) {
|
|
180
|
+
worst = { lc, token, fill, fillHex: intent };
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return worst;
|
|
184
|
+
}
|
|
185
|
+
function collectContrastErrors(colors, where, isDark, errors) {
|
|
186
|
+
const tinted = worstTintedFill(colors, isDark);
|
|
187
|
+
if (tinted.ratio < CONTRAST_FLOOR) {
|
|
188
|
+
errors.push(
|
|
189
|
+
`${where}: ${tinted.token} ${colors[tinted.token]} on the ${tinted.fill} fill ${tinted.fillHex} reaches only ${tinted.ratio.toFixed(2)}:1 \u2014 text on a fill needs ${CONTRAST_FLOOR.toFixed(1)}:1`
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
function collectSolidErrors(colors, where, errors) {
|
|
194
|
+
const solid = worstSolidFill(colors);
|
|
195
|
+
if (solid.lc >= SOLID_FLOOR_LC) return;
|
|
196
|
+
errors.push(
|
|
197
|
+
`${where}: ${solid.token} ${colors[solid.token]} on the solid ${solid.fill} ${solid.fillHex} reaches only Lc ${solid.lc.toFixed(1)} \u2014 text on a solid fill needs Lc ${SOLID_FLOOR_LC}`
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
function validateThemeFile(input) {
|
|
201
|
+
const errors = [];
|
|
202
|
+
if (!isRecord(input)) {
|
|
203
|
+
return {
|
|
204
|
+
ok: false,
|
|
205
|
+
errors: [`expected a theme object, got ${describe(input)}`]
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
const id = input["id"];
|
|
209
|
+
if (typeof id !== "string" || id.trim() === "") {
|
|
210
|
+
errors.push(`id: expected a non-empty string, got ${describe(id)}`);
|
|
211
|
+
} else if (BUILT_IN_PALETTE_IDS.has(id)) {
|
|
212
|
+
errors.push(
|
|
213
|
+
`id: "${id}" is a built-in palette \u2014 a theme file needs an id of its own`
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
const name = input["name"];
|
|
217
|
+
if (typeof name !== "string" || name.trim() === "") {
|
|
218
|
+
errors.push(`name: expected a non-empty string, got ${describe(name)}`);
|
|
219
|
+
}
|
|
220
|
+
const declared = input["mode"];
|
|
221
|
+
let mode = null;
|
|
222
|
+
if (declared !== void 0) {
|
|
223
|
+
if (declared === "light" || declared === "dark") {
|
|
224
|
+
mode = declared;
|
|
225
|
+
} else {
|
|
226
|
+
errors.push(
|
|
227
|
+
`mode: expected "light" or "dark", got ${describe(declared)}`
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
if (mode) {
|
|
232
|
+
const other = mode === "light" ? "dark" : "light";
|
|
233
|
+
if (input[other] !== void 0) {
|
|
234
|
+
errors.push(
|
|
235
|
+
`${other}: a theme declaring mode "${mode}" must not also define ${other} \u2014 drop the mode to define both`
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
const wanted = mode ? [mode] : ["light", "dark"];
|
|
240
|
+
const modes = {};
|
|
241
|
+
for (const key of wanted) {
|
|
242
|
+
const value = input[key];
|
|
243
|
+
if (value === void 0) {
|
|
244
|
+
errors.push(
|
|
245
|
+
mode ? `${key}: a theme declaring mode "${mode}" has to define ${key}` : `${key}: a theme without a mode has to define both light and dark`
|
|
246
|
+
);
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
if (collectShapeErrors(value, key, errors)) modes[key] = value;
|
|
250
|
+
}
|
|
251
|
+
if (errors.length === 0) {
|
|
252
|
+
const light2 = modes.light ?? modes.dark;
|
|
253
|
+
const dark2 = modes.dark ?? modes.light;
|
|
254
|
+
const declaredMode = mode;
|
|
255
|
+
const label = (render) => declaredMode !== null && render !== declaredMode ? `${render} (a theme declaring mode "${declaredMode}" is used in ${render} mode too)` : render;
|
|
256
|
+
collectContrastErrors(light2, label("light"), false, errors);
|
|
257
|
+
collectContrastErrors(dark2, label("dark"), true, errors);
|
|
258
|
+
if (declaredMode !== null) {
|
|
259
|
+
collectSolidErrors(light2, declaredMode, errors);
|
|
260
|
+
} else {
|
|
261
|
+
collectSolidErrors(light2, "light", errors);
|
|
262
|
+
collectSolidErrors(dark2, "dark", errors);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if (errors.length > 0) return { ok: false, errors };
|
|
266
|
+
const light = modes.light ?? modes.dark;
|
|
267
|
+
const dark = modes.dark ?? modes.light;
|
|
268
|
+
return {
|
|
269
|
+
ok: true,
|
|
270
|
+
palette: { id, name, light, dark },
|
|
271
|
+
mode
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
|
|
70
275
|
// src/palettes/atlas.ts
|
|
71
276
|
var atlasPalette = {
|
|
72
277
|
id: "atlas",
|
|
@@ -786,10 +991,13 @@ var palettes = {
|
|
|
786
991
|
export {
|
|
787
992
|
DEFAULT_PALETTE_ID,
|
|
788
993
|
isValidHex,
|
|
994
|
+
COLOR_KEYS,
|
|
995
|
+
SEMANTIC_KEYS,
|
|
789
996
|
registerPalette,
|
|
790
997
|
getPalette,
|
|
791
998
|
resolvePaletteOrFallback,
|
|
792
999
|
getAvailablePalettes,
|
|
1000
|
+
validateThemeFile,
|
|
793
1001
|
atlasPalette,
|
|
794
1002
|
blueprintPalette,
|
|
795
1003
|
catppuccinPalette,
|
|
@@ -7,6 +7,9 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
ScaleContext
|
|
9
9
|
} from "./chunk-24YPR5EH.js";
|
|
10
|
+
import {
|
|
11
|
+
renderIntegratedLegend
|
|
12
|
+
} from "./chunk-NJYA4QSN.js";
|
|
10
13
|
import {
|
|
11
14
|
ARROWHEAD_HEIGHT,
|
|
12
15
|
ARROWHEAD_WIDTH,
|
|
@@ -16,49 +19,46 @@ import {
|
|
|
16
19
|
} from "./chunk-XCKNFFKM.js";
|
|
17
20
|
import {
|
|
18
21
|
layoutInlineHeader
|
|
19
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-CNUN5GO6.js";
|
|
23
|
+
import {
|
|
24
|
+
getLegendExtent,
|
|
25
|
+
getMaxLegendReservedHeight
|
|
26
|
+
} from "./chunk-NS7L7YKH.js";
|
|
20
27
|
import {
|
|
21
28
|
TITLE_FONT_SIZE,
|
|
22
29
|
TITLE_FONT_WEIGHT,
|
|
23
30
|
TITLE_Y
|
|
24
31
|
} from "./chunk-VLC6WNRD.js";
|
|
25
|
-
import {
|
|
26
|
-
renderIntegratedLegend
|
|
27
|
-
} from "./chunk-LHL6HDUL.js";
|
|
28
|
-
import {
|
|
29
|
-
getLegendExtent,
|
|
30
|
-
getMaxLegendReservedHeight
|
|
31
|
-
} from "./chunk-FM3WAVB6.js";
|
|
32
32
|
import {
|
|
33
33
|
FONT_FAMILY
|
|
34
34
|
} from "./chunk-ICLB27PZ.js";
|
|
35
|
-
import {
|
|
36
|
-
legendChromeColors
|
|
37
|
-
} from "./chunk-RH2PROYG.js";
|
|
38
|
-
import {
|
|
39
|
-
measureText,
|
|
40
|
-
truncateText
|
|
41
|
-
} from "./chunk-KAO7JL4I.js";
|
|
42
35
|
import {
|
|
43
36
|
isSequenceBlock,
|
|
44
37
|
isSequenceNote,
|
|
45
38
|
isSequenceSection
|
|
46
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-62VWZ3SE.js";
|
|
47
40
|
import {
|
|
48
41
|
resolveActiveTagGroup,
|
|
49
42
|
tagAttrKey
|
|
50
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-HX2KJEPD.js";
|
|
51
44
|
import {
|
|
52
45
|
fillModeFromOptions,
|
|
53
46
|
legendInlineRequested,
|
|
54
47
|
legendSuppressed
|
|
55
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
49
|
+
import {
|
|
50
|
+
legendChromeColors
|
|
51
|
+
} from "./chunk-I6GGMCTV.js";
|
|
52
|
+
import {
|
|
53
|
+
measureText,
|
|
54
|
+
truncateText
|
|
55
|
+
} from "./chunk-KAO7JL4I.js";
|
|
56
56
|
import {
|
|
57
57
|
contrastText,
|
|
58
58
|
mix,
|
|
59
59
|
shapeFill,
|
|
60
60
|
themeBaseBg
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-L24LESXF.js";
|
|
62
62
|
|
|
63
63
|
// src/sequence/renderer.ts
|
|
64
64
|
import * as d3Selection from "d3-selection";
|
|
@@ -284,6 +284,11 @@ var NOTE_LINE_H = 14;
|
|
|
284
284
|
var NOTE_GAP = 15;
|
|
285
285
|
var ACTIVATION_WIDTH = 10;
|
|
286
286
|
var ACTIVATION_IMPLICIT_END_CLEARANCE = 8;
|
|
287
|
+
var ACTIVATION_LABEL_GAP = 4;
|
|
288
|
+
var MSG_LABEL_FONT_SIZE = 12;
|
|
289
|
+
var MSG_LABEL_OFFSET = 8;
|
|
290
|
+
var RETURN_LABEL_FONT_SIZE = 11;
|
|
291
|
+
var RETURN_LABEL_OFFSET = 6;
|
|
287
292
|
var SELF_CALL_HEIGHT = 25;
|
|
288
293
|
var SELF_CALL_WIDTH = 30;
|
|
289
294
|
var ACTOR_LABEL_CLEARANCE = 22;
|
|
@@ -1152,6 +1157,55 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
1152
1157
|
const lifelineStartY0 = participantStartY + sBoxH;
|
|
1153
1158
|
const hasActors = participants.some((p) => p.type === "actor");
|
|
1154
1159
|
const messageStartOffset = sMsgStartOffset + (hasActors ? 20 : 0) + (parsed.groups.length > 0 ? groupBottomPad(0) : 0);
|
|
1160
|
+
const totalGaps = participants.length > 1 ? participants.length - 1 : 0;
|
|
1161
|
+
const numWithinGaps = totalGaps - numGroupGaps;
|
|
1162
|
+
let sWithinGap = sGap;
|
|
1163
|
+
let sBetweenGap = sGap;
|
|
1164
|
+
if (numGroupGaps > 0 && totalGaps > 0) {
|
|
1165
|
+
sWithinGap = sGap * 0.88;
|
|
1166
|
+
sBetweenGap = (totalGaps * sGap - numWithinGaps * sWithinGap) / numGroupGaps;
|
|
1167
|
+
}
|
|
1168
|
+
const ACTIVATION_NEST_OFFSET = ctx.structural(6);
|
|
1169
|
+
const labelRoomBefore = new Array(renderSteps.length).fill(0);
|
|
1170
|
+
{
|
|
1171
|
+
const relX = /* @__PURE__ */ new Map();
|
|
1172
|
+
let px = 0;
|
|
1173
|
+
participants.forEach((p, i) => {
|
|
1174
|
+
relX.set(p.id, px);
|
|
1175
|
+
if (i < participants.length - 1) {
|
|
1176
|
+
const nextId = participants[i + 1].id;
|
|
1177
|
+
px += groupBoundaryIds.has(nextId) ? sBetweenGap : sWithinGap;
|
|
1178
|
+
}
|
|
1179
|
+
});
|
|
1180
|
+
for (const act of activations) {
|
|
1181
|
+
if (!act.implicitEnd || act.endStep <= act.startStep) continue;
|
|
1182
|
+
const step = renderSteps[act.endStep];
|
|
1183
|
+
if (!step || step.from === step.to) continue;
|
|
1184
|
+
if (step.from === act.participantId || step.to === act.participantId) {
|
|
1185
|
+
continue;
|
|
1186
|
+
}
|
|
1187
|
+
const label = displayMessageLabel(step);
|
|
1188
|
+
const fromX = relX.get(step.from);
|
|
1189
|
+
const toX = relX.get(step.to);
|
|
1190
|
+
const barX = relX.get(act.participantId);
|
|
1191
|
+
if (!label || fromX === void 0 || toX === void 0) continue;
|
|
1192
|
+
if (barX === void 0) continue;
|
|
1193
|
+
const isCall = step.type === "call";
|
|
1194
|
+
const fontSize = isCall ? MSG_LABEL_FONT_SIZE : RETURN_LABEL_FONT_SIZE;
|
|
1195
|
+
const baseline = isCall ? MSG_LABEL_OFFSET : RETURN_LABEL_OFFSET;
|
|
1196
|
+
const halfW = measureText(label, fontSize) / 2 + sActivationWidth / 2 + 2;
|
|
1197
|
+
const midX = (fromX + toX) / 2;
|
|
1198
|
+
const left = barX - sActivationWidth / 2 + act.depth * ACTIVATION_NEST_OFFSET;
|
|
1199
|
+
if (midX + halfW <= left || midX - halfW >= left + sActivationWidth) {
|
|
1200
|
+
continue;
|
|
1201
|
+
}
|
|
1202
|
+
const room = baseline + fontSize + 2 + ACTIVATION_LABEL_GAP - ACTIVATION_IMPLICIT_END_CLEARANCE;
|
|
1203
|
+
labelRoomBefore[act.endStep] = Math.max(
|
|
1204
|
+
labelRoomBefore[act.endStep],
|
|
1205
|
+
room
|
|
1206
|
+
);
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1155
1209
|
const stepYPositions = [];
|
|
1156
1210
|
const sectionYPositions = /* @__PURE__ */ new Map();
|
|
1157
1211
|
let layoutEndY;
|
|
@@ -1172,6 +1226,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
1172
1226
|
const extra = extraBeforeMsg.get(step.messageIndex) || 0;
|
|
1173
1227
|
curY += extra;
|
|
1174
1228
|
}
|
|
1229
|
+
curY += labelRoomBefore[i];
|
|
1175
1230
|
stepYPositions.push(curY);
|
|
1176
1231
|
const isSelfCall = step.type === "call" && step.from === step.to;
|
|
1177
1232
|
curY += isSelfCall ? sSelfCallHeight + 25 : stepSpacing;
|
|
@@ -1250,14 +1305,6 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
1250
1305
|
}
|
|
1251
1306
|
const messageAreaHeight = contentBottomY - lifelineStartY0;
|
|
1252
1307
|
const lifelineLength = messageAreaHeight + sLifelineTail;
|
|
1253
|
-
const totalGaps = participants.length > 1 ? participants.length - 1 : 0;
|
|
1254
|
-
const numWithinGaps = totalGaps - numGroupGaps;
|
|
1255
|
-
let sWithinGap = sGap;
|
|
1256
|
-
let sBetweenGap = sGap;
|
|
1257
|
-
if (numGroupGaps > 0 && totalGaps > 0) {
|
|
1258
|
-
sWithinGap = sGap * 0.88;
|
|
1259
|
-
sBetweenGap = (totalGaps * sGap - numWithinGaps * sWithinGap) / numGroupGaps;
|
|
1260
|
-
}
|
|
1261
1308
|
const edgeProjection = (id) => {
|
|
1262
1309
|
if (!id) return sBoxW / 2;
|
|
1263
1310
|
const framed = parsed.groups.some(
|
|
@@ -1766,14 +1813,14 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
1766
1813
|
if (elements && elements.length > 0) {
|
|
1767
1814
|
renderBlockFrames(elements, 0);
|
|
1768
1815
|
}
|
|
1769
|
-
const ACTIVATION_NEST_OFFSET = ctx.structural(6);
|
|
1770
1816
|
activations.forEach((act) => {
|
|
1771
1817
|
const px = participantX.get(act.participantId);
|
|
1772
1818
|
if (px === void 0) return;
|
|
1773
1819
|
const x = px - sActivationWidth / 2 + act.depth * ACTIVATION_NEST_OFFSET;
|
|
1774
1820
|
const y1 = stepY(act.startStep);
|
|
1775
1821
|
const rawY2 = stepY(act.endStep);
|
|
1776
|
-
const
|
|
1822
|
+
const implicitY2 = rawY2 - labelRoomBefore[act.endStep] - ACTIVATION_IMPLICIT_END_CLEARANCE;
|
|
1823
|
+
const y2 = act.implicitEnd && implicitY2 > y1 + sActivationWidth ? implicitY2 : rawY2;
|
|
1777
1824
|
const coveredLines = [];
|
|
1778
1825
|
for (let si = act.startStep; si <= act.endStep; si++) {
|
|
1779
1826
|
const step = renderSteps[si];
|
|
@@ -1917,7 +1964,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
1917
1964
|
const displayLabel = displayMessageLabel(step);
|
|
1918
1965
|
if (displayLabel) {
|
|
1919
1966
|
const midX = (x1 + x2) / 2;
|
|
1920
|
-
const labelEl = svg.append("text").attr("x", midX).attr("y", y -
|
|
1967
|
+
const labelEl = svg.append("text").attr("x", midX).attr("y", y - MSG_LABEL_OFFSET).attr("text-anchor", "middle").attr("fill", arrowColor).attr("paint-order", "stroke fill").attr("stroke", palette.bg).attr("stroke-width", 4).attr("stroke-linejoin", "round").attr("font-size", MSG_LABEL_FONT_SIZE).attr("class", "message-label").attr("data-line-number", String(msg.lineNumber)).attr("data-msg-index", String(step.messageIndex)).attr("data-step-index", String(i));
|
|
1921
1968
|
if (tagKey && msgTagValue) {
|
|
1922
1969
|
labelEl.attr(`data-tag-${tagKey}`, msgTagValue.toLowerCase());
|
|
1923
1970
|
}
|
|
@@ -1940,7 +1987,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
1940
1987
|
const displayLabel = displayMessageLabel(step);
|
|
1941
1988
|
if (displayLabel) {
|
|
1942
1989
|
const midX = (x1 + x2) / 2;
|
|
1943
|
-
const labelEl = svg.append("text").attr("x", midX).attr("y", y -
|
|
1990
|
+
const labelEl = svg.append("text").attr("x", midX).attr("y", y - RETURN_LABEL_OFFSET).attr("text-anchor", "middle").attr("fill", returnColor).attr("paint-order", "stroke fill").attr("stroke", palette.bg).attr("stroke-width", 4).attr("stroke-linejoin", "round").attr("font-size", RETURN_LABEL_FONT_SIZE).attr("class", "message-label").attr("data-line-number", String(msg.lineNumber)).attr("data-msg-index", String(step.messageIndex)).attr("data-step-index", String(i));
|
|
1944
1991
|
if (tagKey && msgTagValue) {
|
|
1945
1992
|
labelEl.attr(`data-tag-${tagKey}`, msgTagValue.toLowerCase());
|
|
1946
1993
|
}
|
|
@@ -5,6 +5,11 @@ import {
|
|
|
5
5
|
META_LINE_HEIGHT,
|
|
6
6
|
SEPARATOR_GAP
|
|
7
7
|
} from "./chunk-XCKNFFKM.js";
|
|
8
|
+
import {
|
|
9
|
+
injectDefaultTagMetadata,
|
|
10
|
+
resolveTagColor,
|
|
11
|
+
tagAttrKey
|
|
12
|
+
} from "./chunk-HX2KJEPD.js";
|
|
8
13
|
import {
|
|
9
14
|
LEGEND_CAPSULE_PAD,
|
|
10
15
|
LEGEND_DOT_R,
|
|
@@ -18,15 +23,10 @@ import {
|
|
|
18
23
|
LEGEND_PILL_FONT_SIZE,
|
|
19
24
|
LEGEND_PILL_PAD,
|
|
20
25
|
measureLegendText
|
|
21
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-I6GGMCTV.js";
|
|
22
27
|
import {
|
|
23
28
|
measureText
|
|
24
29
|
} from "./chunk-KAO7JL4I.js";
|
|
25
|
-
import {
|
|
26
|
-
injectDefaultTagMetadata,
|
|
27
|
-
resolveTagColor,
|
|
28
|
-
tagAttrKey
|
|
29
|
-
} from "./chunk-L5AFONQU.js";
|
|
30
30
|
|
|
31
31
|
// src/sitemap/layout.ts
|
|
32
32
|
import dagre from "@dagrejs/dagre";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
tagAttrKey,
|
|
14
14
|
validateTagGroupNames,
|
|
15
15
|
validateTagValues
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HX2KJEPD.js";
|
|
17
17
|
import {
|
|
18
18
|
ALL_CHART_TYPES,
|
|
19
19
|
AliasRegistry,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
tryParseSharedOption,
|
|
28
28
|
warnUnknownMetaKeys,
|
|
29
29
|
withTagAliases
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
31
31
|
import {
|
|
32
32
|
formatDgmoError,
|
|
33
33
|
makeDgmoError,
|
|
@@ -7,40 +7,40 @@ import {
|
|
|
7
7
|
mutedFill,
|
|
8
8
|
resolveCellColor,
|
|
9
9
|
resolveColorMode
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-A5EE66RQ.js";
|
|
11
|
+
import {
|
|
12
|
+
renderIntegratedLegend
|
|
13
|
+
} from "./chunk-NJYA4QSN.js";
|
|
11
14
|
import {
|
|
12
15
|
layoutInlineHeader
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CNUN5GO6.js";
|
|
17
|
+
import {
|
|
18
|
+
getLegendExtent,
|
|
19
|
+
getMaxLegendReservedHeight
|
|
20
|
+
} from "./chunk-NS7L7YKH.js";
|
|
14
21
|
import {
|
|
15
22
|
TITLE_FONT_SIZE,
|
|
16
23
|
TITLE_FONT_WEIGHT,
|
|
17
24
|
TITLE_Y
|
|
18
25
|
} from "./chunk-VLC6WNRD.js";
|
|
19
|
-
import {
|
|
20
|
-
renderIntegratedLegend
|
|
21
|
-
} from "./chunk-LHL6HDUL.js";
|
|
22
|
-
import {
|
|
23
|
-
getLegendExtent,
|
|
24
|
-
getMaxLegendReservedHeight
|
|
25
|
-
} from "./chunk-FM3WAVB6.js";
|
|
26
26
|
import {
|
|
27
27
|
FONT_FAMILY
|
|
28
28
|
} from "./chunk-ICLB27PZ.js";
|
|
29
|
+
import {
|
|
30
|
+
tagAttrKey
|
|
31
|
+
} from "./chunk-HX2KJEPD.js";
|
|
29
32
|
import {
|
|
30
33
|
LEGEND_GROUP_GAP
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-I6GGMCTV.js";
|
|
32
35
|
import {
|
|
33
36
|
measureText
|
|
34
37
|
} from "./chunk-KAO7JL4I.js";
|
|
35
|
-
import {
|
|
36
|
-
tagAttrKey
|
|
37
|
-
} from "./chunk-L5AFONQU.js";
|
|
38
38
|
import {
|
|
39
39
|
contrastText,
|
|
40
40
|
getSeriesColors,
|
|
41
41
|
mix,
|
|
42
42
|
themeBaseBg
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-L24LESXF.js";
|
|
44
44
|
|
|
45
45
|
// src/treemap/renderer.ts
|
|
46
46
|
import * as d3Selection from "d3-selection";
|