@diagrammo/dgmo 0.87.0 → 0.89.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 +4 -2
- package/dist/advanced.d.ts +47 -11
- package/dist/advanced.js +110 -106
- package/dist/{analyzer-R5UBTRO2.js → analyzer-7ZGAZIE6.js} +2 -2
- package/dist/block.js +26 -25
- package/dist/{chart-meta-PbgpGwYo.d.ts → chart-meta-Bev5Ebjr.d.ts} +1 -1
- package/dist/chart-meta.d.ts +2 -2
- package/dist/chart-meta.js +11 -11
- package/dist/{chart-types-Db_EGf1o.d.ts → chart-types-Bf8C5QQW.d.ts} +1 -1
- package/dist/{charts-d3-3BZRSZV6.js → charts-d3-KEQSUWKP.js} +10 -10
- package/dist/{chunk-LJFXC3IP.js → chunk-2GM7N5TV.js} +10 -10
- package/dist/{chunk-H2GEIFUF.js → chunk-3AQJNY65.js} +8 -8
- package/dist/chunk-44FTCIRI.js +438 -0
- package/dist/{chunk-WZ23JJ7U.js → chunk-4AJKOUBO.js} +11 -11
- package/dist/{chunk-YK4N6TBN.js → chunk-4R6OMKXB.js} +7 -7
- package/dist/{chunk-HEYGGSNQ.js → chunk-5LE2CTLS.js} +2 -2
- package/dist/{chunk-AGO3PFGS.js → chunk-7C2RAGPT.js} +46 -31
- package/dist/{chunk-VJ2KROJ5.js → chunk-7KPHRTND.js} +1 -1
- package/dist/{chunk-LHL6HDUL.js → chunk-7SX4IY6T.js} +84 -12
- package/dist/{chunk-LSQGJN5H.js → chunk-7W4XLIVH.js} +15 -15
- package/dist/{chunk-Q2U5635V.js → chunk-ABP5BUD6.js} +9 -430
- package/dist/{chunk-XUDGZJTJ.js → chunk-AZ24RI5L.js} +6 -6
- package/dist/{chunk-UMRZPRAN.js → chunk-BB6QKWHZ.js} +15 -15
- package/dist/{chunk-6I5UN4FD.js → chunk-C4FRGZGX.js} +4 -4
- package/dist/{chunk-3DOQOXXI.js → chunk-CNUN5GO6.js} +1 -1
- package/dist/{chunk-5KGM44TG.js → chunk-CX6OH5WP.js} +1 -1
- package/dist/{chunk-D4M25W6R.js → chunk-DDPGEGHB.js} +5 -5
- package/dist/{chunk-B7CU2HW5.js → chunk-DZPHN2WN.js} +9 -9
- package/dist/{chunk-O6MMQQLF.js → chunk-ECMA6XE2.js} +10 -10
- package/dist/{chunk-MGBV4JEI.js → chunk-EDXGEQW3.js} +1 -1
- package/dist/{chunk-FBKPSU3A.js → chunk-EXKCRXPO.js} +9 -9
- package/dist/{chunk-HTPZDZKQ.js → chunk-FKLE6QA3.js} +13 -13
- package/dist/{chunk-ERNCPKD4.js → chunk-G2KHLANR.js} +1 -1
- package/dist/{chunk-NJIGYGZS.js → chunk-HAMF4F3P.js} +12 -7
- package/dist/{chunk-UY6TEJJH.js → chunk-HJRP6PXL.js} +1 -1
- package/dist/{chunk-LNO3ASX5.js → chunk-HUNDJTTH.js} +1 -1
- package/dist/{chunk-RH2PROYG.js → chunk-I6GGMCTV.js} +4 -2
- package/dist/{chunk-DOXBS7F5.js → chunk-ID2K3IHI.js} +4 -4
- package/dist/{chunk-33FQ6HNV.js → chunk-IQ6P3HDE.js} +9 -9
- package/dist/{chunk-BAZT6CIF.js → chunk-ITSBBQTH.js} +7 -7
- package/dist/{chunk-UNNJCSSQ.js → chunk-JVZ7KFAX.js} +1 -1
- package/dist/{chunk-AQIBKTPG.js → chunk-K5XT7NHD.js} +3 -3
- package/dist/{chunk-HAH5X345.js → chunk-KATED53P.js} +1 -1
- package/dist/{chunk-7HWY4QAJ.js → chunk-L24LESXF.js} +1 -0
- package/dist/{chunk-VPASQOR3.js → chunk-LFKSHDVI.js} +1 -1
- package/dist/{chunk-XVSJYAK7.js → chunk-LPYYZCSI.js} +2 -2
- package/dist/{chunk-BV6PKJUS.js → chunk-LR6RRDWN.js} +5 -5
- package/dist/{chunk-DAX42XVH.js → chunk-LYLNMN77.js} +8 -8
- package/dist/{chunk-PJQZWJ5I.js → chunk-M2BCY7H3.js} +1015 -146
- package/dist/{chunk-A4XPI4YN.js → chunk-MFW6P7WH.js} +27 -0
- package/dist/{chunk-CFBY77QJ.js → chunk-N4BBSDWI.js} +9 -9
- package/dist/{chunk-IDJGV6VM.js → chunk-NIUO2TNR.js} +215 -1
- package/dist/{chunk-PLE2432T.js → chunk-NRPELUB6.js} +2 -2
- package/dist/{chunk-FM3WAVB6.js → chunk-NS7L7YKH.js} +1 -1
- package/dist/{chunk-YMG7JDEY.js → chunk-NSR2CGV6.js} +71 -24
- package/dist/{chunk-LD2JSKU3.js → chunk-OOCVGX4W.js} +15 -0
- package/dist/{chunk-N4XHXBDQ.js → chunk-PMNITNPR.js} +4 -4
- package/dist/{chunk-MSXRNVHB.js → chunk-Q6SQISHT.js} +12 -11
- package/dist/{chunk-UNAP6O26.js → chunk-QIOYTQDZ.js} +9 -9
- package/dist/{chunk-BT2WH2XT.js → chunk-RGWYZR3S.js} +1 -1
- package/dist/{chunk-PPH6ILHL.js → chunk-RPKBWJBB.js} +4 -4
- package/dist/{chunk-JD4RHBNX.js → chunk-RXIKESRI.js} +7 -7
- package/dist/{chunk-BMUWF77V.js → chunk-S2WE7TVK.js} +4 -4
- package/dist/{chunk-QFIXL3OK.js → chunk-SEKNYIMO.js} +1 -1
- package/dist/{chunk-FPXMCGS5.js → chunk-SLQT3JP3.js} +1 -1
- package/dist/{chunk-LL6D3MES.js → chunk-SOPM5PLO.js} +9 -9
- package/dist/{chunk-J7Q4VPBJ.js → chunk-TAP2NZEU.js} +22 -16
- package/dist/{chunk-RE6TVIAV.js → chunk-UKJLPA7R.js} +4 -4
- package/dist/{chunk-RGI64U3A.js → chunk-UQLHKLF4.js} +9 -9
- package/dist/{chunk-LPXC4I4R.js → chunk-UWKRPQZO.js} +61 -32
- package/dist/{chunk-XIFK423U.js → chunk-W7QN5BC5.js} +4 -4
- package/dist/{chunk-XWYR5T52.js → chunk-WEF6MXFG.js} +14 -14
- package/dist/{chunk-P5V63L35.js → chunk-WP22MHH6.js} +17 -17
- package/dist/{chunk-PUVTFUNH.js → chunk-WRCAH3UO.js} +18 -18
- package/dist/{chunk-N7XRBWXA.js → chunk-XJ2TBXHA.js} +10 -10
- package/dist/{chunk-DSG6GBUQ.js → chunk-XUCQVKLQ.js} +6 -6
- package/dist/{chunk-NZCSVD4M.js → chunk-Y7PSAHAY.js} +8 -8
- package/dist/{chunk-AAMCXQPP.js → chunk-YMFQLWZ2.js} +6 -6
- package/dist/completion-registry.d.ts +1 -1
- package/dist/completion-registry.js +4 -16
- package/dist/countdown.js +1 -1
- package/dist/{dgmo-router-F2DSURTR.js → dgmo-router-7WANZOBD.js} +11 -11
- package/dist/{dimensions-6QAWEGIR.js → dimensions-7MF7VSGS.js} +6 -6
- package/dist/{flowchart-renderer-THC6Y7EH.js → flowchart-renderer-DZQZRL2F.js} +6 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +28 -27
- package/dist/{layout-P6DTD4RT.js → layout-4RRC7XU7.js} +2 -2
- package/dist/{layout-QX5T6ZNE.js → layout-6L3BIFEZ.js} +4 -4
- package/dist/{layout-SOPAVXIH.js → layout-DXVAYF6W.js} +3 -3
- package/dist/{layout-LUQKAGGT.js → layout-EFEZ533S.js} +4 -4
- package/dist/{layout-EHTYSMV4.js → layout-H4K54IW3.js} +2 -2
- package/dist/{layout-AM57TGN5.js → layout-IGAVGDME.js} +3 -3
- package/dist/{layout-5NPBHV5F.js → layout-PP36LUTA.js} +2 -2
- package/dist/{layout-CUFA7XJD.js → layout-Q3RYSODA.js} +4 -4
- package/dist/layout-XUW444O5.js +1 -1
- 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-WZAIQTEG.js} +6 -4
- package/dist/{parser-ACW6C6OY.js → parser-337TACHB.js} +1 -1
- package/dist/{parser-WUK6CP5X.js → parser-GCCWMBTU.js} +3 -3
- package/dist/{parser-GPW4ZHPQ.js → parser-IMM2JJX3.js} +2 -1
- package/dist/{parser-JXS4426S.js → parser-P4TOQYNN.js} +2 -2
- package/dist/{parser-PVIWHVGY.js → parser-TL3JA4RI.js} +1 -1
- package/dist/{parser-C327BBE3.js → parser-UTXFJG4X.js} +1 -1
- package/dist/{renderer-RWJ45DWH.js → renderer-2ZQ6DPVD.js} +3 -3
- package/dist/{renderer-NHPKNNBD.js → renderer-3AD4NDF5.js} +9 -9
- package/dist/{renderer-2KVQGGTT.js → renderer-43ESBXVY.js} +8 -8
- package/dist/{renderer-A4LMOBZL.js → renderer-4JE5ORRO.js} +12 -12
- package/dist/{renderer-RAATRF6W.js → renderer-5GZNGZU5.js} +7 -7
- package/dist/{renderer-RMGN3Q7D.js → renderer-6OQM32X3.js} +3 -3
- package/dist/{renderer-222OTVQV.js → renderer-7HOSI6JJ.js} +4 -4
- package/dist/{renderer-NX4YKWCJ.js → renderer-7L7J4DHO.js} +8 -8
- package/dist/{renderer-DCFQDBGJ.js → renderer-7MCC6GKH.js} +2 -2
- package/dist/{renderer-3FF4QVGW.js → renderer-7VQOKAII.js} +8 -8
- package/dist/{renderer-4BHOELCE.js → renderer-BLHN3RCY.js} +3 -3
- package/dist/{renderer-PQYO2HCE.js → renderer-CEIX5JPA.js} +3 -3
- package/dist/{renderer-2OOPQ4CH.js → renderer-CHQZES6G.js} +3 -3
- package/dist/{renderer-36JH4OMC.js → renderer-DBNDLKPE.js} +9 -9
- package/dist/{renderer-KVAQE7PQ.js → renderer-DCJ4AQ3N.js} +7 -7
- package/dist/{renderer-LODEVN3V.js → renderer-EAORWLVK.js} +10 -10
- package/dist/{renderer-XRALFCIN.js → renderer-FCXRDYSJ.js} +8 -8
- package/dist/{renderer-YDAVCRTP.js → renderer-IR5GGAPB.js} +8 -8
- package/dist/{renderer-QM23SWAM.js → renderer-J4OS77PK.js} +2 -2
- package/dist/{renderer-4BIMRO4X.js → renderer-JR2XNZAH.js} +6 -6
- package/dist/{renderer-JKV2DBYP.js → renderer-JRVY7HAD.js} +6 -6
- package/dist/{renderer-R34GJL7U.js → renderer-NAA7D33G.js} +11 -11
- package/dist/{renderer-SDUSBCJI.js → renderer-P4XCRNCY.js} +7 -7
- package/dist/{renderer-A6ACVK4X.js → renderer-QQHQY3GT.js} +6 -6
- package/dist/{renderer-YIZ7G4HU.js → renderer-TJJGFQGT.js} +13 -13
- package/dist/{renderer-3CTUWCO7.js → renderer-VGQMJC5K.js} +12 -12
- package/dist/{renderer-ELYPDPNF.js → renderer-VYWCMRWA.js} +8 -7
- package/dist/{renderer-WH2HWE5Z.js → renderer-WB75JME5.js} +8 -8
- package/dist/{renderer-BICLPGAH.js → renderer-WQ654YT5.js} +2 -2
- package/dist/{renderer-6BUUTWVS.js → renderer-XFEZ5UBE.js} +8 -8
- package/dist/{renderer-4NZZ5J2F.js → renderer-XHEMXBQM.js} +7 -7
- package/dist/{renderer-RENDISO5.js → renderer-YTEZK3GC.js} +12 -12
- package/dist/{renderer-X5A5VIRD.js → renderer-ZXQXRNDR.js} +8 -8
- package/dist/{renderer-radial-XZ5TKUT4.js → renderer-radial-NA5DVBG4.js} +7 -7
- package/dist/{state-renderer-5IQ4OJUI.js → state-renderer-4S2C2CHB.js} +9 -9
- package/docs/ai-integration.md +5 -3
- package/docs/language-reference.md +2 -2
- package/package.json +1 -1
- package/dist/{chunk-3TYUXC7D.js → chunk-2SKMEL7V.js} +0 -0
- package/dist/{chunk-CLQIXD2C.js → chunk-7Z2VFRP5.js} +3 -3
- package/dist/{chunk-NF5YKFRH.js → chunk-B3S76BZO.js} +0 -0
- package/dist/{chunk-UIUXIDBX.js → chunk-CUYHST3B.js} +4 -4
- package/dist/{chunk-GUYVKGFN.js → chunk-DPSMX4EY.js} +0 -0
- package/dist/{chunk-2A4DQAXG.js → chunk-IIOLFAGJ.js} +3 -3
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
layoutC4Containers,
|
|
5
5
|
layoutC4Context,
|
|
6
6
|
layoutC4Deployment
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LYLNMN77.js";
|
|
8
8
|
import {
|
|
9
9
|
appendArrowheadMarkers,
|
|
10
10
|
appendReverseArrowheadMarkers
|
|
@@ -28,27 +28,20 @@ import {
|
|
|
28
28
|
} from "./chunk-XCKNFFKM.js";
|
|
29
29
|
import {
|
|
30
30
|
serializeSvg
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-OOCVGX4W.js";
|
|
32
32
|
import {
|
|
33
33
|
TITLE_FONT_SIZE,
|
|
34
34
|
TITLE_FONT_WEIGHT
|
|
35
35
|
} from "./chunk-VLC6WNRD.js";
|
|
36
36
|
import {
|
|
37
37
|
renderIntegratedLegend
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-7SX4IY6T.js";
|
|
39
39
|
import {
|
|
40
40
|
FONT_FAMILY
|
|
41
41
|
} from "./chunk-ICLB27PZ.js";
|
|
42
42
|
import {
|
|
43
43
|
parseC4
|
|
44
44
|
} from "./chunk-GSYZZFI5.js";
|
|
45
|
-
import {
|
|
46
|
-
LEGEND_HEIGHT
|
|
47
|
-
} from "./chunk-RH2PROYG.js";
|
|
48
|
-
import {
|
|
49
|
-
measureText,
|
|
50
|
-
wrapTextToWidth
|
|
51
|
-
} from "./chunk-KAO7JL4I.js";
|
|
52
45
|
import {
|
|
53
46
|
preprocessDescriptionLine
|
|
54
47
|
} from "./chunk-IYULMRBE.js";
|
|
@@ -59,12 +52,19 @@ import {
|
|
|
59
52
|
import {
|
|
60
53
|
fillModeFromOptions
|
|
61
54
|
} from "./chunk-44GP7PD5.js";
|
|
55
|
+
import {
|
|
56
|
+
LEGEND_HEIGHT
|
|
57
|
+
} from "./chunk-I6GGMCTV.js";
|
|
58
|
+
import {
|
|
59
|
+
measureText,
|
|
60
|
+
wrapTextToWidth
|
|
61
|
+
} from "./chunk-KAO7JL4I.js";
|
|
62
62
|
import {
|
|
63
63
|
contrastText,
|
|
64
64
|
groupFill,
|
|
65
65
|
mix,
|
|
66
66
|
shapeFill
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-L24LESXF.js";
|
|
68
68
|
|
|
69
69
|
// src/c4/renderer.ts
|
|
70
70
|
import * as d3Selection from "d3-selection";
|
|
@@ -12,27 +12,27 @@ import {
|
|
|
12
12
|
} from "./chunk-VLC6WNRD.js";
|
|
13
13
|
import {
|
|
14
14
|
renderIntegratedLegend
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7SX4IY6T.js";
|
|
16
16
|
import {
|
|
17
17
|
getMaxLegendReservedHeight
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NS7L7YKH.js";
|
|
19
19
|
import {
|
|
20
20
|
FONT_FAMILY
|
|
21
21
|
} from "./chunk-ICLB27PZ.js";
|
|
22
|
+
import {
|
|
23
|
+
fillModeFromOptions,
|
|
24
|
+
legendSuppressed
|
|
25
|
+
} from "./chunk-44GP7PD5.js";
|
|
22
26
|
import {
|
|
23
27
|
measureText,
|
|
24
28
|
truncateText,
|
|
25
29
|
wrapTextToWidth
|
|
26
30
|
} from "./chunk-KAO7JL4I.js";
|
|
27
|
-
import {
|
|
28
|
-
fillModeFromOptions,
|
|
29
|
-
legendSuppressed
|
|
30
|
-
} from "./chunk-44GP7PD5.js";
|
|
31
31
|
import {
|
|
32
32
|
contrastText,
|
|
33
33
|
mix,
|
|
34
34
|
shapeFill
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-L24LESXF.js";
|
|
36
36
|
|
|
37
37
|
// src/tech-radar/renderer.ts
|
|
38
38
|
import * as d3Selection2 from "d3-selection";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSwatches
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G2KHLANR.js";
|
|
4
4
|
import {
|
|
5
5
|
fixedParts,
|
|
6
6
|
fixedTimeCells,
|
|
@@ -21,7 +21,7 @@ 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";
|
|
@@ -13,23 +13,34 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
INLINE_HEADER_PAD,
|
|
15
15
|
layoutInlineHeader
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CNUN5GO6.js";
|
|
17
17
|
import {
|
|
18
18
|
TITLE_FONT_SIZE,
|
|
19
19
|
TITLE_FONT_WEIGHT,
|
|
20
20
|
TITLE_Y
|
|
21
21
|
} from "./chunk-VLC6WNRD.js";
|
|
22
22
|
import {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
keepSwimlaneToggleFocus,
|
|
24
|
+
renderIntegratedLegend,
|
|
25
|
+
wireSwimlaneToggle
|
|
26
|
+
} from "./chunk-7SX4IY6T.js";
|
|
25
27
|
import {
|
|
26
28
|
controlsGroupCapsuleWidth,
|
|
27
29
|
getLegendExtent,
|
|
28
30
|
getMaxLegendReservedHeight
|
|
29
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-NS7L7YKH.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-L5AFONQU.js";
|
|
33
44
|
import {
|
|
34
45
|
LEGEND_CAPSULE_PAD,
|
|
35
46
|
LEGEND_DOT_R,
|
|
@@ -44,38 +55,29 @@ 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";
|
|
72
74
|
import * as d3Selection from "d3-selection";
|
|
73
75
|
var BAR_H = 22;
|
|
74
76
|
var ROW_GAP = 6;
|
|
75
|
-
var GROUP_GAP = 14;
|
|
76
77
|
var MILESTONE_SIZE = 10;
|
|
77
78
|
var MIN_LEFT_MARGIN = 120;
|
|
78
79
|
var BOTTOM_MARGIN = 40;
|
|
80
|
+
var BOTTOM_AXIS_LABEL_RESERVE = 30;
|
|
79
81
|
var RIGHT_MARGIN = 20;
|
|
80
82
|
var LABEL_PAD = 8;
|
|
81
83
|
var LABEL_GAP = 5;
|
|
@@ -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;
|
|
@@ -213,9 +221,11 @@ function renderGantt(container, resolved, palette, isDark, options, exportDims)
|
|
|
213
221
|
const ctx = exportDims ? ScaleContext.identity() : ScaleContext.from(containerWidth, idealWidth);
|
|
214
222
|
const sBarH = ctx.structural(BAR_H);
|
|
215
223
|
const sRowGap = ctx.structural(ROW_GAP);
|
|
216
|
-
const sGroupGap = ctx.structural(GROUP_GAP);
|
|
217
224
|
const sMilestoneSize = ctx.structural(MILESTONE_SIZE);
|
|
218
|
-
const sBottomMargin =
|
|
225
|
+
const sBottomMargin = Math.max(
|
|
226
|
+
ctx.aesthetic(BOTTOM_MARGIN),
|
|
227
|
+
BOTTOM_AXIS_LABEL_RESERVE
|
|
228
|
+
);
|
|
219
229
|
const sRightMargin = ctx.aesthetic(RIGHT_MARGIN);
|
|
220
230
|
const sLabelPad = ctx.structural(LABEL_PAD);
|
|
221
231
|
const sLabelGap = ctx.structural(LABEL_GAP);
|
|
@@ -225,10 +235,10 @@ function renderGantt(container, resolved, palette, isDark, options, exportDims)
|
|
|
225
235
|
const sTitleY = ctx.aesthetic(TITLE_Y);
|
|
226
236
|
const sHeaderRowH = ctx.structural(HEADER_ROW_H);
|
|
227
237
|
const sContentTopPad = ctx.aesthetic(CONTENT_TOP_PAD);
|
|
228
|
-
const sTopDateLabelReserve =
|
|
238
|
+
const sTopDateLabelReserve = topDateLabelReserve;
|
|
229
239
|
const sSprintLabelReserve = ctx.structural(sprintLabelReserve);
|
|
230
240
|
const sTitleHeight = ctx.aesthetic(titleHeight);
|
|
231
|
-
const sTagLegendReserve =
|
|
241
|
+
const sTagLegendReserve = tagLegendReserve;
|
|
232
242
|
const inlineRequested = resolved.options.legendInline === true && resolved.tagGroups.length > 0;
|
|
233
243
|
const legendExtent = inlineRequested ? getLegendExtent(
|
|
234
244
|
{
|
|
@@ -267,15 +277,17 @@ function renderGantt(container, resolved, palette, isDark, options, exportDims)
|
|
|
267
277
|
const sTodayLabelY = sTodayReserve ? -(sTopDateLabelReserve + sHeaderRowH / 2) : 0;
|
|
268
278
|
const sMarkerLabelY = sMarkerReserve ? -(sTopDateLabelReserve + sTodayReserve + sHeaderRowH / 2) : 0;
|
|
269
279
|
const sEraLabelY = sEraReserve ? -(sTopDateLabelReserve + sTodayReserve + sMarkerReserve + sHeaderRowH / 2) : 0;
|
|
270
|
-
const sContentH = isTagMode ? totalRows * (sBarH + sRowGap) : totalRows * (sBarH + sRowGap)
|
|
280
|
+
const sContentH = isTagMode ? totalRows * (sBarH + sRowGap) : totalRows * (sBarH + sRowGap);
|
|
271
281
|
const sInnerHeight = sContentTopPad + sContentH;
|
|
272
282
|
const sOuterHeight = sMarginTop + sInnerHeight + sBottomMargin;
|
|
273
283
|
const sprintRightPad = resolved.sprints.length > 0 ? 50 : 0;
|
|
274
|
-
const
|
|
275
|
-
const
|
|
284
|
+
const containerHeight = options?.fitToContainer ? container.clientHeight : 0;
|
|
285
|
+
const layoutWidth = !exportDims && containerHeight > 0 && sOuterHeight > containerHeight ? containerWidth * sOuterHeight / containerHeight : containerWidth;
|
|
286
|
+
const innerWidth = layoutWidth - leftMargin - sRightMargin - sprintRightPad;
|
|
287
|
+
const svg = d3Selection.select(container).append("svg").attr("viewBox", `0 0 ${layoutWidth} ${sOuterHeight}`).attr("width", exportDims ? containerWidth : "100%").attr("preserveAspectRatio", "xMidYMin meet").attr("font-family", FONT_FAMILY).style("overflow", "visible");
|
|
276
288
|
const g = svg.append("g").attr("transform", `translate(${leftMargin}, ${sMarginTop})`);
|
|
277
289
|
if (showTitle) {
|
|
278
|
-
svg.append("text").attr("class", "chart-title").attr("x", header.titleX).attr("y", sTitleY).attr("text-anchor", header.titleAnchor).attr("font-size", sTitleFontSize).attr("font-weight", TITLE_FONT_WEIGHT).attr("fill", palette.text).text(title);
|
|
290
|
+
svg.append("text").attr("class", "chart-title").attr("x", header.inline ? header.titleX : layoutWidth / 2).attr("y", sTitleY).attr("text-anchor", header.titleAnchor).attr("font-size", sTitleFontSize).attr("font-weight", TITLE_FONT_WEIGHT).attr("fill", palette.text).text(title);
|
|
279
291
|
}
|
|
280
292
|
function drawLegend() {
|
|
281
293
|
svg.selectAll(".gantt-tag-legend-container").remove();
|
|
@@ -362,7 +374,8 @@ function renderGantt(container, resolved, palette, isDark, options, exportDims)
|
|
|
362
374
|
drawLegend();
|
|
363
375
|
const startTime = dateToFractionalYear(resolved.startDate);
|
|
364
376
|
const endTime = dateToFractionalYear(resolved.endDate);
|
|
365
|
-
const
|
|
377
|
+
const span = endTime - startTime;
|
|
378
|
+
const domainPad = span > 0 ? span * 0.02 : 1 / 365;
|
|
366
379
|
const domainMin = startTime - domainPad;
|
|
367
380
|
const domainMax = endTime + domainPad;
|
|
368
381
|
const xScale = d3Scale.scaleLinear().domain([domainMin, domainMax]).range([0, innerWidth]);
|
|
@@ -1321,15 +1334,17 @@ function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargi
|
|
|
1321
1334
|
isSwimlane,
|
|
1322
1335
|
palette
|
|
1323
1336
|
);
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1337
|
+
wireSwimlaneToggle(
|
|
1338
|
+
iconEl,
|
|
1339
|
+
groupName,
|
|
1340
|
+
isSwimlane,
|
|
1341
|
+
!!onSwimlaneChange,
|
|
1342
|
+
() => {
|
|
1343
|
+
onSwimlaneChange?.(
|
|
1329
1344
|
currentSwimlaneGroup?.toLowerCase() === groupName.toLowerCase() ? null : groupName
|
|
1330
1345
|
);
|
|
1331
1346
|
}
|
|
1332
|
-
|
|
1347
|
+
);
|
|
1333
1348
|
}
|
|
1334
1349
|
}
|
|
1335
1350
|
};
|
|
@@ -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-L5AFONQU.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
|
};
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "./chunk-XCKNFFKM.js";
|
|
26
26
|
import {
|
|
27
27
|
layoutInlineHeader
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-CNUN5GO6.js";
|
|
29
29
|
import {
|
|
30
30
|
TITLE_FONT_SIZE,
|
|
31
31
|
TITLE_FONT_WEIGHT,
|
|
@@ -34,17 +34,27 @@ import {
|
|
|
34
34
|
} from "./chunk-VLC6WNRD.js";
|
|
35
35
|
import {
|
|
36
36
|
renderIntegratedLegend
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-7SX4IY6T.js";
|
|
38
38
|
import {
|
|
39
39
|
getLegendExtent,
|
|
40
40
|
getMaxLegendReservedHeight
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-NS7L7YKH.js";
|
|
42
42
|
import {
|
|
43
43
|
FONT_FAMILY
|
|
44
44
|
} from "./chunk-ICLB27PZ.js";
|
|
45
45
|
import {
|
|
46
46
|
parseInfra
|
|
47
47
|
} from "./chunk-GUTZCRBT.js";
|
|
48
|
+
import {
|
|
49
|
+
preprocessDescriptionLine
|
|
50
|
+
} from "./chunk-IYULMRBE.js";
|
|
51
|
+
import {
|
|
52
|
+
tagAttrKey
|
|
53
|
+
} from "./chunk-L5AFONQU.js";
|
|
54
|
+
import {
|
|
55
|
+
legendInlineRequested,
|
|
56
|
+
legendSuppressed
|
|
57
|
+
} from "./chunk-44GP7PD5.js";
|
|
48
58
|
import {
|
|
49
59
|
LEGEND_CAPSULE_PAD,
|
|
50
60
|
LEGEND_DOT_R,
|
|
@@ -55,29 +65,19 @@ import {
|
|
|
55
65
|
LEGEND_PILL_FONT_SIZE,
|
|
56
66
|
LEGEND_PILL_PAD,
|
|
57
67
|
measureLegendText
|
|
58
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-I6GGMCTV.js";
|
|
59
69
|
import {
|
|
60
70
|
CHAR_WIDTH_RATIO,
|
|
61
71
|
measureText,
|
|
62
72
|
truncateText
|
|
63
73
|
} from "./chunk-KAO7JL4I.js";
|
|
64
|
-
import {
|
|
65
|
-
preprocessDescriptionLine
|
|
66
|
-
} from "./chunk-IYULMRBE.js";
|
|
67
|
-
import {
|
|
68
|
-
tagAttrKey
|
|
69
|
-
} from "./chunk-L5AFONQU.js";
|
|
70
|
-
import {
|
|
71
|
-
legendInlineRequested,
|
|
72
|
-
legendSuppressed
|
|
73
|
-
} from "./chunk-44GP7PD5.js";
|
|
74
74
|
import {
|
|
75
75
|
contrastText,
|
|
76
76
|
groupFill,
|
|
77
77
|
groupStroke,
|
|
78
78
|
mix,
|
|
79
79
|
shapeFill
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-L24LESXF.js";
|
|
81
81
|
import {
|
|
82
82
|
resolveColor
|
|
83
83
|
} from "./chunk-2M4IGSCY.js";
|