bg-editor 0.0.2 → 0.0.4
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/_baseUniq-DlmMKNm6.js +473 -0
- package/dist/{arc-CNm23MW7.js → arc-sEnPjXGq.js} +1 -1
- package/dist/{architecture-U656AL7Q-Ww8rTIvv.js → architecture-U656AL7Q-CPkFywIH.js} +1 -1
- package/dist/{architectureDiagram-VXUJARFQ-DH2EEb-C.js → architectureDiagram-VXUJARFQ-OSzH5GM4.js} +3 -3
- package/dist/{blockDiagram-VD42YOAC-CPmwRP5b.js → blockDiagram-VD42YOAC-CEfQMAZF.js} +5 -5
- package/dist/{c4Diagram-YG6GDRKO-Jsc4hIGa.js → c4Diagram-YG6GDRKO-DrD1o0bF.js} +2 -2
- package/dist/{channel-BfuwZbo4.js → channel-DNawwE5r.js} +1 -1
- package/dist/{chunk-4BX2VUAB-4Zvho0Ds.js → chunk-4BX2VUAB-ApZvZj_H.js} +1 -1
- package/dist/{chunk-55IACEB6-BmOb908D.js → chunk-55IACEB6-DYxYeHe7.js} +1 -1
- package/dist/{chunk-B4BG7PRW-Dx9fTyv9.js → chunk-B4BG7PRW-D_Pl6xS7.js} +4 -4
- package/dist/{chunk-DI55MBZ5-Dwa8xe-f.js → chunk-DI55MBZ5-D8kT33qO.js} +3 -3
- package/dist/{chunk-FMBD7UC4-DBAEvnpB.js → chunk-FMBD7UC4-DpTCe04g.js} +1 -1
- package/dist/{chunk-QN33PNHL-BFK0rIbg.js → chunk-QN33PNHL-Z4BQIuxq.js} +1 -1
- package/dist/{chunk-QZHKN3VN-B5HHmgvT.js → chunk-QZHKN3VN-Cmhrs4io.js} +1 -1
- package/dist/{chunk-TZMSLE5B-CYLAjMP8.js → chunk-TZMSLE5B-BUPp2n-T.js} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-CQOOlc6C.js → classDiagram-2ON5EDUG-DJl6LMGs.js} +2 -2
- package/dist/{classDiagram-2ON5EDUG-CQOOlc6C.js → classDiagram-v2-WZHVMYZB-DJl6LMGs.js} +2 -2
- package/dist/{clone-CF1B7msQ.js → clone-iCXWBcXq.js} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-DZx3YOg1.js → cose-bilkent-S5V4N54A-CnIbqqnS.js} +8 -8
- package/dist/{dagre-6UL2VRFP-sT9qv2gP.js → dagre-6UL2VRFP-3a93Ccgj.js} +116 -117
- package/dist/{defaultLocale-C44w2ZBZ.js → defaultLocale-DEnRyJdC.js} +3 -3
- package/dist/diagram-PSM6KHXK-hPQJhwjP.js +396 -0
- package/dist/{diagram-QEK2KX5R-g5F_w0er.js → diagram-QEK2KX5R-vTFC9KE_.js} +3 -3
- package/dist/{diagram-S2PKOQOG-CRelpUZk.js → diagram-S2PKOQOG-BdLipS0J.js} +3 -3
- package/dist/{erDiagram-Q2GNP2WA-CfWWAKsy.js → erDiagram-Q2GNP2WA-CCKMWiuO.js} +4 -4
- package/dist/{flowDiagram-NV44I4VS-DuCCJQ8z.js → flowDiagram-NV44I4VS-Dci2ZYE1.js} +5 -5
- package/dist/{ganttDiagram-LVOFAZNH-DKb9FhvV.js → ganttDiagram-LVOFAZNH-C1o-J89x.js} +2 -2
- package/dist/{gitGraph-F6HP7TQM-Cg_TcdDS.js → gitGraph-F6HP7TQM-CECU0RWB.js} +1 -1
- package/dist/{gitGraphDiagram-NY62KEGX-CjO_i2YA.js → gitGraphDiagram-NY62KEGX-D5fV34WX.js} +4 -4
- package/dist/graph-Bve-nWS5.js +382 -0
- package/dist/index-0M7iCg0y.js +164750 -0
- package/dist/{info-NVLQJR56-D-AxJYeF.js → info-NVLQJR56-Bqk59KfO.js} +1 -1
- package/dist/{infoDiagram-ER5ION4S-9EH9zF_4.js → infoDiagram-ER5ION4S-DJ6J2mgS.js} +2 -2
- package/dist/{journeyDiagram-XKPGCS4Q-BaCrHQBZ.js → journeyDiagram-XKPGCS4Q-TRwtnzXO.js} +4 -4
- package/dist/{kanban-definition-3W4ZIXB7-BK9PMHrf.js → kanban-definition-3W4ZIXB7-BC83cBPr.js} +2 -2
- package/dist/layout-CpvWZ0xd.js +1416 -0
- package/dist/{linear-edUYtIiO.js → linear-C88svcwx.js} +6 -6
- package/dist/{mermaid-parser.core-BMy5yPs4.js → mermaid-parser.core-DGRDGxqQ.js} +6707 -5486
- package/dist/min-Bgv4PVuI.js +39 -0
- package/dist/{mindmap-definition-VGOIOE7T-bSEDOEZl.js → mindmap-definition-VGOIOE7T-BYiyXN9v.js} +11 -11
- package/dist/{packet-BFZMPI3H-DHEklZAi.js → packet-BFZMPI3H-87WloAg0.js} +1 -1
- package/dist/{pie-7BOR55EZ-DDu5Qx9i.js → pie-7BOR55EZ-CWT2R5xc.js} +1 -1
- package/dist/{pieDiagram-ADFJNKIX-QEkPDMva.js → pieDiagram-ADFJNKIX-BCVT3x3r.js} +9 -9
- package/dist/{quadrantDiagram-AYHSOK5B-zvs9JNV-.js → quadrantDiagram-AYHSOK5B-BgYJ_lms.js} +2 -2
- package/dist/{radar-NHE76QYJ-DEeIs6w7.js → radar-NHE76QYJ-DI34pls7.js} +1 -1
- package/dist/{requirementDiagram-UZGBJVZJ-PLEQdkam.js → requirementDiagram-UZGBJVZJ-Bh4vxSq4.js} +3 -3
- package/dist/{sankeyDiagram-TZEHDZUN-B9FpEfLk.js → sankeyDiagram-TZEHDZUN-3rmpF6iD.js} +1 -1
- package/dist/{sequenceDiagram-WL72ISMW-ClWHIEm8.js → sequenceDiagram-WL72ISMW-DRPHhT6P.js} +3 -3
- package/dist/{stateDiagram-FKZM4ZOC-CSNc1r0e.js → stateDiagram-FKZM4ZOC-Bg5i_DMD.js} +4 -4
- package/dist/{stateDiagram-v2-4FDKWEC3-BbDtuFwM.js → stateDiagram-v2-4FDKWEC3-D1fxP-ej.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{timeline-definition-IT6M3QCI-Ddq-6bZx.js → timeline-definition-IT6M3QCI-CWHNY2JH.js} +2 -2
- package/dist/{treemap-KMMF4GRG-D3-cXS0o.js → treemap-KMMF4GRG-DL-NPl5s.js} +1 -1
- package/dist/umo-editor.js +1 -1
- package/dist/{xychartDiagram-PRI3JC2R-BpMDi10C.js → xychartDiagram-PRI3JC2R-C7tSOfMZ.js} +2 -2
- package/package.json +6 -1
- package/dist/_basePickBy-xii7lYdk.js +0 -152
- package/dist/_baseUniq-ltuhkD8D.js +0 -615
- package/dist/diagram-PSM6KHXK-CgyZu1Ty.js +0 -533
- package/dist/graph-IPeEmdRy.js +0 -248
- package/dist/index-DfWUTVm_.js +0 -122164
- package/dist/layout-C1dI-ZSJ.js +0 -1336
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import "./style.css";
|
|
2
|
+
import { _ as w, D as Q, E as ee, H as ce, e as de, l as J, aM as pe, aN as E, d as j, b as ue, a as he, p as fe, q as me, g as ge, s as ye, F as Se, aO as xe, y as ve } from "./index-0M7iCg0y.js";
|
|
3
|
+
import { s as be } from "./chunk-QN33PNHL-Z4BQIuxq.js";
|
|
4
|
+
import { p as we } from "./chunk-4BX2VUAB-ApZvZj_H.js";
|
|
5
|
+
import { p as Ce } from "./mermaid-parser.core-DGRDGxqQ.js";
|
|
6
|
+
import { f as O } from "./defaultLocale-DEnRyJdC.js";
|
|
7
|
+
import { o as Z } from "./ordinal-mgyNSFm_.js";
|
|
8
|
+
function Te(r) {
|
|
9
|
+
if (typeof r != "function") throw new Error();
|
|
10
|
+
return r;
|
|
11
|
+
}
|
|
12
|
+
function q() {
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
15
|
+
function G(r) {
|
|
16
|
+
return function() {
|
|
17
|
+
return r;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function Le(r) {
|
|
21
|
+
r.x0 = Math.round(r.x0), r.y0 = Math.round(r.y0), r.x1 = Math.round(r.x1), r.y1 = Math.round(r.y1);
|
|
22
|
+
}
|
|
23
|
+
function $e(r, l, o, i, p) {
|
|
24
|
+
for (var s = r.children, c, h = -1, v = s.length, n = r.value && (i - l) / r.value; ++h < v; )
|
|
25
|
+
c = s[h], c.y0 = o, c.y1 = p, c.x0 = l, c.x1 = l += c.value * n;
|
|
26
|
+
}
|
|
27
|
+
function Fe(r, l, o, i, p) {
|
|
28
|
+
for (var s = r.children, c, h = -1, v = s.length, n = r.value && (p - o) / r.value; ++h < v; )
|
|
29
|
+
c = s[h], c.x0 = l, c.x1 = i, c.y0 = o, c.y1 = o += c.value * n;
|
|
30
|
+
}
|
|
31
|
+
var Me = (1 + Math.sqrt(5)) / 2;
|
|
32
|
+
function Ne(r, l, o, i, p, s) {
|
|
33
|
+
for (var c = [], h = l.children, v, n, d = 0, b = 0, t = h.length, x, y, S = l.value, u, m, k, N, D, B, z; d < t; ) {
|
|
34
|
+
x = p - o, y = s - i;
|
|
35
|
+
do
|
|
36
|
+
u = h[b++].value;
|
|
37
|
+
while (!u && b < t);
|
|
38
|
+
for (m = k = u, B = Math.max(y / x, x / y) / (S * r), z = u * u * B, D = Math.max(k / z, z / m); b < t; ++b) {
|
|
39
|
+
if (u += n = h[b].value, n < m && (m = n), n > k && (k = n), z = u * u * B, N = Math.max(k / z, z / m), N > D) {
|
|
40
|
+
u -= n;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
D = N;
|
|
44
|
+
}
|
|
45
|
+
c.push(v = { value: u, dice: x < y, children: h.slice(d, b) }), v.dice ? $e(v, o, i, p, S ? i += y * u / S : s) : Fe(v, o, i, S ? o += x * u / S : p, s), S -= u, d = b;
|
|
46
|
+
}
|
|
47
|
+
return c;
|
|
48
|
+
}
|
|
49
|
+
const ke = function r(l) {
|
|
50
|
+
function o(i, p, s, c, h) {
|
|
51
|
+
Ne(l, i, p, s, c, h);
|
|
52
|
+
}
|
|
53
|
+
return o.ratio = function(i) {
|
|
54
|
+
return r((i = +i) > 1 ? i : 1);
|
|
55
|
+
}, o;
|
|
56
|
+
}(Me);
|
|
57
|
+
function ze() {
|
|
58
|
+
var r = ke, l = !1, o = 1, i = 1, p = [0], s = q, c = q, h = q, v = q, n = q;
|
|
59
|
+
function d(t) {
|
|
60
|
+
return t.x0 = t.y0 = 0, t.x1 = o, t.y1 = i, t.eachBefore(b), p = [0], l && t.eachBefore(Le), t;
|
|
61
|
+
}
|
|
62
|
+
function b(t) {
|
|
63
|
+
var x = p[t.depth], y = t.x0 + x, S = t.y0 + x, u = t.x1 - x, m = t.y1 - x;
|
|
64
|
+
u < y && (y = u = (y + u) / 2), m < S && (S = m = (S + m) / 2), t.x0 = y, t.y0 = S, t.x1 = u, t.y1 = m, t.children && (x = p[t.depth + 1] = s(t) / 2, y += n(t) - x, S += c(t) - x, u -= h(t) - x, m -= v(t) - x, u < y && (y = u = (y + u) / 2), m < S && (S = m = (S + m) / 2), r(t, y, S, u, m));
|
|
65
|
+
}
|
|
66
|
+
return d.round = function(t) {
|
|
67
|
+
return arguments.length ? (l = !!t, d) : l;
|
|
68
|
+
}, d.size = function(t) {
|
|
69
|
+
return arguments.length ? (o = +t[0], i = +t[1], d) : [o, i];
|
|
70
|
+
}, d.tile = function(t) {
|
|
71
|
+
return arguments.length ? (r = Te(t), d) : r;
|
|
72
|
+
}, d.padding = function(t) {
|
|
73
|
+
return arguments.length ? d.paddingInner(t).paddingOuter(t) : d.paddingInner();
|
|
74
|
+
}, d.paddingInner = function(t) {
|
|
75
|
+
return arguments.length ? (s = typeof t == "function" ? t : G(+t), d) : s;
|
|
76
|
+
}, d.paddingOuter = function(t) {
|
|
77
|
+
return arguments.length ? d.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t) : d.paddingTop();
|
|
78
|
+
}, d.paddingTop = function(t) {
|
|
79
|
+
return arguments.length ? (c = typeof t == "function" ? t : G(+t), d) : c;
|
|
80
|
+
}, d.paddingRight = function(t) {
|
|
81
|
+
return arguments.length ? (h = typeof t == "function" ? t : G(+t), d) : h;
|
|
82
|
+
}, d.paddingBottom = function(t) {
|
|
83
|
+
return arguments.length ? (v = typeof t == "function" ? t : G(+t), d) : v;
|
|
84
|
+
}, d.paddingLeft = function(t) {
|
|
85
|
+
return arguments.length ? (n = typeof t == "function" ? t : G(+t), d) : n;
|
|
86
|
+
}, d;
|
|
87
|
+
}
|
|
88
|
+
var W, te = (W = class {
|
|
89
|
+
constructor() {
|
|
90
|
+
this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = ue, this.getAccTitle = he, this.setDiagramTitle = fe, this.getDiagramTitle = me, this.getAccDescription = ge, this.setAccDescription = ye;
|
|
91
|
+
}
|
|
92
|
+
getNodes() {
|
|
93
|
+
return this.nodes;
|
|
94
|
+
}
|
|
95
|
+
getConfig() {
|
|
96
|
+
const l = Se, o = ee();
|
|
97
|
+
return Q({
|
|
98
|
+
...l.treemap,
|
|
99
|
+
...o.treemap ?? {}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
addNode(l, o) {
|
|
103
|
+
this.nodes.push(l), this.levels.set(l, o), o === 0 && (this.outerNodes.push(l), this.root ?? (this.root = l));
|
|
104
|
+
}
|
|
105
|
+
getRoot() {
|
|
106
|
+
return { name: "", children: this.outerNodes };
|
|
107
|
+
}
|
|
108
|
+
addClass(l, o) {
|
|
109
|
+
const i = this.classes.get(l) ?? { id: l, styles: [], textStyles: [] }, p = o.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
|
|
110
|
+
p && p.forEach((s) => {
|
|
111
|
+
xe(s) && (i?.textStyles ? i.textStyles.push(s) : i.textStyles = [s]), i?.styles ? i.styles.push(s) : i.styles = [s];
|
|
112
|
+
}), this.classes.set(l, i);
|
|
113
|
+
}
|
|
114
|
+
getClasses() {
|
|
115
|
+
return this.classes;
|
|
116
|
+
}
|
|
117
|
+
getStylesForClass(l) {
|
|
118
|
+
return this.classes.get(l)?.styles ?? [];
|
|
119
|
+
}
|
|
120
|
+
clear() {
|
|
121
|
+
ve(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
|
|
122
|
+
}
|
|
123
|
+
}, w(W, "TreeMapDB"), W);
|
|
124
|
+
function ae(r) {
|
|
125
|
+
if (!r.length)
|
|
126
|
+
return [];
|
|
127
|
+
const l = [], o = [];
|
|
128
|
+
return r.forEach((i) => {
|
|
129
|
+
const p = {
|
|
130
|
+
name: i.name,
|
|
131
|
+
children: i.type === "Leaf" ? void 0 : []
|
|
132
|
+
};
|
|
133
|
+
for (p.classSelector = i?.classSelector, i?.cssCompiledStyles && (p.cssCompiledStyles = [i.cssCompiledStyles]), i.type === "Leaf" && i.value !== void 0 && (p.value = i.value); o.length > 0 && o[o.length - 1].level >= i.level; )
|
|
134
|
+
o.pop();
|
|
135
|
+
if (o.length === 0)
|
|
136
|
+
l.push(p);
|
|
137
|
+
else {
|
|
138
|
+
const s = o[o.length - 1].node;
|
|
139
|
+
s.children ? s.children.push(p) : s.children = [p];
|
|
140
|
+
}
|
|
141
|
+
i.type !== "Leaf" && o.push({ node: p, level: i.level });
|
|
142
|
+
}), l;
|
|
143
|
+
}
|
|
144
|
+
w(ae, "buildHierarchy");
|
|
145
|
+
var Ae = /* @__PURE__ */ w((r, l) => {
|
|
146
|
+
we(r, l);
|
|
147
|
+
const o = [];
|
|
148
|
+
for (const s of r.TreemapRows ?? [])
|
|
149
|
+
s.$type === "ClassDefStatement" && l.addClass(s.className ?? "", s.styleText ?? "");
|
|
150
|
+
for (const s of r.TreemapRows ?? []) {
|
|
151
|
+
const c = s.item;
|
|
152
|
+
if (!c)
|
|
153
|
+
continue;
|
|
154
|
+
const h = s.indent ? parseInt(s.indent) : 0, v = Ve(c), n = c.classSelector ? l.getStylesForClass(c.classSelector) : [], d = n.length > 0 ? n.join(";") : void 0, b = {
|
|
155
|
+
level: h,
|
|
156
|
+
name: v,
|
|
157
|
+
type: c.$type,
|
|
158
|
+
value: c.value,
|
|
159
|
+
classSelector: c.classSelector,
|
|
160
|
+
cssCompiledStyles: d
|
|
161
|
+
};
|
|
162
|
+
o.push(b);
|
|
163
|
+
}
|
|
164
|
+
const i = ae(o), p = /* @__PURE__ */ w((s, c) => {
|
|
165
|
+
for (const h of s)
|
|
166
|
+
l.addNode(h, c), h.children && h.children.length > 0 && p(h.children, c + 1);
|
|
167
|
+
}, "addNodesRecursively");
|
|
168
|
+
p(i, 0);
|
|
169
|
+
}, "populate"), Ve = /* @__PURE__ */ w((r) => r.name ? String(r.name) : "", "getItemName"), le = {
|
|
170
|
+
// @ts-expect-error - TreeMapDB is not assignable to DiagramDB
|
|
171
|
+
parser: { yy: void 0 },
|
|
172
|
+
parse: /* @__PURE__ */ w(async (r) => {
|
|
173
|
+
try {
|
|
174
|
+
const o = await Ce("treemap", r);
|
|
175
|
+
J.debug("Treemap AST:", o);
|
|
176
|
+
const i = le.parser?.yy;
|
|
177
|
+
if (!(i instanceof te))
|
|
178
|
+
throw new Error(
|
|
179
|
+
"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."
|
|
180
|
+
);
|
|
181
|
+
Ae(o, i);
|
|
182
|
+
} catch (l) {
|
|
183
|
+
throw J.error("Error parsing treemap:", l), l;
|
|
184
|
+
}
|
|
185
|
+
}, "parse")
|
|
186
|
+
}, De = 10, R = 10, X = 25, Pe = /* @__PURE__ */ w((r, l, o, i) => {
|
|
187
|
+
const p = i.db, s = p.getConfig(), c = s.padding ?? De, h = p.getDiagramTitle(), v = p.getRoot(), { themeVariables: n } = ee();
|
|
188
|
+
if (!v)
|
|
189
|
+
return;
|
|
190
|
+
const d = h ? 30 : 0, b = ce(l), t = s.nodeWidth ? s.nodeWidth * R : 960, x = s.nodeHeight ? s.nodeHeight * R : 500, y = t, S = x + d;
|
|
191
|
+
b.attr("viewBox", `0 0 ${y} ${S}`), de(b, S, y, s.useMaxWidth);
|
|
192
|
+
let u;
|
|
193
|
+
try {
|
|
194
|
+
const e = s.valueFormat || ",";
|
|
195
|
+
if (e === "$0,0")
|
|
196
|
+
u = /* @__PURE__ */ w((a) => "$" + O(",")(a), "valueFormat");
|
|
197
|
+
else if (e.startsWith("$") && e.includes(",")) {
|
|
198
|
+
const a = /\.\d+/.exec(e), f = a ? a[0] : "";
|
|
199
|
+
u = /* @__PURE__ */ w((C) => "$" + O("," + f)(C), "valueFormat");
|
|
200
|
+
} else if (e.startsWith("$")) {
|
|
201
|
+
const a = e.substring(1);
|
|
202
|
+
u = /* @__PURE__ */ w((f) => "$" + O(a || "")(f), "valueFormat");
|
|
203
|
+
} else
|
|
204
|
+
u = O(e);
|
|
205
|
+
} catch (e) {
|
|
206
|
+
J.error("Error creating format function:", e), u = O(",");
|
|
207
|
+
}
|
|
208
|
+
const m = Z().range([
|
|
209
|
+
"transparent",
|
|
210
|
+
n.cScale0,
|
|
211
|
+
n.cScale1,
|
|
212
|
+
n.cScale2,
|
|
213
|
+
n.cScale3,
|
|
214
|
+
n.cScale4,
|
|
215
|
+
n.cScale5,
|
|
216
|
+
n.cScale6,
|
|
217
|
+
n.cScale7,
|
|
218
|
+
n.cScale8,
|
|
219
|
+
n.cScale9,
|
|
220
|
+
n.cScale10,
|
|
221
|
+
n.cScale11
|
|
222
|
+
]), k = Z().range([
|
|
223
|
+
"transparent",
|
|
224
|
+
n.cScalePeer0,
|
|
225
|
+
n.cScalePeer1,
|
|
226
|
+
n.cScalePeer2,
|
|
227
|
+
n.cScalePeer3,
|
|
228
|
+
n.cScalePeer4,
|
|
229
|
+
n.cScalePeer5,
|
|
230
|
+
n.cScalePeer6,
|
|
231
|
+
n.cScalePeer7,
|
|
232
|
+
n.cScalePeer8,
|
|
233
|
+
n.cScalePeer9,
|
|
234
|
+
n.cScalePeer10,
|
|
235
|
+
n.cScalePeer11
|
|
236
|
+
]), N = Z().range([
|
|
237
|
+
n.cScaleLabel0,
|
|
238
|
+
n.cScaleLabel1,
|
|
239
|
+
n.cScaleLabel2,
|
|
240
|
+
n.cScaleLabel3,
|
|
241
|
+
n.cScaleLabel4,
|
|
242
|
+
n.cScaleLabel5,
|
|
243
|
+
n.cScaleLabel6,
|
|
244
|
+
n.cScaleLabel7,
|
|
245
|
+
n.cScaleLabel8,
|
|
246
|
+
n.cScaleLabel9,
|
|
247
|
+
n.cScaleLabel10,
|
|
248
|
+
n.cScaleLabel11
|
|
249
|
+
]);
|
|
250
|
+
h && b.append("text").attr("x", y / 2).attr("y", d / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(h);
|
|
251
|
+
const D = b.append("g").attr("transform", `translate(0, ${d})`).attr("class", "treemapContainer"), B = pe(v).sum((e) => e.value ?? 0).sort((e, a) => (a.value ?? 0) - (e.value ?? 0)), K = ze().size([t, x]).paddingTop(
|
|
252
|
+
(e) => e.children && e.children.length > 0 ? X + R : 0
|
|
253
|
+
).paddingInner(c).paddingLeft((e) => e.children && e.children.length > 0 ? R : 0).paddingRight((e) => e.children && e.children.length > 0 ? R : 0).paddingBottom((e) => e.children && e.children.length > 0 ? R : 0).round(!0)(B), ne = K.descendants().filter((e) => e.children && e.children.length > 0), _ = D.selectAll(".treemapSection").data(ne).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
254
|
+
_.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", X).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), _.append("clipPath").attr("id", (e, a) => `clip-section-${l}-${a}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", X), _.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, a) => `treemapSection section${a}`).attr("fill", (e) => m(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => k(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
|
|
255
|
+
if (e.depth === 0)
|
|
256
|
+
return "display: none;";
|
|
257
|
+
const a = E({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
258
|
+
return a.nodeStyles + ";" + a.borderStyles.join(";");
|
|
259
|
+
}), _.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", X / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("style", (e) => {
|
|
260
|
+
if (e.depth === 0)
|
|
261
|
+
return "display: none;";
|
|
262
|
+
const a = "dominant-baseline: middle; font-size: 12px; fill:" + N(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = E({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
263
|
+
return a + f.labelStyles.replace("color:", "fill:");
|
|
264
|
+
}).each(function(e) {
|
|
265
|
+
if (e.depth === 0)
|
|
266
|
+
return;
|
|
267
|
+
const a = j(this), f = e.data.name;
|
|
268
|
+
a.text(f);
|
|
269
|
+
const C = e.x1 - e.x0, $ = 6;
|
|
270
|
+
let F;
|
|
271
|
+
s.showValues !== !1 && e.value ? F = C - 10 - 30 - 10 - $ : F = C - $ - 6;
|
|
272
|
+
const M = Math.max(15, F), g = a.node();
|
|
273
|
+
if (g.getComputedTextLength() > M) {
|
|
274
|
+
const T = "...";
|
|
275
|
+
let L = f;
|
|
276
|
+
for (; L.length > 0; ) {
|
|
277
|
+
if (L = f.substring(0, L.length - 1), L.length === 0) {
|
|
278
|
+
a.text(T), g.getComputedTextLength() > M && a.text("");
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
if (a.text(L + T), g.getComputedTextLength() <= M)
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}), s.showValues !== !1 && _.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", X / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? u(e.value) : "").attr("font-style", "italic").attr("style", (e) => {
|
|
286
|
+
if (e.depth === 0)
|
|
287
|
+
return "display: none;";
|
|
288
|
+
const a = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + N(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = E({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
289
|
+
return a + f.labelStyles.replace("color:", "fill:");
|
|
290
|
+
});
|
|
291
|
+
const se = K.leaves(), Y = D.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class", (e, a) => `treemapNode treemapLeafGroup leaf${a}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
292
|
+
Y.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? m(e.parent.data.name) : m(e.data.name)).attr("style", (e) => E({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? m(e.parent.data.name) : m(e.data.name)).attr("stroke-width", 3), Y.append("clipPath").attr("id", (e, a) => `clip-${l}-${a}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), Y.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
|
|
293
|
+
const a = "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + N(e.data.name) + ";", f = E({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
294
|
+
return a + f.labelStyles.replace("color:", "fill:");
|
|
295
|
+
}).attr("clip-path", (e, a) => `url(#clip-${l}-${a})`).text((e) => e.data.name).each(function(e) {
|
|
296
|
+
const a = j(this), f = e.x1 - e.x0, C = e.y1 - e.y0, $ = a.node(), F = 4, P = f - 2 * F, M = C - 2 * F;
|
|
297
|
+
if (P < 10 || M < 10) {
|
|
298
|
+
a.style("display", "none");
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
let g = parseInt(a.style("font-size"), 10);
|
|
302
|
+
const A = 8, T = 28, L = 0.6, V = 6, H = 2;
|
|
303
|
+
for (; $.getComputedTextLength() > P && g > A; )
|
|
304
|
+
g--, a.style("font-size", `${g}px`);
|
|
305
|
+
let I = Math.max(
|
|
306
|
+
V,
|
|
307
|
+
Math.min(T, Math.round(g * L))
|
|
308
|
+
), U = g + H + I;
|
|
309
|
+
for (; U > M && g > A && (g--, I = Math.max(
|
|
310
|
+
V,
|
|
311
|
+
Math.min(T, Math.round(g * L))
|
|
312
|
+
), !(I < V && g === A)); )
|
|
313
|
+
a.style("font-size", `${g}px`), U = g + H + I;
|
|
314
|
+
a.style("font-size", `${g}px`), ($.getComputedTextLength() > P || g < A || M < g) && a.style("display", "none");
|
|
315
|
+
}), s.showValues !== !1 && Y.append("text").attr("class", "treemapValue").attr("x", (a) => (a.x1 - a.x0) / 2).attr("y", function(a) {
|
|
316
|
+
return (a.y1 - a.y0) / 2;
|
|
317
|
+
}).attr("style", (a) => {
|
|
318
|
+
const f = "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" + N(a.data.name) + ";", C = E({ cssCompiledStyles: a.data.cssCompiledStyles });
|
|
319
|
+
return f + C.labelStyles.replace("color:", "fill:");
|
|
320
|
+
}).attr("clip-path", (a, f) => `url(#clip-${l}-${f})`).text((a) => a.value ? u(a.value) : "").each(function(a) {
|
|
321
|
+
const f = j(this), C = this.parentNode;
|
|
322
|
+
if (!C) {
|
|
323
|
+
f.style("display", "none");
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
const $ = j(C).select(".treemapLabel");
|
|
327
|
+
if ($.empty() || $.style("display") === "none") {
|
|
328
|
+
f.style("display", "none");
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
const F = parseFloat($.style("font-size")), P = 28, M = 0.6, g = 6, A = 2, T = Math.max(
|
|
332
|
+
g,
|
|
333
|
+
Math.min(P, Math.round(F * M))
|
|
334
|
+
);
|
|
335
|
+
f.style("font-size", `${T}px`);
|
|
336
|
+
const V = (a.y1 - a.y0) / 2 + F / 2 + A;
|
|
337
|
+
f.attr("y", V);
|
|
338
|
+
const H = a.x1 - a.x0, ie = a.y1 - a.y0 - 4, oe = H - 2 * 4;
|
|
339
|
+
f.node().getComputedTextLength() > oe || V + T > ie || T < g ? f.style("display", "none") : f.style("display", null);
|
|
340
|
+
});
|
|
341
|
+
const re = s.diagramPadding ?? 8;
|
|
342
|
+
be(b, re, "flowchart", s?.useMaxWidth || !1);
|
|
343
|
+
}, "draw"), Ee = /* @__PURE__ */ w(function(r, l) {
|
|
344
|
+
return l.db.getClasses();
|
|
345
|
+
}, "getClasses"), Re = { draw: Pe, getClasses: Ee }, We = {
|
|
346
|
+
sectionStrokeColor: "black",
|
|
347
|
+
sectionStrokeWidth: "1",
|
|
348
|
+
sectionFillColor: "#efefef",
|
|
349
|
+
leafStrokeColor: "black",
|
|
350
|
+
leafStrokeWidth: "1",
|
|
351
|
+
leafFillColor: "#efefef",
|
|
352
|
+
labelColor: "black",
|
|
353
|
+
labelFontSize: "12px",
|
|
354
|
+
valueFontSize: "10px",
|
|
355
|
+
valueColor: "black",
|
|
356
|
+
titleColor: "black",
|
|
357
|
+
titleFontSize: "14px"
|
|
358
|
+
}, Be = /* @__PURE__ */ w(({
|
|
359
|
+
treemap: r
|
|
360
|
+
} = {}) => {
|
|
361
|
+
const l = Q(We, r);
|
|
362
|
+
return `
|
|
363
|
+
.treemapNode.section {
|
|
364
|
+
stroke: ${l.sectionStrokeColor};
|
|
365
|
+
stroke-width: ${l.sectionStrokeWidth};
|
|
366
|
+
fill: ${l.sectionFillColor};
|
|
367
|
+
}
|
|
368
|
+
.treemapNode.leaf {
|
|
369
|
+
stroke: ${l.leafStrokeColor};
|
|
370
|
+
stroke-width: ${l.leafStrokeWidth};
|
|
371
|
+
fill: ${l.leafFillColor};
|
|
372
|
+
}
|
|
373
|
+
.treemapLabel {
|
|
374
|
+
fill: ${l.labelColor};
|
|
375
|
+
font-size: ${l.labelFontSize};
|
|
376
|
+
}
|
|
377
|
+
.treemapValue {
|
|
378
|
+
fill: ${l.valueColor};
|
|
379
|
+
font-size: ${l.valueFontSize};
|
|
380
|
+
}
|
|
381
|
+
.treemapTitle {
|
|
382
|
+
fill: ${l.titleColor};
|
|
383
|
+
font-size: ${l.titleFontSize};
|
|
384
|
+
}
|
|
385
|
+
`;
|
|
386
|
+
}, "getStyles"), _e = Be, Ue = {
|
|
387
|
+
parser: le,
|
|
388
|
+
get db() {
|
|
389
|
+
return new te();
|
|
390
|
+
},
|
|
391
|
+
renderer: Re,
|
|
392
|
+
styles: _e
|
|
393
|
+
};
|
|
394
|
+
export {
|
|
395
|
+
Ue as diagram
|
|
396
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { _ as l, s as k, g as R, q as E, p as F, a as I, b as _, H as D, y as G, D as f, E as C, F as P, l as z, K as H } from "./index-
|
|
3
|
-
import { p as V } from "./chunk-4BX2VUAB-
|
|
4
|
-
import { p as W } from "./mermaid-parser.core-
|
|
2
|
+
import { _ as l, s as k, g as R, q as E, p as F, a as I, b as _, H as D, y as G, D as f, E as C, F as P, l as z, K as H } from "./index-0M7iCg0y.js";
|
|
3
|
+
import { p as V } from "./chunk-4BX2VUAB-ApZvZj_H.js";
|
|
4
|
+
import { p as W } from "./mermaid-parser.core-DGRDGxqQ.js";
|
|
5
5
|
var m = {
|
|
6
6
|
showLegend: !0,
|
|
7
7
|
ticks: 5,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { _ as b, D as m, H as B, e as C, l as w, b as S, a as D, p as T, q as E, g as F, s as P, E as z, F as A, y as W } from "./index-
|
|
3
|
-
import { p as _ } from "./chunk-4BX2VUAB-
|
|
4
|
-
import { p as N } from "./mermaid-parser.core-
|
|
2
|
+
import { _ as b, D as m, H as B, e as C, l as w, b as S, a as D, p as T, q as E, g as F, s as P, E as z, F as A, y as W } from "./index-0M7iCg0y.js";
|
|
3
|
+
import { p as _ } from "./chunk-4BX2VUAB-ApZvZj_H.js";
|
|
4
|
+
import { p as N } from "./mermaid-parser.core-DGRDGxqQ.js";
|
|
5
5
|
var L = A.packet, u, v = (u = class {
|
|
6
6
|
constructor() {
|
|
7
7
|
this.packet = [], this.setAccTitle = S, this.getAccTitle = D, this.setDiagramTitle = T, this.getDiagramTitle = E, this.getAccDescription = F, this.setAccDescription = P;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { g as Dt } from "./chunk-55IACEB6-
|
|
3
|
-
import { s as wt } from "./chunk-QN33PNHL-
|
|
4
|
-
import { _ as u, b as Vt, a as Lt, s as Mt, g as Bt, p as Ft, q as Yt, c as tt, l as D, y as Pt, x as zt, A as Gt, B as Kt, o as Zt, r as Ut, d as jt, u as Wt } from "./index-
|
|
5
|
-
import { c as Qt } from "./channel-
|
|
2
|
+
import { g as Dt } from "./chunk-55IACEB6-DYxYeHe7.js";
|
|
3
|
+
import { s as wt } from "./chunk-QN33PNHL-Z4BQIuxq.js";
|
|
4
|
+
import { _ as u, b as Vt, a as Lt, s as Mt, g as Bt, p as Ft, q as Yt, c as tt, l as D, y as Pt, x as zt, A as Gt, B as Kt, o as Zt, r as Ut, d as jt, u as Wt } from "./index-0M7iCg0y.js";
|
|
5
|
+
import { c as Qt } from "./channel-DNawwE5r.js";
|
|
6
6
|
var dt = function() {
|
|
7
7
|
var s = /* @__PURE__ */ u(function(R, n, a, c) {
|
|
8
8
|
for (a = a || {}, c = R.length; c--; a[R[c]] = n) ;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { g as qt } from "./chunk-FMBD7UC4-
|
|
3
|
-
import { _ as m, n as Ot, l as $, c as b1, d as E1, o as Ht, r as Xt, u as it, b as Qt, s as Jt, p as Zt, a as $t, g as te, q as ee, k as se, t as ie, J as re, v as ae, x as st, y as ne, z as ue, A as oe } from "./index-
|
|
4
|
-
import { g as le } from "./chunk-55IACEB6-
|
|
5
|
-
import { s as ce } from "./chunk-QN33PNHL-
|
|
6
|
-
import { c as he } from "./channel-
|
|
2
|
+
import { g as qt } from "./chunk-FMBD7UC4-DpTCe04g.js";
|
|
3
|
+
import { _ as m, n as Ot, l as $, c as b1, d as E1, o as Ht, r as Xt, u as it, b as Qt, s as Jt, p as Zt, a as $t, g as te, q as ee, k as se, t as ie, J as re, v as ae, x as st, y as ne, z as ue, A as oe } from "./index-0M7iCg0y.js";
|
|
4
|
+
import { g as le } from "./chunk-55IACEB6-DYxYeHe7.js";
|
|
5
|
+
import { s as ce } from "./chunk-QN33PNHL-Z4BQIuxq.js";
|
|
6
|
+
import { c as he } from "./channel-DNawwE5r.js";
|
|
7
7
|
var de = "flowchart-", G1, pe = (G1 = class {
|
|
8
8
|
// cspell:ignore funs
|
|
9
9
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import {
|
|
3
|
-
import { b as Bn, t as Ie, c as Zn, a as qn, l as Xn } from "./linear-
|
|
2
|
+
import { be as $e, bf as Un, bg as Je, bh as Ke, bi as tn, bj as re, bk as En, aH as Te, aI as be, _ as h, g as Ln, s as An, q as In, p as Wn, a as On, b as Hn, c as _t, d as Zt, e as Nn, bl as it, l as Qt, k as Vn, j as zn, y as Pn, u as Rn } from "./index-0M7iCg0y.js";
|
|
3
|
+
import { b as Bn, t as Ie, c as Zn, a as qn, l as Xn } from "./linear-C88svcwx.js";
|
|
4
4
|
import { i as Gn } from "./init-Dbt-6wo9.js";
|
|
5
5
|
function jn(t, e) {
|
|
6
6
|
let n;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { p as Y } from "./chunk-4BX2VUAB-
|
|
3
|
-
import { I as K } from "./chunk-QZHKN3VN-
|
|
4
|
-
import { _ as l, q as U, p as V, s as X, g as J, a as Q, b as Z, l as m, c as rr, d as er, u as tr, C as ar, y as sr, k as C, D as nr, E as or, F as cr, G as ir } from "./index-
|
|
5
|
-
import { p as dr } from "./mermaid-parser.core-
|
|
2
|
+
import { p as Y } from "./chunk-4BX2VUAB-ApZvZj_H.js";
|
|
3
|
+
import { I as K } from "./chunk-QZHKN3VN-Cmhrs4io.js";
|
|
4
|
+
import { _ as l, q as U, p as V, s as X, g as J, a as Q, b as Z, l as m, c as rr, d as er, u as tr, C as ar, y as sr, k as C, D as nr, E as or, F as cr, G as ir } from "./index-0M7iCg0y.js";
|
|
5
|
+
import { p as dr } from "./mermaid-parser.core-DGRDGxqQ.js";
|
|
6
6
|
var x = {
|
|
7
7
|
NORMAL: 0,
|
|
8
8
|
REVERSE: 1,
|