@mechane-ai/elements 0.39.0 → 0.41.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/NOTICE +11 -19
- package/README.md +49 -25
- package/dist/accessibility-P89UG9-r.js +25 -0
- package/dist/agent.js +1 -0
- package/dist/ai.js +50 -44
- package/dist/{categorical-values-BECG-J6R.js → categorical-values-DnGR_pQx.js} +3 -3
- package/dist/{chart-frame-CJFnI39T.js → chart-frame-BsyI1Zc8.js} +58 -57
- package/dist/{chart-input-DwAobO8Y.js → chart-input-r4S3-QCT.js} +2 -2
- package/dist/chart-navigation-D7OkLdSx.js +119 -0
- package/dist/charts/cartesian.js +560 -583
- package/dist/charts/distribution.js +218 -218
- package/dist/charts/graph.js +86 -85
- package/dist/charts/hierarchy.js +4 -4
- package/dist/charts/matrix.js +148 -147
- package/dist/charts/timeline.js +77 -76
- package/dist/charts.js +2 -2
- package/dist/code-block-C4K1sM9O.js +255 -0
- package/dist/collections.js +828 -607
- package/dist/constants.stylex-BILvnwUk.js +84 -0
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +3 -3
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +2 -2
- package/dist/content/tree.js +184 -77
- package/dist/{content-link-B3ObdyZY.js → content-link-CBDqSvgP.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/control-styles-D3q_Qyxi.js +179 -0
- package/dist/csp.js +14 -1
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +359 -245
- package/dist/forms-I-WMHTkr.js +139 -0
- package/dist/forms.js +3 -3
- package/dist/index.js +1 -1
- package/dist/layout.js +271 -241
- package/dist/navigation/commands.js +87 -76
- package/dist/{navigation-D2_sGy3C.js → navigation-CveMIuXI.js} +1 -1
- package/dist/navigation.js +2 -2
- package/dist/overlays.js +1 -1
- package/dist/packages/ai/src/message-action.d.ts +1 -1
- package/dist/packages/charts/src/chart-navigation.d.ts +18 -2
- package/dist/packages/charts/src/chart-surface.d.ts +23 -0
- package/dist/packages/charts/src/distribution/distribution-plot.d.ts +3 -2
- package/dist/packages/collections/src/data-table.d.ts +7 -2
- package/dist/packages/collections/src/index.d.ts +4 -1
- package/dist/packages/collections/src/query-controls.d.ts +18 -0
- package/dist/packages/collections/src/table-query.d.ts +64 -0
- package/dist/packages/collections/src/use-collection-controls.d.ts +3 -8
- package/dist/packages/content/src/pierre-theme.d.ts +0 -1
- package/dist/packages/core/src/actions.d.ts +15 -13
- package/dist/packages/core/src/copy-value.d.ts +3 -2
- package/dist/packages/core/src/disclosure.d.ts +14 -11
- package/dist/packages/feedback/src/notifications.d.ts +15 -15
- package/dist/packages/feedback/src/toast.d.ts +9 -3
- package/dist/packages/forms/src/combobox.d.ts +31 -41
- package/dist/packages/forms/src/dates/event-month.d.ts +17 -0
- package/dist/packages/forms/src/dates/index.d.ts +2 -0
- package/dist/packages/forms/src/field-styles.d.ts +0 -19
- package/dist/packages/forms/src/form-controls.d.ts +26 -24
- package/dist/packages/forms/src/forms.d.ts +17 -14
- package/dist/packages/forms/src/select-control.d.ts +6 -4
- package/dist/packages/forms/src/select.d.ts +14 -18
- package/dist/packages/forms/src/selection-state.d.ts +11 -0
- package/dist/packages/forms/src/selection-styles.d.ts +3 -0
- package/dist/packages/forms/src/selection.d.ts +21 -19
- package/dist/packages/foundations/src/agent/index.d.ts +2 -0
- package/dist/packages/foundations/src/control-state.d.ts +2 -3
- package/dist/packages/foundations/src/control-styles.d.ts +19 -0
- package/dist/packages/foundations/src/csp/index.d.ts +1 -1
- package/dist/packages/foundations/src/csp/provider.d.ts +3 -0
- package/dist/packages/foundations/src/style-composition.d.ts +4 -1
- package/dist/packages/layout/src/app-shell.d.ts +12 -1
- package/dist/packages/layout/src/index.d.ts +1 -1
- package/dist/packages/layout/src/navigation-rail.d.ts +15 -2
- package/dist/packages/layout/src/resizable.d.ts +2 -2
- package/dist/packages/layout/src/sidebar.d.ts +4 -3
- package/dist/packages/navigation/src/tab-styles.d.ts +1 -1
- package/dist/packages/navigation/src/tabs.d.ts +12 -10
- package/dist/packages/overlays/src/alert-dialog.d.ts +19 -13
- package/dist/packages/overlays/src/dialog.d.ts +39 -24
- package/dist/packages/overlays/src/drawer.d.ts +16 -26
- package/dist/packages/overlays/src/menu.d.ts +37 -44
- package/dist/packages/overlays/src/overlay-root.d.ts +10 -0
- package/dist/packages/overlays/src/popover.d.ts +11 -20
- package/dist/packages/overlays/src/preview.d.ts +6 -13
- package/dist/packages/overlays/src/tooltip.d.ts +12 -15
- package/dist/{pierre-diff-CaPsfQRo.js → pierre-diff-DJ3oOfPX.js} +5 -5
- package/dist/{src-DPRmO-JY.js → src-CNV1ewzb.js} +379 -407
- package/dist/{src-CSWIG_op.js → src-CQQvXi7a.js} +58 -81
- package/dist/{src-DWjAoOyd.js → src-D2OHco8V.js} +42 -41
- package/dist/src-DfOAlAd2.js +750 -0
- package/dist/src-na2DdkKI.js +561 -0
- package/dist/{src-C-Sx37kz.js → src-s3tWwnN4.js} +361 -518
- package/dist/styles.js +3 -0
- package/dist/{elements.css → styles2.css} +195 -97
- package/dist/tokens.js +3 -1
- package/dist/{tokens.stylex-CJbIDPB9.js → tokens.stylex-dF5CACEJ.js} +13 -93
- package/package.json +8 -9
- package/skills/elements-workspace/SKILL.md +12 -0
- package/dist/accessibility-C-aIZ1Yx.js +0 -15
- package/dist/chart-navigation-CBIeNtJq.js +0 -67
- package/dist/code-block-aC0Htt4N.js +0 -184
- package/dist/forms-BQQFas9g.js +0 -118
- package/dist/foundations.css +0 -7
- package/dist/packages/content/src/tree/pierre-tree.d.ts +0 -3
- package/dist/pierre-theme-BpNaWn1x.js +0 -126
- package/dist/pierre-tree-CYCRjdGG.js +0 -106
- package/dist/src-d7EAi61b.js +0 -617
- package/dist/src-nkgFDl-g.js +0 -1171
- package/dist/style-composition-uYlczSsB.js +0 -9
- package/styles.css +0 -2
package/dist/charts/cartesian.js
CHANGED
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import { c as e, d as t, f as n } from "../src-
|
|
2
|
-
import { i as r, n as i, r as a, t as o } from "../categorical-values-
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import { n as
|
|
6
|
-
import { r as
|
|
7
|
-
import { n as
|
|
8
|
-
import { D as
|
|
9
|
-
import { m as
|
|
10
|
-
import * as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import { c as e, d as t, f as n } from "../src-DfOAlAd2.js";
|
|
2
|
+
import { i as r, n as i, r as a, t as o } from "../categorical-values-DnGR_pQx.js";
|
|
3
|
+
import { a as s, n as c, r as l, t as u } from "../chart-navigation-D7OkLdSx.js";
|
|
4
|
+
import { a as d, i as f, n as p } from "../chart-frame-BsyI1Zc8.js";
|
|
5
|
+
import { n as m, r as h, t as g } from "../chart-input-r4S3-QCT.js";
|
|
6
|
+
import { r as _ } from "../tokens.stylex-dF5CACEJ.js";
|
|
7
|
+
import { n as v, t as ee } from "../plot-width-BQQS-mw9.js";
|
|
8
|
+
import { D as y } from "../src-s3tWwnN4.js";
|
|
9
|
+
import { m as b } from "../src-CNV1ewzb.js";
|
|
10
|
+
import * as x from "@stylexjs/stylex";
|
|
11
|
+
import { Button as te } from "@ui-sdk/react/button";
|
|
12
|
+
import { useEffect as S, useId as C, useMemo as ne, useRef as w, useState as T } from "react";
|
|
13
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
14
|
+
import { bindDrag as k } from "@ui-sdk/core";
|
|
15
|
+
import { scaleBand as A, scaleLinear as j } from "@visx/scale";
|
|
16
|
+
import { AreaClosed as re, Bar as M, LinePath as ie } from "@visx/shape";
|
|
15
17
|
// packages/charts/src/chart-cursor.tsx
|
|
16
|
-
function
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
+
function ae({ x: e, top: t, bottom: n, width: r }) {
|
|
19
|
+
return /* @__PURE__ */ O("g", {
|
|
18
20
|
"aria-hidden": !0,
|
|
19
21
|
className: "xlshs6z xgs60n x17y187c xbabvq0 x47corl",
|
|
20
|
-
children: [/* @__PURE__ */
|
|
22
|
+
children: [/* @__PURE__ */ D("line", {
|
|
21
23
|
x1: e,
|
|
22
24
|
x2: e,
|
|
23
25
|
y1: t,
|
|
24
26
|
y2: n,
|
|
25
27
|
className: "xnpr05h x1ntoi03 x13efnbd"
|
|
26
|
-
}), /* @__PURE__ */
|
|
28
|
+
}), /* @__PURE__ */ D("line", {
|
|
27
29
|
x1: e - r / 2,
|
|
28
30
|
x2: e + r / 2,
|
|
29
31
|
y1: n + 4,
|
|
@@ -33,14 +35,14 @@ function oe({ x: e, top: t, bottom: n, width: r }) {
|
|
|
33
35
|
});
|
|
34
36
|
}
|
|
35
37
|
// packages/charts/src/chart-inspection.tsx
|
|
36
|
-
var
|
|
38
|
+
var N = {
|
|
37
39
|
kzqmXN: "x1xc55vz",
|
|
38
40
|
kZKoxP: "xdk7pt",
|
|
39
41
|
kmuXW: "x2lah0s",
|
|
40
42
|
$$css: !0
|
|
41
|
-
},
|
|
43
|
+
}, P = {
|
|
42
44
|
swatch: (e) => [
|
|
43
|
-
|
|
45
|
+
N,
|
|
44
46
|
{
|
|
45
47
|
kWkggS: e == null ? e : "xl8spv7",
|
|
46
48
|
$$css: !0
|
|
@@ -80,75 +82,75 @@ var O = {
|
|
|
80
82
|
"--x-left": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e),
|
|
81
83
|
"--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
|
|
82
84
|
}]
|
|
83
|
-
},
|
|
84
|
-
function
|
|
85
|
-
return /* @__PURE__ */
|
|
85
|
+
}, oe = 4;
|
|
86
|
+
function se() {
|
|
87
|
+
return /* @__PURE__ */ D("ul", {
|
|
86
88
|
"aria-hidden": !0,
|
|
87
89
|
inert: !0,
|
|
88
90
|
className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k",
|
|
89
|
-
children: Array.from({ length:
|
|
91
|
+
children: Array.from({ length: oe }, (e, t) => /* @__PURE__ */ O("li", {
|
|
90
92
|
className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe x1f394nn x43dure",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
93
|
+
children: [/* @__PURE__ */ D("span", { ...x.props(P.swatch(_.line)) }), /* @__PURE__ */ O("span", {
|
|
92
94
|
className: "x1cqoux5 xeuugli",
|
|
93
95
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ D(n, {}),
|
|
97
|
+
/* @__PURE__ */ D("span", {
|
|
96
98
|
className: "x1s85apg xannxpe",
|
|
97
|
-
children: /* @__PURE__ */
|
|
99
|
+
children: /* @__PURE__ */ D(n, {})
|
|
98
100
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ D("span", {
|
|
100
102
|
className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b",
|
|
101
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ D(n, {})
|
|
102
104
|
})
|
|
103
105
|
]
|
|
104
106
|
})]
|
|
105
107
|
}, t))
|
|
106
108
|
});
|
|
107
109
|
}
|
|
108
|
-
function
|
|
109
|
-
return t === void 0 ? e : /* @__PURE__ */
|
|
110
|
+
function F({ title: e, detail: t }) {
|
|
111
|
+
return t === void 0 ? e : /* @__PURE__ */ O("span", {
|
|
110
112
|
"aria-label": e,
|
|
111
113
|
className: "x1lliihq xb3r6kr xlyipyv xuxw1ft",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
114
|
+
children: [/* @__PURE__ */ D("span", {
|
|
113
115
|
className: "xt0psk2 x1boff50",
|
|
114
116
|
children: e
|
|
115
|
-
}), /* @__PURE__ */
|
|
117
|
+
}), /* @__PURE__ */ D("span", {
|
|
116
118
|
className: "x1s85apg xfodcyb",
|
|
117
119
|
children: t
|
|
118
120
|
})]
|
|
119
121
|
});
|
|
120
122
|
}
|
|
121
|
-
function
|
|
123
|
+
function ce({ id: e, label: t, summary: n, legend: r, layoutLegend: i, rows: a, x: o, width: s, offset: c = 16, source: l, notes: u = [], hasSeriesSummary: f = !1 }) {
|
|
122
124
|
let p = Math.min(260, s), m = o > s / 2 ? o - p - c : o + c, h = Math.max(0, Math.min(s - p, m)), g = t === void 0 ? [] : [
|
|
123
125
|
t,
|
|
124
126
|
n,
|
|
125
127
|
...a.map((e) => `${e.label}: ${e.value}`),
|
|
126
|
-
...
|
|
128
|
+
...u
|
|
127
129
|
].filter((e) => e !== void 0);
|
|
128
|
-
return /* @__PURE__ */
|
|
130
|
+
return /* @__PURE__ */ O("div", {
|
|
129
131
|
className: "xeuugli",
|
|
130
132
|
children: [
|
|
131
|
-
!f && /* @__PURE__ */
|
|
133
|
+
!f && /* @__PURE__ */ O("div", {
|
|
132
134
|
className: "xrvj5dj xeuugli",
|
|
133
|
-
children: [i !== void 0 && /* @__PURE__ */
|
|
135
|
+
children: [i !== void 0 && /* @__PURE__ */ D("ul", {
|
|
134
136
|
"aria-hidden": !0,
|
|
135
137
|
inert: !0,
|
|
136
138
|
className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k x15r89dc xlshs6z x47corl",
|
|
137
|
-
children: i.map((e) => /* @__PURE__ */
|
|
139
|
+
children: i.map((e) => /* @__PURE__ */ O("li", {
|
|
138
140
|
className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ D(d, { tone: e.tone }), /* @__PURE__ */ O("span", {
|
|
140
142
|
className: "xeuugli",
|
|
141
|
-
children: [e.label, /* @__PURE__ */
|
|
143
|
+
children: [e.label, /* @__PURE__ */ D("span", { className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b" })]
|
|
142
144
|
})]
|
|
143
145
|
}, e.id))
|
|
144
|
-
}), /* @__PURE__ */
|
|
146
|
+
}), /* @__PURE__ */ D("ul", {
|
|
145
147
|
"aria-label": "Legend",
|
|
146
148
|
className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k x15r89dc",
|
|
147
|
-
children: r.map((e) => /* @__PURE__ */
|
|
149
|
+
children: r.map((e) => /* @__PURE__ */ O("li", {
|
|
148
150
|
className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
|
|
149
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ D(d, { tone: e.tone }), /* @__PURE__ */ O("span", {
|
|
150
152
|
className: "xeuugli",
|
|
151
|
-
children: [e.label, /* @__PURE__ */
|
|
153
|
+
children: [e.label, /* @__PURE__ */ D("span", {
|
|
152
154
|
className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b",
|
|
153
155
|
children: t === void 0 ? "" : a.find((t) => t.id === e.id)?.value ?? "—"
|
|
154
156
|
})]
|
|
@@ -156,36 +158,36 @@ function j({ id: e, label: t, summary: n, legend: r, layoutLegend: i, rows: a, x
|
|
|
156
158
|
}, e.id))
|
|
157
159
|
})]
|
|
158
160
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ D("span", {
|
|
160
162
|
id: e,
|
|
161
|
-
"aria-live":
|
|
163
|
+
"aria-live": l === "keyboard" ? "polite" : "off",
|
|
162
164
|
className: "x10l6tqk x1i1rx1s xjm9jq1 x1717udv xb3r6kr x1hyvwdk xuxw1ft",
|
|
163
165
|
children: g.join(" · ")
|
|
164
166
|
}),
|
|
165
|
-
t !== void 0 && /* @__PURE__ */
|
|
167
|
+
t !== void 0 && /* @__PURE__ */ D("div", {
|
|
166
168
|
"aria-hidden": !0,
|
|
167
169
|
className: "x1n2onr6 xqtp20y x1vjfegm",
|
|
168
|
-
children: /* @__PURE__ */
|
|
169
|
-
...
|
|
170
|
+
children: /* @__PURE__ */ O("div", {
|
|
171
|
+
...x.props(P.inspector, f && P.summaryInspector, P.position(h, p)),
|
|
170
172
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ O("div", {
|
|
172
174
|
className: "x78zum5 x1qughib x1hnptsi xk4h15q",
|
|
173
|
-
children: [/* @__PURE__ */
|
|
175
|
+
children: [/* @__PURE__ */ D("span", { children: t }), n !== void 0 && /* @__PURE__ */ D("span", { children: n })]
|
|
174
176
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ D("dl", {
|
|
176
178
|
className: "xrvj5dj xunmzkg x1ghz6dp",
|
|
177
|
-
children: a.map((e) => /* @__PURE__ */
|
|
179
|
+
children: a.map((e) => /* @__PURE__ */ O("div", {
|
|
178
180
|
className: "x78zum5 x1qughib x1pha0wt x1hnptsi",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
181
|
+
children: [/* @__PURE__ */ O("dt", {
|
|
180
182
|
className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
|
|
181
|
-
children: [/* @__PURE__ */
|
|
182
|
-
}), /* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ D(d, { tone: e.tone }), e.label]
|
|
184
|
+
}), /* @__PURE__ */ D("dd", {
|
|
183
185
|
className: "x1ghz6dp xuxw1ft",
|
|
184
186
|
children: e.value
|
|
185
187
|
})]
|
|
186
188
|
}, e.id))
|
|
187
189
|
}),
|
|
188
|
-
|
|
190
|
+
u.map((e) => /* @__PURE__ */ D("span", { children: e }, e))
|
|
189
191
|
]
|
|
190
192
|
})
|
|
191
193
|
})
|
|
@@ -211,27 +213,27 @@ function le({ composition: e, series: t, categoryIds: n, domain: r }) {
|
|
|
211
213
|
}
|
|
212
214
|
}
|
|
213
215
|
// packages/charts/src/cartesian/composition-bars.tsx
|
|
214
|
-
var
|
|
216
|
+
var ue = { mark: {
|
|
215
217
|
k3nNDw: "x1hj3fc7",
|
|
216
218
|
k1ekBW: "xwcsmn1",
|
|
217
219
|
kIyJzY: "xtitasy x12w9bfk",
|
|
218
220
|
kAMwcw: "x1faw7qm",
|
|
219
221
|
$$css: !0
|
|
220
222
|
} };
|
|
221
|
-
function
|
|
223
|
+
function de({ bucket: t, series: n, focusedSeries: r, index: i, x: o, width: s, y: c, isHighlighted: l, highlightedSeriesId: u }) {
|
|
222
224
|
let d = r !== void 0, f = r !== void 0 && !n.some((e) => e.id === r.id) ? [...n, r] : n;
|
|
223
225
|
function p(e, t) {
|
|
224
226
|
let n = c(t), r = c(t + e);
|
|
225
227
|
return `translateY(${Math.min(n, r)}px) scaleY(${Math.max(+(e === 0), Math.abs(r - n))})`;
|
|
226
228
|
}
|
|
227
|
-
return /* @__PURE__ */
|
|
229
|
+
return /* @__PURE__ */ O(E, { children: [t.kind !== "gap" && /* @__PURE__ */ D("rect", {
|
|
228
230
|
x: o,
|
|
229
231
|
y: 0,
|
|
230
232
|
width: s,
|
|
231
233
|
height: 1,
|
|
232
234
|
vectorEffect: "non-scaling-stroke",
|
|
233
235
|
fill: e.neutral,
|
|
234
|
-
...
|
|
236
|
+
...x.props(ue.mark, l && v.selected),
|
|
235
237
|
style: {
|
|
236
238
|
transform: p(t.total, 0),
|
|
237
239
|
opacity: d ? .18 : +(t.kind === "total")
|
|
@@ -239,24 +241,24 @@ function ue({ bucket: t, series: n, focusedSeries: r, index: i, x: o, width: s,
|
|
|
239
241
|
}), f.map((c, f) => {
|
|
240
242
|
let m = c.values[i];
|
|
241
243
|
if (m == null) return null;
|
|
242
|
-
let h = r?.id === c.id,
|
|
243
|
-
return /* @__PURE__ */
|
|
244
|
+
let h = r?.id === c.id, g = d ? 0 : n.slice(0, f).reduce((e, t) => e + (t.values[i] ?? 0), 0), _ = d ? h : t.kind === "parts", ee = !d && u !== void 0 && u !== c.id;
|
|
245
|
+
return /* @__PURE__ */ D("rect", {
|
|
244
246
|
x: o,
|
|
245
247
|
y: 0,
|
|
246
248
|
width: s,
|
|
247
249
|
height: 1,
|
|
248
250
|
vectorEffect: "non-scaling-stroke",
|
|
249
251
|
fill: e[a(c.tone, f)],
|
|
250
|
-
...
|
|
252
|
+
...x.props(ue.mark, l && v.selected),
|
|
251
253
|
style: {
|
|
252
|
-
transform: p(m,
|
|
253
|
-
opacity: _ ?
|
|
254
|
+
transform: p(m, g),
|
|
255
|
+
opacity: _ ? ee ? .3 : 1 : 0
|
|
254
256
|
}
|
|
255
257
|
}, c.id);
|
|
256
258
|
})] });
|
|
257
259
|
}
|
|
258
260
|
// packages/charts/src/cartesian/bar-chart.tsx
|
|
259
|
-
var
|
|
261
|
+
var I = {
|
|
260
262
|
plot: {
|
|
261
263
|
kqGvvJ: "x1we84gm",
|
|
262
264
|
$$css: !0
|
|
@@ -265,80 +267,80 @@ var N = {
|
|
|
265
267
|
kSiTet: "xuzhngd",
|
|
266
268
|
$$css: !0
|
|
267
269
|
}
|
|
268
|
-
},
|
|
269
|
-
function
|
|
270
|
-
let
|
|
270
|
+
}, fe = 200;
|
|
271
|
+
function L({ title: e, description: t, report: n, series: r, layoutSeries: i, children: o, inspectionId: c, label: l, detail: u, summary: d, rows: f = [], index: m = -1, formatValue: h = String, x: g = 0, width: _ = 0, offset: v, source: ee, data: y, isLoading: b = !1 }) {
|
|
272
|
+
let x = r.map((e, t) => ({
|
|
271
273
|
id: e.id,
|
|
272
274
|
label: e.label,
|
|
273
275
|
tone: a(e.tone, t)
|
|
274
|
-
})),
|
|
276
|
+
})), te = i?.map((e, t) => ({
|
|
275
277
|
id: e.id,
|
|
276
278
|
label: e.label,
|
|
277
279
|
tone: a(e.tone, t)
|
|
278
|
-
})),
|
|
279
|
-
return /* @__PURE__ */
|
|
280
|
-
title: /* @__PURE__ */
|
|
280
|
+
})), S = b && r.length === 0 && n?.seriesValues === void 0;
|
|
281
|
+
return /* @__PURE__ */ O(p, {
|
|
282
|
+
title: /* @__PURE__ */ D(F, {
|
|
281
283
|
title: e,
|
|
282
284
|
detail: u
|
|
283
285
|
}),
|
|
284
286
|
description: t,
|
|
285
287
|
report: n,
|
|
286
|
-
series:
|
|
288
|
+
series: x,
|
|
287
289
|
children: [
|
|
288
|
-
y !== void 0 && /* @__PURE__ */
|
|
289
|
-
|
|
290
|
+
y !== void 0 && /* @__PURE__ */ D(s, { ...y }),
|
|
291
|
+
S ? /* @__PURE__ */ D(se, {}) : /* @__PURE__ */ D(ce, {
|
|
290
292
|
id: c,
|
|
291
293
|
label: l,
|
|
292
|
-
summary:
|
|
293
|
-
legend:
|
|
294
|
+
summary: d,
|
|
295
|
+
legend: x,
|
|
294
296
|
hasSeriesSummary: n?.seriesValues !== void 0,
|
|
295
|
-
layoutLegend:
|
|
296
|
-
rows:
|
|
297
|
+
layoutLegend: te,
|
|
298
|
+
rows: f.map((e, t) => ({
|
|
297
299
|
id: e.id,
|
|
298
300
|
label: e.label,
|
|
299
301
|
tone: a(e.tone, t),
|
|
300
302
|
value: e.values[m] === null || e.values[m] === void 0 ? "Unavailable" : h(e.values[m])
|
|
301
303
|
})),
|
|
302
304
|
x: g,
|
|
303
|
-
width:
|
|
304
|
-
offset:
|
|
305
|
-
source:
|
|
305
|
+
width: _,
|
|
306
|
+
offset: v,
|
|
307
|
+
source: ee
|
|
306
308
|
}),
|
|
307
309
|
o
|
|
308
310
|
]
|
|
309
311
|
});
|
|
310
312
|
}
|
|
311
|
-
function
|
|
312
|
-
let o =
|
|
313
|
-
return o === void 0 ? /* @__PURE__ */
|
|
313
|
+
function R({ title: e = "Loading chart", description: n, report: r, series: i = [], height: a = fe }) {
|
|
314
|
+
let o = z(a), s = C();
|
|
315
|
+
return o === void 0 ? /* @__PURE__ */ D("div", {
|
|
314
316
|
"aria-hidden": !0,
|
|
315
317
|
inert: !0,
|
|
316
|
-
children: /* @__PURE__ */
|
|
318
|
+
children: /* @__PURE__ */ D(L, {
|
|
317
319
|
title: e,
|
|
318
320
|
description: n,
|
|
319
321
|
report: r,
|
|
320
322
|
series: i,
|
|
321
323
|
inspectionId: s,
|
|
322
324
|
isLoading: !0,
|
|
323
|
-
children: /* @__PURE__ */
|
|
324
|
-
...
|
|
325
|
-
children: /* @__PURE__ */
|
|
325
|
+
children: /* @__PURE__ */ D("div", {
|
|
326
|
+
...x.props(v.plot, I.plot),
|
|
327
|
+
children: /* @__PURE__ */ D(t, { height: a })
|
|
326
328
|
})
|
|
327
329
|
})
|
|
328
|
-
}) : /* @__PURE__ */
|
|
330
|
+
}) : /* @__PURE__ */ D(g, {
|
|
329
331
|
title: e,
|
|
330
332
|
description: n,
|
|
331
333
|
report: r,
|
|
332
334
|
message: o
|
|
333
335
|
});
|
|
334
336
|
}
|
|
335
|
-
function
|
|
337
|
+
function z(e) {
|
|
336
338
|
if (!Number.isFinite(e) || e < 48) return "Chart height must be at least 48 pixels.";
|
|
337
339
|
}
|
|
338
|
-
function
|
|
340
|
+
function pe({ categories: e, series: t, domain: n, mode: r }) {
|
|
339
341
|
if (e.length > i.items || t.length > i.series) return `Choose a window with at most ${i.items} categories and ${i.series} series.`;
|
|
340
|
-
if (!
|
|
341
|
-
if (!
|
|
342
|
+
if (!h(n) || n[0] > 0 || n[1] < 0) return "The bar domain must be finite, increasing, and include zero.";
|
|
343
|
+
if (!m(e) || !m(t)) return "Bar categories and series require unique identifiers.";
|
|
342
344
|
for (let i of t) {
|
|
343
345
|
if (i.values.length !== e.length) return "Every series requires one explicit value per category.";
|
|
344
346
|
for (let e of i.values) {
|
|
@@ -348,106 +350,85 @@ function L({ categories: e, series: t, domain: n, mode: r }) {
|
|
|
348
350
|
}
|
|
349
351
|
if (r === "stacked" && e.some((e, r) => t.reduce((e, t) => e + (t.values[r] ?? 0), 0) > n[1])) return "Stacked bar totals must fit the supplied domain.";
|
|
350
352
|
}
|
|
351
|
-
var
|
|
353
|
+
var me = {
|
|
352
354
|
"x-default-marker": "x-default-marker",
|
|
353
355
|
$$css: !0
|
|
354
356
|
};
|
|
355
|
-
function
|
|
356
|
-
let _ = h?.focusedSeries,
|
|
357
|
+
function B({ title: t, description: n, report: r, categories: i, series: o, domain: s, mode: c = "grouped", formatValue: u, formatTick: d = u, highlightedSeriesId: f, selection: p, height: m = fe, composition: h }) {
|
|
358
|
+
let _ = h?.focusedSeries, y = C(), b = _ === void 0 ? void 0 : pe({
|
|
357
359
|
categories: i,
|
|
358
360
|
series: [_],
|
|
359
361
|
domain: s,
|
|
360
362
|
mode: "grouped"
|
|
361
|
-
}),
|
|
363
|
+
}), te = pe({
|
|
362
364
|
categories: i,
|
|
363
365
|
series: o,
|
|
364
366
|
domain: s,
|
|
365
367
|
mode: c
|
|
366
|
-
}) ??
|
|
368
|
+
}) ?? b, ne = le({
|
|
367
369
|
composition: h,
|
|
368
370
|
series: o,
|
|
369
371
|
categoryIds: i.map((e) => e.id),
|
|
370
372
|
domain: s
|
|
371
|
-
}) ??
|
|
372
|
-
id:
|
|
373
|
+
}) ?? z(m), w = te ?? ne, E = h === void 0 ? void 0 : {
|
|
374
|
+
id: y,
|
|
373
375
|
label: h.contextLabel,
|
|
374
376
|
tone: "neutral",
|
|
375
377
|
values: h.buckets.map((e) => e.kind === "gap" ? null : e.total)
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
+
}, k = E === void 0 ? o : [
|
|
379
|
+
E,
|
|
378
380
|
...o,
|
|
379
381
|
..._ === void 0 || o.some((e) => e.id === _.id) ? [] : [_]
|
|
380
|
-
],
|
|
381
|
-
|
|
382
|
+
], re = _ !== void 0 && E !== void 0 ? [_, E] : o, { ref: ie, width: N, element: P } = ee(), oe = C(), [se, F] = T(), [ce, ue] = T();
|
|
383
|
+
S(() => {
|
|
382
384
|
function e(e) {
|
|
383
|
-
e.target instanceof Node &&
|
|
385
|
+
e.target instanceof Node && P?.contains(e.target) !== !0 && F(void 0);
|
|
384
386
|
}
|
|
385
387
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
386
|
-
}, [
|
|
387
|
-
let
|
|
388
|
-
if (
|
|
388
|
+
}, [P]);
|
|
389
|
+
let R = i.findIndex((e) => e.id === se?.id), B = i[R], ge = i[i.findIndex((e) => e.id === p?.selectedId)], V = i.find((e) => e.id === ce) ?? ge ?? i[0], H = B, U = R, W = h?.buckets[U], G = _ !== void 0 && E !== void 0 ? [_, E] : E === void 0 || W?.kind === "parts" ? o : [], K = W === void 0 ? void 0 : W.kind === "gap" ? "No reported value" : u(W.total);
|
|
390
|
+
if (w !== void 0) return /* @__PURE__ */ D(g, {
|
|
389
391
|
title: t,
|
|
390
392
|
description: n,
|
|
391
393
|
report: r,
|
|
392
|
-
message:
|
|
394
|
+
message: w
|
|
393
395
|
});
|
|
394
|
-
let
|
|
396
|
+
let _e = m - 28, q = j({
|
|
395
397
|
domain: [...s],
|
|
396
|
-
range: [
|
|
397
|
-
}),
|
|
398
|
+
range: [_e, 12]
|
|
399
|
+
}), J = Math.max(44, ...q.ticks(3).map((e) => d(e).length * 7 + 12)), Y = Math.max(J + 1, N - 16), X = A({
|
|
398
400
|
domain: i.map((e) => e.id),
|
|
399
|
-
range: [
|
|
401
|
+
range: [J, Y],
|
|
400
402
|
padding: .3
|
|
401
|
-
}),
|
|
403
|
+
}), Z = A({
|
|
402
404
|
domain: o.map((e) => e.id),
|
|
403
|
-
range: [0,
|
|
405
|
+
range: [0, X.bandwidth()],
|
|
404
406
|
padding: .08
|
|
405
|
-
}), ve = Math.min(120, Math.max(40, ...i.map((e) => (e.axisLabel ?? e.label).length * 7))),
|
|
406
|
-
function
|
|
407
|
-
let t = e.currentTarget.getBoundingClientRect(), n = (e.clientX - t.left) / t.width *
|
|
408
|
-
a !== void 0 && (e.type === "pointerdown" &&
|
|
407
|
+
}), ve = Math.min(120, Math.max(40, ...i.map((e) => (e.axisLabel ?? e.label).length * 7))), Q = Math.max(1, Math.ceil((ve + 16) / X.step())), $ = Math.max(1, Math.floor((X.step() * Q - 16) / 7));
|
|
408
|
+
function ye(e) {
|
|
409
|
+
let t = e.currentTarget.getBoundingClientRect(), n = (e.clientX - t.left) / t.width * N, r = Math.floor((n - J) / X.step()), a = i[Math.max(0, Math.min(i.length - 1, r))];
|
|
410
|
+
a !== void 0 && (e.type === "pointerdown" && ue(a.id), F({
|
|
409
411
|
id: a.id,
|
|
410
412
|
source: "pointer"
|
|
411
413
|
}));
|
|
412
414
|
}
|
|
413
|
-
|
|
414
|
-
if (e.altKey || e.ctrlKey || e.metaKey) return;
|
|
415
|
-
if (e.key === "Escape") {
|
|
416
|
-
e.preventDefault(), e.stopPropagation(), F(void 0);
|
|
417
|
-
return;
|
|
418
|
-
}
|
|
419
|
-
if (de.has(e.key)) {
|
|
420
|
-
H !== void 0 && f !== void 0 && (e.preventDefault(), f.onSelect(H.id));
|
|
421
|
-
return;
|
|
422
|
-
}
|
|
423
|
-
let t = {
|
|
424
|
-
ArrowRight: Math.min(i.length - 1, U + 1),
|
|
425
|
-
ArrowLeft: Math.max(0, U - 1),
|
|
426
|
-
Home: 0,
|
|
427
|
-
End: i.length - 1
|
|
428
|
-
}[e.key], n = t === void 0 ? void 0 : i[t];
|
|
429
|
-
n !== void 0 && (e.preventDefault(), R(n.id), F({
|
|
430
|
-
id: n.id,
|
|
431
|
-
source: "keyboard"
|
|
432
|
-
}));
|
|
433
|
-
}
|
|
434
|
-
return /* @__PURE__ */ w(fe, {
|
|
415
|
+
return /* @__PURE__ */ D(L, {
|
|
435
416
|
title: t,
|
|
436
417
|
description: n,
|
|
437
418
|
report: r,
|
|
438
|
-
series:
|
|
419
|
+
series: re,
|
|
439
420
|
layoutSeries: o,
|
|
440
|
-
inspectionId:
|
|
441
|
-
label:
|
|
442
|
-
detail:
|
|
443
|
-
summary:
|
|
444
|
-
rows:
|
|
445
|
-
index:
|
|
446
|
-
formatValue:
|
|
447
|
-
x: (
|
|
448
|
-
width:
|
|
449
|
-
offset:
|
|
450
|
-
source:
|
|
421
|
+
inspectionId: oe,
|
|
422
|
+
label: H?.label,
|
|
423
|
+
detail: H === void 0 ? void 0 : [H.axisLabel ?? H.label, K].filter(Boolean).join(" · "),
|
|
424
|
+
summary: K,
|
|
425
|
+
rows: G,
|
|
426
|
+
index: U,
|
|
427
|
+
formatValue: u,
|
|
428
|
+
x: (X(H?.id ?? "") ?? J) + X.bandwidth() / 2,
|
|
429
|
+
width: N,
|
|
430
|
+
offset: X.bandwidth() / 2 + 8,
|
|
431
|
+
source: se?.source,
|
|
451
432
|
data: {
|
|
452
433
|
label: `${t} observations`,
|
|
453
434
|
columns: [{
|
|
@@ -459,109 +440,121 @@ function me({ title: t, description: n, report: r, categories: i, series: o, dom
|
|
|
459
440
|
}],
|
|
460
441
|
rows: i.map((e, t) => ({
|
|
461
442
|
id: e.id,
|
|
462
|
-
values: [e.label, he(
|
|
443
|
+
values: [e.label, he(k, t, u)]
|
|
463
444
|
}))
|
|
464
445
|
},
|
|
465
|
-
children: /* @__PURE__ */
|
|
466
|
-
ref:
|
|
467
|
-
...
|
|
468
|
-
children: i.length === 0 || o.length === 0 && h === void 0 ? /* @__PURE__ */
|
|
446
|
+
children: /* @__PURE__ */ D("div", {
|
|
447
|
+
ref: ie,
|
|
448
|
+
...x.props(v.plot, I.plot),
|
|
449
|
+
children: i.length === 0 || o.length === 0 && h === void 0 ? /* @__PURE__ */ D("p", {
|
|
469
450
|
className: "x153jb6y x1ghz6dp xy8obcc",
|
|
470
451
|
children: "No categories"
|
|
471
|
-
}) : /* @__PURE__ */
|
|
452
|
+
}) : /* @__PURE__ */ O(l, {
|
|
472
453
|
role: "img",
|
|
473
|
-
"aria-label": `${t}. Use arrow keys to inspect categories.${
|
|
474
|
-
"aria-describedby":
|
|
454
|
+
"aria-label": `${t}. Use arrow keys to inspect categories.${p === void 0 ? "" : " Press Enter to select."}`,
|
|
455
|
+
"aria-describedby": oe,
|
|
475
456
|
tabIndex: 0,
|
|
476
|
-
viewBox: `0 0 ${
|
|
477
|
-
height:
|
|
478
|
-
|
|
457
|
+
viewBox: `0 0 ${N} ${m}`,
|
|
458
|
+
height: m,
|
|
459
|
+
controls: {
|
|
460
|
+
items: i,
|
|
461
|
+
cursor: V?.id,
|
|
462
|
+
inspected: B?.id,
|
|
463
|
+
onInspect: (e) => {
|
|
464
|
+
ue(e), F({
|
|
465
|
+
id: e,
|
|
466
|
+
source: "keyboard"
|
|
467
|
+
});
|
|
468
|
+
},
|
|
469
|
+
onDismiss: () => F(void 0),
|
|
470
|
+
onSelect: p?.onSelect
|
|
471
|
+
},
|
|
479
472
|
onFocus: (e) => {
|
|
480
473
|
if (e.currentTarget.matches(":focus-visible")) {
|
|
481
|
-
let e =
|
|
482
|
-
|
|
474
|
+
let e = ge ?? i[0];
|
|
475
|
+
ue(e?.id), F(e === void 0 ? void 0 : {
|
|
483
476
|
id: e.id,
|
|
484
477
|
source: "keyboard"
|
|
485
478
|
});
|
|
486
479
|
}
|
|
487
480
|
},
|
|
488
481
|
onPointerMove: (e) => {
|
|
489
|
-
e.pointerType === "mouse" &&
|
|
482
|
+
e.pointerType === "mouse" && ye(e);
|
|
490
483
|
},
|
|
491
|
-
onPointerDown:
|
|
484
|
+
onPointerDown: ye,
|
|
492
485
|
onPointerLeave: (e) => {
|
|
493
|
-
e.pointerType === "mouse" &&
|
|
486
|
+
e.pointerType === "mouse" && se?.source === "pointer" && F(void 0);
|
|
494
487
|
},
|
|
495
488
|
onBlur: () => F(void 0),
|
|
496
489
|
onClick: () => {
|
|
497
|
-
B !== void 0 &&
|
|
490
|
+
B !== void 0 && p?.onSelect(B.id);
|
|
498
491
|
},
|
|
499
|
-
...
|
|
492
|
+
...x.props(v.svg, v.inspectable, me),
|
|
500
493
|
children: [
|
|
501
|
-
B !== void 0 && /* @__PURE__ */
|
|
502
|
-
x: (
|
|
494
|
+
B !== void 0 && /* @__PURE__ */ D("rect", {
|
|
495
|
+
x: (X(B.id) ?? J) - (X.step() - X.bandwidth()) / 2,
|
|
503
496
|
y: 12,
|
|
504
|
-
width:
|
|
505
|
-
height:
|
|
497
|
+
width: X.step(),
|
|
498
|
+
height: _e - 12,
|
|
506
499
|
className: "x2wnxhi"
|
|
507
500
|
}),
|
|
508
|
-
|
|
509
|
-
x1:
|
|
510
|
-
x2:
|
|
511
|
-
y1:
|
|
512
|
-
y2:
|
|
513
|
-
...
|
|
514
|
-
}), /* @__PURE__ */
|
|
515
|
-
x:
|
|
516
|
-
y:
|
|
501
|
+
q.ticks(3).map((e) => /* @__PURE__ */ O("g", { children: [/* @__PURE__ */ D("line", {
|
|
502
|
+
x1: J,
|
|
503
|
+
x2: Y,
|
|
504
|
+
y1: q(e),
|
|
505
|
+
y2: q(e),
|
|
506
|
+
...x.props(v.grid)
|
|
507
|
+
}), /* @__PURE__ */ D("text", {
|
|
508
|
+
x: J - 8,
|
|
509
|
+
y: q(e),
|
|
517
510
|
textAnchor: "end",
|
|
518
511
|
dominantBaseline: "middle",
|
|
519
|
-
...
|
|
520
|
-
children:
|
|
512
|
+
...x.props(v.label),
|
|
513
|
+
children: d(e)
|
|
521
514
|
})] }, e)),
|
|
522
|
-
h?.annotation !== void 0 && i.some((e) => e.id === h.annotation?.categoryId) && /* @__PURE__ */
|
|
523
|
-
x:
|
|
524
|
-
y: Math.max(12,
|
|
525
|
-
...
|
|
515
|
+
h?.annotation !== void 0 && i.some((e) => e.id === h.annotation?.categoryId) && /* @__PURE__ */ D("text", {
|
|
516
|
+
x: X(h.annotation.categoryId),
|
|
517
|
+
y: Math.max(12, q(h.annotation.value) - 8),
|
|
518
|
+
...x.props(v.label),
|
|
526
519
|
children: h.annotation.label
|
|
527
520
|
}),
|
|
528
521
|
i.map((t, n) => {
|
|
529
522
|
let r = t.axisLabel ?? t.label, i = h?.buckets[n];
|
|
530
|
-
return /* @__PURE__ */
|
|
523
|
+
return /* @__PURE__ */ O("g", { children: [i === void 0 ? o.map((r, i) => {
|
|
531
524
|
let s = r.values[n];
|
|
532
525
|
if (s == null) return null;
|
|
533
|
-
let l = c === "stacked" ? o.slice(0, i).reduce((e, t) => e + (t.values[n] ?? 0), 0) : 0, u =
|
|
534
|
-
return /* @__PURE__ */
|
|
535
|
-
x: (
|
|
536
|
-
y: Math.min(u,
|
|
537
|
-
width: c === "stacked" ?
|
|
538
|
-
height: Math.max(+(s === 0), Math.abs(
|
|
526
|
+
let l = c === "stacked" ? o.slice(0, i).reduce((e, t) => e + (t.values[n] ?? 0), 0) : 0, u = q(l), d = q(l + s), m = p?.selectedId === t.id || B?.id === t.id;
|
|
527
|
+
return /* @__PURE__ */ D(M, {
|
|
528
|
+
x: (X(t.id) ?? J) + (c === "stacked" ? 0 : Z(r.id) ?? 0),
|
|
529
|
+
y: Math.min(u, d),
|
|
530
|
+
width: c === "stacked" ? X.bandwidth() : Z.bandwidth(),
|
|
531
|
+
height: Math.max(+(s === 0), Math.abs(d - u)),
|
|
539
532
|
fill: e[a(r.tone, i)],
|
|
540
|
-
...
|
|
533
|
+
...x.props(m && v.selected, f !== void 0 && f !== r.id && I.mutedMark)
|
|
541
534
|
}, r.id);
|
|
542
|
-
}) : /* @__PURE__ */
|
|
535
|
+
}) : /* @__PURE__ */ D(de, {
|
|
543
536
|
bucket: i,
|
|
544
537
|
series: o,
|
|
545
538
|
focusedSeries: _,
|
|
546
539
|
index: n,
|
|
547
|
-
x:
|
|
548
|
-
width:
|
|
549
|
-
y:
|
|
550
|
-
isHighlighted:
|
|
551
|
-
highlightedSeriesId:
|
|
552
|
-
}), n %
|
|
553
|
-
x: (
|
|
554
|
-
y:
|
|
540
|
+
x: X(t.id) ?? J,
|
|
541
|
+
width: X.bandwidth(),
|
|
542
|
+
y: q,
|
|
543
|
+
isHighlighted: p?.selectedId === t.id || B?.id === t.id,
|
|
544
|
+
highlightedSeriesId: f
|
|
545
|
+
}), n % Q === 0 && /* @__PURE__ */ D("text", {
|
|
546
|
+
x: (X(t.id) ?? J) + X.bandwidth() / 2,
|
|
547
|
+
y: m - 4,
|
|
555
548
|
textAnchor: "middle",
|
|
556
|
-
...
|
|
557
|
-
children: r.length >
|
|
549
|
+
...x.props(v.label),
|
|
550
|
+
children: r.length > $ ? `${r.slice(0, $ - 1)}…` : r
|
|
558
551
|
})] }, t.id);
|
|
559
552
|
}),
|
|
560
|
-
|
|
561
|
-
x: (
|
|
553
|
+
V !== void 0 && /* @__PURE__ */ D(ae, {
|
|
554
|
+
x: (X(V.id) ?? J) + X.bandwidth() / 2,
|
|
562
555
|
top: 12,
|
|
563
|
-
bottom:
|
|
564
|
-
width: Math.max(8,
|
|
556
|
+
bottom: _e,
|
|
557
|
+
width: Math.max(8, X.bandwidth())
|
|
565
558
|
})
|
|
566
559
|
]
|
|
567
560
|
})
|
|
@@ -575,12 +568,12 @@ function he(e, t, n) {
|
|
|
575
568
|
}).join(" · ");
|
|
576
569
|
}
|
|
577
570
|
// packages/charts/src/cartesian/breakdown-bar.tsx
|
|
578
|
-
var
|
|
571
|
+
var ge = {
|
|
579
572
|
kzqmXN: "x5lhr3w",
|
|
580
573
|
kZKoxP: "x5yr21d",
|
|
581
574
|
$$css: !0
|
|
582
|
-
},
|
|
583
|
-
|
|
575
|
+
}, V = { segment: (e, t) => [
|
|
576
|
+
ge,
|
|
584
577
|
{
|
|
585
578
|
kWkggS: t == null ? t : "xl8spv7",
|
|
586
579
|
$$css: !0
|
|
@@ -590,27 +583,27 @@ var R = {
|
|
|
590
583
|
"--x-backgroundColor": t ?? void 0
|
|
591
584
|
}
|
|
592
585
|
] };
|
|
593
|
-
function
|
|
594
|
-
let
|
|
595
|
-
return
|
|
586
|
+
function H({ title: t, report: n, description: i, items: s, total: c, formatValue: l, selection: u }) {
|
|
587
|
+
let d = r(s), f = s.reduce((e, t) => e + (t.value ?? 0), 0), m = 2 ** -52 * Math.max(f, c, 1) * s.length;
|
|
588
|
+
return d === void 0 ? !Number.isFinite(c) || c < 0 || f - c > m ? /* @__PURE__ */ D(g, {
|
|
596
589
|
title: t,
|
|
597
590
|
report: n,
|
|
598
591
|
description: i,
|
|
599
592
|
message: "The total must be finite and at least the sum of recorded values."
|
|
600
|
-
}) : /* @__PURE__ */
|
|
593
|
+
}) : /* @__PURE__ */ D(p, {
|
|
601
594
|
title: t,
|
|
602
595
|
report: n,
|
|
603
596
|
description: i,
|
|
604
|
-
children: s.length === 0 ? /* @__PURE__ */
|
|
597
|
+
children: s.length === 0 ? /* @__PURE__ */ D("p", {
|
|
605
598
|
className: "x153jb6y x1ghz6dp xy8obcc",
|
|
606
599
|
children: "No values"
|
|
607
|
-
}) : /* @__PURE__ */
|
|
608
|
-
/* @__PURE__ */
|
|
600
|
+
}) : /* @__PURE__ */ O(E, { children: [
|
|
601
|
+
/* @__PURE__ */ D("div", {
|
|
609
602
|
"aria-hidden": !0,
|
|
610
603
|
className: "x78zum5 x170jfvy xb3r6kr x1r7kqkb xmkeg23 x1y0btm7 x1ey3b81 x1jfksii",
|
|
611
|
-
children: s.map((t, n) => t.value === null ? null : /* @__PURE__ */
|
|
604
|
+
children: s.map((t, n) => t.value === null ? null : /* @__PURE__ */ D("span", { ...x.props(V.segment(c === 0 ? 0 : t.value / c * 100, e[a(t.tone, n)])) }, t.id))
|
|
612
605
|
}),
|
|
613
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ D(o, {
|
|
614
607
|
items: s.map((e, t) => ({
|
|
615
608
|
id: e.id,
|
|
616
609
|
label: e.label,
|
|
@@ -619,30 +612,30 @@ function B({ title: t, report: n, description: i, items: s, total: c, formatValu
|
|
|
619
612
|
})),
|
|
620
613
|
selection: u
|
|
621
614
|
}),
|
|
622
|
-
c -
|
|
615
|
+
c - f > m && /* @__PURE__ */ O("p", {
|
|
623
616
|
className: "x153jb6y x1ghz6dp xy8obcc",
|
|
624
617
|
children: [
|
|
625
618
|
"Unassigned portion: ",
|
|
626
|
-
l(c -
|
|
619
|
+
l(c - f),
|
|
627
620
|
" of ",
|
|
628
621
|
l(c)
|
|
629
622
|
]
|
|
630
623
|
})
|
|
631
624
|
] })
|
|
632
|
-
}) : /* @__PURE__ */
|
|
625
|
+
}) : /* @__PURE__ */ D(g, {
|
|
633
626
|
title: t,
|
|
634
627
|
report: n,
|
|
635
628
|
description: i,
|
|
636
|
-
message:
|
|
629
|
+
message: d
|
|
637
630
|
});
|
|
638
631
|
}
|
|
639
632
|
// packages/charts/src/cartesian/scatter-plot.tsx
|
|
640
|
-
var
|
|
633
|
+
var U = 260, W = 56, G = 20, K = 12, _e = 1e3, q = {
|
|
641
634
|
kzqmXN: "x1xc55vz",
|
|
642
635
|
kZKoxP: "xdk7pt",
|
|
643
636
|
kaIpWk: "x16rqkct",
|
|
644
637
|
$$css: !0
|
|
645
|
-
},
|
|
638
|
+
}, J = {
|
|
646
639
|
brush: {
|
|
647
640
|
kFalU9: "xx69xxh",
|
|
648
641
|
kkrTdU: "xsid9ct",
|
|
@@ -680,7 +673,7 @@ var V = 260, H = 56, U = 20, W = 12, G = 1e3, K = {
|
|
|
680
673
|
"--x-top": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
|
|
681
674
|
}],
|
|
682
675
|
dot: (e) => [
|
|
683
|
-
|
|
676
|
+
q,
|
|
684
677
|
{
|
|
685
678
|
kWkggS: e == null ? e : "xl8spv7",
|
|
686
679
|
$$css: !0
|
|
@@ -695,77 +688,77 @@ var V = 260, H = 56, U = 20, W = 12, G = 1e3, K = {
|
|
|
695
688
|
$$css: !0
|
|
696
689
|
}
|
|
697
690
|
};
|
|
698
|
-
function
|
|
699
|
-
let { title: n, report: r, description: i, points: a, xDomain: o, yDomain: l, xLabel:
|
|
691
|
+
function Y(t) {
|
|
692
|
+
let { title: n, report: r, description: i, points: a, xDomain: o, yDomain: l, xLabel: d, yLabel: m, formatX: h, formatY: _, selection: v, rangeSelection: y, emptyLabel: b } = t, S = u({
|
|
700
693
|
title: n,
|
|
701
|
-
selection:
|
|
694
|
+
selection: v,
|
|
702
695
|
items: a.map((e) => ({
|
|
703
696
|
id: e.id,
|
|
704
|
-
label: `${e.label}, ${
|
|
697
|
+
label: `${e.label}, ${d}: ${h(e.x)}, ${m}: ${_(e.y)}`
|
|
705
698
|
}))
|
|
706
|
-
}), { ref:
|
|
707
|
-
if (
|
|
699
|
+
}), { ref: C, width: ne } = ee(), w = ve(t);
|
|
700
|
+
if (w !== null) return /* @__PURE__ */ D(g, {
|
|
708
701
|
title: n,
|
|
709
702
|
report: r,
|
|
710
703
|
description: i,
|
|
711
|
-
message:
|
|
704
|
+
message: w
|
|
712
705
|
});
|
|
713
|
-
let
|
|
706
|
+
let T = j({
|
|
714
707
|
domain: [...o],
|
|
715
|
-
range: [
|
|
716
|
-
}),
|
|
708
|
+
range: [W, Math.max(W, ne - G)]
|
|
709
|
+
}), E = j({
|
|
717
710
|
domain: [...l],
|
|
718
|
-
range: [216,
|
|
711
|
+
range: [216, K]
|
|
719
712
|
});
|
|
720
|
-
return /* @__PURE__ */
|
|
713
|
+
return /* @__PURE__ */ O(p, {
|
|
721
714
|
title: n,
|
|
722
715
|
report: r,
|
|
723
716
|
description: i,
|
|
724
|
-
footer: /* @__PURE__ */
|
|
725
|
-
id:
|
|
726
|
-
children:
|
|
717
|
+
footer: /* @__PURE__ */ D(f, {
|
|
718
|
+
id: S.id,
|
|
719
|
+
children: S.label ?? "\xA0"
|
|
727
720
|
}),
|
|
728
721
|
children: [
|
|
729
|
-
a.length === 0 ? /* @__PURE__ */
|
|
722
|
+
a.length === 0 ? /* @__PURE__ */ D("p", {
|
|
730
723
|
className: "x1ghz6dp x153jb6y",
|
|
731
|
-
children:
|
|
732
|
-
}) : /* @__PURE__ */
|
|
733
|
-
ref:
|
|
734
|
-
...
|
|
724
|
+
children: b
|
|
725
|
+
}) : /* @__PURE__ */ O(c, {
|
|
726
|
+
ref: C,
|
|
727
|
+
...S.props,
|
|
735
728
|
className: "x1n2onr6 xeuugli",
|
|
736
|
-
children: [/* @__PURE__ */
|
|
737
|
-
width:
|
|
738
|
-
scaleX:
|
|
739
|
-
scaleY:
|
|
729
|
+
children: [/* @__PURE__ */ D(X, {
|
|
730
|
+
width: ne,
|
|
731
|
+
scaleX: T,
|
|
732
|
+
scaleY: E,
|
|
740
733
|
...t
|
|
741
|
-
}, `${o[0]}:${o[1]}:${l[0]}:${l[1]}:${
|
|
734
|
+
}, `${o[0]}:${o[1]}:${l[0]}:${l[1]}:${ne}`), a.length > 0 && /* @__PURE__ */ D("div", {
|
|
742
735
|
className: "x10l6tqk x10a8y8t x1n71m9f x47corl",
|
|
743
736
|
children: a.map((t) => {
|
|
744
|
-
let n =
|
|
745
|
-
return /* @__PURE__ */
|
|
737
|
+
let n = S.label !== void 0 && S.activeId === t.id;
|
|
738
|
+
return /* @__PURE__ */ D(te, {
|
|
746
739
|
type: "button",
|
|
747
740
|
tabIndex: -1,
|
|
748
|
-
onPointerEnter: () =>
|
|
741
|
+
onPointerEnter: () => S.inspect(t.id),
|
|
749
742
|
title: t.label,
|
|
750
|
-
"aria-label": `${t.label}, ${
|
|
751
|
-
"aria-pressed":
|
|
743
|
+
"aria-label": `${t.label}, ${d}: ${h(t.x)}, ${m}: ${_(t.y)}`,
|
|
744
|
+
"aria-pressed": v === void 0 ? void 0 : v.selectedId === t.id,
|
|
752
745
|
onClick: () => {
|
|
753
|
-
|
|
746
|
+
S.inspect(t.id), v?.onSelect(t.id);
|
|
754
747
|
},
|
|
755
|
-
...
|
|
756
|
-
children: /* @__PURE__ */
|
|
748
|
+
...x.props(J.target, J.location(T(t.x), E(t.y))),
|
|
749
|
+
children: /* @__PURE__ */ D("span", {
|
|
757
750
|
"aria-hidden": !0,
|
|
758
|
-
...
|
|
751
|
+
...x.props(J.dot(e[t.tone]), (v?.selectedId === t.id || n) && J.selected)
|
|
759
752
|
})
|
|
760
753
|
}, t.id);
|
|
761
754
|
})
|
|
762
755
|
})]
|
|
763
756
|
}),
|
|
764
|
-
|
|
757
|
+
y !== void 0 && /* @__PURE__ */ D(Z, {
|
|
765
758
|
...t,
|
|
766
|
-
rangeSelection:
|
|
759
|
+
rangeSelection: y
|
|
767
760
|
}),
|
|
768
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ D(s, {
|
|
769
762
|
label: `${n} points`,
|
|
770
763
|
columns: [
|
|
771
764
|
{
|
|
@@ -774,11 +767,11 @@ function ge(t) {
|
|
|
774
767
|
},
|
|
775
768
|
{
|
|
776
769
|
id: "x",
|
|
777
|
-
label:
|
|
770
|
+
label: d
|
|
778
771
|
},
|
|
779
772
|
{
|
|
780
773
|
id: "y",
|
|
781
|
-
label:
|
|
774
|
+
label: m
|
|
782
775
|
}
|
|
783
776
|
],
|
|
784
777
|
rows: a.map((e) => ({
|
|
@@ -786,202 +779,197 @@ function ge(t) {
|
|
|
786
779
|
values: [
|
|
787
780
|
e.label,
|
|
788
781
|
h(e.x),
|
|
789
|
-
|
|
782
|
+
_(e.y)
|
|
790
783
|
]
|
|
791
784
|
}))
|
|
792
785
|
})
|
|
793
786
|
]
|
|
794
787
|
});
|
|
795
788
|
}
|
|
796
|
-
function
|
|
797
|
-
let c =
|
|
789
|
+
function X({ width: e, scaleX: t, scaleY: n, xLabel: r, yLabel: i, formatX: a, formatY: o, rangeSelection: s }) {
|
|
790
|
+
let c = C(), [l, u] = T(null), d = w(null);
|
|
791
|
+
S(() => () => d.current?.(), []);
|
|
792
|
+
let f = l === null ? s?.value : {
|
|
798
793
|
x: [Math.min(l.start.x, l.end.x), Math.max(l.start.x, l.end.x)],
|
|
799
794
|
y: [Math.min(l.start.y, l.end.y), Math.max(l.start.y, l.end.y)]
|
|
800
795
|
};
|
|
801
|
-
function
|
|
802
|
-
let i = r.currentTarget.getBoundingClientRect();
|
|
796
|
+
function p(r, i, a) {
|
|
803
797
|
return {
|
|
804
|
-
x: t.copy().clamp(!0).invert((
|
|
805
|
-
y: n.copy().clamp(!0).invert((
|
|
798
|
+
x: t.copy().clamp(!0).invert((i - r.left) / r.width * e),
|
|
799
|
+
y: n.copy().clamp(!0).invert((a - r.top) / r.height * U)
|
|
806
800
|
};
|
|
807
801
|
}
|
|
808
|
-
function
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
t.currentTarget
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
802
|
+
function m(t) {
|
|
803
|
+
let n = t.button === 0 && t.pointerType !== "touch";
|
|
804
|
+
if (s === void 0 || d.current !== null || !n) return;
|
|
805
|
+
let r = t.currentTarget.getBoundingClientRect(), i = (t.clientX - r.left) / r.width * e, a = (t.clientY - r.top) / r.height * U;
|
|
806
|
+
if (i < W || i > e - G || a < K || a > 216) return;
|
|
807
|
+
let o = t.currentTarget, c = o.parentElement;
|
|
808
|
+
if (c === null) return;
|
|
809
|
+
let l = p(r, t.clientX, t.clientY);
|
|
810
|
+
u({
|
|
811
|
+
start: l,
|
|
812
|
+
end: l
|
|
813
|
+
}), d.current = k(c, t.nativeEvent, {
|
|
814
|
+
cancelOnEscape: !0,
|
|
815
|
+
onMove: ({ x: e, y: t }) => u({
|
|
816
|
+
start: l,
|
|
817
|
+
end: p(o.getBoundingClientRect(), e, t)
|
|
818
|
+
}),
|
|
819
|
+
onEnd: (e, t) => {
|
|
820
|
+
if (d.current = null, u(null), t) return;
|
|
821
|
+
let n = p(o.getBoundingClientRect(), e.clientX, e.clientY);
|
|
822
|
+
s.onChange({
|
|
823
|
+
x: [Math.min(l.x, n.x), Math.max(l.x, n.x)],
|
|
824
|
+
y: [Math.min(l.y, n.y), Math.max(l.y, n.y)]
|
|
825
|
+
});
|
|
826
|
+
}
|
|
823
827
|
});
|
|
824
828
|
}
|
|
825
|
-
|
|
826
|
-
if (l === null || l.pointerId !== e.pointerId) return;
|
|
827
|
-
let t = f(e), n = {
|
|
828
|
-
x: [Math.min(l.start.x, t.x), Math.max(l.start.x, t.x)],
|
|
829
|
-
y: [Math.min(l.start.y, t.y), Math.max(l.start.y, t.y)]
|
|
830
|
-
};
|
|
831
|
-
u(null), e.currentTarget.releasePointerCapture(e.pointerId), s?.onChange(n);
|
|
832
|
-
}
|
|
833
|
-
return /* @__PURE__ */ T("svg", {
|
|
829
|
+
return /* @__PURE__ */ O("svg", {
|
|
834
830
|
width: e,
|
|
835
|
-
height:
|
|
836
|
-
viewBox: `0 0 ${e} ${
|
|
831
|
+
height: U,
|
|
832
|
+
viewBox: `0 0 ${e} ${U}`,
|
|
837
833
|
"aria-hidden": !0,
|
|
838
|
-
onPointerDown:
|
|
839
|
-
|
|
840
|
-
onPointerUp: h,
|
|
841
|
-
onPointerCancel: () => u(null),
|
|
842
|
-
onLostPointerCapture: () => u(null),
|
|
843
|
-
...y.props(g.svg, s !== void 0 && q.brush),
|
|
834
|
+
onPointerDown: m,
|
|
835
|
+
...x.props(v.svg, s !== void 0 && J.brush),
|
|
844
836
|
children: [
|
|
845
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ D("defs", { children: /* @__PURE__ */ D("clipPath", {
|
|
846
838
|
id: c,
|
|
847
|
-
children: /* @__PURE__ */
|
|
848
|
-
x:
|
|
849
|
-
y:
|
|
850
|
-
width: Math.max(0, e -
|
|
839
|
+
children: /* @__PURE__ */ D("rect", {
|
|
840
|
+
x: W,
|
|
841
|
+
y: K,
|
|
842
|
+
width: Math.max(0, e - W - G),
|
|
851
843
|
height: 204
|
|
852
844
|
})
|
|
853
845
|
}) }),
|
|
854
|
-
t.ticks(5).map((e) => /* @__PURE__ */
|
|
846
|
+
t.ticks(5).map((e) => /* @__PURE__ */ O("g", { children: [/* @__PURE__ */ D("line", {
|
|
855
847
|
x1: t(e),
|
|
856
848
|
x2: t(e),
|
|
857
|
-
y1:
|
|
849
|
+
y1: K,
|
|
858
850
|
y2: 216,
|
|
859
|
-
...
|
|
860
|
-
}), /* @__PURE__ */
|
|
851
|
+
...x.props(v.grid)
|
|
852
|
+
}), /* @__PURE__ */ D("text", {
|
|
861
853
|
x: t(e),
|
|
862
854
|
y: 234,
|
|
863
855
|
textAnchor: "middle",
|
|
864
|
-
...
|
|
856
|
+
...x.props(v.label),
|
|
865
857
|
children: a(e)
|
|
866
858
|
})] }, e)),
|
|
867
|
-
n.ticks(4).map((t) => /* @__PURE__ */
|
|
868
|
-
x1:
|
|
869
|
-
x2: e -
|
|
859
|
+
n.ticks(4).map((t) => /* @__PURE__ */ O("g", { children: [/* @__PURE__ */ D("line", {
|
|
860
|
+
x1: W,
|
|
861
|
+
x2: e - G,
|
|
870
862
|
y1: n(t),
|
|
871
863
|
y2: n(t),
|
|
872
|
-
...
|
|
873
|
-
}), /* @__PURE__ */
|
|
864
|
+
...x.props(v.grid)
|
|
865
|
+
}), /* @__PURE__ */ D("text", {
|
|
874
866
|
x: 48,
|
|
875
867
|
y: n(t) + 4,
|
|
876
868
|
textAnchor: "end",
|
|
877
|
-
...
|
|
869
|
+
...x.props(v.label),
|
|
878
870
|
children: o(t)
|
|
879
871
|
})] }, t)),
|
|
880
|
-
/* @__PURE__ */
|
|
881
|
-
x: (
|
|
872
|
+
/* @__PURE__ */ D("text", {
|
|
873
|
+
x: (W + e - G) / 2,
|
|
882
874
|
y: 256,
|
|
883
875
|
textAnchor: "middle",
|
|
884
|
-
...
|
|
876
|
+
...x.props(v.label),
|
|
885
877
|
children: r
|
|
886
878
|
}),
|
|
887
|
-
/* @__PURE__ */
|
|
879
|
+
/* @__PURE__ */ D("text", {
|
|
888
880
|
x: 12,
|
|
889
881
|
y: 108,
|
|
890
882
|
textAnchor: "middle",
|
|
891
883
|
transform: "rotate(-90 12 108)",
|
|
892
|
-
...
|
|
884
|
+
...x.props(v.label),
|
|
893
885
|
children: i
|
|
894
886
|
}),
|
|
895
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ D("g", {
|
|
896
888
|
clipPath: `url(#${c})`,
|
|
897
|
-
children:
|
|
898
|
-
x: t(
|
|
899
|
-
y: n(
|
|
900
|
-
width: t(
|
|
901
|
-
height: n(
|
|
889
|
+
children: f != null && /* @__PURE__ */ D("rect", {
|
|
890
|
+
x: t(f.x[0]),
|
|
891
|
+
y: n(f.y[1]),
|
|
892
|
+
width: t(f.x[1]) - t(f.x[0]),
|
|
893
|
+
height: n(f.y[0]) - n(f.y[1]),
|
|
902
894
|
className: "x1e0kj8g xv7c1pl x1tg5nk6 xnpr05h x15lqr97 x47corl"
|
|
903
895
|
})
|
|
904
896
|
})
|
|
905
897
|
]
|
|
906
898
|
});
|
|
907
899
|
}
|
|
908
|
-
function
|
|
900
|
+
function Z({ rangeSelection: e, xDomain: t, yDomain: n, xLabel: r, yLabel: i, formatX: a, formatY: o }) {
|
|
909
901
|
let s = e.value ?? {
|
|
910
902
|
x: t,
|
|
911
903
|
y: n
|
|
912
904
|
};
|
|
913
|
-
return /* @__PURE__ */
|
|
905
|
+
return /* @__PURE__ */ O("fieldset", {
|
|
914
906
|
className: "xrvj5dj x1n8ia3y x1xxf3xd xc342km x1717udv xeuugli",
|
|
915
907
|
children: [
|
|
916
|
-
/* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ D("legend", {
|
|
917
909
|
className: "x153jb6y xy8obcc x1jfksii",
|
|
918
910
|
children: "Drag with a mouse, or adjust these bounds to select a coordinate range."
|
|
919
911
|
}),
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
value: s.x,
|
|
912
|
+
/* @__PURE__ */ O(b.Root, {
|
|
913
|
+
value: [...s.x],
|
|
914
|
+
format: a,
|
|
922
915
|
min: t[0],
|
|
923
916
|
max: t[1],
|
|
924
917
|
step: e.xStep,
|
|
925
918
|
locale: e.locale,
|
|
926
|
-
thumbCollisionBehavior: "none",
|
|
927
919
|
onValueChange: (t) => e.onChange({
|
|
928
920
|
x: t,
|
|
929
921
|
y: s.y
|
|
930
922
|
}),
|
|
931
|
-
children: [/* @__PURE__ */
|
|
923
|
+
children: [/* @__PURE__ */ O("div", {
|
|
932
924
|
className: "x78zum5 x1a02dak x1qughib x1hnptsi x153jb6y xy8obcc xj0a0fe",
|
|
933
|
-
children: [/* @__PURE__ */
|
|
925
|
+
children: [/* @__PURE__ */ D(b.Label, { children: r }), /* @__PURE__ */ O("span", { children: [
|
|
934
926
|
a(s.x[0]),
|
|
935
927
|
" – ",
|
|
936
928
|
a(s.x[1])
|
|
937
929
|
] })]
|
|
938
|
-
}), /* @__PURE__ */
|
|
939
|
-
/* @__PURE__ */
|
|
940
|
-
/* @__PURE__ */
|
|
930
|
+
}), /* @__PURE__ */ D(b.Control, { children: /* @__PURE__ */ O(b.Track, { children: [
|
|
931
|
+
/* @__PURE__ */ D(b.Indicator, {}),
|
|
932
|
+
/* @__PURE__ */ D(b.Thumb, {
|
|
941
933
|
index: 0,
|
|
942
|
-
"aria-label": `${r} minimum
|
|
943
|
-
getAriaValueText: (e, t) => a(t)
|
|
934
|
+
"aria-label": `${r} minimum`
|
|
944
935
|
}),
|
|
945
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ D(b.Thumb, {
|
|
946
937
|
index: 1,
|
|
947
|
-
"aria-label": `${r} maximum
|
|
948
|
-
getAriaValueText: (e, t) => a(t)
|
|
938
|
+
"aria-label": `${r} maximum`
|
|
949
939
|
})
|
|
950
940
|
] }) })]
|
|
951
941
|
}),
|
|
952
|
-
/* @__PURE__ */
|
|
953
|
-
value: s.y,
|
|
942
|
+
/* @__PURE__ */ O(b.Root, {
|
|
943
|
+
value: [...s.y],
|
|
944
|
+
format: o,
|
|
954
945
|
min: n[0],
|
|
955
946
|
max: n[1],
|
|
956
947
|
step: e.yStep,
|
|
957
948
|
locale: e.locale,
|
|
958
|
-
thumbCollisionBehavior: "none",
|
|
959
949
|
onValueChange: (t) => e.onChange({
|
|
960
950
|
x: s.x,
|
|
961
951
|
y: t
|
|
962
952
|
}),
|
|
963
|
-
children: [/* @__PURE__ */
|
|
953
|
+
children: [/* @__PURE__ */ O("div", {
|
|
964
954
|
className: "x78zum5 x1a02dak x1qughib x1hnptsi x153jb6y xy8obcc xj0a0fe",
|
|
965
|
-
children: [/* @__PURE__ */
|
|
955
|
+
children: [/* @__PURE__ */ D(b.Label, { children: i }), /* @__PURE__ */ O("span", { children: [
|
|
966
956
|
o(s.y[0]),
|
|
967
957
|
" – ",
|
|
968
958
|
o(s.y[1])
|
|
969
959
|
] })]
|
|
970
|
-
}), /* @__PURE__ */
|
|
971
|
-
/* @__PURE__ */
|
|
972
|
-
/* @__PURE__ */
|
|
960
|
+
}), /* @__PURE__ */ D(b.Control, { children: /* @__PURE__ */ O(b.Track, { children: [
|
|
961
|
+
/* @__PURE__ */ D(b.Indicator, {}),
|
|
962
|
+
/* @__PURE__ */ D(b.Thumb, {
|
|
973
963
|
index: 0,
|
|
974
|
-
"aria-label": `${i} minimum
|
|
975
|
-
getAriaValueText: (e, t) => o(t)
|
|
964
|
+
"aria-label": `${i} minimum`
|
|
976
965
|
}),
|
|
977
|
-
/* @__PURE__ */
|
|
966
|
+
/* @__PURE__ */ D(b.Thumb, {
|
|
978
967
|
index: 1,
|
|
979
|
-
"aria-label": `${i} maximum
|
|
980
|
-
getAriaValueText: (e, t) => o(t)
|
|
968
|
+
"aria-label": `${i} maximum`
|
|
981
969
|
})
|
|
982
970
|
] }) })]
|
|
983
971
|
}),
|
|
984
|
-
/* @__PURE__ */
|
|
972
|
+
/* @__PURE__ */ D(y, {
|
|
985
973
|
type: "button",
|
|
986
974
|
disabled: e.value === null,
|
|
987
975
|
onClick: () => e.onChange(null),
|
|
@@ -990,10 +978,10 @@ function Y({ rangeSelection: e, xDomain: t, yDomain: n, xLabel: r, yLabel: i, fo
|
|
|
990
978
|
]
|
|
991
979
|
});
|
|
992
980
|
}
|
|
993
|
-
function
|
|
994
|
-
if (!
|
|
995
|
-
if (e.length > 1e3) return `This plot exceeds the ${
|
|
996
|
-
if (!
|
|
981
|
+
function ve({ points: e, xDomain: t, yDomain: n, rangeSelection: r }) {
|
|
982
|
+
if (!h(t) || !h(n)) return "Scatter domains must contain finite, increasing endpoints.";
|
|
983
|
+
if (e.length > 1e3) return `This plot exceeds the ${_e}-point render limit. Supply a smaller, labelled sample.`;
|
|
984
|
+
if (!m(e)) return "Scatter points must have unique identifiers.";
|
|
997
985
|
if (e.some((e) => !Number.isFinite(e.x) || !Number.isFinite(e.y))) return "Scatter coordinates must be finite.";
|
|
998
986
|
if (e.some((e) => {
|
|
999
987
|
let r = e.x < t[0] || e.x > t[1], i = e.y < n[0] || e.y > n[1];
|
|
@@ -1003,18 +991,18 @@ function X({ points: e, xDomain: t, yDomain: n, rangeSelection: r }) {
|
|
|
1003
991
|
let i = Number.isFinite(r.xStep) && r.xStep > 0 && r.xStep <= t[1] - t[0], a = Number.isFinite(r.yStep) && r.yStep > 0 && r.yStep <= n[1] - n[0];
|
|
1004
992
|
if (!i || !a) return "Range selection steps must be finite, positive, and no larger than their domain span.";
|
|
1005
993
|
let o = r.value;
|
|
1006
|
-
return o === null ? null : !
|
|
994
|
+
return o === null ? null : !Q(o.x, t) || !Q(o.y, n) ? "The selected range must have finite, ordered bounds inside the declared domain." : null;
|
|
1007
995
|
}
|
|
1008
|
-
function
|
|
996
|
+
function Q(e, t) {
|
|
1009
997
|
return !e.every(Number.isFinite) || e[0] > e[1] ? !1 : e[0] >= t[0] && e[1] <= t[1];
|
|
1010
998
|
}
|
|
1011
999
|
// packages/charts/src/cartesian/time-series-data.ts
|
|
1012
|
-
var
|
|
1000
|
+
var $ = {
|
|
1013
1001
|
series: 12,
|
|
1014
1002
|
pointsPerSeries: 2e3,
|
|
1015
1003
|
markers: 200,
|
|
1016
1004
|
panels: 12
|
|
1017
|
-
},
|
|
1005
|
+
}, ye = .01, be = [
|
|
1018
1006
|
"series1",
|
|
1019
1007
|
"series2",
|
|
1020
1008
|
"series3",
|
|
@@ -1022,13 +1010,13 @@ var Q = {
|
|
|
1022
1010
|
"series5",
|
|
1023
1011
|
"series6"
|
|
1024
1012
|
];
|
|
1025
|
-
function
|
|
1013
|
+
function xe({ series: e, isStacked: t, markers: n }) {
|
|
1026
1014
|
let r = e[0]?.points.map((e) => e.timestamp) ?? [];
|
|
1027
|
-
if (e.length >
|
|
1028
|
-
if (!
|
|
1015
|
+
if (e.length > $.series || r.length > $.pointsPerSeries || n.length > $.markers) return `Choose a window with at most ${$.series} series, ${$.pointsPerSeries} observations per series, and ${$.markers} markers.`;
|
|
1016
|
+
if (!m(e) || !m(n)) return "Series and markers require unique identifiers.";
|
|
1029
1017
|
for (let n of e) {
|
|
1030
1018
|
if (n.points.length !== r.length) return "Every series must supply the same observation timestamps.";
|
|
1031
|
-
let e =
|
|
1019
|
+
let e = Te({
|
|
1032
1020
|
points: n.points,
|
|
1033
1021
|
timestamps: r,
|
|
1034
1022
|
isStacked: t
|
|
@@ -1046,7 +1034,7 @@ function ye({ series: e, isStacked: t, markers: n }) {
|
|
|
1046
1034
|
if (!Number.isFinite(a) || !Number.isFinite(o)) return "The elapsed-time and value ranges must be finite.";
|
|
1047
1035
|
if (t && r.some((t, n) => !Number.isFinite(e.reduce((e, t) => e + (t.points[n]?.value ?? 0), 0)))) return "Stacked observation totals must be finite.";
|
|
1048
1036
|
}
|
|
1049
|
-
function
|
|
1037
|
+
function Se({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
|
|
1050
1038
|
return JSON.stringify([
|
|
1051
1039
|
n,
|
|
1052
1040
|
r,
|
|
@@ -1066,15 +1054,15 @@ function be({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
|
|
|
1066
1054
|
])
|
|
1067
1055
|
]);
|
|
1068
1056
|
}
|
|
1069
|
-
function
|
|
1057
|
+
function Ce(e, t, n = !1) {
|
|
1070
1058
|
if (e !== t) return [e, t];
|
|
1071
|
-
let r = Math.max(1, Math.abs(e) *
|
|
1059
|
+
let r = Math.max(1, Math.abs(e) * ye), i = n ? 0 : e - r, a = t + r;
|
|
1072
1060
|
return [Number.isFinite(i) ? i : e, Number.isFinite(a) ? a : t];
|
|
1073
1061
|
}
|
|
1074
|
-
function
|
|
1062
|
+
function we(e, t) {
|
|
1075
1063
|
let n = e.filter((e) => e.tone === void 0);
|
|
1076
1064
|
return e.map((r, i) => {
|
|
1077
|
-
let a = n.findIndex((e) => e.id === r.id), o = r.tone ??
|
|
1065
|
+
let a = n.findIndex((e) => e.id === r.id), o = r.tone ?? be[a % be.length] ?? "series1", s = r.points.map((n, r) => {
|
|
1078
1066
|
let a = t ? e.slice(0, i).reduce((e, t) => e + (t.points[r]?.value ?? 0), 0) : 0;
|
|
1079
1067
|
return {
|
|
1080
1068
|
...n,
|
|
@@ -1089,7 +1077,7 @@ function xe(e, t) {
|
|
|
1089
1077
|
};
|
|
1090
1078
|
});
|
|
1091
1079
|
}
|
|
1092
|
-
function
|
|
1080
|
+
function Te({ points: e, timestamps: t, isStacked: n }) {
|
|
1093
1081
|
for (let [r, i] of e.entries()) {
|
|
1094
1082
|
let a = e[r - 1], o = a !== void 0 && i.timestamp <= a.timestamp;
|
|
1095
1083
|
if (!Number.isFinite(i.timestamp) || i.timestamp !== t[r] || o) return "Observation timestamps must be finite, aligned, and strictly increasing.";
|
|
@@ -1098,19 +1086,19 @@ function Se({ points: e, timestamps: t, isStacked: n }) {
|
|
|
1098
1086
|
}
|
|
1099
1087
|
}
|
|
1100
1088
|
// packages/charts/src/cartesian/time-series-line.tsx
|
|
1101
|
-
function
|
|
1102
|
-
return /* @__PURE__ */
|
|
1089
|
+
function Ee({ series: t, x: n, y: r, inspectedTimestamp: i, pointRadius: a = 3 }) {
|
|
1090
|
+
return /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(ie, {
|
|
1103
1091
|
data: [...t.points],
|
|
1104
1092
|
defined: (e) => e.value !== null,
|
|
1105
1093
|
x: (e) => n(e.timestamp),
|
|
1106
1094
|
y: (e) => r((e.value ?? 0) + e.base),
|
|
1107
1095
|
stroke: e[t.tone],
|
|
1108
|
-
...
|
|
1096
|
+
...x.props(v.mark)
|
|
1109
1097
|
}), t.points.filter((e, n) => {
|
|
1110
1098
|
if (e.value === null) return !1;
|
|
1111
1099
|
let r = t.points[n - 1]?.value === null || t.points[n + 1]?.value === null;
|
|
1112
1100
|
return t.points.length === 1 || r || e.timestamp === i;
|
|
1113
|
-
}).map((i) => /* @__PURE__ */
|
|
1101
|
+
}).map((i) => /* @__PURE__ */ D("circle", {
|
|
1114
1102
|
cx: n(i.timestamp),
|
|
1115
1103
|
cy: r((i.value ?? 0) + i.base),
|
|
1116
1104
|
r: a,
|
|
@@ -1118,29 +1106,29 @@ function Ce({ series: t, x: n, y: r, inspectedTimestamp: i, pointRadius: a = 3 }
|
|
|
1118
1106
|
}, i.timestamp))] });
|
|
1119
1107
|
}
|
|
1120
1108
|
// packages/charts/src/cartesian/sparkline.tsx
|
|
1121
|
-
function
|
|
1122
|
-
let o =
|
|
1109
|
+
function De({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueDomain: a }) {
|
|
1110
|
+
let o = C(), s = C(), c = Oe({
|
|
1123
1111
|
title: e,
|
|
1124
1112
|
summary: t,
|
|
1125
1113
|
unit: n,
|
|
1126
1114
|
series: i,
|
|
1127
1115
|
valueDomain: a
|
|
1128
1116
|
}), l = i.points.some((e) => e.value !== null);
|
|
1129
|
-
if (c !== void 0 || !l) return /* @__PURE__ */
|
|
1117
|
+
if (c !== void 0 || !l) return /* @__PURE__ */ D("span", {
|
|
1130
1118
|
role: "img",
|
|
1131
1119
|
"aria-label": `${e}. ${t} Values in ${n}; timestamps in ${r}. ${c ?? "No recorded values. Missing observations remain unavailable."}`,
|
|
1132
1120
|
title: c ?? "No recorded values",
|
|
1133
1121
|
className: "x2pejg6 x10w6t97 x2lah0s xxymvpz x3nfvp2 x6s0dn4 xl56j7k x153jb6y x1hz01jw xy8obcc",
|
|
1134
1122
|
children: c === void 0 ? "No data" : "Invalid trend"
|
|
1135
1123
|
});
|
|
1136
|
-
let u = i.points[0]?.timestamp ?? 0, d = i.points.at(-1)?.timestamp ?? u, f =
|
|
1137
|
-
domain: [
|
|
1124
|
+
let u = i.points[0]?.timestamp ?? 0, d = i.points.at(-1)?.timestamp ?? u, f = j({
|
|
1125
|
+
domain: [...Ce(u, d)],
|
|
1138
1126
|
range: [3, 125]
|
|
1139
|
-
}), p =
|
|
1127
|
+
}), p = j({
|
|
1140
1128
|
domain: [...a],
|
|
1141
1129
|
range: [29, 3]
|
|
1142
|
-
}), m =
|
|
1143
|
-
return /* @__PURE__ */
|
|
1130
|
+
}), m = we([i], !1)[0];
|
|
1131
|
+
return /* @__PURE__ */ O("svg", {
|
|
1144
1132
|
role: "img",
|
|
1145
1133
|
"aria-labelledby": o,
|
|
1146
1134
|
"aria-describedby": s,
|
|
@@ -1150,11 +1138,11 @@ function we({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueD
|
|
|
1150
1138
|
height: 32,
|
|
1151
1139
|
className: "x1rg5ohu x2pejg6 x10w6t97 x2lah0s xxymvpz",
|
|
1152
1140
|
children: [
|
|
1153
|
-
/* @__PURE__ */
|
|
1141
|
+
/* @__PURE__ */ D("title", {
|
|
1154
1142
|
id: o,
|
|
1155
1143
|
children: e
|
|
1156
1144
|
}),
|
|
1157
|
-
/* @__PURE__ */
|
|
1145
|
+
/* @__PURE__ */ O("desc", {
|
|
1158
1146
|
id: s,
|
|
1159
1147
|
children: [
|
|
1160
1148
|
t,
|
|
@@ -1172,7 +1160,7 @@ function we({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueD
|
|
|
1172
1160
|
"."
|
|
1173
1161
|
]
|
|
1174
1162
|
}),
|
|
1175
|
-
m !== void 0 && /* @__PURE__ */
|
|
1163
|
+
m !== void 0 && /* @__PURE__ */ D(Ee, {
|
|
1176
1164
|
series: m,
|
|
1177
1165
|
x: f,
|
|
1178
1166
|
y: p,
|
|
@@ -1181,10 +1169,10 @@ function we({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueD
|
|
|
1181
1169
|
]
|
|
1182
1170
|
});
|
|
1183
1171
|
}
|
|
1184
|
-
function
|
|
1172
|
+
function Oe({ title: e, summary: t, unit: n, series: r, valueDomain: i }) {
|
|
1185
1173
|
if (e.trim() === "" || t.trim() === "" || n.trim() === "") return "A trend requires a title, a readable summary, and a value unit.";
|
|
1186
|
-
if (!
|
|
1187
|
-
let a =
|
|
1174
|
+
if (!h(i)) return "The displayed value domain must have finite, increasing bounds.";
|
|
1175
|
+
let a = xe({
|
|
1188
1176
|
series: [r],
|
|
1189
1177
|
isStacked: !1,
|
|
1190
1178
|
markers: []
|
|
@@ -1193,7 +1181,7 @@ function Te({ title: e, summary: t, unit: n, series: r, valueDomain: i }) {
|
|
|
1193
1181
|
if (r.points.some((e) => e.value !== null && (e.value < i[0] || e.value > i[1]))) return "Every recorded value must be inside the declared value domain.";
|
|
1194
1182
|
}
|
|
1195
1183
|
// packages/charts/src/cartesian/time-series.tsx
|
|
1196
|
-
var
|
|
1184
|
+
var ke = {
|
|
1197
1185
|
timeAxis: {
|
|
1198
1186
|
k1xSpc: "x78zum5",
|
|
1199
1187
|
kjj79g: "x1qughib",
|
|
@@ -1214,46 +1202,46 @@ var Ee = {
|
|
|
1214
1202
|
"--x-paddingInlineEnd": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
|
|
1215
1203
|
}]
|
|
1216
1204
|
};
|
|
1217
|
-
function
|
|
1218
|
-
return /* @__PURE__ */
|
|
1205
|
+
function Ae(e) {
|
|
1206
|
+
return /* @__PURE__ */ D(Le, {
|
|
1219
1207
|
...e,
|
|
1220
1208
|
kind: "line",
|
|
1221
1209
|
isStacked: !1
|
|
1222
1210
|
});
|
|
1223
1211
|
}
|
|
1224
|
-
function
|
|
1225
|
-
return /* @__PURE__ */
|
|
1212
|
+
function je({ isStacked: e = !1, ...t }) {
|
|
1213
|
+
return /* @__PURE__ */ D(Le, {
|
|
1226
1214
|
...t,
|
|
1227
1215
|
kind: "area",
|
|
1228
1216
|
isStacked: e
|
|
1229
1217
|
});
|
|
1230
1218
|
}
|
|
1231
|
-
function
|
|
1232
|
-
return /* @__PURE__ */
|
|
1219
|
+
function Me(e) {
|
|
1220
|
+
return /* @__PURE__ */ D(Ne, { ...e });
|
|
1233
1221
|
}
|
|
1234
|
-
function
|
|
1235
|
-
let l =
|
|
1222
|
+
function Ne({ title: e, description: r, series: i, actions: a, report: o, height: s = 180, showTimeAxis: c = !0 }) {
|
|
1223
|
+
let l = C(), u = we(i.map((e) => ({
|
|
1236
1224
|
...e,
|
|
1237
1225
|
points: []
|
|
1238
1226
|
})), !1);
|
|
1239
|
-
return !Number.isFinite(s) || s < 48 ? /* @__PURE__ */
|
|
1227
|
+
return !Number.isFinite(s) || s < 48 ? /* @__PURE__ */ D(g, {
|
|
1240
1228
|
title: e,
|
|
1241
1229
|
description: r,
|
|
1242
1230
|
report: o,
|
|
1243
1231
|
message: "Chart height must be at least 48 pixels."
|
|
1244
|
-
}) : /* @__PURE__ */
|
|
1232
|
+
}) : /* @__PURE__ */ D("div", {
|
|
1245
1233
|
"aria-hidden": !0,
|
|
1246
1234
|
inert: !0,
|
|
1247
1235
|
className: "xeuugli",
|
|
1248
|
-
children: /* @__PURE__ */
|
|
1236
|
+
children: /* @__PURE__ */ D(p, {
|
|
1249
1237
|
title: e,
|
|
1250
1238
|
description: r,
|
|
1251
1239
|
report: o,
|
|
1252
1240
|
series: u,
|
|
1253
1241
|
actions: a,
|
|
1254
|
-
children: /* @__PURE__ */
|
|
1242
|
+
children: /* @__PURE__ */ O("div", {
|
|
1255
1243
|
className: "xrvj5dj x1n8ia3y",
|
|
1256
|
-
children: [/* @__PURE__ */
|
|
1244
|
+
children: [/* @__PURE__ */ D(ce, {
|
|
1257
1245
|
id: l,
|
|
1258
1246
|
label: void 0,
|
|
1259
1247
|
legend: u,
|
|
@@ -1262,61 +1250,61 @@ function Ae({ title: e, description: r, series: i, actions: a, report: o, height
|
|
|
1262
1250
|
width: 0,
|
|
1263
1251
|
source: void 0,
|
|
1264
1252
|
hasSeriesSummary: o?.seriesValues !== void 0
|
|
1265
|
-
}), /* @__PURE__ */
|
|
1266
|
-
...
|
|
1267
|
-
children: [/* @__PURE__ */
|
|
1253
|
+
}), /* @__PURE__ */ O("div", {
|
|
1254
|
+
...x.props(v.plot),
|
|
1255
|
+
children: [/* @__PURE__ */ D(t, { height: s - 16 }), c && /* @__PURE__ */ O("div", {
|
|
1268
1256
|
className: "x78zum5 x1qughib x8zbtdt x1c87qhr xy8obcc xas2l8k x153jb6y xss6m8b",
|
|
1269
|
-
children: [/* @__PURE__ */
|
|
1257
|
+
children: [/* @__PURE__ */ D(n, { width: "8ch" }), /* @__PURE__ */ D(n, { width: "8ch" })]
|
|
1270
1258
|
})]
|
|
1271
1259
|
})]
|
|
1272
1260
|
})
|
|
1273
1261
|
})
|
|
1274
1262
|
});
|
|
1275
1263
|
}
|
|
1276
|
-
function
|
|
1277
|
-
let n =
|
|
1264
|
+
function Pe({ charts: e, ...t }) {
|
|
1265
|
+
let n = w(null), [r, i] = T(), a = JSON.stringify(e.map((e) => [
|
|
1278
1266
|
e.id,
|
|
1279
1267
|
e.title,
|
|
1280
|
-
|
|
1268
|
+
Se({
|
|
1281
1269
|
series: e.series,
|
|
1282
1270
|
markers: e.markers ?? [],
|
|
1283
1271
|
timestampUnit: t.timestampUnit,
|
|
1284
1272
|
isStacked: !1
|
|
1285
1273
|
})
|
|
1286
1274
|
])), o = JSON.stringify(e[0]?.series[0]?.points.map((e) => e.timestamp) ?? []), s = e.every((e) => JSON.stringify(e.series[0]?.points.map((e) => e.timestamp) ?? []) === o);
|
|
1287
|
-
if (r !== void 0 && r.signature !== a && i(void 0),
|
|
1275
|
+
if (r !== void 0 && r.signature !== a && i(void 0), S(() => {
|
|
1288
1276
|
function e(e) {
|
|
1289
1277
|
e.target instanceof Node && n.current?.contains(e.target) !== !0 && i(void 0);
|
|
1290
1278
|
}
|
|
1291
1279
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
1292
|
-
}, []), !s || !
|
|
1280
|
+
}, []), !s || !m(e)) return /* @__PURE__ */ D(g, {
|
|
1293
1281
|
title: "Small multiples",
|
|
1294
1282
|
message: "Charts need unique identifiers and aligned observation timestamps."
|
|
1295
1283
|
});
|
|
1296
|
-
if (e.length >
|
|
1284
|
+
if (e.length > $.panels) return /* @__PURE__ */ D(g, {
|
|
1297
1285
|
title: "Small multiples",
|
|
1298
|
-
message: `Choose at most ${
|
|
1286
|
+
message: `Choose at most ${$.panels} panels.`
|
|
1299
1287
|
});
|
|
1300
|
-
if (e.length === 0) return /* @__PURE__ */
|
|
1288
|
+
if (e.length === 0) return /* @__PURE__ */ D(p, {
|
|
1301
1289
|
title: "Small multiples",
|
|
1302
|
-
children: /* @__PURE__ */
|
|
1290
|
+
children: /* @__PURE__ */ D("p", {
|
|
1303
1291
|
className: "x153jb6y",
|
|
1304
1292
|
children: "No charts"
|
|
1305
1293
|
})
|
|
1306
1294
|
});
|
|
1307
1295
|
let c = Math.max(52, ...e.flatMap((e) => e.series.flatMap((t) => t.points.flatMap((t) => t.value === null || !Number.isFinite(t.value) ? [] : [(e.formatTick ?? e.formatValue)(t.value).length * 7 + 12])))), l = e.every((e) => e.report !== void 0);
|
|
1308
|
-
return /* @__PURE__ */
|
|
1296
|
+
return /* @__PURE__ */ D("div", {
|
|
1309
1297
|
ref: n,
|
|
1310
1298
|
...{
|
|
1311
1299
|
0: { className: "xrvj5dj x1j825kq" },
|
|
1312
1300
|
1: { className: "xrvj5dj xxhr3t" }
|
|
1313
1301
|
}[!!l | 0],
|
|
1314
|
-
children: e.map((n, o) => /* @__PURE__ */
|
|
1302
|
+
children: e.map((n, o) => /* @__PURE__ */ D("div", {
|
|
1315
1303
|
...{
|
|
1316
1304
|
0: {},
|
|
1317
1305
|
1: { className: "x1y332i5" }
|
|
1318
1306
|
}[!!(l && o > 0) | 0],
|
|
1319
|
-
children: /* @__PURE__ */
|
|
1307
|
+
children: /* @__PURE__ */ D(Le, {
|
|
1320
1308
|
...t,
|
|
1321
1309
|
title: n.title,
|
|
1322
1310
|
description: n.description,
|
|
@@ -1342,25 +1330,25 @@ function je({ charts: e, ...t }) {
|
|
|
1342
1330
|
}, n.id))
|
|
1343
1331
|
});
|
|
1344
1332
|
}
|
|
1345
|
-
function
|
|
1346
|
-
if (!
|
|
1333
|
+
function Fe({ charts: e, height: t }) {
|
|
1334
|
+
if (!m(e) || e.length > $.panels) return /* @__PURE__ */ D(g, {
|
|
1347
1335
|
title: "Small multiples",
|
|
1348
|
-
message: `Choose at most ${
|
|
1336
|
+
message: `Choose at most ${$.panels} panels with unique identifiers.`
|
|
1349
1337
|
});
|
|
1350
1338
|
let n = e.every((e) => e.report !== void 0);
|
|
1351
|
-
return /* @__PURE__ */
|
|
1339
|
+
return /* @__PURE__ */ D("div", {
|
|
1352
1340
|
"aria-hidden": !0,
|
|
1353
1341
|
inert: !0,
|
|
1354
1342
|
...{
|
|
1355
1343
|
0: { className: "xrvj5dj x1j825kq" },
|
|
1356
1344
|
1: { className: "xrvj5dj xxhr3t" }
|
|
1357
1345
|
}[!!n | 0],
|
|
1358
|
-
children: e.map((r, i) => /* @__PURE__ */
|
|
1346
|
+
children: e.map((r, i) => /* @__PURE__ */ D("div", {
|
|
1359
1347
|
...{
|
|
1360
1348
|
0: {},
|
|
1361
1349
|
1: { className: "x1y332i5" }
|
|
1362
1350
|
}[!!(n && i > 0) | 0],
|
|
1363
|
-
children: /* @__PURE__ */
|
|
1351
|
+
children: /* @__PURE__ */ D(Ne, {
|
|
1364
1352
|
...r,
|
|
1365
1353
|
height: t,
|
|
1366
1354
|
showTimeAxis: i === e.length - 1
|
|
@@ -1368,138 +1356,114 @@ function Me({ charts: e, height: t }) {
|
|
|
1368
1356
|
}, r.id))
|
|
1369
1357
|
});
|
|
1370
1358
|
}
|
|
1371
|
-
var
|
|
1359
|
+
var Ie = {
|
|
1372
1360
|
"x-default-marker": "x-default-marker",
|
|
1373
1361
|
$$css: !0
|
|
1374
1362
|
};
|
|
1375
|
-
function
|
|
1376
|
-
let
|
|
1363
|
+
function Le({ title: t, description: n, series: r, timestampUnit: i, formatTimestamp: a, formatValue: o, formatTick: c = o, markers: u = [], height: d = 180, actions: f, report: m, kind: h, isStacked: y, sharedInspection: b, axisWidth: te, showTimeAxis: E = !0 }) {
|
|
1364
|
+
let k = !Number.isFinite(d) || d < 48 ? "Chart height must be at least 48 pixels." : xe({
|
|
1377
1365
|
series: r,
|
|
1378
|
-
isStacked:
|
|
1379
|
-
markers:
|
|
1380
|
-
}),
|
|
1366
|
+
isStacked: y,
|
|
1367
|
+
markers: u
|
|
1368
|
+
}), A = ne(() => k === void 0 ? we(r, y) : [], [
|
|
1381
1369
|
r,
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
]),
|
|
1370
|
+
y,
|
|
1371
|
+
k
|
|
1372
|
+
]), M = A[0]?.points ?? [], { ref: ie, width: N, element: P } = ee(), oe = w(null), [se, le] = T(), ue = ne(() => M.map(({ timestamp: e }) => ({
|
|
1373
|
+
id: String(e),
|
|
1374
|
+
label: a(e)
|
|
1375
|
+
})), [M, a]), de = M.find((e) => e.timestamp === se) ?? M[0], [I, fe] = T(), L = Se({
|
|
1385
1376
|
series: r,
|
|
1386
|
-
markers:
|
|
1377
|
+
markers: u,
|
|
1387
1378
|
timestampUnit: i,
|
|
1388
|
-
isStacked:
|
|
1389
|
-
}),
|
|
1390
|
-
|
|
1391
|
-
let
|
|
1392
|
-
if (
|
|
1393
|
-
if (
|
|
1379
|
+
isStacked: y
|
|
1380
|
+
}), R = b === void 0 ? I?.signature === L ? I : void 0 : b.value, z = b === void 0 || b.isSource ? R : void 0, pe = m?.seriesValues !== void 0, me = C();
|
|
1381
|
+
I !== void 0 && (I.signature !== L || k !== void 0) && fe(void 0);
|
|
1382
|
+
let B = b !== void 0;
|
|
1383
|
+
if (S(() => {
|
|
1384
|
+
if (B) return;
|
|
1394
1385
|
function e(e) {
|
|
1395
|
-
e.target instanceof Node &&
|
|
1386
|
+
e.target instanceof Node && oe.current?.contains(e.target) !== !0 && fe(void 0);
|
|
1396
1387
|
}
|
|
1397
1388
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
1398
|
-
}, [
|
|
1389
|
+
}, [B]), k !== void 0) return /* @__PURE__ */ D(g, {
|
|
1399
1390
|
title: t,
|
|
1400
1391
|
description: n,
|
|
1401
|
-
report:
|
|
1402
|
-
message:
|
|
1392
|
+
report: m,
|
|
1393
|
+
message: k
|
|
1403
1394
|
});
|
|
1404
|
-
if (
|
|
1395
|
+
if (M.length === 0) return /* @__PURE__ */ D(p, {
|
|
1405
1396
|
title: t,
|
|
1406
1397
|
description: n,
|
|
1407
1398
|
actions: f,
|
|
1408
|
-
report:
|
|
1409
|
-
series:
|
|
1410
|
-
children: /* @__PURE__ */
|
|
1399
|
+
report: m,
|
|
1400
|
+
series: A,
|
|
1401
|
+
children: /* @__PURE__ */ D("p", {
|
|
1411
1402
|
className: "x153jb6y",
|
|
1412
1403
|
children: "No observations"
|
|
1413
1404
|
})
|
|
1414
1405
|
});
|
|
1415
|
-
let
|
|
1416
|
-
domain: [
|
|
1417
|
-
range: [
|
|
1418
|
-
}),
|
|
1419
|
-
domain: [
|
|
1420
|
-
range: [
|
|
1406
|
+
let he = d - 28, ge = he + 12, V = M[0]?.timestamp ?? 0, H = M.at(-1)?.timestamp ?? V, U = A.flatMap((e) => e.points.flatMap((e) => e.value === null ? [] : [e.value + e.base])), W = h === "area" ? Math.min(0, ...U) : Math.min(...U), G = h === "area" ? Math.max(0, ...U) : Math.max(...U), K = U.length === 0 ? 0 : W, _e = U.length === 0 ? 1 : G, q = j({
|
|
1407
|
+
domain: [...Ce(K, _e, h === "area")],
|
|
1408
|
+
range: [he, 12]
|
|
1409
|
+
}), J = q.ticks(3), Y = te ?? Math.max(44, ...J.map((e) => c(e).length * 7 + 12)), X = Math.max(Y + 1, N - 16), Z = j({
|
|
1410
|
+
domain: [...Ce(V, H)],
|
|
1411
|
+
range: [Y, X]
|
|
1421
1412
|
});
|
|
1422
|
-
function
|
|
1423
|
-
let t =
|
|
1413
|
+
function ve(e) {
|
|
1414
|
+
let t = P?.getBoundingClientRect();
|
|
1424
1415
|
if (t === void 0) return;
|
|
1425
|
-
let n =
|
|
1426
|
-
let r =
|
|
1416
|
+
let n = Z.invert(e - t.left), r = M.find((e, t) => {
|
|
1417
|
+
let r = M[t + 1];
|
|
1427
1418
|
return r === void 0 || n <= e.timestamp + (r.timestamp - e.timestamp) / 2;
|
|
1428
1419
|
});
|
|
1429
1420
|
r !== void 0 && Q({
|
|
1430
|
-
signature:
|
|
1421
|
+
signature: L,
|
|
1431
1422
|
timestamp: r.timestamp,
|
|
1432
1423
|
source: "pointer"
|
|
1433
1424
|
});
|
|
1434
1425
|
}
|
|
1435
1426
|
function Q(e) {
|
|
1436
|
-
|
|
1427
|
+
b === void 0 ? fe(e) : b.onChange(e);
|
|
1437
1428
|
}
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
let t = k.findIndex((e) => e.timestamp === de?.timestamp), n = {
|
|
1441
|
-
ArrowRight: Math.min(k.length - 1, t + 1),
|
|
1442
|
-
ArrowLeft: Math.max(0, t - 1),
|
|
1443
|
-
Home: 0,
|
|
1444
|
-
End: k.length - 1
|
|
1445
|
-
};
|
|
1446
|
-
switch (e.key) {
|
|
1447
|
-
case "Escape":
|
|
1448
|
-
e.preventDefault(), e.stopPropagation(), Q(void 0);
|
|
1449
|
-
break;
|
|
1450
|
-
case "ArrowRight":
|
|
1451
|
-
case "ArrowLeft":
|
|
1452
|
-
case "Home":
|
|
1453
|
-
case "End": {
|
|
1454
|
-
e.preventDefault();
|
|
1455
|
-
let t = k[n[e.key]];
|
|
1456
|
-
t !== void 0 && (N(t.timestamp), Q({
|
|
1457
|
-
signature: F,
|
|
1458
|
-
timestamp: t.timestamp,
|
|
1459
|
-
source: "keyboard"
|
|
1460
|
-
}));
|
|
1461
|
-
break;
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
return /* @__PURE__ */ w("div", {
|
|
1466
|
-
ref: M,
|
|
1429
|
+
return /* @__PURE__ */ D("div", {
|
|
1430
|
+
ref: oe,
|
|
1467
1431
|
className: "xeuugli",
|
|
1468
|
-
children: /* @__PURE__ */
|
|
1469
|
-
title: pe ? t : /* @__PURE__ */
|
|
1432
|
+
children: /* @__PURE__ */ O(p, {
|
|
1433
|
+
title: pe ? t : /* @__PURE__ */ D(F, {
|
|
1470
1434
|
title: t,
|
|
1471
|
-
detail:
|
|
1435
|
+
detail: z === void 0 ? void 0 : a(z.timestamp)
|
|
1472
1436
|
}),
|
|
1473
1437
|
description: n,
|
|
1474
|
-
report:
|
|
1475
|
-
series:
|
|
1438
|
+
report: m,
|
|
1439
|
+
series: A,
|
|
1476
1440
|
actions: f,
|
|
1477
|
-
children: [/* @__PURE__ */
|
|
1441
|
+
children: [/* @__PURE__ */ D(s, {
|
|
1478
1442
|
label: `${t} observations`,
|
|
1479
1443
|
columns: [{
|
|
1480
1444
|
id: "time",
|
|
1481
1445
|
label: `Time (${i})`
|
|
1482
|
-
}, ...
|
|
1446
|
+
}, ...A.map((e) => ({
|
|
1483
1447
|
id: `series:${e.id}`,
|
|
1484
1448
|
label: e.label
|
|
1485
1449
|
}))],
|
|
1486
|
-
rows:
|
|
1450
|
+
rows: M.map((e, t) => ({
|
|
1487
1451
|
id: e.timestamp,
|
|
1488
|
-
values: [a(e.timestamp), ...
|
|
1452
|
+
values: [a(e.timestamp), ...A.map((e) => e.points[t]?.value === null || e.points[t]?.value === void 0 ? "Unavailable" : o(e.points[t].value))]
|
|
1489
1453
|
}))
|
|
1490
|
-
}), /* @__PURE__ */
|
|
1454
|
+
}), /* @__PURE__ */ O("div", {
|
|
1491
1455
|
className: "xrvj5dj x1n8ia3y",
|
|
1492
1456
|
children: [
|
|
1493
|
-
/* @__PURE__ */
|
|
1457
|
+
/* @__PURE__ */ D(ce, {
|
|
1494
1458
|
id: me,
|
|
1495
|
-
label:
|
|
1496
|
-
legend:
|
|
1459
|
+
label: z === void 0 ? void 0 : a(z.timestamp),
|
|
1460
|
+
legend: A.map(({ id: e, label: t, tone: n }) => ({
|
|
1497
1461
|
id: e,
|
|
1498
1462
|
label: t,
|
|
1499
1463
|
tone: n
|
|
1500
1464
|
})),
|
|
1501
|
-
rows:
|
|
1502
|
-
let t = e.points.find((e) => e.timestamp ===
|
|
1465
|
+
rows: A.map((e) => {
|
|
1466
|
+
let t = e.points.find((e) => e.timestamp === z?.timestamp);
|
|
1503
1467
|
return {
|
|
1504
1468
|
id: e.id,
|
|
1505
1469
|
label: e.label,
|
|
@@ -1507,114 +1471,127 @@ function Pe({ title: t, description: n, series: r, timestampUnit: i, formatTimes
|
|
|
1507
1471
|
value: t?.value === null || t === void 0 ? "Unavailable" : o(t.value)
|
|
1508
1472
|
};
|
|
1509
1473
|
}),
|
|
1510
|
-
x:
|
|
1511
|
-
width:
|
|
1512
|
-
source:
|
|
1513
|
-
notes:
|
|
1474
|
+
x: Z(R?.timestamp ?? V),
|
|
1475
|
+
width: N,
|
|
1476
|
+
source: z?.source,
|
|
1477
|
+
notes: u.filter((e) => e.timestamp === z?.timestamp).map((e) => e.label),
|
|
1514
1478
|
hasSeriesSummary: pe
|
|
1515
1479
|
}),
|
|
1516
|
-
/* @__PURE__ */
|
|
1517
|
-
ref:
|
|
1518
|
-
...
|
|
1519
|
-
children: [/* @__PURE__ */
|
|
1480
|
+
/* @__PURE__ */ O("div", {
|
|
1481
|
+
ref: ie,
|
|
1482
|
+
...x.props(v.plot),
|
|
1483
|
+
children: [/* @__PURE__ */ O(l, {
|
|
1520
1484
|
role: "img",
|
|
1521
1485
|
"aria-label": `${t}. Use arrow keys to inspect observations.`,
|
|
1522
1486
|
"aria-describedby": me,
|
|
1523
1487
|
tabIndex: 0,
|
|
1524
|
-
viewBox: `0 0 ${
|
|
1525
|
-
height:
|
|
1526
|
-
|
|
1488
|
+
viewBox: `0 0 ${N} ${ge}`,
|
|
1489
|
+
height: ge,
|
|
1490
|
+
controls: {
|
|
1491
|
+
items: ue,
|
|
1492
|
+
cursor: de === void 0 ? void 0 : String(de.timestamp),
|
|
1493
|
+
inspected: R === void 0 ? void 0 : String(R.timestamp),
|
|
1494
|
+
onInspect: (e) => {
|
|
1495
|
+
let t = Number(e);
|
|
1496
|
+
le(t), Q({
|
|
1497
|
+
signature: L,
|
|
1498
|
+
timestamp: t,
|
|
1499
|
+
source: "keyboard"
|
|
1500
|
+
});
|
|
1501
|
+
},
|
|
1502
|
+
onDismiss: () => Q(void 0)
|
|
1503
|
+
},
|
|
1527
1504
|
onFocus: (e) => {
|
|
1528
1505
|
if (e.currentTarget.matches(":focus-visible")) {
|
|
1529
|
-
let e =
|
|
1530
|
-
|
|
1531
|
-
signature:
|
|
1506
|
+
let e = R?.timestamp ?? V;
|
|
1507
|
+
le(e), Q({
|
|
1508
|
+
signature: L,
|
|
1532
1509
|
timestamp: e,
|
|
1533
1510
|
source: "keyboard"
|
|
1534
1511
|
});
|
|
1535
1512
|
}
|
|
1536
1513
|
},
|
|
1537
1514
|
onPointerMove: (e) => {
|
|
1538
|
-
e.pointerType === "mouse" &&
|
|
1515
|
+
e.pointerType === "mouse" && ve(e.clientX);
|
|
1539
1516
|
},
|
|
1540
|
-
onPointerDown: (e) =>
|
|
1517
|
+
onPointerDown: (e) => ve(e.clientX),
|
|
1541
1518
|
onPointerLeave: (e) => {
|
|
1542
|
-
e.pointerType === "mouse" &&
|
|
1519
|
+
e.pointerType === "mouse" && R?.source === "pointer" && Q(void 0);
|
|
1543
1520
|
},
|
|
1544
1521
|
onBlur: () => Q(void 0),
|
|
1545
|
-
...
|
|
1522
|
+
...x.props(v.svg, v.inspectable, Ie),
|
|
1546
1523
|
children: [
|
|
1547
|
-
|
|
1548
|
-
x1:
|
|
1549
|
-
x2:
|
|
1524
|
+
J.map((e) => /* @__PURE__ */ O("g", { children: [/* @__PURE__ */ D("line", {
|
|
1525
|
+
x1: Y,
|
|
1526
|
+
x2: X,
|
|
1550
1527
|
y1: q(e),
|
|
1551
1528
|
y2: q(e),
|
|
1552
|
-
...
|
|
1553
|
-
}), /* @__PURE__ */
|
|
1554
|
-
x:
|
|
1529
|
+
...x.props(v.grid)
|
|
1530
|
+
}), /* @__PURE__ */ D("text", {
|
|
1531
|
+
x: Y - 8,
|
|
1555
1532
|
y: q(e),
|
|
1556
1533
|
textAnchor: "end",
|
|
1557
1534
|
dominantBaseline: "middle",
|
|
1558
|
-
...
|
|
1535
|
+
...x.props(v.label),
|
|
1559
1536
|
children: c(e)
|
|
1560
1537
|
})] }, e)),
|
|
1561
|
-
|
|
1538
|
+
A.map((t) => /* @__PURE__ */ O("g", { children: [h === "area" && /* @__PURE__ */ D(re, {
|
|
1562
1539
|
data: [...t.points],
|
|
1563
1540
|
defined: (e) => e.value !== null,
|
|
1564
|
-
x: (e) =>
|
|
1541
|
+
x: (e) => Z(e.timestamp),
|
|
1565
1542
|
y0: (e) => q(e.base),
|
|
1566
1543
|
y1: (e) => q((e.value ?? 0) + e.base),
|
|
1567
1544
|
yScale: q,
|
|
1568
1545
|
fill: e[t.tone],
|
|
1569
|
-
fillOpacity:
|
|
1570
|
-
}), /* @__PURE__ */
|
|
1546
|
+
fillOpacity: y ? .65 : .15
|
|
1547
|
+
}), /* @__PURE__ */ D(Ee, {
|
|
1571
1548
|
series: t,
|
|
1572
|
-
x:
|
|
1549
|
+
x: Z,
|
|
1573
1550
|
y: q,
|
|
1574
|
-
inspectedTimestamp:
|
|
1551
|
+
inspectedTimestamp: R?.timestamp
|
|
1575
1552
|
})] }, t.id)),
|
|
1576
|
-
|
|
1577
|
-
x1:
|
|
1578
|
-
x2:
|
|
1553
|
+
u.map((e) => /* @__PURE__ */ O("g", { children: [e.kind === "time" ? /* @__PURE__ */ D("line", {
|
|
1554
|
+
x1: Z(e.timestamp),
|
|
1555
|
+
x2: Z(e.timestamp),
|
|
1579
1556
|
y1: 12,
|
|
1580
|
-
y2:
|
|
1557
|
+
y2: he,
|
|
1581
1558
|
className: "xhq4mlf x1ntoi03 x13efnbd"
|
|
1582
|
-
}) : /* @__PURE__ */
|
|
1583
|
-
cx:
|
|
1584
|
-
cy: q(e.value + (
|
|
1559
|
+
}) : /* @__PURE__ */ D("circle", {
|
|
1560
|
+
cx: Z(e.timestamp),
|
|
1561
|
+
cy: q(e.value + (A.find((t) => t.id === e.seriesId)?.points.find((t) => t.timestamp === e.timestamp)?.base ?? 0)),
|
|
1585
1562
|
r: 4,
|
|
1586
|
-
fill:
|
|
1587
|
-
...
|
|
1588
|
-
}), /* @__PURE__ */
|
|
1589
|
-
|
|
1590
|
-
x1:
|
|
1591
|
-
x2:
|
|
1563
|
+
fill: _.surface,
|
|
1564
|
+
...x.props(v.selected)
|
|
1565
|
+
}), /* @__PURE__ */ D("title", { children: e.kind === "point" ? `${e.label}: ${o(e.value)}` : e.label })] }, e.id)),
|
|
1566
|
+
R !== void 0 && /* @__PURE__ */ D("line", {
|
|
1567
|
+
x1: Z(R.timestamp),
|
|
1568
|
+
x2: Z(R.timestamp),
|
|
1592
1569
|
y1: 12,
|
|
1593
|
-
y2:
|
|
1570
|
+
y2: he,
|
|
1594
1571
|
className: "xhq4mlf x1ntoi03 x13efnbd"
|
|
1595
1572
|
}),
|
|
1596
|
-
de !== void 0 && /* @__PURE__ */
|
|
1597
|
-
x:
|
|
1573
|
+
de !== void 0 && /* @__PURE__ */ D(ae, {
|
|
1574
|
+
x: Z(de.timestamp),
|
|
1598
1575
|
top: 12,
|
|
1599
|
-
bottom:
|
|
1600
|
-
width: Math.min(16, (
|
|
1576
|
+
bottom: he,
|
|
1577
|
+
width: Math.min(16, (X - Y) / 2)
|
|
1601
1578
|
})
|
|
1602
1579
|
]
|
|
1603
|
-
}),
|
|
1580
|
+
}), E && /* @__PURE__ */ O("div", {
|
|
1604
1581
|
"aria-hidden": !0,
|
|
1605
|
-
...
|
|
1606
|
-
children: [/* @__PURE__ */
|
|
1582
|
+
...x.props(ke.timeAxis, ke.timeAxisInset(Y, Math.max(0, N - X))),
|
|
1583
|
+
children: [/* @__PURE__ */ D("span", {
|
|
1607
1584
|
className: "x1cqoux5 xeuugli xj0a0fe",
|
|
1608
|
-
children: a(B)
|
|
1609
|
-
}), V !== B && /* @__PURE__ */ w("span", {
|
|
1610
|
-
className: "x1cqoux5 xeuugli xj0a0fe xp4054r",
|
|
1611
1585
|
children: a(V)
|
|
1586
|
+
}), H !== V && /* @__PURE__ */ D("span", {
|
|
1587
|
+
className: "x1cqoux5 xeuugli xj0a0fe xp4054r",
|
|
1588
|
+
children: a(H)
|
|
1612
1589
|
})]
|
|
1613
1590
|
})]
|
|
1614
1591
|
}),
|
|
1615
|
-
|
|
1592
|
+
u.length > 0 && /* @__PURE__ */ D("ul", {
|
|
1616
1593
|
className: "x78zum5 x1a02dak x1n8ia3y x1ghz6dp x1717udv xe8uvvx xy8obcc x153jb6y xj0a0fe",
|
|
1617
|
-
children:
|
|
1594
|
+
children: u.map((e) => /* @__PURE__ */ O("li", { children: [
|
|
1618
1595
|
a(e.timestamp),
|
|
1619
1596
|
" · ",
|
|
1620
1597
|
e.label,
|
|
@@ -1626,4 +1603,4 @@ function Pe({ title: t, description: n, series: r, timestampUnit: i, formatTimes
|
|
|
1626
1603
|
})
|
|
1627
1604
|
});
|
|
1628
1605
|
}
|
|
1629
|
-
export {
|
|
1606
|
+
export { je as AreaChart, B as BarChart, R as BarChartPlaceholder, H as BreakdownBar, Ae as LineChart, _e as MAX_SCATTER_POINTS, Y as ScatterPlot, Pe as SmallMultiples, Fe as SmallMultiplesPlaceholder, De as Sparkline, Me as TimeSeriesChartPlaceholder, $ as timeSeriesLimits };
|