@wandox/sdk 0.1.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 +59 -0
- package/dist/arc-BJMRTG9S.cjs +1 -0
- package/dist/arc-Vdco0qfw.js +83 -0
- package/dist/architectureDiagram-3BPJPVTR-BjEqcvey.js +4695 -0
- package/dist/architectureDiagram-3BPJPVTR-BvjJfAkh.cjs +36 -0
- package/dist/blockDiagram-GPEHLZMM-B1xf7RE9.js +2427 -0
- package/dist/blockDiagram-GPEHLZMM-B5VqovGY.cjs +132 -0
- package/dist/c4Diagram-AAUBKEIU-C4kjMRea.js +1578 -0
- package/dist/c4Diagram-AAUBKEIU-Ck5uEnJI.cjs +10 -0
- package/dist/channel-DlRtLuYv.js +5 -0
- package/dist/channel-Dm_yrRYJ.cjs +1 -0
- package/dist/chunk-2J33WTMH-CG2n_n4y.cjs +1 -0
- package/dist/chunk-2J33WTMH-CWvmGb4H.js +20 -0
- package/dist/chunk-4BX2VUAB-Bq3GzsD8.js +9 -0
- package/dist/chunk-4BX2VUAB-CdMctZeT.cjs +1 -0
- package/dist/chunk-55IACEB6-BdJhzL0d.js +8 -0
- package/dist/chunk-55IACEB6-sHyHtvg8.cjs +1 -0
- package/dist/chunk-727SXJPM-D-Vmam30.cjs +206 -0
- package/dist/chunk-727SXJPM-DmruCqjM.js +1529 -0
- package/dist/chunk-AQP2D5EJ-CWhKjcV3.cjs +231 -0
- package/dist/chunk-AQP2D5EJ-Ca0ak6w7.js +1399 -0
- package/dist/chunk-FMBD7UC4-CqV0NWQQ.js +19 -0
- package/dist/chunk-FMBD7UC4-DOxtd0OO.cjs +15 -0
- package/dist/chunk-ND2GUHAM-6EMX5Mu8.js +68 -0
- package/dist/chunk-ND2GUHAM-BXeDBtSC.cjs +1 -0
- package/dist/chunk-QZHKN3VN-B7FSI55w.js +15 -0
- package/dist/chunk-QZHKN3VN-CbbdNKnD.cjs +1 -0
- package/dist/classDiagram-4FO5ZUOK-0Kaf7WfA.js +16 -0
- package/dist/classDiagram-4FO5ZUOK-C4it2xBI.cjs +1 -0
- package/dist/classDiagram-v2-Q7XG4LA2-Byom5adL.js +16 -0
- package/dist/classDiagram-v2-Q7XG4LA2-C4it2xBI.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-CuUv9oIm.js +2606 -0
- package/dist/cose-bilkent-S5V4N54A-Dh6nTopA.cjs +1 -0
- package/dist/cytoscape.esm-Cp8cXbK2.js +18729 -0
- package/dist/cytoscape.esm-fcqEUasK.cjs +331 -0
- package/dist/dagre-BM42HDAG-CwxJjZ2n.cjs +4 -0
- package/dist/dagre-BM42HDAG-DMBidMxP.js +448 -0
- package/dist/defaultLocale-BDVPUiG2.js +171 -0
- package/dist/defaultLocale-k2G_58r6.cjs +1 -0
- package/dist/diagram-2AECGRRQ-B2a4nXgJ.js +221 -0
- package/dist/diagram-2AECGRRQ-r7De7taS.cjs +43 -0
- package/dist/diagram-5GNKFQAL-CDiO79WC.cjs +10 -0
- package/dist/diagram-5GNKFQAL-DrHBNZzF.js +123 -0
- package/dist/diagram-KO2AKTUF-BcjWCXZr.js +466 -0
- package/dist/diagram-KO2AKTUF-CDlJCxVO.cjs +3 -0
- package/dist/diagram-LMA3HP47-BXFSAyNV.cjs +24 -0
- package/dist/diagram-LMA3HP47-DJxmyqn0.js +143 -0
- package/dist/diagram-OG6HWLK6-ATK__ca8.js +531 -0
- package/dist/diagram-OG6HWLK6-CgIyEO8_.cjs +24 -0
- package/dist/erDiagram-TEJ5UH35-D4baWNzQ.js +900 -0
- package/dist/erDiagram-TEJ5UH35-Dyuc5EB6.cjs +85 -0
- package/dist/flowDiagram-I6XJVG4X-BMZOncyU.js +1635 -0
- package/dist/flowDiagram-I6XJVG4X-C45fICr4.cjs +162 -0
- package/dist/ganttDiagram-6RSMTGT7-CiYZmmke.js +2526 -0
- package/dist/ganttDiagram-6RSMTGT7-Cxoj6IK8.cjs +292 -0
- package/dist/gitGraphDiagram-PVQCEYII-CQ9bNuwN.js +828 -0
- package/dist/gitGraphDiagram-PVQCEYII-rlaY9dfj.cjs +106 -0
- package/dist/graph-CBizzZ7K.js +1545 -0
- package/dist/graph-V5BNIbHU.cjs +1 -0
- package/dist/index-jBRold1l.js +173159 -0
- package/dist/index-sFrjovbM.cjs +804 -0
- package/dist/index.d.ts +54 -0
- package/dist/infoDiagram-5YYISTIA-CAzYIvUX.js +24 -0
- package/dist/infoDiagram-5YYISTIA-zX5rQglQ.cjs +2 -0
- package/dist/init-CHZsXQcr.cjs +1 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/ishikawaDiagram-YF4QCWOH-09prKBsn.cjs +70 -0
- package/dist/ishikawaDiagram-YF4QCWOH-Co8BnN24.js +622 -0
- package/dist/journeyDiagram-JHISSGLW-DkdWRF_-.cjs +139 -0
- package/dist/journeyDiagram-JHISSGLW-riCLiMCC.js +836 -0
- package/dist/kanban-definition-UN3LZRKU-DWipOCsx.cjs +89 -0
- package/dist/kanban-definition-UN3LZRKU-SRyCSn2H.js +725 -0
- package/dist/katex-Cf_UVKIT.cjs +257 -0
- package/dist/katex-RNjvZ8pg.js +11681 -0
- package/dist/layout-CbksXFOD.js +1728 -0
- package/dist/layout-Dh52gsIJ.cjs +1 -0
- package/dist/linear-C3xSMJV8.cjs +1 -0
- package/dist/linear-CmUCzX9U.js +259 -0
- package/dist/mermaid.core-BzNKr-OJ.cjs +308 -0
- package/dist/mermaid.core-CdBIz6FY.js +15475 -0
- package/dist/mindmap-definition-RKZ34NQL-Cs63oyIX.cjs +96 -0
- package/dist/mindmap-definition-RKZ34NQL-Gcma5iTd.js +830 -0
- package/dist/ordinal-CagbB1m8.cjs +1 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/pieDiagram-4H26LBE5-CBGkD8dp.cjs +30 -0
- package/dist/pieDiagram-4H26LBE5-DSL8cVK1.js +164 -0
- package/dist/quadrantDiagram-W4KKPZXB-D3nCWRjF.cjs +7 -0
- package/dist/quadrantDiagram-W4KKPZXB-uod6bhUy.js +1026 -0
- package/dist/requirementDiagram-4Y6WPE33-Bc_6y7SM.js +884 -0
- package/dist/requirementDiagram-4Y6WPE33-D2mHlh5i.cjs +84 -0
- package/dist/sankeyDiagram-5OEKKPKP-DL_kXejW.cjs +40 -0
- package/dist/sankeyDiagram-5OEKKPKP-DMsjY4G4.js +847 -0
- package/dist/sequenceDiagram-3UESZ5HK-CBGalGOV.cjs +162 -0
- package/dist/sequenceDiagram-3UESZ5HK-CH2Z-Pis.js +2901 -0
- package/dist/stateDiagram-AJRCARHV-gEqlAI6t.js +263 -0
- package/dist/stateDiagram-AJRCARHV-rNMrAI-A.cjs +1 -0
- package/dist/stateDiagram-v2-BHNVJYJU-CDj7L1wi.js +16 -0
- package/dist/stateDiagram-v2-BHNVJYJU-LLlFJ1GM.cjs +1 -0
- package/dist/timeline-definition-PNZ67QCA-Bbuv3uu-.cjs +120 -0
- package/dist/timeline-definition-PNZ67QCA-DrGFbQdC.js +1068 -0
- package/dist/types.d.ts +295 -0
- package/dist/vennDiagram-CIIHVFJN-CGcAwVxU.js +1564 -0
- package/dist/vennDiagram-CIIHVFJN-DsSjXluJ.cjs +34 -0
- package/dist/wandox.cjs +1 -0
- package/dist/wandox.css +1 -0
- package/dist/wandox.js +6 -0
- package/dist/wandox.umd.js +4172 -0
- package/dist/wardley-L42UT6IY-DUnkyH_z.js +22539 -0
- package/dist/wardley-L42UT6IY-tDp0NbFW.cjs +165 -0
- package/dist/wardleyDiagram-YWT4CUSO-CB_Qa4lR.js +684 -0
- package/dist/wardleyDiagram-YWT4CUSO-D0BUmvVW.cjs +78 -0
- package/dist/xychartDiagram-2RQKCTM6-Bcq-ACuw.js +1342 -0
- package/dist/xychartDiagram-2RQKCTM6-BjeAPKLo.cjs +7 -0
- package/package.json +42 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { a$ as k, $ as R, a3 as E, b2 as I, a0 as _, b0 as F, b as l, a_ as D, t as z, s as f, a1 as C, Q as G, aB as P, ac as B, E as W } from "./mermaid.core-CdBIz6FY.js";
|
|
2
|
+
import { p as V } from "./chunk-4BX2VUAB-Bq3GzsD8.js";
|
|
3
|
+
import { p as H } from "./wardley-L42UT6IY-DUnkyH_z.js";
|
|
4
|
+
var m = {
|
|
5
|
+
showLegend: !0,
|
|
6
|
+
ticks: 5,
|
|
7
|
+
max: null,
|
|
8
|
+
min: 0,
|
|
9
|
+
graticule: "circle"
|
|
10
|
+
}, b = {
|
|
11
|
+
axes: [],
|
|
12
|
+
curves: [],
|
|
13
|
+
options: m
|
|
14
|
+
}, x = structuredClone(b), j = G.radar, N = /* @__PURE__ */ l(() => f({
|
|
15
|
+
...j,
|
|
16
|
+
...C().radar
|
|
17
|
+
}), "getConfig"), w = /* @__PURE__ */ l(() => x.axes, "getAxes"), Q = /* @__PURE__ */ l(() => x.curves, "getCurves"), U = /* @__PURE__ */ l(() => x.options, "getOptions"), X = /* @__PURE__ */ l((a) => {
|
|
18
|
+
x.axes = a.map((t) => ({
|
|
19
|
+
name: t.name,
|
|
20
|
+
label: t.label ?? t.name
|
|
21
|
+
}));
|
|
22
|
+
}, "setAxes"), Y = /* @__PURE__ */ l((a) => {
|
|
23
|
+
x.curves = a.map((t) => ({
|
|
24
|
+
name: t.name,
|
|
25
|
+
label: t.label ?? t.name,
|
|
26
|
+
entries: Z(t.entries)
|
|
27
|
+
}));
|
|
28
|
+
}, "setCurves"), Z = /* @__PURE__ */ l((a) => {
|
|
29
|
+
if (a[0].axis == null)
|
|
30
|
+
return a.map((e) => e.value);
|
|
31
|
+
const t = w();
|
|
32
|
+
if (t.length === 0)
|
|
33
|
+
throw new Error("Axes must be populated before curves for reference entries");
|
|
34
|
+
return t.map((e) => {
|
|
35
|
+
const r = a.find((s) => {
|
|
36
|
+
var o;
|
|
37
|
+
return ((o = s.axis) == null ? void 0 : o.$refText) === e.name;
|
|
38
|
+
});
|
|
39
|
+
if (r === void 0)
|
|
40
|
+
throw new Error("Missing entry for axis " + e.label);
|
|
41
|
+
return r.value;
|
|
42
|
+
});
|
|
43
|
+
}, "computeCurveEntries"), q = /* @__PURE__ */ l((a) => {
|
|
44
|
+
var e, r, s, o, i;
|
|
45
|
+
const t = a.reduce(
|
|
46
|
+
(n, c) => (n[c.name] = c, n),
|
|
47
|
+
{}
|
|
48
|
+
);
|
|
49
|
+
x.options = {
|
|
50
|
+
showLegend: ((e = t.showLegend) == null ? void 0 : e.value) ?? m.showLegend,
|
|
51
|
+
ticks: ((r = t.ticks) == null ? void 0 : r.value) ?? m.ticks,
|
|
52
|
+
max: ((s = t.max) == null ? void 0 : s.value) ?? m.max,
|
|
53
|
+
min: ((o = t.min) == null ? void 0 : o.value) ?? m.min,
|
|
54
|
+
graticule: ((i = t.graticule) == null ? void 0 : i.value) ?? m.graticule
|
|
55
|
+
};
|
|
56
|
+
}, "setOptions"), J = /* @__PURE__ */ l(() => {
|
|
57
|
+
z(), x = structuredClone(b);
|
|
58
|
+
}, "clear"), $ = {
|
|
59
|
+
getAxes: w,
|
|
60
|
+
getCurves: Q,
|
|
61
|
+
getOptions: U,
|
|
62
|
+
setAxes: X,
|
|
63
|
+
setCurves: Y,
|
|
64
|
+
setOptions: q,
|
|
65
|
+
getConfig: N,
|
|
66
|
+
clear: J,
|
|
67
|
+
setAccTitle: F,
|
|
68
|
+
getAccTitle: _,
|
|
69
|
+
setDiagramTitle: I,
|
|
70
|
+
getDiagramTitle: E,
|
|
71
|
+
getAccDescription: R,
|
|
72
|
+
setAccDescription: k
|
|
73
|
+
}, K = /* @__PURE__ */ l((a) => {
|
|
74
|
+
V(a, $);
|
|
75
|
+
const { axes: t, curves: e, options: r } = a;
|
|
76
|
+
$.setAxes(t), $.setCurves(e), $.setOptions(r);
|
|
77
|
+
}, "populate"), tt = {
|
|
78
|
+
parse: /* @__PURE__ */ l(async (a) => {
|
|
79
|
+
const t = await H("radar", a);
|
|
80
|
+
P.debug(t), K(t);
|
|
81
|
+
}, "parse")
|
|
82
|
+
}, et = /* @__PURE__ */ l((a, t, e, r) => {
|
|
83
|
+
const s = r.db, o = s.getAxes(), i = s.getCurves(), n = s.getOptions(), c = s.getConfig(), d = s.getDiagramTitle(), p = D(t), u = at(p, c), g = n.max ?? Math.max(...i.map((y) => Math.max(...y.entries))), h = n.min, v = Math.min(c.width, c.height) / 2;
|
|
84
|
+
rt(u, o, v, n.ticks, n.graticule), st(u, o, v, c), M(u, o, i, h, g, n.graticule, c), T(u, i, n.showLegend, c), u.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -c.height / 2 - c.marginTop);
|
|
85
|
+
}, "draw"), at = /* @__PURE__ */ l((a, t) => {
|
|
86
|
+
const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
|
|
87
|
+
x: t.marginLeft + t.width / 2,
|
|
88
|
+
y: t.marginTop + t.height / 2
|
|
89
|
+
};
|
|
90
|
+
return W(a, r, e, t.useMaxWidth ?? !0), a.attr("viewBox", `0 0 ${e} ${r}`), a.append("g").attr("transform", `translate(${s.x}, ${s.y})`);
|
|
91
|
+
}, "drawFrame"), rt = /* @__PURE__ */ l((a, t, e, r, s) => {
|
|
92
|
+
if (s === "circle")
|
|
93
|
+
for (let o = 0; o < r; o++) {
|
|
94
|
+
const i = e * (o + 1) / r;
|
|
95
|
+
a.append("circle").attr("r", i).attr("class", "radarGraticule");
|
|
96
|
+
}
|
|
97
|
+
else if (s === "polygon") {
|
|
98
|
+
const o = t.length;
|
|
99
|
+
for (let i = 0; i < r; i++) {
|
|
100
|
+
const n = e * (i + 1) / r, c = t.map((d, p) => {
|
|
101
|
+
const u = 2 * p * Math.PI / o - Math.PI / 2, g = n * Math.cos(u), h = n * Math.sin(u);
|
|
102
|
+
return `${g},${h}`;
|
|
103
|
+
}).join(" ");
|
|
104
|
+
a.append("polygon").attr("points", c).attr("class", "radarGraticule");
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}, "drawGraticule"), st = /* @__PURE__ */ l((a, t, e, r) => {
|
|
108
|
+
const s = t.length;
|
|
109
|
+
for (let o = 0; o < s; o++) {
|
|
110
|
+
const i = t[o].label, n = 2 * o * Math.PI / s - Math.PI / 2;
|
|
111
|
+
a.append("line").attr("x1", 0).attr("y1", 0).attr("x2", e * r.axisScaleFactor * Math.cos(n)).attr("y2", e * r.axisScaleFactor * Math.sin(n)).attr("class", "radarAxisLine"), a.append("text").text(i).attr("x", e * r.axisLabelFactor * Math.cos(n)).attr("y", e * r.axisLabelFactor * Math.sin(n)).attr("class", "radarAxisLabel");
|
|
112
|
+
}
|
|
113
|
+
}, "drawAxes");
|
|
114
|
+
function M(a, t, e, r, s, o, i) {
|
|
115
|
+
const n = t.length, c = Math.min(i.width, i.height) / 2;
|
|
116
|
+
e.forEach((d, p) => {
|
|
117
|
+
if (d.entries.length !== n)
|
|
118
|
+
return;
|
|
119
|
+
const u = d.entries.map((g, h) => {
|
|
120
|
+
const v = 2 * Math.PI * h / n - Math.PI / 2, y = A(g, r, s, c), O = y * Math.cos(v), S = y * Math.sin(v);
|
|
121
|
+
return { x: O, y: S };
|
|
122
|
+
});
|
|
123
|
+
o === "circle" ? a.append("path").attr("d", L(u, i.curveTension)).attr("class", `radarCurve-${p}`) : o === "polygon" && a.append("polygon").attr("points", u.map((g) => `${g.x},${g.y}`).join(" ")).attr("class", `radarCurve-${p}`);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
l(M, "drawCurves");
|
|
127
|
+
function A(a, t, e, r) {
|
|
128
|
+
const s = Math.min(Math.max(a, t), e);
|
|
129
|
+
return r * (s - t) / (e - t);
|
|
130
|
+
}
|
|
131
|
+
l(A, "relativeRadius");
|
|
132
|
+
function L(a, t) {
|
|
133
|
+
const e = a.length;
|
|
134
|
+
let r = `M${a[0].x},${a[0].y}`;
|
|
135
|
+
for (let s = 0; s < e; s++) {
|
|
136
|
+
const o = a[(s - 1 + e) % e], i = a[s], n = a[(s + 1) % e], c = a[(s + 2) % e], d = {
|
|
137
|
+
x: i.x + (n.x - o.x) * t,
|
|
138
|
+
y: i.y + (n.y - o.y) * t
|
|
139
|
+
}, p = {
|
|
140
|
+
x: n.x - (c.x - i.x) * t,
|
|
141
|
+
y: n.y - (c.y - i.y) * t
|
|
142
|
+
};
|
|
143
|
+
r += ` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`;
|
|
144
|
+
}
|
|
145
|
+
return `${r} Z`;
|
|
146
|
+
}
|
|
147
|
+
l(L, "closedRoundCurve");
|
|
148
|
+
function T(a, t, e, r) {
|
|
149
|
+
if (!e)
|
|
150
|
+
return;
|
|
151
|
+
const s = (r.width / 2 + r.marginRight) * 3 / 4, o = -(r.height / 2 + r.marginTop) * 3 / 4, i = 20;
|
|
152
|
+
t.forEach((n, c) => {
|
|
153
|
+
const d = a.append("g").attr("transform", `translate(${s}, ${o + c * i})`);
|
|
154
|
+
d.append("rect").attr("width", 12).attr("height", 12).attr("class", `radarLegendBox-${c}`), d.append("text").attr("x", 16).attr("y", 0).attr("class", "radarLegendText").text(n.label);
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
l(T, "drawLegend");
|
|
158
|
+
var nt = { draw: et }, ot = /* @__PURE__ */ l((a, t) => {
|
|
159
|
+
let e = "";
|
|
160
|
+
for (let r = 0; r < a.THEME_COLOR_LIMIT; r++) {
|
|
161
|
+
const s = a[`cScale${r}`];
|
|
162
|
+
e += `
|
|
163
|
+
.radarCurve-${r} {
|
|
164
|
+
color: ${s};
|
|
165
|
+
fill: ${s};
|
|
166
|
+
fill-opacity: ${t.curveOpacity};
|
|
167
|
+
stroke: ${s};
|
|
168
|
+
stroke-width: ${t.curveStrokeWidth};
|
|
169
|
+
}
|
|
170
|
+
.radarLegendBox-${r} {
|
|
171
|
+
fill: ${s};
|
|
172
|
+
fill-opacity: ${t.curveOpacity};
|
|
173
|
+
stroke: ${s};
|
|
174
|
+
}
|
|
175
|
+
`;
|
|
176
|
+
}
|
|
177
|
+
return e;
|
|
178
|
+
}, "genIndexStyles"), it = /* @__PURE__ */ l((a) => {
|
|
179
|
+
const t = B(), e = C(), r = f(t, e.themeVariables), s = f(r.radar, a);
|
|
180
|
+
return { themeVariables: r, radarOptions: s };
|
|
181
|
+
}, "buildRadarStyleOptions"), lt = /* @__PURE__ */ l(({ radar: a } = {}) => {
|
|
182
|
+
const { themeVariables: t, radarOptions: e } = it(a);
|
|
183
|
+
return `
|
|
184
|
+
.radarTitle {
|
|
185
|
+
font-size: ${t.fontSize};
|
|
186
|
+
color: ${t.titleColor};
|
|
187
|
+
dominant-baseline: hanging;
|
|
188
|
+
text-anchor: middle;
|
|
189
|
+
}
|
|
190
|
+
.radarAxisLine {
|
|
191
|
+
stroke: ${e.axisColor};
|
|
192
|
+
stroke-width: ${e.axisStrokeWidth};
|
|
193
|
+
}
|
|
194
|
+
.radarAxisLabel {
|
|
195
|
+
dominant-baseline: middle;
|
|
196
|
+
text-anchor: middle;
|
|
197
|
+
font-size: ${e.axisLabelFontSize}px;
|
|
198
|
+
color: ${e.axisColor};
|
|
199
|
+
}
|
|
200
|
+
.radarGraticule {
|
|
201
|
+
fill: ${e.graticuleColor};
|
|
202
|
+
fill-opacity: ${e.graticuleOpacity};
|
|
203
|
+
stroke: ${e.graticuleColor};
|
|
204
|
+
stroke-width: ${e.graticuleStrokeWidth};
|
|
205
|
+
}
|
|
206
|
+
.radarLegendText {
|
|
207
|
+
text-anchor: start;
|
|
208
|
+
font-size: ${e.legendFontSize}px;
|
|
209
|
+
dominant-baseline: hanging;
|
|
210
|
+
}
|
|
211
|
+
${ot(t, e)}
|
|
212
|
+
`;
|
|
213
|
+
}, "styles"), pt = {
|
|
214
|
+
parser: tt,
|
|
215
|
+
db: $,
|
|
216
|
+
renderer: nt,
|
|
217
|
+
styles: lt
|
|
218
|
+
};
|
|
219
|
+
export {
|
|
220
|
+
pt as diagram
|
|
221
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./mermaid.core-BzNKr-OJ.cjs"),L=require("./chunk-4BX2VUAB-CdMctZeT.cjs"),O=require("./wardley-L42UT6IY-tDp0NbFW.cjs");var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y={axes:[],curves:[],options:h},p=structuredClone(y),S=s.defaultConfig_default.radar,k=s.__name(()=>s.cleanAndMerge({...S,...s.getConfig().radar}),"getConfig"),f=s.__name(()=>p.axes,"getAxes"),D=s.__name(()=>p.curves,"getCurves"),I=s.__name(()=>p.options,"getOptions"),R=s.__name(a=>{p.axes=a.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),E=s.__name(a=>{p.curves=a.map(e=>({name:e.name,label:e.label??e.name,entries:F(e.entries)}))},"setCurves"),F=s.__name(a=>{if(a[0].axis==null)return a.map(t=>t.value);const e=f();if(e.length===0)throw new Error("Axes must be populated before curves for reference entries");return e.map(t=>{const r=a.find(n=>{var o;return((o=n.axis)==null?void 0:o.$refText)===t.name});if(r===void 0)throw new Error("Missing entry for axis "+t.label);return r.value})},"computeCurveEntries"),P=s.__name(a=>{var t,r,n,o,l;const e=a.reduce((i,c)=>(i[c.name]=c,i),{});p.options={showLegend:((t=e.showLegend)==null?void 0:t.value)??h.showLegend,ticks:((r=e.ticks)==null?void 0:r.value)??h.ticks,max:((n=e.max)==null?void 0:n.value)??h.max,min:((o=e.min)==null?void 0:o.value)??h.min,graticule:((l=e.graticule)==null?void 0:l.value)??h.graticule}},"setOptions"),z=s.__name(()=>{s.clear(),p=structuredClone(y)},"clear"),$={getAxes:f,getCurves:D,getOptions:I,setAxes:R,setCurves:E,setOptions:P,getConfig:k,clear:z,setAccTitle:s.setAccTitle,getAccTitle:s.getAccTitle,setDiagramTitle:s.setDiagramTitle,getDiagramTitle:s.getDiagramTitle,getAccDescription:s.getAccDescription,setAccDescription:s.setAccDescription},G=s.__name(a=>{L.populateCommonDb(a,$);const{axes:e,curves:t,options:r}=a;$.setAxes(e),$.setCurves(t),$.setOptions(r)},"populate"),B={parse:s.__name(async a=>{const e=await O.parse("radar",a);s.log.debug(e),G(e)},"parse")},V=s.__name((a,e,t,r)=>{const n=r.db,o=n.getAxes(),l=n.getCurves(),i=n.getOptions(),c=n.getConfig(),d=n.getDiagramTitle(),m=s.selectSvgElement(e),u=W(m,c),g=i.max??Math.max(...l.map(_=>Math.max(..._.entries))),x=i.min,v=Math.min(c.width,c.height)/2;j(u,o,v,i.ticks,i.graticule),q(u,o,v,c),C(u,o,l,x,g,i.graticule,c),A(u,l,i.showLegend,c),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),W=s.__name((a,e)=>{const t=e.width+e.marginLeft+e.marginRight,r=e.height+e.marginTop+e.marginBottom,n={x:e.marginLeft+e.width/2,y:e.marginTop+e.height/2};return s.configureSvgSize(a,r,t,e.useMaxWidth??!0),a.attr("viewBox",`0 0 ${t} ${r}`),a.append("g").attr("transform",`translate(${n.x}, ${n.y})`)},"drawFrame"),j=s.__name((a,e,t,r,n)=>{if(n==="circle")for(let o=0;o<r;o++){const l=t*(o+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(n==="polygon"){const o=e.length;for(let l=0;l<r;l++){const i=t*(l+1)/r,c=e.map((d,m)=>{const u=2*m*Math.PI/o-Math.PI/2,g=i*Math.cos(u),x=i*Math.sin(u);return`${g},${x}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),q=s.__name((a,e,t,r)=>{const n=e.length;for(let o=0;o<n;o++){const l=e[o].label,i=2*o*Math.PI/n-Math.PI/2;a.append("line").attr("x1",0).attr("y1",0).attr("x2",t*r.axisScaleFactor*Math.cos(i)).attr("y2",t*r.axisScaleFactor*Math.sin(i)).attr("class","radarAxisLine"),a.append("text").text(l).attr("x",t*r.axisLabelFactor*Math.cos(i)).attr("y",t*r.axisLabelFactor*Math.sin(i)).attr("class","radarAxisLabel")}},"drawAxes");function C(a,e,t,r,n,o,l){const i=e.length,c=Math.min(l.width,l.height)/2;t.forEach((d,m)=>{if(d.entries.length!==i)return;const u=d.entries.map((g,x)=>{const v=2*Math.PI*x/i-Math.PI/2,_=w(g,r,n,c),M=_*Math.cos(v),T=_*Math.sin(v);return{x:M,y:T}});o==="circle"?a.append("path").attr("d",b(u,l.curveTension)).attr("class",`radarCurve-${m}`):o==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${m}`)})}s.__name(C,"drawCurves");function w(a,e,t,r){const n=Math.min(Math.max(a,e),t);return r*(n-e)/(t-e)}s.__name(w,"relativeRadius");function b(a,e){const t=a.length;let r=`M${a[0].x},${a[0].y}`;for(let n=0;n<t;n++){const o=a[(n-1+t)%t],l=a[n],i=a[(n+1)%t],c=a[(n+2)%t],d={x:l.x+(i.x-o.x)*e,y:l.y+(i.y-o.y)*e},m={x:i.x-(c.x-l.x)*e,y:i.y-(c.y-l.y)*e};r+=` C${d.x},${d.y} ${m.x},${m.y} ${i.x},${i.y}`}return`${r} Z`}s.__name(b,"closedRoundCurve");function A(a,e,t,r){if(!t)return;const n=(r.width/2+r.marginRight)*3/4,o=-(r.height/2+r.marginTop)*3/4,l=20;e.forEach((i,c)=>{const d=a.append("g").attr("transform",`translate(${n}, ${o+c*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(i.label)})}s.__name(A,"drawLegend");var H={draw:V},U=s.__name((a,e)=>{let t="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const n=a[`cScale${r}`];t+=`
|
|
2
|
+
.radarCurve-${r} {
|
|
3
|
+
color: ${n};
|
|
4
|
+
fill: ${n};
|
|
5
|
+
fill-opacity: ${e.curveOpacity};
|
|
6
|
+
stroke: ${n};
|
|
7
|
+
stroke-width: ${e.curveStrokeWidth};
|
|
8
|
+
}
|
|
9
|
+
.radarLegendBox-${r} {
|
|
10
|
+
fill: ${n};
|
|
11
|
+
fill-opacity: ${e.curveOpacity};
|
|
12
|
+
stroke: ${n};
|
|
13
|
+
}
|
|
14
|
+
`}return t},"genIndexStyles"),X=s.__name(a=>{const e=s.getThemeVariables3(),t=s.getConfig(),r=s.cleanAndMerge(e,t.themeVariables),n=s.cleanAndMerge(r.radar,a);return{themeVariables:r,radarOptions:n}},"buildRadarStyleOptions"),Y=s.__name(({radar:a}={})=>{const{themeVariables:e,radarOptions:t}=X(a);return`
|
|
15
|
+
.radarTitle {
|
|
16
|
+
font-size: ${e.fontSize};
|
|
17
|
+
color: ${e.titleColor};
|
|
18
|
+
dominant-baseline: hanging;
|
|
19
|
+
text-anchor: middle;
|
|
20
|
+
}
|
|
21
|
+
.radarAxisLine {
|
|
22
|
+
stroke: ${t.axisColor};
|
|
23
|
+
stroke-width: ${t.axisStrokeWidth};
|
|
24
|
+
}
|
|
25
|
+
.radarAxisLabel {
|
|
26
|
+
dominant-baseline: middle;
|
|
27
|
+
text-anchor: middle;
|
|
28
|
+
font-size: ${t.axisLabelFontSize}px;
|
|
29
|
+
color: ${t.axisColor};
|
|
30
|
+
}
|
|
31
|
+
.radarGraticule {
|
|
32
|
+
fill: ${t.graticuleColor};
|
|
33
|
+
fill-opacity: ${t.graticuleOpacity};
|
|
34
|
+
stroke: ${t.graticuleColor};
|
|
35
|
+
stroke-width: ${t.graticuleStrokeWidth};
|
|
36
|
+
}
|
|
37
|
+
.radarLegendText {
|
|
38
|
+
text-anchor: start;
|
|
39
|
+
font-size: ${t.legendFontSize}px;
|
|
40
|
+
dominant-baseline: hanging;
|
|
41
|
+
}
|
|
42
|
+
${U(e,t)}
|
|
43
|
+
`},"styles"),N={parser:B,db:$,renderer:H,styles:Y};exports.diagram=N;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid.core-BzNKr-OJ.cjs"),w=require("./chunk-4BX2VUAB-CdMctZeT.cjs"),b=require("./chunk-QZHKN3VN-CbbdNKnD.cjs"),k=require("./wardley-L42UT6IY-tDp0NbFW.cjs");var l=new b.ImperativeState(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),$=e.__name(()=>{l.reset(),e.clear()},"clear"),T=e.__name(()=>l.records.stack[0],"getRoot"),x=e.__name(()=>l.records.cnt,"getCount"),C=e.defaultConfig_default.treeView,y=e.__name(()=>e.cleanAndMerge(C,e.getConfig().treeView),"getConfig"),B=e.__name((t,r)=>{for(;t<=l.records.stack[l.records.stack.length-1].level;)l.records.stack.pop();const a={id:l.records.cnt++,level:t,name:r,children:[]};l.records.stack[l.records.stack.length-1].children.push(a),l.records.stack.push(a)},"addNode"),f={clear:$,addNode:B,getRoot:T,getCount:x,getConfig:y,getAccTitle:e.getAccTitle,getAccDescription:e.getAccDescription,getDiagramTitle:e.getDiagramTitle,setAccDescription:e.setAccDescription,setAccTitle:e.setAccTitle,setDiagramTitle:e.setDiagramTitle},u=f,A=e.__name(t=>{w.populateCommonDb(t,u),t.nodes.map(r=>u.addNode(r.indent?parseInt(r.indent):0,r.name))},"populate"),V={parse:e.__name(async t=>{const r=await k.parse("treeView",t);e.log.debug(r),A(r)},"parse")},D=e.__name((t,r,a,i,o)=>{const c=i.append("text").text(a.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:g,width:n}=c.node().getBBox(),d=g+o.paddingY*2,s=n+o.paddingX*2;c.attr("x",t+o.paddingX),c.attr("y",r+d/2),a.BBox={x:t,y:r,width:s,height:d}},"positionLabel"),v=e.__name((t,r,a,i,o,c)=>t.append("line").attr("x1",r).attr("y1",a).attr("x2",i).attr("y2",o).attr("stroke-width",c).attr("class","treeView-node-line"),"positionLine"),N=e.__name((t,r,a)=>{let i=0,o=0;const c=e.__name((n,d,s,p)=>{const m=p*(s.rowIndent+s.paddingX);D(m,i,d,n,s);const{height:h,width:_}=d.BBox;v(n,m-s.rowIndent,i+h/2,m,i+h/2,s.lineThickness),o=Math.max(o,m+_),i+=h},"drawNode"),g=e.__name((n,d=0)=>{c(t,n,a,d),n.children.forEach(h=>{g(h,d+1)});const{x:s,y:p,height:m}=n.BBox;if(n.children.length){const{y:h,height:_}=n.children[n.children.length-1].BBox;v(t,s+a.paddingX,p+m,s+a.paddingX,h+_/2+a.lineThickness/2,a.lineThickness)}},"processNode");return g(r),{totalHeight:i,totalWidth:o}},"drawTree"),S=e.__name((t,r,a,i)=>{e.log.debug(`Rendering treeView diagram
|
|
2
|
+
`+t);const o=i.db,c=o.getRoot(),g=o.getConfig(),n=e.selectSvgElement(r),d=n.append("g");d.attr("class","tree-view");const{totalHeight:s,totalWidth:p}=N(d,c,g);n.attr("viewBox",`-${g.lineThickness/2} 0 ${p} ${s}`),e.configureSvgSize(n,s,p,g.useMaxWidth)},"draw"),X={draw:S},H=X,I={labelFontSize:"16px",labelColor:"black",lineColor:"black"},L=e.__name(({treeView:t})=>{const{labelFontSize:r,labelColor:a,lineColor:i}=e.cleanAndMerge(I,t);return`
|
|
3
|
+
.treeView-node-label {
|
|
4
|
+
font-size: ${r};
|
|
5
|
+
fill: ${a};
|
|
6
|
+
}
|
|
7
|
+
.treeView-node-line {
|
|
8
|
+
stroke: ${i};
|
|
9
|
+
}
|
|
10
|
+
`},"styles"),M=L,q={db:u,renderer:H,parser:V,styles:M};exports.diagram=q;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { b2 as k, b0 as x, a$ as f, a3 as C, $ as B, a0 as T, b as s, s as u, aB as $, a_ as y, E as V, a1 as N, t as _, Q as S } from "./mermaid.core-CdBIz6FY.js";
|
|
2
|
+
import { p as D } from "./chunk-4BX2VUAB-Bq3GzsD8.js";
|
|
3
|
+
import { I as A } from "./chunk-QZHKN3VN-B7FSI55w.js";
|
|
4
|
+
import { p as I } from "./wardley-L42UT6IY-DUnkyH_z.js";
|
|
5
|
+
var l = new A(() => ({
|
|
6
|
+
cnt: 1,
|
|
7
|
+
stack: [
|
|
8
|
+
{
|
|
9
|
+
id: 0,
|
|
10
|
+
level: -1,
|
|
11
|
+
name: "/",
|
|
12
|
+
children: []
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
})), X = /* @__PURE__ */ s(() => {
|
|
16
|
+
l.reset(), _();
|
|
17
|
+
}, "clear"), z = /* @__PURE__ */ s(() => l.records.stack[0], "getRoot"), E = /* @__PURE__ */ s(() => l.records.cnt, "getCount"), H = S.treeView, L = /* @__PURE__ */ s(() => u(H, N().treeView), "getConfig"), R = /* @__PURE__ */ s((e, t) => {
|
|
18
|
+
for (; e <= l.records.stack[l.records.stack.length - 1].level; )
|
|
19
|
+
l.records.stack.pop();
|
|
20
|
+
const a = {
|
|
21
|
+
id: l.records.cnt++,
|
|
22
|
+
level: e,
|
|
23
|
+
name: t,
|
|
24
|
+
children: []
|
|
25
|
+
};
|
|
26
|
+
l.records.stack[l.records.stack.length - 1].children.push(a), l.records.stack.push(a);
|
|
27
|
+
}, "addNode"), W = {
|
|
28
|
+
clear: X,
|
|
29
|
+
addNode: R,
|
|
30
|
+
getRoot: z,
|
|
31
|
+
getCount: E,
|
|
32
|
+
getConfig: L,
|
|
33
|
+
getAccTitle: T,
|
|
34
|
+
getAccDescription: B,
|
|
35
|
+
getDiagramTitle: C,
|
|
36
|
+
setAccDescription: f,
|
|
37
|
+
setAccTitle: x,
|
|
38
|
+
setDiagramTitle: k
|
|
39
|
+
}, b = W, M = /* @__PURE__ */ s((e) => {
|
|
40
|
+
D(e, b), e.nodes.map((t) => b.addNode(t.indent ? parseInt(t.indent) : 0, t.name));
|
|
41
|
+
}, "populate"), F = {
|
|
42
|
+
parse: /* @__PURE__ */ s(async (e) => {
|
|
43
|
+
const t = await I("treeView", e);
|
|
44
|
+
$.debug(t), M(t);
|
|
45
|
+
}, "parse")
|
|
46
|
+
}, Y = /* @__PURE__ */ s((e, t, a, n, o) => {
|
|
47
|
+
const c = n.append("text").text(a.name).attr("dominant-baseline", "middle").attr("class", "treeView-node-label"), { height: g, width: r } = c.node().getBBox(), d = g + o.paddingY * 2, i = r + o.paddingX * 2;
|
|
48
|
+
c.attr("x", e + o.paddingX), c.attr("y", t + d / 2), a.BBox = {
|
|
49
|
+
x: e,
|
|
50
|
+
y: t,
|
|
51
|
+
width: i,
|
|
52
|
+
height: d
|
|
53
|
+
};
|
|
54
|
+
}, "positionLabel"), m = /* @__PURE__ */ s((e, t, a, n, o, c) => e.append("line").attr("x1", t).attr("y1", a).attr("x2", n).attr("y2", o).attr("stroke-width", c).attr("class", "treeView-node-line"), "positionLine"), Q = /* @__PURE__ */ s((e, t, a) => {
|
|
55
|
+
let n = 0, o = 0;
|
|
56
|
+
const c = /* @__PURE__ */ s((r, d, i, h) => {
|
|
57
|
+
const v = h * (i.rowIndent + i.paddingX);
|
|
58
|
+
Y(v, n, d, r, i);
|
|
59
|
+
const { height: p, width: w } = d.BBox;
|
|
60
|
+
m(
|
|
61
|
+
r,
|
|
62
|
+
v - i.rowIndent,
|
|
63
|
+
n + p / 2,
|
|
64
|
+
v,
|
|
65
|
+
n + p / 2,
|
|
66
|
+
i.lineThickness
|
|
67
|
+
), o = Math.max(o, v + w), n += p;
|
|
68
|
+
}, "drawNode"), g = /* @__PURE__ */ s((r, d = 0) => {
|
|
69
|
+
c(e, r, a, d), r.children.forEach((p) => {
|
|
70
|
+
g(p, d + 1);
|
|
71
|
+
});
|
|
72
|
+
const { x: i, y: h, height: v } = r.BBox;
|
|
73
|
+
if (r.children.length) {
|
|
74
|
+
const { y: p, height: w } = r.children[r.children.length - 1].BBox;
|
|
75
|
+
m(
|
|
76
|
+
e,
|
|
77
|
+
i + a.paddingX,
|
|
78
|
+
h + v,
|
|
79
|
+
i + a.paddingX,
|
|
80
|
+
p + w / 2 + a.lineThickness / 2,
|
|
81
|
+
a.lineThickness
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
}, "processNode");
|
|
85
|
+
return g(t), { totalHeight: n, totalWidth: o };
|
|
86
|
+
}, "drawTree"), j = /* @__PURE__ */ s((e, t, a, n) => {
|
|
87
|
+
$.debug(`Rendering treeView diagram
|
|
88
|
+
` + e);
|
|
89
|
+
const o = n.db, c = o.getRoot(), g = o.getConfig(), r = y(t), d = r.append("g");
|
|
90
|
+
d.attr("class", "tree-view");
|
|
91
|
+
const { totalHeight: i, totalWidth: h } = Q(d, c, g);
|
|
92
|
+
r.attr("viewBox", `-${g.lineThickness / 2} 0 ${h} ${i}`), V(r, i, h, g.useMaxWidth);
|
|
93
|
+
}, "draw"), q = {
|
|
94
|
+
draw: j
|
|
95
|
+
}, G = q, J = {
|
|
96
|
+
labelFontSize: "16px",
|
|
97
|
+
labelColor: "black",
|
|
98
|
+
lineColor: "black"
|
|
99
|
+
}, K = /* @__PURE__ */ s(({
|
|
100
|
+
treeView: e
|
|
101
|
+
}) => {
|
|
102
|
+
const { labelFontSize: t, labelColor: a, lineColor: n } = u(
|
|
103
|
+
J,
|
|
104
|
+
e
|
|
105
|
+
);
|
|
106
|
+
return `
|
|
107
|
+
.treeView-node-label {
|
|
108
|
+
font-size: ${t};
|
|
109
|
+
fill: ${a};
|
|
110
|
+
}
|
|
111
|
+
.treeView-node-line {
|
|
112
|
+
stroke: ${n};
|
|
113
|
+
}
|
|
114
|
+
`;
|
|
115
|
+
}, "styles"), O = K, te = {
|
|
116
|
+
db: b,
|
|
117
|
+
renderer: G,
|
|
118
|
+
parser: F,
|
|
119
|
+
styles: O
|
|
120
|
+
};
|
|
121
|
+
export {
|
|
122
|
+
te as diagram
|
|
123
|
+
};
|