@lincyaw/aegis-ui 0.7.0 → 0.9.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/dist/components/ui/AgentHud.cjs +2 -0
- package/dist/components/ui/AgentHud.cjs.map +1 -0
- package/dist/components/ui/AgentHud.d.ts +23 -0
- package/dist/components/ui/AgentHud.js +45 -0
- package/dist/components/ui/AgentHud.js.map +1 -0
- package/dist/components/ui/ChartLegend.cjs +2 -0
- package/dist/components/ui/ChartLegend.cjs.map +1 -0
- package/dist/components/ui/ChartLegend.d.ts +17 -0
- package/dist/components/ui/ChartLegend.js +37 -0
- package/dist/components/ui/ChartLegend.js.map +1 -0
- package/dist/components/ui/ColumnChart.cjs +2 -0
- package/dist/components/ui/ColumnChart.cjs.map +1 -0
- package/dist/components/ui/ColumnChart.d.ts +46 -0
- package/dist/components/ui/ColumnChart.js +154 -0
- package/dist/components/ui/ColumnChart.js.map +1 -0
- package/dist/components/ui/DataTable.cjs +1 -1
- package/dist/components/ui/DataTable.cjs.map +1 -1
- package/dist/components/ui/DataTable.d.ts +25 -1
- package/dist/components/ui/DataTable.js +305 -231
- package/dist/components/ui/DataTable.js.map +1 -1
- package/dist/components/ui/DotRangeChart.cjs +2 -0
- package/dist/components/ui/DotRangeChart.cjs.map +1 -0
- package/dist/components/ui/DotRangeChart.d.ts +44 -0
- package/dist/components/ui/DotRangeChart.js +80 -0
- package/dist/components/ui/DotRangeChart.js.map +1 -0
- package/dist/components/ui/HeadlineStat.cjs +2 -0
- package/dist/components/ui/HeadlineStat.cjs.map +1 -0
- package/dist/components/ui/HeadlineStat.d.ts +10 -0
- package/dist/components/ui/HeadlineStat.js +22 -0
- package/dist/components/ui/HeadlineStat.js.map +1 -0
- package/dist/components/ui/Heatmap.cjs +2 -0
- package/dist/components/ui/Heatmap.cjs.map +1 -0
- package/dist/components/ui/Heatmap.d.ts +52 -0
- package/dist/components/ui/Heatmap.js +82 -0
- package/dist/components/ui/Heatmap.js.map +1 -0
- package/dist/components/ui/KeyMomentCard.cjs +2 -0
- package/dist/components/ui/KeyMomentCard.cjs.map +1 -0
- package/dist/components/ui/KeyMomentCard.d.ts +19 -0
- package/dist/components/ui/KeyMomentCard.js +45 -0
- package/dist/components/ui/KeyMomentCard.js.map +1 -0
- package/dist/components/ui/LineChart.cjs +2 -0
- package/dist/components/ui/LineChart.cjs.map +1 -0
- package/dist/components/ui/LineChart.d.ts +48 -0
- package/dist/components/ui/LineChart.js +199 -0
- package/dist/components/ui/LineChart.js.map +1 -0
- package/dist/components/ui/ParetoChart.cjs +1 -1
- package/dist/components/ui/ParetoChart.cjs.map +1 -1
- package/dist/components/ui/ParetoChart.d.ts +44 -5
- package/dist/components/ui/ParetoChart.js +261 -170
- package/dist/components/ui/ParetoChart.js.map +1 -1
- package/dist/components/ui/RankBar.cjs +1 -1
- package/dist/components/ui/RankBar.cjs.map +1 -1
- package/dist/components/ui/RankBar.d.ts +21 -2
- package/dist/components/ui/RankBar.js +76 -42
- package/dist/components/ui/RankBar.js.map +1 -1
- package/dist/components/ui/ReplayScrubber.cjs +2 -0
- package/dist/components/ui/ReplayScrubber.cjs.map +1 -0
- package/dist/components/ui/ReplayScrubber.d.ts +35 -0
- package/dist/components/ui/ReplayScrubber.js +119 -0
- package/dist/components/ui/ReplayScrubber.js.map +1 -0
- package/dist/components/ui/ReplayStepStrip.cjs +2 -0
- package/dist/components/ui/ReplayStepStrip.cjs.map +1 -0
- package/dist/components/ui/ReplayStepStrip.d.ts +45 -0
- package/dist/components/ui/ReplayStepStrip.js +142 -0
- package/dist/components/ui/ReplayStepStrip.js.map +1 -0
- package/dist/components/ui/ReplayTransport.cjs +2 -0
- package/dist/components/ui/ReplayTransport.cjs.map +1 -0
- package/dist/components/ui/ReplayTransport.d.ts +25 -0
- package/dist/components/ui/ReplayTransport.js +103 -0
- package/dist/components/ui/ReplayTransport.js.map +1 -0
- package/dist/components/ui/ResultMatrix.cjs +2 -0
- package/dist/components/ui/ResultMatrix.cjs.map +1 -0
- package/dist/components/ui/ResultMatrix.d.ts +23 -0
- package/dist/components/ui/ResultMatrix.js +53 -0
- package/dist/components/ui/ResultMatrix.js.map +1 -0
- package/dist/components/ui/ScrollStory.cjs +2 -2
- package/dist/components/ui/ScrollStory.cjs.map +1 -1
- package/dist/components/ui/ScrollStory.d.ts +3 -1
- package/dist/components/ui/ScrollStory.js +34 -32
- package/dist/components/ui/ScrollStory.js.map +1 -1
- package/dist/components/ui/SeriesLabel.cjs +2 -0
- package/dist/components/ui/SeriesLabel.cjs.map +1 -0
- package/dist/components/ui/SeriesLabel.d.ts +21 -0
- package/dist/components/ui/SeriesLabel.js +38 -0
- package/dist/components/ui/SeriesLabel.js.map +1 -0
- package/dist/components/ui/StackedBar.cjs +1 -1
- package/dist/components/ui/StackedBar.cjs.map +1 -1
- package/dist/components/ui/StackedBar.d.ts +21 -8
- package/dist/components/ui/StackedBar.js +110 -74
- package/dist/components/ui/StackedBar.js.map +1 -1
- package/dist/components/ui/TableOfContents.cjs +1 -1
- package/dist/components/ui/TableOfContents.cjs.map +1 -1
- package/dist/components/ui/TableOfContents.js +31 -89
- package/dist/components/ui/TableOfContents.js.map +1 -1
- package/dist/components/ui/ThoughtCard.cjs +2 -0
- package/dist/components/ui/ThoughtCard.cjs.map +1 -0
- package/dist/components/ui/ThoughtCard.d.ts +23 -0
- package/dist/components/ui/ThoughtCard.js +55 -0
- package/dist/components/ui/ThoughtCard.js.map +1 -0
- package/dist/components/ui/TimelineChart.cjs +1 -1
- package/dist/components/ui/TimelineChart.cjs.map +1 -1
- package/dist/components/ui/TimelineChart.d.ts +12 -15
- package/dist/components/ui/TimelineChart.js +160 -150
- package/dist/components/ui/TimelineChart.js.map +1 -1
- package/dist/components/ui/TraceSpanInspector.cjs +1 -1
- package/dist/components/ui/TraceSpanInspector.cjs.map +1 -1
- package/dist/components/ui/TraceSpanInspector.js +25 -25
- package/dist/components/ui/TraceSpanInspector.js.map +1 -1
- package/dist/components/ui/TraceTree.cjs +1 -1
- package/dist/components/ui/TraceTree.cjs.map +1 -1
- package/dist/components/ui/TraceTree.d.ts +13 -2
- package/dist/components/ui/TraceTree.js +22 -22
- package/dist/components/ui/TraceTree.js.map +1 -1
- package/dist/components/ui/index.d.ts +31 -5
- package/dist/components/ui/traceFormat.cjs +1 -1
- package/dist/components/ui/traceFormat.cjs.map +1 -1
- package/dist/components/ui/traceFormat.d.ts +0 -2
- package/dist/components/ui/traceFormat.js +2 -6
- package/dist/components/ui/traceFormat.js.map +1 -1
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useReplayPlayback.cjs +2 -0
- package/dist/hooks/useReplayPlayback.cjs.map +1 -0
- package/dist/hooks/useReplayPlayback.d.ts +44 -0
- package/dist/hooks/useReplayPlayback.js +73 -0
- package/dist/hooks/useReplayPlayback.js.map +1 -0
- package/dist/hooks/useSectionSpy.cjs +2 -0
- package/dist/hooks/useSectionSpy.cjs.map +1 -0
- package/dist/hooks/useSectionSpy.d.ts +23 -0
- package/dist/hooks/useSectionSpy.js +78 -0
- package/dist/hooks/useSectionSpy.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.js +339 -300
- package/dist/index.js.map +1 -1
- package/dist/layouts/SkipLink.cjs +2 -0
- package/dist/layouts/SkipLink.cjs.map +1 -0
- package/dist/layouts/SkipLink.d.ts +13 -0
- package/dist/layouts/SkipLink.js +21 -0
- package/dist/layouts/SkipLink.js.map +1 -0
- package/dist/layouts/shell/AegisShell.cjs +1 -1
- package/dist/layouts/shell/AegisShell.cjs.map +1 -1
- package/dist/layouts/shell/AegisShell.js +174 -193
- package/dist/layouts/shell/AegisShell.js.map +1 -1
- package/dist/layouts/site/SiteAnchorNav.cjs +2 -0
- package/dist/layouts/site/SiteAnchorNav.cjs.map +1 -0
- package/dist/layouts/site/SiteAnchorNav.d.ts +22 -0
- package/dist/layouts/site/SiteAnchorNav.js +51 -0
- package/dist/layouts/site/SiteAnchorNav.js.map +1 -0
- package/dist/layouts/site/SiteLayout.cjs +1 -1
- package/dist/layouts/site/SiteLayout.cjs.map +1 -1
- package/dist/layouts/site/SiteLayout.js +18 -28
- package/dist/layouts/site/SiteLayout.js.map +1 -1
- package/dist/layouts/site/SiteNav.cjs +1 -1
- package/dist/layouts/site/SiteNav.cjs.map +1 -1
- package/dist/layouts/site/SiteNav.js +50 -48
- package/dist/layouts/site/SiteNav.js.map +1 -1
- package/dist/layouts/site/SiteSectionHeader.cjs +2 -0
- package/dist/layouts/site/SiteSectionHeader.cjs.map +1 -0
- package/dist/layouts/site/SiteSectionHeader.d.ts +20 -0
- package/dist/layouts/site/SiteSectionHeader.js +30 -0
- package/dist/layouts/site/SiteSectionHeader.js.map +1 -0
- package/dist/layouts/site/index.d.ts +4 -0
- package/dist/lib/chart.cjs +2 -0
- package/dist/lib/chart.cjs.map +1 -0
- package/dist/lib/chart.d.ts +39 -0
- package/dist/lib/chart.js +51 -0
- package/dist/lib/chart.js.map +1 -0
- package/dist/locale/strings.cjs +1 -1
- package/dist/locale/strings.cjs.map +1 -1
- package/dist/locale/strings.d.ts +11 -8
- package/dist/locale/strings.js +38 -34
- package/dist/locale/strings.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/ui/SessionRunView.cjs +0 -4
- package/dist/components/ui/SessionRunView.cjs.map +0 -1
- package/dist/components/ui/SessionRunView.d.ts +0 -50
- package/dist/components/ui/SessionRunView.js +0 -379
- package/dist/components/ui/SessionRunView.js.map +0 -1
|
@@ -1,278 +1,369 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useElementWidth as
|
|
4
|
-
import {
|
|
1
|
+
import { jsx as o, jsxs as me } from "react/jsx-runtime";
|
|
2
|
+
import { useId as ke, useRef as Ae, useMemo as Le } from "react";
|
|
3
|
+
import { useElementWidth as Ne } from "../../hooks/useElementWidth.js";
|
|
4
|
+
import { zeroAnchoredDomain as xe, staggeredProgress as Z, chartColorValue as Ee } from "../../lib/chart.js";
|
|
5
|
+
import { ChartLegend as Ie } from "./ChartLegend.js";
|
|
6
|
+
import { EmptyState as we } from "./EmptyState.js";
|
|
5
7
|
/* empty css */
|
|
6
|
-
import { useStrings as
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
return
|
|
8
|
+
import { useStrings as Me } from "../../locale/useStrings.js";
|
|
9
|
+
const Pe = 320, de = 220, Be = 56, $e = 16, He = 28, Se = 44, B = 5, $ = 8, he = 4, Ce = 6.2, Re = 11, X = 14, Te = 520;
|
|
10
|
+
function K(r, m, i) {
|
|
11
|
+
return i === "lower" ? r < m : r > m;
|
|
10
12
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
function je(r) {
|
|
14
|
+
return [...r].reduce(
|
|
15
|
+
(m, i) => m + ((i.codePointAt(0) ?? 0) > 255 ? Re : Ce),
|
|
16
|
+
0
|
|
17
|
+
);
|
|
14
18
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
function De(r, m, i) {
|
|
20
|
+
const b = [], u = /* @__PURE__ */ new Map(), v = B + $ / 2;
|
|
21
|
+
for (const s of r) {
|
|
22
|
+
const h = je(s.label), k = [
|
|
23
|
+
{ x: s.x + v, y: s.y + X / 3, anchor: "start" },
|
|
24
|
+
{ x: s.x - v, y: s.y + X / 3, anchor: "end" },
|
|
25
|
+
{ x: s.x - h / 2, y: s.y - v, anchor: "start" },
|
|
26
|
+
{ x: s.x - h / 2, y: s.y + v + X, anchor: "start" }
|
|
27
|
+
], A = (y) => {
|
|
28
|
+
const g = y.anchor === "end" ? y.x - h : y.x;
|
|
29
|
+
return {
|
|
30
|
+
l: g,
|
|
31
|
+
r: g + h,
|
|
32
|
+
t: y.y - X,
|
|
33
|
+
b: y.y
|
|
34
|
+
};
|
|
35
|
+
}, L = (y) => {
|
|
36
|
+
const { l: g, r: _, t: n, b: E } = A(y);
|
|
37
|
+
return g >= i.left && _ <= i.right && n >= i.top && E <= i.bottom;
|
|
38
|
+
}, H = (y) => {
|
|
39
|
+
const { l: g, r: _, t: n, b: E } = A(y);
|
|
40
|
+
return L(y) && b.every(
|
|
41
|
+
(c) => _ < c.l || g > c.r || E < c.t || n > c.b
|
|
42
|
+
) && m.every(
|
|
43
|
+
(c) => c.key === s.key || c.x + B < g || c.x - B > _ || c.y + B < n || c.y - B > E
|
|
44
|
+
);
|
|
45
|
+
}, N = k.find(H) ?? k.find(L) ?? k[s.x > (i.left + i.right) / 2 ? 1 : 0];
|
|
46
|
+
b.push(A(N)), u.set(s.key, N);
|
|
47
|
+
}
|
|
48
|
+
return u;
|
|
49
|
+
}
|
|
50
|
+
function Fe({
|
|
51
|
+
points: r,
|
|
52
|
+
xLabel: m,
|
|
53
|
+
yLabel: i,
|
|
54
|
+
xDirection: b = "lower",
|
|
55
|
+
yDirection: u = "higher",
|
|
56
|
+
formatX: v = String,
|
|
57
|
+
formatY: s = String,
|
|
58
|
+
xScale: h = "linear",
|
|
59
|
+
xDomain: k,
|
|
60
|
+
yDomain: A,
|
|
61
|
+
xTicks: L,
|
|
62
|
+
yTicks: H,
|
|
63
|
+
labels: N = "front",
|
|
64
|
+
fadeDominated: y = !0,
|
|
65
|
+
highlightKeys: g,
|
|
66
|
+
maxHeight: _ = Pe,
|
|
67
|
+
onSelect: n,
|
|
68
|
+
legend: E,
|
|
69
|
+
empty: c,
|
|
70
|
+
emptyTitle: _e,
|
|
71
|
+
emptyDescription: fe,
|
|
72
|
+
progress: f,
|
|
73
|
+
frontProgress: ee,
|
|
74
|
+
className: pe
|
|
29
75
|
}) {
|
|
30
|
-
const
|
|
31
|
-
|
|
76
|
+
const te = Me(), re = ke(), j = Ae(null), p = Ne(j), V = [
|
|
77
|
+
"aegis-pareto",
|
|
78
|
+
f === void 0 && ee === void 0 ? "" : "aegis-pareto--scroll",
|
|
79
|
+
pe ?? ""
|
|
80
|
+
].filter(Boolean).join(" "), x = Le(() => {
|
|
81
|
+
if (r.length === 0 || p === 0)
|
|
32
82
|
return null;
|
|
33
83
|
const e = Math.round(
|
|
34
|
-
Math.min(
|
|
35
|
-
),
|
|
36
|
-
|
|
37
|
-
|
|
84
|
+
Math.min(_, Math.max(de, p / 2))
|
|
85
|
+
), a = r.map((t) => t.x), P = Math.min(...a), G = Math.max(...a), [F, ie] = k ?? (h === "log" ? (
|
|
86
|
+
// One value has no span to divide, so it sits mid-axis.
|
|
87
|
+
[
|
|
88
|
+
G > P ? P : P / 2,
|
|
89
|
+
G > P ? G : G * 2
|
|
90
|
+
]
|
|
91
|
+
) : xe(a)), [R, U] = A ?? xe(r.map((t) => t.y)), O = h === "log" ? Math.log10 : (t) => t, T = Be, q = p - $e, ce = He, J = e - Se, W = (t) => T + (O(t) - O(F)) / (O(ie) - O(F)) * (q - T), Q = (t) => J - (t - R) / (U - R) * (J - ce), ye = r.filter(
|
|
92
|
+
(t) => !r.some(
|
|
93
|
+
(l) => l.key !== t.key && (K(l.x, t.x, b) || l.x === t.x) && (K(l.y, t.y, u) || l.y === t.y) && (K(l.x, t.x, b) || K(l.y, t.y, u))
|
|
38
94
|
)
|
|
39
|
-
).sort((t,
|
|
40
|
-
{ length:
|
|
41
|
-
(t,
|
|
95
|
+
).sort((t, l) => t.x - l.x), ge = Array.from(
|
|
96
|
+
{ length: he },
|
|
97
|
+
(t, l) => (l + 1) / he
|
|
98
|
+
), ve = new Map(
|
|
99
|
+
[...r].sort((t, l) => W(t.x) - W(l.x)).map((t, l) => [t.key, l])
|
|
42
100
|
);
|
|
43
101
|
return {
|
|
44
102
|
height: e,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
103
|
+
order: ve,
|
|
104
|
+
left: T,
|
|
105
|
+
right: q,
|
|
106
|
+
top: ce,
|
|
107
|
+
bottom: J,
|
|
108
|
+
sx: W,
|
|
109
|
+
sy: Q,
|
|
110
|
+
front: ye,
|
|
111
|
+
frontKeys: new Set(ye.map((t) => t.key)),
|
|
112
|
+
// Even shares of the plot, which on a log axis are even ratios.
|
|
113
|
+
gridX: L?.map(W) ?? ge.map((t) => T + (q - T) * t),
|
|
114
|
+
gridY: H?.map(Q) ?? ge.map((t) => Q(R + (U - R) * t)),
|
|
115
|
+
xLabels: L ?? [F, ie],
|
|
116
|
+
yLabels: H ?? [R, U]
|
|
59
117
|
};
|
|
60
|
-
}, [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
118
|
+
}, [
|
|
119
|
+
r,
|
|
120
|
+
p,
|
|
121
|
+
b,
|
|
122
|
+
u,
|
|
123
|
+
h,
|
|
124
|
+
k,
|
|
125
|
+
A,
|
|
126
|
+
L,
|
|
127
|
+
H,
|
|
128
|
+
_
|
|
129
|
+
]);
|
|
130
|
+
if (r.length === 0)
|
|
131
|
+
return /* @__PURE__ */ o("div", { ref: j, className: V, children: c === void 0 ? /* @__PURE__ */ o(
|
|
132
|
+
we,
|
|
64
133
|
{
|
|
65
|
-
title:
|
|
66
|
-
description:
|
|
134
|
+
title: _e ?? te.paretoEmptyTitle,
|
|
135
|
+
description: fe
|
|
67
136
|
}
|
|
68
|
-
) : /* @__PURE__ */
|
|
137
|
+
) : /* @__PURE__ */ o(
|
|
69
138
|
"div",
|
|
70
139
|
{
|
|
71
140
|
className: "aegis-pareto__empty",
|
|
72
141
|
style: {
|
|
73
|
-
"--aegis-pareto-min-height": `${
|
|
142
|
+
"--aegis-pareto-min-height": `${de.toString()}px`
|
|
74
143
|
},
|
|
75
|
-
children:
|
|
144
|
+
children: c
|
|
76
145
|
}
|
|
77
146
|
) });
|
|
78
|
-
if (!
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
-
const { height:
|
|
81
|
-
|
|
147
|
+
if (!x)
|
|
148
|
+
return /* @__PURE__ */ o("div", { ref: j, className: V });
|
|
149
|
+
const { height: D, left: d, right: I, top: Y, bottom: w, sx: M, sy: S, front: oe, frontKeys: ae } = x, z = g === void 0 ? null : new Set(g), le = (e) => z !== null && !z.has(e), se = N === "all" && p >= Te, be = De(
|
|
150
|
+
r.filter(
|
|
151
|
+
(e) => se || ae.has(e.key) || (z?.has(e.key) ?? !1)
|
|
152
|
+
).map((e) => ({
|
|
153
|
+
key: e.key,
|
|
154
|
+
label: e.label,
|
|
155
|
+
x: M(e.x),
|
|
156
|
+
y: S(e.y)
|
|
157
|
+
})),
|
|
158
|
+
r.map((e) => ({
|
|
159
|
+
key: e.key,
|
|
160
|
+
x: M(e.x),
|
|
161
|
+
y: S(e.y)
|
|
162
|
+
})),
|
|
163
|
+
// A label may run up into the space above the plot.
|
|
164
|
+
{ left: d, right: I, top: 0, bottom: w }
|
|
165
|
+
), ne = E?.map((e) => ({
|
|
166
|
+
key: e.key,
|
|
167
|
+
label: e.label,
|
|
168
|
+
color: e.color ?? "var(--bg-inverted)"
|
|
169
|
+
})) ?? (N === "all" && !se ? r.map((e) => ({
|
|
170
|
+
key: e.key,
|
|
171
|
+
label: e.label,
|
|
172
|
+
color: e.color ?? "var(--bg-inverted)"
|
|
173
|
+
})) : []), C = ee ?? (f === void 0 ? void 0 : Z(f, r.length, r.length + 1)), ue = (e, a) => {
|
|
174
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), n?.(a));
|
|
82
175
|
};
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
176
|
+
return /* @__PURE__ */ me("div", { ref: j, className: V, children: [
|
|
177
|
+
/* @__PURE__ */ me(
|
|
85
178
|
"svg",
|
|
86
179
|
{
|
|
87
180
|
className: "aegis-pareto__svg",
|
|
88
|
-
width:
|
|
89
|
-
height:
|
|
90
|
-
viewBox: `0 0 ${
|
|
91
|
-
role:
|
|
92
|
-
"aria-label":
|
|
93
|
-
style: {
|
|
181
|
+
width: p,
|
|
182
|
+
height: D,
|
|
183
|
+
viewBox: `0 0 ${p.toString()} ${D.toString()}`,
|
|
184
|
+
role: n ? "group" : "img",
|
|
185
|
+
"aria-label": te.paretoChartLabel(m, i),
|
|
186
|
+
style: {
|
|
187
|
+
"--aegis-pareto-count": r.length,
|
|
188
|
+
...C === void 0 ? {} : { "--aegis-pareto-front-progress": C }
|
|
189
|
+
},
|
|
94
190
|
children: [
|
|
95
|
-
|
|
191
|
+
x.gridY.map((e) => /* @__PURE__ */ o(
|
|
96
192
|
"line",
|
|
97
193
|
{
|
|
98
194
|
className: "aegis-pareto__grid",
|
|
99
|
-
x1:
|
|
195
|
+
x1: d,
|
|
100
196
|
y1: e,
|
|
101
|
-
x2:
|
|
197
|
+
x2: I,
|
|
102
198
|
y2: e
|
|
103
199
|
},
|
|
104
200
|
`gy-${e.toString()}`
|
|
105
201
|
)),
|
|
106
|
-
|
|
202
|
+
x.gridX.map((e) => /* @__PURE__ */ o(
|
|
107
203
|
"line",
|
|
108
204
|
{
|
|
109
205
|
className: "aegis-pareto__grid",
|
|
110
206
|
x1: e,
|
|
111
|
-
y1:
|
|
207
|
+
y1: Y,
|
|
112
208
|
x2: e,
|
|
113
|
-
y2:
|
|
209
|
+
y2: w
|
|
114
210
|
},
|
|
115
211
|
`gx-${e.toString()}`
|
|
116
212
|
)),
|
|
117
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ o(
|
|
118
214
|
"line",
|
|
119
215
|
{
|
|
120
216
|
className: "aegis-pareto__axis",
|
|
121
|
-
x1:
|
|
122
|
-
y1:
|
|
123
|
-
x2:
|
|
124
|
-
y2:
|
|
217
|
+
x1: d,
|
|
218
|
+
y1: w,
|
|
219
|
+
x2: I,
|
|
220
|
+
y2: w
|
|
125
221
|
}
|
|
126
222
|
),
|
|
127
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ o(
|
|
128
224
|
"line",
|
|
129
225
|
{
|
|
130
226
|
className: "aegis-pareto__axis",
|
|
131
|
-
x1:
|
|
132
|
-
y1:
|
|
133
|
-
x2:
|
|
134
|
-
y2:
|
|
227
|
+
x1: d,
|
|
228
|
+
y1: Y,
|
|
229
|
+
x2: d,
|
|
230
|
+
y2: w
|
|
135
231
|
}
|
|
136
232
|
),
|
|
137
|
-
|
|
233
|
+
C !== void 0 && /* @__PURE__ */ o("clipPath", { id: re, children: /* @__PURE__ */ o(
|
|
234
|
+
"rect",
|
|
235
|
+
{
|
|
236
|
+
x: d,
|
|
237
|
+
y: 0,
|
|
238
|
+
width: (I - d) * C,
|
|
239
|
+
height: D
|
|
240
|
+
}
|
|
241
|
+
) }),
|
|
242
|
+
oe.length > 1 && /* @__PURE__ */ o(
|
|
138
243
|
"polyline",
|
|
139
244
|
{
|
|
140
245
|
className: "aegis-pareto__front",
|
|
141
|
-
|
|
142
|
-
|
|
246
|
+
clipPath: C === void 0 ? void 0 : `url(#${re})`,
|
|
247
|
+
points: oe.map(
|
|
248
|
+
(e) => `${M(e.x).toString()},${S(e.y).toString()}`
|
|
143
249
|
).join(" ")
|
|
144
250
|
}
|
|
145
251
|
),
|
|
146
|
-
|
|
252
|
+
r.map((e, a) => /* @__PURE__ */ o(
|
|
147
253
|
"circle",
|
|
148
254
|
{
|
|
149
255
|
className: [
|
|
150
256
|
"aegis-pareto__point",
|
|
151
|
-
|
|
152
|
-
|
|
257
|
+
y && !ae.has(e.key) ? "aegis-pareto__point--dominated" : "",
|
|
258
|
+
le(e.key) ? "aegis-pareto__point--dimmed" : "",
|
|
259
|
+
n ? "aegis-pareto__point--interactive" : ""
|
|
153
260
|
].filter(Boolean).join(" "),
|
|
154
261
|
style: {
|
|
155
|
-
fill: e.color,
|
|
156
|
-
"--aegis-pareto-index":
|
|
262
|
+
fill: e.color === void 0 ? void 0 : Ee(e.color),
|
|
263
|
+
"--aegis-pareto-index": a,
|
|
264
|
+
"--aegis-pareto-point-progress": f === void 0 ? 1 : Z(
|
|
265
|
+
f,
|
|
266
|
+
x.order.get(e.key) ?? a,
|
|
267
|
+
r.length + 1
|
|
268
|
+
)
|
|
157
269
|
},
|
|
158
|
-
cx:
|
|
159
|
-
cy:
|
|
160
|
-
r:
|
|
161
|
-
role:
|
|
162
|
-
tabIndex:
|
|
163
|
-
"aria-label":
|
|
164
|
-
onClick:
|
|
165
|
-
|
|
270
|
+
cx: M(e.x),
|
|
271
|
+
cy: S(e.y),
|
|
272
|
+
r: B,
|
|
273
|
+
role: n ? "button" : void 0,
|
|
274
|
+
tabIndex: n ? 0 : void 0,
|
|
275
|
+
"aria-label": n ? e.label : void 0,
|
|
276
|
+
onClick: n ? () => {
|
|
277
|
+
n(e.key);
|
|
166
278
|
} : void 0,
|
|
167
|
-
onKeyDown:
|
|
168
|
-
|
|
279
|
+
onKeyDown: n ? (P) => {
|
|
280
|
+
ue(P, e.key);
|
|
169
281
|
} : void 0,
|
|
170
|
-
children: /* @__PURE__ */
|
|
282
|
+
children: /* @__PURE__ */ o("title", { children: e.label })
|
|
171
283
|
},
|
|
172
284
|
e.key
|
|
173
285
|
)),
|
|
174
|
-
|
|
175
|
-
const
|
|
176
|
-
return /* @__PURE__ */
|
|
286
|
+
r.map((e) => {
|
|
287
|
+
const a = be.get(e.key);
|
|
288
|
+
return a === void 0 ? null : /* @__PURE__ */ o(
|
|
177
289
|
"text",
|
|
178
290
|
{
|
|
179
|
-
className:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
291
|
+
className: [
|
|
292
|
+
"aegis-pareto__point-label",
|
|
293
|
+
le(e.key) ? "aegis-pareto__point-label--dimmed" : ""
|
|
294
|
+
].filter(Boolean).join(" "),
|
|
295
|
+
style: N === "all" ? {
|
|
296
|
+
"--aegis-pareto-front-progress": f === void 0 ? 1 : Z(
|
|
297
|
+
f,
|
|
298
|
+
x.order.get(e.key) ?? 0,
|
|
299
|
+
r.length + 1
|
|
300
|
+
)
|
|
301
|
+
} : void 0,
|
|
302
|
+
x: a.x,
|
|
303
|
+
y: a.y,
|
|
304
|
+
textAnchor: a.anchor,
|
|
183
305
|
children: e.label
|
|
184
306
|
},
|
|
185
307
|
`label-${e.key}`
|
|
186
308
|
);
|
|
187
309
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
310
|
+
x.xLabels.map((e, a) => /* @__PURE__ */ o(
|
|
189
311
|
"text",
|
|
190
312
|
{
|
|
191
313
|
className: "aegis-pareto__tick",
|
|
192
|
-
x:
|
|
193
|
-
y:
|
|
194
|
-
textAnchor: "middle",
|
|
195
|
-
children:
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
{
|
|
201
|
-
className: "aegis-pareto__tick",
|
|
202
|
-
x: d,
|
|
203
|
-
y: h + o * 2,
|
|
204
|
-
textAnchor: "end",
|
|
205
|
-
children: I(m.xHi)
|
|
206
|
-
}
|
|
207
|
-
),
|
|
208
|
-
/* @__PURE__ */ a(
|
|
209
|
-
"text",
|
|
210
|
-
{
|
|
211
|
-
className: "aegis-pareto__tick",
|
|
212
|
-
x: l - o,
|
|
213
|
-
y: h,
|
|
214
|
-
textAnchor: "end",
|
|
215
|
-
dominantBaseline: "middle",
|
|
216
|
-
children: S(m.yLo)
|
|
217
|
-
}
|
|
218
|
-
),
|
|
219
|
-
/* @__PURE__ */ a(
|
|
314
|
+
x: M(e),
|
|
315
|
+
y: w + $ * 2,
|
|
316
|
+
textAnchor: a === x.xLabels.length - 1 && M(e) >= I - 1 ? "end" : "middle",
|
|
317
|
+
children: v(e)
|
|
318
|
+
},
|
|
319
|
+
`x-${e.toString()}`
|
|
320
|
+
)),
|
|
321
|
+
x.yLabels.map((e) => /* @__PURE__ */ o(
|
|
220
322
|
"text",
|
|
221
323
|
{
|
|
222
324
|
className: "aegis-pareto__tick",
|
|
223
|
-
x:
|
|
224
|
-
y:
|
|
325
|
+
x: d - $,
|
|
326
|
+
y: S(e),
|
|
225
327
|
textAnchor: "end",
|
|
226
328
|
dominantBaseline: "middle",
|
|
227
|
-
children:
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
329
|
+
children: s(e)
|
|
330
|
+
},
|
|
331
|
+
`y-${e.toString()}`
|
|
332
|
+
)),
|
|
333
|
+
/* @__PURE__ */ o(
|
|
231
334
|
"text",
|
|
232
335
|
{
|
|
233
336
|
className: "aegis-pareto__axis-label",
|
|
234
|
-
x:
|
|
235
|
-
y:
|
|
337
|
+
x: I,
|
|
338
|
+
y: D - $,
|
|
236
339
|
textAnchor: "end",
|
|
237
|
-
children:
|
|
340
|
+
children: m
|
|
238
341
|
}
|
|
239
342
|
),
|
|
240
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ o(
|
|
241
344
|
"text",
|
|
242
345
|
{
|
|
243
346
|
className: "aegis-pareto__axis-label",
|
|
244
|
-
x:
|
|
245
|
-
y:
|
|
347
|
+
x: d - $,
|
|
348
|
+
y: Y - $ * 2,
|
|
246
349
|
textAnchor: "start",
|
|
247
|
-
children:
|
|
350
|
+
children: i
|
|
248
351
|
}
|
|
249
352
|
)
|
|
250
353
|
]
|
|
251
354
|
}
|
|
252
355
|
),
|
|
253
|
-
|
|
254
|
-
|
|
356
|
+
ne.length > 0 ? /* @__PURE__ */ o(
|
|
357
|
+
Ie,
|
|
255
358
|
{
|
|
256
359
|
className: "aegis-pareto__legend",
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
},
|
|
260
|
-
children: A.map((e) => /* @__PURE__ */ $("li", { className: "aegis-pareto__legend-item", children: [
|
|
261
|
-
/* @__PURE__ */ a(
|
|
262
|
-
"span",
|
|
263
|
-
{
|
|
264
|
-
className: "aegis-pareto__swatch",
|
|
265
|
-
style: e.color ? { background: e.color } : void 0,
|
|
266
|
-
"aria-hidden": "true"
|
|
267
|
-
}
|
|
268
|
-
),
|
|
269
|
-
e.label
|
|
270
|
-
] }, e.key))
|
|
360
|
+
shape: "dot",
|
|
361
|
+
items: ne
|
|
271
362
|
}
|
|
272
363
|
) : null
|
|
273
364
|
] });
|
|
274
365
|
}
|
|
275
366
|
export {
|
|
276
|
-
|
|
367
|
+
Fe as ParetoChart
|
|
277
368
|
};
|
|
278
369
|
//# sourceMappingURL=ParetoChart.js.map
|