hub-ui-x 0.0.1
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 +5 -0
- package/dist/_basePickBy-C1WsytTM.js +151 -0
- package/dist/_baseUniq-CGQBVjq6.js +614 -0
- package/dist/arc-CfWEFjh8.js +84 -0
- package/dist/architecture-4AB2E3PP-DcT_AgQk.js +5 -0
- package/dist/architectureDiagram-IEHRJDOE-HOxolPJX.js +4635 -0
- package/dist/blockDiagram-JOT3LUYC-DOUpbN2x.js +2248 -0
- package/dist/c4Diagram-VJAJSXHY-BFAcC0i5.js +1582 -0
- package/dist/channel-Cu0z2gst.js +5 -0
- package/dist/chart-CJ_SRNKN.js +9241 -0
- package/dist/chunk-4BMEZGHF-BBaiA8MA.js +9 -0
- package/dist/chunk-A2AXSNBT-BWpKSYi4.js +1373 -0
- package/dist/chunk-AEK57VVT-doTsaHuQ.js +1415 -0
- package/dist/chunk-D6G4REZN-B6Iq6yid.js +64 -0
- package/dist/chunk-RZ5BOZE2-OspkSZtw.js +25 -0
- package/dist/chunk-XZIHB7SX-BTYIr8g5.js +15 -0
- package/dist/classDiagram-GIVACNV2-B_ES2mS7.js +17 -0
- package/dist/classDiagram-v2-COTLJTTW-B_ES2mS7.js +17 -0
- package/dist/clone-BZBtMp_G.js +8 -0
- package/dist/colors-BD7LS4qt.js +7 -0
- package/dist/cytoscape.esm-Swd9B-1A.js +18633 -0
- package/dist/dagre-OKDRZEBW-qXmKnSET.js +447 -0
- package/dist/diagram-SSKATNLV-D9zp03W0.js +221 -0
- package/dist/diagram-VNBRO52H-CBXg8AYQ.js +126 -0
- package/dist/download-B6Cbg_6N.js +39 -0
- package/dist/echarts-CvKQD1G1.js +44028 -0
- package/dist/erDiagram-Q7BY3M3F-BOJJGO7u.js +842 -0
- package/dist/flowDiagram-4HSFHLVR-jSArwKHg.js +1623 -0
- package/dist/ganttDiagram-APWFNJXF-DlkSU7D9.js +2472 -0
- package/dist/gitGraph-O2Q2CXLX-BKCeQqs8.js +5 -0
- package/dist/gitGraphDiagram-7IBYFJ6S-DUvZEq_S.js +713 -0
- package/dist/graph-zFu0gYaZ.js +247 -0
- package/dist/helper-C5NlRbA2.js +13 -0
- package/dist/hub-ui-x.css +1 -0
- package/dist/hub-ui-x.es.ts +5 -0
- package/dist/hub-ui-x.umd.ts +3258 -0
- package/dist/index-evjDGH2n.js +62533 -0
- package/dist/info-4N47QTOZ-BYDGL7Ae.js +5 -0
- package/dist/infoDiagram-PH2N3AL5-DJvDYk-t.js +22 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/journeyDiagram-U35MCT3I---dClVe4.js +810 -0
- package/dist/kanban-definition-NDS4AKOZ-DPL_aBPT.js +719 -0
- package/dist/katex-9tX9hjoM.js +11692 -0
- package/dist/layout-BqSq5ofg.js +1324 -0
- package/dist/linear-fJjgKrP9.js +423 -0
- package/dist/mermaid-CZvYCPmi.js +14243 -0
- package/dist/mermaid-parser.core-Bz7ADZ88.js +12835 -0
- package/dist/min-DLf0xQMm.js +28 -0
- package/dist/mindmap-definition-ALO5MXBD-CzxIzyQv.js +3222 -0
- package/dist/mindmap-r94UHoYv.js +21909 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/packet-KVYON367-D4di2cz5.js +5 -0
- package/dist/pie-R6RNRRYF-CcxAsT3F.js +5 -0
- package/dist/pieDiagram-IB7DONF6-B5HBkGlO.js +162 -0
- package/dist/quadrantDiagram-7GDLP6J5-BS5bmqKW.js +1025 -0
- package/dist/radar-MK3ICKWK-CVYy5goT.js +5 -0
- package/dist/requirementDiagram-KVF5MWMF-Cr8GcN4Y.js +851 -0
- package/dist/sankeyDiagram-QLVOVGJD-Bhq9k8_q.js +806 -0
- package/dist/sequenceDiagram-X6HHIX6F-CCmFoYyv.js +2282 -0
- package/dist/stateDiagram-DGXRK772-JkIqKyGq.js +271 -0
- package/dist/stateDiagram-v2-YXO3MK2T-DMxAxUZ1.js +17 -0
- package/dist/timeline-definition-BDJGKUSR-Bi42udQn.js +805 -0
- package/dist/transform-Bsa6BTXX.js +1834 -0
- package/dist/xychartDiagram-VJFVF3MP-BI97ppBM.js +1305 -0
- package/package.json +55 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { i as a } from "./init-DjUOC4st.js";
|
|
2
|
+
class o extends Map {
|
|
3
|
+
constructor(n, t = g) {
|
|
4
|
+
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: t } }), n != null) for (const [r, s] of n) this.set(r, s);
|
|
5
|
+
}
|
|
6
|
+
get(n) {
|
|
7
|
+
return super.get(c(this, n));
|
|
8
|
+
}
|
|
9
|
+
has(n) {
|
|
10
|
+
return super.has(c(this, n));
|
|
11
|
+
}
|
|
12
|
+
set(n, t) {
|
|
13
|
+
return super.set(l(this, n), t);
|
|
14
|
+
}
|
|
15
|
+
delete(n) {
|
|
16
|
+
return super.delete(p(this, n));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function c({ _intern: e, _key: n }, t) {
|
|
20
|
+
const r = n(t);
|
|
21
|
+
return e.has(r) ? e.get(r) : t;
|
|
22
|
+
}
|
|
23
|
+
function l({ _intern: e, _key: n }, t) {
|
|
24
|
+
const r = n(t);
|
|
25
|
+
return e.has(r) ? e.get(r) : (e.set(r, t), t);
|
|
26
|
+
}
|
|
27
|
+
function p({ _intern: e, _key: n }, t) {
|
|
28
|
+
const r = n(t);
|
|
29
|
+
return e.has(r) && (t = e.get(r), e.delete(r)), t;
|
|
30
|
+
}
|
|
31
|
+
function g(e) {
|
|
32
|
+
return e !== null && typeof e == "object" ? e.valueOf() : e;
|
|
33
|
+
}
|
|
34
|
+
const f = Symbol("implicit");
|
|
35
|
+
function h() {
|
|
36
|
+
var e = new o(), n = [], t = [], r = f;
|
|
37
|
+
function s(u) {
|
|
38
|
+
let i = e.get(u);
|
|
39
|
+
if (i === void 0) {
|
|
40
|
+
if (r !== f) return r;
|
|
41
|
+
e.set(u, i = n.push(u) - 1);
|
|
42
|
+
}
|
|
43
|
+
return t[i % t.length];
|
|
44
|
+
}
|
|
45
|
+
return s.domain = function(u) {
|
|
46
|
+
if (!arguments.length) return n.slice();
|
|
47
|
+
n = [], e = new o();
|
|
48
|
+
for (const i of u)
|
|
49
|
+
e.has(i) || e.set(i, n.push(i) - 1);
|
|
50
|
+
return s;
|
|
51
|
+
}, s.range = function(u) {
|
|
52
|
+
return arguments.length ? (t = Array.from(u), s) : t.slice();
|
|
53
|
+
}, s.unknown = function(u) {
|
|
54
|
+
return arguments.length ? (r = u, s) : r;
|
|
55
|
+
}, s.copy = function() {
|
|
56
|
+
return h(n, t).unknown(r);
|
|
57
|
+
}, a.apply(s, arguments), s;
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
h as o
|
|
61
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { p as V } from "./chunk-4BMEZGHF-BBaiA8MA.js";
|
|
2
|
+
import { a3 as z, _ as u, g as U, s as j, a as Z, b as q, p as H, o as J, l as G, c as K, C as Q, G as X, M as Y, d as tt, x as et, E as at } from "./mermaid-CZvYCPmi.js";
|
|
3
|
+
import { p as rt } from "./mermaid-parser.core-Bz7ADZ88.js";
|
|
4
|
+
import { c as x, a as nt } from "./transform-Bsa6BTXX.js";
|
|
5
|
+
import { d as P } from "./arc-CfWEFjh8.js";
|
|
6
|
+
import { o as it } from "./ordinal-DfAQgscy.js";
|
|
7
|
+
function st(t, a) {
|
|
8
|
+
return a < t ? -1 : a > t ? 1 : a >= t ? 0 : NaN;
|
|
9
|
+
}
|
|
10
|
+
function ot(t) {
|
|
11
|
+
return t;
|
|
12
|
+
}
|
|
13
|
+
function lt() {
|
|
14
|
+
var t = ot, a = st, h = null, o = x(0), p = x(z), y = x(0);
|
|
15
|
+
function i(e) {
|
|
16
|
+
var r, l = (e = nt(e)).length, g, A, m = 0, c = new Array(l), n = new Array(l), v = +o.apply(this, arguments), w = Math.min(z, Math.max(-z, p.apply(this, arguments) - v)), f, T = Math.min(Math.abs(w) / l, y.apply(this, arguments)), $ = T * (w < 0 ? -1 : 1), d;
|
|
17
|
+
for (r = 0; r < l; ++r)
|
|
18
|
+
(d = n[c[r] = r] = +t(e[r], r, e)) > 0 && (m += d);
|
|
19
|
+
for (a != null ? c.sort(function(S, C) {
|
|
20
|
+
return a(n[S], n[C]);
|
|
21
|
+
}) : h != null && c.sort(function(S, C) {
|
|
22
|
+
return h(e[S], e[C]);
|
|
23
|
+
}), r = 0, A = m ? (w - l * $) / m : 0; r < l; ++r, v = f)
|
|
24
|
+
g = c[r], d = n[g], f = v + (d > 0 ? d * A : 0) + $, n[g] = {
|
|
25
|
+
data: e[g],
|
|
26
|
+
index: r,
|
|
27
|
+
value: d,
|
|
28
|
+
startAngle: v,
|
|
29
|
+
endAngle: f,
|
|
30
|
+
padAngle: T
|
|
31
|
+
};
|
|
32
|
+
return n;
|
|
33
|
+
}
|
|
34
|
+
return i.value = function(e) {
|
|
35
|
+
return arguments.length ? (t = typeof e == "function" ? e : x(+e), i) : t;
|
|
36
|
+
}, i.sortValues = function(e) {
|
|
37
|
+
return arguments.length ? (a = e, h = null, i) : a;
|
|
38
|
+
}, i.sort = function(e) {
|
|
39
|
+
return arguments.length ? (h = e, a = null, i) : h;
|
|
40
|
+
}, i.startAngle = function(e) {
|
|
41
|
+
return arguments.length ? (o = typeof e == "function" ? e : x(+e), i) : o;
|
|
42
|
+
}, i.endAngle = function(e) {
|
|
43
|
+
return arguments.length ? (p = typeof e == "function" ? e : x(+e), i) : p;
|
|
44
|
+
}, i.padAngle = function(e) {
|
|
45
|
+
return arguments.length ? (y = typeof e == "function" ? e : x(+e), i) : y;
|
|
46
|
+
}, i;
|
|
47
|
+
}
|
|
48
|
+
var ct = at.pie, F = {
|
|
49
|
+
sections: /* @__PURE__ */ new Map(),
|
|
50
|
+
showData: !1
|
|
51
|
+
}, M = F.sections, W = F.showData, ut = structuredClone(ct), pt = /* @__PURE__ */ u(() => structuredClone(ut), "getConfig"), gt = /* @__PURE__ */ u(() => {
|
|
52
|
+
M = /* @__PURE__ */ new Map(), W = F.showData, et();
|
|
53
|
+
}, "clear"), dt = /* @__PURE__ */ u(({ label: t, value: a }) => {
|
|
54
|
+
M.has(t) || (M.set(t, a), G.debug(`added new section: ${t}, with value: ${a}`));
|
|
55
|
+
}, "addSection"), ft = /* @__PURE__ */ u(() => M, "getSections"), ht = /* @__PURE__ */ u((t) => {
|
|
56
|
+
W = t;
|
|
57
|
+
}, "setShowData"), mt = /* @__PURE__ */ u(() => W, "getShowData"), R = {
|
|
58
|
+
getConfig: pt,
|
|
59
|
+
clear: gt,
|
|
60
|
+
setDiagramTitle: J,
|
|
61
|
+
getDiagramTitle: H,
|
|
62
|
+
setAccTitle: q,
|
|
63
|
+
getAccTitle: Z,
|
|
64
|
+
setAccDescription: j,
|
|
65
|
+
getAccDescription: U,
|
|
66
|
+
addSection: dt,
|
|
67
|
+
getSections: ft,
|
|
68
|
+
setShowData: ht,
|
|
69
|
+
getShowData: mt
|
|
70
|
+
}, vt = /* @__PURE__ */ u((t, a) => {
|
|
71
|
+
V(t, a), a.setShowData(t.showData), t.sections.map(a.addSection);
|
|
72
|
+
}, "populateDb"), St = {
|
|
73
|
+
parse: /* @__PURE__ */ u(async (t) => {
|
|
74
|
+
const a = await rt("pie", t);
|
|
75
|
+
G.debug(a), vt(a, R);
|
|
76
|
+
}, "parse")
|
|
77
|
+
}, xt = /* @__PURE__ */ u((t) => `
|
|
78
|
+
.pieCircle{
|
|
79
|
+
stroke: ${t.pieStrokeColor};
|
|
80
|
+
stroke-width : ${t.pieStrokeWidth};
|
|
81
|
+
opacity : ${t.pieOpacity};
|
|
82
|
+
}
|
|
83
|
+
.pieOuterCircle{
|
|
84
|
+
stroke: ${t.pieOuterStrokeColor};
|
|
85
|
+
stroke-width: ${t.pieOuterStrokeWidth};
|
|
86
|
+
fill: none;
|
|
87
|
+
}
|
|
88
|
+
.pieTitleText {
|
|
89
|
+
text-anchor: middle;
|
|
90
|
+
font-size: ${t.pieTitleTextSize};
|
|
91
|
+
fill: ${t.pieTitleTextColor};
|
|
92
|
+
font-family: ${t.fontFamily};
|
|
93
|
+
}
|
|
94
|
+
.slice {
|
|
95
|
+
font-family: ${t.fontFamily};
|
|
96
|
+
fill: ${t.pieSectionTextColor};
|
|
97
|
+
font-size:${t.pieSectionTextSize};
|
|
98
|
+
// fill: white;
|
|
99
|
+
}
|
|
100
|
+
.legend text {
|
|
101
|
+
fill: ${t.pieLegendTextColor};
|
|
102
|
+
font-family: ${t.fontFamily};
|
|
103
|
+
font-size: ${t.pieLegendTextSize};
|
|
104
|
+
}
|
|
105
|
+
`, "getStyles"), yt = xt, At = /* @__PURE__ */ u((t) => {
|
|
106
|
+
const a = [...t.entries()].map((o) => ({
|
|
107
|
+
label: o[0],
|
|
108
|
+
value: o[1]
|
|
109
|
+
})).sort((o, p) => p.value - o.value);
|
|
110
|
+
return lt().value(
|
|
111
|
+
(o) => o.value
|
|
112
|
+
)(a);
|
|
113
|
+
}, "createPieArcs"), wt = /* @__PURE__ */ u((t, a, h, o) => {
|
|
114
|
+
G.debug(`rendering pie chart
|
|
115
|
+
` + t);
|
|
116
|
+
const p = o.db, y = K(), i = Q(p.getConfig(), y.pie), e = 40, r = 18, l = 4, g = 450, A = g, m = X(a), c = m.append("g");
|
|
117
|
+
c.attr("transform", "translate(" + A / 2 + "," + g / 2 + ")");
|
|
118
|
+
const { themeVariables: n } = y;
|
|
119
|
+
let [v] = Y(n.pieOuterStrokeWidth);
|
|
120
|
+
v ?? (v = 2);
|
|
121
|
+
const w = i.textPosition, f = Math.min(A, g) / 2 - e, T = P().innerRadius(0).outerRadius(f), $ = P().innerRadius(f * w).outerRadius(f * w);
|
|
122
|
+
c.append("circle").attr("cx", 0).attr("cy", 0).attr("r", f + v / 2).attr("class", "pieOuterCircle");
|
|
123
|
+
const d = p.getSections(), S = At(d), C = [
|
|
124
|
+
n.pie1,
|
|
125
|
+
n.pie2,
|
|
126
|
+
n.pie3,
|
|
127
|
+
n.pie4,
|
|
128
|
+
n.pie5,
|
|
129
|
+
n.pie6,
|
|
130
|
+
n.pie7,
|
|
131
|
+
n.pie8,
|
|
132
|
+
n.pie9,
|
|
133
|
+
n.pie10,
|
|
134
|
+
n.pie11,
|
|
135
|
+
n.pie12
|
|
136
|
+
], D = it(C);
|
|
137
|
+
c.selectAll("mySlices").data(S).enter().append("path").attr("d", T).attr("fill", (s) => D(s.data.label)).attr("class", "pieCircle");
|
|
138
|
+
let N = 0;
|
|
139
|
+
d.forEach((s) => {
|
|
140
|
+
N += s;
|
|
141
|
+
}), c.selectAll("mySlices").data(S).enter().append("text").text((s) => (s.data.value / N * 100).toFixed(0) + "%").attr("transform", (s) => "translate(" + $.centroid(s) + ")").style("text-anchor", "middle").attr("class", "slice"), c.append("text").text(p.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
|
|
142
|
+
const b = c.selectAll(".legend").data(D.domain()).enter().append("g").attr("class", "legend").attr("transform", (s, E) => {
|
|
143
|
+
const k = r + l, L = k * D.domain().length / 2, _ = 12 * r, B = E * k - L;
|
|
144
|
+
return "translate(" + _ + "," + B + ")";
|
|
145
|
+
});
|
|
146
|
+
b.append("rect").attr("width", r).attr("height", r).style("fill", D).style("stroke", D), b.data(S).append("text").attr("x", r + l).attr("y", r - l).text((s) => {
|
|
147
|
+
const { label: E, value: k } = s.data;
|
|
148
|
+
return p.getShowData() ? `${E} [${k}]` : E;
|
|
149
|
+
});
|
|
150
|
+
const I = Math.max(
|
|
151
|
+
...b.selectAll("text").nodes().map((s) => (s == null ? void 0 : s.getBoundingClientRect().width) ?? 0)
|
|
152
|
+
), O = A + e + r + l + I;
|
|
153
|
+
m.attr("viewBox", `0 0 ${O} ${g}`), tt(m, g, O, i.useMaxWidth);
|
|
154
|
+
}, "draw"), Ct = { draw: wt }, bt = {
|
|
155
|
+
parser: St,
|
|
156
|
+
db: R,
|
|
157
|
+
renderer: Ct,
|
|
158
|
+
styles: yt
|
|
159
|
+
};
|
|
160
|
+
export {
|
|
161
|
+
bt as diagram
|
|
162
|
+
};
|