@kong-ui-public/documentation 1.5.77 → 1.6.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/{arc-DZdQjcG8-C_2Dx6GQ.js → arc-DZdQjcG8-CduayE88.js} +2 -2
- package/dist/{architectureDiagram-3BPJPVTR-By_DXDyu-DTj86bUZ.js → architectureDiagram-3BPJPVTR-By_DXDyu-U3MSLbOU.js} +1506 -1513
- package/dist/blockDiagram-GPEHLZMM-9Cp9Hbl7-CKP-SiVG.js +3268 -0
- package/dist/{c4Diagram-AAUBKEIU-ftdwlfdB-CYiERTWJ.js → c4Diagram-AAUBKEIU-ftdwlfdB-D3A61SdV.js} +11 -12
- package/dist/{channel-DM9j7IFL-CjNPz4Hd.js → channel-DM9j7IFL-DxqBUxfY.js} +1 -1
- package/dist/{chunk-2J33WTMH-CBbjVzWb-BAAd-TK5.js → chunk-2J33WTMH-CBbjVzWb-0og4LHQ-.js} +7 -8
- package/dist/chunk-4BX2VUAB-C_NnimAy--QQ0Db2V.js +8 -0
- package/dist/{chunk-55IACEB6-DZn1aNO0-_bs5ibIB.js → chunk-55IACEB6-DZn1aNO0-A3zOZ7dT.js} +1 -1
- package/dist/{chunk-727SXJPM-B2_6_WLv-CzbzsbtK.js → chunk-727SXJPM-B2_6_WLv-Bs3CxHaX.js} +548 -549
- package/dist/{chunk-AQP2D5EJ-DEAEiJjW-BPr5JvkB.js → chunk-AQP2D5EJ-DEAEiJjW-DTbwZT8N.js} +446 -458
- package/dist/{chunk-FMBD7UC4-D_tZ4Dxg-BUygZnCT.js → chunk-FMBD7UC4-D_tZ4Dxg-DwjoPGUH.js} +1 -1
- package/dist/{chunk-ND2GUHAM-Duw3k8MU-Dr8SD23L.js → chunk-ND2GUHAM-Duw3k8MU-HmrdHLJ9.js} +1 -1
- package/dist/{chunk-QZHKN3VN-DN6nBdn0-DxWE5zsM.js → chunk-QZHKN3VN-DN6nBdn0-BvQOETVz.js} +1 -1
- package/dist/classDiagram-4FO5ZUOK-Du5qFrfN-BqXc0etQ.js +17 -0
- package/dist/classDiagram-v2-Q7XG4LA2-DM6zutfc-BqXc0etQ.js +17 -0
- package/dist/{cose-bilkent-S5V4N54A-0ZumbVgj-BKcFQWbE.js → cose-bilkent-S5V4N54A-0ZumbVgj-0z7CQbIH.js} +465 -465
- package/dist/{cytoscape.esm-BDIiOYYO-BbddfVIJ.js → cytoscape.esm-BDIiOYYO-C1jMBhD8.js} +356 -371
- package/dist/dagre-BM42HDAG-qMWMsyLb-DGMrq3i3.js +288 -0
- package/dist/{dagre-DJxg_nfI-BzVw7cNP.js → dagre-DJxg_nfI-hVOVexz-.js} +9 -9
- package/dist/{diagram-2AECGRRQ-B2gF_dHe-DCRSlKG-.js → diagram-2AECGRRQ-B2gF_dHe-Bv_EpxRz.js} +10 -14
- package/dist/{diagram-5GNKFQAL-DJ9WwRrD-DtSWJY6-.js → diagram-5GNKFQAL-DJ9WwRrD-WVvm0Icu.js} +4 -4
- package/dist/{diagram-KO2AKTUF-RfkqD-VW-ZR9mxccc.js → diagram-KO2AKTUF-RfkqD-VW-yyAds1Qq.js} +153 -156
- package/dist/{diagram-LMA3HP47-Ct7s9hIt-DXtPBRn4.js → diagram-LMA3HP47-Ct7s9hIt-Dy6f9BAO.js} +21 -22
- package/dist/{diagram-OG6HWLK6-BSYJ2CoI-DX1BfXw6.js → diagram-OG6HWLK6-BSYJ2CoI-ckmfat-L.js} +79 -81
- package/dist/documentation.es.js +1 -1
- package/dist/documentation.umd.js +374 -374
- package/dist/{erDiagram-TEJ5UH35-BudwiSYX-BPA5-1u6.js → erDiagram-TEJ5UH35-BudwiSYX-bVzp1Kjr.js} +134 -135
- package/dist/{flowDiagram-I6XJVG4X-B23Smlxp-Cb24VZnb.js → flowDiagram-I6XJVG4X-B23Smlxp-ClHvdCdJ.js} +842 -849
- package/dist/{ganttDiagram-6RSMTGT7-C-i89z_P-DEdTFlTH.js → ganttDiagram-6RSMTGT7-C-i89z_P-t5UAyRM5.js} +46 -46
- package/dist/gitGraphDiagram-PVQCEYII-DpVfXnUD-Cg3smOdz.js +734 -0
- package/dist/{graphlib-D2YdGpuK-CM8PX5pf.js → graphlib-D2YdGpuK-CnQPmzkS.js} +17 -17
- package/dist/{index-Dpyqhws4.js → index-DfVKdDwj.js} +16258 -16515
- package/dist/{infoDiagram-5YYISTIA-CDUwzFql-BsbTK2Me.js → infoDiagram-5YYISTIA-CDUwzFql-Bmthmcp4.js} +2 -2
- package/dist/{ishikawaDiagram-YF4QCWOH-MfYdx0rK-DsWP0O6d.js → ishikawaDiagram-YF4QCWOH-MfYdx0rK-cbltssua.js} +137 -138
- package/dist/{journeyDiagram-JHISSGLW-C_udOPtJ-BkIf9B4Q.js → journeyDiagram-JHISSGLW-C_udOPtJ-BjAvgSAR.js} +13 -13
- package/dist/{kanban-definition-UN3LZRKU-C1Su-UOY-6sw-wDwK.js → kanban-definition-UN3LZRKU-C1Su-UOY-DZ93dsWZ.js} +334 -336
- package/dist/{katex-D7tFlpqA-B7yKriH4.js → katex-D7tFlpqA-BOSQxXe1.js} +254 -256
- package/dist/{linear-1MXhYum8-CfR5ywK4.js → linear-1MXhYum8-9C1jno9G.js} +5 -5
- package/dist/{mindmap-definition-RKZ34NQL-MuSV765K-Cv2rDIFS.js → mindmap-definition-RKZ34NQL-MuSV765K-Kub1iXFv.js} +94 -97
- package/dist/{ordinal-D9ksOc8y-CrGveXkB.js → ordinal-D9ksOc8y-2hZwLyEk.js} +1 -1
- package/dist/{pieDiagram-4H26LBE5-TgFp7J6_-C8m2xJbj.js → pieDiagram-4H26LBE5-TgFp7J6_-i6NxP3Xz.js} +43 -44
- package/dist/{quadrantDiagram-W4KKPZXB-DKPne3o_-D0Tfl8NQ.js → quadrantDiagram-W4KKPZXB-DKPne3o_-DXLHqRuR.js} +351 -353
- package/dist/{requirementDiagram-4Y6WPE33-vh8uUAp_-C5zLx-_o.js → requirementDiagram-4Y6WPE33-vh8uUAp_-CHtsISxP.js} +384 -386
- package/dist/{sankeyDiagram-5OEKKPKP-Cgs6W_El-DBrv4QL_.js → sankeyDiagram-5OEKKPKP-Cgs6W_El-D7GZyd8n.js} +178 -178
- package/dist/{sequenceDiagram-3UESZ5HK-C5F57Dkt-D6DqZiJP.js → sequenceDiagram-3UESZ5HK-C5F57Dkt-BW1Hb7UW.js} +643 -653
- package/dist/{stateDiagram-AJRCARHV-09dUKG6Y-9QhAIhCk.js → stateDiagram-AJRCARHV-09dUKG6Y-Dm2a1vNu.js} +5 -5
- package/dist/stateDiagram-v2-BHNVJYJU-CWqmRt12-DbWzZ-j-.js +16 -0
- package/dist/style.css +1 -1
- package/dist/timeline-definition-PNZ67QCA-CCndyx0V-B5CT96H-.js +1095 -0
- package/dist/{vennDiagram-CIIHVFJN-DQfKxM3L-086u82L3.js → vennDiagram-CIIHVFJN-DQfKxM3L-qUaKEl7l.js} +596 -603
- package/dist/{wardley-L42UT6IY-BjAkE_cs-li1xYed9.js → wardley-L42UT6IY-BjAkE_cs-C-giFqos.js} +5760 -5809
- package/dist/wardleyDiagram-YWT4CUSO-Bf9L2NsL-DXPF2Ee9.js +639 -0
- package/dist/{xychartDiagram-2RQKCTM6-ChNH3q1U--vbcTXH5.js → xychartDiagram-2RQKCTM6-ChNH3q1U-a59DsJDA.js} +10 -10
- package/package.json +4 -4
- package/dist/blockDiagram-GPEHLZMM-9Cp9Hbl7-CSQRWfog.js +0 -3278
- package/dist/chunk-4BX2VUAB-C_NnimAy-B-8x_g6K.js +0 -9
- package/dist/classDiagram-4FO5ZUOK-Du5qFrfN-DLmqgbj1.js +0 -17
- package/dist/classDiagram-v2-Q7XG4LA2-DM6zutfc-DLmqgbj1.js +0 -17
- package/dist/dagre-BM42HDAG-qMWMsyLb-BzK2-5zM.js +0 -291
- package/dist/gitGraphDiagram-PVQCEYII-DpVfXnUD-BtfdBLxW.js +0 -747
- package/dist/stateDiagram-v2-BHNVJYJU-CWqmRt12-Br5eF-5b.js +0 -16
- package/dist/timeline-definition-PNZ67QCA-CCndyx0V-CkhwKYjQ.js +0 -1106
- package/dist/wardleyDiagram-YWT4CUSO-Bf9L2NsL-CCMCDU5F.js +0 -647
package/dist/{diagram-OG6HWLK6-BSYJ2CoI-DX1BfXw6.js → diagram-OG6HWLK6-BSYJ2CoI-ckmfat-L.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as b, s as K, o as J, ah as at, a0 as rt, A as lt, g as U, bc as P, q, U as nt, W as it, f as st, i as ot, K as ct, G as dt, F as ht, bd as pt, H as ut } from "./index-
|
|
2
|
-
import { s as O } from "./ordinal-D9ksOc8y-
|
|
1
|
+
import { p as b, s as K, o as J, ah as at, a0 as rt, A as lt, g as U, bc as P, q, U as nt, W as it, f as st, i as ot, K as ct, G as dt, F as ht, bd as pt, H as ut } from "./index-DfVKdDwj.js";
|
|
2
|
+
import { s as O } from "./ordinal-D9ksOc8y-2hZwLyEk.js";
|
|
3
3
|
import { v as I } from "./defaultLocale-mtMQ0U8A-D6jPixjH.js";
|
|
4
|
-
import { t as ft } from "./chunk-4BX2VUAB-C_NnimAy
|
|
5
|
-
import { r as mt } from "./wardley-L42UT6IY-BjAkE_cs-
|
|
6
|
-
import { r as yt } from "./chunk-2J33WTMH-CBbjVzWb-
|
|
4
|
+
import { t as ft } from "./chunk-4BX2VUAB-C_NnimAy--QQ0Db2V.js";
|
|
5
|
+
import { r as mt } from "./wardley-L42UT6IY-BjAkE_cs-C-giFqos.js";
|
|
6
|
+
import { r as yt } from "./chunk-2J33WTMH-CBbjVzWb-0og4LHQ-.js";
|
|
7
7
|
function gt(e) {
|
|
8
8
|
var a = 0, r = e.children, l = r && r.length;
|
|
9
9
|
if (!l) a = 1;
|
|
@@ -19,11 +19,11 @@ function St(e, a) {
|
|
|
19
19
|
return this;
|
|
20
20
|
}
|
|
21
21
|
function vt(e, a) {
|
|
22
|
-
for (var r = this, l = [r], s,
|
|
22
|
+
for (var r = this, l = [r], s, i, c = -1; r = l.pop(); ) if (e.call(a, r, ++c, this), s = r.children) for (i = s.length - 1; i >= 0; --i) l.push(s[i]);
|
|
23
23
|
return this;
|
|
24
24
|
}
|
|
25
25
|
function $t(e, a) {
|
|
26
|
-
for (var r = this, l = [r], s = [],
|
|
26
|
+
for (var r = this, l = [r], s = [], i, c, h, f = -1; r = l.pop(); ) if (s.push(r), i = r.children) for (c = 0, h = i.length; c < h; ++c) l.push(i[c]);
|
|
27
27
|
for (; r = s.pop(); ) e.call(a, r, ++f, this);
|
|
28
28
|
return this;
|
|
29
29
|
}
|
|
@@ -76,14 +76,14 @@ function Ft() {
|
|
|
76
76
|
}), a;
|
|
77
77
|
}
|
|
78
78
|
function* At() {
|
|
79
|
-
var e = this, a, r = [e], l, s,
|
|
79
|
+
var e = this, a, r = [e], l, s, i;
|
|
80
80
|
do
|
|
81
|
-
for (a = r.reverse(), r = []; e = a.pop(); ) if (yield e, l = e.children) for (s = 0,
|
|
81
|
+
for (a = r.reverse(), r = []; e = a.pop(); ) if (yield e, l = e.children) for (s = 0, i = l.length; s < i; ++s) r.push(l[s]);
|
|
82
82
|
while (r.length);
|
|
83
83
|
}
|
|
84
84
|
function Q(e, a) {
|
|
85
85
|
e instanceof Map ? (e = [void 0, e], a === void 0 && (a = Bt)) : a === void 0 && (a = Nt);
|
|
86
|
-
for (var r = new j(e), l, s = [r],
|
|
86
|
+
for (var r = new j(e), l, s = [r], i, c, h, f; l = s.pop(); ) if ((c = a(l.data)) && (f = (c = Array.from(c)).length)) for (l.children = c, h = f - 1; h >= 0; --h) s.push(i = c[h] = new j(c[h])), i.parent = l, i.depth = l.depth + 1;
|
|
87
87
|
return r.eachBefore(Dt);
|
|
88
88
|
}
|
|
89
89
|
function Pt() {
|
|
@@ -140,19 +140,19 @@ function Rt(e) {
|
|
|
140
140
|
e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
|
|
141
141
|
}
|
|
142
142
|
function Vt(e, a, r, l, s) {
|
|
143
|
-
for (var
|
|
143
|
+
for (var i = e.children, c, h = -1, f = i.length, o = e.value && (l - a) / e.value; ++h < f; ) c = i[h], c.y0 = r, c.y1 = s, c.x0 = a, c.x1 = a += c.value * o;
|
|
144
144
|
}
|
|
145
145
|
function Et(e, a, r, l, s) {
|
|
146
|
-
for (var
|
|
146
|
+
for (var i = e.children, c, h = -1, f = i.length, o = e.value && (s - r) / e.value; ++h < f; ) c = i[h], c.x0 = a, c.x1 = l, c.y0 = r, c.y1 = r += c.value * o;
|
|
147
147
|
}
|
|
148
148
|
var Ht = (1 + Math.sqrt(5)) / 2;
|
|
149
|
-
function Gt(e, a, r, l, s,
|
|
150
|
-
for (var c = [], h = a.children, f, o, p = 0, v = 0,
|
|
151
|
-
S = s - r, g =
|
|
149
|
+
function Gt(e, a, r, l, s, i) {
|
|
150
|
+
for (var c = [], h = a.children, f, o, p = 0, v = 0, n = h.length, S, g, x = a.value, u, y, z, T, F, W, M; p < n; ) {
|
|
151
|
+
S = s - r, g = i - l;
|
|
152
152
|
do
|
|
153
153
|
u = h[v++].value;
|
|
154
|
-
while (!u && v <
|
|
155
|
-
for (y = z = u, W = Math.max(g / S, S / g) / (x * e), M = u * u * W, F = Math.max(z / M, M / y); v <
|
|
154
|
+
while (!u && v < n);
|
|
155
|
+
for (y = z = u, W = Math.max(g / S, S / g) / (x * e), M = u * u * W, F = Math.max(z / M, M / y); v < n; ++v) {
|
|
156
156
|
if (u += o = h[v].value, o < y && (y = o), o > z && (z = o), M = u * u * W, T = Math.max(z / M, M / y), T > F) {
|
|
157
157
|
u -= o;
|
|
158
158
|
break;
|
|
@@ -163,47 +163,47 @@ function Gt(e, a, r, l, s, n) {
|
|
|
163
163
|
value: u,
|
|
164
164
|
dice: S < g,
|
|
165
165
|
children: h.slice(p, v)
|
|
166
|
-
}), f.dice ? Vt(f, r, l, s, x ? l += g * u / x :
|
|
166
|
+
}), f.dice ? Vt(f, r, l, s, x ? l += g * u / x : i) : Et(f, r, l, x ? r += S * u / x : s, i), x -= u, p = v;
|
|
167
167
|
}
|
|
168
168
|
return c;
|
|
169
169
|
}
|
|
170
|
-
var qt = function e(a) {
|
|
171
|
-
function r(l, s,
|
|
172
|
-
Gt(a, l, s,
|
|
170
|
+
var qt = (function e(a) {
|
|
171
|
+
function r(l, s, i, c, h) {
|
|
172
|
+
Gt(a, l, s, i, c, h);
|
|
173
173
|
}
|
|
174
174
|
return r.ratio = function(l) {
|
|
175
175
|
return e((l = +l) > 1 ? l : 1);
|
|
176
176
|
}, r;
|
|
177
|
-
}(Ht);
|
|
177
|
+
})(Ht);
|
|
178
178
|
function jt() {
|
|
179
|
-
var e = qt, a = !1, r = 1, l = 1, s = [0],
|
|
180
|
-
function p(
|
|
181
|
-
return
|
|
179
|
+
var e = qt, a = !1, r = 1, l = 1, s = [0], i = R, c = R, h = R, f = R, o = R;
|
|
180
|
+
function p(n) {
|
|
181
|
+
return n.x0 = n.y0 = 0, n.x1 = r, n.y1 = l, n.eachBefore(v), s = [0], a && n.eachBefore(Rt), n;
|
|
182
182
|
}
|
|
183
|
-
function v(
|
|
184
|
-
var S = s[
|
|
185
|
-
u < g && (g = u = (g + u) / 2), y < x && (x = y = (x + y) / 2),
|
|
183
|
+
function v(n) {
|
|
184
|
+
var S = s[n.depth], g = n.x0 + S, x = n.y0 + S, u = n.x1 - S, y = n.y1 - S;
|
|
185
|
+
u < g && (g = u = (g + u) / 2), y < x && (x = y = (x + y) / 2), n.x0 = g, n.y0 = x, n.x1 = u, n.y1 = y, n.children && (S = s[n.depth + 1] = i(n) / 2, g += o(n) - S, x += c(n) - S, u -= h(n) - S, y -= f(n) - S, u < g && (g = u = (g + u) / 2), y < x && (x = y = (x + y) / 2), e(n, g, x, u, y));
|
|
186
186
|
}
|
|
187
|
-
return p.round = function(
|
|
188
|
-
return arguments.length ? (a = !!
|
|
189
|
-
}, p.size = function(
|
|
190
|
-
return arguments.length ? (r = +
|
|
191
|
-
}, p.tile = function(
|
|
192
|
-
return arguments.length ? (e = It(
|
|
193
|
-
}, p.padding = function(
|
|
194
|
-
return arguments.length ? p.paddingInner(
|
|
195
|
-
}, p.paddingInner = function(
|
|
196
|
-
return arguments.length ? (
|
|
197
|
-
}, p.paddingOuter = function(
|
|
198
|
-
return arguments.length ? p.paddingTop(
|
|
199
|
-
}, p.paddingTop = function(
|
|
200
|
-
return arguments.length ? (c = typeof
|
|
201
|
-
}, p.paddingRight = function(
|
|
202
|
-
return arguments.length ? (h = typeof
|
|
203
|
-
}, p.paddingBottom = function(
|
|
204
|
-
return arguments.length ? (f = typeof
|
|
205
|
-
}, p.paddingLeft = function(
|
|
206
|
-
return arguments.length ? (o = typeof
|
|
187
|
+
return p.round = function(n) {
|
|
188
|
+
return arguments.length ? (a = !!n, p) : a;
|
|
189
|
+
}, p.size = function(n) {
|
|
190
|
+
return arguments.length ? (r = +n[0], l = +n[1], p) : [r, l];
|
|
191
|
+
}, p.tile = function(n) {
|
|
192
|
+
return arguments.length ? (e = It(n), p) : e;
|
|
193
|
+
}, p.padding = function(n) {
|
|
194
|
+
return arguments.length ? p.paddingInner(n).paddingOuter(n) : p.paddingInner();
|
|
195
|
+
}, p.paddingInner = function(n) {
|
|
196
|
+
return arguments.length ? (i = typeof n == "function" ? n : V(+n), p) : i;
|
|
197
|
+
}, p.paddingOuter = function(n) {
|
|
198
|
+
return arguments.length ? p.paddingTop(n).paddingRight(n).paddingBottom(n).paddingLeft(n) : p.paddingTop();
|
|
199
|
+
}, p.paddingTop = function(n) {
|
|
200
|
+
return arguments.length ? (c = typeof n == "function" ? n : V(+n), p) : c;
|
|
201
|
+
}, p.paddingRight = function(n) {
|
|
202
|
+
return arguments.length ? (h = typeof n == "function" ? n : V(+n), p) : h;
|
|
203
|
+
}, p.paddingBottom = function(n) {
|
|
204
|
+
return arguments.length ? (f = typeof n == "function" ? n : V(+n), p) : f;
|
|
205
|
+
}, p.paddingLeft = function(n) {
|
|
206
|
+
return arguments.length ? (o = typeof n == "function" ? n : V(+n), p) : o;
|
|
207
207
|
}, p;
|
|
208
208
|
}
|
|
209
209
|
var B, Y = (B = class {
|
|
@@ -221,7 +221,7 @@ var B, Y = (B = class {
|
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
223
|
addNode(a, r) {
|
|
224
|
-
this.nodes.push(a), this.levels.set(a, r), r === 0 && (this.outerNodes.push(a), this.root
|
|
224
|
+
this.nodes.push(a), this.levels.set(a, r), r === 0 && (this.outerNodes.push(a), this.root ??= a);
|
|
225
225
|
}
|
|
226
226
|
getRoot() {
|
|
227
227
|
return {
|
|
@@ -235,16 +235,15 @@ var B, Y = (B = class {
|
|
|
235
235
|
styles: [],
|
|
236
236
|
textStyles: []
|
|
237
237
|
}, s = r.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
|
|
238
|
-
s && s.forEach((
|
|
239
|
-
pt(
|
|
238
|
+
s && s.forEach((i) => {
|
|
239
|
+
pt(i) && (l?.textStyles ? l.textStyles.push(i) : l.textStyles = [i]), l?.styles ? l.styles.push(i) : l.styles = [i];
|
|
240
240
|
}), this.classes.set(a, l);
|
|
241
241
|
}
|
|
242
242
|
getClasses() {
|
|
243
243
|
return this.classes;
|
|
244
244
|
}
|
|
245
245
|
getStylesForClass(a) {
|
|
246
|
-
|
|
247
|
-
return ((r = this.classes.get(a)) == null ? void 0 : r.styles) ?? [];
|
|
246
|
+
return this.classes.get(a)?.styles ?? [];
|
|
248
247
|
}
|
|
249
248
|
clear() {
|
|
250
249
|
ut(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
|
|
@@ -258,11 +257,11 @@ function Z(e) {
|
|
|
258
257
|
name: l.name,
|
|
259
258
|
children: l.type === "Leaf" ? void 0 : []
|
|
260
259
|
};
|
|
261
|
-
for (s.classSelector = l
|
|
260
|
+
for (s.classSelector = l?.classSelector, l?.cssCompiledStyles && (s.cssCompiledStyles = l.cssCompiledStyles), l.type === "Leaf" && l.value !== void 0 && (s.value = l.value); r.length > 0 && r[r.length - 1].level >= l.level; ) r.pop();
|
|
262
261
|
if (r.length === 0) a.push(s);
|
|
263
262
|
else {
|
|
264
|
-
let
|
|
265
|
-
|
|
263
|
+
let i = r[r.length - 1].node;
|
|
264
|
+
i.children ? i.children.push(s) : i.children = [s];
|
|
266
265
|
}
|
|
267
266
|
l.type !== "Leaf" && r.push({
|
|
268
267
|
node: s,
|
|
@@ -274,11 +273,11 @@ b(Z, "buildHierarchy");
|
|
|
274
273
|
var Ot = /* @__PURE__ */ b((e, a) => {
|
|
275
274
|
ft(e, a);
|
|
276
275
|
let r = [];
|
|
277
|
-
for (let
|
|
278
|
-
for (let
|
|
279
|
-
let c =
|
|
276
|
+
for (let i of e.TreemapRows ?? []) i.$type === "ClassDefStatement" && a.addClass(i.className ?? "", i.styleText ?? "");
|
|
277
|
+
for (let i of e.TreemapRows ?? []) {
|
|
278
|
+
let c = i.item;
|
|
280
279
|
if (!c) continue;
|
|
281
|
-
let h =
|
|
280
|
+
let h = i.indent ? parseInt(i.indent) : 0, f = Kt(c), o = c.classSelector ? a.getStylesForClass(c.classSelector) : [], p = o.length > 0 ? o : void 0, v = {
|
|
282
281
|
level: h,
|
|
283
282
|
name: f,
|
|
284
283
|
type: c.$type,
|
|
@@ -288,33 +287,32 @@ var Ot = /* @__PURE__ */ b((e, a) => {
|
|
|
288
287
|
};
|
|
289
288
|
r.push(v);
|
|
290
289
|
}
|
|
291
|
-
let l = Z(r), s = /* @__PURE__ */ b((
|
|
292
|
-
for (let h of
|
|
290
|
+
let l = Z(r), s = /* @__PURE__ */ b((i, c) => {
|
|
291
|
+
for (let h of i) a.addNode(h, c), h.children && h.children.length > 0 && s(h.children, c + 1);
|
|
293
292
|
}, "addNodesRecursively");
|
|
294
293
|
s(l, 0);
|
|
295
294
|
}, "populate"), Kt = /* @__PURE__ */ b((e) => e.name ? String(e.name) : "", "getItemName"), _ = {
|
|
296
295
|
parser: { yy: void 0 },
|
|
297
296
|
parse: /* @__PURE__ */ b(async (e) => {
|
|
298
|
-
var a;
|
|
299
297
|
try {
|
|
300
|
-
let
|
|
301
|
-
U.debug("Treemap AST:",
|
|
302
|
-
let
|
|
303
|
-
if (!(
|
|
304
|
-
Ot(
|
|
305
|
-
} catch (
|
|
306
|
-
throw U.error("Error parsing treemap:",
|
|
298
|
+
let a = await mt("treemap", e);
|
|
299
|
+
U.debug("Treemap AST:", a);
|
|
300
|
+
let r = _.parser?.yy;
|
|
301
|
+
if (!(r instanceof Y)) throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
|
|
302
|
+
Ot(a, r);
|
|
303
|
+
} catch (a) {
|
|
304
|
+
throw U.error("Error parsing treemap:", a), a;
|
|
307
305
|
}
|
|
308
306
|
}, "parse")
|
|
309
307
|
}, Ut = 10, N = 10, E = 25, Jt = {
|
|
310
308
|
draw: /* @__PURE__ */ b((e, a, r, l) => {
|
|
311
|
-
let s = l.db,
|
|
309
|
+
let s = l.db, i = s.getConfig(), c = i.padding ?? Ut, h = s.getDiagramTitle(), f = s.getRoot(), { themeVariables: o } = J();
|
|
312
310
|
if (!f) return;
|
|
313
|
-
let p = h ? 30 : 0, v = rt(a),
|
|
314
|
-
v.attr("viewBox", `0 0 ${g} ${x}`), lt(v, x, g,
|
|
311
|
+
let p = h ? 30 : 0, v = rt(a), n = i.nodeWidth ? i.nodeWidth * N : 960, S = i.nodeHeight ? i.nodeHeight * N : 500, g = n, x = S + p;
|
|
312
|
+
v.attr("viewBox", `0 0 ${g} ${x}`), lt(v, x, g, i.useMaxWidth);
|
|
315
313
|
let u;
|
|
316
314
|
try {
|
|
317
|
-
let t =
|
|
315
|
+
let t = i.valueFormat || ",";
|
|
318
316
|
if (t === "$0,0") u = /* @__PURE__ */ b((d) => "$" + I(",")(d), "valueFormat");
|
|
319
317
|
else if (t.startsWith("$") && t.includes(",")) {
|
|
320
318
|
let d = /\.\d+/.exec(t), $ = d ? d[0] : "";
|
|
@@ -369,7 +367,7 @@ var Ot = /* @__PURE__ */ b((e, a) => {
|
|
|
369
367
|
o.cScaleLabel11
|
|
370
368
|
]);
|
|
371
369
|
h && v.append("text").attr("x", g / 2).attr("y", p / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(h);
|
|
372
|
-
let F = v.append("g").attr("transform", `translate(0, ${p})`).attr("class", "treemapContainer"), W = Q(f).sum((t) => t.value ?? 0).sort((t, d) => (d.value ?? 0) - (t.value ?? 0)), M = jt().size([
|
|
370
|
+
let F = v.append("g").attr("transform", `translate(0, ${p})`).attr("class", "treemapContainer"), W = Q(f).sum((t) => t.value ?? 0).sort((t, d) => (d.value ?? 0) - (t.value ?? 0)), M = jt().size([n, S]).paddingTop((t) => t.children && t.children.length > 0 ? E + N : 0).paddingInner(c).paddingLeft((t) => t.children && t.children.length > 0 ? N : 0).paddingRight((t) => t.children && t.children.length > 0 ? N : 0).paddingBottom((t) => t.children && t.children.length > 0 ? N : 0).round(!0)(W), tt = M.descendants().filter((t) => t.children && t.children.length > 0), D = F.selectAll(".treemapSection").data(tt).enter().append("g").attr("class", "treemapSection").attr("transform", (t) => `translate(${t.x0},${t.y0})`);
|
|
373
371
|
D.append("rect").attr("width", (t) => t.x1 - t.x0).attr("height", E).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (t) => t.depth === 0 ? "display: none;" : ""), D.append("clipPath").attr("id", (t, d) => `clip-section-${a}-${d}`).append("rect").attr("width", (t) => Math.max(0, t.x1 - t.x0 - 12)).attr("height", E), D.append("rect").attr("width", (t) => t.x1 - t.x0).attr("height", (t) => t.y1 - t.y0).attr("class", (t, d) => `treemapSection section${d}`).attr("fill", (t) => y(t.data.name)).attr("fill-opacity", 0.6).attr("stroke", (t) => z(t.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (t) => {
|
|
374
372
|
if (t.depth === 0) return "display: none;";
|
|
375
373
|
let d = P({ cssCompiledStyles: t.data.cssCompiledStyles });
|
|
@@ -379,7 +377,7 @@ var Ot = /* @__PURE__ */ b((e, a) => {
|
|
|
379
377
|
let d = q(this), $ = t.data.name;
|
|
380
378
|
d.text($);
|
|
381
379
|
let w = t.x1 - t.x0, k;
|
|
382
|
-
k =
|
|
380
|
+
k = i.showValues !== !1 && t.value ? w - 10 - 30 - 10 - 6 : w - 6 - 6;
|
|
383
381
|
let C = Math.max(15, k), L = d.node();
|
|
384
382
|
if (L.getComputedTextLength() > C) {
|
|
385
383
|
let m = $;
|
|
@@ -391,7 +389,7 @@ var Ot = /* @__PURE__ */ b((e, a) => {
|
|
|
391
389
|
if (d.text(m + "..."), L.getComputedTextLength() <= C) break;
|
|
392
390
|
}
|
|
393
391
|
}
|
|
394
|
-
}),
|
|
392
|
+
}), i.showValues !== !1 && D.append("text").attr("class", "treemapSectionValue").attr("x", (t) => t.x1 - t.x0 - 10).attr("y", E / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((t) => t.value ? u(t.value) : "").attr("font-style", "italic").attr("style", (t) => t.depth === 0 ? "display: none;" : "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + T(t.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" + P({ cssCompiledStyles: t.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:"));
|
|
395
393
|
let et = M.leaves(), H = F.selectAll(".treemapLeafGroup").data(et).enter().append("g").attr("class", (t, d) => `treemapNode treemapLeafGroup leaf${d}${t.data.classSelector ? ` ${t.data.classSelector}` : ""}x`).attr("transform", (t) => `translate(${t.x0},${t.y0})`);
|
|
396
394
|
H.append("rect").attr("width", (t) => t.x1 - t.x0).attr("height", (t) => t.y1 - t.y0).attr("class", "treemapLeaf").attr("fill", (t) => t.parent ? y(t.parent.data.name) : y(t.data.name)).attr("style", (t) => P({ cssCompiledStyles: t.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (t) => t.parent ? y(t.parent.data.name) : y(t.data.name)).attr("stroke-width", 3), H.append("clipPath").attr("id", (t, d) => `clip-${a}-${d}`).append("rect").attr("width", (t) => Math.max(0, t.x1 - t.x0 - 4)).attr("height", (t) => Math.max(0, t.y1 - t.y0 - 4)), H.append("text").attr("class", "treemapLabel").attr("x", (t) => (t.x1 - t.x0) / 2).attr("y", (t) => (t.y1 - t.y0) / 2).attr("style", (t) => "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + T(t.data.name) + ";" + P({ cssCompiledStyles: t.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).attr("clip-path", (t, d) => `url(#clip-${a}-${d})`).text((t) => t.data.name).each(function(t) {
|
|
397
395
|
let d = q(this), $ = t.x1 - t.x0, w = t.y1 - t.y0, k = d.node(), C = $ - 8, L = w - 8;
|
|
@@ -404,7 +402,7 @@ var Ot = /* @__PURE__ */ b((e, a) => {
|
|
|
404
402
|
let A = Math.max(6, Math.min(28, Math.round(m * G))), X = m + 2 + A;
|
|
405
403
|
for (; X > L && m > 8 && (m--, A = Math.max(6, Math.min(28, Math.round(m * G))), !(A < 6 && m === 8)); ) d.style("font-size", `${m}px`), X = m + 2 + A;
|
|
406
404
|
d.style("font-size", `${m}px`), (k.getComputedTextLength() > C || m < 8 || L < m) && d.style("display", "none");
|
|
407
|
-
}),
|
|
405
|
+
}), i.showValues !== !1 && H.append("text").attr("class", "treemapValue").attr("x", (t) => (t.x1 - t.x0) / 2).attr("y", function(t) {
|
|
408
406
|
return (t.y1 - t.y0) / 2;
|
|
409
407
|
}).attr("style", (t) => "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" + T(t.data.name) + ";" + P({ cssCompiledStyles: t.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).attr("clip-path", (t, d) => `url(#clip-${a}-${d})`).text((t) => t.value ? u(t.value) : "").each(function(t) {
|
|
410
408
|
let d = q(this), $ = this.parentNode;
|
|
@@ -423,7 +421,7 @@ var Ot = /* @__PURE__ */ b((e, a) => {
|
|
|
423
421
|
d.attr("y", L);
|
|
424
422
|
let m = t.x1 - t.x0, G = t.y1 - t.y0 - 4, A = m - 8;
|
|
425
423
|
d.node().getComputedTextLength() > A || L + C > G || C < 6 ? d.style("display", "none") : d.style("display", null);
|
|
426
|
-
}), yt(v,
|
|
424
|
+
}), yt(v, i.diagramPadding ?? 8, "flowchart", i?.useMaxWidth || !1);
|
|
427
425
|
}, "draw"),
|
|
428
426
|
getClasses: /* @__PURE__ */ b(function(e, a) {
|
|
429
427
|
return a.db.getClasses();
|
|
@@ -445,7 +443,7 @@ var Ot = /* @__PURE__ */ b((e, a) => {
|
|
|
445
443
|
},
|
|
446
444
|
renderer: Jt,
|
|
447
445
|
styles: /* @__PURE__ */ b(({ treemap: e } = {}) => {
|
|
448
|
-
let a = K(at(), J().themeVariables), r = K(Qt, e), l = r.titleColor ?? a.titleColor, s = r.labelColor ?? a.textColor,
|
|
446
|
+
let a = K(at(), J().themeVariables), r = K(Qt, e), l = r.titleColor ?? a.titleColor, s = r.labelColor ?? a.textColor, i = r.valueColor ?? a.textColor;
|
|
449
447
|
return `
|
|
450
448
|
.treemapNode.section {
|
|
451
449
|
stroke: ${r.sectionStrokeColor};
|
|
@@ -462,7 +460,7 @@ var Ot = /* @__PURE__ */ b((e, a) => {
|
|
|
462
460
|
font-size: ${r.labelFontSize};
|
|
463
461
|
}
|
|
464
462
|
.treemapValue {
|
|
465
|
-
fill: ${
|
|
463
|
+
fill: ${i};
|
|
466
464
|
font-size: ${r.valueFontSize};
|
|
467
465
|
}
|
|
468
466
|
.treemapTitle {
|
package/dist/documentation.es.js
CHANGED