@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
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
layoutClassDiagram
|
|
3
|
-
} from "./chunk-XY3UDKKH.js";
|
|
4
1
|
import {
|
|
5
2
|
NOTE_BADGE_RADIUS,
|
|
6
3
|
noteConnectorPoints,
|
|
@@ -12,6 +9,9 @@ import {
|
|
|
12
9
|
extractExportSvg,
|
|
13
10
|
runInExportContainer
|
|
14
11
|
} from "./chunk-JTSMEYIZ.js";
|
|
12
|
+
import {
|
|
13
|
+
layoutClassDiagram
|
|
14
|
+
} from "./chunk-COVYNAKJ.js";
|
|
15
15
|
import {
|
|
16
16
|
EDGE_STROKE_WIDTH,
|
|
17
17
|
NODE_STROKE_WIDTH
|
|
@@ -19,9 +19,15 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
ScaleContext
|
|
21
21
|
} from "./chunk-YYVTBZZC.js";
|
|
22
|
+
import {
|
|
23
|
+
layoutInlineHeader
|
|
24
|
+
} from "./chunk-US3P2DQO.js";
|
|
22
25
|
import {
|
|
23
26
|
renderIntegratedLegend
|
|
24
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-ASPS5O6F.js";
|
|
28
|
+
import {
|
|
29
|
+
getLegendExtent
|
|
30
|
+
} from "./chunk-GRXPFBYC.js";
|
|
25
31
|
import {
|
|
26
32
|
TITLE_FONT_SIZE,
|
|
27
33
|
TITLE_FONT_WEIGHT,
|
|
@@ -32,21 +38,22 @@ import {
|
|
|
32
38
|
} from "./chunk-6KFWC4CO.js";
|
|
33
39
|
import {
|
|
34
40
|
parseClassDiagram
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import {
|
|
37
|
-
contrastText,
|
|
38
|
-
shapeFill
|
|
39
|
-
} from "./chunk-JYDMBWRP.js";
|
|
41
|
+
} from "./chunk-IIUYKQ5J.js";
|
|
40
42
|
import {
|
|
41
43
|
LEGEND_HEIGHT
|
|
42
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-Q5IHQ4NW.js";
|
|
43
45
|
import {
|
|
44
46
|
measureText
|
|
45
47
|
} from "./chunk-4ASYQ347.js";
|
|
48
|
+
import {
|
|
49
|
+
contrastText,
|
|
50
|
+
shapeFill
|
|
51
|
+
} from "./chunk-JYDMBWRP.js";
|
|
46
52
|
import {
|
|
47
53
|
fillModeFromOptions,
|
|
54
|
+
legendInlineRequested,
|
|
48
55
|
legendSuppressed
|
|
49
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-A2ARDILY.js";
|
|
50
57
|
|
|
51
58
|
// src/class/renderer.ts
|
|
52
59
|
import * as d3Selection from "d3-selection";
|
|
@@ -159,15 +166,50 @@ function renderClassDiagram(container, parsed, layout, palette, isDark, onClickI
|
|
|
159
166
|
const LEGEND_FIXED_GAP = 8;
|
|
160
167
|
const sLegendFixedGap = ctx.aesthetic(LEGEND_FIXED_GAP);
|
|
161
168
|
const legendReserve = hasLegend ? sLegendHeight + sLegendFixedGap : 0;
|
|
169
|
+
const isLegendExpanded = legendActive !== false;
|
|
170
|
+
const legendGroups = [
|
|
171
|
+
{
|
|
172
|
+
name: LEGEND_GROUP_NAME,
|
|
173
|
+
entries: legendEntries.map((entry) => ({
|
|
174
|
+
value: entry.label,
|
|
175
|
+
color: palette.colors[entry.colorKey]
|
|
176
|
+
}))
|
|
177
|
+
}
|
|
178
|
+
];
|
|
179
|
+
const inlineRequested = legendInlineRequested(parsed.options);
|
|
180
|
+
const legendExtent = inlineRequested && hasLegend ? getLegendExtent(
|
|
181
|
+
{
|
|
182
|
+
groups: legendGroups,
|
|
183
|
+
position: {
|
|
184
|
+
placement: "top-center",
|
|
185
|
+
titleRelation: "inline-with-title"
|
|
186
|
+
},
|
|
187
|
+
mode: exportMode ? "export" : "preview"
|
|
188
|
+
},
|
|
189
|
+
{ activeGroup: isLegendExpanded ? LEGEND_GROUP_NAME : null },
|
|
190
|
+
width
|
|
191
|
+
) : { width: 0, height: 0 };
|
|
192
|
+
const header = layoutInlineHeader({
|
|
193
|
+
requested: inlineRequested,
|
|
194
|
+
title: parsed.title ?? "",
|
|
195
|
+
hasLegend,
|
|
196
|
+
legendWidth: legendExtent.width,
|
|
197
|
+
legendHeight: legendExtent.height,
|
|
198
|
+
containerWidth: width,
|
|
199
|
+
titleBandHeight: titleHeight,
|
|
200
|
+
legendReserve,
|
|
201
|
+
titleBaselineY: sTitleY,
|
|
202
|
+
titleFontSize: sTitleFontSize
|
|
203
|
+
});
|
|
162
204
|
const diagramW = layout.width;
|
|
163
205
|
const diagramH = layout.height;
|
|
164
|
-
const availH = height - titleHeight - legendReserve;
|
|
206
|
+
const availH = height - titleHeight - (header.inline ? 0 : legendReserve);
|
|
165
207
|
const scaleX = (width - sDiagramPadding * 2) / diagramW;
|
|
166
208
|
const scaleY = (availH - sDiagramPadding * 2) / diagramH;
|
|
167
209
|
const scale = Math.min(MAX_SCALE, scaleX, scaleY);
|
|
168
210
|
const scaledW = diagramW * scale;
|
|
169
211
|
const offsetX = (width - scaledW) / 2;
|
|
170
|
-
const offsetY = titleHeight + legendReserve + sDiagramPadding;
|
|
212
|
+
const offsetY = titleHeight + (header.inline ? 0 : legendReserve) + sDiagramPadding;
|
|
171
213
|
const svg = d3Selection.select(container).append("svg").attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`).attr("preserveAspectRatio", "xMidYMin meet").style("font-family", FONT_FAMILY);
|
|
172
214
|
if (ctx.isBelowFloor) {
|
|
173
215
|
svg.attr("width", "100%");
|
|
@@ -184,7 +226,7 @@ function renderClassDiagram(container, parsed, layout, palette, isDark, onClickI
|
|
|
184
226
|
defs.append("marker").attr("id", "cd-arrow-depend").attr("viewBox", `0 0 ${AW} ${AH}`).attr("refX", AW).attr("refY", AH / 2).attr("markerWidth", AW).attr("markerHeight", AH).attr("orient", "auto").append("polyline").attr("points", `0,0 ${AW},${AH / 2} 0,${AH}`).attr("fill", "none").attr("stroke", palette.textMuted).attr("stroke-width", 1.5);
|
|
185
227
|
defs.append("marker").attr("id", "cd-arrow-assoc").attr("viewBox", `0 0 ${AW} ${AH}`).attr("refX", AW).attr("refY", AH / 2).attr("markerWidth", AW).attr("markerHeight", AH).attr("orient", "auto").append("polyline").attr("points", `0,0 ${AW},${AH / 2} 0,${AH}`).attr("fill", "none").attr("stroke", palette.textMuted).attr("stroke-width", 1.5);
|
|
186
228
|
if (showTitle) {
|
|
187
|
-
const titleEl = svg.append("text").attr("class", "chart-title").attr("x",
|
|
229
|
+
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(
|
|
188
230
|
"cursor",
|
|
189
231
|
onClickItem && parsed.titleLineNumber ? "pointer" : "default"
|
|
190
232
|
).text(parsed.title);
|
|
@@ -199,22 +241,19 @@ function renderClassDiagram(container, parsed, layout, palette, isDark, onClickI
|
|
|
199
241
|
}
|
|
200
242
|
}
|
|
201
243
|
}
|
|
202
|
-
const isLegendExpanded = legendActive !== false;
|
|
203
244
|
if (hasLegend) {
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
value: entry.label,
|
|
209
|
-
color: palette.colors[entry.colorKey]
|
|
210
|
-
}))
|
|
211
|
-
}
|
|
212
|
-
];
|
|
213
|
-
const legendG = svg.append("g").attr("class", "cd-legend").attr("transform", `translate(0,${titleHeight})`);
|
|
245
|
+
const legendG = svg.append("g").attr("class", "cd-legend").attr(
|
|
246
|
+
"transform",
|
|
247
|
+
header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0,${titleHeight})`
|
|
248
|
+
);
|
|
214
249
|
renderIntegratedLegend(legendG, {
|
|
215
250
|
groups: legendGroups,
|
|
216
251
|
activeGroup: isLegendExpanded ? LEGEND_GROUP_NAME : null,
|
|
217
252
|
mode: exportMode ? "export" : "preview",
|
|
253
|
+
position: {
|
|
254
|
+
placement: "top-center",
|
|
255
|
+
titleRelation: header.inline ? "inline-with-title" : "below-title"
|
|
256
|
+
},
|
|
218
257
|
palette,
|
|
219
258
|
isDark,
|
|
220
259
|
width
|
|
@@ -409,4 +448,4 @@ export {
|
|
|
409
448
|
renderClassDiagram,
|
|
410
449
|
renderClassDiagramForExport
|
|
411
450
|
};
|
|
412
|
-
//# sourceMappingURL=chunk-
|
|
451
|
+
//# sourceMappingURL=chunk-3FUTFYSP.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
layoutC4Containers,
|
|
5
5
|
layoutC4Context,
|
|
6
6
|
layoutC4Deployment
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AKE6C2D7.js";
|
|
8
8
|
import {
|
|
9
9
|
renderInlineText
|
|
10
10
|
} from "./chunk-3HDBAXF5.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-3CIOJ5YJ.js";
|
|
18
18
|
import {
|
|
19
19
|
renderIntegratedLegend
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ASPS5O6F.js";
|
|
21
21
|
import {
|
|
22
22
|
TITLE_FONT_SIZE,
|
|
23
23
|
TITLE_FONT_WEIGHT
|
|
@@ -27,28 +27,28 @@ import {
|
|
|
27
27
|
} from "./chunk-6KFWC4CO.js";
|
|
28
28
|
import {
|
|
29
29
|
parseC4
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-YXKNXIWA.js";
|
|
31
31
|
import {
|
|
32
32
|
preprocessDescriptionLine
|
|
33
33
|
} from "./chunk-IYULMRBE.js";
|
|
34
|
-
import {
|
|
35
|
-
contrastText,
|
|
36
|
-
mix,
|
|
37
|
-
shapeFill
|
|
38
|
-
} from "./chunk-JYDMBWRP.js";
|
|
39
34
|
import {
|
|
40
35
|
LEGEND_HEIGHT
|
|
41
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-Q5IHQ4NW.js";
|
|
42
37
|
import {
|
|
43
38
|
measureText,
|
|
44
39
|
wrapTextToWidth
|
|
45
40
|
} from "./chunk-4ASYQ347.js";
|
|
41
|
+
import {
|
|
42
|
+
contrastText,
|
|
43
|
+
mix,
|
|
44
|
+
shapeFill
|
|
45
|
+
} from "./chunk-JYDMBWRP.js";
|
|
46
46
|
import {
|
|
47
47
|
tagAttrKey
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-JR7Q6GHE.js";
|
|
49
49
|
import {
|
|
50
50
|
fillModeFromOptions
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-A2ARDILY.js";
|
|
52
52
|
|
|
53
53
|
// src/c4/renderer.ts
|
|
54
54
|
import * as d3Selection from "d3-selection";
|
|
@@ -1036,4 +1036,4 @@ export {
|
|
|
1036
1036
|
renderC4Deployment,
|
|
1037
1037
|
renderC4DeploymentForExport
|
|
1038
1038
|
};
|
|
1039
|
-
//# sourceMappingURL=chunk-
|
|
1039
|
+
//# sourceMappingURL=chunk-4MZCJV4M.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
extractColor,
|
|
3
3
|
measureIndent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-A2ARDILY.js";
|
|
5
5
|
import {
|
|
6
6
|
makeDgmoError
|
|
7
7
|
} from "./chunk-4W2PE66Q.js";
|
|
@@ -73,4 +73,4 @@ function tryCollectNote(lines, index, indent, palette, diagnostics) {
|
|
|
73
73
|
export {
|
|
74
74
|
tryCollectNote
|
|
75
75
|
};
|
|
76
|
-
//# sourceMappingURL=chunk-
|
|
76
|
+
//# sourceMappingURL=chunk-4R5KIPNX.js.map
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderInlineText
|
|
3
3
|
} from "./chunk-3HDBAXF5.js";
|
|
4
|
+
import {
|
|
5
|
+
layoutInlineHeader
|
|
6
|
+
} from "./chunk-US3P2DQO.js";
|
|
4
7
|
import {
|
|
5
8
|
renderIntegratedLegend
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ASPS5O6F.js";
|
|
7
10
|
import {
|
|
11
|
+
getLegendExtent,
|
|
8
12
|
getMaxLegendReservedHeight
|
|
9
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GRXPFBYC.js";
|
|
10
14
|
import {
|
|
11
15
|
TITLE_FONT_SIZE,
|
|
12
16
|
TITLE_FONT_WEIGHT,
|
|
@@ -15,6 +19,12 @@ import {
|
|
|
15
19
|
import {
|
|
16
20
|
FONT_FAMILY
|
|
17
21
|
} from "./chunk-6KFWC4CO.js";
|
|
22
|
+
import {
|
|
23
|
+
LEGEND_GROUP_GAP
|
|
24
|
+
} from "./chunk-Q5IHQ4NW.js";
|
|
25
|
+
import {
|
|
26
|
+
measureText
|
|
27
|
+
} from "./chunk-4ASYQ347.js";
|
|
18
28
|
import {
|
|
19
29
|
contrastText,
|
|
20
30
|
getSeriesColors,
|
|
@@ -22,16 +32,10 @@ import {
|
|
|
22
32
|
shapeFill,
|
|
23
33
|
themeBaseBg
|
|
24
34
|
} from "./chunk-JYDMBWRP.js";
|
|
25
|
-
import {
|
|
26
|
-
LEGEND_GROUP_GAP
|
|
27
|
-
} from "./chunk-4RGZFA7H.js";
|
|
28
|
-
import {
|
|
29
|
-
measureText
|
|
30
|
-
} from "./chunk-4ASYQ347.js";
|
|
31
35
|
import {
|
|
32
36
|
resolveTagColor,
|
|
33
37
|
tagAttrKey
|
|
34
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-JR7Q6GHE.js";
|
|
35
39
|
import {
|
|
36
40
|
resolveColor
|
|
37
41
|
} from "./chunk-ZKPPI6BF.js";
|
|
@@ -707,16 +711,41 @@ function renderBracket(container, parsed, palette, isDark, exportDims) {
|
|
|
707
711
|
{ groups: legendGroups, position: LEGEND_POSITION, mode: "preview" },
|
|
708
712
|
width
|
|
709
713
|
) + LEGEND_GROUP_GAP : 0;
|
|
714
|
+
const inlineRequested = parsed.legendInline === true;
|
|
715
|
+
const legendExtent = inlineRequested && legendGroups.length > 0 ? getLegendExtent(
|
|
716
|
+
{
|
|
717
|
+
groups: legendGroups,
|
|
718
|
+
position: {
|
|
719
|
+
placement: "top-center",
|
|
720
|
+
titleRelation: "inline-with-title"
|
|
721
|
+
},
|
|
722
|
+
mode: exportMode ? "export" : "preview"
|
|
723
|
+
},
|
|
724
|
+
{ activeGroup: activeGroup?.name ?? null },
|
|
725
|
+
width
|
|
726
|
+
) : { width: 0, height: 0 };
|
|
727
|
+
const header = layoutInlineHeader({
|
|
728
|
+
requested: inlineRequested,
|
|
729
|
+
title: parsed.title ?? "",
|
|
730
|
+
hasLegend: legendGroups.length > 0,
|
|
731
|
+
legendWidth: legendExtent.width,
|
|
732
|
+
legendHeight: legendExtent.height,
|
|
733
|
+
containerWidth: width,
|
|
734
|
+
titleBandHeight: titleH,
|
|
735
|
+
legendReserve,
|
|
736
|
+
titleBaselineY: TITLE_Y,
|
|
737
|
+
titleFontSize: TITLE_FONT_SIZE
|
|
738
|
+
});
|
|
710
739
|
const svg = d3Selection.select(container).append("svg").attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`).attr("preserveAspectRatio", "xMidYMin meet").attr("xmlns", "http://www.w3.org/2000/svg").attr("class", "dgmo-bracket").attr("role", "img").attr(
|
|
711
740
|
"aria-label",
|
|
712
741
|
`Tournament bracket${parsed.title ? ` \u2014 ${parsed.title}` : ""}${layout.champion ? `, champion ${layout.champion}` : ""}`
|
|
713
742
|
).style("font-family", FONT_FAMILY);
|
|
714
743
|
if (showTitle) {
|
|
715
|
-
const t = svg.append("text").attr("class", "chart-title").attr("x",
|
|
744
|
+
const t = svg.append("text").attr("class", "chart-title").attr("x", header.titleX).attr("y", TITLE_Y).attr("text-anchor", header.titleAnchor).attr("fill", palette.text).attr("font-family", FONT_FAMILY).attr("font-size", TITLE_FONT_SIZE).attr("font-weight", TITLE_FONT_WEIGHT).text(parsed.title);
|
|
716
745
|
if (parsed.titleLineNumber !== null)
|
|
717
746
|
t.attr("data-line-number", parsed.titleLineNumber);
|
|
718
747
|
}
|
|
719
|
-
const areaY = titleH + legendReserve + PADDING;
|
|
748
|
+
const areaY = (header.inline ? titleH : titleH + legendReserve) + PADDING;
|
|
720
749
|
const areaX = PADDING;
|
|
721
750
|
const areaW = Math.max(1, width - PADDING * 2);
|
|
722
751
|
const areaH = Math.max(1, height - areaY - PADDING);
|
|
@@ -725,7 +754,10 @@ function renderBracket(container, parsed, palette, isDark, exportDims) {
|
|
|
725
754
|
const offsetY = areaY;
|
|
726
755
|
const root = svg.append("g").attr("class", "dgmo-bracket-body").attr("transform", `translate(${offsetX},${offsetY}) scale(${scale})`);
|
|
727
756
|
if (legendGroups.length > 0) {
|
|
728
|
-
const legendG = svg.append("g").attr("class", "dgmo-bracket-legend").attr(
|
|
757
|
+
const legendG = svg.append("g").attr("class", "dgmo-bracket-legend").attr(
|
|
758
|
+
"transform",
|
|
759
|
+
header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0, ${titleH})`
|
|
760
|
+
);
|
|
729
761
|
renderIntegratedLegend(legendG, {
|
|
730
762
|
groups: legendGroups,
|
|
731
763
|
palette: {
|
|
@@ -738,7 +770,10 @@ function renderBracket(container, parsed, palette, isDark, exportDims) {
|
|
|
738
770
|
isDark,
|
|
739
771
|
width,
|
|
740
772
|
mode: exportMode ? "export" : "preview",
|
|
741
|
-
position:
|
|
773
|
+
position: {
|
|
774
|
+
placement: "top-center",
|
|
775
|
+
titleRelation: header.inline ? "inline-with-title" : "below-title"
|
|
776
|
+
},
|
|
742
777
|
activeGroup: activeGroup?.name ?? null
|
|
743
778
|
});
|
|
744
779
|
}
|
|
@@ -959,4 +994,4 @@ export {
|
|
|
959
994
|
renderBracket,
|
|
960
995
|
renderBracketForExport
|
|
961
996
|
};
|
|
962
|
-
//# sourceMappingURL=chunk-
|
|
997
|
+
//# sourceMappingURL=chunk-5D5VHDJM.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
computeNodeText,
|
|
3
3
|
layoutMindmap
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
renderInlineText
|
|
7
|
-
} from "./chunk-3HDBAXF5.js";
|
|
4
|
+
} from "./chunk-INTAQV2Y.js";
|
|
8
5
|
import {
|
|
9
6
|
extractExportSvg,
|
|
10
7
|
runInExportContainer
|
|
11
8
|
} from "./chunk-JTSMEYIZ.js";
|
|
9
|
+
import {
|
|
10
|
+
renderInlineText
|
|
11
|
+
} from "./chunk-3HDBAXF5.js";
|
|
12
12
|
import {
|
|
13
13
|
COLLAPSE_BAR_HEIGHT,
|
|
14
14
|
EDGE_STROKE_WIDTH,
|
|
@@ -17,12 +17,16 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
ScaleContext
|
|
19
19
|
} from "./chunk-YYVTBZZC.js";
|
|
20
|
+
import {
|
|
21
|
+
layoutInlineHeader
|
|
22
|
+
} from "./chunk-US3P2DQO.js";
|
|
20
23
|
import {
|
|
21
24
|
renderIntegratedLegend
|
|
22
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ASPS5O6F.js";
|
|
23
26
|
import {
|
|
27
|
+
getLegendExtent,
|
|
24
28
|
getMaxLegendReservedHeight
|
|
25
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-GRXPFBYC.js";
|
|
26
30
|
import {
|
|
27
31
|
TITLE_FONT_SIZE,
|
|
28
32
|
TITLE_FONT_WEIGHT
|
|
@@ -32,24 +36,25 @@ import {
|
|
|
32
36
|
} from "./chunk-6KFWC4CO.js";
|
|
33
37
|
import {
|
|
34
38
|
parseMindmap
|
|
35
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-HX7QNHC6.js";
|
|
36
40
|
import {
|
|
37
41
|
preprocessDescriptionLine
|
|
38
42
|
} from "./chunk-IYULMRBE.js";
|
|
43
|
+
import {
|
|
44
|
+
LEGEND_GROUP_GAP
|
|
45
|
+
} from "./chunk-Q5IHQ4NW.js";
|
|
39
46
|
import {
|
|
40
47
|
contrastText,
|
|
41
48
|
shapeFill
|
|
42
49
|
} from "./chunk-JYDMBWRP.js";
|
|
43
|
-
import {
|
|
44
|
-
LEGEND_GROUP_GAP
|
|
45
|
-
} from "./chunk-4RGZFA7H.js";
|
|
46
50
|
import {
|
|
47
51
|
tagAttrKey
|
|
48
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-JR7Q6GHE.js";
|
|
49
53
|
import {
|
|
50
54
|
fillModeFromOptions,
|
|
55
|
+
legendInlineRequested,
|
|
51
56
|
legendSuppressed
|
|
52
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-A2ARDILY.js";
|
|
53
58
|
|
|
54
59
|
// src/mindmap/renderer.ts
|
|
55
60
|
import * as d3Selection from "d3-selection";
|
|
@@ -105,8 +110,33 @@ function renderMindmap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
105
110
|
const showTitle = !!parsed.title && parsed.options["no-title"] !== "on";
|
|
106
111
|
const fixedTitle = !isExport && showTitle;
|
|
107
112
|
const titleReserve = fixedTitle ? TITLE_HEIGHT : 0;
|
|
113
|
+
const inlineRequested = legendInlineRequested(parsed.options);
|
|
114
|
+
const legendExtent = inlineRequested && fixedLegend ? getLegendExtent(
|
|
115
|
+
{
|
|
116
|
+
groups: parsed.tagGroups,
|
|
117
|
+
position: {
|
|
118
|
+
placement: "top-center",
|
|
119
|
+
titleRelation: "inline-with-title"
|
|
120
|
+
},
|
|
121
|
+
mode: isExport ? "export" : "preview"
|
|
122
|
+
},
|
|
123
|
+
{ activeGroup: activeTagGroup ?? null },
|
|
124
|
+
containerWidth
|
|
125
|
+
) : { width: 0, height: 0 };
|
|
126
|
+
const header = layoutInlineHeader({
|
|
127
|
+
requested: inlineRequested,
|
|
128
|
+
title: parsed.title ?? "",
|
|
129
|
+
hasLegend: fixedLegend,
|
|
130
|
+
legendWidth: legendExtent.width,
|
|
131
|
+
legendHeight: legendExtent.height,
|
|
132
|
+
containerWidth,
|
|
133
|
+
titleBandHeight: titleReserve,
|
|
134
|
+
legendReserve,
|
|
135
|
+
titleBaselineY: DIAGRAM_PADDING + TITLE_FONT_SIZE,
|
|
136
|
+
titleFontSize: TITLE_FONT_SIZE
|
|
137
|
+
});
|
|
108
138
|
const availWidth = containerWidth;
|
|
109
|
-
const availHeight = containerHeight - DIAGRAM_PADDING * 2 - legendReserve - titleReserve;
|
|
139
|
+
const availHeight = containerHeight - DIAGRAM_PADDING * 2 - (header.inline ? 0 : legendReserve) - titleReserve;
|
|
110
140
|
let ctx = isExport ? ScaleContext.identity() : ScaleContext.fromBox(
|
|
111
141
|
availWidth,
|
|
112
142
|
layout.width,
|
|
@@ -147,7 +177,7 @@ function renderMindmap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
147
177
|
const scaledWidth = renderLayout.width * fitScale;
|
|
148
178
|
const scaledHeight = renderLayout.height * fitScale;
|
|
149
179
|
const offsetX = Math.max(0, (availWidth - scaledWidth) / 2);
|
|
150
|
-
const offsetY = DIAGRAM_PADDING + legendReserve + titleReserve + Math.max(0, (availHeight - scaledHeight) / 2);
|
|
180
|
+
const offsetY = DIAGRAM_PADDING + (header.inline ? 0 : legendReserve) + titleReserve + Math.max(0, (availHeight - scaledHeight) / 2);
|
|
151
181
|
const mainG = svg.append("g").attr(
|
|
152
182
|
"transform",
|
|
153
183
|
`translate(${offsetX}, ${offsetY})${fitScale < 1 ? ` scale(${fitScale})` : ""}`
|
|
@@ -157,9 +187,9 @@ function renderMindmap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
157
187
|
}
|
|
158
188
|
if (showTitle) {
|
|
159
189
|
const titleParent = fixedTitle ? svg : mainG;
|
|
160
|
-
const titleX = fixedTitle ?
|
|
190
|
+
const titleX = fixedTitle ? header.titleX : renderLayout.width / 2;
|
|
161
191
|
const titleY = fixedTitle ? DIAGRAM_PADDING + TITLE_FONT_SIZE : TITLE_FONT_SIZE;
|
|
162
|
-
const titleText = titleParent.append("text").attr("x", titleX).attr("y", titleY).attr("text-anchor", "middle").attr("font-size", TITLE_FONT_SIZE).attr("font-weight", TITLE_FONT_WEIGHT).attr("fill", palette.text).attr("class", "chart-title").text(parsed.title);
|
|
192
|
+
const titleText = titleParent.append("text").attr("x", titleX).attr("y", titleY).attr("text-anchor", fixedTitle ? header.titleAnchor : "middle").attr("font-size", TITLE_FONT_SIZE).attr("font-weight", TITLE_FONT_WEIGHT).attr("fill", palette.text).attr("class", "chart-title").text(parsed.title);
|
|
163
193
|
if (parsed.titleLineNumber) {
|
|
164
194
|
titleText.attr("data-line-number", parsed.titleLineNumber);
|
|
165
195
|
}
|
|
@@ -168,7 +198,10 @@ function renderMindmap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
168
198
|
}
|
|
169
199
|
}
|
|
170
200
|
if (fixedLegend) {
|
|
171
|
-
const legendG = svg.append("g").attr("class", "mindmap-legend-fixed").attr(
|
|
201
|
+
const legendG = svg.append("g").attr("class", "mindmap-legend-fixed").attr(
|
|
202
|
+
"transform",
|
|
203
|
+
header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0, ${DIAGRAM_PADDING + titleReserve})`
|
|
204
|
+
);
|
|
172
205
|
const usedValues = /* @__PURE__ */ new Map();
|
|
173
206
|
for (const node of renderLayout.nodes) {
|
|
174
207
|
for (const tg of parsed.tagGroups) {
|
|
@@ -209,7 +242,10 @@ function renderMindmap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
209
242
|
entries: tg.entries.filter((e) => used?.has(e.value.toLowerCase())).map((e) => ({ value: e.value, color: e.color }))
|
|
210
243
|
};
|
|
211
244
|
}),
|
|
212
|
-
position: {
|
|
245
|
+
position: {
|
|
246
|
+
placement: "top-center",
|
|
247
|
+
titleRelation: header.inline ? "inline-with-title" : "below-title"
|
|
248
|
+
},
|
|
213
249
|
mode: options?.exportMode ? "export" : "preview",
|
|
214
250
|
...controlsToggles !== void 0 && { controlsGroup: controlsToggles },
|
|
215
251
|
...options?.controlsHost !== void 0 && {
|
|
@@ -390,4 +426,4 @@ export {
|
|
|
390
426
|
renderMindmap,
|
|
391
427
|
renderMindmapForExport
|
|
392
428
|
};
|
|
393
|
-
//# sourceMappingURL=chunk-
|
|
429
|
+
//# sourceMappingURL=chunk-5H5GWWA4.js.map
|
|
@@ -8,6 +8,9 @@ import {
|
|
|
8
8
|
parseDateToken,
|
|
9
9
|
toInternal
|
|
10
10
|
} from "./chunk-DAOFNU6J.js";
|
|
11
|
+
import {
|
|
12
|
+
normalizeName
|
|
13
|
+
} from "./chunk-NOTA6TEI.js";
|
|
11
14
|
import {
|
|
12
15
|
AUTO_TAG_COLOR_SENTINEL,
|
|
13
16
|
finalizeAutoTagColors,
|
|
@@ -17,10 +20,7 @@ import {
|
|
|
17
20
|
tagAttrKey,
|
|
18
21
|
validateTagGroupNames,
|
|
19
22
|
validateTagValues
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import {
|
|
22
|
-
normalizeName
|
|
23
|
-
} from "./chunk-NOTA6TEI.js";
|
|
23
|
+
} from "./chunk-JR7Q6GHE.js";
|
|
24
24
|
import {
|
|
25
25
|
PERT_REGISTRY,
|
|
26
26
|
extractColor,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
splitNameAndMeta,
|
|
30
30
|
warnUnknownMetaKeys,
|
|
31
31
|
withTagAliases
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-A2ARDILY.js";
|
|
33
33
|
import {
|
|
34
34
|
emit,
|
|
35
35
|
makeDgmoError,
|
|
@@ -144,6 +144,7 @@ var DIRECTIVE_KEYS = /* @__PURE__ */ new Set([
|
|
|
144
144
|
"end-date",
|
|
145
145
|
"no-title",
|
|
146
146
|
"no-legend",
|
|
147
|
+
"legend-inline",
|
|
147
148
|
"fill-tint",
|
|
148
149
|
"fill-solid",
|
|
149
150
|
"fill-outline",
|
|
@@ -1003,6 +1004,10 @@ function applyDirective(key, value, lineNumber, options, error, warn, dateCfg) {
|
|
|
1003
1004
|
options.noLegend = true;
|
|
1004
1005
|
return;
|
|
1005
1006
|
}
|
|
1007
|
+
case "legend-inline": {
|
|
1008
|
+
options.legendInline = true;
|
|
1009
|
+
return;
|
|
1010
|
+
}
|
|
1006
1011
|
case "fill-solid": {
|
|
1007
1012
|
options.fillMode = "solid";
|
|
1008
1013
|
return;
|
|
@@ -1251,4 +1256,4 @@ export {
|
|
|
1251
1256
|
extractPertSymbols,
|
|
1252
1257
|
looksLikePert
|
|
1253
1258
|
};
|
|
1254
|
-
//# sourceMappingURL=chunk-
|
|
1259
|
+
//# sourceMappingURL=chunk-5K5XBEXT.js.map
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
layoutInlineHeader
|
|
3
|
+
} from "./chunk-US3P2DQO.js";
|
|
1
4
|
import {
|
|
2
5
|
renderIntegratedLegend
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ASPS5O6F.js";
|
|
4
7
|
import {
|
|
8
|
+
getLegendExtent,
|
|
5
9
|
getMaxLegendReservedHeight
|
|
6
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GRXPFBYC.js";
|
|
7
11
|
import {
|
|
8
12
|
TITLE_FONT_SIZE,
|
|
9
13
|
TITLE_FONT_WEIGHT,
|
|
@@ -14,21 +18,21 @@ import {
|
|
|
14
18
|
} from "./chunk-6KFWC4CO.js";
|
|
15
19
|
import {
|
|
16
20
|
isBlockNode
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import {
|
|
19
|
-
mix,
|
|
20
|
-
themeBaseBg
|
|
21
|
-
} from "./chunk-JYDMBWRP.js";
|
|
21
|
+
} from "./chunk-XSVWUOUZ.js";
|
|
22
22
|
import {
|
|
23
23
|
LEGEND_GROUP_GAP
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-Q5IHQ4NW.js";
|
|
25
25
|
import {
|
|
26
26
|
measureText
|
|
27
27
|
} from "./chunk-4ASYQ347.js";
|
|
28
|
+
import {
|
|
29
|
+
mix,
|
|
30
|
+
themeBaseBg
|
|
31
|
+
} from "./chunk-JYDMBWRP.js";
|
|
28
32
|
import {
|
|
29
33
|
resolveTagColor,
|
|
30
34
|
tagAttrKey
|
|
31
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-JR7Q6GHE.js";
|
|
32
36
|
|
|
33
37
|
// src/block/renderer.ts
|
|
34
38
|
import * as d3Selection from "d3-selection";
|
|
@@ -195,7 +199,32 @@ function renderBlock(container, parsed, palette, isDark, exportDims, options = {
|
|
|
195
199
|
{ groups: legend.groups, position: LEGEND_POSITION, mode: "preview" },
|
|
196
200
|
width
|
|
197
201
|
) + LEGEND_GROUP_GAP : 0;
|
|
198
|
-
const
|
|
202
|
+
const inlineRequested = opts.legendInline === true;
|
|
203
|
+
const legendExtent = inlineRequested && legend ? getLegendExtent(
|
|
204
|
+
{
|
|
205
|
+
groups: legend.groups,
|
|
206
|
+
position: {
|
|
207
|
+
placement: "top-center",
|
|
208
|
+
titleRelation: "inline-with-title"
|
|
209
|
+
},
|
|
210
|
+
mode: options.exportMode ? "export" : "preview"
|
|
211
|
+
},
|
|
212
|
+
{ activeGroup: legend.activeGroup ?? null },
|
|
213
|
+
width
|
|
214
|
+
) : { width: 0, height: 0 };
|
|
215
|
+
const header = layoutInlineHeader({
|
|
216
|
+
requested: inlineRequested,
|
|
217
|
+
title: parsed.title ?? "",
|
|
218
|
+
hasLegend: !!legend,
|
|
219
|
+
legendWidth: legendExtent.width,
|
|
220
|
+
legendHeight: legendExtent.height,
|
|
221
|
+
containerWidth: width,
|
|
222
|
+
titleBandHeight: titleH,
|
|
223
|
+
legendReserve,
|
|
224
|
+
titleBaselineY: TITLE_Y,
|
|
225
|
+
titleFontSize: TITLE_FONT_SIZE
|
|
226
|
+
});
|
|
227
|
+
const areaY = (header.inline ? titleH : titleH + legendReserve) + PADDING;
|
|
199
228
|
if (options.exportMode) {
|
|
200
229
|
height = areaY + layout.height + PADDING;
|
|
201
230
|
} else {
|
|
@@ -210,7 +239,7 @@ function renderBlock(container, parsed, palette, isDark, exportDims, options = {
|
|
|
210
239
|
const offsetY = areaY;
|
|
211
240
|
const svg = d3Selection.select(container).append("svg").attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`).attr("preserveAspectRatio", "xMidYMin meet").attr("xmlns", "http://www.w3.org/2000/svg").attr("class", "dgmo-block").style("font-family", FONT_FAMILY);
|
|
212
241
|
if (showTitle) {
|
|
213
|
-
const title = svg.append("text").attr("class", "chart-title").attr("x",
|
|
242
|
+
const title = svg.append("text").attr("class", "chart-title").attr("x", header.titleX).attr("y", TITLE_Y).attr("text-anchor", header.titleAnchor).attr("fill", palette.text).attr("font-family", FONT_FAMILY).attr("font-size", TITLE_FONT_SIZE).attr("font-weight", TITLE_FONT_WEIGHT).text(parsed.title);
|
|
214
243
|
if (parsed.titleLineNumber !== null) {
|
|
215
244
|
title.attr("data-line-number", parsed.titleLineNumber);
|
|
216
245
|
}
|
|
@@ -229,7 +258,10 @@ function renderBlock(container, parsed, palette, isDark, exportDims, options = {
|
|
|
229
258
|
onToggle: options.onToggle
|
|
230
259
|
});
|
|
231
260
|
if (legend) {
|
|
232
|
-
const legendG = svg.append("g").attr("class", "dgmo-block-legend").attr(
|
|
261
|
+
const legendG = svg.append("g").attr("class", "dgmo-block-legend").attr(
|
|
262
|
+
"transform",
|
|
263
|
+
header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0, ${titleH})`
|
|
264
|
+
);
|
|
233
265
|
renderIntegratedLegend(legendG, {
|
|
234
266
|
groups: legend.groups,
|
|
235
267
|
palette: {
|
|
@@ -242,7 +274,10 @@ function renderBlock(container, parsed, palette, isDark, exportDims, options = {
|
|
|
242
274
|
isDark,
|
|
243
275
|
width,
|
|
244
276
|
mode: options.exportMode ? "export" : "preview",
|
|
245
|
-
position:
|
|
277
|
+
position: {
|
|
278
|
+
placement: "top-center",
|
|
279
|
+
titleRelation: header.inline ? "inline-with-title" : "below-title"
|
|
280
|
+
},
|
|
246
281
|
activeGroup: legend.activeGroup
|
|
247
282
|
});
|
|
248
283
|
}
|
|
@@ -361,4 +396,4 @@ export {
|
|
|
361
396
|
renderBlock,
|
|
362
397
|
authoredCollapsedIds
|
|
363
398
|
};
|
|
364
|
-
//# sourceMappingURL=chunk-
|
|
399
|
+
//# sourceMappingURL=chunk-6NJWBMJV.js.map
|