@mechane-ai/elements 0.4.0 → 0.5.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.
Files changed (46) hide show
  1. package/README.md +41 -29
  2. package/dist/ai.js +6 -6
  3. package/dist/assets/stylex.css +92 -0
  4. package/dist/{categorical-values-cMX7Mykq.js → categorical-values-BfAEQUd0.js} +1 -1
  5. package/dist/{chart-input-qnM44oen.js → chart-input--VSrlMl-.js} +1 -1
  6. package/dist/charts/cartesian.js +49 -49
  7. package/dist/charts/distribution.js +1 -1
  8. package/dist/charts/graph.js +1 -1
  9. package/dist/charts/hierarchy.js +2 -2
  10. package/dist/charts/matrix.js +1 -1
  11. package/dist/collections.js +439 -214
  12. package/dist/content/diff.js +13 -11
  13. package/dist/content/markdown.js +151 -80
  14. package/dist/content/tree.js +1 -1
  15. package/dist/csp.js +1 -0
  16. package/dist/feedback.js +1 -1
  17. package/dist/forms.js +1 -1
  18. package/dist/layout.js +210 -136
  19. package/dist/navigation/commands.js +1 -1
  20. package/dist/navigation.js +36 -11
  21. package/dist/packages/collections/src/collection-scroll.d.ts +19 -0
  22. package/dist/packages/collections/src/data-table.d.ts +20 -3
  23. package/dist/packages/collections/src/index.d.ts +3 -1
  24. package/dist/packages/collections/src/use-end-reached.d.ts +9 -0
  25. package/dist/packages/content/src/markdown/index.d.ts +2 -0
  26. package/dist/packages/content/src/markdown/markdown-options.d.ts +2 -0
  27. package/dist/packages/content/src/markdown/markdown-preview.d.ts +5 -0
  28. package/dist/packages/content/src/markdown/markdown.d.ts +4 -1
  29. package/dist/packages/feedback/src/async-region.d.ts +17 -0
  30. package/dist/packages/feedback/src/index.d.ts +2 -0
  31. package/dist/packages/feedback/src/skeleton.d.ts +4 -3
  32. package/dist/packages/forms/src/index.d.ts +2 -0
  33. package/dist/packages/forms/src/settings-section.d.ts +7 -0
  34. package/dist/packages/foundations/src/csp/index.d.ts +2 -0
  35. package/dist/packages/layout/src/app-shell.d.ts +2 -1
  36. package/dist/packages/layout/src/frame.stylex.d.ts +2 -0
  37. package/dist/packages/layout/src/index.d.ts +2 -0
  38. package/dist/packages/layout/src/record-page.d.ts +42 -0
  39. package/dist/packages/layout/src/sidebar.d.ts +1 -0
  40. package/dist/packages/navigation/src/index.d.ts +2 -0
  41. package/dist/packages/navigation/src/page-navigation.d.ts +14 -0
  42. package/dist/{pierre-tree-qZVvI5c1.js → pierre-tree-LY7PGy-7.js} +1 -1
  43. package/dist/src-CbJTK9oP.js +360 -0
  44. package/dist/{src-CvpS9XIR.js → src-CjnbzSgq.js} +353 -336
  45. package/package.json +5 -1
  46. package/dist/src-BfvOOeA3.js +0 -272
package/README.md CHANGED
@@ -6,6 +6,9 @@ receive values and callbacks; applications own routing, data, identity, and pers
6
6
 
7
7
  ## Install
8
8
 
9
+ Install [Elements from npm](https://www.npmjs.com/package/@mechane-ai/elements). React and React DOM are peer
10
+ dependencies.
11
+
9
12
  ```sh
10
13
  pnpm add @mechane-ai/elements react react-dom
11
14
  ```
@@ -42,35 +45,36 @@ comes after it. Application styles and StyleX themes can override that layer.
42
45
 
43
46
  Every path below belongs to `@mechane-ai/elements`. There is one package, version, and stylesheet.
44
47
 
45
- | Entry | Responsibility |
46
- | ---------------------- | ------------------------------------------------------------------------ |
47
- | Root | Buttons, text, surfaces, disclosure, Avatar, and CopyValue. |
48
- | `/forms` | Fields, inputs, selection, file picking, and SettingsRow. |
49
- | `/forms/dates` | Civil-date calendars and range selection. |
50
- | `/overlays` | Dialog, Drawer, Menu, Popover, Preview, Tooltip, and AlertDialog. |
51
- | `/feedback` | Loading, skeletons, progress, meters, notices, empty states, and toasts. |
52
- | `/navigation` | Tabs, breadcrumbs, skip links, and shortcut labels. |
53
- | `/navigation/commands` | Command palette and scoped application-owned shortcuts. |
54
- | `/layout` | Application shell, sidebar, toolbars, detail pages, and resizable panes. |
55
- | `/collections` | Tables, inspectors, collection controls, metrics, and timestamps. |
56
- | `/content` | Trace, JSON, recorded logs, and stack traces. |
57
- | `/content/link` | Safe content links without a renderer dependency. |
58
- | `/content/markdown` | Completed and streaming Markdown. |
59
- | `/content/code` | Source-preserving code highlighting. |
60
- | `/content/diff` | File changes and patches. |
61
- | `/content/tree` | File paths, statuses, and controlled selection. |
62
- | `/ai` | Conversations, messages, prompts, approvals, sources, and citations. |
63
- | `/charts` | Shared frames, legends, selection, and category types. |
64
- | `/charts/cartesian` | Lines, areas, sparklines, small multiples, bars, and scatter plots. |
65
- | `/charts/distribution` | Histograms, cumulative distributions, intervals, and ranked values. |
66
- | `/charts/matrix` | Matrices, token heatmaps, and color legends. |
67
- | `/charts/graph` | Supplied relationships and node selection. |
68
- | `/charts/hierarchy` | Treemaps. |
69
- | `/charts/timeline` | Waterfall intervals and instants. |
70
- | `/theme` | Light and dark theme props. |
71
- | `/tokens` | Compiled token references for runtime styles. |
72
- | `/tokens.stylex` | Direct definitions for StyleX authoring and themes. |
73
- | `/styles.css` | Component styles and token defaults. |
48
+ | Entry | Responsibility |
49
+ | ---------------------- | --------------------------------------------------------------------------------- |
50
+ | Root | Buttons, text, surfaces, disclosure, Avatar, and CopyValue. |
51
+ | `/forms` | Fields, inputs, selection, file picking, and settings sections. |
52
+ | `/forms/dates` | Civil-date calendars and range selection. |
53
+ | `/overlays` | Dialog, Drawer, Menu, Popover, Preview, Tooltip, and AlertDialog. |
54
+ | `/feedback` | Async regions, skeletons, progress, meters, notices, empty states, and toasts. |
55
+ | `/navigation` | Tabs, page navigation, breadcrumbs, skip links, and shortcut labels. |
56
+ | `/navigation/commands` | Command palette and scoped application-owned shortcuts. |
57
+ | `/layout` | Application shell, sidebar, toolbars, compound record pages, and resizable panes. |
58
+ | `/collections` | Tables, inspectors, collection controls, metrics, and timestamps. |
59
+ | `/content` | Trace, JSON, recorded logs, and stack traces. |
60
+ | `/content/link` | Safe content links without a renderer dependency. |
61
+ | `/content/markdown` | Completed and streaming Markdown, embedded headings, and inert previews. |
62
+ | `/content/code` | Source-preserving code highlighting. |
63
+ | `/content/diff` | File changes and patches. |
64
+ | `/content/tree` | File paths, statuses, and controlled selection. |
65
+ | `/ai` | Conversations, messages, prompts, approvals, sources, and citations. |
66
+ | `/charts` | Shared frames, legends, selection, and category types. |
67
+ | `/charts/cartesian` | Lines, areas, sparklines, small multiples, bars, and scatter plots. |
68
+ | `/charts/distribution` | Histograms, cumulative distributions, intervals, and ranked values. |
69
+ | `/charts/matrix` | Matrices, token heatmaps, and color legends. |
70
+ | `/charts/graph` | Supplied relationships and node selection. |
71
+ | `/charts/hierarchy` | Treemaps. |
72
+ | `/charts/timeline` | Waterfall intervals and instants. |
73
+ | `/theme` | Light and dark theme props. |
74
+ | `/csp` | Application-supplied content security policy configuration. |
75
+ | `/tokens` | Compiled token references for runtime styles. |
76
+ | `/tokens.stylex` | Direct definitions for StyleX authoring and themes. |
77
+ | `/styles.css` | Component styles and token defaults. |
74
78
 
75
79
  Focused entries keep renderer and chart dependencies out of basic controls. There is no all-components barrel. Renderers
76
80
  initialize when used, without a consumer-managed worker pool or grammar CDN. The
@@ -92,6 +96,14 @@ resolution in the StyleX plugin, and use `stylex.createTheme`. The defining path
92
96
  generated variables match its compiled CSS. The ordinary `/tokens` entry supplies runtime references rather than
93
97
  compile-time definitions.
94
98
 
99
+ Set the consumer compiler's `debug: false` so placement overrides use the archive's property keys. Keep definition
100
+ resolution for compilation; bundle `/tokens` runtime references to avoid reinjecting defaults over a chosen theme.
101
+
102
+ When an application's Content Security Policy requires nonces, wrap its component tree in `CSPProvider` from
103
+ `@mechane-ai/elements/csp` and pass the same request nonce used in its policy. Preserve that nonce during hydration.
104
+ This is [Base UI's CSP provider](https://base-ui.com/react/utils/csp-provider); it authorizes component style tags such
105
+ as Select's scrollbar rules. The application owns nonce generation and its security policy.
106
+
95
107
  ## Develop and release
96
108
 
97
109
  From `workspaces/core`:
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { b as e, f as t, p as n, t as r, v as i } from "./src-CbYaLvhD.js";
2
2
  import { t as a } from "./content-link-Bm-Td5wm.js";
3
- import { l as o, s } from "./src-CvpS9XIR.js";
3
+ import { c as o, u as s } from "./src-CjnbzSgq.js";
4
4
  import { r as c } from "./src-CfDf8TY8.js";
5
5
  import * as l from "@stylexjs/stylex";
6
6
  import { createContext as u, useContext as d, useId as f, useRef as p } from "react";
@@ -207,11 +207,11 @@ function L({ label: e, value: t, onValueChange: n, onSubmit: r, name: a = "promp
207
207
  onSubmit: M,
208
208
  className: "x78zum5 xdt5ytf x1n8ia3y xeuugli",
209
209
  children: [
210
- /* @__PURE__ */ h(s.Root, {
210
+ /* @__PURE__ */ h(o.Root, {
211
211
  invalid: C !== void 0,
212
212
  children: [
213
- /* @__PURE__ */ m(s.Label, { children: e }),
214
- /* @__PURE__ */ m(o, {
213
+ /* @__PURE__ */ m(o.Label, { children: e }),
214
+ /* @__PURE__ */ m(s, {
215
215
  name: a,
216
216
  value: t,
217
217
  onChange: (e) => n(e.currentTarget.value),
@@ -223,8 +223,8 @@ function L({ label: e, value: t, onValueChange: n, onSubmit: r, name: a = "promp
223
223
  readOnly: d,
224
224
  "aria-errormessage": C === void 0 ? void 0 : k
225
225
  }),
226
- S !== void 0 && /* @__PURE__ */ m(s.Description, { children: S }),
227
- C !== void 0 && /* @__PURE__ */ m(s.Error, {
226
+ S !== void 0 && /* @__PURE__ */ m(o.Description, { children: S }),
227
+ C !== void 0 && /* @__PURE__ */ m(o.Error, {
228
228
  id: k,
229
229
  match: !0,
230
230
  role: "alert",
@@ -343,6 +343,10 @@
343
343
  place-items: center;
344
344
  }
345
345
 
346
+ .x1hl2dhg {
347
+ text-decoration: none;
348
+ }
349
+
346
350
  .x76gt29:is([data-invalid], [aria-invalid="true"]), .xs95o9x[data-invalid] {
347
351
  border-color: var(--x5peq9z);
348
352
  }
@@ -367,6 +371,10 @@
367
371
  -webkit-font-smoothing: antialiased;
368
372
  }
369
373
 
374
+ .x1rh3ycu {
375
+ -webkit-user-select: text;
376
+ }
377
+
370
378
  .x1bzlxqo {
371
379
  accent-color: var(--x169lqhw);
372
380
  }
@@ -379,6 +387,10 @@
379
387
  align-items: center;
380
388
  }
381
389
 
390
+ .x1cy8zhl {
391
+ align-items: flex-start;
392
+ }
393
+
382
394
  .x7a106z {
383
395
  align-items: start;
384
396
  }
@@ -387,6 +399,18 @@
387
399
  align-items: stretch;
388
400
  }
389
401
 
402
+ .xwkv4th {
403
+ animation-duration: var(--xjjzqp4);
404
+ }
405
+
406
+ .xqcmdr3 {
407
+ animation-name: x18re5ia-B;
408
+ }
409
+
410
+ .x1c3o69q {
411
+ animation-timing-function: var(--x5xz5r2);
412
+ }
413
+
390
414
  .xjbqb8w {
391
415
  background-color: #0000;
392
416
  }
@@ -652,6 +676,14 @@
652
676
  fill-opacity: .08;
653
677
  }
654
678
 
679
+ .x1irul0l {
680
+ flex-basis: var(--xmu2bot);
681
+ }
682
+
683
+ .x1ewej1i {
684
+ flex-basis: var(--xyg5iyl);
685
+ }
686
+
655
687
  .xdt5ytf {
656
688
  flex-direction: column;
657
689
  }
@@ -1028,6 +1060,10 @@
1028
1060
  text-align: end;
1029
1061
  }
1030
1062
 
1063
+ .x16tdsg8 {
1064
+ text-align: inherit;
1065
+ }
1066
+
1031
1067
  .xdpxx8g {
1032
1068
  text-align: left;
1033
1069
  }
@@ -1362,6 +1398,10 @@
1362
1398
  border-bottom-color: var(--x-borderBottomColor);
1363
1399
  }
1364
1400
 
1401
+ .xdjqune {
1402
+ border-bottom-color: var(--x169lqhw);
1403
+ }
1404
+
1365
1405
  .x19u7erb {
1366
1406
  border-bottom-color: var(--x24btp3);
1367
1407
  }
@@ -1378,6 +1418,10 @@
1378
1418
  border-bottom-style: solid;
1379
1419
  }
1380
1420
 
1421
+ .x1qhh985 {
1422
+ border-bottom-width: 0;
1423
+ }
1424
+
1381
1425
  .xso031l {
1382
1426
  border-bottom-width: 1px;
1383
1427
  }
@@ -1474,6 +1518,10 @@
1474
1518
  height: 18px;
1475
1519
  }
1476
1520
 
1521
+ .xg2ss61 {
1522
+ height: 1lh;
1523
+ }
1524
+
1477
1525
  .xjm9jq1 {
1478
1526
  height: 1px;
1479
1527
  }
@@ -1766,6 +1814,10 @@
1766
1814
  min-width: var(--anchor-width);
1767
1815
  }
1768
1816
 
1817
+ .x7w7ha4 {
1818
+ min-width: var(--x-1utbgw4);
1819
+ }
1820
+
1769
1821
  .xkj4a21 {
1770
1822
  min-width: var(--x-minWidth);
1771
1823
  }
@@ -1794,6 +1846,10 @@
1794
1846
  overflow-y: auto;
1795
1847
  }
1796
1848
 
1849
+ .x1e4zzel {
1850
+ overscroll-behavior-y: contain;
1851
+ }
1852
+
1797
1853
  .x1wpizpg {
1798
1854
  padding-bottom: var(--x1drqizm);
1799
1855
  }
@@ -2020,6 +2076,12 @@
2020
2076
  }
2021
2077
 
2022
2078
  @layer priority7 {
2079
+ @media (prefers-reduced-motion: reduce) {
2080
+ .xcgnenq.xcgnenq {
2081
+ animation-name: none;
2082
+ }
2083
+ }
2084
+
2023
2085
  @media (width <= 800px) {
2024
2086
  .x1rhi5y4.x1rhi5y4 {
2025
2087
  display: flex;
@@ -2206,7 +2268,15 @@
2206
2268
  .xwu7q15.xwu7q15 {
2207
2269
  min-height: var(--x6uufy4);
2208
2270
  }
2271
+ }
2209
2272
 
2273
+ @media (width <= 600px) {
2274
+ .xzw3fdc.xzw3fdc {
2275
+ min-width: var(--x-1omz25w);
2276
+ }
2277
+ }
2278
+
2279
+ @media (pointer: coarse) {
2210
2280
  .xidce53.xidce53 {
2211
2281
  min-width: var(--x6uufy4);
2212
2282
  }
@@ -2451,6 +2521,16 @@
2451
2521
  }
2452
2522
  }
2453
2523
 
2524
+ @property --x-1omz25w {
2525
+ syntax: "*";
2526
+ inherits: false
2527
+ }
2528
+
2529
+ @property --x-1utbgw4 {
2530
+ syntax: "*";
2531
+ inherits: false
2532
+ }
2533
+
2454
2534
  @property --x-backgroundColor {
2455
2535
  syntax: "*";
2456
2536
  inherits: false
@@ -2506,6 +2586,16 @@
2506
2586
  inherits: false
2507
2587
  }
2508
2588
 
2589
+ @keyframes x18re5ia-B {
2590
+ from {
2591
+ opacity: 0;
2592
+ }
2593
+
2594
+ to {
2595
+ opacity: 1;
2596
+ }
2597
+ }
2598
+
2509
2599
  :root, .x1i152zt {
2510
2600
  --x1asdyoo: 4px;
2511
2601
  --xz1oyae: 6px;
@@ -2617,6 +2707,8 @@
2617
2707
  --x1p8em4u: 64px;
2618
2708
  --xikiree: 32px;
2619
2709
  --xtf6uwx: 52px;
2710
+ --xyg5iyl: 480px;
2711
+ --xmu2bot: 240px;
2620
2712
  }
2621
2713
 
2622
2714
  .x12671sc.x12671sc, .x12671sc.x12671sc:root {
@@ -1,5 +1,5 @@
1
1
  import { n as e, o as t } from "./chart-frame-bX0VLC_W.js";
2
- import { n } from "./chart-input-qnM44oen.js";
2
+ import { n } from "./chart-input--VSrlMl-.js";
3
3
  import * as r from "@stylexjs/stylex";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  // packages/charts/src/categorical-values.tsx
@@ -1,4 +1,4 @@
1
- import { l as e } from "./src-BfvOOeA3.js";
1
+ import { d as e } from "./src-CbJTK9oP.js";
2
2
  import { r as t } from "./chart-frame-bX0VLC_W.js";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  // packages/charts/src/chart-input.tsx
@@ -1,9 +1,9 @@
1
- import { i as e, n as t, r as n, t as r } from "../categorical-values-cMX7Mykq.js";
1
+ import { i as e, n as t, r as n, t as r } from "../categorical-values-BfAEQUd0.js";
2
2
  import { a as i, i as a, n as o, o as s, r as c, t as l } from "../chart-frame-bX0VLC_W.js";
3
- import { n as u, r as d, t as f } from "../chart-input-qnM44oen.js";
3
+ import { n as u, r as d, t as f } from "../chart-input--VSrlMl-.js";
4
4
  import { t as p } from "../plot-width--OgdohB5.js";
5
5
  import { b as m } from "../src-CbYaLvhD.js";
6
- import { m as h } from "../src-CvpS9XIR.js";
6
+ import { h } from "../src-CjnbzSgq.js";
7
7
  import { colors as g } from "../tokens.js";
8
8
  import * as _ from "@stylexjs/stylex";
9
9
  import { useEffect as v, useId as y, useMemo as b, useRef as x, useState as S } from "react";
@@ -28,30 +28,30 @@ function j({ categories: e, series: n, domain: r, mode: i }) {
28
28
  }
29
29
  if (i === "stacked" && e.some((e, t) => n.reduce((e, n) => e + (n.values[t] ?? 0), 0) > r[1])) return "Stacked bar totals must fit the supplied domain.";
30
30
  }
31
- function M({ title: e, description: t, categories: o, series: l, domain: u, mode: d = "grouped", formatValue: m, selection: h, height: g = 200 }) {
32
- let v = j({
31
+ function M({ title: e, description: t, categories: o, series: u, domain: d, mode: m = "grouped", formatValue: h, selection: g, height: v = 200 }) {
32
+ let y = j({
33
33
  categories: o,
34
- series: l,
35
- domain: u,
36
- mode: d
37
- }), { ref: y, width: b } = p();
38
- if (v !== void 0 || !Number.isFinite(g) || g < 48) return /* @__PURE__ */ w(f, {
34
+ series: u,
35
+ domain: d,
36
+ mode: m
37
+ }), { ref: b, width: x } = p();
38
+ if (y !== void 0 || !Number.isFinite(v) || v < 48) return /* @__PURE__ */ w(f, {
39
39
  title: e,
40
40
  description: t,
41
- message: v ?? "Chart height must be at least 48 pixels."
41
+ message: y ?? "Chart height must be at least 48 pixels."
42
42
  });
43
- let x = g - 28, S = D({
44
- domain: [...u],
45
- range: [x, 12]
46
- }), C = Math.max(52, ...S.ticks(3).map((e) => m(e).length * 7 + 12)), O = Math.max(C + 1, b - 16), A = E({
43
+ let S = v - 28, C = D({
44
+ domain: [...d],
45
+ range: [S, 12]
46
+ }), O = Math.max(52, ...C.ticks(3).map((e) => h(e).length * 7 + 12)), A = Math.max(O + 1, x - 16), M = E({
47
47
  domain: o.map((e) => e.id),
48
- range: [C, O],
48
+ range: [O, A],
49
49
  padding: .3
50
- }), M = E({
51
- domain: l.map((e) => e.id),
52
- range: [0, A.bandwidth()],
50
+ }), N = E({
51
+ domain: u.map((e) => e.id),
52
+ range: [0, M.bandwidth()],
53
53
  padding: .08
54
- }), N = Math.max(1, Math.ceil(56 / A.step())), P = Math.max(1, Math.floor(A.step() * N / 12) - 1), F = l.map((e, t) => ({
54
+ }), P = Math.max(1, Math.ceil(56 / M.step())), F = Math.max(1, Math.floor(M.step() * P / 12) - 1), I = u.map((e, t) => ({
55
55
  id: e.id,
56
56
  label: e.label,
57
57
  tone: n(e.tone, t)
@@ -60,69 +60,69 @@ function M({ title: e, description: t, categories: o, series: l, domain: u, mode
60
60
  title: e,
61
61
  description: t,
62
62
  children: [
63
- /* @__PURE__ */ w(a, { items: F }),
63
+ /* @__PURE__ */ w(a, { items: I }),
64
64
  /* @__PURE__ */ w("div", {
65
- ref: y,
65
+ ref: b,
66
66
  ..._.props(i.plot, ee.plot),
67
- children: o.length === 0 || l.length === 0 ? /* @__PURE__ */ w("p", {
67
+ children: o.length === 0 || u.length === 0 ? /* @__PURE__ */ w("p", {
68
68
  className: "x153jb6y x1ghz6dp xy8obcc",
69
69
  children: "No categories"
70
70
  }) : /* @__PURE__ */ T("svg", {
71
71
  role: "img",
72
72
  "aria-label": e,
73
- viewBox: `0 0 ${b} ${g}`,
74
- height: g,
73
+ viewBox: `0 0 ${x} ${v}`,
74
+ height: v,
75
75
  ..._.props(i.svg),
76
- children: [S.ticks(3).map((e) => /* @__PURE__ */ T("g", { children: [/* @__PURE__ */ w("line", {
77
- x1: C,
78
- x2: O,
79
- y1: S(e),
80
- y2: S(e),
76
+ children: [C.ticks(3).map((e) => /* @__PURE__ */ T("g", { children: [/* @__PURE__ */ w("line", {
77
+ x1: O,
78
+ x2: A,
79
+ y1: C(e),
80
+ y2: C(e),
81
81
  ..._.props(i.grid)
82
82
  }), /* @__PURE__ */ w("text", {
83
- x: C - 8,
84
- y: S(e),
83
+ x: O - 8,
84
+ y: C(e),
85
85
  textAnchor: "end",
86
86
  dominantBaseline: "middle",
87
87
  ..._.props(i.label),
88
- children: m(e)
89
- })] }, e)), o.map((e, t) => /* @__PURE__ */ T("g", { children: [l.map((r, a) => {
88
+ children: h(e)
89
+ })] }, e)), o.map((e, t) => /* @__PURE__ */ T("g", { children: [u.map((r, a) => {
90
90
  let o = r.values[t];
91
91
  if (o == null) return null;
92
- let c = d === "stacked" ? l.slice(0, a).reduce((e, n) => e + (n.values[t] ?? 0), 0) : 0, u = S(c), f = S(c + o);
92
+ let c = m === "stacked" ? u.slice(0, a).reduce((e, n) => e + (n.values[t] ?? 0), 0) : 0, l = C(c), d = C(c + o);
93
93
  return /* @__PURE__ */ w(k, {
94
- x: (A(e.id) ?? C) + (d === "stacked" ? 0 : M(r.id) ?? 0),
95
- y: Math.min(u, f),
96
- width: d === "stacked" ? A.bandwidth() : M.bandwidth(),
97
- height: Math.max(+(o === 0), Math.abs(f - u)),
94
+ x: (M(e.id) ?? O) + (m === "stacked" ? 0 : N(r.id) ?? 0),
95
+ y: Math.min(l, d),
96
+ width: m === "stacked" ? M.bandwidth() : N.bandwidth(),
97
+ height: Math.max(+(o === 0), Math.abs(d - l)),
98
98
  fill: s[n(r.tone, a)],
99
- ..._.props(h?.selectedId === e.id && i.selected),
99
+ ..._.props(g?.selectedId === e.id && i.selected),
100
100
  children: /* @__PURE__ */ T("title", { children: [
101
101
  e.label,
102
102
  " · ",
103
103
  r.label,
104
104
  ": ",
105
- m(o)
105
+ h(o)
106
106
  ] })
107
107
  }, r.id);
108
- }), t % N === 0 && /* @__PURE__ */ w("text", {
109
- x: (A(e.id) ?? C) + A.bandwidth() / 2,
110
- y: g - 4,
108
+ }), t % P === 0 && /* @__PURE__ */ w("text", {
109
+ x: (M(e.id) ?? O) + M.bandwidth() / 2,
110
+ y: v - 4,
111
111
  textAnchor: "middle",
112
112
  ..._.props(i.label),
113
- children: e.label.length > P ? `${e.label.slice(0, P)}…` : e.label
113
+ children: e.label.length > F ? `${e.label.slice(0, F)}…` : e.label
114
114
  })] }, e.id))]
115
115
  })
116
116
  }),
117
- /* @__PURE__ */ w(r, {
117
+ /* @__PURE__ */ w(l, { children: /* @__PURE__ */ w(r, {
118
118
  items: o.map((e, t) => ({
119
119
  id: e.id,
120
120
  label: e.label,
121
- valueLabel: l.map((e) => `${e.label}: ${e.values[t] === null || e.values[t] === void 0 ? "Unavailable" : m(e.values[t])}`).join(" · "),
121
+ valueLabel: u.map((e) => `${e.label}: ${e.values[t] === null || e.values[t] === void 0 ? "Unavailable" : h(e.values[t])}`).join(" · "),
122
122
  tone: "neutral"
123
123
  })),
124
- selection: h
125
- })
124
+ selection: g
125
+ }) })
126
126
  ]
127
127
  });
128
128
  }
@@ -1,5 +1,5 @@
1
1
  import { n as e, o as t, r as n, t as r } from "../chart-frame-bX0VLC_W.js";
2
- import { n as i, r as a, t as o } from "../chart-input-qnM44oen.js";
2
+ import { n as i, r as a, t as o } from "../chart-input--VSrlMl-.js";
3
3
  import { t as s } from "../plot-width--OgdohB5.js";
4
4
  import * as c from "@stylexjs/stylex";
5
5
  import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  import { o as e, r as t, t as n } from "../chart-frame-bX0VLC_W.js";
2
- import { n as r, t as i } from "../chart-input-qnM44oen.js";
2
+ import { n as r, t as i } from "../chart-input--VSrlMl-.js";
3
3
  import * as a from "@stylexjs/stylex";
4
4
  import { useId as o } from "react";
5
5
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
- import { i as e, r as t, t as n } from "../categorical-values-cMX7Mykq.js";
1
+ import { i as e, r as t, t as n } from "../categorical-values-BfAEQUd0.js";
2
2
  import { a as r, o as i, r as a } from "../chart-frame-bX0VLC_W.js";
3
- import { t as o } from "../chart-input-qnM44oen.js";
3
+ import { t as o } from "../chart-input--VSrlMl-.js";
4
4
  import { t as s } from "../plot-width--OgdohB5.js";
5
5
  import * as c from "@stylexjs/stylex";
6
6
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  import { colors as e } from "../tokens.js";
2
- import { n as t, r as n, t as r } from "../chart-input-qnM44oen.js";
2
+ import { n as t, r as n, t as r } from "../chart-input--VSrlMl-.js";
3
3
  import { n as i, o as a, r as o, t as s } from "../chart-frame-bX0VLC_W.js";
4
4
  import * as c from "@stylexjs/stylex";
5
5
  import { jsx as l, jsxs as u } from "react/jsx-runtime";