@slotted/react 0.1.0-beta.0 → 0.1.0-beta.2

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.
Files changed (91) hide show
  1. package/README.md +4 -0
  2. package/dist/{action-sheet-D8Glxl7l.js → action-sheet-DgwzC3iY.js} +1 -1
  3. package/dist/action-sheet.js +1 -1
  4. package/dist/{chart-BNzfIfQe.js → chart-Gb_P3Kdq.js} +344 -333
  5. package/dist/chart.js +1 -1
  6. package/dist/{column-manager-CNZ7Xk5_.js → column-manager-B7_a_jDK.js} +1 -1
  7. package/dist/column-manager.js +1 -1
  8. package/dist/{combobox-C46GRqAA.js → combobox-C66dNlMR.js} +176 -172
  9. package/dist/combobox.js +1 -1
  10. package/dist/dashboard-grid-CKdyO4j6.js +1043 -0
  11. package/dist/dashboard-grid.js +1 -1
  12. package/dist/{data-grid-BUgOJuGp.js → data-grid-rWMDNl-6.js} +2 -2
  13. package/dist/data-grid.js +1 -1
  14. package/dist/docs/AGENTS.snippet.md +10 -0
  15. package/dist/docs/event-calendar.json +7 -0
  16. package/dist/docs/event-calendar.md +1 -0
  17. package/dist/docs/guidelines/README.md +27 -0
  18. package/dist/docs/guidelines/async-feedback.md +108 -0
  19. package/dist/docs/guidelines/browsing.md +74 -0
  20. package/dist/docs/guidelines/builders.md +97 -0
  21. package/dist/docs/guidelines/composition.md +129 -0
  22. package/dist/docs/guidelines/conversations.md +59 -0
  23. package/dist/docs/guidelines/errors-and-conflicts.md +71 -0
  24. package/dist/docs/guidelines/forms.md +192 -0
  25. package/dist/docs/guidelines/index.md +121 -0
  26. package/dist/docs/guidelines/layout-alignment.md +95 -0
  27. package/dist/docs/guidelines/ledgers.md +45 -0
  28. package/dist/docs/guidelines/list-pages.md +165 -0
  29. package/dist/docs/guidelines/overviews.md +66 -0
  30. package/dist/docs/guidelines/own-elements.md +115 -0
  31. package/dist/docs/guidelines/reading-permissions.md +55 -0
  32. package/dist/docs/guidelines/record-pages.md +178 -0
  33. package/dist/docs/guidelines/reports.md +123 -0
  34. package/dist/docs/guidelines/shell-composition.md +94 -0
  35. package/dist/docs/guidelines/workspaces.md +46 -0
  36. package/dist/docs/index.md +12 -0
  37. package/dist/docs/progress-indicator.json +1 -2
  38. package/dist/docs/progress-indicator.md +2 -2
  39. package/dist/docs/skills/build-own-element/SKILL.md +90 -0
  40. package/dist/docs/skills/compose-screen/SKILL.md +76 -0
  41. package/dist/docs/skills/index.md +9 -0
  42. package/dist/docs/skills/review-screen/SKILL.md +70 -0
  43. package/dist/docs/skills/theme-app/SKILL.md +74 -0
  44. package/dist/docs/skills/waiting-states/SKILL.md +139 -0
  45. package/dist/docs/stat-card.json +1 -0
  46. package/dist/docs/stat-card.md +1 -1
  47. package/dist/docs/tabs.json +1 -4
  48. package/dist/docs/tabs.md +1 -1
  49. package/dist/docs/tokens.md +424 -0
  50. package/dist/{drawer-Ci3wuCVa.js → drawer-Dtospdqk.js} +1 -1
  51. package/dist/drawer.js +1 -1
  52. package/dist/{entity-picker-UGhbVwkC.js → entity-picker-Dm-y0RNE.js} +1 -1
  53. package/dist/entity-picker.js +1 -1
  54. package/dist/{event-calendar-BFdeGfC-.js → event-calendar-DYjVwTI6.js} +387 -386
  55. package/dist/event-calendar.js +1 -1
  56. package/dist/{filter-bar-b2Q9BZHf.js → filter-bar-Bh7cbqDE.js} +3 -3
  57. package/dist/filter-bar.js +1 -1
  58. package/dist/{import-export-center-D8xbCLWs.js → import-export-center-CkZ_Ar9w.js} +1 -1
  59. package/dist/import-export-center.js +1 -1
  60. package/dist/index.js +14 -14
  61. package/dist/{multi-select-CfzsvAeI.js → multi-select-B-tuIwAu.js} +226 -231
  62. package/dist/multi-select.js +1 -1
  63. package/dist/{select-UTwKjheK.js → select-hRFp8nCj.js} +128 -141
  64. package/dist/select.js +1 -1
  65. package/dist/styles.css +1 -1
  66. package/dist/{table-CzBIw9ng.js → table-Bd79IwDC.js} +1 -1
  67. package/dist/table.js +1 -1
  68. package/dist/types/chart/chart.d.ts.map +1 -1
  69. package/dist/types/combobox/combobox-collection.d.ts +1 -0
  70. package/dist/types/combobox/combobox-collection.d.ts.map +1 -1
  71. package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
  72. package/dist/types/combobox/combobox.d.ts.map +1 -1
  73. package/dist/types/dashboard-grid/dashboard-grid.d.ts.map +1 -1
  74. package/dist/types/dashboard-grid/dashboard-widget.d.ts +1 -1
  75. package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
  76. package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
  77. package/dist/types/event-calendar/event-calendar.d.ts +1 -1
  78. package/dist/types/event-calendar/event-calendar.d.ts.map +1 -1
  79. package/dist/types/event-calendar/event-calendar.types.d.ts +6 -0
  80. package/dist/types/event-calendar/event-calendar.types.d.ts.map +1 -1
  81. package/dist/types/menu/menu.types.d.ts +3 -1
  82. package/dist/types/menu/menu.types.d.ts.map +1 -1
  83. package/dist/types/multi-select/multi-select-collection.d.ts +0 -2
  84. package/dist/types/multi-select/multi-select-collection.d.ts.map +1 -1
  85. package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
  86. package/dist/types/multi-select/multi-select.d.ts.map +1 -1
  87. package/dist/types/select/select-collection.d.ts +0 -2
  88. package/dist/types/select/select-collection.d.ts.map +1 -1
  89. package/dist/types/select/select.d.ts.map +1 -1
  90. package/package.json +6 -6
  91. package/dist/dashboard-grid-nfhEewA4.js +0 -1005
@@ -4,34 +4,45 @@ import { n, r } from "./i18n-DpW8lqJ1.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
6
  import { createControllable as i } from "@slotted/core/state";
7
- import { Fragment as a, createContext as o, createElement as s, useCallback as c, useContext as l, useEffect as u, useId as ee, useImperativeHandle as te, useLayoutEffect as d, useMemo as ne, useRef as f, useState as p } from "react";
8
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
9
- import { collapseState as re } from "@slotted/core/overflow";
10
- import { chartMessages as ie } from "@slotted/core/i18n";
11
- import { getLiveAnnouncer as ae } from "@slotted/core/live-announcer";
12
- import { FULL_ZOOM as oe, TOOLTIP_DOCK_WIDTH as se, categoryIndex as ce, chartKeyAction as le, chartTable as ue, chartToCsv as de, createChartModel as fe, createLatestAnnouncer as pe, defaultTrigger as me, describeChart as he, describePoint as ge, describeZoom as _e, firstPoint as ve, isDrawn as _, isFullZoom as ye, observeChartTheme as be, placeLayer as xe, placeTooltip as Se, readChartTheme as Ce, sameTheme as we, seriesOf as v, toggleHidden as Te, tooltipContext as Ee, trackModality as De } from "@slotted/core/chart";
7
+ import { Fragment as a, createContext as o, createElement as s, useCallback as c, useContext as l, useEffect as u, useId as ee, useImperativeHandle as te, useLayoutEffect as ne, useMemo as re, useRef as d, useState as f } from "react";
8
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
9
+ import { collapseState as ie } from "@slotted/core/overflow";
10
+ import { chartMessages as ae } from "@slotted/core/i18n";
11
+ import { getLiveAnnouncer as oe } from "@slotted/core/live-announcer";
12
+ import { FULL_ZOOM as g, TOOLTIP_DOCK_WIDTH as se, categoryIndex as ce, chartKeyAction as le, chartTable as ue, chartToCsv as de, createChartModel as fe, createLatestAnnouncer as pe, defaultTrigger as me, describeChart as he, describePoint as ge, describeZoom as _e, firstPoint as ve, isDrawn as _, isFullZoom as ye, observeChartTheme as be, placeLayer as xe, placeTooltip as Se, readChartTheme as Ce, sameTheme as we, seriesOf as v, toggleHidden as Te, tooltipContext as Ee, trackModality as De } from "@slotted/core/chart";
13
13
  import { mountChartEngine as Oe, preloadChartEngine as ke } from "@slotted/core/chart-echarts";
14
14
  //#region src/chart/chart-defaults.tsx
15
- var y = o({});
16
- function Ae() {
17
- return l(y);
15
+ var Ae = o({});
16
+ function je() {
17
+ return l(Ae);
18
18
  }
19
- function je({ children: e, ...t }) {
20
- let n = Ae(), r = { ...n };
19
+ function Me({ children: e, ...t }) {
20
+ let n = je(), r = { ...n };
21
21
  for (let [e, n] of Object.entries(t)) n !== void 0 && (r[e] = n);
22
22
  return r.tooltip = {
23
23
  ...n.tooltip,
24
24
  ...t.tooltip
25
- }, /* @__PURE__ */ h(y.Provider, {
25
+ }, /* @__PURE__ */ m(Ae.Provider, {
26
26
  value: r,
27
27
  children: e
28
28
  });
29
29
  }
30
30
  //#endregion
31
31
  //#region src/chart/chart.tsx
32
- var Me = Object.freeze([]), Ne = (e, t) => e === t || e !== null && t !== null && e.series === t.series && e.key === t.key, Pe = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Fe = (e, t) => e.start === t.start && e.end === t.end;
33
- function b(e, t, n, r) {
34
- let [a, o] = p(t), s = e === void 0 ? a : e, l = f({
32
+ var Ne = Object.freeze([]), Pe = (e, t) => e === t || e !== null && t !== null && e.series === t.series && e.key === t.key, Fe = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Ie = (e, t) => e.start === t.start && e.end === t.end, y = (e) => typeof e == "object" && !!e && Object.getPrototypeOf(e) === Object.prototype;
33
+ function b(e, t) {
34
+ if (Object.is(e, t)) return !0;
35
+ if (Array.isArray(e)) return Array.isArray(t) && e.length === t.length && e.every((e, n) => b(e, t[n]));
36
+ if (!y(e) || !y(t)) return !1;
37
+ let n = Object.keys(e);
38
+ return n.length === Object.keys(t).length && n.every((n) => Object.hasOwn(t, n) && b(e[n], t[n]));
39
+ }
40
+ function x(e) {
41
+ let t = d(e);
42
+ return b(t.current, e) || (t.current = e), t.current;
43
+ }
44
+ function S(e, t, n, r) {
45
+ let [a, o] = f(t), s = e === void 0 ? a : e, l = d({
35
46
  controlled: e,
36
47
  value: s,
37
48
  onChange: n
@@ -50,31 +61,31 @@ function b(e, t, n, r) {
50
61
  }).request(e, t, n) && o(e);
51
62
  }, [r])];
52
63
  }
53
- var Ie = {
64
+ var Le = {
54
65
  crosshair: null,
55
66
  markers: [],
56
67
  tooltip: null,
57
68
  docked: !1
58
69
  };
59
- function Le(e) {
70
+ function Re(e) {
60
71
  try {
61
72
  return e.matches(":focus-visible");
62
73
  } catch {
63
74
  return !1;
64
75
  }
65
76
  }
66
- function Re(e) {
77
+ function ze(e) {
67
78
  for (let t = e.length - 1; t >= 0; --t) if (e[t] !== null) return t;
68
79
  return -1;
69
80
  }
70
- function ze(e) {
81
+ function Be(e) {
71
82
  return e.type === "slot" ? { "data-slot": String(e.slot) } : e.type === "tone" ? { "data-tone": e.tone } : { "data-overflow": "" };
72
83
  }
73
- function Be(e) {
84
+ function Ve(e) {
74
85
  return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, `${t}px`]));
75
86
  }
76
- function Ve(e, t = !0) {
77
- let n = f(null), r = f(null), [i, a] = p(!1), o = (i) => {
87
+ function He(e, t = !0) {
88
+ let n = d(null), r = d(null), [i, a] = f(!1), o = (i) => {
78
89
  let o = i.newState === "open";
79
90
  a(o);
80
91
  let s = r.current, c = n.current;
@@ -117,20 +128,20 @@ function Ve(e, t = !0) {
117
128
  }
118
129
  };
119
130
  }
120
- function x() {
121
- let e = f(null), t = f(null);
131
+ function C() {
132
+ let e = d(null), t = d(null);
122
133
  return u(() => {
123
134
  if (!e.current) return;
124
135
  let n = De(e.current);
125
136
  return t.current = n, () => n.destroy();
126
137
  }, []), [e, () => t.current?.read() ?? "programmatic"];
127
138
  }
128
- function He(e, t) {
139
+ function Ue(e, t) {
129
140
  typeof e == "function" ? e(t) : e && typeof e == "object" && (e.current = t);
130
141
  }
131
- function Ue({ context: e, model: t, totalLabel: n, indicator: r }) {
132
- return /* @__PURE__ */ g(m, { children: [
133
- /* @__PURE__ */ h("div", {
142
+ function We({ context: e, model: t, totalLabel: n, indicator: r }) {
143
+ return /* @__PURE__ */ h(p, { children: [
144
+ /* @__PURE__ */ m("div", {
134
145
  "data-part": "tooltip-title",
135
146
  children: e.title
136
147
  }),
@@ -139,31 +150,31 @@ function Ue({ context: e, model: t, totalLabel: n, indicator: r }) {
139
150
  return /* @__PURE__ */ s("div", {
140
151
  "data-part": "tooltip-item",
141
152
  ...e.items.length > 1 && n.current ? { "data-current": "" } : {},
142
- ...ze(n.color),
153
+ ...Be(n.color),
143
154
  key: `${n.series}-${n.label}`
144
- }, r === "none" ? null : /* @__PURE__ */ h("span", {
155
+ }, r === "none" ? null : /* @__PURE__ */ m("span", {
145
156
  "data-kind": a,
146
157
  "data-part": "tooltip-marker",
147
158
  ...i && i.stroke !== "solid" ? { "data-stroke": i.stroke } : {}
148
- }), /* @__PURE__ */ h("span", {
159
+ }), /* @__PURE__ */ m("span", {
149
160
  "data-part": "tooltip-label",
150
161
  children: n.label
151
- }), /* @__PURE__ */ h("span", {
162
+ }), /* @__PURE__ */ m("span", {
152
163
  "data-part": "tooltip-value",
153
164
  children: n.share ? `${n.share} · ${n.formatted}` : n.formatted
154
165
  }));
155
166
  }),
156
- e.total ? /* @__PURE__ */ g("div", {
167
+ e.total ? /* @__PURE__ */ h("div", {
157
168
  "data-part": "tooltip-total",
158
- children: [/* @__PURE__ */ h("span", { children: n }), /* @__PURE__ */ h("span", {
169
+ children: [/* @__PURE__ */ m("span", { children: n }), /* @__PURE__ */ m("span", {
159
170
  "data-part": "tooltip-value",
160
171
  children: e.total.formatted
161
172
  })]
162
173
  }) : null
163
174
  ] });
164
175
  }
165
- function S(i) {
166
- let { data: o, series: c, x: l, y: xe, orientation: De, stackMode: ke, annotations: y, recordKey: je, locale: x, title: S, description: w, help: Ye, actions: Xe, messages: Ze, size: Qe, variant: $e, palette: et, toolbar: tt, grid: nt, texture: rt, renderer: it, sampling: at, animate: ot, legend: st, legendInteractive: ct, legendValues: lt, legendOverflow: ut, trigger: dt, tooltip: ft, zoomable: T, selectable: pt, loading: mt, error: ht, onRetry: gt, hidden: _t, defaultHidden: vt, onHiddenChange: yt, activePoint: bt, defaultActivePoint: xt, onActivePointChange: St, selection: Ct, defaultSelection: wt, onSelectionChange: Tt, zoom: Et, defaultZoom: Dt, onZoomChange: Ot, tableOpen: kt, defaultTableOpen: At, onTableOpenChange: jt, fullscreen: Mt, defaultFullscreen: Nt, onFullscreenChange: Pt, renderTooltip: Ft, renderLegendItem: It, renderCenter: Lt, renderEmpty: Rt, renderError: zt, render: Bt, extendOption: Vt, handleRef: Ht, ref: Ut, ...Wt } = i, E = Ae(), D = ee(), O = r(ie, Ze), Gt = n(), k = {
176
+ function Ge(i) {
177
+ let { data: o, series: c, x: l, y: xe, orientation: De, stackMode: ke, annotations: Ae, recordKey: Me, locale: y, title: b, description: C, help: Ge, actions: T, messages: Ze, size: Qe, variant: $e, palette: et, toolbar: tt, grid: nt, texture: rt, renderer: it, sampling: at, animate: ot, legend: st, legendInteractive: ct, legendValues: lt, legendOverflow: ut, trigger: dt, tooltip: ft, zoomable: pt, selectable: mt, loading: ht, error: gt, onRetry: _t, hidden: vt, defaultHidden: yt, onHiddenChange: bt, activePoint: xt, defaultActivePoint: St, onActivePointChange: Ct, selection: wt, defaultSelection: Tt, onSelectionChange: Et, zoom: Dt, defaultZoom: Ot, onZoomChange: kt, tableOpen: At, defaultTableOpen: jt, onTableOpenChange: Mt, fullscreen: Nt, defaultFullscreen: Pt, onFullscreenChange: Ft, renderTooltip: It, renderLegendItem: Lt, renderCenter: Rt, renderEmpty: zt, renderError: Bt, render: Vt, extendOption: Ht, handleRef: Ut, ref: Wt, ...Gt } = i, E = je(), D = ee(), O = r(ae, Ze), Kt = n(), k = {
167
178
  size: Qe ?? E.size ?? "md",
168
179
  variant: $e ?? E.variant ?? "plain",
169
180
  palette: et ?? E.palette ?? "categorical",
@@ -176,31 +187,31 @@ function S(i) {
176
187
  ...E.tooltip,
177
188
  ...ft
178
189
  }
179
- }, [Kt, qt] = b(_t, vt ?? Me, yt, Pe), [A, j] = b(bt, xt ?? null, St, Ne), [M, Jt] = b(Ct, wt ?? null, Tt, Ne), [N, P] = b(Et, Dt ?? oe, Ot, Fe), [F, Yt] = b(kt, At ?? !1, jt, Object.is), [I, Xt] = b(Mt, Nt ?? !1, Pt, Object.is), L = ne(() => ({
190
+ }, [qt, Jt] = S(vt, yt ?? Ne, bt, Fe), [A, j] = S(xt, St ?? null, Ct, Pe), [M, Yt] = S(wt, Tt ?? null, Et, Pe), [N, P] = S(Dt, Ot ?? g, kt, Ie), [F, Xt] = S(At, jt ?? !1, Mt, Object.is), [I, Zt] = S(Nt, Pt ?? !1, Ft, Object.is), Qt = x(c), $t = x(l), en = x(xe), tn = x(Ae), nn = re(() => ({
180
191
  data: o,
181
- series: c,
182
- x: l,
183
- y: xe,
192
+ series: Qt,
193
+ x: $t,
194
+ y: en,
184
195
  orientation: De,
185
196
  stackMode: ke,
186
- annotations: y,
187
- recordKey: je,
188
- locale: x ?? Gt
197
+ annotations: tn,
198
+ recordKey: Me,
199
+ locale: y ?? Kt
189
200
  }), [
190
201
  o,
191
- c,
192
- l,
193
- xe,
202
+ Qt,
203
+ $t,
204
+ en,
194
205
  De,
195
206
  ke,
207
+ tn,
208
+ Me,
196
209
  y,
197
- je,
198
- x,
199
- Gt
200
- ]), Zt = ne(() => {
210
+ Kt
211
+ ]), rn = re(() => {
201
212
  try {
202
213
  return {
203
- model: fe(L, { hidden: Kt }),
214
+ model: fe(nn, { hidden: qt }),
204
215
  failure: null
205
216
  };
206
217
  } catch (e) {
@@ -209,11 +220,11 @@ function S(i) {
209
220
  failure: e
210
221
  };
211
222
  }
212
- }, [L, Kt]), R = Zt.model, [Qt, $t] = p(null), z = !!ht || Zt.failure !== null || Qt !== null, B = !!mt, V = !(!R || B || z || R.empty), H = !(!R || B || z || R.empty === "no-data"), U = R ? dt ?? me(R) : "none", W = f(null), G = f(null), en = f(null), tn = f(null), nn = f(null), K = f(null), [rn, an] = p(null), [q, on] = p(Ie), sn = ne(() => pe((e) => ae().announce(e)), []), cn = (e) => ae().announce(e);
213
- d(() => {
214
- let e = G.current;
223
+ }, [nn, qt]), L = rn.model, [an, on] = f(null), R = !!gt || rn.failure !== null || an !== null, z = !!ht, B = !(!L || z || R || L.empty), V = !(!L || z || R || L.empty === "no-data"), H = L ? dt ?? me(L) : "none", U = d(null), W = d(null), sn = d(null), cn = d(null), ln = d(null), G = d(null), [un, dn] = f(null), [K, fn] = f(Le), q = re(() => pe((e) => oe().announce(e)), []), pn = (e) => oe().announce(e);
224
+ ne(() => {
225
+ let e = W.current;
215
226
  if (!e) return;
216
- let t = () => an((t) => {
227
+ let t = () => dn((t) => {
217
228
  let n = Ce(e);
218
229
  return we(t, n) ? t : n;
219
230
  });
@@ -223,64 +234,64 @@ function S(i) {
223
234
  k.variant,
224
235
  I
225
236
  ]);
226
- let J = f({
237
+ let J = d({
227
238
  onPointer: () => {},
228
239
  onPress: () => {},
229
240
  onZoom: () => {},
230
241
  onRender: () => {}
231
242
  });
232
243
  u(() => {
233
- let e = en.current;
244
+ let e = sn.current;
234
245
  if (!e) return;
235
246
  let t = Oe(e, {
236
247
  onPointer: (e, t) => J.current.onPointer(e, t),
237
248
  onPress: (e, t) => J.current.onPress(e, t),
238
249
  onZoom: (e, t) => J.current.onZoom(e, t),
239
250
  onRender: () => J.current.onRender(),
240
- onError: (e) => $t(e)
251
+ onError: (e) => on(e)
241
252
  });
242
- return K.current = t, () => {
243
- t.dispose(), K.current = null;
253
+ return G.current = t, () => {
254
+ t.dispose(), G.current = null;
244
255
  };
245
256
  }, []), u(() => {
246
- K.current && rn && R && V && K.current.update({
247
- model: R,
248
- theme: rn,
257
+ G.current && un && L && B && G.current.update({
258
+ model: L,
259
+ theme: un,
249
260
  selection: M,
250
261
  zoom: N,
251
- zoomable: !!T,
262
+ zoomable: !!pt,
252
263
  grid: k.grid,
253
264
  texture: !!rt,
254
265
  renderer: k.renderer,
255
266
  sampling: at,
256
- trigger: U,
267
+ trigger: H,
257
268
  animate: k.animate,
258
- extendOption: Vt
269
+ extendOption: Ht
259
270
  });
260
271
  }, [
261
- R,
262
- rn,
263
- V,
272
+ L,
273
+ un,
274
+ B,
264
275
  M,
265
276
  N,
266
- T,
277
+ pt,
267
278
  k.grid,
268
279
  rt,
269
280
  k.renderer,
270
281
  at,
271
- U,
282
+ H,
272
283
  k.animate,
273
- Vt
284
+ Ht
274
285
  ]);
275
- let ln = () => {
276
- let e = K.current, t = G.current;
277
- if (!e || !t || !R || !V || F) {
278
- on(Ie);
286
+ let mn = () => {
287
+ let e = G.current, t = W.current;
288
+ if (!e || !t || !L || !B || F) {
289
+ fn(Le);
279
290
  return;
280
291
  }
281
292
  let n = [];
282
- if (M && _(R, M) && R.shape === "cartesian") {
283
- let t = v(R, M.series), r = e.locate(M);
293
+ if (M && _(L, M) && L.shape === "cartesian") {
294
+ let t = v(L, M.series), r = e.locate(M);
284
295
  t && t.kind !== "bar" && r && n.push({
285
296
  key: `selected-${t.id}`,
286
297
  color: t.color,
@@ -289,10 +300,10 @@ function S(i) {
289
300
  current: !1
290
301
  });
291
302
  }
292
- R.shape === "pie" && e.emphasize(A && _(R, A) ? A.key : null);
293
- let r = A && _(R, A) ? e.locate(A) : null;
303
+ L.shape === "pie" && e.emphasize(A && _(L, A) ? A.key : null);
304
+ let r = A && _(L, A) ? e.locate(A) : null;
294
305
  if (!A || !r) {
295
- on({
306
+ fn({
296
307
  crosshair: null,
297
308
  markers: n,
298
309
  tooltip: null,
@@ -300,12 +311,12 @@ function S(i) {
300
311
  });
301
312
  return;
302
313
  }
303
- let i = R.series.some((e) => e.visible && e.kind === "bar"), a = R.shape === "cartesian" && U === "axis" ? {
314
+ let i = L.series.some((e) => e.visible && e.kind === "bar"), a = L.shape === "cartesian" && H === "axis" ? {
304
315
  ...r,
305
- isBand: i && R.xType === "category"
316
+ isBand: i && L.xType === "category"
306
317
  } : null;
307
- if (R.shape === "cartesian") {
308
- let t = ce(R, A.key), r = U === "axis" ? R.series.filter((e) => e.visible && e.kind !== "bar" && e.values[t] !== null) : [v(R, A.series)].filter((e) => !!(e && e.kind !== "bar"));
318
+ if (L.shape === "cartesian") {
319
+ let t = ce(L, A.key), r = H === "axis" ? L.series.filter((e) => e.visible && e.kind !== "bar" && e.values[t] !== null) : [v(L, A.series)].filter((e) => !!(e && e.kind !== "bar"));
309
320
  for (let t of r) {
310
321
  let r = e.locate({
311
322
  series: t.id,
@@ -320,39 +331,39 @@ function S(i) {
320
331
  });
321
332
  }
322
333
  }
323
- let o = U === "none" ? null : Ee(R, A, {
324
- trigger: U,
334
+ let o = H === "none" ? null : Ee(L, A, {
335
+ trigger: H,
325
336
  sort: k.tooltip.sort,
326
337
  total: k.tooltip.total
327
338
  });
328
- on({
339
+ fn({
329
340
  crosshair: a,
330
341
  markers: n,
331
342
  tooltip: o,
332
343
  docked: t.clientWidth < se
333
344
  });
334
345
  };
335
- d(() => {
336
- ln();
346
+ ne(() => {
347
+ mn();
337
348
  }, [
338
349
  A,
339
350
  M,
340
- R,
341
- V,
351
+ L,
352
+ B,
342
353
  F,
343
- U
354
+ H
344
355
  ]);
345
- let un = f(!1);
346
- d(() => {
347
- let e = tn.current, t = G.current;
356
+ let hn = d(!1);
357
+ ne(() => {
358
+ let e = cn.current, t = W.current;
348
359
  if (!e || !t) return;
349
- if (!q.tooltip || !A) {
350
- un.current = !1;
360
+ if (!K.tooltip || !A) {
361
+ hn.current = !1;
351
362
  return;
352
363
  }
353
- let n = K.current?.locate(A);
364
+ let n = G.current?.locate(A);
354
365
  if (!n) return;
355
- un.current || (e.style.transition = "none");
366
+ hn.current || (e.style.transition = "none");
356
367
  let r = Se({
357
368
  anchor: {
358
369
  x: n.x,
@@ -366,265 +377,265 @@ function S(i) {
366
377
  width: t.clientWidth,
367
378
  height: t.clientHeight
368
379
  },
369
- dir: W.current && getComputedStyle(W.current).direction === "rtl" ? "rtl" : "ltr"
380
+ dir: U.current && getComputedStyle(U.current).direction === "rtl" ? "rtl" : "ltr"
370
381
  });
371
- e.style.setProperty("--slotted-chart-x", `${r.x}px`), e.style.setProperty("--slotted-chart-y", `${r.y}px`), un.current || requestAnimationFrame(() => e.style.transition = ""), un.current = !0;
372
- }, [q, A]), J.current = {
382
+ e.style.setProperty("--slotted-chart-x", `${r.x}px`), e.style.setProperty("--slotted-chart-y", `${r.y}px`), hn.current || requestAnimationFrame(() => e.style.transition = ""), hn.current = !0;
383
+ }, [K, A]), J.current = {
373
384
  onPointer: (e, t) => {
374
- e ? j(e, "pointer", t) : document.activeElement !== G.current && j(null, "pointer", t);
385
+ e ? j(e, "pointer", t) : document.activeElement !== W.current && j(null, "pointer", t);
375
386
  },
376
387
  onPress: (e, t) => {
377
- pt && e && Jt(Ne(M, e) ? null : e, "pointer", t);
388
+ mt && e && Yt(Pe(M, e) ? null : e, "pointer", t);
378
389
  },
379
390
  onZoom: (e, t) => P(e, "pointer", t),
380
- onRender: () => ln()
391
+ onRender: () => mn()
381
392
  };
382
- let dn = (e) => {
383
- if (!R || !V || F) return;
384
- let t = le(R, {
393
+ let gn = (e) => {
394
+ if (!L || !B || F) return;
395
+ let t = le(L, {
385
396
  active: A,
386
397
  selection: M,
387
398
  zoom: N,
388
- zoomable: !!T,
389
- selectable: !!pt
399
+ zoomable: !!pt,
400
+ selectable: !!mt
390
401
  }, e.key);
391
402
  if (t !== null) {
392
403
  e.preventDefault();
393
- for (let n of t) n.type === "active" ? (j(n.point, n.reason, e.nativeEvent), n.point ? sn.say(ge(R, n.point, M, O)) : sn.cancel()) : n.type === "select" ? (Jt(n.point, "keyboard", e.nativeEvent), n.point && sn.say(ge(R, n.point, n.point, O))) : (P(n.zoom, n.reason, e.nativeEvent), cn(_e(R, n.zoom, O)));
404
+ for (let n of t) n.type === "active" ? (j(n.point, n.reason, e.nativeEvent), n.point ? q.say(ge(L, n.point, M, O)) : q.cancel()) : n.type === "select" ? (Yt(n.point, "keyboard", e.nativeEvent), n.point && q.say(ge(L, n.point, n.point, O))) : (P(n.zoom, n.reason, e.nativeEvent), pn(_e(L, n.zoom, O)));
394
405
  }
395
- }, fn = (e) => {
396
- if (!R || !V || F || A || !Le(e.currentTarget)) return;
397
- let t = ve(R);
398
- t && (j(t, "keyboard", e.nativeEvent), sn.say(ge(R, t, M, O)));
399
- }, pn = (e, t) => {
406
+ }, _n = (e) => {
407
+ if (!L || !B || F || A || !Re(e.currentTarget)) return;
408
+ let t = ve(L);
409
+ t && (j(t, "keyboard", e.nativeEvent), q.say(ge(L, t, M, O)));
410
+ }, vn = (e, t) => {
400
411
  let n = !I;
401
- Xt(n, e, t);
402
- let r = W.current;
403
- r && (n && Mt === void 0 && document.fullscreenEnabled && e !== "programmatic" && r.requestFullscreen?.().catch(() => {}), !n && document.fullscreenElement === r && document.exitFullscreen().catch(() => {}));
412
+ Zt(n, e, t);
413
+ let r = U.current;
414
+ r && (n && Nt === void 0 && document.fullscreenEnabled && e !== "programmatic" && r.requestFullscreen?.().catch(() => {}), !n && document.fullscreenElement === r && document.exitFullscreen().catch(() => {}));
404
415
  };
405
416
  u(() => {
406
- let e = W.current;
417
+ let e = U.current;
407
418
  if (!e) return;
408
419
  let t = !1, n = () => {
409
- document.fullscreenElement === e ? t = !0 : t && (t = !1, mn.current(!1, "escape"));
420
+ document.fullscreenElement === e ? t = !0 : t && (t = !1, yn.current(!1, "escape"));
410
421
  };
411
422
  return document.addEventListener("fullscreenchange", n), () => document.removeEventListener("fullscreenchange", n);
412
423
  }, []);
413
- let mn = f(Xt);
414
- mn.current = Xt, u(() => {
415
- let e = W.current;
424
+ let yn = d(Zt);
425
+ yn.current = Zt, u(() => {
426
+ let e = U.current;
416
427
  !I && e && document.fullscreenElement === e && document.exitFullscreen().catch(() => {});
417
428
  }, [I]);
418
- let hn = (e) => {
419
- Wt.onKeyDown?.(e), !e.defaultPrevented && e.key === "Escape" && I && (e.preventDefault(), pn("escape", e.nativeEvent));
420
- }, [Y, gn] = p([]), _n = f(/* @__PURE__ */ new Map()), [vn, yn] = p(null), bn = ct ?? !0, X = R?.legend ?? [], xn = () => {
421
- let e = nn.current;
422
- if (!e || !R) return;
429
+ let bn = (e) => {
430
+ Gt.onKeyDown?.(e), !e.defaultPrevented && e.key === "Escape" && I && (e.preventDefault(), vn("escape", e.nativeEvent));
431
+ }, [Y, xn] = f([]), Sn = d(/* @__PURE__ */ new Map()), [Cn, wn] = f(null), Tn = ct ?? !0, X = L?.legend ?? [], En = () => {
432
+ let e = ln.current;
433
+ if (!e || !L) return;
423
434
  if (k.legendOverflow === "wrap") {
424
- gn((e) => e.length ? [] : e);
435
+ xn((e) => e.length ? [] : e);
425
436
  return;
426
437
  }
427
438
  let t = [...e.querySelectorAll(":scope > [data-part=\"legend-item\"]")];
428
- for (let e of t) e.hidden || _n.current.set(e.dataset.key ?? "", e.getBoundingClientRect().width);
429
- let n = Number.parseFloat(getComputedStyle(e).columnGap) || 0, r = e.querySelector(":scope > [data-part=\"legend-more\"]"), i = r && !r.hidden ? r.getBoundingClientRect().width : 40, a = re({
439
+ for (let e of t) e.hidden || Sn.current.set(e.dataset.key ?? "", e.getBoundingClientRect().width);
440
+ let n = Number.parseFloat(getComputedStyle(e).columnGap) || 0, r = e.querySelector(":scope > [data-part=\"legend-more\"]"), i = r && !r.hidden ? r.getBoundingClientRect().width : 40, a = ie({
430
441
  units: X.map((e) => ({
431
- size: _n.current.get(e.key) ?? 0,
442
+ size: Sn.current.get(e.key) ?? 0,
432
443
  collapsible: !0
433
444
  })),
434
445
  available: e.clientWidth,
435
446
  gap: n,
436
447
  triggerSize: i
437
448
  });
438
- gn((e) => e.length === a.collapsed.length && e.every((e, t) => e === a.collapsed[t]) ? e : a.collapsed);
449
+ xn((e) => e.length === a.collapsed.length && e.every((e, t) => e === a.collapsed[t]) ? e : a.collapsed);
439
450
  };
440
- d(() => {
441
- xn();
451
+ ne(() => {
452
+ En();
442
453
  }, [
443
454
  X,
444
455
  k.legendOverflow,
445
456
  lt,
446
457
  A
447
458
  ]), u(() => {
448
- let e = nn.current;
459
+ let e = ln.current;
449
460
  if (!e || typeof ResizeObserver > "u") return;
450
- let t = new ResizeObserver(() => Sn.current());
461
+ let t = new ResizeObserver(() => Dn.current());
451
462
  return t.observe(e), () => t.disconnect();
452
463
  }, []);
453
- let Sn = f(xn);
454
- Sn.current = xn;
455
- let Cn = (e, t, n, r) => {
456
- let i = X.map((e) => e.key), a = Te(i, Kt, e.key, t);
457
- yn(e.key), qt(a, n, r), cn(O(a.includes(e.key) ? "hidden" : "shown", { series: e.label }));
458
- }, Z = A && R && _(R, A) ? A.key : null, wn = (e) => {
459
- if (!R) return "";
460
- let t = R.shape === "pie" ? R.series[0] : v(R, e.key);
464
+ let Dn = d(En);
465
+ Dn.current = En;
466
+ let On = (e, t, n, r) => {
467
+ let i = X.map((e) => e.key), a = Te(i, qt, e.key, t);
468
+ wn(e.key), Jt(a, n, r), pn(O(a.includes(e.key) ? "hidden" : "shown", { series: e.label }));
469
+ }, Z = A && L && _(L, A) ? A.key : null, kn = (e) => {
470
+ if (!L) return "";
471
+ let t = L.shape === "pie" ? L.series[0] : v(L, e.key);
461
472
  if (!t) return "";
462
- let n = R.shape === "pie" ? ce(R, e.key) : Z ? ce(R, Z) : Re(t.values), r = n >= 0 ? t.values[n] : null;
473
+ let n = L.shape === "pie" ? ce(L, e.key) : Z ? ce(L, Z) : ze(t.values), r = n >= 0 ? t.values[n] : null;
463
474
  return r == null ? "" : t.format(r);
464
- }, Tn = Ve("start"), En = X.filter((e, t) => !Y.includes(t)).map((e) => e.key), Dn = vn && En.includes(vn) ? vn : En[0] ?? null, On = (e, t, n) => {
465
- let r = R?.shape === "pie" ? R.series[0] : R ? v(R, e.key) : void 0, i = R?.shape === "pie" ? e.key === Z : A?.series === e.key && Z !== null, o = !n && Y.includes(t), c = /* @__PURE__ */ g(m, { children: [
466
- /* @__PURE__ */ h("span", {
475
+ }, An = He("start"), jn = X.filter((e, t) => !Y.includes(t)).map((e) => e.key), Mn = Cn && jn.includes(Cn) ? Cn : jn[0] ?? null, Nn = (e, t, n) => {
476
+ let r = L?.shape === "pie" ? L.series[0] : L ? v(L, e.key) : void 0, i = L?.shape === "pie" ? e.key === Z : A?.series === e.key && Z !== null, o = !n && Y.includes(t), c = /* @__PURE__ */ h(p, { children: [
477
+ /* @__PURE__ */ m("span", {
467
478
  "data-kind": e.kind === "area" || e.kind === "bar" || e.kind === "pie" ? "bar" : e.kind,
468
479
  "data-part": "legend-marker",
469
480
  ...r && r.stroke !== "solid" ? { "data-stroke": r.stroke } : {}
470
481
  }),
471
- /* @__PURE__ */ h("span", {
482
+ /* @__PURE__ */ m("span", {
472
483
  "data-part": "legend-label",
473
484
  title: e.label,
474
485
  children: e.label
475
486
  }),
476
- lt ? /* @__PURE__ */ h("span", {
487
+ lt ? /* @__PURE__ */ m("span", {
477
488
  "data-part": "legend-value",
478
- children: wn(e)
489
+ children: kn(e)
479
490
  }) : null
480
491
  ] }), l = {
481
492
  "data-part": "legend-item",
482
493
  "data-key": e.key,
483
- ...ze(e.color),
494
+ ...Be(e.color),
484
495
  ...i ? { "data-current": "" } : {},
485
496
  hidden: o,
486
- onPointerEnter: () => e.visible && K.current?.emphasize(e.key),
487
- onPointerLeave: () => K.current?.emphasize(null)
488
- }, u = bn ? /* @__PURE__ */ s(We, {
497
+ onPointerEnter: () => e.visible && G.current?.emphasize(e.key),
498
+ onPointerLeave: () => G.current?.emphasize(null)
499
+ }, u = Tn ? /* @__PURE__ */ s(Ke, {
489
500
  ...l,
490
501
  entry: e,
491
- focused: n || Dn === e.key,
502
+ focused: n || Mn === e.key,
492
503
  key: `${n ? "layer" : "row"}-${e.key}`,
493
- onActivate: (t, n, r) => Cn(e, t, n, r),
504
+ onActivate: (t, n, r) => On(e, t, n, r),
494
505
  onFocusEntry: () => {
495
- n || yn(e.key), e.visible && K.current?.emphasize(e.key);
506
+ n || wn(e.key), e.visible && G.current?.emphasize(e.key);
496
507
  },
497
- onBlurEntry: () => K.current?.emphasize(null)
508
+ onBlurEntry: () => G.current?.emphasize(null)
498
509
  }, c) : /* @__PURE__ */ s("span", {
499
510
  ...l,
500
511
  key: `${n ? "layer" : "row"}-${e.key}`,
501
512
  role: "listitem"
502
513
  }, c);
503
- return It ? /* @__PURE__ */ h(a, { children: It(e, l, u) }, `${n ? "layer" : "row"}-${e.key}`) : u;
504
- }, kn = (e) => {
514
+ return Lt ? /* @__PURE__ */ m(a, { children: Lt(e, l, u) }, `${n ? "layer" : "row"}-${e.key}`) : u;
515
+ }, Pn = (e) => {
505
516
  let t = e.target;
506
517
  if (t.closest("[data-part=\"menu\"]")) return;
507
518
  let n = [...e.currentTarget.querySelectorAll(":scope > button:not([hidden])")], r = n.indexOf(t);
508
519
  if (r === -1) return;
509
- let i = W.current ? getComputedStyle(W.current).direction === "rtl" : !1, a = e.key === "ArrowRight" ? i ? -1 : 1 : e.key === "ArrowLeft" ? i ? 1 : -1 : 0, o;
510
- a && (o = n[(r + a + n.length) % n.length]), e.key === "Home" && (o = n[0]), e.key === "End" && (o = n[n.length - 1]), o && (e.preventDefault(), yn(o.dataset.key ?? "__more"), o.focus());
511
- }, Q = Ve("end"), An = Ve("start", !1), jn = (e, t) => {
520
+ let i = U.current ? getComputedStyle(U.current).direction === "rtl" : !1, a = e.key === "ArrowRight" ? i ? -1 : 1 : e.key === "ArrowLeft" ? i ? 1 : -1 : 0, o;
521
+ a && (o = n[(r + a + n.length) % n.length]), e.key === "Home" && (o = n[0]), e.key === "End" && (o = n[n.length - 1]), o && (e.preventDefault(), wn(o.dataset.key ?? "__more"), o.focus());
522
+ }, Q = He("end"), Fn = He("start", !1), In = (e, t) => {
512
523
  let n = document.createElement("a");
513
524
  n.href = t, n.download = e, document.body.append(n), n.click(), n.remove();
514
- }, Mn = typeof S == "string" ? S : "chart";
515
- te(Ht, () => ({
516
- focus: () => G.current?.focus(),
517
- resetZoom: () => P(oe, "programmatic"),
518
- toDataURL: () => K.current?.toDataURL() ?? null,
519
- toCsv: () => R ? de(R, O) : ""
525
+ }, Ln = typeof b == "string" ? b : "chart";
526
+ te(Ut, () => ({
527
+ focus: () => W.current?.focus(),
528
+ resetZoom: () => P(g, "programmatic"),
529
+ toDataURL: () => G.current?.toDataURL() ?? null,
530
+ toCsv: () => L ? de(L, O) : ""
520
531
  }), [
521
- R,
532
+ L,
522
533
  O,
523
534
  P
524
535
  ]);
525
- let Nn = B ? O("loading") : z ? O("error") : R ? he(R, O) : "", Pn = `${D}-title`, Fn = `${D}-description`, In = `${D}-summary`, Ln = L.series.some((e) => e.kind === "pie") ? "pie" : L.series.every((e) => e.kind === "line" || e.kind === "area") ? "line" : "bar", $ = F && H && R ? ue(R, O) : null, Rn = () => {
526
- $t(null), gt?.();
527
- }, zn = S !== void 0 || w !== void 0 || Xe !== void 0 || k.toolbar !== "none" ? /* @__PURE__ */ g("figcaption", {
536
+ let Rn = z ? O("loading") : R ? O("error") : L ? he(L, O) : "", zn = `${D}-title`, Bn = `${D}-description`, Vn = `${D}-summary`, Hn = nn.series.some((e) => e.kind === "pie") ? "pie" : nn.series.every((e) => e.kind === "line" || e.kind === "area") ? "line" : "bar", $ = F && V && L ? ue(L, O) : null, Un = () => {
537
+ on(null), _t?.();
538
+ }, Wn = b !== void 0 || C !== void 0 || T !== void 0 || k.toolbar !== "none" ? /* @__PURE__ */ h("figcaption", {
528
539
  "data-part": "header",
529
540
  children: [
530
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("div", { children: [S === void 0 ? null : /* @__PURE__ */ h("span", {
541
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("div", { children: [b === void 0 ? null : /* @__PURE__ */ m("span", {
531
542
  "data-part": "title",
532
- id: Pn,
533
- children: S
534
- }), Ye === void 0 ? null : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
535
- ...An.controlProps,
543
+ id: zn,
544
+ children: b
545
+ }), Ge === void 0 ? null : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("button", {
546
+ ...Fn.controlProps,
536
547
  "aria-controls": `${D}-help`,
537
548
  "aria-label": O("help"),
538
549
  "data-part": "help",
539
550
  type: "button",
540
- children: /* @__PURE__ */ h(t, { children: /* @__PURE__ */ h(e, { name: "circle-info" }) })
541
- }), /* @__PURE__ */ h("div", {
542
- ...An.layerProps,
551
+ children: /* @__PURE__ */ m(t, { children: /* @__PURE__ */ m(e, { name: "circle-info" }) })
552
+ }), /* @__PURE__ */ m("div", {
553
+ ...Fn.layerProps,
543
554
  "data-part": "help-content",
544
555
  id: `${D}-help`,
545
556
  role: "note",
546
- children: Ye
547
- })] })] }), w === void 0 ? null : /* @__PURE__ */ h("span", {
557
+ children: Ge
558
+ })] })] }), C === void 0 ? null : /* @__PURE__ */ m("span", {
548
559
  "data-part": "description",
549
- id: Fn,
550
- children: w
560
+ id: Bn,
561
+ children: C
551
562
  })] }),
552
- Xe === void 0 ? null : /* @__PURE__ */ h("div", {
563
+ T === void 0 ? null : /* @__PURE__ */ m("div", {
553
564
  "data-part": "actions",
554
- children: Xe
565
+ children: T
555
566
  }),
556
- k.toolbar === "none" ? null : /* @__PURE__ */ g("div", {
557
- "aria-hidden": !H || void 0,
558
- "aria-label": H ? O("toolbar") : void 0,
567
+ k.toolbar === "none" ? null : /* @__PURE__ */ h("div", {
568
+ "aria-hidden": !V || void 0,
569
+ "aria-label": V ? O("toolbar") : void 0,
559
570
  "data-part": "toolbar",
560
- "data-waiting": H ? void 0 : "",
561
- inert: !H,
562
- role: H ? "toolbar" : void 0,
571
+ "data-waiting": V ? void 0 : "",
572
+ inert: !V,
573
+ role: V ? "toolbar" : void 0,
563
574
  children: [
564
- R && T && !ye(N) && R.shape === "cartesian" ? /* @__PURE__ */ h(Ge, {
575
+ L && pt && !ye(N) && L.shape === "cartesian" ? /* @__PURE__ */ m(qe, {
565
576
  label: O("resetZoom"),
566
577
  onPress: (e, t) => {
567
- P(oe, "clear", t), cn(_e(R, oe, O)), G.current?.focus();
578
+ P(g, "clear", t), pn(_e(L, g, O)), W.current?.focus();
568
579
  },
569
580
  glyph: "rotate-ccw",
570
581
  part: "zoom-reset"
571
582
  }) : null,
572
- /* @__PURE__ */ h(Ge, {
583
+ /* @__PURE__ */ m(qe, {
573
584
  label: O("tableView"),
574
- onPress: (e, t) => Yt(!F, e, t),
585
+ onPress: (e, t) => Xt(!F, e, t),
575
586
  glyph: "file-spreadsheet",
576
587
  part: "view-toggle",
577
588
  pressed: F
578
589
  }),
579
- /* @__PURE__ */ h(Ge, {
590
+ /* @__PURE__ */ m(qe, {
580
591
  label: O(I ? "exitFullscreen" : "fullscreen"),
581
592
  glyph: I ? "minimize" : "maximize",
582
- onPress: (e, t) => pn(e, t),
593
+ onPress: (e, t) => vn(e, t),
583
594
  part: "fullscreen-toggle"
584
595
  }),
585
- /* @__PURE__ */ h("button", {
596
+ /* @__PURE__ */ m("button", {
586
597
  ...Q.controlProps,
587
598
  "aria-haspopup": "menu",
588
599
  "aria-label": O("more"),
589
600
  "data-part": "menu-trigger",
590
601
  title: O("more"),
591
602
  type: "button",
592
- children: /* @__PURE__ */ h(t, { children: /* @__PURE__ */ h(e, { name: "ellipsis" }) })
603
+ children: /* @__PURE__ */ m(t, { children: /* @__PURE__ */ m(e, { name: "ellipsis" }) })
593
604
  }),
594
- /* @__PURE__ */ g("div", {
605
+ /* @__PURE__ */ h("div", {
595
606
  ...Q.layerProps,
596
607
  "aria-label": O("more"),
597
608
  "data-part": "menu",
598
609
  role: "menu",
599
610
  children: [
600
- /* @__PURE__ */ h(C, {
611
+ /* @__PURE__ */ m(w, {
601
612
  action: "view",
602
613
  label: O("tableView"),
603
614
  onPress: (e, t) => {
604
- Q.close(), Yt(!F, e, t);
615
+ Q.close(), Xt(!F, e, t);
605
616
  }
606
617
  }),
607
- /* @__PURE__ */ h(C, {
618
+ /* @__PURE__ */ m(w, {
608
619
  action: "fullscreen",
609
620
  label: O(I ? "exitFullscreen" : "fullscreen"),
610
621
  onPress: (e, t) => {
611
- Q.close(), pn(e, t);
622
+ Q.close(), vn(e, t);
612
623
  }
613
624
  }),
614
- /* @__PURE__ */ h(C, {
625
+ /* @__PURE__ */ m(w, {
615
626
  action: "csv",
616
627
  label: O("downloadCsv"),
617
628
  onPress: () => {
618
- Q.close(), R && jn(`${Mn}.csv`, `data:text/csv;charset=utf-8,${encodeURIComponent(de(R, O))}`);
629
+ Q.close(), L && In(`${Ln}.csv`, `data:text/csv;charset=utf-8,${encodeURIComponent(de(L, O))}`);
619
630
  }
620
631
  }),
621
- /* @__PURE__ */ h(C, {
632
+ /* @__PURE__ */ m(w, {
622
633
  action: "image",
623
634
  label: O("downloadImage"),
624
635
  onPress: () => {
625
636
  Q.close();
626
- let e = K.current?.toDataURL();
627
- e && jn(`${Mn}.${e.startsWith("data:image/svg") ? "svg" : "png"}`, e);
637
+ let e = G.current?.toDataURL();
638
+ e && In(`${Ln}.${e.startsWith("data:image/svg") ? "svg" : "png"}`, e);
628
639
  }
629
640
  })
630
641
  ]
@@ -632,41 +643,41 @@ function S(i) {
632
643
  ]
633
644
  })
634
645
  ]
635
- }) : null, Bn = st === !1 ? null : /* @__PURE__ */ h("div", {
636
- "aria-label": B && (!R || R.shape === "pie") ? void 0 : O("legend"),
646
+ }) : null, Gn = st === !1 ? null : /* @__PURE__ */ m("div", {
647
+ "aria-label": z && (!L || L.shape === "pie") ? void 0 : O("legend"),
637
648
  "data-part": "legend",
638
- onKeyDown: kn,
639
- ref: nn,
640
- role: B && (!R || R.shape === "pie") ? void 0 : bn ? "toolbar" : "list",
641
- children: B && (!R || R.shape === "pie") ? /* @__PURE__ */ g(m, { children: [
642
- /* @__PURE__ */ h(Ke, {}),
643
- /* @__PURE__ */ h(Ke, {}),
644
- /* @__PURE__ */ h(Ke, {})
645
- ] }) : /* @__PURE__ */ g(m, { children: [
646
- X.map((e, t) => On(e, t, !1)),
647
- /* @__PURE__ */ h("button", {
648
- ...Tn.controlProps,
649
+ onKeyDown: Pn,
650
+ ref: ln,
651
+ role: z && (!L || L.shape === "pie") ? void 0 : Tn ? "toolbar" : "list",
652
+ children: z && (!L || L.shape === "pie") ? /* @__PURE__ */ h(p, { children: [
653
+ /* @__PURE__ */ m(Je, {}),
654
+ /* @__PURE__ */ m(Je, {}),
655
+ /* @__PURE__ */ m(Je, {})
656
+ ] }) : /* @__PURE__ */ h(p, { children: [
657
+ X.map((e, t) => Nn(e, t, !1)),
658
+ /* @__PURE__ */ m("button", {
659
+ ...An.controlProps,
649
660
  "aria-haspopup": "true",
650
- "aria-label": O("legendMore", { series: new Intl.ListFormat(x ?? Gt, { type: "unit" }).format(Y.map((e) => X[e]?.label ?? "")) }),
661
+ "aria-label": O("legendMore", { series: new Intl.ListFormat(y ?? Kt, { type: "unit" }).format(Y.map((e) => X[e]?.label ?? "")) }),
651
662
  "data-part": "legend-more",
652
663
  hidden: Y.length === 0,
653
- tabIndex: Dn === null ? 0 : -1,
664
+ tabIndex: Mn === null ? 0 : -1,
654
665
  type: "button",
655
666
  children: O("moreSeries", { count: Y.length })
656
667
  }),
657
- /* @__PURE__ */ h("div", {
658
- ...Tn.layerProps,
668
+ /* @__PURE__ */ m("div", {
669
+ ...An.layerProps,
659
670
  "aria-label": O("legend"),
660
671
  "data-part": "menu",
661
672
  role: "group",
662
673
  children: Y.map((e) => {
663
674
  let t = X[e];
664
- return t ? On(t, e, !0) : null;
675
+ return t ? Nn(t, e, !0) : null;
665
676
  })
666
677
  })
667
678
  ] })
668
- }), Vn = {
669
- ...Wt,
679
+ }), Kn = {
680
+ ...Gt,
670
681
  "data-ui": "chart",
671
682
  "data-part": "root",
672
683
  "data-size": k.size,
@@ -674,151 +685,151 @@ function S(i) {
674
685
  "data-palette": k.palette,
675
686
  "data-toolbar": k.toolbar,
676
687
  "data-legend-overflow": k.legendOverflow,
677
- ...B ? { "data-loading": "" } : {},
688
+ ...z ? { "data-loading": "" } : {},
678
689
  ...I ? { "data-fullscreen": "" } : {},
679
- onKeyDown: hn,
690
+ onKeyDown: bn,
680
691
  ref: (e) => {
681
- W.current = e, He(Ut, e);
692
+ U.current = e, Ue(Wt, e);
682
693
  },
683
- children: /* @__PURE__ */ g(m, { children: [
684
- zn,
685
- Bn,
686
- /* @__PURE__ */ g("div", {
687
- "aria-busy": B || void 0,
688
- "aria-describedby": w === void 0 ? In : `${Fn} ${In}`,
689
- "aria-label": S === void 0 ? Wt["aria-label"] ?? O("roledescription") : void 0,
690
- "aria-labelledby": S === void 0 ? void 0 : Pn,
694
+ children: /* @__PURE__ */ h(p, { children: [
695
+ Wn,
696
+ Gn,
697
+ /* @__PURE__ */ h("div", {
698
+ "aria-busy": z || void 0,
699
+ "aria-describedby": C === void 0 ? Vn : `${Bn} ${Vn}`,
700
+ "aria-label": b === void 0 ? Gt["aria-label"] ?? O("roledescription") : void 0,
701
+ "aria-labelledby": b === void 0 ? void 0 : zn,
691
702
  "aria-roledescription": O("roledescription"),
692
703
  "data-part": "plot",
693
704
  onBlur: (e) => j(null, "blur", e.nativeEvent),
694
- onFocus: fn,
695
- onKeyDown: dn,
696
- ref: G,
705
+ onFocus: _n,
706
+ onKeyDown: gn,
707
+ ref: W,
697
708
  role: "group",
698
709
  tabIndex: 0,
699
710
  children: [
700
- /* @__PURE__ */ h("div", {
711
+ /* @__PURE__ */ m("div", {
701
712
  "data-part": "crosshair",
702
- hidden: !q.crosshair,
703
- ...q.crosshair?.isBand ? { "data-band": "" } : {},
704
- "data-orientation": R?.orientation ?? "vertical",
705
- style: q.crosshair ? Be({
706
- "--slotted-chart-x": q.crosshair.x,
707
- "--slotted-chart-y": q.crosshair.y,
708
- "--slotted-chart-band-start": q.crosshair.band.start,
709
- "--slotted-chart-band-size": q.crosshair.band.size,
710
- "--slotted-chart-frame-start": q.crosshair.frame.start,
711
- "--slotted-chart-frame-size": q.crosshair.frame.size
713
+ hidden: !K.crosshair,
714
+ ...K.crosshair?.isBand ? { "data-band": "" } : {},
715
+ "data-orientation": L?.orientation ?? "vertical",
716
+ style: K.crosshair ? Ve({
717
+ "--slotted-chart-x": K.crosshair.x,
718
+ "--slotted-chart-y": K.crosshair.y,
719
+ "--slotted-chart-band-start": K.crosshair.band.start,
720
+ "--slotted-chart-band-size": K.crosshair.band.size,
721
+ "--slotted-chart-frame-start": K.crosshair.frame.start,
722
+ "--slotted-chart-frame-size": K.crosshair.frame.size
712
723
  }) : void 0
713
724
  }),
714
- /* @__PURE__ */ h("div", {
725
+ /* @__PURE__ */ m("div", {
715
726
  "aria-hidden": "true",
716
727
  "data-part": "canvas",
717
- hidden: !V,
718
- ref: en
728
+ hidden: !B,
729
+ ref: sn
719
730
  }),
720
- q.markers.map((e) => /* @__PURE__ */ h("div", {
731
+ K.markers.map((e) => /* @__PURE__ */ m("div", {
721
732
  "aria-hidden": "true",
722
733
  "data-part": "marker",
723
- ...ze(e.color),
734
+ ...Be(e.color),
724
735
  ...e.selected ? { "data-selected": "" } : {},
725
736
  ...e.current ? { "data-current": "" } : {},
726
- style: Be({
737
+ style: Ve({
727
738
  "--slotted-chart-x": e.at.x,
728
739
  "--slotted-chart-y": e.at.y
729
740
  })
730
741
  }, e.key)),
731
- /* @__PURE__ */ h("div", {
742
+ /* @__PURE__ */ m("div", {
732
743
  "aria-hidden": "true",
733
744
  "data-part": "tooltip",
734
- ref: tn,
735
- ...q.tooltip ? { "data-open": "" } : {},
736
- ...q.docked ? { "data-docked": "" } : {},
737
- children: q.tooltip && R ? Ft?.(q.tooltip, R) ?? /* @__PURE__ */ h(Ue, {
738
- context: q.tooltip,
745
+ ref: cn,
746
+ ...K.tooltip ? { "data-open": "" } : {},
747
+ ...K.docked ? { "data-docked": "" } : {},
748
+ children: K.tooltip && L ? It?.(K.tooltip, L) ?? /* @__PURE__ */ m(We, {
749
+ context: K.tooltip,
739
750
  indicator: k.tooltip.indicator,
740
- model: R,
751
+ model: L,
741
752
  totalLabel: O("total")
742
753
  }) : null
743
754
  }),
744
- V && R?.shape === "pie" && (R.series[0]?.innerRadius ?? 0) > 0 ? /* @__PURE__ */ h("div", {
755
+ B && L?.shape === "pie" && (L.series[0]?.innerRadius ?? 0) > 0 ? /* @__PURE__ */ m("div", {
745
756
  "aria-hidden": "true",
746
757
  "data-part": "center",
747
- children: Lt?.(R) ?? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
758
+ children: Rt?.(L) ?? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
748
759
  "data-part": "center-value",
749
- children: R.series[0].format(R.total)
750
- }), /* @__PURE__ */ h("span", {
760
+ children: L.series[0].format(L.total)
761
+ }), /* @__PURE__ */ m("span", {
751
762
  "data-part": "center-label",
752
763
  children: O("total")
753
764
  })] })
754
765
  }) : null,
755
- $ ? /* @__PURE__ */ h("div", {
756
- "aria-labelledby": S === void 0 ? void 0 : Pn,
766
+ $ ? /* @__PURE__ */ m("div", {
767
+ "aria-labelledby": b === void 0 ? void 0 : zn,
757
768
  "data-part": "table-region",
758
769
  role: "region",
759
770
  tabIndex: 0,
760
- children: /* @__PURE__ */ g("table", {
771
+ children: /* @__PURE__ */ h("table", {
761
772
  "data-part": "table",
762
773
  children: [
763
- /* @__PURE__ */ h("caption", { children: $.omitted ? typeof S == "string" ? O("truncatedCaption", {
764
- title: S,
774
+ /* @__PURE__ */ m("caption", { children: $.omitted ? typeof b == "string" ? O("truncatedCaption", {
775
+ title: b,
765
776
  shown: $.rows.length,
766
777
  count: $.rows.length + $.omitted
767
778
  }) : O("truncated", {
768
779
  shown: $.rows.length,
769
780
  count: $.rows.length + $.omitted
770
- }) : typeof S == "string" ? S : null }),
771
- /* @__PURE__ */ h("thead", { children: /* @__PURE__ */ h("tr", { children: $.columns.map((e, t) => /* @__PURE__ */ s("th", {
781
+ }) : typeof b == "string" ? b : null }),
782
+ /* @__PURE__ */ m("thead", { children: /* @__PURE__ */ m("tr", { children: $.columns.map((e, t) => /* @__PURE__ */ s("th", {
772
783
  ...t > 0 ? { "data-numeric": "" } : {},
773
784
  key: e.key,
774
785
  scope: "col"
775
786
  }, e.label)) }) }),
776
- /* @__PURE__ */ h("tbody", { children: $.rows.map((e) => /* @__PURE__ */ s("tr", {
787
+ /* @__PURE__ */ m("tbody", { children: $.rows.map((e) => /* @__PURE__ */ s("tr", {
777
788
  ...e.key === Z ? { "data-current": "" } : {},
778
789
  key: e.key
779
- }, e.cells.map((e, t) => t === 0 ? /* @__PURE__ */ h("th", {
790
+ }, e.cells.map((e, t) => t === 0 ? /* @__PURE__ */ m("th", {
780
791
  scope: "row",
781
792
  children: e.text
782
- }, "category") : /* @__PURE__ */ h("td", {
793
+ }, "category") : /* @__PURE__ */ m("td", {
783
794
  "data-numeric": "",
784
795
  children: e.text
785
796
  }, t)))) })
786
797
  ]
787
798
  })
788
799
  }) : null,
789
- B ? /* @__PURE__ */ h(qe, { kind: Ln }) : null,
790
- !B && z ? /* @__PURE__ */ h("div", {
800
+ z ? /* @__PURE__ */ m(Ye, { kind: Hn }) : null,
801
+ !z && R ? /* @__PURE__ */ m("div", {
791
802
  "data-part": "error",
792
- children: zt?.() ?? /* @__PURE__ */ h(Je, {
793
- action: gt || Qt ? O("retry") : void 0,
794
- onAction: Rn,
803
+ children: Bt?.() ?? /* @__PURE__ */ m(Xe, {
804
+ action: _t || an ? O("retry") : void 0,
805
+ onAction: Un,
795
806
  status: "error",
796
807
  text: O("error")
797
808
  })
798
809
  }) : null,
799
- !B && !z && R?.empty ? /* @__PURE__ */ h("div", {
810
+ !z && !R && L?.empty ? /* @__PURE__ */ m("div", {
800
811
  "data-part": "empty",
801
- children: Rt?.(R.empty) ?? /* @__PURE__ */ h(Je, {
802
- action: R.empty === "all-hidden" ? O("showAll") : void 0,
803
- onAction: (e) => qt(Me, "pointer", e),
804
- status: R.empty === "all-hidden" ? "no-results" : "empty",
805
- text: R.empty === "all-hidden" ? O("allHidden") : O("noData")
812
+ children: zt?.(L.empty) ?? /* @__PURE__ */ m(Xe, {
813
+ action: L.empty === "all-hidden" ? O("showAll") : void 0,
814
+ onAction: (e) => Jt(Ne, "pointer", e),
815
+ status: L.empty === "all-hidden" ? "no-results" : "empty",
816
+ text: L.empty === "all-hidden" ? O("allHidden") : O("noData")
806
817
  })
807
818
  }) : null,
808
- /* @__PURE__ */ h("p", {
819
+ /* @__PURE__ */ m("p", {
809
820
  "data-part": "summary",
810
- id: In,
811
- children: Nn
821
+ id: Vn,
822
+ children: Rn
812
823
  })
813
824
  ]
814
825
  })
815
826
  ] })
816
827
  };
817
- return Bt ? Bt(Vn) : /* @__PURE__ */ h("figure", { ...Vn });
828
+ return Vt ? Vt(Kn) : /* @__PURE__ */ m("figure", { ...Kn });
818
829
  }
819
- function We({ children: e, entry: t, focused: n, onActivate: r, onFocusEntry: i, onBlurEntry: a, ...o }) {
820
- let [s, c] = x();
821
- return /* @__PURE__ */ h("button", {
830
+ function Ke({ children: e, entry: t, focused: n, onActivate: r, onFocusEntry: i, onBlurEntry: a, ...o }) {
831
+ let [s, c] = C();
832
+ return /* @__PURE__ */ m("button", {
822
833
  ...o,
823
834
  "aria-pressed": t.visible,
824
835
  ...t.visible ? { "data-pressed": "" } : {},
@@ -834,9 +845,9 @@ function We({ children: e, entry: t, focused: n, onActivate: r, onFocusEntry: i,
834
845
  children: e
835
846
  });
836
847
  }
837
- function Ge({ glyph: n, label: r, onPress: i, part: a, pressed: o }) {
838
- let [s, c] = x();
839
- return /* @__PURE__ */ h("button", {
848
+ function qe({ glyph: n, label: r, onPress: i, part: a, pressed: o }) {
849
+ let [s, c] = C();
850
+ return /* @__PURE__ */ m("button", {
840
851
  "aria-label": r,
841
852
  ...o === void 0 ? {} : {
842
853
  "aria-pressed": o,
@@ -847,12 +858,12 @@ function Ge({ glyph: n, label: r, onPress: i, part: a, pressed: o }) {
847
858
  ref: s,
848
859
  title: r,
849
860
  type: "button",
850
- children: /* @__PURE__ */ h(t, { children: /* @__PURE__ */ h(e, { name: n }) })
861
+ children: /* @__PURE__ */ m(t, { children: /* @__PURE__ */ m(e, { name: n }) })
851
862
  });
852
863
  }
853
- function C({ action: e, label: t, onPress: n }) {
854
- let [r, i] = x();
855
- return /* @__PURE__ */ h("button", {
864
+ function w({ action: e, label: t, onPress: n }) {
865
+ let [r, i] = C();
866
+ return /* @__PURE__ */ m("button", {
856
867
  "data-action": e,
857
868
  "data-part": "menu-item",
858
869
  onClick: (e) => n(i(), e.nativeEvent),
@@ -862,8 +873,8 @@ function C({ action: e, label: t, onPress: n }) {
862
873
  children: t
863
874
  });
864
875
  }
865
- function w({ shape: e = "block" }) {
866
- return /* @__PURE__ */ h("span", {
876
+ function T({ shape: e = "block" }) {
877
+ return /* @__PURE__ */ m("span", {
867
878
  "aria-hidden": "true",
868
879
  "data-animation": "shimmer",
869
880
  "data-loading": "",
@@ -873,30 +884,30 @@ function w({ shape: e = "block" }) {
873
884
  "data-ui": "skeleton"
874
885
  });
875
886
  }
876
- function Ke() {
877
- return /* @__PURE__ */ h(w, {});
887
+ function Je() {
888
+ return /* @__PURE__ */ m(T, {});
878
889
  }
879
- function qe({ kind: e }) {
880
- let t = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ h(w, {}, t));
881
- return /* @__PURE__ */ h("div", {
890
+ function Ye({ kind: e }) {
891
+ let t = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ m(T, {}, t));
892
+ return /* @__PURE__ */ m("div", {
882
893
  "aria-hidden": "true",
883
894
  "data-kind": e,
884
895
  "data-part": "skeleton",
885
- children: /* @__PURE__ */ h("div", {
896
+ children: /* @__PURE__ */ m("div", {
886
897
  "data-animation": "shimmer",
887
898
  "data-loading": "",
888
899
  "data-part": "region",
889
900
  "data-ui": "skeleton",
890
- children: e === "pie" ? /* @__PURE__ */ h(w, { shape: "circle" }) : /* @__PURE__ */ g(m, { children: [
891
- /* @__PURE__ */ h("div", {
901
+ children: e === "pie" ? /* @__PURE__ */ m(T, { shape: "circle" }) : /* @__PURE__ */ h(p, { children: [
902
+ /* @__PURE__ */ m("div", {
892
903
  "data-skeleton": "y",
893
904
  children: t(5)
894
905
  }),
895
- /* @__PURE__ */ h("div", {
906
+ /* @__PURE__ */ m("div", {
896
907
  "data-skeleton": "marks",
897
908
  children: t(e === "bar" ? 7 : 2)
898
909
  }),
899
- /* @__PURE__ */ h("div", {
910
+ /* @__PURE__ */ m("div", {
900
911
  "data-skeleton": "x",
901
912
  children: t(6)
902
913
  })
@@ -904,8 +915,8 @@ function qe({ kind: e }) {
904
915
  })
905
916
  });
906
917
  }
907
- function Je({ action: e, onAction: t, status: n, text: r }) {
908
- return /* @__PURE__ */ g("section", {
918
+ function Xe({ action: e, onAction: t, status: n, text: r }) {
919
+ return /* @__PURE__ */ h("section", {
909
920
  "data-align": "center",
910
921
  "data-live": "polite",
911
922
  "data-part": "root",
@@ -913,21 +924,21 @@ function Je({ action: e, onAction: t, status: n, text: r }) {
913
924
  "data-status": n,
914
925
  "data-ui": "result-state",
915
926
  children: [
916
- /* @__PURE__ */ h("div", {
927
+ /* @__PURE__ */ m("div", {
917
928
  "aria-hidden": "true",
918
929
  "data-part": "media"
919
930
  }),
920
- /* @__PURE__ */ h("div", {
931
+ /* @__PURE__ */ m("div", {
921
932
  "data-part": "content",
922
933
  role: "status",
923
- children: /* @__PURE__ */ h("div", {
934
+ children: /* @__PURE__ */ m("div", {
924
935
  "data-part": "title",
925
936
  children: r
926
937
  })
927
938
  }),
928
- e ? /* @__PURE__ */ h("div", {
939
+ e ? /* @__PURE__ */ m("div", {
929
940
  "data-part": "actions",
930
- children: /* @__PURE__ */ h("button", {
941
+ children: /* @__PURE__ */ m("button", {
931
942
  "data-part": "root",
932
943
  "data-size": "sm",
933
944
  "data-tone": "secondary",
@@ -935,7 +946,7 @@ function Je({ action: e, onAction: t, status: n, text: r }) {
935
946
  "data-variant": "outline",
936
947
  onClick: (e) => t(e.nativeEvent),
937
948
  type: "button",
938
- children: /* @__PURE__ */ h("span", {
949
+ children: /* @__PURE__ */ m("span", {
939
950
  "data-part": "label",
940
951
  children: e
941
952
  })
@@ -945,4 +956,4 @@ function Je({ action: e, onAction: t, status: n, text: r }) {
945
956
  });
946
957
  }
947
958
  //#endregion
948
- export { Ae as a, je as i, S as n, Ue as r, ke as t };
959
+ export { je as a, Me as i, Ge as n, We as r, ke as t };