@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
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
computeLegendLayout
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NS7L7YKH.js";
|
|
4
4
|
import {
|
|
5
5
|
FONT_FAMILY
|
|
6
6
|
} from "./chunk-ICLB27PZ.js";
|
|
7
|
+
import {
|
|
8
|
+
tagAttrKey
|
|
9
|
+
} from "./chunk-HX2KJEPD.js";
|
|
7
10
|
import {
|
|
8
11
|
CONTROLS_ICON_PATH,
|
|
9
12
|
LEGEND_DOT_R,
|
|
@@ -11,17 +14,15 @@ import {
|
|
|
11
14
|
LEGEND_ENTRY_FONT_SIZE,
|
|
12
15
|
LEGEND_HEIGHT,
|
|
13
16
|
LEGEND_PILL_FONT_SIZE,
|
|
17
|
+
LEGEND_PILL_TOGGLE_CLASS,
|
|
14
18
|
LEGEND_TOGGLE_DOT_R,
|
|
15
19
|
LEGEND_TOGGLE_OFF_OPACITY,
|
|
16
20
|
legendChromeColors,
|
|
17
21
|
measureLegendText
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import {
|
|
20
|
-
tagAttrKey
|
|
21
|
-
} from "./chunk-L5AFONQU.js";
|
|
22
|
+
} from "./chunk-I6GGMCTV.js";
|
|
22
23
|
import {
|
|
23
24
|
valueRampStops
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-L24LESXF.js";
|
|
25
26
|
|
|
26
27
|
// src/utils/legend-d3.ts
|
|
27
28
|
function centerText(sel) {
|
|
@@ -45,6 +46,7 @@ function renderLegendD3(container, config, state, palette, isDark, callbacks, co
|
|
|
45
46
|
legendG.attr("data-legend-active", null);
|
|
46
47
|
}
|
|
47
48
|
const { groupBg, pillBorder } = legendChromeColors(palette, isDark);
|
|
49
|
+
const interactive = config.mode !== "export";
|
|
48
50
|
if (currentLayout.activeCapsule) {
|
|
49
51
|
renderCapsule(
|
|
50
52
|
legendG,
|
|
@@ -53,11 +55,12 @@ function renderLegendD3(container, config, state, palette, isDark, callbacks, co
|
|
|
53
55
|
groupBg,
|
|
54
56
|
pillBorder,
|
|
55
57
|
isDark,
|
|
58
|
+
interactive,
|
|
56
59
|
callbacks
|
|
57
60
|
);
|
|
58
61
|
}
|
|
59
62
|
for (const pill of currentLayout.pills) {
|
|
60
|
-
renderPill(legendG, pill, palette, groupBg, callbacks);
|
|
63
|
+
renderPill(legendG, pill, palette, groupBg, interactive, callbacks);
|
|
61
64
|
}
|
|
62
65
|
if (currentLayout.controlsGroup) {
|
|
63
66
|
renderControlsGroup(
|
|
@@ -81,6 +84,7 @@ function renderLegendD3(container, config, state, palette, isDark, callbacks, co
|
|
|
81
84
|
config.controls
|
|
82
85
|
);
|
|
83
86
|
}
|
|
87
|
+
if (interactive) restorePillFocus(legendG.node());
|
|
84
88
|
}
|
|
85
89
|
render();
|
|
86
90
|
return {
|
|
@@ -99,11 +103,46 @@ function renderLegendD3(container, config, state, palette, isDark, callbacks, co
|
|
|
99
103
|
}
|
|
100
104
|
};
|
|
101
105
|
}
|
|
102
|
-
function
|
|
106
|
+
function wireGroupToggleKeys(target, groupName, isActive) {
|
|
107
|
+
target.classed(LEGEND_PILL_TOGGLE_CLASS, true).attr("role", "button").attr("tabindex", "0").attr("aria-label", groupName).attr("aria-pressed", isActive ? "true" : "false").on("keydown", (event) => {
|
|
108
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
109
|
+
event.preventDefault();
|
|
110
|
+
event.stopPropagation();
|
|
111
|
+
const el = event.currentTarget;
|
|
112
|
+
const view = el.ownerDocument.defaultView;
|
|
113
|
+
if (!view) return;
|
|
114
|
+
const host = legendHost(el);
|
|
115
|
+
pendingPillFocus = host ? { host, label: groupName } : null;
|
|
116
|
+
el.dispatchEvent(new view.MouseEvent("click", { bubbles: true }));
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
var pendingPillFocus = null;
|
|
120
|
+
function legendHost(el) {
|
|
121
|
+
let svg = el.ownerSVGElement;
|
|
122
|
+
while (svg?.ownerSVGElement) svg = svg.ownerSVGElement;
|
|
123
|
+
return svg?.parentElement ?? null;
|
|
124
|
+
}
|
|
125
|
+
function restorePillFocus(root) {
|
|
126
|
+
const pending = pendingPillFocus;
|
|
127
|
+
if (!pending || !root || !pending.host.contains(root)) return;
|
|
128
|
+
const doc = root.ownerDocument;
|
|
129
|
+
if (doc.activeElement && doc.activeElement !== doc.body) return;
|
|
130
|
+
for (const el of root.querySelectorAll(
|
|
131
|
+
`.${LEGEND_PILL_TOGGLE_CLASS}`
|
|
132
|
+
)) {
|
|
133
|
+
if (el.getAttribute("aria-label") === pending.label) {
|
|
134
|
+
pendingPillFocus = null;
|
|
135
|
+
el.focus();
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function renderCapsule(parent, capsule, palette, groupBg, pillBorder, isDark, interactive, callbacks) {
|
|
103
141
|
const g = parent.append("g").attr("transform", `translate(${capsule.x},${capsule.y})`).attr("data-legend-group", tagAttrKey(capsule.groupName)).style("cursor", "pointer");
|
|
104
142
|
g.append("rect").attr("width", capsule.width).attr("height", capsule.height).attr("rx", LEGEND_HEIGHT / 2).attr("fill", groupBg);
|
|
105
143
|
const pill = capsule.pill;
|
|
106
|
-
g.append("rect").attr("x", pill.x).attr("y", pill.y).attr("width", pill.width).attr("height", pill.height).attr("rx", pill.height / 2).attr("fill", palette.bg);
|
|
144
|
+
const pillRect = g.append("rect").attr("x", pill.x).attr("y", pill.y).attr("width", pill.width).attr("height", pill.height).attr("rx", pill.height / 2).attr("fill", palette.bg);
|
|
145
|
+
if (interactive) wireGroupToggleKeys(pillRect, capsule.groupName, true);
|
|
107
146
|
g.append("rect").attr("x", pill.x).attr("y", pill.y).attr("width", pill.width).attr("height", pill.height).attr("rx", pill.height / 2).attr("fill", "none").attr("stroke", pillBorder).attr("stroke-width", 0.75);
|
|
108
147
|
g.append("text").attr("x", pill.x + pill.width / 2).attr("y", LEGEND_HEIGHT / 2).attr("text-anchor", "middle").call(centerText).attr("font-size", LEGEND_PILL_FONT_SIZE).attr("font-weight", "normal").attr("fill", palette.text).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(capsule.groupName);
|
|
109
148
|
if (capsule.gradient) {
|
|
@@ -140,9 +179,10 @@ function renderCapsule(parent, capsule, palette, groupBg, pillBorder, isDark, ca
|
|
|
140
179
|
callbacks.onGroupRendered(capsule.groupName, g, true);
|
|
141
180
|
}
|
|
142
181
|
}
|
|
143
|
-
function renderPill(parent, pill, palette, groupBg, callbacks) {
|
|
182
|
+
function renderPill(parent, pill, palette, groupBg, interactive, callbacks) {
|
|
144
183
|
const g = parent.append("g").attr("transform", `translate(${pill.x},${pill.y})`).attr("data-legend-group", tagAttrKey(pill.groupName)).style("cursor", "pointer");
|
|
145
|
-
g.append("rect").attr("width", pill.width).attr("height", pill.height).attr("rx", pill.height / 2).attr("fill", groupBg);
|
|
184
|
+
const pillRect = g.append("rect").attr("width", pill.width).attr("height", pill.height).attr("rx", pill.height / 2).attr("fill", groupBg);
|
|
185
|
+
if (interactive) wireGroupToggleKeys(pillRect, pill.groupName, false);
|
|
146
186
|
g.append("text").attr("x", pill.width / 2).attr("y", pill.height / 2).attr("text-anchor", "middle").call(centerText).attr("font-size", LEGEND_PILL_FONT_SIZE).attr("font-weight", "normal").attr("fill", palette.textMuted).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(pill.groupName);
|
|
147
187
|
if (callbacks?.onGroupToggle) {
|
|
148
188
|
const cb = callbacks.onGroupToggle;
|
|
@@ -289,8 +329,40 @@ function renderIntegratedLegend(container, opts) {
|
|
|
289
329
|
opts.width
|
|
290
330
|
);
|
|
291
331
|
}
|
|
332
|
+
var SWIMLANE_TOGGLE_CLASS = "dgmo-swimlane-toggle";
|
|
333
|
+
function wireSwimlaneToggle(iconEl, groupName, isActive, interactive, activate) {
|
|
334
|
+
const label = `Group by ${groupName}`;
|
|
335
|
+
iconEl.append("title").text(label);
|
|
336
|
+
iconEl.style("cursor", "pointer").on("click", (event) => {
|
|
337
|
+
event.stopPropagation();
|
|
338
|
+
activate();
|
|
339
|
+
});
|
|
340
|
+
if (!interactive) return;
|
|
341
|
+
iconEl.classed(SWIMLANE_TOGGLE_CLASS, true).attr("role", "button").attr("tabindex", "0").attr("aria-label", label).attr("aria-pressed", isActive ? "true" : "false").on("keydown", (event) => {
|
|
342
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
343
|
+
event.preventDefault();
|
|
344
|
+
event.stopPropagation();
|
|
345
|
+
activate();
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
function keepSwimlaneToggleFocus(container, render) {
|
|
349
|
+
const active = container.ownerDocument.activeElement;
|
|
350
|
+
const label = active && container.contains(active) && active.classList.contains(SWIMLANE_TOGGLE_CLASS) ? active.getAttribute("aria-label") : null;
|
|
351
|
+
render();
|
|
352
|
+
if (label === null) return;
|
|
353
|
+
for (const el of container.querySelectorAll(
|
|
354
|
+
`.${SWIMLANE_TOGGLE_CLASS}`
|
|
355
|
+
)) {
|
|
356
|
+
if (el.getAttribute("aria-label") === label) {
|
|
357
|
+
el.focus();
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
292
362
|
|
|
293
363
|
export {
|
|
294
364
|
renderLegendD3,
|
|
295
|
-
renderIntegratedLegend
|
|
365
|
+
renderIntegratedLegend,
|
|
366
|
+
wireSwimlaneToggle,
|
|
367
|
+
keepSwimlaneToggleFocus
|
|
296
368
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SKETCH_DIAGNOSTIC_CODES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NWSPPGIE.js";
|
|
4
4
|
import {
|
|
5
5
|
parseInArrowLabel
|
|
6
6
|
} from "./chunk-N7VMGZCU.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
tagAttrKey,
|
|
17
17
|
validateTagGroupNames,
|
|
18
18
|
validateTagValues
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HX2KJEPD.js";
|
|
20
20
|
import {
|
|
21
21
|
SKETCH_REGISTRY,
|
|
22
22
|
extractColor,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
stripQuotes,
|
|
29
29
|
warnUnknownMetaKeys,
|
|
30
30
|
withTagAliases
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
32
32
|
import {
|
|
33
33
|
NAME_DIAGNOSTIC_CODES,
|
|
34
34
|
formatDgmoError,
|
|
@@ -38,19 +38,6 @@ import {
|
|
|
38
38
|
suggest
|
|
39
39
|
} from "./chunk-BYU54C3S.js";
|
|
40
40
|
|
|
41
|
-
// src/sketch/types.ts
|
|
42
|
-
var SKETCH_SHAPE_KINDS = [
|
|
43
|
-
"rectangle",
|
|
44
|
-
"database",
|
|
45
|
-
"queue",
|
|
46
|
-
"person",
|
|
47
|
-
"document",
|
|
48
|
-
"note"
|
|
49
|
-
];
|
|
50
|
-
function isSketchShapeKind(value) {
|
|
51
|
-
return SKETCH_SHAPE_KINDS.includes(value);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
41
|
// src/sketch/parser.ts
|
|
55
42
|
var EDGE_FORMS = [
|
|
56
43
|
{ re: /^<-(.+?)->\s*(.+)$/, heads: "both", dashed: false, labeled: true },
|
|
@@ -137,25 +124,19 @@ function parseSketch(content, palette) {
|
|
|
137
124
|
return { c, r };
|
|
138
125
|
};
|
|
139
126
|
const liftReserved = (meta, lineNumber) => {
|
|
140
|
-
let shape = "rectangle";
|
|
141
127
|
const shapeRaw = meta["shape"];
|
|
142
128
|
if (shapeRaw !== void 0) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
shape
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
lineNumber,
|
|
149
|
-
`Unknown shape "${shapeRaw}" \u2014 rendered as a rectangle (valid: database, queue, person, document, note)`,
|
|
150
|
-
SKETCH_DIAGNOSTIC_CODES.UNKNOWN_SHAPE
|
|
151
|
-
);
|
|
152
|
-
}
|
|
129
|
+
pushError(
|
|
130
|
+
lineNumber,
|
|
131
|
+
`shape: ${shapeRaw.trim()} is not supported in sketch \u2014 every box is a plain rectangle; remove the shape: clause`,
|
|
132
|
+
SKETCH_DIAGNOSTIC_CODES.SHAPE_UNSUPPORTED
|
|
133
|
+
);
|
|
153
134
|
delete meta["shape"];
|
|
154
135
|
}
|
|
155
136
|
const at = parseAt(meta["at"], lineNumber);
|
|
156
137
|
delete meta["at"];
|
|
157
138
|
delete meta["collapsed"];
|
|
158
|
-
return {
|
|
139
|
+
return { at };
|
|
159
140
|
};
|
|
160
141
|
const addShape = (trimmed, lineNumber, box) => {
|
|
161
142
|
const snm = splitNameAndMeta(
|
|
@@ -179,7 +160,7 @@ function parseSketch(content, palette) {
|
|
|
179
160
|
(m) => warn(lineNumber, m),
|
|
180
161
|
snm.name
|
|
181
162
|
);
|
|
182
|
-
const {
|
|
163
|
+
const { at } = liftReserved(meta, lineNumber);
|
|
183
164
|
const norm = normalizeName(label);
|
|
184
165
|
if (snm.alias !== void 0 && aliasIndex.has(snm.alias)) {
|
|
185
166
|
warn(
|
|
@@ -196,9 +177,6 @@ function parseSketch(content, palette) {
|
|
|
196
177
|
if (!(k in first.metadata)) first.metadata[k] = v;
|
|
197
178
|
}
|
|
198
179
|
if (first.at === null && at !== null) first.at = at;
|
|
199
|
-
if (first.shape === "rectangle" && shape !== "rectangle") {
|
|
200
|
-
first.shape = shape;
|
|
201
|
-
}
|
|
202
180
|
warn(
|
|
203
181
|
lineNumber,
|
|
204
182
|
nameMergedMessage({
|
|
@@ -217,7 +195,6 @@ function parseSketch(content, palette) {
|
|
|
217
195
|
id,
|
|
218
196
|
label,
|
|
219
197
|
...alias !== void 0 && { alias },
|
|
220
|
-
shape,
|
|
221
198
|
at,
|
|
222
199
|
metadata: meta,
|
|
223
200
|
...box !== null && { boxLabel: box.label },
|
|
@@ -658,7 +635,5 @@ ${descLine}`;
|
|
|
658
635
|
}
|
|
659
636
|
|
|
660
637
|
export {
|
|
661
|
-
SKETCH_SHAPE_KINDS,
|
|
662
|
-
isSketchShapeKind,
|
|
663
638
|
parseSketch
|
|
664
639
|
};
|
|
@@ -8,17 +8,17 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
FONT_FAMILY
|
|
10
10
|
} from "./chunk-ICLB27PZ.js";
|
|
11
|
+
import {
|
|
12
|
+
fillModeFromOptions
|
|
13
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
11
14
|
import {
|
|
12
15
|
measureText
|
|
13
16
|
} from "./chunk-KAO7JL4I.js";
|
|
14
|
-
import {
|
|
15
|
-
fillModeFromOptions
|
|
16
|
-
} from "./chunk-44GP7PD5.js";
|
|
17
17
|
import {
|
|
18
18
|
contrastText,
|
|
19
19
|
mix,
|
|
20
20
|
shapeFill
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-L24LESXF.js";
|
|
22
22
|
|
|
23
23
|
// src/wireframe/renderer.ts
|
|
24
24
|
import * as d3Selection from "d3-selection";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSwatches
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G2KHLANR.js";
|
|
4
|
+
import {
|
|
5
|
+
now
|
|
6
|
+
} from "./chunk-3DPOIW3W.js";
|
|
4
7
|
import {
|
|
5
8
|
fixedParts,
|
|
6
9
|
fixedTimeCells,
|
|
@@ -14,14 +17,11 @@ import {
|
|
|
14
17
|
import {
|
|
15
18
|
FONT_FAMILY
|
|
16
19
|
} from "./chunk-ICLB27PZ.js";
|
|
17
|
-
import {
|
|
18
|
-
now
|
|
19
|
-
} from "./chunk-3DPOIW3W.js";
|
|
20
20
|
import {
|
|
21
21
|
contrastText,
|
|
22
22
|
mix,
|
|
23
23
|
themeBaseBg
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-L24LESXF.js";
|
|
25
25
|
import {
|
|
26
26
|
resolveColor
|
|
27
27
|
} from "./chunk-2M4IGSCY.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
stripDefaultModifier,
|
|
18
18
|
tagAttrKey,
|
|
19
19
|
validateTagGroupNames
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-HX2KJEPD.js";
|
|
21
21
|
import {
|
|
22
22
|
AliasRegistry,
|
|
23
23
|
GANTT_BOOLEAN_SET,
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
splitNameAndMeta,
|
|
33
33
|
warnUnknownMetaKeys,
|
|
34
34
|
withTagAliases
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
36
36
|
import {
|
|
37
37
|
getSeriesColors
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-L24LESXF.js";
|
|
39
39
|
import {
|
|
40
40
|
formatDgmoError,
|
|
41
41
|
makeDgmoError
|
|
@@ -267,7 +267,7 @@ function parseGantt(content, palette) {
|
|
|
267
267
|
inHolidaysBlock = false;
|
|
268
268
|
} else {
|
|
269
269
|
const rangeMatch = leadingRange(line);
|
|
270
|
-
if (rangeMatch
|
|
270
|
+
if (rangeMatch?.rest.trim()) {
|
|
271
271
|
holidays.ranges.push({
|
|
272
272
|
startDate: rangeMatch.start,
|
|
273
273
|
endDate: rangeMatch.end,
|
|
@@ -312,7 +312,7 @@ function parseGantt(content, palette) {
|
|
|
312
312
|
} else {
|
|
313
313
|
if (COMMENT_RE.test(line)) continue;
|
|
314
314
|
const eraEntryMatch = leadingRange(line);
|
|
315
|
-
if (eraEntryMatch
|
|
315
|
+
if (eraEntryMatch?.rest.trim()) {
|
|
316
316
|
const eraLabelRaw = eraEntryMatch.rest.trim();
|
|
317
317
|
const eraExtracted = extractColor(
|
|
318
318
|
eraLabelRaw,
|
|
@@ -344,7 +344,7 @@ function parseGantt(content, palette) {
|
|
|
344
344
|
} else {
|
|
345
345
|
if (COMMENT_RE.test(line)) continue;
|
|
346
346
|
const markerEntryMatch = leadingDate(line);
|
|
347
|
-
if (markerEntryMatch
|
|
347
|
+
if (markerEntryMatch?.rest.trim()) {
|
|
348
348
|
const markerLabelRaw = markerEntryMatch.rest.trim();
|
|
349
349
|
const markerExtracted = extractColor(
|
|
350
350
|
markerLabelRaw,
|
|
@@ -673,7 +673,7 @@ function parseGantt(content, palette) {
|
|
|
673
673
|
const eraInlinePrefix = line.match(/^era\s+(.+)$/i);
|
|
674
674
|
if (eraInlinePrefix) {
|
|
675
675
|
const eraMatch = leadingRange(eraInlinePrefix[1]);
|
|
676
|
-
if (eraMatch
|
|
676
|
+
if (eraMatch?.rest.trim()) {
|
|
677
677
|
const eraLabelRaw = eraMatch.rest.trim();
|
|
678
678
|
const eraExtracted = extractColor(
|
|
679
679
|
eraLabelRaw,
|
|
@@ -699,7 +699,7 @@ function parseGantt(content, palette) {
|
|
|
699
699
|
const markerInlinePrefix = line.match(/^marker\s+(.+)$/i);
|
|
700
700
|
if (markerInlinePrefix) {
|
|
701
701
|
const markerMatch = leadingDate(markerInlinePrefix[1]);
|
|
702
|
-
if (markerMatch
|
|
702
|
+
if (markerMatch?.rest.trim()) {
|
|
703
703
|
const markerLabelRaw = markerMatch.rest.trim();
|
|
704
704
|
const markerExtracted = extractColor(
|
|
705
705
|
markerLabelRaw,
|
|
@@ -830,7 +830,7 @@ function parseGantt(content, palette) {
|
|
|
830
830
|
}
|
|
831
831
|
continue;
|
|
832
832
|
}
|
|
833
|
-
if (bareKeyword
|
|
833
|
+
if (bareKeyword?.[1].toLowerCase().startsWith("no-")) {
|
|
834
834
|
const base = bareKeyword[1].toLowerCase().substring(3);
|
|
835
835
|
if (KNOWN_BOOLEANS.has(base)) {
|
|
836
836
|
result.options.optionLineNumbers[base] = lineNumber;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var SKETCH_DIAGNOSTIC_CODES = {
|
|
3
3
|
BOX_DEPTH: "E_SKETCH_BOX_DEPTH",
|
|
4
4
|
AMBIGUOUS_TARGET: "E_SKETCH_AMBIGUOUS_TARGET",
|
|
5
|
-
|
|
5
|
+
SHAPE_UNSUPPORTED: "E_SKETCH_SHAPE_UNSUPPORTED",
|
|
6
6
|
OVERLAP_RESOLVED: "W_SKETCH_OVERLAP_RESOLVED",
|
|
7
7
|
AT_OUT_OF_RANGE: "W_SKETCH_AT_OUT_OF_RANGE"
|
|
8
8
|
};
|
|
@@ -26,12 +26,12 @@ var SKETCH_DIAGNOSTICS = [
|
|
|
26
26
|
example: "sketch\nCache as c1\nCache as c2\nApp\n -> c1"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
|
-
code: SKETCH_DIAGNOSTIC_CODES.
|
|
30
|
-
severity: "
|
|
29
|
+
code: SKETCH_DIAGNOSTIC_CODES.SHAPE_UNSUPPORTED,
|
|
30
|
+
severity: "error",
|
|
31
31
|
chartType: "sketch",
|
|
32
|
-
title: "
|
|
33
|
-
message: (p) => `
|
|
34
|
-
hint: "
|
|
32
|
+
title: "shape: is not supported in sketch",
|
|
33
|
+
message: (p) => `shape: ${String(p.shape ?? "?")} is not supported in sketch \u2014 every box is a plain rectangle; remove the shape: clause`,
|
|
34
|
+
hint: "Delete the shape: clause. Use a tag to say what kind of thing a box is.",
|
|
35
35
|
example: "sketch\nStore shape: database"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tryCollectNote
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KSZHIAI2.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveNotes
|
|
6
6
|
} from "./chunk-O753JUEZ.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
tagAttrKey,
|
|
20
20
|
validateTagGroupNames,
|
|
21
21
|
validateTagValues
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HX2KJEPD.js";
|
|
23
23
|
import {
|
|
24
24
|
ALL_CHART_TYPES,
|
|
25
25
|
FILL_FAMILY_TOKENS,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
parseMetadataRegion,
|
|
33
33
|
tryParseSharedOption,
|
|
34
34
|
withTagAliases
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveColorWithDiagnostic
|
|
38
38
|
} from "./chunk-2M4IGSCY.js";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LEGEND_PILL_TOGGLE_CLASS
|
|
3
|
+
} from "./chunk-I6GGMCTV.js";
|
|
4
|
+
|
|
1
5
|
// src/utils/svg-serialize.ts
|
|
2
6
|
var BARE_AMPERSAND = /&(?![a-zA-Z][a-zA-Z0-9]*;|#\d+;|#[xX][0-9a-fA-F]+;)/g;
|
|
3
7
|
function escapeAttributeMarkupChars(svg) {
|
|
@@ -23,7 +27,18 @@ function roundMagnitudeAttrs(svg) {
|
|
|
23
27
|
});
|
|
24
28
|
return round(ROUNDED_OPACITY_ATTRS, 4)(round(ROUNDED_ATTRS, 2)(svg));
|
|
25
29
|
}
|
|
30
|
+
var LEGEND_PILL_BUTTON_ATTRS = [
|
|
31
|
+
"role",
|
|
32
|
+
"tabindex",
|
|
33
|
+
"aria-label",
|
|
34
|
+
"aria-pressed"
|
|
35
|
+
];
|
|
26
36
|
function serializeSvg(svgEl) {
|
|
37
|
+
for (const el of svgEl.querySelectorAll(`.${LEGEND_PILL_TOGGLE_CLASS}`)) {
|
|
38
|
+
el.classList.remove(LEGEND_PILL_TOGGLE_CLASS);
|
|
39
|
+
if (el.getAttribute("class") === "") el.removeAttribute("class");
|
|
40
|
+
for (const attr of LEGEND_PILL_BUTTON_ATTRS) el.removeAttribute(attr);
|
|
41
|
+
}
|
|
27
42
|
return roundMagnitudeAttrs(escapeAttributeMarkupChars(svgEl.outerHTML));
|
|
28
43
|
}
|
|
29
44
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tryCollectNote
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KSZHIAI2.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveNotes
|
|
6
6
|
} from "./chunk-O753JUEZ.js";
|
|
@@ -11,13 +11,16 @@ import {
|
|
|
11
11
|
displayName,
|
|
12
12
|
normalizeName
|
|
13
13
|
} from "./chunk-NOTA6TEI.js";
|
|
14
|
+
import {
|
|
15
|
+
isTagBlockHeading
|
|
16
|
+
} from "./chunk-HX2KJEPD.js";
|
|
14
17
|
import {
|
|
15
18
|
AliasRegistry,
|
|
16
19
|
OPTION_NOCOLON_RE,
|
|
17
20
|
measureIndent,
|
|
18
21
|
parseFirstLine,
|
|
19
22
|
tryParseSharedOption
|
|
20
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
21
24
|
import {
|
|
22
25
|
resolveColorWithDiagnostic
|
|
23
26
|
} from "./chunk-2M4IGSCY.js";
|
|
@@ -32,6 +35,10 @@ import {
|
|
|
32
35
|
function classId(name) {
|
|
33
36
|
return normalizeName(name);
|
|
34
37
|
}
|
|
38
|
+
var INERT_OPTIONS = {
|
|
39
|
+
"active-tag": '"active-tag" does nothing on a class diagram \u2014 it has no tag groups. Colour a class with a trailing colour word (`User blue`).'
|
|
40
|
+
};
|
|
41
|
+
var NO_TAG_GROUPS_MESSAGE = "A class diagram has no tag groups \u2014 this block is ignored. Colour a class with a trailing colour word (`User blue`).";
|
|
35
42
|
var CLASS_DECL_RE = /^(?:(abstract|interface|enum)\s+)?(?:"([^"]+)"|([A-Z][^":]*?))(?:\s+extends\s+(?:"([^"]+)"|([A-Z][^":]*?)))?(?:\s+implements\s+(?:"([^"]+)"|([A-Z][^":]*?)))?(?:\s+\[(abstract|interface|enum)\])?(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?(?:\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11}))?\s*$/;
|
|
36
43
|
var INDENT_REL_ARROW_RE = /^(--\|>|\.\.\|>|\*--|o--|\.\.>|->)\s*(?:"([^"]+)"|([A-Za-z][^":]*?))(?:\s+:?\s*(.+))?$/;
|
|
37
44
|
var REL_ARROW_RE = /^(?:"([^"]+)"|([A-Z][^":]*?))\s*(--\|>|\.\.\|>|\*--|o--|\.\.>|->)\s*(?:"([^"]+)"|([A-Z][^":]*?))(?:\s+:?\s*(.+))?$/;
|
|
@@ -139,6 +146,7 @@ function parseClassDiagram(content, palette) {
|
|
|
139
146
|
}
|
|
140
147
|
let currentClass = null;
|
|
141
148
|
let contentStarted = false;
|
|
149
|
+
let swallowingTagBlock = false;
|
|
142
150
|
function getOrCreateClass(name, lineNumber) {
|
|
143
151
|
const key = classId(name);
|
|
144
152
|
const existing = classMap.get(key);
|
|
@@ -183,6 +191,18 @@ function parseClassDiagram(content, palette) {
|
|
|
183
191
|
continue;
|
|
184
192
|
}
|
|
185
193
|
if (trimmed.startsWith("//")) continue;
|
|
194
|
+
if (swallowingTagBlock) {
|
|
195
|
+
if (indent > 0) continue;
|
|
196
|
+
swallowingTagBlock = false;
|
|
197
|
+
}
|
|
198
|
+
if (indent === 0 && trimmed.startsWith("tag") && isTagBlockHeading(trimmed)) {
|
|
199
|
+
result.diagnostics.push(
|
|
200
|
+
makeDgmoError(lineNumber, NO_TAG_GROUPS_MESSAGE, "warning")
|
|
201
|
+
);
|
|
202
|
+
currentClass = null;
|
|
203
|
+
swallowingTagBlock = true;
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
186
206
|
if (indent === 0) {
|
|
187
207
|
const noteResult = tryCollectNote(
|
|
188
208
|
lines,
|
|
@@ -227,6 +247,13 @@ function parseClassDiagram(content, palette) {
|
|
|
227
247
|
if (optMatch) {
|
|
228
248
|
const key = optMatch[1].toLowerCase();
|
|
229
249
|
const value = optMatch[2].trim();
|
|
250
|
+
const inertMsg = INERT_OPTIONS[key];
|
|
251
|
+
if (inertMsg) {
|
|
252
|
+
result.diagnostics.push(
|
|
253
|
+
makeDgmoError(lineNumber, inertMsg, "warning")
|
|
254
|
+
);
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
230
257
|
if (key !== "abstract" && key !== "interface" && key !== "enum") {
|
|
231
258
|
options[key] = value;
|
|
232
259
|
continue;
|
|
@@ -5,6 +5,9 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
EMPHASIS_DIM_OPACITY
|
|
7
7
|
} from "./chunk-2CW5ZTNH.js";
|
|
8
|
+
import {
|
|
9
|
+
renderIntegratedLegend
|
|
10
|
+
} from "./chunk-NJYA4QSN.js";
|
|
8
11
|
import {
|
|
9
12
|
CARD_RADIUS,
|
|
10
13
|
EDGE_DASH,
|
|
@@ -18,44 +21,41 @@ import {
|
|
|
18
21
|
} from "./chunk-XCKNFFKM.js";
|
|
19
22
|
import {
|
|
20
23
|
layoutInlineHeader
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-CNUN5GO6.js";
|
|
25
|
+
import {
|
|
26
|
+
getLegendExtent,
|
|
27
|
+
getMaxLegendReservedHeight
|
|
28
|
+
} from "./chunk-NS7L7YKH.js";
|
|
22
29
|
import {
|
|
23
30
|
TITLE_FONT_SIZE,
|
|
24
31
|
TITLE_FONT_WEIGHT,
|
|
25
32
|
TITLE_Y
|
|
26
33
|
} from "./chunk-VLC6WNRD.js";
|
|
27
|
-
import {
|
|
28
|
-
renderIntegratedLegend
|
|
29
|
-
} from "./chunk-LHL6HDUL.js";
|
|
30
|
-
import {
|
|
31
|
-
getLegendExtent,
|
|
32
|
-
getMaxLegendReservedHeight
|
|
33
|
-
} from "./chunk-FM3WAVB6.js";
|
|
34
34
|
import {
|
|
35
35
|
FONT_FAMILY
|
|
36
36
|
} from "./chunk-ICLB27PZ.js";
|
|
37
|
-
import {
|
|
38
|
-
LEGEND_GROUP_GAP
|
|
39
|
-
} from "./chunk-RH2PROYG.js";
|
|
40
|
-
import {
|
|
41
|
-
measureText
|
|
42
|
-
} from "./chunk-KAO7JL4I.js";
|
|
43
37
|
import {
|
|
44
38
|
UNTAGGED_TAG_COLOR,
|
|
45
39
|
resolveTagColor,
|
|
46
40
|
tagAttrKey
|
|
47
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-HX2KJEPD.js";
|
|
48
42
|
import {
|
|
49
43
|
fillModeFromOptions,
|
|
50
44
|
legendInlineRequested,
|
|
51
45
|
legendSuppressed
|
|
52
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
47
|
+
import {
|
|
48
|
+
LEGEND_GROUP_GAP
|
|
49
|
+
} from "./chunk-I6GGMCTV.js";
|
|
50
|
+
import {
|
|
51
|
+
measureText
|
|
52
|
+
} from "./chunk-KAO7JL4I.js";
|
|
53
53
|
import {
|
|
54
54
|
contrastText,
|
|
55
55
|
mix,
|
|
56
56
|
shapeFill,
|
|
57
57
|
themeBaseBg
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-L24LESXF.js";
|
|
59
59
|
import {
|
|
60
60
|
resolveColor
|
|
61
61
|
} from "./chunk-2M4IGSCY.js";
|