@belonguniverseai/react-sdk 0.6.2 → 0.6.3
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/api/agent-grants.d.ts +6 -0
- package/dist/api/client.d.ts +30 -1
- package/dist/app/call-summary.d.ts +30 -0
- package/dist/component/abnfDiagram-N423BO3Z-C1O9dfJJ.js +90 -0
- package/dist/component/arc-Cpnt_LFj.js +86 -0
- package/dist/component/{architectureDiagram-3BPJPVTR-DYcaPx2M.js → architectureDiagram-T3A2C74G-iakL6yUj.js} +1872 -1785
- package/dist/component/{blockDiagram-GPEHLZMM-BdjruLO5.js → blockDiagram-VBNYF7ZC-D7t0jIvW.js} +895 -894
- package/dist/component/{c4Diagram-AAUBKEIU-Bd2ebSgB.js → c4Diagram-5PPSVZJV-CRX1o0CJ.js} +3 -3
- package/dist/component/{channel-CYFijF_t.js → channel-DnM50Ep0.js} +2 -2
- package/dist/component/{chunk-ND2GUHAM-OX1-DIU1.js → chunk-2GRJ4B5K-ChTMjM-v.js} +5 -5
- package/dist/component/{chunk-QZHKN3VN-DLQ8oUCc.js → chunk-2Q5K7J3B-F2Rpvtwm.js} +2 -2
- package/dist/component/{chunk-AQP2D5EJ-D4G4syYu.js → chunk-5RXB4S5H-B1WLx-ex.js} +399 -378
- package/dist/component/{chunk-FMBD7UC4-CbRxWx_A.js → chunk-5VM5RSS4-D35VMAuN.js} +2 -2
- package/dist/component/chunk-6Q2QTUOP-DGVp_gyk.js +673 -0
- package/dist/component/{chunk-727SXJPM-A5r5oL1_.js → chunk-GF5L2VYU-CZOQEv_q.js} +244 -239
- package/dist/component/{chunk-4BX2VUAB-DVpS0I_p.js → chunk-JWPE2WC7-BbwyDj9g.js} +2 -2
- package/dist/component/{chunk-2J33WTMH-B06Y_xVy.js → chunk-KBJHAD2P-B9qL0VLM.js} +2 -2
- package/dist/component/chunk-RYQCIY6F-5eaMbXXL.js +316 -0
- package/dist/component/{chunk-55IACEB6-DmZctFkK.js → chunk-XXDRQBXY-XJadTIK5.js} +2 -2
- package/dist/component/{classDiagram-4FO5ZUOK-4S9mdFC1.js → classDiagram-JCYQIIEL-DVaEk7uT.js} +3 -3
- package/dist/component/{classDiagram-v2-Q7XG4LA2-4S9mdFC1.js → classDiagram-v2-OCEON4UE-DVaEk7uT.js} +3 -3
- package/dist/component/{cose-bilkent-S5V4N54A-BIrVaakt.js → cose-bilkent-JH36ORCC-DZA30AqI.js} +2 -2
- package/dist/component/{wardley-L42UT6IY-HA1eSIS_.js → cynefin-VYW2F7L2-DAyxamLw.js} +9199 -7918
- package/dist/component/cynefinDiagram-MW4NZA55-CutZScTQ.js +302 -0
- package/dist/component/dagre-VZM6K2ZE-CelPLP8N.js +343 -0
- package/dist/component/diagram-7IWD3JNH-Cr5piwKc.js +353 -0
- package/dist/component/{diagram-KO2AKTUF-Da1E68Eo.js → diagram-B4RE2ZJO-DgLNdZkh.js} +24 -24
- package/dist/component/{diagram-LMA3HP47-dRbk5sBa.js → diagram-LBJQPF4R-DxeIMTjN.js} +23 -23
- package/dist/component/{diagram-OG6HWLK6-CcKT8mhn.js → diagram-Q27KOJAE-WACyk_gr.js} +197 -197
- package/dist/component/diagram-UB23O5K3-DbhVYU5T.js +222 -0
- package/dist/component/ebnfDiagram-BXEA7PRR-DoGrYW10.js +112 -0
- package/dist/component/{erDiagram-TEJ5UH35-3ATYT9J-.js → erDiagram-JOGREHBK-BgewA6fH.js} +142 -131
- package/dist/component/{flowDiagram-I6XJVG4X-D9PLm9Od.js → flowDiagram-UKHOOZJN-1YmYJYcE.js} +268 -258
- package/dist/component/ganttDiagram-PKOTCBZU-BFAEPYkH.js +2714 -0
- package/dist/component/{gitGraphDiagram-PVQCEYII-13gVhAGc.js → gitGraphDiagram-DS77QQ5N-CSiPuE-l.js} +33 -33
- package/dist/component/{graph-BZLHvygk.js → graph-CWpEkm4G.js} +35 -35
- package/dist/component/{highlighted-body-OFNGDK62-DCxRI4UV.js → highlighted-body-OFNGDK62-CSJNGt18.js} +2 -2
- package/dist/component/index.js +2 -2
- package/dist/component/{infoDiagram-5YYISTIA-DymxA7AN.js → infoDiagram-6WML65LV-CoMVfONe.js} +4 -4
- package/dist/component/{ishikawaDiagram-YF4QCWOH-C3sTn76C.js → ishikawaDiagram-WSZJBQD7-B2YEkQ4b.js} +27 -27
- package/dist/component/{journeyDiagram-JHISSGLW-Cq0hOAfJ.js → journeyDiagram-NVQOT4AX-B7b5ZwlF.js} +5 -5
- package/dist/component/{kanban-definition-UN3LZRKU-5tBWjkp7.js → kanban-definition-27J2QSJJ-C9GPAsBR.js} +35 -35
- package/dist/component/layout-Br2UjHRU.js +1522 -0
- package/dist/component/{linear-BT4blD8s.js → linear-Bi0C-9d1.js} +13 -13
- package/dist/component/map-CdwokNh2.js +227 -0
- package/dist/component/{mermaid-GHXKKRXX-DXPXjnb7.js → mermaid-GHXKKRXX-BaBCeViM.js} +25220 -24784
- package/dist/component/{mindmap-definition-RKZ34NQL-DO-OuAQQ.js → mindmap-definition-FAOFIHXS-tHIAo7Ms.js} +26 -26
- package/dist/component/pegDiagram-VL7TDLO6-Db_7lLRV.js +98 -0
- package/dist/component/pieDiagram-7S7Q4E2Y-C4fs4XCK.js +210 -0
- package/dist/component/{quadrantDiagram-W4KKPZXB-CaJWg9ep.js → quadrantDiagram-CIZ2JOQS-Bw7vXO0q.js} +14 -15
- package/dist/component/railroadDiagram-AXF67PYL-kY0VoZEg.js +80 -0
- package/dist/component/{requirementDiagram-4Y6WPE33-CmZrtZqe.js → requirementDiagram-LRYGKXZP-BkNtSZm5.js} +15 -15
- package/dist/component/{sankeyDiagram-5OEKKPKP-Cp95M1aj.js → sankeyDiagram-W5VNT64P-BK_C1BYE.js} +2 -2
- package/dist/component/{sequenceDiagram-3UESZ5HK-C0x0WvhR.js → sequenceDiagram-SI44F4Z6-CEmgVZaE.js} +960 -963
- package/dist/component/sizeCapture-X5ZJPWSS-J5ZNXT4c.js +49 -0
- package/dist/component/{stateDiagram-AJRCARHV-H10vaGL3.js → stateDiagram-OKZ733FA-DrwrNuNs.js} +5 -5
- package/dist/component/{stateDiagram-v2-BHNVJYJU-rj7ljkc-.js → stateDiagram-v2-UEYNNEHI-DHD85VTD.js} +3 -3
- package/dist/component/swimlanes-SLNWSIFB-FOK5tys1.js +5335 -0
- package/dist/component/swimlanesDiagram-ULZ7WXOC-edTvZTge.js +16 -0
- package/dist/component/{timeline-definition-PNZ67QCA-Cil1QaqZ.js → timeline-definition-Z64GVDOM-Cc4fTsjY.js} +15 -15
- package/dist/component/vennDiagram-T6HMQDX7-DYZl8srI.js +1581 -0
- package/dist/component/{wardleyDiagram-YWT4CUSO-Xq5Hnmio.js → wardleyDiagram-T6FBY63Y-BEvv3PjS.js} +15 -15
- package/dist/component/{xychartDiagram-2RQKCTM6-dinwR4Zm.js → xychartDiagram-ELKLHX3M-79AgTtk-.js} +464 -418
- package/dist/embed/voice/line-slots.d.ts +37 -2
- package/dist/embed/voice-call.d.ts +12 -0
- package/dist/i18n/messages/en.d.ts +1 -2
- package/dist/lib/web-storage.d.ts +8 -0
- package/dist/stream/stream-state-store.d.ts +13 -0
- package/dist/types/public.d.ts +3 -0
- package/package.json +1 -1
- package/dist/component/arc-TLcl3N8_.js +0 -86
- package/dist/component/dagre-BM42HDAG-BoPUzTvD.js +0 -448
- package/dist/component/diagram-2AECGRRQ-PIXCGxIt.js +0 -220
- package/dist/component/diagram-5GNKFQAL-CbJxbGBh.js +0 -126
- package/dist/component/ganttDiagram-6RSMTGT7-F_XUzD1p.js +0 -2709
- package/dist/component/layout-Bu6nRdWm.js +0 -1731
- package/dist/component/pieDiagram-4H26LBE5-BkEktPwZ.js +0 -166
- package/dist/component/vennDiagram-CIIHVFJN-Dk8PKmfb.js +0 -1560
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import { s as k, g as I, t as R, q as _, a as E, b as F, _ as l, N as D, B as G, I as y, G as b, K as z, l as P, a4 as B, e as W } from "./mermaid-GHXKKRXX-DXPXjnb7.js";
|
|
2
|
-
import { p as V } from "./chunk-4BX2VUAB-DVpS0I_p.js";
|
|
3
|
-
import { p as H } from "./wardley-L42UT6IY-HA1eSIS_.js";
|
|
4
|
-
globalThis.process = globalThis.process || { env: {} };
|
|
5
|
-
globalThis.global = globalThis.global || globalThis;
|
|
6
|
-
var x = {
|
|
7
|
-
showLegend: !0,
|
|
8
|
-
ticks: 5,
|
|
9
|
-
max: null,
|
|
10
|
-
min: 0,
|
|
11
|
-
graticule: "circle"
|
|
12
|
-
}, C = {
|
|
13
|
-
axes: [],
|
|
14
|
-
curves: [],
|
|
15
|
-
options: x
|
|
16
|
-
}, h = structuredClone(C), j = z.radar, N = /* @__PURE__ */ l(() => y({
|
|
17
|
-
...j,
|
|
18
|
-
...b().radar
|
|
19
|
-
}), "getConfig"), w = /* @__PURE__ */ l(() => h.axes, "getAxes"), q = /* @__PURE__ */ l(() => h.curves, "getCurves"), K = /* @__PURE__ */ l(() => h.options, "getOptions"), U = /* @__PURE__ */ l((a) => {
|
|
20
|
-
h.axes = a.map((t) => ({
|
|
21
|
-
name: t.name,
|
|
22
|
-
label: t.label ?? t.name
|
|
23
|
-
}));
|
|
24
|
-
}, "setAxes"), X = /* @__PURE__ */ l((a) => {
|
|
25
|
-
h.curves = a.map((t) => ({
|
|
26
|
-
name: t.name,
|
|
27
|
-
label: t.label ?? t.name,
|
|
28
|
-
entries: Y(t.entries)
|
|
29
|
-
}));
|
|
30
|
-
}, "setCurves"), Y = /* @__PURE__ */ l((a) => {
|
|
31
|
-
if (a[0].axis == null)
|
|
32
|
-
return a.map((e) => e.value);
|
|
33
|
-
const t = w();
|
|
34
|
-
if (t.length === 0)
|
|
35
|
-
throw new Error("Axes must be populated before curves for reference entries");
|
|
36
|
-
return t.map((e) => {
|
|
37
|
-
const r = a.find((s) => s.axis?.$refText === e.name);
|
|
38
|
-
if (r === void 0)
|
|
39
|
-
throw new Error("Missing entry for axis " + e.label);
|
|
40
|
-
return r.value;
|
|
41
|
-
});
|
|
42
|
-
}, "computeCurveEntries"), Z = /* @__PURE__ */ l((a) => {
|
|
43
|
-
const t = a.reduce(
|
|
44
|
-
(e, r) => (e[r.name] = r, e),
|
|
45
|
-
{}
|
|
46
|
-
);
|
|
47
|
-
h.options = {
|
|
48
|
-
showLegend: t.showLegend?.value ?? x.showLegend,
|
|
49
|
-
ticks: t.ticks?.value ?? x.ticks,
|
|
50
|
-
max: t.max?.value ?? x.max,
|
|
51
|
-
min: t.min?.value ?? x.min,
|
|
52
|
-
graticule: t.graticule?.value ?? x.graticule
|
|
53
|
-
};
|
|
54
|
-
}, "setOptions"), J = /* @__PURE__ */ l(() => {
|
|
55
|
-
G(), h = structuredClone(C);
|
|
56
|
-
}, "clear"), $ = {
|
|
57
|
-
getAxes: w,
|
|
58
|
-
getCurves: q,
|
|
59
|
-
getOptions: K,
|
|
60
|
-
setAxes: U,
|
|
61
|
-
setCurves: X,
|
|
62
|
-
setOptions: Z,
|
|
63
|
-
getConfig: N,
|
|
64
|
-
clear: J,
|
|
65
|
-
setAccTitle: F,
|
|
66
|
-
getAccTitle: E,
|
|
67
|
-
setDiagramTitle: _,
|
|
68
|
-
getDiagramTitle: R,
|
|
69
|
-
getAccDescription: I,
|
|
70
|
-
setAccDescription: k
|
|
71
|
-
}, Q = /* @__PURE__ */ l((a) => {
|
|
72
|
-
V(a, $);
|
|
73
|
-
const { axes: t, curves: e, options: r } = a;
|
|
74
|
-
$.setAxes(t), $.setCurves(e), $.setOptions(r);
|
|
75
|
-
}, "populate"), tt = {
|
|
76
|
-
parse: /* @__PURE__ */ l(async (a) => {
|
|
77
|
-
const t = await H("radar", a);
|
|
78
|
-
P.debug(t), Q(t);
|
|
79
|
-
}, "parse")
|
|
80
|
-
}, et = /* @__PURE__ */ l((a, t, e, r) => {
|
|
81
|
-
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((f) => Math.max(...f.entries))), m = n.min, v = Math.min(c.width, c.height) / 2;
|
|
82
|
-
rt(u, o, v, n.ticks, n.graticule), st(u, o, v, c), M(u, o, i, m, g, n.graticule, c), L(u, i, n.showLegend, c), u.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -c.height / 2 - c.marginTop);
|
|
83
|
-
}, "draw"), at = /* @__PURE__ */ l((a, t) => {
|
|
84
|
-
const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
|
|
85
|
-
x: t.marginLeft + t.width / 2,
|
|
86
|
-
y: t.marginTop + t.height / 2
|
|
87
|
-
};
|
|
88
|
-
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})`);
|
|
89
|
-
}, "drawFrame"), rt = /* @__PURE__ */ l((a, t, e, r, s) => {
|
|
90
|
-
if (s === "circle")
|
|
91
|
-
for (let o = 0; o < r; o++) {
|
|
92
|
-
const i = e * (o + 1) / r;
|
|
93
|
-
a.append("circle").attr("r", i).attr("class", "radarGraticule");
|
|
94
|
-
}
|
|
95
|
-
else if (s === "polygon") {
|
|
96
|
-
const o = t.length;
|
|
97
|
-
for (let i = 0; i < r; i++) {
|
|
98
|
-
const n = e * (i + 1) / r, c = t.map((d, p) => {
|
|
99
|
-
const u = 2 * p * Math.PI / o - Math.PI / 2, g = n * Math.cos(u), m = n * Math.sin(u);
|
|
100
|
-
return `${g},${m}`;
|
|
101
|
-
}).join(" ");
|
|
102
|
-
a.append("polygon").attr("points", c).attr("class", "radarGraticule");
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}, "drawGraticule"), st = /* @__PURE__ */ l((a, t, e, r) => {
|
|
106
|
-
const s = t.length;
|
|
107
|
-
for (let o = 0; o < s; o++) {
|
|
108
|
-
const i = t[o].label, n = 2 * o * Math.PI / s - Math.PI / 2;
|
|
109
|
-
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");
|
|
110
|
-
}
|
|
111
|
-
}, "drawAxes");
|
|
112
|
-
function M(a, t, e, r, s, o, i) {
|
|
113
|
-
const n = t.length, c = Math.min(i.width, i.height) / 2;
|
|
114
|
-
e.forEach((d, p) => {
|
|
115
|
-
if (d.entries.length !== n)
|
|
116
|
-
return;
|
|
117
|
-
const u = d.entries.map((g, m) => {
|
|
118
|
-
const v = 2 * Math.PI * m / n - Math.PI / 2, f = T(g, r, s, c), S = f * Math.cos(v), O = f * Math.sin(v);
|
|
119
|
-
return { x: S, y: O };
|
|
120
|
-
});
|
|
121
|
-
o === "circle" ? a.append("path").attr("d", A(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}`);
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
l(M, "drawCurves");
|
|
125
|
-
function T(a, t, e, r) {
|
|
126
|
-
const s = Math.min(Math.max(a, t), e);
|
|
127
|
-
return r * (s - t) / (e - t);
|
|
128
|
-
}
|
|
129
|
-
l(T, "relativeRadius");
|
|
130
|
-
function A(a, t) {
|
|
131
|
-
const e = a.length;
|
|
132
|
-
let r = `M${a[0].x},${a[0].y}`;
|
|
133
|
-
for (let s = 0; s < e; s++) {
|
|
134
|
-
const o = a[(s - 1 + e) % e], i = a[s], n = a[(s + 1) % e], c = a[(s + 2) % e], d = {
|
|
135
|
-
x: i.x + (n.x - o.x) * t,
|
|
136
|
-
y: i.y + (n.y - o.y) * t
|
|
137
|
-
}, p = {
|
|
138
|
-
x: n.x - (c.x - i.x) * t,
|
|
139
|
-
y: n.y - (c.y - i.y) * t
|
|
140
|
-
};
|
|
141
|
-
r += ` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`;
|
|
142
|
-
}
|
|
143
|
-
return `${r} Z`;
|
|
144
|
-
}
|
|
145
|
-
l(A, "closedRoundCurve");
|
|
146
|
-
function L(a, t, e, r) {
|
|
147
|
-
if (!e)
|
|
148
|
-
return;
|
|
149
|
-
const s = (r.width / 2 + r.marginRight) * 3 / 4, o = -(r.height / 2 + r.marginTop) * 3 / 4, i = 20;
|
|
150
|
-
t.forEach((n, c) => {
|
|
151
|
-
const d = a.append("g").attr("transform", `translate(${s}, ${o + c * i})`);
|
|
152
|
-
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);
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
l(L, "drawLegend");
|
|
156
|
-
var nt = { draw: et }, ot = /* @__PURE__ */ l((a, t) => {
|
|
157
|
-
let e = "";
|
|
158
|
-
for (let r = 0; r < a.THEME_COLOR_LIMIT; r++) {
|
|
159
|
-
const s = a[`cScale${r}`];
|
|
160
|
-
e += `
|
|
161
|
-
.radarCurve-${r} {
|
|
162
|
-
color: ${s};
|
|
163
|
-
fill: ${s};
|
|
164
|
-
fill-opacity: ${t.curveOpacity};
|
|
165
|
-
stroke: ${s};
|
|
166
|
-
stroke-width: ${t.curveStrokeWidth};
|
|
167
|
-
}
|
|
168
|
-
.radarLegendBox-${r} {
|
|
169
|
-
fill: ${s};
|
|
170
|
-
fill-opacity: ${t.curveOpacity};
|
|
171
|
-
stroke: ${s};
|
|
172
|
-
}
|
|
173
|
-
`;
|
|
174
|
-
}
|
|
175
|
-
return e;
|
|
176
|
-
}, "genIndexStyles"), it = /* @__PURE__ */ l((a) => {
|
|
177
|
-
const t = B(), e = b(), r = y(t, e.themeVariables), s = y(r.radar, a);
|
|
178
|
-
return { themeVariables: r, radarOptions: s };
|
|
179
|
-
}, "buildRadarStyleOptions"), lt = /* @__PURE__ */ l(({ radar: a } = {}) => {
|
|
180
|
-
const { themeVariables: t, radarOptions: e } = it(a);
|
|
181
|
-
return `
|
|
182
|
-
.radarTitle {
|
|
183
|
-
font-size: ${t.fontSize};
|
|
184
|
-
color: ${t.titleColor};
|
|
185
|
-
dominant-baseline: hanging;
|
|
186
|
-
text-anchor: middle;
|
|
187
|
-
}
|
|
188
|
-
.radarAxisLine {
|
|
189
|
-
stroke: ${e.axisColor};
|
|
190
|
-
stroke-width: ${e.axisStrokeWidth};
|
|
191
|
-
}
|
|
192
|
-
.radarAxisLabel {
|
|
193
|
-
dominant-baseline: middle;
|
|
194
|
-
text-anchor: middle;
|
|
195
|
-
font-size: ${e.axisLabelFontSize}px;
|
|
196
|
-
color: ${e.axisColor};
|
|
197
|
-
}
|
|
198
|
-
.radarGraticule {
|
|
199
|
-
fill: ${e.graticuleColor};
|
|
200
|
-
fill-opacity: ${e.graticuleOpacity};
|
|
201
|
-
stroke: ${e.graticuleColor};
|
|
202
|
-
stroke-width: ${e.graticuleStrokeWidth};
|
|
203
|
-
}
|
|
204
|
-
.radarLegendText {
|
|
205
|
-
text-anchor: start;
|
|
206
|
-
font-size: ${e.legendFontSize}px;
|
|
207
|
-
dominant-baseline: hanging;
|
|
208
|
-
}
|
|
209
|
-
${ot(t, e)}
|
|
210
|
-
`;
|
|
211
|
-
}, "styles"), pt = {
|
|
212
|
-
parser: tt,
|
|
213
|
-
db: $,
|
|
214
|
-
renderer: nt,
|
|
215
|
-
styles: lt
|
|
216
|
-
};
|
|
217
|
-
export {
|
|
218
|
-
pt as diagram
|
|
219
|
-
};
|
|
220
|
-
//# sourceMappingURL=diagram-2AECGRRQ-PIXCGxIt.js.map
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { q as T, b as x, s as f, t as C, g as B, a as y, _ as s, I as u, l as k, N as V, e as N, G as _, B as S, K as D } from "./mermaid-GHXKKRXX-DXPXjnb7.js";
|
|
2
|
-
import { p as I } from "./chunk-4BX2VUAB-DVpS0I_p.js";
|
|
3
|
-
import { I as $ } from "./chunk-QZHKN3VN-DLQ8oUCc.js";
|
|
4
|
-
import { p as A } from "./wardley-L42UT6IY-HA1eSIS_.js";
|
|
5
|
-
globalThis.process = globalThis.process || { env: {} };
|
|
6
|
-
globalThis.global = globalThis.global || globalThis;
|
|
7
|
-
var d = new $(() => ({
|
|
8
|
-
cnt: 1,
|
|
9
|
-
stack: [
|
|
10
|
-
{
|
|
11
|
-
id: 0,
|
|
12
|
-
level: -1,
|
|
13
|
-
name: "/",
|
|
14
|
-
children: []
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
})), X = /* @__PURE__ */ s(() => {
|
|
18
|
-
d.reset(), S();
|
|
19
|
-
}, "clear"), z = /* @__PURE__ */ s(() => d.records.stack[0], "getRoot"), H = /* @__PURE__ */ s(() => d.records.cnt, "getCount"), L = D.treeView, R = /* @__PURE__ */ s(() => u(L, _().treeView), "getConfig"), W = /* @__PURE__ */ s((e, t) => {
|
|
20
|
-
for (; e <= d.records.stack[d.records.stack.length - 1].level; )
|
|
21
|
-
d.records.stack.pop();
|
|
22
|
-
const a = {
|
|
23
|
-
id: d.records.cnt++,
|
|
24
|
-
level: e,
|
|
25
|
-
name: t,
|
|
26
|
-
children: []
|
|
27
|
-
};
|
|
28
|
-
d.records.stack[d.records.stack.length - 1].children.push(a), d.records.stack.push(a);
|
|
29
|
-
}, "addNode"), E = {
|
|
30
|
-
clear: X,
|
|
31
|
-
addNode: W,
|
|
32
|
-
getRoot: z,
|
|
33
|
-
getCount: H,
|
|
34
|
-
getConfig: R,
|
|
35
|
-
getAccTitle: y,
|
|
36
|
-
getAccDescription: B,
|
|
37
|
-
getDiagramTitle: C,
|
|
38
|
-
setAccDescription: f,
|
|
39
|
-
setAccTitle: x,
|
|
40
|
-
setDiagramTitle: T
|
|
41
|
-
}, w = E, M = /* @__PURE__ */ s((e) => {
|
|
42
|
-
I(e, w), e.nodes.map((t) => w.addNode(t.indent ? parseInt(t.indent) : 0, t.name));
|
|
43
|
-
}, "populate"), F = {
|
|
44
|
-
parse: /* @__PURE__ */ s(async (e) => {
|
|
45
|
-
const t = await A("treeView", e);
|
|
46
|
-
k.debug(t), M(t);
|
|
47
|
-
}, "parse")
|
|
48
|
-
}, Y = /* @__PURE__ */ s((e, t, a, o, l) => {
|
|
49
|
-
const c = o.append("text").text(a.name).attr("dominant-baseline", "middle").attr("class", "treeView-node-label"), { height: g, width: r } = c.node().getBBox(), n = g + l.paddingY * 2, i = r + l.paddingX * 2;
|
|
50
|
-
c.attr("x", e + l.paddingX), c.attr("y", t + n / 2), a.BBox = {
|
|
51
|
-
x: e,
|
|
52
|
-
y: t,
|
|
53
|
-
width: i,
|
|
54
|
-
height: n
|
|
55
|
-
};
|
|
56
|
-
}, "positionLabel"), m = /* @__PURE__ */ s((e, t, a, o, l, c) => e.append("line").attr("x1", t).attr("y1", a).attr("x2", o).attr("y2", l).attr("stroke-width", c).attr("class", "treeView-node-line"), "positionLine"), q = /* @__PURE__ */ s((e, t, a) => {
|
|
57
|
-
let o = 0, l = 0;
|
|
58
|
-
const c = /* @__PURE__ */ s((r, n, i, p) => {
|
|
59
|
-
const b = p * (i.rowIndent + i.paddingX);
|
|
60
|
-
Y(b, o, n, r, i);
|
|
61
|
-
const { height: h, width: v } = n.BBox;
|
|
62
|
-
m(
|
|
63
|
-
r,
|
|
64
|
-
b - i.rowIndent,
|
|
65
|
-
o + h / 2,
|
|
66
|
-
b,
|
|
67
|
-
o + h / 2,
|
|
68
|
-
i.lineThickness
|
|
69
|
-
), l = Math.max(l, b + v), o += h;
|
|
70
|
-
}, "drawNode"), g = /* @__PURE__ */ s((r, n = 0) => {
|
|
71
|
-
c(e, r, a, n), r.children.forEach((h) => {
|
|
72
|
-
g(h, n + 1);
|
|
73
|
-
});
|
|
74
|
-
const { x: i, y: p, height: b } = r.BBox;
|
|
75
|
-
if (r.children.length) {
|
|
76
|
-
const { y: h, height: v } = r.children[r.children.length - 1].BBox;
|
|
77
|
-
m(
|
|
78
|
-
e,
|
|
79
|
-
i + a.paddingX,
|
|
80
|
-
p + b,
|
|
81
|
-
i + a.paddingX,
|
|
82
|
-
h + v / 2 + a.lineThickness / 2,
|
|
83
|
-
a.lineThickness
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
}, "processNode");
|
|
87
|
-
return g(t), { totalHeight: o, totalWidth: l };
|
|
88
|
-
}, "drawTree"), G = /* @__PURE__ */ s((e, t, a, o) => {
|
|
89
|
-
k.debug(`Rendering treeView diagram
|
|
90
|
-
` + e);
|
|
91
|
-
const l = o.db, c = l.getRoot(), g = l.getConfig(), r = V(t), n = r.append("g");
|
|
92
|
-
n.attr("class", "tree-view");
|
|
93
|
-
const { totalHeight: i, totalWidth: p } = q(n, c, g);
|
|
94
|
-
r.attr("viewBox", `-${g.lineThickness / 2} 0 ${p} ${i}`), N(r, i, p, g.useMaxWidth);
|
|
95
|
-
}, "draw"), K = {
|
|
96
|
-
draw: G
|
|
97
|
-
}, j = K, J = {
|
|
98
|
-
labelFontSize: "16px",
|
|
99
|
-
labelColor: "black",
|
|
100
|
-
lineColor: "black"
|
|
101
|
-
}, O = /* @__PURE__ */ s(({
|
|
102
|
-
treeView: e
|
|
103
|
-
}) => {
|
|
104
|
-
const { labelFontSize: t, labelColor: a, lineColor: o } = u(
|
|
105
|
-
J,
|
|
106
|
-
e
|
|
107
|
-
);
|
|
108
|
-
return `
|
|
109
|
-
.treeView-node-label {
|
|
110
|
-
font-size: ${t};
|
|
111
|
-
fill: ${a};
|
|
112
|
-
}
|
|
113
|
-
.treeView-node-line {
|
|
114
|
-
stroke: ${o};
|
|
115
|
-
}
|
|
116
|
-
`;
|
|
117
|
-
}, "styles"), P = O, te = {
|
|
118
|
-
db: w,
|
|
119
|
-
renderer: j,
|
|
120
|
-
parser: F,
|
|
121
|
-
styles: P
|
|
122
|
-
};
|
|
123
|
-
export {
|
|
124
|
-
te as diagram
|
|
125
|
-
};
|
|
126
|
-
//# sourceMappingURL=diagram-5GNKFQAL-CbJxbGBh.js.map
|