@diagrammo/dgmo 0.76.0 → 0.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -13
- package/dist/advanced.d.ts +150 -13
- package/dist/advanced.js +180 -131
- package/dist/block.css +1 -1
- package/dist/block.d.ts +2 -2
- package/dist/block.js +45 -41
- package/dist/{chart-meta-lP8Rl19E.d.ts → chart-meta-BKN2ORkc.d.ts} +2 -2
- package/dist/chart-meta.d.ts +3 -3
- package/dist/chart-meta.js +30 -29
- package/dist/charts-d3-KEQ7XVSM.js +31 -0
- package/dist/{chunk-7IATMZSA.js → chunk-26EVL454.js} +1 -25
- package/dist/{chunk-3H4PDNP4.js → chunk-2NLBIZEW.js} +2 -2
- package/dist/{chunk-GFXFRKUG.js → chunk-32VR65TL.js} +63 -36
- package/dist/{chunk-IHUOYDLN.js → chunk-36UQ77JV.js} +24 -24
- package/dist/chunk-3DPOIW3W.js +10 -0
- package/dist/{chunk-3SP6G4LN.js → chunk-3GLTQZKE.js} +2 -2
- package/dist/{chunk-DY7KDZUF.js → chunk-3OWIYK52.js} +2 -2
- package/dist/{chunk-UBW53CNS.js → chunk-3XFOE3DQ.js} +12 -7
- package/dist/{chunk-W7UBPARG.js → chunk-3ZLQM6XN.js} +2 -2
- package/dist/{chunk-5GM6BZO7.js → chunk-4AWLEWSD.js} +5 -2
- package/dist/{chunk-AYM472K3.js → chunk-4IGUEGD6.js} +80 -61
- package/dist/{chunk-QOVM5VRC.js → chunk-57GSSHBR.js} +2 -2
- package/dist/{chunk-5VMUVJO4.js → chunk-5G55TS3H.js} +2 -2
- package/dist/{chunk-QT5UMFPE.js → chunk-67I3HFSF.js} +9 -9
- package/dist/{chunk-WQXD3IIN.js → chunk-6B3M6LW6.js} +10 -8
- package/dist/{chunk-3EGIU5WY.js → chunk-6PHOZBW5.js} +4 -6
- package/dist/{chunk-5PFNUDXR.js → chunk-6VTLVU7D.js} +2 -2
- package/dist/{chunk-M5JT2AU7.js → chunk-6Z2NUJSX.js} +2 -2
- package/dist/{chunk-BWJLLNUX.js → chunk-7BNRHSSF.js} +2 -2
- package/dist/{chunk-JLODGGN2.js → chunk-7NNJXYXU.js} +2 -2
- package/dist/{chunk-FTTB64OJ.js → chunk-7SMVTA7I.js} +26 -26
- package/dist/{chunk-Z7KVOVE4.js → chunk-7WTFX6OA.js} +6 -3
- package/dist/{chunk-ZM27UI5O.js → chunk-A7Y32YD6.js} +2 -2
- package/dist/{chunk-FPRMP6YA.js → chunk-AHN2CVCH.js} +10 -7
- package/dist/{chunk-N6MZSBOL.js → chunk-AN7T6VP7.js} +2 -2
- package/dist/{chunk-F4X5NVKY.js → chunk-B6PVPAS5.js} +2 -2
- package/dist/{chunk-QI4Q5ZZH.js → chunk-BB2ORSTF.js} +19 -18
- package/dist/{chunk-HGFKDSKZ.js → chunk-BJB4YDJP.js} +21 -21
- package/dist/{chunk-BZQCAZZZ.js → chunk-BPM52K3Z.js} +41 -34
- package/dist/{chunk-HFCKU73Y.js → chunk-BSREARWG.js} +29 -28
- package/dist/{chunk-F4V67JXG.js → chunk-CTERZC4K.js} +2 -2
- package/dist/{chunk-FMZEU7MF.js → chunk-CYLSQO4L.js} +6 -6
- package/dist/{chunk-JLJ7SP4X.js → chunk-DCPD5SHV.js} +3 -3
- package/dist/{chunk-U7AO6FRL.js → chunk-ENDB5YSV.js} +363 -129
- package/dist/{chunk-RTTZIX34.js → chunk-EOB7XVYR.js} +2 -2
- package/dist/chunk-EPDBWATV.js +38 -0
- package/dist/{chunk-TPN7RJOM.js → chunk-FJADQOFQ.js} +3 -3
- package/dist/{chunk-MG3DE3VO.js → chunk-FLMXJMMY.js} +3 -3
- package/dist/{chunk-WGC42WJU.js → chunk-FWNJDD4U.js} +6 -2
- package/dist/{chunk-S5P5Z5Y5.js → chunk-GINNZHVN.js} +2 -2
- package/dist/{chunk-7EZ5AKBK.js → chunk-GJH7ZEPH.js} +45 -38
- package/dist/{chunk-E3BJVEMZ.js → chunk-GQEXY7XL.js} +68 -65
- package/dist/{chunk-COCMMQXW.js → chunk-HHHYVTVS.js} +16 -16
- package/dist/chunk-ICLB27PZ.js +11 -0
- package/dist/{chunk-QMFIZQTB.js → chunk-IDGQB6XD.js} +6 -4
- package/dist/{chunk-R3XI2VC7.js → chunk-IDJGV6VM.js} +2 -1
- package/dist/{chunk-4CRLM3IT.js → chunk-IE47TYZT.js} +177 -118
- package/dist/{chunk-FJ57274M.js → chunk-IIEI7VK5.js} +15 -1
- package/dist/{chunk-YDA46XHI.js → chunk-IMO46ROR.js} +38 -32
- package/dist/{chunk-4SXHMFFP.js → chunk-IZTU6WVR.js} +24 -13
- package/dist/{chunk-U74EGVOA.js → chunk-JOD2CK2M.js} +16 -14
- package/dist/{chunk-U5B3TUEW.js → chunk-JUNTVLOU.js} +16 -15
- package/dist/{chunk-RWFMOVHG.js → chunk-KAZQX2EY.js} +2 -2
- package/dist/{chunk-NHQ7HUAS.js → chunk-KGX5LIUG.js} +10 -8
- package/dist/{chunk-Q74GP3GK.js → chunk-KO6DGOOB.js} +3 -3
- package/dist/{chunk-UTTRJ6KN.js → chunk-L26M3X7K.js} +16 -13
- package/dist/{chunk-RU2HHHYA.js → chunk-LD2JSKU3.js} +12 -2
- package/dist/{chunk-32MOGTKT.js → chunk-LEBPWFVF.js} +50 -46
- package/dist/{chunk-MU3CJPJF.js → chunk-LGI735AJ.js} +2 -2
- package/dist/{chunk-OWVDD5EC.js → chunk-LMWXBFLA.js} +2 -2
- package/dist/{chunk-CLQJAGWL.js → chunk-M3LZCDB6.js} +40 -42
- package/dist/{chunk-YT5ICQ4R.js → chunk-MFK7LF66.js} +2 -2
- package/dist/{chunk-JL7BDLC6.js → chunk-MJYFPFZT.js} +110 -20
- package/dist/{chunk-2QRIMMIH.js → chunk-N56W4R66.js} +2 -2
- package/dist/{chunk-LXXVHLTH.js → chunk-NN5IDH2I.js} +2 -2
- package/dist/{chunk-46KVXDUJ.js → chunk-NS3KIRSW.js} +2 -2
- package/dist/{chunk-LM3HY3VG.js → chunk-P2DM7Q5U.js} +2 -2
- package/dist/{chunk-DJL5PO27.js → chunk-P4SQV3XD.js} +2 -2
- package/dist/{chunk-HOIAQ3P2.js → chunk-P54AX5XN.js} +9 -9
- package/dist/{chunk-JQ575OAK.js → chunk-P64NBPSK.js} +14 -14
- package/dist/{chunk-7G4XMHDB.js → chunk-PIWUZFG7.js} +33 -25
- package/dist/{chunk-SWEKCK34.js → chunk-QAPFXLAC.js} +2 -2
- package/dist/chunk-QFIXL3OK.js +68 -0
- package/dist/{chunk-KRTLS3G6.js → chunk-QVMV4KCA.js} +2 -2
- package/dist/{chunk-76LHNLGX.js → chunk-R4YGH7DJ.js} +5 -3
- package/dist/{chunk-PAW4RMH3.js → chunk-RC3FM3FE.js} +12 -13
- package/dist/{chunk-UJBP57UJ.js → chunk-RC6GGF6X.js} +2 -2
- package/dist/{chunk-S6OXNZBM.js → chunk-RHZZVIGA.js} +3 -3
- package/dist/{chunk-MS5574I7.js → chunk-RIXWLFB4.js} +2 -2
- package/dist/{chunk-BCB24FG7.js → chunk-RUNI4OXP.js} +18 -14
- package/dist/{chunk-ICVIJLBA.js → chunk-SFSJ6XWV.js} +2 -2
- package/dist/{chunk-EGXJWRO6.js → chunk-SNBEAO4Q.js} +8 -8
- package/dist/{chunk-XHROEQ23.js → chunk-SXD6VY7D.js} +16 -14
- package/dist/{chunk-GEURKGZS.js → chunk-TLM3I4XF.js} +16 -16
- package/dist/{chunk-IFC3JXCT.js → chunk-TO6TWNMF.js} +19 -15
- package/dist/{chunk-OUJG73YJ.js → chunk-U2JIFCJN.js} +18 -18
- package/dist/{chunk-CAPR5DET.js → chunk-U4ND3J6C.js} +18 -14
- package/dist/{chunk-YVDBBWEP.js → chunk-UCF6TKWV.js} +51 -48
- package/dist/{chunk-UWYZIGCB.js → chunk-UDYJVX6Y.js} +9 -9
- package/dist/{chunk-OBYZU23V.js → chunk-UQY2VLUK.js} +25 -23
- package/dist/{chunk-CQKD6GOC.js → chunk-VAA7QSZ7.js} +53 -32
- package/dist/{chunk-Q6BAFS7I.js → chunk-VQGQF7O7.js} +12 -10
- package/dist/{chunk-DEW62ON3.js → chunk-VSPNH7LC.js} +2 -2
- package/dist/{chunk-4YER7UCV.js → chunk-VUJQ6RU6.js} +2 -2
- package/dist/{chunk-C576CU77.js → chunk-VZD3ZV4Y.js} +26 -22
- package/dist/{chunk-NCT22MOD.js → chunk-WMIKC5XO.js} +2 -2
- package/dist/{chunk-C2WH3BMS.js → chunk-X326N4GN.js} +10 -7
- package/dist/chunk-XBJJP2HN.js +37 -0
- package/dist/{chunk-7NSNE52V.js → chunk-XCR3PDFF.js} +2 -2
- package/dist/{chunk-TF76LCZS.js → chunk-XDPJMLOH.js} +30 -27
- package/dist/{chunk-3LJNQ6LR.js → chunk-YKDZ3ZRI.js} +27 -25
- package/dist/{chunk-GLREDNBA.js → chunk-YVLTNNME.js} +12 -2
- package/dist/{chunk-76IBFEYW.js → chunk-ZGOBAMQ2.js} +15 -13
- package/dist/{chunk-AFR6GWXD.js → chunk-ZMCFUGKO.js} +49 -42
- package/dist/clock.js +11 -5
- package/dist/completion-registry.js +2 -2
- package/dist/countdown.js +26 -20
- package/dist/{d3--y67plmW.d.ts → d3-CQT5bwpb.d.ts} +1 -1
- package/dist/{dgmo-router-CY5j16Pl.d.ts → dgmo-router-C9CsswPZ.d.ts} +1 -1
- package/dist/{dgmo-router-A3LIHT6H.js → dgmo-router-XZNCLYTV.js} +30 -29
- package/dist/{dimensions-7NYBSZRJ.js → dimensions-SIZMZ4DC.js} +8 -8
- package/dist/{flowchart-renderer-QYGQ64BM.js → flowchart-renderer-FDJ4QQXE.js} +15 -14
- package/dist/index.d.ts +7 -7
- package/dist/index.js +58 -43
- package/dist/{layout-LAS67TK3.js → layout-5DZ2LI2R.js} +2 -2
- package/dist/{layout-ZAGUFT2G.js → layout-6I6LSBUR.js} +6 -5
- package/dist/{layout-2OJ25STS.js → layout-C2SCZV5M.js} +6 -5
- package/dist/{layout-6SKHNQYO.js → layout-CHWKNE3O.js} +3 -3
- package/dist/{layout-EM4DLMAX.js → layout-K4KML2DL.js} +3 -3
- package/dist/{layout-KQUSB45X.js → layout-S53FSD6R.js} +7 -6
- package/dist/{layout-ROORJQ4X.js → layout-TCFXB5XH.js} +7 -6
- package/dist/{layout-5ILNODTP.js → layout-XK6ZD7BU.js} +6 -5
- package/dist/{layout-B5GQVXXY.js → layout-YVY72CIG.js} +7 -6
- package/dist/{layout-VUZ3MLOI.js → layout-YY6VH5XH.js} +6 -5
- package/dist/{layout-RV2T2YTT.js → layout-ZDN252GR.js} +4 -3
- package/dist/{layout-search-UOKEMER5.js → layout-search-TSV4FURP.js} +7 -6
- package/dist/{legend-constants-PLN2YHGM.js → legend-constants-SB4PLHV5.js} +3 -3
- package/dist/{palettes-54YSI3IX.js → palettes-YIPSRYXP.js} +5 -3
- package/dist/{parser-GCVSRQPY.js → parser-2BX2EJUB.js} +3 -3
- package/dist/{parser-WVE6SKB7.js → parser-3UNIPVNY.js} +3 -3
- package/dist/{parser-5XFGK5C5.js → parser-4IHIVDJD.js} +5 -5
- package/dist/{parser-ZT3PU2HT.js → parser-62VNEQRT.js} +3 -3
- package/dist/{parser-PR3OR3LO.js → parser-6JNJHQAG.js} +3 -3
- package/dist/{parser-ZXQZZK6W.js → parser-6ZFQLLVE.js} +3 -2
- package/dist/{parser-WMJEPZDC.js → parser-BOPXE6RP.js} +3 -3
- package/dist/{parser-WWRRG2DV.js → parser-DFBQ2RID.js} +3 -3
- package/dist/{parser-2GMHFSTS.js → parser-EPKXJ2RL.js} +3 -3
- package/dist/{parser-ML3LVNDV.js → parser-G7E2BURB.js} +3 -3
- package/dist/{parser-QOIZGW7I.js → parser-GFGU5ZLQ.js} +3 -3
- package/dist/{parser-L7T7FY3H.js → parser-GKZWI5SZ.js} +3 -3
- package/dist/{parser-QYAIFXLP.js → parser-HSPODF4H.js} +3 -3
- package/dist/{parser-EQ4I3TSH.js → parser-IK3FXZ7D.js} +3 -3
- package/dist/{parser-LV7PQBUG.js → parser-LJWPKRDM.js} +3 -3
- package/dist/{parser-RDBXEVI4.js → parser-OYWUBQV4.js} +3 -3
- package/dist/{parser-6FUESG4N.js → parser-PD4TP6NM.js} +3 -3
- package/dist/{parser-E3OHNNTH.js → parser-R2JHC7LQ.js} +3 -3
- package/dist/{parser-CJNP7RKR.js → parser-RMZ6YI7H.js} +3 -3
- package/dist/{parser-TA5TYZNL.js → parser-RUJNN5PK.js} +3 -3
- package/dist/{parser-UTR5WE4O.js → parser-YWE7GHW6.js} +3 -3
- package/dist/{parser-3AOMUX5D.js → parser-Z5UK6ADF.js} +3 -3
- package/dist/{parser-YWQCC33R.js → parser-ZO5YT5SV.js} +3 -3
- package/dist/renderer-5TPUPMZ7.js +26 -0
- package/dist/{renderer-4EWGZLJ6.js → renderer-AIVALEQR.js} +7 -7
- package/dist/renderer-AMELXBNW.js +23 -0
- package/dist/renderer-BF7FYXG3.js +25 -0
- package/dist/renderer-CRRW7LTW.js +17 -0
- package/dist/renderer-CXU2MGSC.js +27 -0
- package/dist/renderer-DI66RLAG.js +30 -0
- package/dist/renderer-E2JTYQY5.js +39 -0
- package/dist/{renderer-ZAJ5353N.js → renderer-FA4BTAOL.js} +7 -7
- package/dist/{renderer-GF6S5ZX6.js → renderer-FFGFTIT4.js} +15 -14
- package/dist/renderer-IVAM7Z3Y.js +27 -0
- package/dist/renderer-J6HK2KOW.js +23 -0
- package/dist/renderer-J7J3OVLQ.js +39 -0
- package/dist/{renderer-QAMOXOZ2.js → renderer-JC7MK7SD.js} +6 -5
- package/dist/{renderer-CGOPX4HW.js → renderer-JHQC5RGJ.js} +14 -14
- package/dist/renderer-JRITSZY3.js +28 -0
- package/dist/{renderer-E6NHTVN6.js → renderer-KD5X4RIS.js} +14 -13
- package/dist/{renderer-OTHBTGBN.js → renderer-KWNNWCGD.js} +6 -5
- package/dist/{renderer-EP4GRCDX.js → renderer-LGMIAG6N.js} +7 -6
- package/dist/{renderer-IH45QV6Z.js → renderer-LQN3FXAP.js} +33 -32
- package/dist/renderer-LRL4SU43.js +29 -0
- package/dist/{renderer-D7N7PPB7.js → renderer-MBL64AJI.js} +6 -6
- package/dist/renderer-NA3DTAWF.js +39 -0
- package/dist/renderer-OR5QHR7X.js +31 -0
- package/dist/renderer-SBVWHQVW.js +30 -0
- package/dist/{renderer-KMOGGMM7.js → renderer-TLOSBJKW.js} +13 -13
- package/dist/{renderer-LE3ZKHNS.js → renderer-UDWJRRIC.js} +11 -11
- package/dist/renderer-VHK6UAW2.js +20 -0
- package/dist/{renderer-FUJNSC5X.js → renderer-W5UG2HWT.js} +5 -5
- package/dist/renderer-WOOKJOBQ.js +25 -0
- package/dist/renderer-WYNLGZRF.js +25 -0
- package/dist/{renderer-BUEFD2IF.js → renderer-Y74Y54C3.js} +8 -8
- package/dist/renderer-ZUAXGHFC.js +28 -0
- package/dist/renderer-radial-YVUDGR7C.js +21 -0
- package/dist/{state-parser-TPA67IXM.js → state-parser-CT5HQQ7E.js} +3 -3
- package/dist/state-renderer-7O3QGNJ5.js +41 -0
- package/dist/{tag-groups-DrHT2tEc.d.ts → tag-groups-BoJg3lFV.d.ts} +23 -1
- package/dist/{themes-GWhsabnx.d.ts → themes-CXYnNA4e.d.ts} +2 -2
- package/docs/architecture-report.md +3 -3
- package/docs/language-reference.md +122 -30
- package/docs/migration-sequence-color-to-tags.md +16 -8
- package/gallery/fixtures/sketch.dgmo +1 -1
- package/package.json +7 -6
- package/dist/charts-d3-SQEVMIAM.js +0 -29
- package/dist/chunk-LP7EC4MI.js +0 -16
- package/dist/chunk-UTCPNJND.js +0 -7
- package/dist/chunk-VV6HZQ5K.js +0 -40
- package/dist/renderer-3FB56573.js +0 -22
- package/dist/renderer-4PNVGHVA.js +0 -16
- package/dist/renderer-5W3HWIUL.js +0 -24
- package/dist/renderer-CO5O5VR5.js +0 -20
- package/dist/renderer-DKW273R7.js +0 -26
- package/dist/renderer-F24V3RD3.js +0 -26
- package/dist/renderer-F6WSR7UM.js +0 -39
- package/dist/renderer-FGGDZZFQ.js +0 -31
- package/dist/renderer-GJDVPXI3.js +0 -30
- package/dist/renderer-JMJ7Q5OC.js +0 -28
- package/dist/renderer-LBNVKVO3.js +0 -39
- package/dist/renderer-MUW4G2N6.js +0 -38
- package/dist/renderer-PIEPRK6M.js +0 -23
- package/dist/renderer-PKRKLOYR.js +0 -25
- package/dist/renderer-PR3KLNST.js +0 -28
- package/dist/renderer-RUHC6D3B.js +0 -25
- package/dist/renderer-UUP6OX6F.js +0 -27
- package/dist/renderer-UYZSP7MF.js +0 -25
- package/dist/renderer-XBL6CLN2.js +0 -30
- package/dist/renderer-radial-MZP3SVTZ.js +0 -21
- package/dist/state-renderer-UIE3AQM6.js +0 -40
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
TITLE_FONT_SIZE,
|
|
6
6
|
TITLE_FONT_WEIGHT
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VSPNH7LC.js";
|
|
8
8
|
import {
|
|
9
9
|
FONT_FAMILY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ICLB27PZ.js";
|
|
11
11
|
import {
|
|
12
12
|
measureText
|
|
13
13
|
} from "./chunk-MTGGOCND.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
contrastText,
|
|
19
19
|
mix,
|
|
20
20
|
shapeFill
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YVLTNNME.js";
|
|
22
22
|
|
|
23
23
|
// src/wireframe/renderer.ts
|
|
24
24
|
import * as d3Selection from "d3-selection";
|
|
@@ -173,7 +173,7 @@ function renderGroup(g, node, ctx, depth) {
|
|
|
173
173
|
g.append("rect").attr("width", node.width).attr("height", node.height).attr("fill", fillColor).attr("stroke", palette.border).attr("stroke-width", 1).attr("rx", GROUP_CORNER);
|
|
174
174
|
}
|
|
175
175
|
if (el.label && ctx.showGroupLabels) {
|
|
176
|
-
g.append("text").attr("x", 10).attr("y", 18).attr("fill", palette.textMuted).attr("font-size", 11).attr("font-weight", "
|
|
176
|
+
g.append("text").attr("x", 10).attr("y", 18).attr("fill", palette.textMuted).attr("font-size", 11).attr("font-weight", "bold").attr("letter-spacing", "0.5px").text(el.label.toUpperCase());
|
|
177
177
|
}
|
|
178
178
|
if (el.states.includes("collapsed")) {
|
|
179
179
|
g.append("text").attr("x", node.width - 20).attr("y", 18).attr("fill", palette.textMuted).attr("font-size", 12).attr("opacity", 0.6).text("\u25B6");
|
|
@@ -226,7 +226,7 @@ function renderButton(g, node, ctx) {
|
|
|
226
226
|
} else {
|
|
227
227
|
g.append("rect").attr("width", node.width).attr("height", node.height).attr("fill", fill).attr("rx", BUTTON_CORNER);
|
|
228
228
|
}
|
|
229
|
-
g.append("text").attr("x", node.width / 2).attr("y", node.height / 2 + 4).attr("fill", textColor).attr("font-size", 13).attr("font-weight", "
|
|
229
|
+
g.append("text").attr("x", node.width / 2).attr("y", node.height / 2 + 4).attr("fill", textColor).attr("font-size", 13).attr("font-weight", "bold").attr("text-anchor", "middle").text(el.label);
|
|
230
230
|
}
|
|
231
231
|
function renderDropdown(g, node, ctx) {
|
|
232
232
|
const { palette, isTransparent } = ctx;
|
|
@@ -308,7 +308,7 @@ function renderNav(g, node, ctx) {
|
|
|
308
308
|
let x = 12;
|
|
309
309
|
for (const child of el.children) {
|
|
310
310
|
const isActive = child.states.includes("active");
|
|
311
|
-
g.append("text").attr("x", x).attr("y", node.height / 2 + 4).attr("fill", isActive ? palette.primary : palette.text).attr("font-size", 13).attr("font-weight", isActive ? "
|
|
311
|
+
g.append("text").attr("x", x).attr("y", node.height / 2 + 4).attr("fill", isActive ? palette.primary : palette.text).attr("font-size", 13).attr("font-weight", isActive ? "bold" : "normal").text(child.label);
|
|
312
312
|
const labelW = measureText(child.label, 13, { bold: isActive });
|
|
313
313
|
if (isActive) {
|
|
314
314
|
g.append("line").attr("x1", x).attr("y1", node.height - 4).attr("x2", x + labelW).attr("y2", node.height - 4).attr("stroke", palette.primary).attr("stroke-width", 2);
|
|
@@ -327,7 +327,7 @@ function renderTabs(g, node, ctx) {
|
|
|
327
327
|
if (isActive) {
|
|
328
328
|
g.append("line").attr("x1", x).attr("y1", node.height - 1).attr("x2", x + tabW).attr("y2", node.height - 1).attr("stroke", palette.primary).attr("stroke-width", 2);
|
|
329
329
|
}
|
|
330
|
-
g.append("text").attr("x", x + 12).attr("y", node.height / 2 + 4).attr("fill", isActive ? palette.primary : palette.textMuted).attr("font-size", 13).attr("font-weight", isActive ? "
|
|
330
|
+
g.append("text").attr("x", x + 12).attr("y", node.height / 2 + 4).attr("fill", isActive ? palette.primary : palette.textMuted).attr("font-size", 13).attr("font-weight", isActive ? "bold" : "normal").text(child.label);
|
|
331
331
|
x += tabW;
|
|
332
332
|
}
|
|
333
333
|
}
|
|
@@ -348,7 +348,7 @@ function renderTable(g, node, ctx) {
|
|
|
348
348
|
).attr("rx", 4);
|
|
349
349
|
for (let c = 0; c < cols; c++) {
|
|
350
350
|
const label = headers[c] || `Col ${c + 1}`;
|
|
351
|
-
g.append("text").attr("x", c * colW + 10).attr("y", headerH / 2 + 4).attr("fill", palette.text).attr("font-size", 12).attr("font-weight", "
|
|
351
|
+
g.append("text").attr("x", c * colW + 10).attr("y", headerH / 2 + 4).attr("fill", palette.text).attr("font-size", 12).attr("font-weight", "bold").text(label);
|
|
352
352
|
}
|
|
353
353
|
g.append("line").attr("x1", 0).attr("y1", headerH).attr("x2", node.width).attr("y2", headerH).attr("stroke", palette.border);
|
|
354
354
|
const rowCount = isSkeleton ? el.tableRows || 3 : data.length;
|
|
@@ -382,10 +382,10 @@ function renderTableCell(g, text, x, y, maxW, rowH, ctx) {
|
|
|
382
382
|
const by = y + (rowH - btnH) / 2;
|
|
383
383
|
if (isGhost) {
|
|
384
384
|
g.append("rect").attr("x", x).attr("y", by).attr("width", btnW).attr("height", btnH).attr("fill", "none").attr("stroke", fill).attr("stroke-width", 1).attr("rx", 3);
|
|
385
|
-
g.append("text").attr("x", x + btnW / 2).attr("y", by + btnH / 2 + 3).attr("fill", fill).attr("font-size", 10).attr("font-weight", "
|
|
385
|
+
g.append("text").attr("x", x + btnW / 2).attr("y", by + btnH / 2 + 3).attr("fill", fill).attr("font-size", 10).attr("font-weight", "bold").attr("text-anchor", "middle").text(label);
|
|
386
386
|
} else {
|
|
387
387
|
g.append("rect").attr("x", x).attr("y", by).attr("width", btnW).attr("height", btnH).attr("fill", fill).attr("rx", 3);
|
|
388
|
-
g.append("text").attr("x", x + btnW / 2).attr("y", by + btnH / 2 + 3).attr("fill", palette.bg).attr("font-size", 10).attr("font-weight", "
|
|
388
|
+
g.append("text").attr("x", x + btnW / 2).attr("y", by + btnH / 2 + 3).attr("fill", palette.bg).attr("font-size", 10).attr("font-weight", "bold").attr("text-anchor", "middle").text(label);
|
|
389
389
|
}
|
|
390
390
|
return;
|
|
391
391
|
}
|
|
@@ -531,18 +531,18 @@ function renderChart(g, node, ctx) {
|
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
function renderModal(parent, node, ctx) {
|
|
534
|
-
const { palette, isTransparent } = ctx;
|
|
534
|
+
const { palette, isDark, isTransparent } = ctx;
|
|
535
535
|
const el = node.element;
|
|
536
536
|
const g = parent.append("g").attr("transform", `translate(${node.x}, ${node.y})`).attr("data-line-number", el.lineNumber);
|
|
537
537
|
if (!isTransparent) {
|
|
538
|
-
g.append("rect").attr("x", 4).attr("y", 4).attr("width", node.width).attr("height", node.height).attr("fill", "rgba(0,0,0,0.1)").attr("rx", GROUP_CORNER);
|
|
538
|
+
g.append("rect").attr("x", 4).attr("y", 4).attr("width", node.width).attr("height", node.height).attr("fill", isDark ? "rgba(0,0,0,0.35)" : "rgba(0,0,0,0.1)").attr("rx", GROUP_CORNER);
|
|
539
539
|
}
|
|
540
540
|
g.append("rect").attr("width", node.width).attr("height", node.height).attr("fill", isTransparent ? "none" : palette.surface).attr("stroke", palette.border).attr("rx", GROUP_CORNER);
|
|
541
541
|
g.append("rect").attr("width", node.width).attr("height", 36).attr(
|
|
542
542
|
"fill",
|
|
543
543
|
isTransparent ? "none" : mix(palette.textMuted, palette.bg, 15)
|
|
544
544
|
).attr("rx", GROUP_CORNER);
|
|
545
|
-
g.append("text").attr("x", 12).attr("y", 24).attr("fill", palette.text).attr("font-size", 14).attr("font-weight", "
|
|
545
|
+
g.append("text").attr("x", 12).attr("y", 24).attr("fill", palette.text).attr("font-size", 14).attr("font-weight", "bold").text(el.label || "Modal");
|
|
546
546
|
const cx = node.width - 16;
|
|
547
547
|
g.append("text").attr("x", cx).attr("y", 24).attr("fill", palette.textMuted).attr("font-size", 16).text("\xD7");
|
|
548
548
|
for (const child of node.children) {
|
|
@@ -554,4 +554,4 @@ function renderModal(parent, node, ctx) {
|
|
|
554
554
|
export {
|
|
555
555
|
renderWireframe
|
|
556
556
|
};
|
|
557
|
-
//# sourceMappingURL=chunk-
|
|
557
|
+
//# sourceMappingURL=chunk-P64NBPSK.js.map
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderNodeCard
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4AWLEWSD.js";
|
|
4
4
|
import {
|
|
5
5
|
renderInlineText
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FWNJDD4U.js";
|
|
7
7
|
import {
|
|
8
|
+
ScaleContext
|
|
9
|
+
} from "./chunk-24YPR5EH.js";
|
|
10
|
+
import {
|
|
11
|
+
ARROWHEAD_HEIGHT,
|
|
12
|
+
ARROWHEAD_WIDTH,
|
|
8
13
|
CARD_RADIUS,
|
|
9
14
|
COLLAPSE_BAR_HEIGHT,
|
|
10
15
|
CONTAINER_HEADER_HEIGHT,
|
|
@@ -12,6 +17,7 @@ import {
|
|
|
12
17
|
CONTAINER_META_FONT_SIZE,
|
|
13
18
|
CONTAINER_META_LINE_HEIGHT,
|
|
14
19
|
CONTAINER_RADIUS,
|
|
20
|
+
EDGE_LABEL_KNOCKOUT_OPACITY,
|
|
15
21
|
EDGE_STROKE_WIDTH,
|
|
16
22
|
HEADER_HEIGHT,
|
|
17
23
|
LABEL_FONT_SIZE,
|
|
@@ -19,30 +25,27 @@ import {
|
|
|
19
25
|
META_LINE_HEIGHT,
|
|
20
26
|
NODE_STROKE_WIDTH,
|
|
21
27
|
SEPARATOR_GAP
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
ScaleContext
|
|
25
|
-
} from "./chunk-24YPR5EH.js";
|
|
28
|
+
} from "./chunk-IIEI7VK5.js";
|
|
26
29
|
import {
|
|
27
30
|
layoutInlineHeader
|
|
28
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-FLMXJMMY.js";
|
|
29
32
|
import {
|
|
30
33
|
serializeSvg
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-LD2JSKU3.js";
|
|
32
35
|
import {
|
|
33
36
|
TITLE_FONT_SIZE,
|
|
34
37
|
TITLE_FONT_WEIGHT
|
|
35
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-VSPNH7LC.js";
|
|
36
39
|
import {
|
|
37
40
|
renderIntegratedLegend
|
|
38
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-67I3HFSF.js";
|
|
39
42
|
import {
|
|
40
43
|
getLegendExtent,
|
|
41
44
|
getMaxLegendReservedHeight
|
|
42
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-IZTU6WVR.js";
|
|
43
46
|
import {
|
|
44
47
|
FONT_FAMILY
|
|
45
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-ICLB27PZ.js";
|
|
46
49
|
import {
|
|
47
50
|
EYE_CLOSED_PATH,
|
|
48
51
|
EYE_OPEN_PATH,
|
|
@@ -50,7 +53,7 @@ import {
|
|
|
50
53
|
LEGEND_EYE_SIZE,
|
|
51
54
|
LEGEND_GROUP_GAP,
|
|
52
55
|
LEGEND_HEIGHT
|
|
53
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-MFK7LF66.js";
|
|
54
57
|
import {
|
|
55
58
|
measureText
|
|
56
59
|
} from "./chunk-MTGGOCND.js";
|
|
@@ -59,7 +62,7 @@ import {
|
|
|
59
62
|
} from "./chunk-IYULMRBE.js";
|
|
60
63
|
import {
|
|
61
64
|
tagAttrKey
|
|
62
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-R4YGH7DJ.js";
|
|
63
66
|
import {
|
|
64
67
|
fillModeFromOptions,
|
|
65
68
|
legendInlineRequested,
|
|
@@ -70,7 +73,7 @@ import {
|
|
|
70
73
|
mix,
|
|
71
74
|
shapeFill,
|
|
72
75
|
themeBaseBg
|
|
73
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-YVLTNNME.js";
|
|
74
77
|
|
|
75
78
|
// src/sitemap/renderer.ts
|
|
76
79
|
import * as d3Selection from "d3-selection";
|
|
@@ -78,8 +81,6 @@ import * as d3Shape from "d3-shape";
|
|
|
78
81
|
var DIAGRAM_PADDING = 20;
|
|
79
82
|
var MAX_SCALE = 3;
|
|
80
83
|
var TITLE_HEIGHT = 30;
|
|
81
|
-
var ARROWHEAD_W = 10;
|
|
82
|
-
var ARROWHEAD_H = 7;
|
|
83
84
|
var EDGE_LABEL_FONT_SIZE = 11;
|
|
84
85
|
var LEGEND_FIXED_GAP = 8;
|
|
85
86
|
function nodeFill(palette, isDark, nodeColor, fillMode) {
|
|
@@ -192,11 +193,17 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
192
193
|
svg.attr("width", "100%");
|
|
193
194
|
}
|
|
194
195
|
const defs = svg.append("defs");
|
|
195
|
-
defs.append("marker").attr("id", "sm-arrow").attr("viewBox", `0 0 ${
|
|
196
|
+
defs.append("marker").attr("id", "sm-arrow").attr("viewBox", `0 0 ${ARROWHEAD_WIDTH} ${ARROWHEAD_HEIGHT}`).attr("refX", ARROWHEAD_WIDTH).attr("refY", ARROWHEAD_HEIGHT / 2).attr("markerWidth", ARROWHEAD_WIDTH).attr("markerHeight", ARROWHEAD_HEIGHT).attr("orient", "auto").append("polygon").attr(
|
|
197
|
+
"points",
|
|
198
|
+
`0,0 ${ARROWHEAD_WIDTH},${ARROWHEAD_HEIGHT / 2} 0,${ARROWHEAD_HEIGHT}`
|
|
199
|
+
).attr("fill", palette.textMuted);
|
|
196
200
|
const edgeColors = /* @__PURE__ */ new Set();
|
|
197
201
|
for (const color of edgeColors) {
|
|
198
202
|
const id = `sm-arrow-${color.replace("#", "")}`;
|
|
199
|
-
defs.append("marker").attr("id", id).attr("viewBox", `0 0 ${
|
|
203
|
+
defs.append("marker").attr("id", id).attr("viewBox", `0 0 ${ARROWHEAD_WIDTH} ${ARROWHEAD_HEIGHT}`).attr("refX", ARROWHEAD_WIDTH).attr("refY", ARROWHEAD_HEIGHT / 2).attr("markerWidth", ARROWHEAD_WIDTH).attr("markerHeight", ARROWHEAD_HEIGHT).attr("orient", "auto").append("polygon").attr(
|
|
204
|
+
"points",
|
|
205
|
+
`0,0 ${ARROWHEAD_WIDTH},${ARROWHEAD_HEIGHT / 2} 0,${ARROWHEAD_HEIGHT}`
|
|
206
|
+
).attr("fill", color);
|
|
200
207
|
}
|
|
201
208
|
const mainG = svg.append("g").attr("transform", `translate(${offsetX}, ${offsetY}) scale(${scale})`);
|
|
202
209
|
if (!fixedTitle && showTitle) {
|
|
@@ -283,7 +290,7 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
283
290
|
const mid = edge.points[Math.floor(edge.points.length / 2)];
|
|
284
291
|
const labelW = measureText(edge.label, sEdgeLabelFontSize) + 10;
|
|
285
292
|
const labelH = sEdgeLabelFontSize + 6;
|
|
286
|
-
edgeG.append("rect").attr("x", mid.x - labelW / 2).attr("y", mid.y - labelH / 2 - 1).attr("width", labelW).attr("height", labelH).attr("rx", 3).attr("fill", palette.bg).attr("opacity",
|
|
293
|
+
edgeG.append("rect").attr("x", mid.x - labelW / 2).attr("y", mid.y - labelH / 2 - 1).attr("width", labelW).attr("height", labelH).attr("rx", 3).attr("fill", palette.bg).attr("opacity", EDGE_LABEL_KNOCKOUT_OPACITY).attr("class", "sitemap-edge-label-bg");
|
|
287
294
|
edgeG.append("text").attr("x", mid.x).attr("y", mid.y + 4).attr("text-anchor", "middle").attr("fill", edgeColor).attr("font-size", sEdgeLabelFontSize).attr("class", "sitemap-edge-label").text(edge.label);
|
|
288
295
|
}
|
|
289
296
|
}
|
|
@@ -449,11 +456,12 @@ function renderLegend(parent, legendGroups, palette, isDark, activeTagGroup, fix
|
|
|
449
456
|
}
|
|
450
457
|
}
|
|
451
458
|
async function renderSitemapForExport(content, theme, palette) {
|
|
452
|
-
const { parseSitemap } = await import("./parser-
|
|
453
|
-
const { layoutSitemap } = await import("./layout-
|
|
454
|
-
const { getPalette } = await import("./palettes-
|
|
459
|
+
const { parseSitemap } = await import("./parser-EPKXJ2RL.js");
|
|
460
|
+
const { layoutSitemap } = await import("./layout-YY6VH5XH.js");
|
|
461
|
+
const { getPalette, DEFAULT_PALETTE_ID } = await import("./palettes-YIPSRYXP.js");
|
|
455
462
|
const isDark = theme === "dark";
|
|
456
|
-
const
|
|
463
|
+
const defaultCfg = getPalette(DEFAULT_PALETTE_ID);
|
|
464
|
+
const effectivePalette = palette ?? (isDark ? defaultCfg.dark : defaultCfg.light);
|
|
457
465
|
const parsed = parseSitemap(content, effectivePalette);
|
|
458
466
|
if (parsed.error || parsed.roots.length === 0) return "";
|
|
459
467
|
const sitemapLayout = layoutSitemap(parsed, void 0, null, void 0, true);
|
|
@@ -500,4 +508,4 @@ export {
|
|
|
500
508
|
renderSitemap,
|
|
501
509
|
renderSitemapForExport
|
|
502
510
|
};
|
|
503
|
-
//# sourceMappingURL=chunk-
|
|
511
|
+
//# sourceMappingURL=chunk-PIWUZFG7.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
tagAttrKey,
|
|
12
12
|
validateTagGroupNames,
|
|
13
13
|
validateTagValues
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-R4YGH7DJ.js";
|
|
15
15
|
import {
|
|
16
16
|
AliasRegistry,
|
|
17
17
|
OPTION_NOCOLON_RE,
|
|
@@ -423,4 +423,4 @@ export {
|
|
|
423
423
|
parseOrg,
|
|
424
424
|
findOrgNodeIdByName
|
|
425
425
|
};
|
|
426
|
-
//# sourceMappingURL=chunk-
|
|
426
|
+
//# sourceMappingURL=chunk-QAPFXLAC.js.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
serializeSvg
|
|
3
|
+
} from "./chunk-LD2JSKU3.js";
|
|
4
|
+
import {
|
|
5
|
+
FONT_FAMILY
|
|
6
|
+
} from "./chunk-ICLB27PZ.js";
|
|
7
|
+
|
|
8
|
+
// src/utils/export-container.ts
|
|
9
|
+
function runInExportContainer(width, height, fn) {
|
|
10
|
+
const container = document.createElement("div");
|
|
11
|
+
container.style.width = `${width}px`;
|
|
12
|
+
container.style.height = `${height}px`;
|
|
13
|
+
container.style.position = "absolute";
|
|
14
|
+
container.style.left = "-9999px";
|
|
15
|
+
document.body.appendChild(container);
|
|
16
|
+
try {
|
|
17
|
+
return fn(container);
|
|
18
|
+
} finally {
|
|
19
|
+
document.body.removeChild(container);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function paintRootBackground(svgEl, theme, bg) {
|
|
23
|
+
if (theme === "transparent") return;
|
|
24
|
+
const vb = (svgEl.getAttribute("viewBox") ?? "").trim().split(/[\s,]+/);
|
|
25
|
+
if (vb.length !== 4) return;
|
|
26
|
+
const [x, y, w, h] = vb.map(Number);
|
|
27
|
+
if (!Number.isFinite(w) || !Number.isFinite(h) || w <= 0 || h <= 0) return;
|
|
28
|
+
const want = bg.trim().toLowerCase();
|
|
29
|
+
for (const rect2 of Array.from(svgEl.querySelectorAll(":scope > rect"))) {
|
|
30
|
+
const fill = (rect2.getAttribute("fill") ?? "").trim().toLowerCase();
|
|
31
|
+
if (fill !== want) continue;
|
|
32
|
+
if (Number(rect2.getAttribute("width")) !== w) continue;
|
|
33
|
+
if (Number(rect2.getAttribute("height")) !== h) continue;
|
|
34
|
+
rect2.remove();
|
|
35
|
+
}
|
|
36
|
+
const rect = svgEl.ownerDocument.createElementNS(
|
|
37
|
+
"http://www.w3.org/2000/svg",
|
|
38
|
+
"rect"
|
|
39
|
+
);
|
|
40
|
+
rect.setAttribute("class", "dgmo-canvas-bg");
|
|
41
|
+
rect.setAttribute("x", String(x));
|
|
42
|
+
rect.setAttribute("y", String(y));
|
|
43
|
+
rect.setAttribute("width", String(w));
|
|
44
|
+
rect.setAttribute("height", String(h));
|
|
45
|
+
rect.setAttribute("fill", bg);
|
|
46
|
+
svgEl.insertBefore(rect, svgEl.firstChild);
|
|
47
|
+
}
|
|
48
|
+
function extractExportSvg(container, theme, palette) {
|
|
49
|
+
const svgEl = container.querySelector("svg");
|
|
50
|
+
if (!svgEl) return "";
|
|
51
|
+
if (theme === "transparent") {
|
|
52
|
+
svgEl.style.background = "none";
|
|
53
|
+
} else if (palette && !svgEl.style.background) {
|
|
54
|
+
svgEl.style.background = palette.bg;
|
|
55
|
+
}
|
|
56
|
+
svgEl.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
57
|
+
svgEl.style.fontFamily = FONT_FAMILY;
|
|
58
|
+
svgEl.querySelectorAll("[data-export-ignore]").forEach((el) => el.remove());
|
|
59
|
+
if (palette) paintRootBackground(svgEl, theme, palette.bg);
|
|
60
|
+
return serializeSvg(svgEl);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export {
|
|
64
|
+
runInExportContainer,
|
|
65
|
+
paintRootBackground,
|
|
66
|
+
extractExportSvg
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=chunk-QFIXL3OK.js.map
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
tagAttrKey,
|
|
21
21
|
validateTagGroupNames,
|
|
22
22
|
validateTagValues
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-R4YGH7DJ.js";
|
|
24
24
|
import {
|
|
25
25
|
AliasRegistry,
|
|
26
26
|
BOXES_AND_LINES_REGISTRY,
|
|
@@ -859,4 +859,4 @@ export {
|
|
|
859
859
|
looksLikeBoxesAndLines,
|
|
860
860
|
parseBoxesAndLines
|
|
861
861
|
};
|
|
862
|
-
//# sourceMappingURL=chunk-
|
|
862
|
+
//# sourceMappingURL=chunk-QVMV4KCA.js.map
|
|
@@ -132,6 +132,7 @@ function parseTagDeclaration(line) {
|
|
|
132
132
|
inlineValues: inlineValues && inlineValues.length > 0 ? inlineValues : void 0
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
+
var UNTAGGED_TAG_COLOR = "#999999";
|
|
135
136
|
function resolveTagColor(metadata, tagGroups, activeGroupName, isContainer) {
|
|
136
137
|
if (!activeGroupName) return void 0;
|
|
137
138
|
const group = tagGroups.find(
|
|
@@ -139,8 +140,8 @@ function resolveTagColor(metadata, tagGroups, activeGroupName, isContainer) {
|
|
|
139
140
|
);
|
|
140
141
|
if (!group) return void 0;
|
|
141
142
|
const metaValue = metadata[tagAttrKey(group.name)] ?? (isContainer ? void 0 : group.defaultValue);
|
|
142
|
-
if (!metaValue) return
|
|
143
|
-
return group.entries.find((e) => e.value.toLowerCase() === metaValue.toLowerCase())?.color ??
|
|
143
|
+
if (!metaValue) return UNTAGGED_TAG_COLOR;
|
|
144
|
+
return group.entries.find((e) => e.value.toLowerCase() === metaValue.toLowerCase())?.color ?? UNTAGGED_TAG_COLOR;
|
|
144
145
|
}
|
|
145
146
|
function validateTagValues(entities, tagGroups, pushWarning, suggestFn) {
|
|
146
147
|
if (tagGroups.length === 0) return;
|
|
@@ -281,6 +282,7 @@ export {
|
|
|
281
282
|
autoTagColorCycle,
|
|
282
283
|
finalizeAutoTagColors,
|
|
283
284
|
isTagBlockHeading,
|
|
285
|
+
UNTAGGED_TAG_COLOR,
|
|
284
286
|
resolveTagColor,
|
|
285
287
|
validateTagValues,
|
|
286
288
|
validateTagGroupNames,
|
|
@@ -290,4 +292,4 @@ export {
|
|
|
290
292
|
activeTagNoMatchMessage,
|
|
291
293
|
matchTagBlockHeading
|
|
292
294
|
};
|
|
293
|
-
//# sourceMappingURL=chunk-
|
|
295
|
+
//# sourceMappingURL=chunk-R4YGH7DJ.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
FONT_FAMILY
|
|
3
|
-
|
|
2
|
+
FONT_FAMILY,
|
|
3
|
+
MONO_FAMILY
|
|
4
|
+
} from "./chunk-ICLB27PZ.js";
|
|
4
5
|
import {
|
|
5
6
|
measureText,
|
|
6
7
|
truncateText
|
|
@@ -10,7 +11,7 @@ import {
|
|
|
10
11
|
} from "./chunk-U7VO6JAA.js";
|
|
11
12
|
import {
|
|
12
13
|
parseDgmoChartType
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7SMVTA7I.js";
|
|
14
15
|
import {
|
|
15
16
|
chartTypes
|
|
16
17
|
} from "./chunk-M5OOAP65.js";
|
|
@@ -25,7 +26,6 @@ function docsLink(source) {
|
|
|
25
26
|
label: `Read the ${chartType} guide \u2197`
|
|
26
27
|
} : { url: `${DOCS_BASE}/`, label: "Browse the DGMO docs \u2197" };
|
|
27
28
|
}
|
|
28
|
-
var MONO_FAMILY = "ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace";
|
|
29
29
|
var W = 660;
|
|
30
30
|
var PAD = 24;
|
|
31
31
|
var CONTENT_W = W - PAD * 2;
|
|
@@ -48,8 +48,8 @@ function renderErrorCard(errors, source, palette, theme) {
|
|
|
48
48
|
let y = PAD + 8;
|
|
49
49
|
parts.push(frownMark(PAD + 14, y + 12, danger));
|
|
50
50
|
parts.push(
|
|
51
|
-
`<text x="${PAD + 38}" y="${y + 11}" fill="${text}" font-family="${FONT_FAMILY}" font-size="16" font-weight="
|
|
52
|
-
`<text x="${W - PAD}" y="${y + 10}" text-anchor="end" fill="${muted}" font-family="${FONT_FAMILY}" font-size="12" font-weight="
|
|
51
|
+
`<text x="${PAD + 38}" y="${y + 11}" fill="${text}" font-family="${FONT_FAMILY}" font-size="16" font-weight="bold">Couldn't render this diagram</text>`,
|
|
52
|
+
`<text x="${W - PAD}" y="${y + 10}" text-anchor="end" fill="${muted}" font-family="${FONT_FAMILY}" font-size="12" font-weight="bold" letter-spacing="0.5">dgmo</text>`
|
|
53
53
|
);
|
|
54
54
|
y += 24;
|
|
55
55
|
const errLabel = errors.length === 1 ? "1 error" : `${errors.length} errors`;
|
|
@@ -69,7 +69,7 @@ function renderErrorCard(errors, source, palette, theme) {
|
|
|
69
69
|
const badgeW = 14 + label.length * 7;
|
|
70
70
|
parts.push(
|
|
71
71
|
`<rect x="${PAD}" y="${y - 13}" width="${badgeW}" height="19" rx="4" fill="${danger}"/>`,
|
|
72
|
-
`<text x="${PAD + badgeW / 2}" y="${y + 1}" text-anchor="middle" fill="${c.bg}" font-family="${FONT_FAMILY}" font-size="11.5" font-weight="
|
|
72
|
+
`<text x="${PAD + badgeW / 2}" y="${y + 1}" text-anchor="middle" fill="${c.bg}" font-family="${FONT_FAMILY}" font-size="11.5" font-weight="bold">${escapeXml(label)}</text>`
|
|
73
73
|
);
|
|
74
74
|
msgX = PAD + badgeW + 12;
|
|
75
75
|
}
|
|
@@ -105,13 +105,13 @@ function renderErrorCard(errors, source, palette, theme) {
|
|
|
105
105
|
);
|
|
106
106
|
}
|
|
107
107
|
rowParts.push(
|
|
108
|
-
`<text x="${PAD + 8}" y="${ry + 1}" fill="${isBad ? danger : muted}" font-family="${MONO_FAMILY}" font-size="${CODE_FS}" font-weight="${isBad ?
|
|
108
|
+
`<text x="${PAD + 8}" y="${ry + 1}" fill="${isBad ? danger : muted}" font-family="${MONO_FAMILY}" font-size="${CODE_FS}" font-weight="${isBad ? "bold" : "normal"}">${escapeXml(`${n}`)}</text>`,
|
|
109
109
|
`<text x="${codeX}" y="${ry + 1}" fill="${text}" font-family="${MONO_FAMILY}" font-size="${CODE_FS}" xml:space="preserve">${escapeXml(codeText)}</text>`
|
|
110
110
|
);
|
|
111
111
|
if (isBad && hasCaret) {
|
|
112
112
|
const caretX = codeX + (e.column - 1) * CODE_FS * MONO_CH;
|
|
113
113
|
rowParts.push(
|
|
114
|
-
`<text x="${caretX}" y="${ry + 15}" fill="${danger}" font-family="${MONO_FAMILY}" font-size="${CODE_FS}" font-weight="
|
|
114
|
+
`<text x="${caretX}" y="${ry + 15}" fill="${danger}" font-family="${MONO_FAMILY}" font-size="${CODE_FS}" font-weight="bold">^</text>`
|
|
115
115
|
);
|
|
116
116
|
ry += 14;
|
|
117
117
|
}
|
|
@@ -142,12 +142,12 @@ function renderErrorCard(errors, source, palette, theme) {
|
|
|
142
142
|
const iconSize = 18;
|
|
143
143
|
const linkColor = c.colors.blue ?? c.text;
|
|
144
144
|
parts.push(
|
|
145
|
-
`<a href="${escapeXml(editUrl)}" target="_blank" rel="noopener noreferrer">` + diagrammoIcon(PAD, y - 14, iconSize) + `<text x="${PAD + iconSize + 8}" y="${y}" fill="${linkColor}" font-family="${FONT_FAMILY}" font-size="12.5" font-weight="
|
|
145
|
+
`<a href="${escapeXml(editUrl)}" target="_blank" rel="noopener noreferrer">` + diagrammoIcon(PAD, y - 14, iconSize) + `<text x="${PAD + iconSize + 8}" y="${y}" fill="${linkColor}" font-family="${FONT_FAMILY}" font-size="12.5" font-weight="bold" text-decoration="underline">Edit & fix this diagram at online.diagrammo.app \u2197</text></a>`
|
|
146
146
|
);
|
|
147
147
|
y += 22;
|
|
148
148
|
const docs = docsLink(source);
|
|
149
149
|
parts.push(
|
|
150
|
-
`<a href="${escapeXml(docs.url)}" target="_blank" rel="noopener noreferrer">` + docIcon(PAD, y - 14, iconSize, linkColor) + `<text x="${PAD + iconSize + 8}" y="${y}" fill="${linkColor}" font-family="${FONT_FAMILY}" font-size="12.5" font-weight="
|
|
150
|
+
`<a href="${escapeXml(docs.url)}" target="_blank" rel="noopener noreferrer">` + docIcon(PAD, y - 14, iconSize, linkColor) + `<text x="${PAD + iconSize + 8}" y="${y}" fill="${linkColor}" font-family="${FONT_FAMILY}" font-size="12.5" font-weight="bold" text-decoration="underline">${escapeXml(docs.label)}</text></a>`
|
|
151
151
|
);
|
|
152
152
|
y += 8;
|
|
153
153
|
const height = Math.round(y + PAD - 14);
|
|
@@ -201,7 +201,6 @@ function escapeXml(s) {
|
|
|
201
201
|
|
|
202
202
|
export {
|
|
203
203
|
docsLink,
|
|
204
|
-
MONO_FAMILY,
|
|
205
204
|
renderErrorCard
|
|
206
205
|
};
|
|
207
|
-
//# sourceMappingURL=chunk-
|
|
206
|
+
//# sourceMappingURL=chunk-RC3FM3FE.js.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
tagAttrKey,
|
|
17
17
|
validateTagGroupNames,
|
|
18
18
|
validateTagValues
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-R4YGH7DJ.js";
|
|
20
20
|
import {
|
|
21
21
|
EVENT_LINE_REGISTRY,
|
|
22
22
|
extractColor,
|
|
@@ -703,4 +703,4 @@ export {
|
|
|
703
703
|
EVENT_LINE_DIAGNOSTICS,
|
|
704
704
|
parseEventLine
|
|
705
705
|
};
|
|
706
|
-
//# sourceMappingURL=chunk-
|
|
706
|
+
//# sourceMappingURL=chunk-RC6GGF6X.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-WTTIODDV.js";
|
|
5
5
|
import {
|
|
6
6
|
buildPlacedNotes
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LMWXBFLA.js";
|
|
8
8
|
import {
|
|
9
9
|
noteCanvasShift
|
|
10
10
|
} from "./chunk-6EK55ART.js";
|
|
@@ -312,7 +312,7 @@ function computeNodeSize(node, reserveValueRow) {
|
|
|
312
312
|
return { width: w, height: Math.max(NODE_HEIGHT, totalHeight) };
|
|
313
313
|
}
|
|
314
314
|
async function layoutBoxesAndLines(parsed, collapseInfo, layoutOptions) {
|
|
315
|
-
const { layoutBoxesAndLinesSearch } = await import("./layout-search-
|
|
315
|
+
const { layoutBoxesAndLinesSearch } = await import("./layout-search-TSV4FURP.js");
|
|
316
316
|
const searchOpts = {
|
|
317
317
|
...layoutOptions?.hideDescriptions !== void 0 && {
|
|
318
318
|
hideDescriptions: layoutOptions.hideDescriptions
|
|
@@ -468,4 +468,4 @@ export {
|
|
|
468
468
|
computeNodeSize,
|
|
469
469
|
layoutBoxesAndLines
|
|
470
470
|
};
|
|
471
|
-
//# sourceMappingURL=chunk-
|
|
471
|
+
//# sourceMappingURL=chunk-RHZZVIGA.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mix
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YVLTNNME.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveColor
|
|
6
6
|
} from "./chunk-XOGQY4EC.js";
|
|
@@ -32,4 +32,4 @@ function buildSwatches(palette, muted) {
|
|
|
32
32
|
export {
|
|
33
33
|
buildSwatches
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-RIXWLFB4.js.map
|
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
wrapDescriptionLines
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WMIKC5XO.js";
|
|
4
4
|
import {
|
|
5
5
|
renderInlineText
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FWNJDD4U.js";
|
|
7
7
|
import {
|
|
8
8
|
ScaleContext
|
|
9
9
|
} from "./chunk-24YPR5EH.js";
|
|
10
|
+
import {
|
|
11
|
+
ARROWHEAD_HEIGHT,
|
|
12
|
+
ARROWHEAD_WIDTH
|
|
13
|
+
} from "./chunk-IIEI7VK5.js";
|
|
10
14
|
import {
|
|
11
15
|
TITLE_FONT_SIZE,
|
|
12
16
|
TITLE_FONT_WEIGHT,
|
|
13
17
|
TITLE_Y
|
|
14
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VSPNH7LC.js";
|
|
15
19
|
import {
|
|
16
20
|
renderIntegratedLegend
|
|
17
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-67I3HFSF.js";
|
|
18
22
|
import {
|
|
19
23
|
FONT_FAMILY
|
|
20
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ICLB27PZ.js";
|
|
21
25
|
import {
|
|
22
26
|
LEGEND_HEIGHT
|
|
23
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-MFK7LF66.js";
|
|
24
28
|
import {
|
|
25
29
|
measureText,
|
|
26
30
|
wrapTextToWidth
|
|
@@ -31,7 +35,7 @@ import {
|
|
|
31
35
|
import {
|
|
32
36
|
contrastText,
|
|
33
37
|
shapeFill
|
|
34
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-YVLTNNME.js";
|
|
35
39
|
import {
|
|
36
40
|
resolveColor
|
|
37
41
|
} from "./chunk-XOGQY4EC.js";
|
|
@@ -854,7 +858,7 @@ function renderCycle(container, parsed, palette, isDark, onClickItem, exportDims
|
|
|
854
858
|
const labelFont = scaledCircleLabelFont;
|
|
855
859
|
const blockH = labelFont + 4 + wrappedDesc.length * scaledDescLineH;
|
|
856
860
|
const startY = ln.y - blockH / 2 + labelFont;
|
|
857
|
-
const labelText = nodeG.append("text").attr("x", ln.x).attr("y", startY).attr("text-anchor", "middle").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", labelFont).attr("font-weight", "
|
|
861
|
+
const labelText = nodeG.append("text").attr("x", ln.x).attr("y", startY).attr("text-anchor", "middle").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", labelFont).attr("font-weight", "bold");
|
|
858
862
|
renderInlineText(labelText, node.label, palette, labelFont);
|
|
859
863
|
let descY = startY + scaledDescLineH + 4;
|
|
860
864
|
wrappedDesc.forEach((line) => {
|
|
@@ -864,7 +868,7 @@ function renderCycle(container, parsed, palette, isDark, onClickItem, exportDims
|
|
|
864
868
|
});
|
|
865
869
|
} else {
|
|
866
870
|
const labelFont = scaledCircleLabelFont;
|
|
867
|
-
const labelText = nodeG.append("text").attr("x", ln.x).attr("y", ln.y + labelFont / 3).attr("text-anchor", "middle").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", labelFont).attr("font-weight", "
|
|
871
|
+
const labelText = nodeG.append("text").attr("x", ln.x).attr("y", ln.y + labelFont / 3).attr("text-anchor", "middle").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", labelFont).attr("font-weight", "bold");
|
|
868
872
|
renderInlineText(labelText, node.label, palette, labelFont);
|
|
869
873
|
}
|
|
870
874
|
} else {
|
|
@@ -872,7 +876,7 @@ function renderCycle(container, parsed, palette, isDark, onClickItem, exportDims
|
|
|
872
876
|
nodeG.append("rect").attr("x", ln.x - nodeW / 2).attr("y", ln.y - nodeH / 2).attr("width", nodeW).attr("height", nodeH).attr("rx", rx).attr("ry", rx).attr("fill", fillColor).attr("stroke", solidColor).attr("stroke-width", 2);
|
|
873
877
|
if (hasDesc) {
|
|
874
878
|
const headerCenterY = ln.y - nodeH / 2 + HEADER_H / 2;
|
|
875
|
-
const labelText = nodeG.append("text").attr("x", ln.x).attr("y", headerCenterY + scaledNodeFont / 3).attr("text-anchor", "middle").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", scaledNodeFont).attr("font-weight", "
|
|
879
|
+
const labelText = nodeG.append("text").attr("x", ln.x).attr("y", headerCenterY + scaledNodeFont / 3).attr("text-anchor", "middle").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", scaledNodeFont).attr("font-weight", "bold");
|
|
876
880
|
renderInlineText(labelText, node.label, palette, scaledNodeFont);
|
|
877
881
|
const sepY = ln.y - nodeH / 2 + HEADER_H;
|
|
878
882
|
nodeG.append("line").attr("x1", ln.x - nodeW / 2).attr("y1", sepY).attr("x2", ln.x + nodeW / 2).attr("y2", sepY).attr("stroke", fillMode === "solid" ? descColor : solidColor).attr("stroke-opacity", 0.3).attr("stroke-width", 1);
|
|
@@ -893,7 +897,7 @@ function renderCycle(container, parsed, palette, isDark, onClickItem, exportDims
|
|
|
893
897
|
}
|
|
894
898
|
});
|
|
895
899
|
} else {
|
|
896
|
-
const labelText = nodeG.append("text").attr("x", ln.x).attr("y", ln.y + scaledNodeFont / 3).attr("text-anchor", "middle").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", scaledNodeFont).attr("font-weight", "
|
|
900
|
+
const labelText = nodeG.append("text").attr("x", ln.x).attr("y", ln.y + scaledNodeFont / 3).attr("text-anchor", "middle").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", scaledNodeFont).attr("font-weight", "bold");
|
|
897
901
|
renderInlineText(labelText, node.label, palette, scaledNodeFont);
|
|
898
902
|
}
|
|
899
903
|
}
|
|
@@ -933,7 +937,7 @@ function renderCycle(container, parsed, palette, isDark, onClickItem, exportDims
|
|
|
933
937
|
edgeG.append("rect").attr("x", bgX).attr("y", bgY).attr("width", bgW).attr("height", bgH).attr("rx", 3).attr("fill", palette.bg).attr("fill-opacity", 0.85);
|
|
934
938
|
let textY = le.labelY;
|
|
935
939
|
for (const line of labelLines) {
|
|
936
|
-
const labelText = edgeG.append("text").attr("x", le.labelX).attr("y", textY).attr("text-anchor", anchor).attr("fill", palette.text).attr("font-family", FONT_FAMILY).attr("font-size", scaledEdgeLabelFont).attr("font-weight", "
|
|
940
|
+
const labelText = edgeG.append("text").attr("x", le.labelX).attr("y", textY).attr("text-anchor", anchor).attr("fill", palette.text).attr("font-family", FONT_FAMILY).attr("font-size", scaledEdgeLabelFont).attr("font-weight", "bold");
|
|
937
941
|
renderInlineText(labelText, line, palette, scaledEdgeLabelFont);
|
|
938
942
|
textY += scaledEdgeLineH;
|
|
939
943
|
}
|
|
@@ -976,7 +980,7 @@ function arrowMarkerId(color, strokeWidth) {
|
|
|
976
980
|
function ensureArrowMarker(defs, color, strokeWidth) {
|
|
977
981
|
const id = arrowMarkerId(color, strokeWidth);
|
|
978
982
|
const mw = arrowHeadLength(strokeWidth) / strokeWidth;
|
|
979
|
-
const mh = Math.max(1.5, mw *
|
|
983
|
+
const mh = Math.max(1.5, mw * (ARROWHEAD_HEIGHT / ARROWHEAD_WIDTH));
|
|
980
984
|
defs.append("marker").attr("id", id).attr("viewBox", `0 0 ${mw} ${mh}`).attr("refX", mw * 0.1).attr("refY", mh / 2).attr("markerWidth", mw).attr("markerHeight", mh).attr("orient", "auto").append("polygon").attr("points", `0,0 ${mw},${mh / 2} 0,${mh}`).attr("fill", color);
|
|
981
985
|
}
|
|
982
986
|
|
|
@@ -985,4 +989,4 @@ export {
|
|
|
985
989
|
renderCycle,
|
|
986
990
|
renderCycleForExport
|
|
987
991
|
};
|
|
988
|
-
//# sourceMappingURL=chunk-
|
|
992
|
+
//# sourceMappingURL=chunk-RUNI4OXP.js.map
|