@diagrammo/dgmo 0.53.0 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advanced.d.ts +112 -9
- package/dist/advanced.js +188 -160
- package/dist/auto.js +147 -132
- package/dist/auto.mjs +2352 -746
- package/dist/block.js +65 -62
- package/dist/chart-meta.js +52 -49
- package/dist/{charts-d3-DH2XA45I.js → charts-d3-KZ6V4OP2.js} +10 -8
- package/dist/chunk-2CW5ZTNH.js +58 -0
- package/dist/{chunk-MA3HJZHB.js → chunk-2HX6ZGY7.js} +7 -7
- package/dist/{chunk-YG2BEIQU.js → chunk-2R6HG6D5.js} +11 -11
- package/dist/{chunk-65V6IRFN.js → chunk-2ZJXKJSI.js} +106 -60
- package/dist/{chunk-PYO4TJJ3.js → chunk-32HUNA33.js} +60 -18
- package/dist/{chunk-UK6DKJLD.js → chunk-3BFXELBL.js} +51 -4
- package/dist/{chunk-RW5PEJ7D.js → chunk-3BZJ5KD5.js} +7 -3
- package/dist/{chunk-FT7TPPZ5.js → chunk-3FUTFYSP.js} +65 -26
- package/dist/{chunk-QAALSCKI.js → chunk-4MZCJV4M.js} +12 -12
- package/dist/{chunk-ZXUAPTCK.js → chunk-4R5KIPNX.js} +2 -2
- package/dist/{chunk-QWIBT6DS.js → chunk-5D5VHDJM.js} +49 -14
- package/dist/{chunk-U7NKYLX2.js → chunk-5H5GWWA4.js} +55 -19
- package/dist/{chunk-P3H7QVDH.js → chunk-5K5XBEXT.js} +11 -6
- package/dist/{chunk-PT4SW76W.js → chunk-6NJWBMJV.js} +49 -14
- package/dist/{chunk-I46X5VUA.js → chunk-7TF3QOOD.js} +25 -1
- package/dist/{chunk-6DCOIN4W.js → chunk-A2ARDILY.js} +783 -3
- package/dist/{chunk-CK2GMDXD.js → chunk-A2PTRSAO.js} +2 -2
- package/dist/{chunk-APKUAJ2L.js → chunk-A2RUBBVT.js} +14 -1
- package/dist/{chunk-GMIJ35PW.js → chunk-A4UJP4IS.js} +68 -20
- package/dist/{chunk-LQHVDZYC.js → chunk-AKE6C2D7.js} +4 -4
- package/dist/{chunk-W5KMNC5U.js → chunk-ASPS5O6F.js} +9 -10
- package/dist/{chunk-FLDC7ZAK.js → chunk-AU75JHSR.js} +6 -3
- package/dist/chunk-BEOAKGNA.js +484 -0
- package/dist/{chunk-XY3UDKKH.js → chunk-COVYNAKJ.js} +4 -4
- package/dist/{chunk-4ASVFYB2.js → chunk-DS4MDEQ7.js} +5 -5
- package/dist/{chunk-7JDTNFAK.js → chunk-EFUQENO5.js} +76 -32
- package/dist/{chunk-BULHGPHK.js → chunk-EMSOFHEN.js} +2 -2
- package/dist/{chunk-3BEKKRH5.js → chunk-ETTDF3S2.js} +49 -11
- package/dist/{chunk-JHOAH4TI.js → chunk-ETYF5QZR.js} +2 -2
- package/dist/{chunk-AHXIMHDQ.js → chunk-F5ZNUMSY.js} +53 -14
- package/dist/{chunk-I64ECJX3.js → chunk-FBP33UM6.js} +3 -3
- package/dist/{chunk-VIRANCNY.js → chunk-FGAMFJNJ.js} +58 -20
- package/dist/{chunk-774C2FF3.js → chunk-GRXPFBYC.js} +24 -3
- package/dist/{chunk-NNYFQOTK.js → chunk-GTO5VCYG.js} +10 -8
- package/dist/{chunk-RJ5LBZ5U.js → chunk-HES4K6DV.js} +13 -13
- package/dist/{chunk-AZNXGWDC.js → chunk-HGKOVKAX.js} +7 -7
- package/dist/{chunk-DWUMPMV2.js → chunk-HLGOG44K.js} +2 -2
- package/dist/{chunk-VJHBSPGF.js → chunk-HUTP35XT.js} +5 -4
- package/dist/{chunk-3CZLWOCI.js → chunk-HX7QNHC6.js} +3 -3
- package/dist/{chunk-R5NH5BZG.js → chunk-IALX52TR.js} +6 -6
- package/dist/{chunk-A44USUV7.js → chunk-ICZ7M6IZ.js} +23 -17
- package/dist/{chunk-27STWBOK.js → chunk-IF4KYSJZ.js} +10 -8
- package/dist/{chunk-HORZ5H2L.js → chunk-IG6J7JWH.js} +61 -22
- package/dist/{chunk-VRRDUYOK.js → chunk-IIUYKQ5J.js} +3 -3
- package/dist/{chunk-GMAH572Z.js → chunk-INTAQV2Y.js} +2 -2
- package/dist/{chunk-6AUZPPAV.js → chunk-ITXL2KU5.js} +2 -2
- package/dist/{chunk-KKHCNSKK.js → chunk-IWG2ECAO.js} +5 -5
- package/dist/{chunk-GQ644SPD.js → chunk-JGCEFKZP.js} +14 -14
- package/dist/{chunk-HNBY6CNV.js → chunk-JQLSFZZP.js} +2 -2
- package/dist/{chunk-CMVZWP32.js → chunk-JR7Q6GHE.js} +2 -2
- package/dist/{chunk-LHILKFDP.js → chunk-KC3WBBI7.js} +9 -9
- package/dist/{chunk-GABSL6TH.js → chunk-KK3L5NVK.js} +3 -3
- package/dist/{chunk-LC3FFD43.js → chunk-L2DIXZUT.js} +98 -48
- package/dist/{chunk-4WGMGKCZ.js → chunk-LCRPGGGS.js} +11 -11
- package/dist/{chunk-6KY7OCZC.js → chunk-LKGQ46P4.js} +3 -3
- package/dist/{chunk-HE5J53SZ.js → chunk-LW7STMYZ.js} +3 -3
- package/dist/{chunk-BD3WGY4T.js → chunk-M53MDBIW.js} +2 -2
- package/dist/{chunk-AN2DQB3G.js → chunk-MEH4TJEX.js} +12 -12
- package/dist/{chunk-SGPFVDUL.js → chunk-MNS2ENXF.js} +6 -6
- package/dist/{chunk-FXCB7H5O.js → chunk-MSWIBF6J.js} +2 -2
- package/dist/{chunk-BR7AYN76.js → chunk-NL7FUIVD.js} +12 -12
- package/dist/{chunk-AIMLCDAO.js → chunk-NN5TF4OV.js} +2 -2
- package/dist/{chunk-7GUF6SDR.js → chunk-NPPUZ4SK.js} +9 -9
- package/dist/{chunk-4K42RUGC.js → chunk-NYOOPQFD.js} +47 -12
- package/dist/{chunk-FFXCKZOU.js → chunk-O4CZDTQA.js} +3 -3
- package/dist/{chunk-6HTRCTAS.js → chunk-P5XXIVEU.js} +6 -4
- package/dist/{chunk-XEAQDIMF.js → chunk-PC4YLEKA.js} +6 -6
- package/dist/{chunk-Q7AH665U.js → chunk-PCVXXPYU.js} +121 -38
- package/dist/{chunk-W2DINCHL.js → chunk-PKUWYPI5.js} +207 -24
- package/dist/{chunk-PV2QO7QL.js → chunk-PSIDVCBA.js} +2 -2
- package/dist/{chunk-YR43LJT5.js → chunk-PV7ND5WL.js} +58 -15
- package/dist/{chunk-QI3BOLQB.js → chunk-Q5CMQVWF.js} +4 -4
- package/dist/{chunk-4RGZFA7H.js → chunk-Q5IHQ4NW.js} +11 -1
- package/dist/{chunk-SG4PRYO3.js → chunk-QQXFYTLC.js} +391 -60
- package/dist/{chunk-GWQJKTFS.js → chunk-QZYGRDMM.js} +118 -99
- package/dist/{chunk-CQFNIIQN.js → chunk-RKBCKCSF.js} +2 -2
- package/dist/{chunk-FUKNRLIJ.js → chunk-RSBH2C7O.js} +6 -6
- package/dist/{chunk-2QC4HXCY.js → chunk-RYNCWA5X.js} +11 -10
- package/dist/{chunk-NNUMX6WX.js → chunk-RZWIPDZ2.js} +40 -15
- package/dist/{chunk-VKNCC2GX.js → chunk-S52F62GW.js} +13 -13
- package/dist/{chunk-UQRIKAMH.js → chunk-SCOHNGPG.js} +59 -18
- package/dist/{chunk-VGNIDAPQ.js → chunk-SSHS42QG.js} +4 -4
- package/dist/chunk-TGOMHUOV.js +218 -0
- package/dist/{chunk-UKP5HWB5.js → chunk-UBQU2BY6.js} +4 -4
- package/dist/{chunk-IQJCVREL.js → chunk-UES4P7FN.js} +6 -6
- package/dist/chunk-US3P2DQO.js +87 -0
- package/dist/{chunk-GAWKIIPO.js → chunk-UXXLE6AH.js} +8 -8
- package/dist/{chunk-22OQWBWD.js → chunk-VMWSZCAK.js} +12 -11
- package/dist/{chunk-XG4NWFPY.js → chunk-VVIRAGID.js} +13 -13
- package/dist/{chunk-X3RXGSCZ.js → chunk-VXTUWXFB.js} +54 -15
- package/dist/{chunk-J7HI6G3G.js → chunk-W4TSD3IP.js} +6 -6
- package/dist/{chunk-FGDSTT3F.js → chunk-WB3NA3JJ.js} +2 -2
- package/dist/{chunk-KUSAVOWZ.js → chunk-WITOJZGL.js} +8 -4
- package/dist/{chunk-UVDCHR4E.js → chunk-WVGNXDEE.js} +2 -2
- package/dist/{chunk-HOXKNRON.js → chunk-X3X4LZDC.js} +2 -2
- package/dist/{chunk-SQCBSFT5.js → chunk-XKKH2DPG.js} +51 -263
- package/dist/{chunk-NR5HCAUD.js → chunk-XSVWUOUZ.js} +1 -1
- package/dist/{chunk-BFDVEO5R.js → chunk-Y4BBGFKY.js} +2 -2
- package/dist/{chunk-VAO6ANGC.js → chunk-YP2T5YUP.js} +14 -9
- package/dist/{chunk-PKNNHU7H.js → chunk-YXKNXIWA.js} +19 -11
- package/dist/{chunk-UFQJMOVZ.js → chunk-ZGIBV36U.js} +6 -6
- package/dist/{chunk-XQ4KN6JQ.js → chunk-ZP265ICS.js} +16 -15
- package/dist/{chunk-JTMSWEIW.js → chunk-ZWVKTWK6.js} +4 -4
- package/dist/{chunk-ALYZ3MAA.js → chunk-ZXNHHO6D.js} +8 -476
- package/dist/cli.cjs +166 -149
- package/dist/clock.js +34 -1
- package/dist/completion-registry.d.ts +129 -0
- package/dist/completion-registry.js +1278 -0
- package/dist/{compute-G55RG53N.js → compute-JAP5E2E4.js} +2 -2
- package/dist/dgmo-router-T4HGLIGA.js +88 -0
- package/dist/{dimensions-K6PGYYGT.js → dimensions-3JINHSYK.js} +8 -8
- package/dist/editor.js +28 -1
- package/dist/element.js +148 -133
- package/dist/element.mjs +2352 -746
- package/dist/{flowchart-parser-LALR6J6F.js → flowchart-parser-M7KKTLX7.js} +5 -5
- package/dist/{flowchart-renderer-DXYB5YRF.js → flowchart-renderer-FFEQFQEU.js} +9 -9
- package/dist/highlight.js +28 -1
- package/dist/index.js +77 -64
- package/dist/{layout-ZE5DRJWX.js → layout-3ZZBKUQC.js} +4 -4
- package/dist/{layout-3BVDMKXI.js → layout-AUKTWGYL.js} +4 -4
- package/dist/{layout-4IHCMWZN.js → layout-CRLTSFYQ.js} +4 -4
- package/dist/{layout-WCAIKGZG.js → layout-FNZDJGKF.js} +5 -5
- package/dist/layout-GHWRJKZQ.js +15 -0
- package/dist/{layout-3V2A4MUE.js → layout-LGXOKUCD.js} +6 -5
- package/dist/{layout-WSMPBQ4Q.js → layout-NF4EWFLT.js} +3 -3
- package/dist/{layout-OL2XFJXA.js → layout-SP7HJWKA.js} +3 -3
- package/dist/{layout-E6HR6PXH.js → layout-UR7CYAHL.js} +3 -3
- package/dist/layout-UTMEVFHN.js +15 -0
- package/dist/{layout-search-34DPZD43.js → layout-search-U2H4ORFJ.js} +14 -7
- package/dist/{legend-constants-P5EQWRQQ.js → legend-constants-B77VKB3R.js} +7 -2
- package/dist/{parser-6PPHAXXH.js → parser-2AXPSKWB.js} +5 -5
- package/dist/{parser-5HQXCNOS.js → parser-2AZ2KQTO.js} +4 -4
- package/dist/{parser-3KIGEEJM.js → parser-2LF33IS2.js} +4 -4
- package/dist/{parser-NNIL3HXU.js → parser-3QJ2Z4H4.js} +3 -3
- package/dist/parser-5GCQFSTQ.js +13 -0
- package/dist/{parser-6B6SSZT7.js → parser-62OHBRU5.js} +3 -3
- package/dist/{parser-VOERD6XR.js → parser-7LYJFZCP.js} +4 -4
- package/dist/{parser-ZGNXYFPS.js → parser-BMOTF72G.js} +3 -3
- package/dist/{parser-IVGHXLZP.js → parser-CIFLYZYP.js} +4 -3
- package/dist/{parser-GN2MM5CC.js → parser-D2UL2G5U.js} +3 -3
- package/dist/{parser-GKP2MHHL.js → parser-DM2APTKB.js} +3 -3
- package/dist/{parser-27Z76SN3.js → parser-DYYTPLBL.js} +4 -4
- package/dist/{parser-5FGJSQNS.js → parser-GOUGUTPU.js} +4 -4
- package/dist/{parser-G26MTBFS.js → parser-HGVUVD6J.js} +3 -3
- package/dist/{parser-EXNBDNGY.js → parser-IEJD3CZB.js} +3 -3
- package/dist/{parser-ZQDQTB4X.js → parser-JBEWNLAV.js} +5 -5
- package/dist/{parser-5QPFOB5F.js → parser-JMXPHNZD.js} +4 -4
- package/dist/{parser-4E4I3GNT.js → parser-JMXSQY3K.js} +4 -4
- package/dist/{parser-FF4BMRSB.js → parser-LUXS7J32.js} +4 -4
- package/dist/{parser-3VSWEKBF.js → parser-M5BUHULF.js} +4 -4
- package/dist/{parser-IKWK2ZU3.js → parser-MESRHUS4.js} +4 -5
- package/dist/{parser-3CODK6RG.js → parser-OOYNI2UT.js} +4 -4
- package/dist/{parser-YSLNDFLV.js → parser-PVBUAVRR.js} +4 -5
- package/dist/{parser-CKA3QMAG.js → parser-QKRBSQLJ.js} +5 -5
- package/dist/{parser-UWRX52PC.js → parser-S6NWSIJO.js} +4 -4
- package/dist/{parser-RNLTBIJ6.js → parser-SFEK6Q7Z.js} +4 -4
- package/dist/{parser-7JVIDLLR.js → parser-SUV52NQW.js} +4 -4
- package/dist/{parser-CRKLXGW7.js → parser-SZHGLOOZ.js} +4 -4
- package/dist/{parser-275KP7JO.js → parser-TO7IENWL.js} +5 -6
- package/dist/{parser-XNKJCMMA.js → parser-TVAMC7CQ.js} +4 -4
- package/dist/{parser-FOOFEJQU.js → parser-VAW46R57.js} +4 -4
- package/dist/{parser-XVPTRWZ4.js → parser-XDSPOXSE.js} +4 -4
- package/dist/pert.d.ts +2 -0
- package/dist/{renderer-D3BRNOMV.js → renderer-3PWLOJPD.js} +11 -11
- package/dist/{renderer-7NQSTQMQ.js → renderer-5EMHIQL5.js} +4 -4
- package/dist/{renderer-ZBTEX2JK.js → renderer-5PODNLYP.js} +4 -4
- package/dist/{renderer-6WRYVM5R.js → renderer-AQJIQ2XU.js} +9 -8
- package/dist/{renderer-JCZG6AYU.js → renderer-BEW3AYFT.js} +10 -10
- package/dist/{renderer-YUKPS27O.js → renderer-C3UYAXA6.js} +10 -8
- package/dist/{renderer-AK2WO4EI.js → renderer-CENXCMWG.js} +4 -4
- package/dist/{renderer-HIFQVEJA.js → renderer-CXM3ARYN.js} +10 -9
- package/dist/{renderer-JTCX6PCG.js → renderer-DW6TEBLA.js} +10 -9
- package/dist/{renderer-VMH6L6CP.js → renderer-FE5M6SEZ.js} +10 -9
- package/dist/{renderer-TYHGXAVT.js → renderer-FXK6ZL3P.js} +4 -4
- package/dist/{renderer-UPF7NRTI.js → renderer-G5ESLCJB.js} +12 -11
- package/dist/{renderer-CWEFGEIC.js → renderer-HTDS4FED.js} +14 -13
- package/dist/{renderer-XTXSOK3L.js → renderer-IO4KCFVL.js} +10 -10
- package/dist/{renderer-SQ54MDSA.js → renderer-IRAFJNTK.js} +10 -9
- package/dist/{renderer-JWGQSTMR.js → renderer-MFTTFW32.js} +15 -14
- package/dist/{renderer-2C6DJRYN.js → renderer-MPXI4FVL.js} +8 -8
- package/dist/{renderer-5MPN7CXZ.js → renderer-NVBEMQ6L.js} +5 -5
- package/dist/{renderer-7ZNVOVFG.js → renderer-OOGDCR6K.js} +3 -3
- package/dist/{renderer-COLQFSFV.js → renderer-Q5P72O4A.js} +9 -9
- package/dist/{renderer-WCWI4I6A.js → renderer-QZESC66H.js} +2 -2
- package/dist/{renderer-NE5W7CQP.js → renderer-RDBUXW7P.js} +6 -5
- package/dist/{renderer-6EN5XXJZ.js → renderer-S4XB3JR2.js} +11 -11
- package/dist/{renderer-WFSUBKUL.js → renderer-SIWEEWJ5.js} +9 -8
- package/dist/{renderer-LVZAHRP6.js → renderer-TKTM2SL4.js} +12 -12
- package/dist/{renderer-QD2SJF2I.js → renderer-TXTTV4HA.js} +10 -9
- package/dist/{renderer-YUXGXGSW.js → renderer-UZIU4AHK.js} +10 -9
- package/dist/{renderer-RLMOTXZ6.js → renderer-V72VJIGG.js} +14 -13
- package/dist/{renderer-UKXW2QPE.js → renderer-VEGOEZOI.js} +10 -8
- package/dist/{renderer-WNFXYYGL.js → renderer-W6I6T2TA.js} +8 -8
- package/dist/{renderer-KARQF3F3.js → renderer-WSHJRR2T.js} +8 -8
- package/dist/{renderer-radial-WF6VOUOD.js → renderer-radial-AG75PBYD.js} +9 -9
- package/dist/{resolver-WFKZYBJ2.js → resolver-ZSFQQRTH.js} +3 -3
- package/dist/{state-parser-L7DHZIQO.js → state-parser-KIPZGIB4.js} +5 -5
- package/dist/{state-renderer-TFEUOP4H.js → state-renderer-U6OSJG52.js} +13 -12
- package/docs/language-reference.md +2 -1
- package/package.json +5 -1
- package/dist/chunk-YJVA3QUU.js +0 -734
- package/dist/dgmo-router-B4S23EBH.js +0 -86
- package/dist/layout-3M5UYJHY.js +0 -14
- package/dist/layout-KPQWJNAG.js +0 -14
- package/dist/parser-7JHWEWXM.js +0 -13
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
FONT_FAMILY
|
|
8
8
|
} from "./chunk-6KFWC4CO.js";
|
|
9
9
|
import {
|
|
10
|
-
getSeriesColors
|
|
10
|
+
getSeriesColors,
|
|
11
|
+
mix
|
|
11
12
|
} from "./chunk-JYDMBWRP.js";
|
|
12
13
|
import {
|
|
13
14
|
resolveColor
|
|
@@ -15,13 +16,19 @@ import {
|
|
|
15
16
|
|
|
16
17
|
// src/version-control/renderer.ts
|
|
17
18
|
import * as d3Selection from "d3-selection";
|
|
18
|
-
var LINE =
|
|
19
|
-
var DOT =
|
|
20
|
-
var CORNER =
|
|
21
|
-
var ANG = 32;
|
|
19
|
+
var LINE = 3;
|
|
20
|
+
var DOT = 5.5;
|
|
21
|
+
var CORNER = 10;
|
|
22
22
|
var STACK = 19;
|
|
23
23
|
var CIRCLED = "\u2460\u2461\u2462\u2463\u2464\u2465\u2466\u2467\u2468";
|
|
24
24
|
var TITLE_AREA = 40;
|
|
25
|
+
var SHELF_TINT = 13;
|
|
26
|
+
var SHELF_EDGE = 4;
|
|
27
|
+
var SHELF_LIP = 2;
|
|
28
|
+
var SHELF_PAD = 8;
|
|
29
|
+
var SHELF_H = 21;
|
|
30
|
+
var LEADER_GAP = 22;
|
|
31
|
+
var ROW_GAP = 7;
|
|
25
32
|
function clip(s, max) {
|
|
26
33
|
return s.length > max ? s.slice(0, max - 1) + "\u2026" : s;
|
|
27
34
|
}
|
|
@@ -94,12 +101,9 @@ function renderVersionControl(container, parsed, palette, isDark, onClickItem, e
|
|
|
94
101
|
const pos = /* @__PURE__ */ new Map();
|
|
95
102
|
const placements = [];
|
|
96
103
|
let contentW, contentH, gutter, cross0, captionY = 0;
|
|
97
|
-
const cos = Math.cos(ANG * Math.PI / 180);
|
|
98
|
-
const sin = Math.sin(ANG * Math.PI / 180);
|
|
99
104
|
if (!TB) {
|
|
100
|
-
|
|
101
|
-
gutter =
|
|
102
|
-
const along0 = gutter + 34, step = 86, laneGap = 54;
|
|
105
|
+
gutter = 14;
|
|
106
|
+
const along0 = gutter + 20, step = 88, laneGap = 50;
|
|
103
107
|
cross0 = 16 + maxStack * STACK + 14;
|
|
104
108
|
for (const n of nodes)
|
|
105
109
|
pos.set(n.key, {
|
|
@@ -107,17 +111,34 @@ function renderVersionControl(container, parsed, palette, isDark, onClickItem, e
|
|
|
107
111
|
y: cross0 + n.lane * laneGap
|
|
108
112
|
});
|
|
109
113
|
const lanesBottom = cross0 + (laneCount - 1) * laneGap;
|
|
110
|
-
const
|
|
111
|
-
|
|
114
|
+
const bandTop = lanesBottom + LEADER_GAP;
|
|
115
|
+
const shelfGap = 6;
|
|
116
|
+
const rowRight = [];
|
|
117
|
+
const sorted = [...nodes].sort(
|
|
118
|
+
(a, b) => pos.get(a.key).x - pos.get(b.key).x
|
|
119
|
+
);
|
|
120
|
+
for (const n of sorted) {
|
|
112
121
|
const p = pos.get(n.key);
|
|
122
|
+
const w = label.get(n.key).lw + SHELF_PAD * 2;
|
|
123
|
+
const left = p.x - w / 2;
|
|
124
|
+
let row = rowRight.length;
|
|
125
|
+
for (let l = 0; l < rowRight.length; l++)
|
|
126
|
+
if (rowRight[l] + shelfGap <= left) {
|
|
127
|
+
row = l;
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
const top = bandTop + row * (SHELF_H + ROW_GAP);
|
|
131
|
+
rowRight[row] = left + w;
|
|
113
132
|
placements.push({
|
|
114
133
|
node: n,
|
|
115
134
|
kind: "msg",
|
|
116
|
-
diag: true,
|
|
117
135
|
x: p.x,
|
|
118
|
-
y:
|
|
136
|
+
y: top,
|
|
119
137
|
anchor: "start",
|
|
120
|
-
|
|
138
|
+
shelfLeft: Math.max(4, left),
|
|
139
|
+
shelfTop: top,
|
|
140
|
+
shelfW: w,
|
|
141
|
+
leader: { x1: p.x, y1: p.y + DOT, x2: p.x, y2: top }
|
|
121
142
|
});
|
|
122
143
|
const stack = above.get(n.key) ?? [];
|
|
123
144
|
stack.forEach(
|
|
@@ -133,6 +154,7 @@ function renderVersionControl(container, parsed, palette, isDark, onClickItem, e
|
|
|
133
154
|
})
|
|
134
155
|
);
|
|
135
156
|
}
|
|
157
|
+
const rowCount = rowRight.length;
|
|
136
158
|
for (const b of parsed.branches) {
|
|
137
159
|
if (!b.ab || b.ab.ahead + b.ab.behind === 0 || b.tip == null) continue;
|
|
138
160
|
const tip = pos.get(b.tip);
|
|
@@ -146,10 +168,12 @@ function renderVersionControl(container, parsed, palette, isDark, onClickItem, e
|
|
|
146
168
|
});
|
|
147
169
|
}
|
|
148
170
|
contentW = Math.max(
|
|
149
|
-
along0 + (K - 1) * step + DOT +
|
|
150
|
-
...[...pos.entries()].map(
|
|
151
|
-
|
|
152
|
-
|
|
171
|
+
along0 + (K - 1) * step + DOT + 40,
|
|
172
|
+
...[...pos.entries()].map(
|
|
173
|
+
([k, p]) => p.x + label.get(k).lw / 2 + SHELF_PAD + 8
|
|
174
|
+
)
|
|
175
|
+
) + 8;
|
|
176
|
+
contentH = bandTop + rowCount * (SHELF_H + ROW_GAP) + 8;
|
|
153
177
|
if (parsed.notes.length) {
|
|
154
178
|
captionY = contentH + 4;
|
|
155
179
|
contentH += 8 + parsed.notes.length * 16 + 8;
|
|
@@ -169,7 +193,6 @@ function renderVersionControl(container, parsed, palette, isDark, onClickItem, e
|
|
|
169
193
|
placements.push({
|
|
170
194
|
node: n,
|
|
171
195
|
kind: "msg",
|
|
172
|
-
diag: false,
|
|
173
196
|
x: bandX,
|
|
174
197
|
y: p.y,
|
|
175
198
|
anchor: "start",
|
|
@@ -194,10 +217,16 @@ function renderVersionControl(container, parsed, palette, isDark, onClickItem, e
|
|
|
194
217
|
}
|
|
195
218
|
const showTitle = !!parsed.title;
|
|
196
219
|
const titleH = showTitle ? TITLE_AREA : 0;
|
|
197
|
-
const
|
|
198
|
-
const
|
|
220
|
+
const baseW = contentW;
|
|
221
|
+
const baseH = contentH + titleH;
|
|
199
222
|
const exportMode = !!exportDims;
|
|
200
|
-
const
|
|
223
|
+
const paneW = exportMode ? 0 : container.clientWidth || 0;
|
|
224
|
+
const paneH = exportMode ? 0 : container.clientHeight || 0;
|
|
225
|
+
const W = Math.round(Math.max(baseW, paneW));
|
|
226
|
+
const H = Math.round(Math.max(baseH, paneH));
|
|
227
|
+
const vw = exportMode ? W : paneW || W;
|
|
228
|
+
const vh = exportMode ? H : paneH || H;
|
|
229
|
+
const svg = d3Selection.select(container).append("svg").attr("width", vw).attr("height", vh).attr("viewBox", `0 0 ${W} ${H}`).attr("preserveAspectRatio", "xMidYMin meet").attr("xmlns", "http://www.w3.org/2000/svg").style("font-family", FONT_FAMILY);
|
|
201
230
|
svg.append("rect").attr("width", W).attr("height", H).attr("fill", palette.bg);
|
|
202
231
|
if (showTitle) {
|
|
203
232
|
const t = svg.append("text").attr("class", "chart-title").attr("x", W / 2).attr("y", TITLE_Y).attr("text-anchor", "middle").attr("fill", palette.text).attr("font-family", FONT_FAMILY).attr("font-size", TITLE_FONT_SIZE).attr("font-weight", TITLE_FONT_WEIGHT).attr("data-line-number", parsed.titleLineNumber ?? 1).text(parsed.title);
|
|
@@ -217,7 +246,6 @@ function renderVersionControl(container, parsed, palette, isDark, onClickItem, e
|
|
|
217
246
|
label,
|
|
218
247
|
colorOf,
|
|
219
248
|
byKey,
|
|
220
|
-
gutter,
|
|
221
249
|
cross0,
|
|
222
250
|
captionY,
|
|
223
251
|
onClickItem && !exportMode ? onClickItem : void 0
|
|
@@ -229,7 +257,7 @@ function abText(ab) {
|
|
|
229
257
|
if (ab.behind) a.push("\u2193" + ab.behind);
|
|
230
258
|
return a.join(" ");
|
|
231
259
|
}
|
|
232
|
-
function drawGraph(g, parsed, palette, TB, pos, placements, label, colorOf, byKey,
|
|
260
|
+
function drawGraph(g, parsed, palette, TB, pos, placements, label, colorOf, byKey, cross0, captionY, onClickItem) {
|
|
233
261
|
const nodes = parsed.nodes;
|
|
234
262
|
const P = (k) => pos.get(k);
|
|
235
263
|
const branchCorner = (par, n) => TB ? { x: P(n.key).x, y: P(par.key).y } : { x: P(par.key).x, y: P(n.key).y };
|
|
@@ -253,17 +281,17 @@ function drawGraph(g, parsed, palette, TB, pos, placements, label, colorOf, byKe
|
|
|
253
281
|
const N = P(n.key);
|
|
254
282
|
if (n.prev != null) {
|
|
255
283
|
const a = P(n.prev);
|
|
256
|
-
const e = g.append("line").attr("x1", a.x).attr("y1", a.y).attr("x2", N.x).attr("y2", N.y).attr("stroke", c).attr("stroke-width", LINE).attr("stroke-linecap", "round").attr("opacity", o);
|
|
284
|
+
const e = g.append("line").attr("x1", a.x).attr("y1", a.y).attr("x2", N.x).attr("y2", N.y).attr("stroke", c).attr("stroke-width", LINE).attr("stroke-linecap", "round").attr("data-branch", n.branch).attr("opacity", o);
|
|
257
285
|
if (n.ghost) e.attr("stroke-dasharray", "5 5");
|
|
258
286
|
}
|
|
259
287
|
if (n.parent != null) {
|
|
260
288
|
const par = byKey(n.parent), cc = branchCorner(par, n), pp = P(par.key);
|
|
261
|
-
const e = g.append("path").attr("d", roundedL(pp.x, pp.y, cc.x, cc.y, N.x, N.y, CORNER)).attr("fill", "none").attr("stroke", c).attr("stroke-width", LINE).attr("stroke-linecap", "round").attr("opacity", o);
|
|
289
|
+
const e = g.append("path").attr("d", roundedL(pp.x, pp.y, cc.x, cc.y, N.x, N.y, CORNER)).attr("fill", "none").attr("stroke", c).attr("stroke-width", LINE).attr("stroke-linecap", "round").attr("data-branch", n.branch).attr("opacity", o);
|
|
262
290
|
if (n.ghost) e.attr("stroke-dasharray", "5 5");
|
|
263
291
|
}
|
|
264
292
|
if (n.mergeFrom != null) {
|
|
265
293
|
const s = byKey(n.mergeFrom), cc = mergeCorner(s, n), sp = P(s.key);
|
|
266
|
-
g.append("path").attr("d", roundedL(sp.x, sp.y, cc.x, cc.y, N.x, N.y, CORNER)).attr("fill", "none").attr("stroke", colorOf(s)).attr("stroke-width", LINE).attr("stroke-linecap", "round").attr("opacity", 0.92 * o);
|
|
294
|
+
g.append("path").attr("d", roundedL(sp.x, sp.y, cc.x, cc.y, N.x, N.y, CORNER)).attr("fill", "none").attr("stroke", colorOf(s)).attr("stroke-width", LINE).attr("stroke-linecap", "round").attr("data-branch", s.branch).attr("opacity", 0.92 * o);
|
|
267
295
|
}
|
|
268
296
|
if (n.cherryFrom != null)
|
|
269
297
|
dlink(byKey(n.cherryFrom), n, colorOf(byKey(n.cherryFrom)), false);
|
|
@@ -284,7 +312,7 @@ function drawGraph(g, parsed, palette, TB, pos, placements, label, colorOf, byKe
|
|
|
284
312
|
if (TB) {
|
|
285
313
|
g.append("text").attr("x", fp.x).attr("y", 14).attr("text-anchor", "middle").attr("font-size", 12.5).attr("font-weight", 800).attr("fill", col).text(b.name);
|
|
286
314
|
} else {
|
|
287
|
-
g.append("text").attr("x",
|
|
315
|
+
g.append("text").attr("x", fp.x - DOT - 1).attr("y", fp.y - DOT - 7).attr("text-anchor", "start").attr("font-size", 12.5).attr("font-weight", 800).attr("fill", col).attr("data-branch", b.name).text(b.name);
|
|
288
316
|
}
|
|
289
317
|
}
|
|
290
318
|
}
|
|
@@ -338,11 +366,12 @@ function drawGraph(g, parsed, palette, TB, pos, placements, label, colorOf, byKe
|
|
|
338
366
|
}
|
|
339
367
|
g.append("text").attr("x", cx).attr("y", cy + 4).attr("text-anchor", "middle").attr("font-size", 10.5).attr("font-weight", weight).attr("fill", textColor).text(text);
|
|
340
368
|
};
|
|
369
|
+
let shelfSeq = 0;
|
|
341
370
|
for (const pl of placements) {
|
|
342
371
|
const n = pl.node;
|
|
343
372
|
const c = colorOf(n);
|
|
344
373
|
if (pl.leader) {
|
|
345
|
-
g.append("line").attr("x1", pl.leader.x1).attr("y1", pl.leader.y1).attr("x2", pl.leader.x2).attr("y2", pl.leader.y2).attr("stroke", c).attr("stroke-width", 1).attr("opacity", 0.
|
|
374
|
+
g.append("line").attr("x1", pl.leader.x1).attr("y1", pl.leader.y1).attr("x2", pl.leader.x2).attr("y2", pl.leader.y2).attr("stroke", c).attr("stroke-width", 1.5).attr("stroke-linecap", "round").attr("data-branch", n.branch).attr("opacity", 0.55 * gop(n));
|
|
346
375
|
}
|
|
347
376
|
if (pl.kind === "tag") pill(pl.x, pl.y, pl.w, pl.label, c, palette.bg);
|
|
348
377
|
else if (pl.kind === "head")
|
|
@@ -368,7 +397,22 @@ function drawGraph(g, parsed, palette, TB, pos, placements, label, colorOf, byKe
|
|
|
368
397
|
const L = label.get(n.key);
|
|
369
398
|
const gh = n.ghost;
|
|
370
399
|
const mfill = gh ? palette.textMuted : c;
|
|
371
|
-
|
|
400
|
+
let tx = pl.x;
|
|
401
|
+
let ty = pl.y + 4;
|
|
402
|
+
let anchor = pl.anchor;
|
|
403
|
+
if (pl.shelfW != null) {
|
|
404
|
+
const left = pl.shelfLeft;
|
|
405
|
+
const top = pl.shelfTop;
|
|
406
|
+
const w = pl.shelfW;
|
|
407
|
+
const clipId = `dgmo-vc-shelf-${shelfSeq++}`;
|
|
408
|
+
g.append("clipPath").attr("id", clipId).append("rect").attr("x", left).attr("y", top).attr("width", w).attr("height", SHELF_H).attr("rx", SHELF_EDGE);
|
|
409
|
+
g.append("rect").attr("x", left).attr("y", top).attr("width", w).attr("height", SHELF_H).attr("rx", SHELF_EDGE).attr("fill", gh ? palette.bg : mix(c, palette.bg, SHELF_TINT)).attr("data-branch", n.branch).attr("opacity", gh ? 0.5 : 1);
|
|
410
|
+
g.append("rect").attr("x", left).attr("y", top).attr("width", w).attr("height", SHELF_LIP).attr("clip-path", `url(#${clipId})`).attr("fill", c).attr("data-branch", n.branch).attr("opacity", gh ? 0.4 : 1);
|
|
411
|
+
tx = left + SHELF_PAD;
|
|
412
|
+
ty = top + SHELF_H / 2 + 4;
|
|
413
|
+
anchor = "start";
|
|
414
|
+
}
|
|
415
|
+
const t = g.append("text").attr("x", tx).attr("y", ty).attr("text-anchor", anchor).attr("font-size", 12).attr("data-branch", n.branch).attr("opacity", gh ? 0.6 : 1);
|
|
372
416
|
if (L.sha)
|
|
373
417
|
t.append("tspan").attr("font-family", "ui-monospace, monospace").attr("font-size", 11).attr("fill", palette.textMuted).text(L.sha + " ");
|
|
374
418
|
t.append("tspan").attr("fill", mfill).attr("font-weight", n.kind === "cherry" ? 400 : 700).attr("font-style", n.kind === "cherry" ? "italic" : "normal").text(L.msg);
|
|
@@ -399,4 +443,4 @@ export {
|
|
|
399
443
|
renderVersionControl,
|
|
400
444
|
renderVersionControlForExport
|
|
401
445
|
};
|
|
402
|
-
//# sourceMappingURL=chunk-
|
|
446
|
+
//# sourceMappingURL=chunk-EFUQENO5.js.map
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
formatOffsetLabel,
|
|
15
15
|
isValidZone,
|
|
16
16
|
parseFixedOffset
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-A2RUBBVT.js";
|
|
18
18
|
import {
|
|
19
19
|
emit,
|
|
20
20
|
formatDgmoError,
|
|
@@ -775,4 +775,4 @@ export {
|
|
|
775
775
|
isSubNationalUsExtent,
|
|
776
776
|
resolveMap
|
|
777
777
|
};
|
|
778
|
-
//# sourceMappingURL=chunk-
|
|
778
|
+
//# sourceMappingURL=chunk-EMSOFHEN.js.map
|
|
@@ -6,30 +6,34 @@ import {
|
|
|
6
6
|
CARD_RADIUS,
|
|
7
7
|
CONTAINER_RADIUS
|
|
8
8
|
} from "./chunk-3CIOJ5YJ.js";
|
|
9
|
+
import {
|
|
10
|
+
layoutInlineHeader
|
|
11
|
+
} from "./chunk-US3P2DQO.js";
|
|
9
12
|
import {
|
|
10
13
|
renderIntegratedLegend
|
|
11
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ASPS5O6F.js";
|
|
12
15
|
import {
|
|
16
|
+
getLegendExtent,
|
|
13
17
|
getMaxLegendReservedHeight
|
|
14
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GRXPFBYC.js";
|
|
15
19
|
import {
|
|
16
20
|
FONT_FAMILY
|
|
17
21
|
} from "./chunk-6KFWC4CO.js";
|
|
22
|
+
import {
|
|
23
|
+
measureText,
|
|
24
|
+
wrapTextToWidth
|
|
25
|
+
} from "./chunk-4ASYQ347.js";
|
|
18
26
|
import {
|
|
19
27
|
contrastText,
|
|
20
28
|
mix,
|
|
21
29
|
shapeFill,
|
|
22
30
|
themeBaseBg
|
|
23
31
|
} from "./chunk-JYDMBWRP.js";
|
|
24
|
-
import {
|
|
25
|
-
measureText,
|
|
26
|
-
wrapTextToWidth
|
|
27
|
-
} from "./chunk-4ASYQ347.js";
|
|
28
32
|
import {
|
|
29
33
|
resolveActiveTagGroup,
|
|
30
34
|
resolveTagColor,
|
|
31
35
|
tagAttrKey
|
|
32
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-JR7Q6GHE.js";
|
|
33
37
|
|
|
34
38
|
// src/sketch/renderer.ts
|
|
35
39
|
import * as d3 from "d3-selection";
|
|
@@ -377,7 +381,34 @@ function renderSketch(container, parsed, layout, palette, isDark, options = {})
|
|
|
377
381
|
},
|
|
378
382
|
width
|
|
379
383
|
) : 0;
|
|
380
|
-
const
|
|
384
|
+
const hasLegend = legendGroups.length > 0;
|
|
385
|
+
const inlineRequested = parsed.options.legendInline === true;
|
|
386
|
+
const legendExtent = inlineRequested && hasLegend ? getLegendExtent(
|
|
387
|
+
{
|
|
388
|
+
groups: legendGroups,
|
|
389
|
+
position: {
|
|
390
|
+
placement: "top-center",
|
|
391
|
+
titleRelation: "inline-with-title"
|
|
392
|
+
},
|
|
393
|
+
mode: exportMode ? "export" : "preview",
|
|
394
|
+
showInactivePills: true
|
|
395
|
+
},
|
|
396
|
+
{ activeGroup: activeName },
|
|
397
|
+
width
|
|
398
|
+
) : { width: 0, height: 0 };
|
|
399
|
+
const header = layoutInlineHeader({
|
|
400
|
+
requested: inlineRequested,
|
|
401
|
+
title: parsed.title ?? "",
|
|
402
|
+
hasLegend,
|
|
403
|
+
legendWidth: legendExtent.width,
|
|
404
|
+
legendHeight: legendExtent.height,
|
|
405
|
+
containerWidth: width,
|
|
406
|
+
titleBandHeight: titleOffset,
|
|
407
|
+
legendReserve: legendHeight,
|
|
408
|
+
titleBaselineY: TITLE_Y,
|
|
409
|
+
titleFontSize: TITLE_FONT_SIZE
|
|
410
|
+
});
|
|
411
|
+
const contentTop = titleOffset + (header.inline ? 0 : legendHeight) + DIAGRAM_PADDING + extraTop;
|
|
381
412
|
const height = Math.max(
|
|
382
413
|
contentTop + maxY + DIAGRAM_PADDING,
|
|
383
414
|
options.exportDims?.height ?? 0
|
|
@@ -403,15 +434,22 @@ function renderSketch(container, parsed, layout, palette, isDark, options = {})
|
|
|
403
434
|
).attr("fill", color);
|
|
404
435
|
}
|
|
405
436
|
if (showTitle) {
|
|
406
|
-
svg.append("text").attr("x",
|
|
437
|
+
svg.append("text").attr("class", "chart-title").attr("x", header.titleX).attr("y", TITLE_Y).attr("text-anchor", header.titleAnchor).attr("font-size", TITLE_FONT_SIZE).attr("font-weight", 700).attr("fill", palette.text).text(parsed.title);
|
|
407
438
|
}
|
|
408
439
|
if (legendGroups.length > 0) {
|
|
409
|
-
const legendG = svg.append("g").attr(
|
|
440
|
+
const legendG = svg.append("g").attr(
|
|
441
|
+
"transform",
|
|
442
|
+
header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0,${titleOffset + 4})`
|
|
443
|
+
);
|
|
410
444
|
renderIntegratedLegend(legendG, {
|
|
411
445
|
groups: legendGroups,
|
|
412
446
|
...activeName !== null && { activeGroup: activeName },
|
|
413
447
|
mode: exportMode ? "export" : "preview",
|
|
414
448
|
showInactivePills: true,
|
|
449
|
+
position: {
|
|
450
|
+
placement: "top-center",
|
|
451
|
+
titleRelation: header.inline ? "inline-with-title" : "below-title"
|
|
452
|
+
},
|
|
415
453
|
palette,
|
|
416
454
|
isDark,
|
|
417
455
|
width
|
|
@@ -1059,4 +1097,4 @@ export {
|
|
|
1059
1097
|
sketchEdgeGeometry,
|
|
1060
1098
|
renderSketchForExport
|
|
1061
1099
|
};
|
|
1062
|
-
//# sourceMappingURL=chunk-
|
|
1100
|
+
//# sourceMappingURL=chunk-ETTDF3S2.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
splitNameAndMeta,
|
|
6
6
|
tryParseSharedOption,
|
|
7
7
|
warnUnknownMetaKeys
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-A2ARDILY.js";
|
|
9
9
|
import {
|
|
10
10
|
makeDgmoError,
|
|
11
11
|
makeFail
|
|
@@ -127,4 +127,4 @@ function parsePyramid(content) {
|
|
|
127
127
|
export {
|
|
128
128
|
parsePyramid
|
|
129
129
|
};
|
|
130
|
-
//# sourceMappingURL=chunk-
|
|
130
|
+
//# sourceMappingURL=chunk-ETYF5QZR.js.map
|
|
@@ -22,12 +22,16 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
ScaleContext
|
|
24
24
|
} from "./chunk-YYVTBZZC.js";
|
|
25
|
+
import {
|
|
26
|
+
layoutInlineHeader
|
|
27
|
+
} from "./chunk-US3P2DQO.js";
|
|
25
28
|
import {
|
|
26
29
|
renderIntegratedLegend
|
|
27
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ASPS5O6F.js";
|
|
28
31
|
import {
|
|
32
|
+
getLegendExtent,
|
|
29
33
|
getMaxLegendReservedHeight
|
|
30
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-GRXPFBYC.js";
|
|
31
35
|
import {
|
|
32
36
|
TITLE_FONT_SIZE,
|
|
33
37
|
TITLE_FONT_WEIGHT,
|
|
@@ -38,25 +42,26 @@ import {
|
|
|
38
42
|
} from "./chunk-6KFWC4CO.js";
|
|
39
43
|
import {
|
|
40
44
|
parseState
|
|
41
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-MEH4TJEX.js";
|
|
46
|
+
import {
|
|
47
|
+
measureText
|
|
48
|
+
} from "./chunk-4ASYQ347.js";
|
|
42
49
|
import {
|
|
43
50
|
contrastText,
|
|
44
51
|
mix,
|
|
45
52
|
shapeFill,
|
|
46
53
|
themeBaseBg
|
|
47
54
|
} from "./chunk-JYDMBWRP.js";
|
|
48
|
-
import {
|
|
49
|
-
measureText
|
|
50
|
-
} from "./chunk-4ASYQ347.js";
|
|
51
55
|
import {
|
|
52
56
|
resolveActiveTagGroup,
|
|
53
57
|
resolveTagColor,
|
|
54
58
|
tagAttrKey
|
|
55
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-JR7Q6GHE.js";
|
|
56
60
|
import {
|
|
57
61
|
fillModeFromOptions,
|
|
62
|
+
legendInlineRequested,
|
|
58
63
|
legendSuppressed
|
|
59
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-A2ARDILY.js";
|
|
60
65
|
|
|
61
66
|
// src/graph/state-renderer.ts
|
|
62
67
|
import * as d3Selection from "d3-selection";
|
|
@@ -129,6 +134,32 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
|
|
|
129
134
|
width
|
|
130
135
|
)
|
|
131
136
|
) + 8 : 0;
|
|
137
|
+
const inlineRequested = legendInlineRequested(graph.options);
|
|
138
|
+
const legendExtent = inlineRequested && hasLegend ? getLegendExtent(
|
|
139
|
+
{
|
|
140
|
+
groups: legendGroups,
|
|
141
|
+
position: {
|
|
142
|
+
placement: "top-center",
|
|
143
|
+
titleRelation: "inline-with-title"
|
|
144
|
+
},
|
|
145
|
+
mode: exportDims ? "export" : "preview",
|
|
146
|
+
showInactivePills: true
|
|
147
|
+
},
|
|
148
|
+
{ activeGroup: activeTagGroup },
|
|
149
|
+
width
|
|
150
|
+
) : { width: 0, height: 0 };
|
|
151
|
+
const header = layoutInlineHeader({
|
|
152
|
+
requested: inlineRequested,
|
|
153
|
+
title: graph.title ?? "",
|
|
154
|
+
hasLegend,
|
|
155
|
+
legendWidth: legendExtent.width,
|
|
156
|
+
legendHeight: legendExtent.height,
|
|
157
|
+
containerWidth: width,
|
|
158
|
+
titleBandHeight: titleHeight,
|
|
159
|
+
legendReserve: legendH,
|
|
160
|
+
titleBaselineY: sTitleY,
|
|
161
|
+
titleFontSize: sTitleFontSize
|
|
162
|
+
});
|
|
132
163
|
const diagramW = layout.width;
|
|
133
164
|
const diagramH = layout.height;
|
|
134
165
|
const { scale, offsetX, offsetY, canvasHeight } = fitDiagramToCanvas({
|
|
@@ -137,9 +168,8 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
|
|
|
137
168
|
diagramW,
|
|
138
169
|
diagramH,
|
|
139
170
|
padding: sDiagramPadding,
|
|
140
|
-
//
|
|
141
|
-
|
|
142
|
-
titleHeight: titleHeight + legendH,
|
|
171
|
+
// Inline → one band (title only); stacked → title + legend band.
|
|
172
|
+
titleHeight: header.inline ? titleHeight : titleHeight + legendH,
|
|
143
173
|
maxScale: MAX_SCALE,
|
|
144
174
|
exportMode: !!exportDims
|
|
145
175
|
});
|
|
@@ -157,7 +187,7 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
|
|
|
157
187
|
colors: edgeColors
|
|
158
188
|
});
|
|
159
189
|
if (showTitle) {
|
|
160
|
-
const titleEl = svg.append("text").attr("class", "chart-title").attr("x",
|
|
190
|
+
const titleEl = svg.append("text").attr("class", "chart-title").attr("x", header.titleX).attr("y", sTitleY).attr("text-anchor", header.titleAnchor).attr("fill", palette.text).attr("font-size", sTitleFontSize).attr("font-weight", TITLE_FONT_WEIGHT).style(
|
|
161
191
|
"cursor",
|
|
162
192
|
onClickItem && graph.titleLineNumber ? "pointer" : "default"
|
|
163
193
|
).text(graph.title);
|
|
@@ -173,7 +203,10 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
|
|
|
173
203
|
}
|
|
174
204
|
}
|
|
175
205
|
if (hasLegend) {
|
|
176
|
-
const legendG = svg.append("g").attr(
|
|
206
|
+
const legendG = svg.append("g").attr(
|
|
207
|
+
"transform",
|
|
208
|
+
header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0, ${titleHeight + 4})`
|
|
209
|
+
);
|
|
177
210
|
renderIntegratedLegend(legendG, {
|
|
178
211
|
groups: legendGroups,
|
|
179
212
|
activeGroup: activeTagGroup,
|
|
@@ -181,6 +214,12 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
|
|
|
181
214
|
// Inactive sibling groups stay visible as collapsed pills so the user
|
|
182
215
|
// can click one to flip the active colouring dimension (as in b&l).
|
|
183
216
|
showInactivePills: true,
|
|
217
|
+
// Inline → left-origin so the wrapper's right-flush translate lands the
|
|
218
|
+
// legend at the chart's right edge; stacked → centered below the title.
|
|
219
|
+
position: {
|
|
220
|
+
placement: "top-center",
|
|
221
|
+
titleRelation: header.inline ? "inline-with-title" : "below-title"
|
|
222
|
+
},
|
|
184
223
|
palette,
|
|
185
224
|
isDark,
|
|
186
225
|
width
|
|
@@ -439,4 +478,4 @@ export {
|
|
|
439
478
|
renderState,
|
|
440
479
|
renderStateForExport
|
|
441
480
|
};
|
|
442
|
-
//# sourceMappingURL=chunk-
|
|
481
|
+
//# sourceMappingURL=chunk-F5ZNUMSY.js.map
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
matchTagBlockHeading,
|
|
5
5
|
stripDefaultModifier,
|
|
6
6
|
tagAttrKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JR7Q6GHE.js";
|
|
8
8
|
import {
|
|
9
9
|
FILL_FAMILY_TOKENS,
|
|
10
10
|
extractColor,
|
|
11
11
|
measureIndent,
|
|
12
12
|
parseFirstLine
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-A2ARDILY.js";
|
|
14
14
|
import {
|
|
15
15
|
emit
|
|
16
16
|
} from "./chunk-4W2PE66Q.js";
|
|
@@ -692,4 +692,4 @@ export {
|
|
|
692
692
|
SWIMLANE_DIAGNOSTICS,
|
|
693
693
|
parseSwimlane
|
|
694
694
|
};
|
|
695
|
-
//# sourceMappingURL=chunk-
|
|
695
|
+
//# sourceMappingURL=chunk-FBP33UM6.js.map
|