@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,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
renderInlineText
|
|
3
|
-
} from "./chunk-3HDBAXF5.js";
|
|
4
1
|
import {
|
|
5
2
|
renderNodeCard
|
|
6
3
|
} from "./chunk-H3HFC3SQ.js";
|
|
4
|
+
import {
|
|
5
|
+
renderInlineText
|
|
6
|
+
} from "./chunk-3HDBAXF5.js";
|
|
7
7
|
import {
|
|
8
8
|
CARD_RADIUS,
|
|
9
9
|
COLLAPSE_BAR_HEIGHT,
|
|
@@ -23,12 +23,16 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
ScaleContext
|
|
25
25
|
} from "./chunk-YYVTBZZC.js";
|
|
26
|
+
import {
|
|
27
|
+
layoutInlineHeader
|
|
28
|
+
} from "./chunk-US3P2DQO.js";
|
|
26
29
|
import {
|
|
27
30
|
renderIntegratedLegend
|
|
28
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ASPS5O6F.js";
|
|
29
32
|
import {
|
|
33
|
+
getLegendExtent,
|
|
30
34
|
getMaxLegendReservedHeight
|
|
31
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-GRXPFBYC.js";
|
|
32
36
|
import {
|
|
33
37
|
TITLE_FONT_SIZE,
|
|
34
38
|
TITLE_FONT_WEIGHT
|
|
@@ -39,12 +43,6 @@ import {
|
|
|
39
43
|
import {
|
|
40
44
|
preprocessDescriptionLine
|
|
41
45
|
} from "./chunk-IYULMRBE.js";
|
|
42
|
-
import {
|
|
43
|
-
contrastText,
|
|
44
|
-
mix,
|
|
45
|
-
shapeFill,
|
|
46
|
-
themeBaseBg
|
|
47
|
-
} from "./chunk-JYDMBWRP.js";
|
|
48
46
|
import {
|
|
49
47
|
EYE_CLOSED_PATH,
|
|
50
48
|
EYE_OPEN_PATH,
|
|
@@ -52,17 +50,24 @@ import {
|
|
|
52
50
|
LEGEND_EYE_SIZE,
|
|
53
51
|
LEGEND_GROUP_GAP,
|
|
54
52
|
LEGEND_HEIGHT
|
|
55
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-Q5IHQ4NW.js";
|
|
56
54
|
import {
|
|
57
55
|
measureText
|
|
58
56
|
} from "./chunk-4ASYQ347.js";
|
|
57
|
+
import {
|
|
58
|
+
contrastText,
|
|
59
|
+
mix,
|
|
60
|
+
shapeFill,
|
|
61
|
+
themeBaseBg
|
|
62
|
+
} from "./chunk-JYDMBWRP.js";
|
|
59
63
|
import {
|
|
60
64
|
tagAttrKey
|
|
61
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-JR7Q6GHE.js";
|
|
62
66
|
import {
|
|
63
67
|
fillModeFromOptions,
|
|
68
|
+
legendInlineRequested,
|
|
64
69
|
legendSuppressed
|
|
65
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-A2ARDILY.js";
|
|
66
71
|
|
|
67
72
|
// src/sitemap/renderer.ts
|
|
68
73
|
import * as d3Selection from "d3-selection";
|
|
@@ -138,7 +143,33 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
138
143
|
) : LEGEND_HEIGHT
|
|
139
144
|
);
|
|
140
145
|
const legendReserveH = fixedLegend ? sLegendHeight + sLegendFixedGap : 0;
|
|
141
|
-
const
|
|
146
|
+
const inlineRequested = legendInlineRequested(parsed.options);
|
|
147
|
+
const legendExtent = inlineRequested && fixedTitle ? getLegendExtent(
|
|
148
|
+
{
|
|
149
|
+
groups: parsed.tagGroups,
|
|
150
|
+
position: {
|
|
151
|
+
placement: "top-center",
|
|
152
|
+
titleRelation: "inline-with-title"
|
|
153
|
+
},
|
|
154
|
+
mode: exportMode ? "export" : "preview",
|
|
155
|
+
capsulePillAddonWidth: LEGEND_EYE_SIZE + LEGEND_EYE_GAP
|
|
156
|
+
},
|
|
157
|
+
{ activeGroup: activeTagGroup ?? null },
|
|
158
|
+
width
|
|
159
|
+
) : { width: 0, height: 0 };
|
|
160
|
+
const header = layoutInlineHeader({
|
|
161
|
+
requested: inlineRequested,
|
|
162
|
+
title: parsed.title ?? "",
|
|
163
|
+
hasLegend: fixedTitle,
|
|
164
|
+
legendWidth: legendExtent.width,
|
|
165
|
+
legendHeight: legendExtent.height,
|
|
166
|
+
containerWidth: width,
|
|
167
|
+
titleBandHeight: fixedTitleH,
|
|
168
|
+
legendReserve: legendReserveH,
|
|
169
|
+
titleBaselineY: sDiagramPadding + sTitleFontSize,
|
|
170
|
+
titleFontSize: sTitleFontSize
|
|
171
|
+
});
|
|
172
|
+
const fixedReserveTop = header.inline ? fixedTitleH : fixedTitleH + legendReserveH;
|
|
142
173
|
const fixedReserveBottom = 0;
|
|
143
174
|
const titleOffset = !fixedTitle && showTitle ? sTitleHeight : 0;
|
|
144
175
|
const diagramW = layout.width;
|
|
@@ -340,7 +371,7 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
340
371
|
);
|
|
341
372
|
}
|
|
342
373
|
if (fixedTitle) {
|
|
343
|
-
const titleEl = svg.append("text").attr("x",
|
|
374
|
+
const titleEl = svg.append("text").attr("x", header.titleX).attr("y", sDiagramPadding + sTitleFontSize).attr("text-anchor", header.titleAnchor).attr("fill", palette.text).attr("font-size", sTitleFontSize).attr("font-weight", TITLE_FONT_WEIGHT).attr("class", "sitemap-title chart-title").style("font-family", FONT_FAMILY);
|
|
344
375
|
if (parsed.titleLineNumber) {
|
|
345
376
|
titleEl.attr("data-line-number", parsed.titleLineNumber);
|
|
346
377
|
if (onClickItem) {
|
|
@@ -350,7 +381,10 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
350
381
|
titleEl.text(parsed.title);
|
|
351
382
|
}
|
|
352
383
|
if (fixedLegend) {
|
|
353
|
-
const legendParent = svg.append("g").attr("class", "sitemap-legend-fixed").attr(
|
|
384
|
+
const legendParent = svg.append("g").attr("class", "sitemap-legend-fixed").attr(
|
|
385
|
+
"transform",
|
|
386
|
+
header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0, ${sDiagramPadding + fixedTitleH})`
|
|
387
|
+
);
|
|
354
388
|
if (activeTagGroup) {
|
|
355
389
|
legendParent.attr("data-legend-active", tagAttrKey(activeTagGroup));
|
|
356
390
|
}
|
|
@@ -362,11 +396,12 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
362
396
|
activeTagGroup,
|
|
363
397
|
width,
|
|
364
398
|
hiddenAttributes,
|
|
365
|
-
exportMode
|
|
399
|
+
exportMode,
|
|
400
|
+
header.inline
|
|
366
401
|
);
|
|
367
402
|
}
|
|
368
403
|
}
|
|
369
|
-
function renderLegend(parent, legendGroups, palette, isDark, activeTagGroup, fixedWidth, hiddenAttributes, exportMode) {
|
|
404
|
+
function renderLegend(parent, legendGroups, palette, isDark, activeTagGroup, fixedWidth, hiddenAttributes, exportMode, inlineHeader) {
|
|
370
405
|
if (legendGroups.length === 0) return;
|
|
371
406
|
const groups = legendGroups.map((g) => ({
|
|
372
407
|
name: g.name,
|
|
@@ -382,6 +417,10 @@ function renderLegend(parent, legendGroups, palette, isDark, activeTagGroup, fix
|
|
|
382
417
|
groups,
|
|
383
418
|
activeGroup: activeTagGroup ?? null,
|
|
384
419
|
mode: exportMode ? "export" : "preview",
|
|
420
|
+
position: {
|
|
421
|
+
placement: "top-center",
|
|
422
|
+
titleRelation: inlineHeader ? "inline-with-title" : "below-title"
|
|
423
|
+
},
|
|
385
424
|
capsulePillAddonWidth: eyeAddonWidth,
|
|
386
425
|
palette,
|
|
387
426
|
isDark,
|
|
@@ -407,8 +446,8 @@ function renderLegend(parent, legendGroups, palette, isDark, activeTagGroup, fix
|
|
|
407
446
|
}
|
|
408
447
|
}
|
|
409
448
|
async function renderSitemapForExport(content, theme, palette) {
|
|
410
|
-
const { parseSitemap } = await import("./parser-
|
|
411
|
-
const { layoutSitemap } = await import("./layout-
|
|
449
|
+
const { parseSitemap } = await import("./parser-S6NWSIJO.js");
|
|
450
|
+
const { layoutSitemap } = await import("./layout-UTMEVFHN.js");
|
|
412
451
|
const { getPalette } = await import("./palettes-FGTNFARW.js");
|
|
413
452
|
const isDark = theme === "dark";
|
|
414
453
|
const effectivePalette = palette ?? (isDark ? getPalette("nord").dark : getPalette("nord").light);
|
|
@@ -458,4 +497,4 @@ export {
|
|
|
458
497
|
renderSitemap,
|
|
459
498
|
renderSitemapForExport
|
|
460
499
|
};
|
|
461
|
-
//# sourceMappingURL=chunk-
|
|
500
|
+
//# sourceMappingURL=chunk-IG6J7JWH.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tryCollectNote
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4R5KIPNX.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveNotes
|
|
6
6
|
} from "./chunk-QZAW5SFH.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
measureIndent,
|
|
17
17
|
parseFirstLine,
|
|
18
18
|
tryParseSharedOption
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-A2ARDILY.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveColorWithDiagnostic
|
|
22
22
|
} from "./chunk-ZKPPI6BF.js";
|
|
@@ -445,4 +445,4 @@ export {
|
|
|
445
445
|
looksLikeClassDiagram,
|
|
446
446
|
extractSymbols
|
|
447
447
|
};
|
|
448
|
-
//# sourceMappingURL=chunk-
|
|
448
|
+
//# sourceMappingURL=chunk-IIUYKQ5J.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
injectDefaultTagMetadata,
|
|
13
13
|
resolveTagColor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JR7Q6GHE.js";
|
|
15
15
|
|
|
16
16
|
// src/mindmap/text-wrap.ts
|
|
17
17
|
var H_PAD = 16;
|
|
@@ -547,4 +547,4 @@ export {
|
|
|
547
547
|
computeNodeText,
|
|
548
548
|
layoutMindmap
|
|
549
549
|
};
|
|
550
|
-
//# sourceMappingURL=chunk-
|
|
550
|
+
//# sourceMappingURL=chunk-INTAQV2Y.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
splitNameAndMeta,
|
|
8
8
|
warnUnknownMetaKeys,
|
|
9
9
|
withTagAliases
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-A2ARDILY.js";
|
|
11
11
|
import {
|
|
12
12
|
makeDgmoError
|
|
13
13
|
} from "./chunk-4W2PE66Q.js";
|
|
@@ -314,4 +314,4 @@ export {
|
|
|
314
314
|
parseTimelineDate,
|
|
315
315
|
parseTimelineEventLine
|
|
316
316
|
};
|
|
317
|
-
//# sourceMappingURL=chunk-
|
|
317
|
+
//# sourceMappingURL=chunk-ITXL2KU5.js.map
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
noteCanvasShift
|
|
6
6
|
} from "./chunk-6EK55ART.js";
|
|
7
|
+
import {
|
|
8
|
+
resolveNotes
|
|
9
|
+
} from "./chunk-QZAW5SFH.js";
|
|
7
10
|
import {
|
|
8
11
|
measureText,
|
|
9
12
|
truncateText,
|
|
10
13
|
wrapTextToWidth
|
|
11
14
|
} from "./chunk-4ASYQ347.js";
|
|
12
|
-
import {
|
|
13
|
-
resolveNotes
|
|
14
|
-
} from "./chunk-QZAW5SFH.js";
|
|
15
15
|
|
|
16
16
|
// src/boxes-and-lines/label-placement.ts
|
|
17
17
|
var EDGE_LABEL_FONT_SIZE = 11;
|
|
@@ -311,7 +311,7 @@ function computeNodeSize(node, reserveValueRow) {
|
|
|
311
311
|
return { width: w, height: Math.max(NODE_HEIGHT, totalHeight) };
|
|
312
312
|
}
|
|
313
313
|
async function layoutBoxesAndLines(parsed, collapseInfo, layoutOptions) {
|
|
314
|
-
const { layoutBoxesAndLinesSearch } = await import("./layout-search-
|
|
314
|
+
const { layoutBoxesAndLinesSearch } = await import("./layout-search-U2H4ORFJ.js");
|
|
315
315
|
const searchOpts = {
|
|
316
316
|
...layoutOptions?.hideDescriptions !== void 0 && {
|
|
317
317
|
hideDescriptions: layoutOptions.hideDescriptions
|
|
@@ -466,4 +466,4 @@ export {
|
|
|
466
466
|
computeNodeSize,
|
|
467
467
|
layoutBoxesAndLines
|
|
468
468
|
};
|
|
469
|
-
//# sourceMappingURL=chunk-
|
|
469
|
+
//# sourceMappingURL=chunk-IWG2ECAO.js.map
|
|
@@ -25,16 +25,16 @@ import {
|
|
|
25
25
|
} from "./chunk-3CIOJ5YJ.js";
|
|
26
26
|
import {
|
|
27
27
|
layoutOrg
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-UBQU2BY6.js";
|
|
29
29
|
import {
|
|
30
30
|
ScaleContext
|
|
31
31
|
} from "./chunk-YYVTBZZC.js";
|
|
32
32
|
import {
|
|
33
33
|
renderIntegratedLegend
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-ASPS5O6F.js";
|
|
35
35
|
import {
|
|
36
36
|
getMaxLegendReservedHeight
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-GRXPFBYC.js";
|
|
38
38
|
import {
|
|
39
39
|
TITLE_FONT_SIZE,
|
|
40
40
|
TITLE_FONT_WEIGHT
|
|
@@ -44,13 +44,7 @@ import {
|
|
|
44
44
|
} from "./chunk-6KFWC4CO.js";
|
|
45
45
|
import {
|
|
46
46
|
parseOrg
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import {
|
|
49
|
-
contrastText,
|
|
50
|
-
mix,
|
|
51
|
-
shapeFill,
|
|
52
|
-
themeBaseBg
|
|
53
|
-
} from "./chunk-JYDMBWRP.js";
|
|
47
|
+
} from "./chunk-MNS2ENXF.js";
|
|
54
48
|
import {
|
|
55
49
|
EYE_CLOSED_PATH,
|
|
56
50
|
EYE_OPEN_PATH,
|
|
@@ -58,17 +52,23 @@ import {
|
|
|
58
52
|
LEGEND_EYE_SIZE,
|
|
59
53
|
LEGEND_GROUP_GAP,
|
|
60
54
|
LEGEND_HEIGHT
|
|
61
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-Q5IHQ4NW.js";
|
|
62
56
|
import {
|
|
63
57
|
measureText
|
|
64
58
|
} from "./chunk-4ASYQ347.js";
|
|
59
|
+
import {
|
|
60
|
+
contrastText,
|
|
61
|
+
mix,
|
|
62
|
+
shapeFill,
|
|
63
|
+
themeBaseBg
|
|
64
|
+
} from "./chunk-JYDMBWRP.js";
|
|
65
65
|
import {
|
|
66
66
|
resolveTagColor,
|
|
67
67
|
tagAttrKey
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-JR7Q6GHE.js";
|
|
69
69
|
import {
|
|
70
70
|
fillModeFromOptions
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-A2ARDILY.js";
|
|
72
72
|
|
|
73
73
|
// src/org/renderer.ts
|
|
74
74
|
import * as d3Selection from "d3-selection";
|
|
@@ -485,4 +485,4 @@ export {
|
|
|
485
485
|
renderOrg,
|
|
486
486
|
renderOrgForExport
|
|
487
487
|
};
|
|
488
|
-
//# sourceMappingURL=chunk-
|
|
488
|
+
//# sourceMappingURL=chunk-JGCEFKZP.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
|
|
@@ -274,4 +274,4 @@ function parseCycle(content) {
|
|
|
274
274
|
export {
|
|
275
275
|
parseCycle
|
|
276
276
|
};
|
|
277
|
-
//# sourceMappingURL=chunk-
|
|
277
|
+
//# sourceMappingURL=chunk-JQLSFZZP.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
stripQuotes,
|
|
3
3
|
tokenizeQuoteAware
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-A2ARDILY.js";
|
|
5
5
|
import {
|
|
6
6
|
CATEGORICAL_COLOR_ORDER,
|
|
7
7
|
RECOGNIZED_COLOR_NAMES,
|
|
@@ -250,4 +250,4 @@ export {
|
|
|
250
250
|
resolveActiveTagGroup,
|
|
251
251
|
matchTagBlockHeading
|
|
252
252
|
};
|
|
253
|
-
//# sourceMappingURL=chunk-
|
|
253
|
+
//# sourceMappingURL=chunk-JR7Q6GHE.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-YYVTBZZC.js";
|
|
10
10
|
import {
|
|
11
11
|
renderIntegratedLegend
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ASPS5O6F.js";
|
|
13
13
|
import {
|
|
14
14
|
TITLE_FONT_SIZE,
|
|
15
15
|
TITLE_FONT_WEIGHT,
|
|
@@ -18,20 +18,20 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
FONT_FAMILY
|
|
20
20
|
} from "./chunk-6KFWC4CO.js";
|
|
21
|
-
import {
|
|
22
|
-
contrastText,
|
|
23
|
-
shapeFill
|
|
24
|
-
} from "./chunk-JYDMBWRP.js";
|
|
25
21
|
import {
|
|
26
22
|
LEGEND_HEIGHT
|
|
27
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-Q5IHQ4NW.js";
|
|
28
24
|
import {
|
|
29
25
|
measureText,
|
|
30
26
|
wrapTextToWidth
|
|
31
27
|
} from "./chunk-4ASYQ347.js";
|
|
28
|
+
import {
|
|
29
|
+
contrastText,
|
|
30
|
+
shapeFill
|
|
31
|
+
} from "./chunk-JYDMBWRP.js";
|
|
32
32
|
import {
|
|
33
33
|
fillModeFromOptions
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-A2ARDILY.js";
|
|
35
35
|
import {
|
|
36
36
|
resolveColor
|
|
37
37
|
} from "./chunk-ZKPPI6BF.js";
|
|
@@ -676,7 +676,7 @@ function buildEdgeArc(src, tgt, cx, cy, radius, isClockwise, arrowLength = 0) {
|
|
|
676
676
|
// src/cycle/renderer.ts
|
|
677
677
|
var NODE_FONT_SIZE = 13;
|
|
678
678
|
var DESC_FONT_SIZE2 = 11;
|
|
679
|
-
var EDGE_LABEL_FONT_SIZE2 =
|
|
679
|
+
var EDGE_LABEL_FONT_SIZE2 = 13;
|
|
680
680
|
var DESC_LINE_HEIGHT2 = 15;
|
|
681
681
|
var TITLE_AREA_HEIGHT = 50;
|
|
682
682
|
function renderCycle(container, parsed, palette, isDark, onClickItem, exportDims, viewState, renderOptions) {
|
|
@@ -969,4 +969,4 @@ export {
|
|
|
969
969
|
renderCycle,
|
|
970
970
|
renderCycleForExport
|
|
971
971
|
};
|
|
972
|
-
//# sourceMappingURL=chunk-
|
|
972
|
+
//# sourceMappingURL=chunk-KC3WBBI7.js.map
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
matchTagBlockHeading,
|
|
6
6
|
stripDefaultModifier,
|
|
7
7
|
validateTagGroupNames
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JR7Q6GHE.js";
|
|
9
9
|
import {
|
|
10
10
|
OPTION_NOCOLON_RE,
|
|
11
11
|
extractColor,
|
|
12
12
|
measureIndent,
|
|
13
13
|
parseFirstLine,
|
|
14
14
|
tryParseSharedOption
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-A2ARDILY.js";
|
|
16
16
|
import {
|
|
17
17
|
formatDgmoError,
|
|
18
18
|
makeDgmoError
|
|
@@ -729,4 +729,4 @@ export {
|
|
|
729
729
|
resetWireframeIds,
|
|
730
730
|
parseWireframe
|
|
731
731
|
};
|
|
732
|
-
//# sourceMappingURL=chunk-
|
|
732
|
+
//# sourceMappingURL=chunk-KK3L5NVK.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-3IUHKMJI.js";
|
|
8
8
|
import {
|
|
9
9
|
layoutERDiagram
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SSHS42QG.js";
|
|
11
11
|
import {
|
|
12
12
|
EDGE_STROKE_WIDTH,
|
|
13
13
|
NODE_STROKE_WIDTH
|
|
@@ -15,9 +15,15 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
ScaleContext
|
|
17
17
|
} from "./chunk-YYVTBZZC.js";
|
|
18
|
+
import {
|
|
19
|
+
layoutInlineHeader
|
|
20
|
+
} from "./chunk-US3P2DQO.js";
|
|
18
21
|
import {
|
|
19
22
|
renderIntegratedLegend
|
|
20
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ASPS5O6F.js";
|
|
24
|
+
import {
|
|
25
|
+
getLegendExtent
|
|
26
|
+
} from "./chunk-GRXPFBYC.js";
|
|
21
27
|
import {
|
|
22
28
|
TITLE_FONT_SIZE,
|
|
23
29
|
TITLE_FONT_WEIGHT,
|
|
@@ -28,26 +34,27 @@ import {
|
|
|
28
34
|
} from "./chunk-6KFWC4CO.js";
|
|
29
35
|
import {
|
|
30
36
|
parseERDiagram
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import {
|
|
33
|
-
contrastText,
|
|
34
|
-
getSeriesColors,
|
|
35
|
-
shapeFill
|
|
36
|
-
} from "./chunk-JYDMBWRP.js";
|
|
37
|
+
} from "./chunk-NL7FUIVD.js";
|
|
37
38
|
import {
|
|
38
39
|
LEGEND_HEIGHT
|
|
39
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-Q5IHQ4NW.js";
|
|
40
41
|
import {
|
|
41
42
|
measureText
|
|
42
43
|
} from "./chunk-4ASYQ347.js";
|
|
44
|
+
import {
|
|
45
|
+
contrastText,
|
|
46
|
+
getSeriesColors,
|
|
47
|
+
shapeFill
|
|
48
|
+
} from "./chunk-JYDMBWRP.js";
|
|
43
49
|
import {
|
|
44
50
|
resolveTagColor,
|
|
45
51
|
tagAttrKey
|
|
46
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-JR7Q6GHE.js";
|
|
47
53
|
import {
|
|
48
54
|
fillModeFromOptions,
|
|
55
|
+
legendInlineRequested,
|
|
49
56
|
legendSuppressed
|
|
50
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-A2ARDILY.js";
|
|
51
58
|
|
|
52
59
|
// src/er/renderer.ts
|
|
53
60
|
import * as d3Selection from "d3-selection";
|
|
@@ -274,7 +281,55 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
|
|
|
274
281
|
const sTitleFontSize = ctx.text(TITLE_FONT_SIZE);
|
|
275
282
|
const sTitleY = ctx.structural(TITLE_Y);
|
|
276
283
|
const naturalW = diagramW + sDiagramPadding * 2;
|
|
277
|
-
const
|
|
284
|
+
const semanticRoles = useSemanticColors ? classifyEREntities([...parsed.tables], [...parsed.relationships]) : null;
|
|
285
|
+
const semanticActive = semanticRoles !== null && (semanticColorsActive ?? true);
|
|
286
|
+
const presentRoles = semanticRoles ? ROLE_ORDER.filter((role) => {
|
|
287
|
+
for (const r of semanticRoles.values()) {
|
|
288
|
+
if (r === role) return true;
|
|
289
|
+
}
|
|
290
|
+
return false;
|
|
291
|
+
}) : [];
|
|
292
|
+
const semanticGroups = presentRoles.length > 0 ? [
|
|
293
|
+
{
|
|
294
|
+
name: "Role",
|
|
295
|
+
entries: presentRoles.map((role) => ({
|
|
296
|
+
value: ROLE_LABELS[role],
|
|
297
|
+
color: palette.colors[ROLE_COLORS[role]]
|
|
298
|
+
}))
|
|
299
|
+
}
|
|
300
|
+
] : [];
|
|
301
|
+
const showSemanticLegend = semanticRoles !== null && !noLegend && presentRoles.length > 0;
|
|
302
|
+
const inlineRequested = legendInlineRequested(parsed.options);
|
|
303
|
+
const hasLegend = hasTagLegend || showSemanticLegend;
|
|
304
|
+
const inlineLegendGroups = hasTagLegend ? parsed.tagGroups : semanticGroups;
|
|
305
|
+
const inlineActiveGroup = hasTagLegend ? activeTagGroup ?? null : semanticActive ? "Role" : null;
|
|
306
|
+
const inlineContainerW = exportDims?.width ?? naturalW;
|
|
307
|
+
const legendExtent = inlineRequested && hasLegend ? getLegendExtent(
|
|
308
|
+
{
|
|
309
|
+
groups: inlineLegendGroups,
|
|
310
|
+
position: {
|
|
311
|
+
placement: "top-center",
|
|
312
|
+
titleRelation: "inline-with-title"
|
|
313
|
+
},
|
|
314
|
+
mode: exportMode ? "export" : "preview"
|
|
315
|
+
},
|
|
316
|
+
{ activeGroup: inlineActiveGroup },
|
|
317
|
+
inlineContainerW
|
|
318
|
+
) : { width: 0, height: 0 };
|
|
319
|
+
const header = layoutInlineHeader({
|
|
320
|
+
requested: inlineRequested,
|
|
321
|
+
title: parsed.title ?? "",
|
|
322
|
+
hasLegend,
|
|
323
|
+
legendWidth: legendExtent.width,
|
|
324
|
+
legendHeight: legendExtent.height,
|
|
325
|
+
containerWidth: inlineContainerW,
|
|
326
|
+
titleBandHeight: titleHeight,
|
|
327
|
+
legendReserve: legendReserveH,
|
|
328
|
+
titleBaselineY: sTitleY,
|
|
329
|
+
titleFontSize: sTitleFontSize
|
|
330
|
+
});
|
|
331
|
+
const effectiveReserveH = header.inline ? 0 : legendReserveH;
|
|
332
|
+
const naturalH = diagramH + titleHeight + effectiveReserveH + sDiagramPadding * 2;
|
|
278
333
|
let viewW;
|
|
279
334
|
let viewH;
|
|
280
335
|
let scale;
|
|
@@ -283,24 +338,24 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
|
|
|
283
338
|
if (exportDims) {
|
|
284
339
|
viewW = exportDims.width ?? naturalW;
|
|
285
340
|
viewH = exportDims.height ?? naturalH;
|
|
286
|
-
const availH = viewH - titleHeight -
|
|
341
|
+
const availH = viewH - titleHeight - effectiveReserveH;
|
|
287
342
|
const scaleX = (viewW - sDiagramPadding * 2) / diagramW;
|
|
288
343
|
const scaleY = (availH - sDiagramPadding * 2) / diagramH;
|
|
289
344
|
scale = Math.min(MAX_SCALE, scaleX, scaleY);
|
|
290
345
|
const scaledW = diagramW * scale;
|
|
291
346
|
offsetX = (viewW - scaledW) / 2;
|
|
292
|
-
offsetY = titleHeight +
|
|
347
|
+
offsetY = titleHeight + effectiveReserveH + sDiagramPadding;
|
|
293
348
|
} else {
|
|
294
349
|
viewW = naturalW;
|
|
295
350
|
viewH = naturalH;
|
|
296
351
|
scale = 1;
|
|
297
352
|
offsetX = sDiagramPadding;
|
|
298
|
-
offsetY = titleHeight +
|
|
353
|
+
offsetY = titleHeight + effectiveReserveH + sDiagramPadding;
|
|
299
354
|
}
|
|
300
355
|
if (viewW <= 0 || viewH <= 0) return;
|
|
301
356
|
const svg = d3Selection.select(container).append("svg").attr("width", exportDims ? viewW : "100%").attr("height", exportDims ? viewH : "100%").attr("viewBox", `0 0 ${viewW} ${viewH}`).attr("preserveAspectRatio", "xMidYMid meet").style("font-family", FONT_FAMILY);
|
|
302
357
|
if (showTitle) {
|
|
303
|
-
const titleEl = svg.append("text").attr("class", "chart-title").attr("x",
|
|
358
|
+
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(
|
|
304
359
|
"cursor",
|
|
305
360
|
onClickItem && parsed.titleLineNumber ? "pointer" : "default"
|
|
306
361
|
).text(parsed.title);
|
|
@@ -317,8 +372,6 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
|
|
|
317
372
|
}
|
|
318
373
|
const contentG = svg.append("g").attr("transform", `translate(${offsetX}, ${offsetY}) scale(${scale})`);
|
|
319
374
|
const seriesColors = getSeriesColors(palette);
|
|
320
|
-
const semanticRoles = useSemanticColors ? classifyEREntities([...parsed.tables], [...parsed.relationships]) : null;
|
|
321
|
-
const semanticActive = semanticRoles !== null && (semanticColorsActive ?? true);
|
|
322
375
|
const useLabels = parsed.options["notation"] === "labels";
|
|
323
376
|
for (const edge of layout.edges) {
|
|
324
377
|
if (edge.points.length < 2) continue;
|
|
@@ -462,46 +515,43 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
|
|
|
462
515
|
}
|
|
463
516
|
if (hasTagLegend) {
|
|
464
517
|
const legendY = sDiagramPadding + titleHeight;
|
|
465
|
-
const legendG = svg.append("g").attr("class", "er-tag-legend").attr(
|
|
518
|
+
const legendG = svg.append("g").attr("class", "er-tag-legend").attr(
|
|
519
|
+
"transform",
|
|
520
|
+
header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0,${legendY})`
|
|
521
|
+
);
|
|
466
522
|
renderIntegratedLegend(legendG, {
|
|
467
523
|
groups: parsed.tagGroups,
|
|
468
524
|
activeGroup: activeTagGroup ?? null,
|
|
469
525
|
mode: exportMode ? "export" : "preview",
|
|
526
|
+
position: {
|
|
527
|
+
placement: "top-center",
|
|
528
|
+
titleRelation: header.inline ? "inline-with-title" : "below-title"
|
|
529
|
+
},
|
|
470
530
|
palette,
|
|
471
531
|
isDark,
|
|
472
532
|
width: viewW
|
|
473
533
|
});
|
|
474
534
|
legendG.selectAll("[data-legend-group]").classed("er-legend-group", true);
|
|
475
535
|
}
|
|
476
|
-
if (
|
|
477
|
-
const
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
}
|
|
481
|
-
|
|
536
|
+
if (showSemanticLegend) {
|
|
537
|
+
const legendY = sDiagramPadding + titleHeight;
|
|
538
|
+
const legendG = svg.append("g").attr("class", "er-semantic-legend").attr(
|
|
539
|
+
"transform",
|
|
540
|
+
header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0,${legendY})`
|
|
541
|
+
);
|
|
542
|
+
renderIntegratedLegend(legendG, {
|
|
543
|
+
groups: semanticGroups,
|
|
544
|
+
activeGroup: semanticActive ? "Role" : null,
|
|
545
|
+
mode: exportMode ? "export" : "preview",
|
|
546
|
+
position: {
|
|
547
|
+
placement: "top-center",
|
|
548
|
+
titleRelation: header.inline ? "inline-with-title" : "below-title"
|
|
549
|
+
},
|
|
550
|
+
palette,
|
|
551
|
+
isDark,
|
|
552
|
+
width: viewW
|
|
482
553
|
});
|
|
483
|
-
|
|
484
|
-
const legendY = sDiagramPadding + titleHeight;
|
|
485
|
-
const semanticGroups = [
|
|
486
|
-
{
|
|
487
|
-
name: "Role",
|
|
488
|
-
entries: presentRoles.map((role) => ({
|
|
489
|
-
value: ROLE_LABELS[role],
|
|
490
|
-
color: palette.colors[ROLE_COLORS[role]]
|
|
491
|
-
}))
|
|
492
|
-
}
|
|
493
|
-
];
|
|
494
|
-
const legendG = svg.append("g").attr("class", "er-semantic-legend").attr("transform", `translate(0,${legendY})`);
|
|
495
|
-
renderIntegratedLegend(legendG, {
|
|
496
|
-
groups: semanticGroups,
|
|
497
|
-
activeGroup: semanticActive ? "Role" : null,
|
|
498
|
-
mode: exportMode ? "export" : "preview",
|
|
499
|
-
palette,
|
|
500
|
-
isDark,
|
|
501
|
-
width: viewW
|
|
502
|
-
});
|
|
503
|
-
legendG.selectAll("[data-legend-group]").classed("er-legend-group", true);
|
|
504
|
-
}
|
|
554
|
+
legendG.selectAll("[data-legend-group]").classed("er-legend-group", true);
|
|
505
555
|
}
|
|
506
556
|
}
|
|
507
557
|
function renderERDiagramForExport(content, theme, palette) {
|
|
@@ -550,4 +600,4 @@ export {
|
|
|
550
600
|
renderERDiagram,
|
|
551
601
|
renderERDiagramForExport
|
|
552
602
|
};
|
|
553
|
-
//# sourceMappingURL=chunk-
|
|
603
|
+
//# sourceMappingURL=chunk-L2DIXZUT.js.map
|