@altimateai/ui-components 0.0.58 → 0.0.60
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/CoachForm.js +23701 -37056
- package/dist/Stack.js +6 -6
- package/dist/Switch.js +1 -1
- package/dist/TagsInput.js +691 -677
- package/dist/_basePickBy.js +151 -0
- package/dist/_baseUniq.js +615 -0
- package/dist/arc.js +83 -0
- package/dist/architecture-U656AL7Q.js +5 -0
- package/dist/architectureDiagram-VXUJARFQ.js +4666 -0
- package/dist/blockDiagram-VD42YOAC.js +2266 -0
- package/dist/c4Diagram-YG6GDRKO.js +1582 -0
- package/dist/channel.js +5 -0
- package/dist/chunk-4BX2VUAB.js +9 -0
- package/dist/chunk-55IACEB6.js +9 -0
- package/dist/chunk-B4BG7PRW.js +1377 -0
- package/dist/chunk-DI55MBZ5.js +1382 -0
- package/dist/chunk-FMBD7UC4.js +19 -0
- package/dist/chunk-QN33PNHL.js +20 -0
- package/dist/chunk-QZHKN3VN.js +15 -0
- package/dist/chunk-TZMSLE5B.js +64 -0
- package/dist/classDiagram-2ON5EDUG.js +17 -0
- package/dist/classDiagram-v2-WZHVMYZB.js +17 -0
- package/dist/clone.js +8 -0
- package/dist/cose-bilkent-S5V4N54A.js +2606 -0
- package/dist/cytoscape.esm.js +18731 -0
- package/dist/dagre-6UL2VRFP.js +447 -0
- package/dist/dayjs.min.js +302 -0
- package/dist/defaultLocale.js +171 -0
- package/dist/diagram-PSM6KHXK.js +535 -0
- package/dist/diagram-QEK2KX5R.js +221 -0
- package/dist/diagram-S2PKOQOG.js +143 -0
- package/dist/erDiagram-Q2GNP2WA.js +843 -0
- package/dist/flowDiagram-NV44I4VS.js +1628 -0
- package/dist/ganttDiagram-LVOFAZNH.js +2500 -0
- package/dist/gitGraph-F6HP7TQM.js +5 -0
- package/dist/gitGraphDiagram-NY62KEGX.js +713 -0
- package/dist/graph.js +247 -0
- package/dist/index.js +30 -30
- package/dist/info-NVLQJR56.js +5 -0
- package/dist/infoDiagram-F6ZHWCRC.js +24 -0
- package/dist/init.js +16 -0
- package/dist/journeyDiagram-XKPGCS4Q.js +837 -0
- package/dist/kanban-definition-3W4ZIXB7.js +720 -0
- package/dist/katex.js +11691 -0
- package/dist/layout.js +1324 -0
- package/dist/lineage/index.js +12 -12
- package/dist/linear.js +259 -0
- package/dist/main.js +3 -3
- package/dist/mermaid-parser.core.js +12921 -0
- package/dist/mindmap-definition-VGOIOE7T.js +786 -0
- package/dist/ordinal.js +61 -0
- package/dist/packet-BFZMPI3H.js +5 -0
- package/dist/pie-7BOR55EZ.js +5 -0
- package/dist/pieDiagram-ADFJNKIX.js +163 -0
- package/dist/quadrantDiagram-AYHSOK5B.js +1025 -0
- package/dist/radar-NHE76QYJ.js +5 -0
- package/dist/redux-toolkit.modern.js +1138 -1420
- package/dist/requirementDiagram-UZGBJVZJ.js +852 -0
- package/dist/sankeyDiagram-TZEHDZUN.js +811 -0
- package/dist/sequenceDiagram-WL72ISMW.js +2523 -0
- package/dist/shadcn/index.js +1 -1
- package/dist/stateDiagram-FKZM4ZOC.js +264 -0
- package/dist/stateDiagram-v2-4FDKWEC3.js +17 -0
- package/dist/timeline-definition-IT6M3QCI.js +802 -0
- package/dist/treemap-KMMF4GRG.js +5 -0
- package/dist/xychartDiagram-PRI3JC2R.js +1341 -0
- package/package.json +1 -1
- package/dist/Table.js +0 -22
- package/dist/flowchart-elk-definition-170a3958.js +0 -46393
- package/dist/is_dark.js +0 -8
- package/dist/mindmap-definition-44684416.js +0 -20514
- package/dist/timeline-definition-8e5a9bc6.js +0 -825
package/dist/ordinal.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { i as a } from "./init.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,163 @@
|
|
|
1
|
+
import { a_ as S, aS as z, bt as Z, ar as q, ad as H, ae as J, a0 as K, a1 as Q, a3 as X, a2 as Y, _ as g, aa as F, ak as ee, a4 as te, as as ae, aw as re, aD as ne, ab as ie } from "./CoachForm.js";
|
|
2
|
+
import { p as se } from "./chunk-4BX2VUAB.js";
|
|
3
|
+
import { p as le } from "./mermaid-parser.core.js";
|
|
4
|
+
import "./redux-toolkit.modern.js";
|
|
5
|
+
import { d as _ } from "./arc.js";
|
|
6
|
+
import { o as oe } from "./ordinal.js";
|
|
7
|
+
function ce(e, a) {
|
|
8
|
+
return a < e ? -1 : a > e ? 1 : a >= e ? 0 : NaN;
|
|
9
|
+
}
|
|
10
|
+
function ue(e) {
|
|
11
|
+
return e;
|
|
12
|
+
}
|
|
13
|
+
function pe() {
|
|
14
|
+
var e = ue, a = ce, f = null, x = S(0), s = S(z), o = S(0);
|
|
15
|
+
function l(t) {
|
|
16
|
+
var n, c = (t = Z(t)).length, u, y, m = 0, p = new Array(c), i = new Array(c), v = +x.apply(this, arguments), w = Math.min(z, Math.max(-z, s.apply(this, arguments) - v)), h, C = Math.min(Math.abs(w) / c, o.apply(this, arguments)), $ = C * (w < 0 ? -1 : 1), d;
|
|
17
|
+
for (n = 0; n < c; ++n)
|
|
18
|
+
(d = i[p[n] = n] = +e(t[n], n, t)) > 0 && (m += d);
|
|
19
|
+
for (a != null ? p.sort(function(A, D) {
|
|
20
|
+
return a(i[A], i[D]);
|
|
21
|
+
}) : f != null && p.sort(function(A, D) {
|
|
22
|
+
return f(t[A], t[D]);
|
|
23
|
+
}), n = 0, y = m ? (w - c * $) / m : 0; n < c; ++n, v = h)
|
|
24
|
+
u = p[n], d = i[u], h = v + (d > 0 ? d * y : 0) + $, i[u] = {
|
|
25
|
+
data: t[u],
|
|
26
|
+
index: n,
|
|
27
|
+
value: d,
|
|
28
|
+
startAngle: v,
|
|
29
|
+
endAngle: h,
|
|
30
|
+
padAngle: C
|
|
31
|
+
};
|
|
32
|
+
return i;
|
|
33
|
+
}
|
|
34
|
+
return l.value = function(t) {
|
|
35
|
+
return arguments.length ? (e = typeof t == "function" ? t : S(+t), l) : e;
|
|
36
|
+
}, l.sortValues = function(t) {
|
|
37
|
+
return arguments.length ? (a = t, f = null, l) : a;
|
|
38
|
+
}, l.sort = function(t) {
|
|
39
|
+
return arguments.length ? (f = t, a = null, l) : f;
|
|
40
|
+
}, l.startAngle = function(t) {
|
|
41
|
+
return arguments.length ? (x = typeof t == "function" ? t : S(+t), l) : x;
|
|
42
|
+
}, l.endAngle = function(t) {
|
|
43
|
+
return arguments.length ? (s = typeof t == "function" ? t : S(+t), l) : s;
|
|
44
|
+
}, l.padAngle = function(t) {
|
|
45
|
+
return arguments.length ? (o = typeof t == "function" ? t : S(+t), l) : o;
|
|
46
|
+
}, l;
|
|
47
|
+
}
|
|
48
|
+
var I = q.pie, G = {
|
|
49
|
+
sections: /* @__PURE__ */ new Map(),
|
|
50
|
+
showData: !1,
|
|
51
|
+
config: I
|
|
52
|
+
}, T = G.sections, N = G.showData, ge = structuredClone(I), de = /* @__PURE__ */ g(() => structuredClone(ge), "getConfig"), fe = /* @__PURE__ */ g(() => {
|
|
53
|
+
T = /* @__PURE__ */ new Map(), N = G.showData, ee();
|
|
54
|
+
}, "clear"), he = /* @__PURE__ */ g(({ label: e, value: a }) => {
|
|
55
|
+
if (a < 0)
|
|
56
|
+
throw new Error(
|
|
57
|
+
`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`
|
|
58
|
+
);
|
|
59
|
+
T.has(e) || (T.set(e, a), F.debug(`added new section: ${e}, with value: ${a}`));
|
|
60
|
+
}, "addSection"), me = /* @__PURE__ */ g(() => T, "getSections"), ve = /* @__PURE__ */ g((e) => {
|
|
61
|
+
N = e;
|
|
62
|
+
}, "setShowData"), Se = /* @__PURE__ */ g(() => N, "getShowData"), L = {
|
|
63
|
+
getConfig: de,
|
|
64
|
+
clear: fe,
|
|
65
|
+
setDiagramTitle: H,
|
|
66
|
+
getDiagramTitle: J,
|
|
67
|
+
setAccTitle: K,
|
|
68
|
+
getAccTitle: Q,
|
|
69
|
+
setAccDescription: X,
|
|
70
|
+
getAccDescription: Y,
|
|
71
|
+
addSection: he,
|
|
72
|
+
getSections: me,
|
|
73
|
+
setShowData: ve,
|
|
74
|
+
getShowData: Se
|
|
75
|
+
}, xe = /* @__PURE__ */ g((e, a) => {
|
|
76
|
+
se(e, a), a.setShowData(e.showData), e.sections.map(a.addSection);
|
|
77
|
+
}, "populateDb"), ye = {
|
|
78
|
+
parse: /* @__PURE__ */ g(async (e) => {
|
|
79
|
+
const a = await le("pie", e);
|
|
80
|
+
F.debug(a), xe(a, L);
|
|
81
|
+
}, "parse")
|
|
82
|
+
}, we = /* @__PURE__ */ g((e) => `
|
|
83
|
+
.pieCircle{
|
|
84
|
+
stroke: ${e.pieStrokeColor};
|
|
85
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
86
|
+
opacity : ${e.pieOpacity};
|
|
87
|
+
}
|
|
88
|
+
.pieOuterCircle{
|
|
89
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
90
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
91
|
+
fill: none;
|
|
92
|
+
}
|
|
93
|
+
.pieTitleText {
|
|
94
|
+
text-anchor: middle;
|
|
95
|
+
font-size: ${e.pieTitleTextSize};
|
|
96
|
+
fill: ${e.pieTitleTextColor};
|
|
97
|
+
font-family: ${e.fontFamily};
|
|
98
|
+
}
|
|
99
|
+
.slice {
|
|
100
|
+
font-family: ${e.fontFamily};
|
|
101
|
+
fill: ${e.pieSectionTextColor};
|
|
102
|
+
font-size:${e.pieSectionTextSize};
|
|
103
|
+
// fill: white;
|
|
104
|
+
}
|
|
105
|
+
.legend text {
|
|
106
|
+
fill: ${e.pieLegendTextColor};
|
|
107
|
+
font-family: ${e.fontFamily};
|
|
108
|
+
font-size: ${e.pieLegendTextSize};
|
|
109
|
+
}
|
|
110
|
+
`, "getStyles"), Ae = we, De = /* @__PURE__ */ g((e) => {
|
|
111
|
+
const a = [...e.values()].reduce((s, o) => s + o, 0), f = [...e.entries()].map(([s, o]) => ({ label: s, value: o })).filter((s) => s.value / a * 100 >= 1).sort((s, o) => o.value - s.value);
|
|
112
|
+
return pe().value((s) => s.value)(f);
|
|
113
|
+
}, "createPieArcs"), Ce = /* @__PURE__ */ g((e, a, f, x) => {
|
|
114
|
+
F.debug(`rendering pie chart
|
|
115
|
+
` + e);
|
|
116
|
+
const s = x.db, o = te(), l = ae(s.getConfig(), o.pie), t = 40, n = 18, c = 4, u = 450, y = u, m = re(a), p = m.append("g");
|
|
117
|
+
p.attr("transform", "translate(" + y / 2 + "," + u / 2 + ")");
|
|
118
|
+
const { themeVariables: i } = o;
|
|
119
|
+
let [v] = ne(i.pieOuterStrokeWidth);
|
|
120
|
+
v ?? (v = 2);
|
|
121
|
+
const w = l.textPosition, h = Math.min(y, u) / 2 - t, C = _().innerRadius(0).outerRadius(h), $ = _().innerRadius(h * w).outerRadius(h * w);
|
|
122
|
+
p.append("circle").attr("cx", 0).attr("cy", 0).attr("r", h + v / 2).attr("class", "pieOuterCircle");
|
|
123
|
+
const d = s.getSections(), A = De(d), D = [
|
|
124
|
+
i.pie1,
|
|
125
|
+
i.pie2,
|
|
126
|
+
i.pie3,
|
|
127
|
+
i.pie4,
|
|
128
|
+
i.pie5,
|
|
129
|
+
i.pie6,
|
|
130
|
+
i.pie7,
|
|
131
|
+
i.pie8,
|
|
132
|
+
i.pie9,
|
|
133
|
+
i.pie10,
|
|
134
|
+
i.pie11,
|
|
135
|
+
i.pie12
|
|
136
|
+
];
|
|
137
|
+
let b = 0;
|
|
138
|
+
d.forEach((r) => {
|
|
139
|
+
b += r;
|
|
140
|
+
});
|
|
141
|
+
const W = A.filter((r) => (r.data.value / b * 100).toFixed(0) !== "0"), k = oe(D);
|
|
142
|
+
p.selectAll("mySlices").data(W).enter().append("path").attr("d", C).attr("fill", (r) => k(r.data.label)).attr("class", "pieCircle"), p.selectAll("mySlices").data(W).enter().append("text").text((r) => (r.data.value / b * 100).toFixed(0) + "%").attr("transform", (r) => "translate(" + $.centroid(r) + ")").style("text-anchor", "middle").attr("class", "slice"), p.append("text").text(s.getDiagramTitle()).attr("x", 0).attr("y", -(u - 50) / 2).attr("class", "pieTitleText");
|
|
143
|
+
const O = [...d.entries()].map(([r, M]) => ({
|
|
144
|
+
label: r,
|
|
145
|
+
value: M
|
|
146
|
+
})), E = p.selectAll(".legend").data(O).enter().append("g").attr("class", "legend").attr("transform", (r, M) => {
|
|
147
|
+
const R = n + c, V = R * O.length / 2, U = 12 * n, j = M * R - V;
|
|
148
|
+
return "translate(" + U + "," + j + ")";
|
|
149
|
+
});
|
|
150
|
+
E.append("rect").attr("width", n).attr("height", n).style("fill", (r) => k(r.label)).style("stroke", (r) => k(r.label)), E.append("text").attr("x", n + c).attr("y", n - c).text((r) => s.getShowData() ? `${r.label} [${r.value}]` : r.label);
|
|
151
|
+
const B = Math.max(
|
|
152
|
+
...E.selectAll("text").nodes().map((r) => (r == null ? void 0 : r.getBoundingClientRect().width) ?? 0)
|
|
153
|
+
), P = y + t + n + c + B;
|
|
154
|
+
m.attr("viewBox", `0 0 ${P} ${u}`), ie(m, u, P, l.useMaxWidth);
|
|
155
|
+
}, "draw"), $e = { draw: Ce }, Fe = {
|
|
156
|
+
parser: ye,
|
|
157
|
+
db: L,
|
|
158
|
+
renderer: $e,
|
|
159
|
+
styles: Ae
|
|
160
|
+
};
|
|
161
|
+
export {
|
|
162
|
+
Fe as diagram
|
|
163
|
+
};
|