@mechane-ai/elements 0.9.0 → 0.11.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 (78) hide show
  1. package/NOTICE +24 -0
  2. package/README.md +7 -1
  3. package/dist/ai.js +153 -133
  4. package/dist/{categorical-values-DYRiw5Qd.js → categorical-values-FYc43JCa.js} +4 -4
  5. package/dist/{chart-frame-RL1hCWBC.js → chart-frame-Bczk5sWj.js} +22 -14
  6. package/dist/{chart-input-Bm3ot1yD.js → chart-input-CbzVN76m.js} +2 -2
  7. package/dist/charts/cartesian.js +529 -450
  8. package/dist/charts/distribution.js +302 -261
  9. package/dist/charts/graph.js +137 -103
  10. package/dist/charts/hierarchy.js +7 -7
  11. package/dist/charts/matrix.js +187 -174
  12. package/dist/charts/timeline.js +119 -92
  13. package/dist/charts.js +1 -1
  14. package/dist/code-block-B7xzM3tD.js +180 -0
  15. package/dist/collections.js +319 -242
  16. package/dist/content/code.js +1 -1
  17. package/dist/content/diff.js +81 -63
  18. package/dist/content/link.js +1 -1
  19. package/dist/content/markdown.js +115 -96
  20. package/dist/content/tree.js +43 -38
  21. package/dist/{content-link-BrPrpBof.js → content-link-CatGOrbo.js} +6 -2
  22. package/dist/content.js +172 -153
  23. package/dist/{assets/stylex.css → elements.css} +585 -229
  24. package/dist/feedback.js +1 -1
  25. package/dist/forms/dates.js +25 -25
  26. package/dist/forms.js +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/layout.js +239 -192
  29. package/dist/navigation/commands.js +45 -42
  30. package/dist/{navigation-yxK3iQXo.js → navigation-D2_sGy3C.js} +2 -2
  31. package/dist/navigation.js +10 -10
  32. package/dist/overlays.js +1 -1
  33. package/dist/packages/ai/src/conversation.d.ts +14 -2
  34. package/dist/packages/ai/src/index.d.ts +1 -1
  35. package/dist/packages/charts/src/cartesian/bar-chart.d.ts +5 -0
  36. package/dist/packages/charts/src/cartesian/index.d.ts +2 -2
  37. package/dist/packages/charts/src/chart-frame.d.ts +3 -0
  38. package/dist/packages/charts/src/chart-theme.d.ts +2 -1
  39. package/dist/packages/charts/src/distribution/distribution-plot.d.ts +22 -2
  40. package/dist/packages/charts/src/timeline/waterfall.d.ts +3 -2
  41. package/dist/packages/collections/src/collection-scroll.d.ts +2 -1
  42. package/dist/packages/collections/src/index.d.ts +1 -0
  43. package/dist/packages/collections/src/inspector.d.ts +6 -3
  44. package/dist/packages/content/src/diff/pierre-diff.d.ts +2 -1
  45. package/dist/packages/content/src/viewer-styles.d.ts +64 -0
  46. package/dist/packages/core/src/agent-avatar-glyphs.d.ts +1 -1
  47. package/dist/packages/core/src/index.d.ts +1 -1
  48. package/dist/packages/core/src/surfaces.d.ts +5 -0
  49. package/dist/packages/feedback/src/index.d.ts +4 -1
  50. package/dist/packages/feedback/src/toast.d.ts +5 -27
  51. package/dist/packages/forms/src/field-styles.d.ts +9 -0
  52. package/dist/packages/forms/src/selection-styles.d.ts +18 -2
  53. package/dist/packages/foundations/src/overlay-styles.d.ts +3 -1
  54. package/dist/packages/foundations/src/popup-styles.d.ts +7 -0
  55. package/dist/packages/foundations/src/tokens.stylex.d.ts +9 -0
  56. package/dist/packages/layout/src/frame.stylex.d.ts +1 -0
  57. package/dist/packages/layout/src/sidebar.d.ts +3 -1
  58. package/dist/packages/overlays/src/alert-dialog.d.ts +5 -2
  59. package/dist/packages/overlays/src/dialog.d.ts +7 -3
  60. package/dist/pierre-diff--zsiHCCB.js +71 -0
  61. package/dist/pierre-theme-D9hnHv3Z.js +126 -0
  62. package/dist/{pierre-tree-CRk09rx7.js → pierre-tree-D47uA7lb.js} +3 -3
  63. package/dist/{src-Cc0Sadzr.js → src-C_heP5kL.js} +295 -221
  64. package/dist/src-Cs0dRc4X.js +617 -0
  65. package/dist/src-D05isEh_.js +1652 -0
  66. package/dist/src-DXsGTJgv.js +969 -0
  67. package/dist/tokens.js +33 -25
  68. package/dist/viewer-styles-CpHqp5Qv.js +70 -0
  69. package/package.json +2 -1
  70. package/packages/foundations/src/tokens.stylex.ts +55 -48
  71. package/styles.css +1 -1
  72. package/dist/code-block-B30xQKqg.js +0 -175
  73. package/dist/pierre-diff-CZdzgiYm.js +0 -66
  74. package/dist/pierre-theme-BpESNIsV.js +0 -96
  75. package/dist/popup-styles-CvtZDE2t.js +0 -135
  76. package/dist/src-CfDf8TY8.js +0 -466
  77. package/dist/src-DuuAmS-c.js +0 -360
  78. package/dist/src-elMBQ2Dh.js +0 -1087
@@ -1,7 +1,8 @@
1
- import { C as e, S as t, c as n, f as r, h as i, i as a } from "./src-elMBQ2Dh.js";
2
- import { r as o } from "./src-Cc0Sadzr.js";
3
- import { r as s, t as c } from "./src-CfDf8TY8.js";
4
- import { t as l } from "./accessibility-C-aIZ1Yx.js";
1
+ import { C as e, c as t, f as n, g as r, w as i } from "./src-D05isEh_.js";
2
+ import { r as a } from "./src-C_heP5kL.js";
3
+ import { r as o, t as s } from "./src-Cs0dRc4X.js";
4
+ import { t as c } from "./accessibility-C-aIZ1Yx.js";
5
+ import { tableGeometry as l } from "./tokens.js";
5
6
  import { mergeProps as u } from "@base-ui/react/merge-props";
6
7
  import * as d from "@stylexjs/stylex";
7
8
  import { Fragment as ee, useEffect as f, useLayoutEffect as p, useMemo as te, useRef as m, useState as h } from "react";
@@ -10,39 +11,47 @@ import { ArrowDown as ne, ArrowUp as re, ArrowUpDown as ie, ChevronLeft as y, Ch
10
11
  import { createColumnHelper as ae, tableFeatures as C, useTable as oe } from "@tanstack/react-table";
11
12
  import { defaultRangeExtractor as se, useVirtualizer as ce } from "@tanstack/react-virtual";
12
13
  // packages/collections/src/collection-controls.tsx
13
- function w({ label: e, children: t, actions: n }) {
14
+ var w = { remove: {
15
+ kmuXW: "x2lah0s",
16
+ $$css: !0
17
+ } };
18
+ function T({ label: e, children: t, actions: n }) {
14
19
  return /* @__PURE__ */ v("div", {
15
20
  role: "group",
16
21
  "aria-label": e,
17
- className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi x1m92p3w xn9t2bk xso031l x1q0q8m5 x1qndepd",
18
- children: [t, n !== void 0 && /* @__PURE__ */ _("div", {
19
- className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xvc5jky",
22
+ className: "x78zum5 x6s0dn4 x1a02dak xeuugli x1hnptsi x1m92p3w xn9t2bk xso031l x1q0q8m5 x1qndepd xbixft x1hz01jw xtqrqnz x1778rvt",
23
+ children: [t, n != null && /* @__PURE__ */ _("div", {
24
+ className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli xvc5jky",
20
25
  children: n
21
26
  })]
22
27
  });
23
28
  }
24
- function T({ filters: t, onRemove: n, label: r = "Applied filters" }) {
29
+ function E({ filters: e, onRemove: t, label: n = "Applied filters" }) {
25
30
  return /* @__PURE__ */ _("div", {
26
31
  role: "group",
27
- "aria-label": r,
28
- className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi",
29
- children: t.map((t) => /* @__PURE__ */ v("span", {
30
- className: "x3nfvp2 x6s0dn4 xunmzkg xyibt8p xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xeuugli x193iq5w xj0a0fe xpvm0e4 xbixft x1hz01jw xtqrqnz",
31
- children: [t.label, /* @__PURE__ */ _(e, {
32
- "aria-label": `Remove ${t.label}`,
32
+ "aria-label": n,
33
+ className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli",
34
+ children: e.map((e) => /* @__PURE__ */ v("span", {
35
+ className: "x3nfvp2 x6s0dn4 xunmzkg xyibt8p xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xeuugli x193iq5w xj0a0fe xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt",
36
+ children: [/* @__PURE__ */ _("span", {
37
+ className: "xeuugli xj0a0fe",
38
+ children: e.label
39
+ }), /* @__PURE__ */ _(i, {
40
+ "aria-label": `Remove ${e.label}`,
33
41
  variant: "ghost",
34
- onClick: () => n(t.id),
42
+ onClick: () => t(e.id),
43
+ xstyle: w.remove,
35
44
  children: /* @__PURE__ */ _(S, {
36
45
  size: 14,
37
46
  "aria-hidden": "true"
38
47
  })
39
48
  })]
40
- }, t.id))
49
+ }, e.id))
41
50
  });
42
51
  }
43
- function E({ columns: e, onVisibilityChange: n, label: r = "Columns" }) {
44
- return /* @__PURE__ */ v(s.Root, { children: [/* @__PURE__ */ v(s.Trigger, {
45
- render: /* @__PURE__ */ _(t, {
52
+ function D({ columns: t, onVisibilityChange: n, label: r = "Columns" }) {
53
+ return /* @__PURE__ */ v(o.Root, { children: [/* @__PURE__ */ v(o.Trigger, {
54
+ render: /* @__PURE__ */ _(e, {
46
55
  variant: "outline",
47
56
  size: "md"
48
57
  }),
@@ -50,32 +59,32 @@ function E({ columns: e, onVisibilityChange: n, label: r = "Columns" }) {
50
59
  size: 16,
51
60
  "aria-hidden": "true"
52
61
  }), r]
53
- }), /* @__PURE__ */ _(s.Portal, { children: /* @__PURE__ */ _(s.Positioner, {
62
+ }), /* @__PURE__ */ _(o.Portal, { children: /* @__PURE__ */ _(o.Positioner, {
54
63
  align: "end",
55
- children: /* @__PURE__ */ _(s.Popup, {
64
+ children: /* @__PURE__ */ _(o.Popup, {
56
65
  "aria-label": r,
57
66
  children: /* @__PURE__ */ _("div", {
58
67
  className: "xrvj5dj x1n8ia3y xfb3i0g",
59
- children: e.map((e) => /* @__PURE__ */ v("label", {
60
- className: "x78zum5 x6s0dn4 x1hnptsi xbixft xtqrqnz x1hz01jw",
61
- children: [/* @__PURE__ */ _(o.Root, {
68
+ children: t.map((e) => /* @__PURE__ */ v("label", {
69
+ className: "x78zum5 x6s0dn4 x1hnptsi xbixft xtqrqnz x1hz01jw x1778rvt xeuugli xj0a0fe",
70
+ children: [/* @__PURE__ */ _(a.Root, {
62
71
  checked: e.visible,
63
72
  onCheckedChange: (t) => n(e.id, t),
64
73
  disabled: e.required,
65
- children: /* @__PURE__ */ _(o.Indicator, {})
74
+ children: /* @__PURE__ */ _(a.Indicator, {})
66
75
  }), e.label]
67
76
  }, e.id))
68
77
  })
69
78
  })
70
79
  }) })] });
71
80
  }
72
- function D({ description: e, previous: r, next: i }) {
81
+ function O({ description: n, previous: r, next: i }) {
73
82
  return /* @__PURE__ */ v("nav", {
74
83
  "aria-label": "Pagination",
75
- className: "x78zum5 x6s0dn4 x1qughib x1a02dak xaml1ju",
76
- children: [/* @__PURE__ */ _(n, { children: e }), /* @__PURE__ */ v("div", {
77
- className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xvc5jky",
78
- children: [/* @__PURE__ */ v(t, {
84
+ className: "x78zum5 x6s0dn4 x1qughib x1a02dak xaml1ju xeuugli",
85
+ children: [/* @__PURE__ */ _(t, { children: n }), /* @__PURE__ */ v("div", {
86
+ className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli xvc5jky",
87
+ children: [/* @__PURE__ */ v(e, {
79
88
  variant: "outline",
80
89
  disabled: r.disabled,
81
90
  onClick: r.onClick,
@@ -83,7 +92,7 @@ function D({ description: e, previous: r, next: i }) {
83
92
  size: 16,
84
93
  "aria-hidden": "true"
85
94
  }), "Previous"]
86
- }), /* @__PURE__ */ v(t, {
95
+ }), /* @__PURE__ */ v(e, {
87
96
  variant: "outline",
88
97
  disabled: i.disabled,
89
98
  onClick: i.onClick,
@@ -96,7 +105,7 @@ function D({ description: e, previous: r, next: i }) {
96
105
  });
97
106
  }
98
107
  // packages/collections/src/use-end-reached.ts
99
- function O({ end: e, viewport: t, onEndReached: n, content: r }) {
108
+ function k({ end: e, viewport: t, onEndReached: n, content: r }) {
100
109
  f(() => {
101
110
  if (n === void 0 || e.current === null) return;
102
111
  let r = new IntersectionObserver((e) => {
@@ -111,13 +120,19 @@ function O({ end: e, viewport: t, onEndReached: n, content: r }) {
111
120
  ]);
112
121
  }
113
122
  // packages/collections/src/data-table.tsx
114
- var le = C({}), k = 48, ue = "a, button, input, select, textarea, label, summary, [role=\"button\"], [role=\"link\"], [role=\"switch\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"combobox\"], [role=\"slider\"], [role=\"spinbutton\"], [role=\"textbox\"], [role=\"tab\"], [role^=\"menuitem\"], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]:not([tabindex=\"-1\"])", de = /* @__PURE__ */ new Map([["ArrowUp", -1], ["ArrowDown", 1]]), A = {
123
+ var le = C({}), ue = "a, button, input, select, textarea, label, summary, [role=\"button\"], [role=\"link\"], [role=\"switch\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"combobox\"], [role=\"slider\"], [role=\"spinbutton\"], [role=\"textbox\"], [role=\"tab\"], [role^=\"menuitem\"], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]:not([tabindex=\"-1\"])", de = /* @__PURE__ */ new Map([["ArrowUp", -1], ["ArrowDown", 1]]), A = {
115
124
  kmVPX3: "x1717udv",
116
125
  kMzoRj: "xc342km",
117
126
  $$css: !0
118
127
  }, j = {
119
128
  frame: {
120
129
  k7Eaqz: "xeuugli",
130
+ kMv6JI: "x1hz01jw",
131
+ kGuDYH: "xtqrqnz",
132
+ kLWn49: "x1778rvt",
133
+ k63SB2: "xj57cvi",
134
+ kMwMTN: "xbixft",
135
+ khiITx: "xvmahel",
121
136
  $$css: !0
122
137
  },
123
138
  content: { $$css: !0 },
@@ -151,9 +166,6 @@ var le = C({}), k = 48, ue = "a, button, input, select, textarea, label, summary
151
166
  table: {
152
167
  kzqmXN: "xh8yej3",
153
168
  kLvRdT: "x1mwwwfo",
154
- kMv6JI: "x1hz01jw",
155
- kGuDYH: "xtqrqnz",
156
- kLWn49: "x1778rvt",
157
169
  kcqcaj: "xss6m8b",
158
170
  k9WMMc: "xdpxx8g",
159
171
  kMwMTN: "xbixft",
@@ -176,13 +188,15 @@ var le = C({}), k = 48, ue = "a, button, input, select, textarea, label, summary
176
188
  kmVPX3: "x1c8xbx5",
177
189
  kMwMTN: "x153jb6y",
178
190
  kGuDYH: "xy8obcc",
191
+ kLWn49: "xas2l8k",
179
192
  $$css: !0
180
193
  },
181
194
  header: {
195
+ kB7OPa: "x9f619",
182
196
  kVAEAm: "x7wzq59",
183
197
  k87sOh: "x13vifvy",
184
198
  kY2c9j: "x1vjfegm",
185
- kZKoxP: "xc9qbxq",
199
+ kZKoxP: "x24vdcc",
186
200
  k8WAf4: "xt970qd",
187
201
  kg3NbH: "x1m92p3w",
188
202
  kt9PQ7: "xso031l",
@@ -190,8 +204,9 @@ var le = C({}), k = 48, ue = "a, button, input, select, textarea, label, summary
190
204
  kL6WhQ: "x1qndepd",
191
205
  kMwMTN: "x153jb6y",
192
206
  kWkggS: "xpvm0e4",
193
- k63SB2: "xo1l8bm",
207
+ k63SB2: "xj57cvi",
194
208
  kGuDYH: "xy8obcc",
209
+ kLWn49: "xas2l8k",
195
210
  khDVqt: "xuxw1ft",
196
211
  $$css: !0
197
212
  },
@@ -238,17 +253,17 @@ var le = C({}), k = 48, ue = "a, button, input, select, textarea, label, summary
238
253
  }, fe = {
239
254
  fixed: j.content,
240
255
  content: j.contentCell
241
- }, pe = {
256
+ }, M = {
242
257
  start: j.start,
243
258
  end: j.end
244
- }, me = {
259
+ }, pe = {
245
260
  content: j.content,
246
261
  fill: j.fillFrame
247
- }, he = {
262
+ }, me = {
248
263
  content: j.content,
249
264
  fill: j.fillViewport
250
265
  };
251
- function M({ children: e, secondary: t, leading: n }) {
266
+ function N({ children: e, secondary: t, leading: n }) {
252
267
  return /* @__PURE__ */ v("span", {
253
268
  className: "x78zum5 x6s0dn4 x1n8ia3y xeuugli xh8yej3",
254
269
  children: [n !== void 0 && /* @__PURE__ */ _("span", {
@@ -269,89 +284,89 @@ function M({ children: e, secondary: t, leading: n }) {
269
284
  })]
270
285
  });
271
286
  }
272
- function N({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, onSortChange: s, selectedIds: c, onSelectionChange: u, selectionLabel: g, rowAction: y, activeRowId: b, focusRowId: x, hideCaption: S = !1, hideHeaders: C = !1, rowSizing: w = "fixed", window: T, endContent: E, onEndReached: D, footer: A }) {
273
- let M = te(() => {
287
+ function P({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, onSortChange: s, selectedIds: u, onSelectionChange: g, selectionLabel: y, rowAction: b, activeRowId: x, focusRowId: S, hideCaption: C = !1, hideHeaders: w = !1, rowSizing: T = "fixed", window: E, endContent: D, onEndReached: O, footer: A }) {
288
+ let N = te(() => {
274
289
  let e = ae();
275
290
  return e.columns(t.map((t) => e.display({
276
291
  id: t.id,
277
292
  header: t.label
278
293
  })));
279
- }, [t]), N = oe({
294
+ }, [t]), P = oe({
280
295
  features: le,
281
- columns: M,
296
+ columns: N,
282
297
  data: e,
283
298
  getRowId: n
284
- }), I = m(null), L = m(null), R = m(null), z = m(null), [B, V] = h(0), [H, U] = h(), W = m(void 0), G = m(void 0), K = e.findIndex((e) => n(e) === H), q = t.findIndex((e) => e.secondary !== !0), J = typeof T?.height == "string" ? T.height : "content";
299
+ }), L = m(null), R = m(null), z = m(null), B = m(null), [V, H] = h(0), [U, W] = h(), G = m(void 0), K = m(void 0), q = e.findIndex((e) => n(e) === U), J = t.findIndex((e) => e.secondary !== !0), Y = typeof E?.height == "string" ? E.height : "content";
285
300
  p(() => {
286
- if (x === void 0) {
287
- G.current = void 0;
301
+ if (S === void 0) {
302
+ K.current = void 0;
288
303
  return;
289
304
  }
290
- if (G.current === x) return;
291
- let e = I.current?.querySelector(`[data-row-id="${CSS.escape(x)}"] [data-row-action]`);
305
+ if (K.current === S) return;
306
+ let e = L.current?.querySelector(`[data-row-id="${CSS.escape(S)}"] [data-row-action]`);
292
307
  if (e == null) return;
293
308
  let t = requestAnimationFrame(() => {
294
- e.focus({ preventScroll: !0 }), G.current = x;
309
+ e.focus({ preventScroll: !0 }), K.current = S;
295
310
  });
296
311
  return () => cancelAnimationFrame(t);
297
- }, [e, x]), O({
298
- end: L,
299
- onEndReached: T === void 0 ? D : void 0,
312
+ }, [e, S]), k({
313
+ end: R,
314
+ onEndReached: E === void 0 ? O : void 0,
300
315
  content: e.length
301
316
  }), f(() => {
302
- let e = R.current, t = z.current;
303
- if (T === void 0 || e === null || t === null) return;
304
- let n = new ResizeObserver(() => V(e.offsetHeight + t.offsetHeight));
317
+ let e = z.current, t = B.current;
318
+ if (E === void 0 || e === null || t === null) return;
319
+ let n = new ResizeObserver(() => H(e.offsetHeight + t.offsetHeight));
305
320
  return n.observe(e), n.observe(t), () => n.disconnect();
306
321
  }, [
307
- T,
308
- S,
309
- C
322
+ E,
323
+ C,
324
+ w
310
325
  ]);
311
- let Y = ce({
326
+ let X = ce({
312
327
  count: e.length,
313
- enabled: T !== void 0,
314
- getScrollElement: () => I.current,
328
+ enabled: E !== void 0,
329
+ getScrollElement: () => L.current,
315
330
  getItemKey: (t) => {
316
331
  let r = e[t];
317
332
  if (r === void 0) throw RangeError("The virtual row is outside the supplied table page.");
318
333
  return n(r);
319
334
  },
320
- estimateSize: () => w === "fixed" ? k : T?.estimatedRowHeight ?? k,
321
- scrollMargin: B,
322
- scrollPaddingStart: B,
335
+ estimateSize: () => T === "fixed" ? l.rowHeight : E?.estimatedRowHeight ?? l.rowHeight,
336
+ scrollMargin: V,
337
+ scrollPaddingStart: V,
323
338
  overscan: 6,
324
339
  rangeExtractor: (t) => {
325
340
  let n = se(t);
326
- return K === -1 ? n : [.../* @__PURE__ */ new Set([
341
+ return q === -1 ? n : [.../* @__PURE__ */ new Set([
327
342
  ...n,
328
- K - 1,
329
- K,
330
- K + 1
343
+ q - 1,
344
+ q,
345
+ q + 1
331
346
  ])].filter((t) => t >= 0 && t < e.length).toSorted((e, t) => e - t);
332
347
  }
333
- }), X = T === void 0 ? N.getRowModel().rows.map((e, t) => ({
348
+ }), ge = E === void 0 ? P.getRowModel().rows.map((e, t) => ({
334
349
  row: e,
335
350
  index: t,
336
- gap: 0
337
- })) : Y.getVirtualItems().flatMap((e, t, n) => {
338
- let r = N.getRowModel().rows[e.index];
351
+ spacerHeight: 0
352
+ })) : X.getVirtualItems().flatMap((e, t, n) => {
353
+ let r = P.getRowModel().rows[e.index];
339
354
  return r === void 0 ? [] : [{
340
355
  row: r,
341
356
  index: e.index,
342
- gap: e.start - (n[t - 1]?.end ?? B)
357
+ spacerHeight: e.start - (n[t - 1]?.end ?? V)
343
358
  }];
344
- }), Z = T !== void 0 && (e.length === 0 || Y.range?.endIndex === e.length - 1);
359
+ }), Z = E !== void 0 && (e.length === 0 || X.range?.endIndex === e.length - 1);
345
360
  f(() => {
346
- Z && D?.();
361
+ Z && O?.();
347
362
  }, [
348
363
  Z,
349
- D,
364
+ O,
350
365
  e.length
351
366
  ]), p(() => {
352
- if (W.current === void 0) return;
353
- let e = Array.from(I.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId === W.current)?.querySelector("[data-row-action]");
354
- e != null && (e.focus({ preventScroll: T !== void 0 }), W.current = void 0);
367
+ if (G.current === void 0) return;
368
+ let e = Array.from(L.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId === G.current)?.querySelector("[data-row-action]");
369
+ e != null && (e.focus({ preventScroll: E !== void 0 }), G.current = void 0);
355
370
  });
356
371
  function Q(t, r) {
357
372
  let i = t.metaKey || t.ctrlKey, a = t.altKey || t.shiftKey;
@@ -360,43 +375,47 @@ function N({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
360
375
  if (o === void 0) return;
361
376
  t.preventDefault();
362
377
  let s = r + o, c = e[s];
363
- c !== void 0 && (W.current = n(c), U(W.current), T !== void 0 && Y.scrollToIndex(s, { align: "auto" }));
378
+ c !== void 0 && (G.current = n(c), W(G.current), E !== void 0 && X.scrollToIndex(s, { align: "auto" }));
364
379
  }
365
- let $ = t.length + (c === void 0 ? 0 : 1), _e = c === void 0 ? 0 : 44, ve = A != null && typeof A != "boolean", ye = t.reduce((e, t) => e + (t.width ?? 160), _e), be = t.filter((e) => e.secondary !== !0).reduce((e, t) => e + (t.width ?? 160), _e), xe = Y.getTotalSize() - (Y.getVirtualItems().at(-1)?.end ?? B) + B;
380
+ let $ = t.length + (u === void 0 ? 0 : 1), _e = u === void 0 ? 0 : 44, ve = A != null && typeof A != "boolean", ye = t.reduce((e, t) => e + (t.width ?? 160), _e), be = t.filter((e) => e.secondary !== !0).reduce((e, t) => e + (t.width ?? 160), _e), xe = X.getTotalSize() - (X.getVirtualItems().at(-1)?.end ?? V) + V;
366
381
  return /* @__PURE__ */ v("div", {
367
- ...d.props(j.frame, me[J]),
382
+ ...d.props(j.frame, pe[Y]),
368
383
  children: [/* @__PURE__ */ v("div", {
369
- ref: I,
384
+ ref: L,
370
385
  role: "region",
371
386
  "aria-label": r,
372
387
  tabIndex: 0,
373
- ...d.props(j.viewport, he[J], typeof T?.height == "number" && j.virtual(T.height)),
388
+ ...d.props(j.viewport, me[Y], typeof E?.height == "number" && j.virtual(E.height)),
374
389
  children: [/* @__PURE__ */ v("table", {
375
- "aria-rowcount": T === void 0 ? void 0 : Math.max(1, e.length) + 1,
376
- ...d.props(j.table, (w === "fixed" || t.some((e) => e.truncate === !0)) && j.fixed, j.minimumWidth(ye, be)),
390
+ "aria-rowcount": E === void 0 ? void 0 : Math.max(1, e.length) + 1,
391
+ ...d.props(j.table, (T === "fixed" || t.some((e) => e.truncate === !0)) && j.fixed, j.minimumWidth(ye, be)),
377
392
  children: [
378
393
  /* @__PURE__ */ _("caption", {
379
- ref: R,
380
- ...d.props(j.caption, S && l.hidden),
394
+ ref: z,
395
+ ...d.props(j.caption, C && c.hidden),
381
396
  children: r
382
397
  }),
383
- /* @__PURE__ */ v("colgroup", { children: [c !== void 0 && /* @__PURE__ */ _("col", { className: "x187nhsf xeuugli x1m92p3w" }), t.map((e) => /* @__PURE__ */ _("col", { ...d.props(e.width !== void 0 && j.width(e.width), e.secondary === !0 && j.secondary) }, e.id))] }),
398
+ /* @__PURE__ */ v("colgroup", { children: [u !== void 0 && /* @__PURE__ */ _("col", { className: "x187nhsf xeuugli x1doqdfy" }), t.map((e) => /* @__PURE__ */ _("col", { ...d.props(e.width !== void 0 && j.width(e.width), e.secondary === !0 && j.secondary) }, e.id))] }),
384
399
  /* @__PURE__ */ _("thead", {
385
- ref: z,
386
- ...d.props(C && l.hidden),
387
- children: /* @__PURE__ */ v("tr", { children: [c !== void 0 && /* @__PURE__ */ _("th", {
400
+ ref: B,
401
+ ...d.props(w && c.hidden),
402
+ children: /* @__PURE__ */ v("tr", { children: [u !== void 0 && /* @__PURE__ */ _("th", {
388
403
  scope: "col",
389
- className: "x7wzq59 x13vifvy x1vjfegm xc9qbxq xt970qd xso031l x1q0q8m5 x1qndepd x153jb6y xpvm0e4 xo1l8bm xy8obcc xuxw1ft x187nhsf xeuugli x1m92p3w",
390
- children: "Select"
404
+ className: "x9f619 x7wzq59 x13vifvy x1vjfegm x24vdcc xt970qd xso031l x1q0q8m5 x1qndepd x153jb6y xpvm0e4 xj57cvi xy8obcc xas2l8k xuxw1ft x187nhsf xeuugli x1doqdfy",
405
+ children: /* @__PURE__ */ _("span", {
406
+ ...d.props(c.hidden),
407
+ children: "Select"
408
+ })
391
409
  }), t.map((e) => {
392
- let t = a?.columnId === e.id ? a.direction : void 0;
410
+ let t = o?.columnId === e.id ? o.direction : void 0;
393
411
  return /* @__PURE__ */ _("th", {
394
412
  scope: "col",
413
+ title: e.label,
395
414
  "aria-sort": t,
396
- ...d.props(j.header, pe[e.align ?? "start"], e.width !== void 0 && j.width(e.width), e.secondary === !0 && j.secondary),
415
+ ...d.props(j.header, M[e.align ?? "start"], e.width !== void 0 && j.width(e.width), e.secondary === !0 && j.secondary),
397
416
  children: e.sortable === !0 && s !== void 0 ? /* @__PURE__ */ v("button", {
398
417
  type: "button",
399
- className: "x3nfvp2 x6s0dn4 x1hnptsi x1uey4wk xwu7q15 x1717udv xc342km x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x1ypdohk x1mkgjtd x13qnu6 x9v5kkp x19rmrnh x7s97pk",
418
+ className: "x3nfvp2 x6s0dn4 x1hnptsi x193iq5w xeuugli x3h6u66 xwu7q15 x1717udv xc342km x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x1ypdohk x1mkgjtd x1s9zmfe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
400
419
  onClick: () => {
401
420
  s(t === "ascending" ? {
402
421
  columnId: e.id,
@@ -406,20 +425,27 @@ function N({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
406
425
  direction: "ascending"
407
426
  });
408
427
  },
409
- children: [e.label, _(t === "ascending" ? re : t === "descending" ? ne : ie, {
428
+ children: [/* @__PURE__ */ _("span", {
429
+ className: "x1lliihq xeuugli xb3r6kr xlyipyv xuxw1ft",
430
+ children: e.label
431
+ }), _(t === "ascending" ? re : t === "descending" ? ne : ie, {
410
432
  size: 14,
411
- "aria-hidden": "true"
433
+ "aria-hidden": "true",
434
+ className: "x2lah0s"
412
435
  })]
413
- }) : e.label
436
+ }) : /* @__PURE__ */ _("span", {
437
+ className: "x1lliihq xeuugli xb3r6kr xlyipyv xuxw1ft",
438
+ children: e.label
439
+ })
414
440
  }, e.id);
415
441
  })] })
416
442
  }),
417
443
  /* @__PURE__ */ v("tbody", {
418
444
  onBlur: (e) => {
419
- e.currentTarget.contains(e.relatedTarget) || U(void 0);
445
+ e.currentTarget.contains(e.relatedTarget) || W(void 0);
420
446
  },
421
447
  children: [
422
- X.map(({ row: e, index: n, gap: r }) => /* @__PURE__ */ v(ee, { children: [r > 0 && /* @__PURE__ */ _("tr", {
448
+ ge.map(({ row: e, index: n, spacerHeight: r }) => /* @__PURE__ */ v(ee, { children: [r > 0 && /* @__PURE__ */ _("tr", {
423
449
  "aria-hidden": "true",
424
450
  children: /* @__PURE__ */ _("td", {
425
451
  colSpan: $,
@@ -428,51 +454,51 @@ function N({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
428
454
  }), /* @__PURE__ */ v("tr", {
429
455
  "data-index": n,
430
456
  "data-row-id": e.id,
431
- "aria-rowindex": T === void 0 ? void 0 : n + 2,
432
- ref: T === void 0 || w === "fixed" ? void 0 : Y.measureElement,
433
- onFocus: () => U(e.id),
457
+ "aria-rowindex": E === void 0 ? void 0 : n + 2,
458
+ ref: E === void 0 || T === "fixed" ? void 0 : X.measureElement,
459
+ onFocus: () => W(e.id),
434
460
  onClick: (e) => {
435
- if (y === void 0 || !F(e) || e.target instanceof Element && e.target.closest(ue) !== null) return;
461
+ if (b === void 0 || !I(e) || e.target instanceof Element && e.target.closest(ue) !== null) return;
436
462
  let t = e.currentTarget.querySelector("[data-row-action]");
437
463
  t?.focus({ preventScroll: !0 }), t?.click();
438
464
  },
439
465
  ...{
440
- 0: { className: "xsdox4t xso031l x1q0q8m5 x1qndepd xzro8vx" },
441
- 2: { className: "xsdox4t xso031l x1q0q8m5 x1qndepd xzro8vx x1ypdohk" },
442
- 1: { className: "xsdox4t xso031l x1q0q8m5 x1qndepd xzro8vx x1r8u7ye" },
443
- 3: { className: "xsdox4t xso031l x1q0q8m5 x1qndepd xzro8vx x1ypdohk x1r8u7ye" }
444
- }[(y !== void 0) << 1 | (c?.has(e.id) === !0 || b === e.id)],
445
- children: [c !== void 0 && /* @__PURE__ */ _("td", {
446
- className: "xt970qd xxymvpz xj0a0fe x187nhsf xeuugli x1m92p3w",
447
- children: /* @__PURE__ */ _(o.Root, {
448
- "aria-label": g(e.original),
449
- checked: c.has(e.id),
466
+ 0: { className: "x1v2how9 xso031l x1q0q8m5 x1qndepd x13nmlw8 x1t1lzn6" },
467
+ 2: { className: "x1v2how9 xso031l x1q0q8m5 x1qndepd x13nmlw8 x1t1lzn6 x1ypdohk x1ecmtor" },
468
+ 1: { className: "x1v2how9 xso031l x1q0q8m5 x1qndepd x13nmlw8 x1t1lzn6 x1r8u7ye" },
469
+ 3: { className: "x1v2how9 xso031l x1q0q8m5 x1qndepd x13nmlw8 x1t1lzn6 x1ypdohk x1ecmtor x1r8u7ye" }
470
+ }[(b !== void 0) << 1 | (u?.has(e.id) === !0 || x === e.id)],
471
+ children: [u !== void 0 && /* @__PURE__ */ _("td", {
472
+ className: "xt970qd xxymvpz xj0a0fe x187nhsf xeuugli x1doqdfy",
473
+ children: /* @__PURE__ */ _(a.Root, {
474
+ "aria-label": y(e.original),
475
+ checked: u.has(e.id),
450
476
  onCheckedChange: (t) => {
451
- let n = new Set(c);
452
- t ? n.add(e.id) : n.delete(e.id), u(n);
477
+ let n = new Set(u);
478
+ t ? n.add(e.id) : n.delete(e.id), g(n);
453
479
  },
454
- children: /* @__PURE__ */ _(o.Indicator, {})
480
+ children: /* @__PURE__ */ _(a.Indicator, {})
455
481
  })
456
482
  }), t.map((t, r) => /* @__PURE__ */ _("td", {
457
- ...d.props(j.cell, fe[w], pe[t.align ?? "start"], t.width !== void 0 && j.width(t.width), t.secondary === !0 && j.secondary),
458
- children: y !== void 0 && r === q ? /* @__PURE__ */ _(ge, {
483
+ ...d.props(j.cell, fe[T], M[t.align ?? "start"], t.width !== void 0 && j.width(t.width), t.secondary === !0 && j.secondary),
484
+ children: b !== void 0 && r === J ? /* @__PURE__ */ _(he, {
459
485
  row: e.original,
460
- action: y,
461
- active: b === e.id,
486
+ action: b,
487
+ active: x === e.id,
462
488
  onKeyDown: (e) => Q(e, n),
463
- children: /* @__PURE__ */ _(P, {
464
- fixed: w === "fixed",
489
+ children: /* @__PURE__ */ _(F, {
490
+ fixed: T === "fixed",
465
491
  truncate: t.truncate,
466
492
  children: t.cell(e.original)
467
493
  })
468
- }) : /* @__PURE__ */ _(P, {
469
- fixed: w === "fixed",
494
+ }) : /* @__PURE__ */ _(F, {
495
+ fixed: T === "fixed",
470
496
  truncate: t.truncate,
471
497
  children: t.cell(e.original)
472
498
  })
473
499
  }, t.id))]
474
500
  })] }, e.id)),
475
- T !== void 0 && xe > 0 && /* @__PURE__ */ _("tr", {
501
+ E !== void 0 && xe > 0 && /* @__PURE__ */ _("tr", {
476
502
  "aria-hidden": "true",
477
503
  children: /* @__PURE__ */ _("td", {
478
504
  colSpan: $,
@@ -488,12 +514,12 @@ function N({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
488
514
  })
489
515
  ]
490
516
  }), /* @__PURE__ */ _("div", {
491
- ref: L,
517
+ ref: R,
492
518
  ...{
493
519
  0: {},
494
- 1: { className: "xid9utz x1c8xbx5 x15x95ik x1az1eml" }
495
- }[E !== void 0 | 0],
496
- children: E
520
+ 1: { className: "xid9utz x1c8xbx5 x153jb6y xy8obcc xas2l8k x15x95ik x1az1eml" }
521
+ }[D !== void 0 | 0],
522
+ children: D
497
523
  })]
498
524
  }), ve && /* @__PURE__ */ _("div", {
499
525
  className: "x1c8xbx5 x178xt8z x13fuv20 xhjagg4",
@@ -501,31 +527,31 @@ function N({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
501
527
  })]
502
528
  });
503
529
  }
504
- function P({ fixed: e, truncate: t, children: n }) {
530
+ function F({ fixed: e, truncate: t, children: n }) {
505
531
  let r = typeof n == "string" && (t ?? e);
506
532
  return /* @__PURE__ */ _("span", {
507
533
  ...{
508
- 0: { className: "x78zum5 x6s0dn4 xeuugli xh8yej3 x1dqyrwa" },
534
+ 0: { className: "x78zum5 x6s0dn4 xeuugli xh8yej3 xz7qr2x" },
509
535
  1: { className: "x78zum5 x6s0dn4 xeuugli xh8yej3 xt7dq6l" }
510
536
  }[!e | 0],
511
537
  children: /* @__PURE__ */ _("span", {
512
538
  title: typeof n == "string" ? n : void 0,
513
539
  ...{
514
540
  0: { className: "x1lliihq xeuugli x193iq5w" },
515
- 2: { className: "x1lliihq xeuugli x193iq5w xh8yej3 xjexgjb" },
541
+ 2: { className: "x1lliihq xeuugli x193iq5w xh8yej3 xhbluta" },
516
542
  1: { className: "x1lliihq xeuugli x193iq5w xb3r6kr xuxw1ft xlyipyv" },
517
- 3: { className: "x1lliihq xeuugli x193iq5w xh8yej3 xjexgjb xb3r6kr xuxw1ft xlyipyv" }
543
+ 3: { className: "x1lliihq xeuugli x193iq5w xh8yej3 xhbluta xb3r6kr xuxw1ft xlyipyv" }
518
544
  }[!!e << 1 | !!r],
519
545
  children: n
520
546
  })
521
547
  });
522
548
  }
523
- function F(e) {
549
+ function I(e) {
524
550
  if (e.defaultPrevented || e.button !== 0) return !1;
525
551
  let t = e.metaKey || e.ctrlKey, n = e.altKey || e.shiftKey;
526
552
  return t || n ? !1 : e.detail === 0 || e.currentTarget.ownerDocument.getSelection()?.isCollapsed !== !1;
527
553
  }
528
- function ge({ row: e, action: t, active: n, children: r, onKeyDown: i }) {
554
+ function he({ row: e, action: t, active: n, children: r, onKeyDown: i }) {
529
555
  let a = t.label?.(e), o = t.href === void 0 ? /* @__PURE__ */ _("button", {
530
556
  type: "button",
531
557
  "aria-label": a,
@@ -533,9 +559,9 @@ function ge({ row: e, action: t, active: n, children: r, onKeyDown: i }) {
533
559
  "data-row-action": !0,
534
560
  onKeyDown: i,
535
561
  onClick: (n) => {
536
- F(n) && t.onActivate(e);
562
+ I(n) && t.onActivate(e);
537
563
  },
538
- className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli xaeotn9 xwu7q15 x1717udv xc342km x1cum3z5 x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x13qnu6 x9v5kkp x19rmrnh x7s97pk",
564
+ className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli xaeotn9 xwu7q15 x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x13qnu6 x9v5kkp x19rmrnh x7s97pk",
539
565
  children: r
540
566
  }) : /* @__PURE__ */ _("a", {
541
567
  href: t.href(e),
@@ -543,113 +569,163 @@ function ge({ row: e, action: t, active: n, children: r, onKeyDown: i }) {
543
569
  "data-row-action": !0,
544
570
  onKeyDown: i,
545
571
  onClick: (n) => {
546
- t.onActivate !== void 0 && F(n) && (n.preventDefault(), t.onActivate(e));
572
+ t.onActivate !== void 0 && I(n) && (n.preventDefault(), t.onActivate(e));
547
573
  },
548
- className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli xaeotn9 xwu7q15 x1717udv xc342km x1cum3z5 x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x13qnu6 x9v5kkp x19rmrnh x7s97pk",
574
+ className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli xaeotn9 xwu7q15 x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x13qnu6 x9v5kkp x19rmrnh x7s97pk",
549
575
  children: r
550
576
  });
551
- return a === void 0 ? o : /* @__PURE__ */ v(c.Root, { children: [/* @__PURE__ */ _(c.Trigger, { render: o }), /* @__PURE__ */ _(c.Portal, { children: /* @__PURE__ */ _(c.Positioner, {
577
+ return a === void 0 ? o : /* @__PURE__ */ v(s.Root, { children: [/* @__PURE__ */ _(s.Trigger, { render: o }), /* @__PURE__ */ _(s.Portal, { children: /* @__PURE__ */ _(s.Positioner, {
552
578
  side: "top",
553
579
  align: "start",
554
- children: /* @__PURE__ */ _(c.Popup, { children: a })
580
+ children: /* @__PURE__ */ _(s.Popup, { children: a })
555
581
  }) })] });
556
582
  }
557
583
  // packages/collections/src/collection-scroll.tsx
558
- function I(e) {
559
- switch (e.status) {
560
- case "loading": return /* @__PURE__ */ _("span", {
584
+ function L(r) {
585
+ switch (r.status) {
586
+ case "loading": return /* @__PURE__ */ _(t, {
561
587
  role: "status",
562
- children: e.message ?? "Loading…"
588
+ variant: "caption",
589
+ tone: "muted",
590
+ children: r.message ?? "Loading…"
563
591
  });
564
- case "complete": return e.message === void 0 ? null : /* @__PURE__ */ _(a, { children: e.message });
565
- case "ready": return /* @__PURE__ */ _(t, {
566
- onClick: e.onLoadMore,
567
- children: e.message ?? "Load more"
592
+ case "complete": return r.message === void 0 ? null : /* @__PURE__ */ _(t, {
593
+ variant: "caption",
594
+ tone: "muted",
595
+ children: r.message
568
596
  });
569
- case "error": return /* @__PURE__ */ v(r, {
597
+ case "ready": return /* @__PURE__ */ _(e, {
598
+ onClick: r.onLoadMore,
599
+ children: r.message ?? "Load more"
600
+ });
601
+ case "error": return /* @__PURE__ */ v(n, {
570
602
  role: "status",
571
- children: [/* @__PURE__ */ _(a, { children: e.message ?? "More records could not be loaded." }), /* @__PURE__ */ _(t, {
572
- onClick: e.onLoadMore,
603
+ children: [/* @__PURE__ */ _(t, {
604
+ variant: "caption",
605
+ tone: "muted",
606
+ children: r.message ?? "More records could not be loaded."
607
+ }), /* @__PURE__ */ _(e, {
608
+ onClick: r.onLoadMore,
573
609
  children: "Retry"
574
610
  })]
575
611
  });
576
612
  }
577
613
  }
578
- function L({ children: e, endContent: t, onEndReached: n, fill: r = !1, endPosition: i = "end" }) {
579
- let a = m(null), o = m(null);
580
- O({
581
- end: o,
582
- viewport: r ? a : void 0,
614
+ function R({ children: e, endContent: t, onEndReached: n, fill: r = !1, endPosition: i = "end", label: a = "Collection" }) {
615
+ let o = m(null), s = m(null);
616
+ k({
617
+ end: s,
618
+ viewport: r ? o : void 0,
583
619
  onEndReached: n,
584
620
  content: e
585
621
  });
586
- let s = /* @__PURE__ */ _("div", {
587
- ref: o,
622
+ let c = /* @__PURE__ */ _("div", {
623
+ ref: s,
588
624
  ...{
589
625
  0: {},
590
- 1: { className: "x15x95ik x1az1eml xid9utz x1c8xbx5 x153jb6y xy8obcc x2b8uid" }
626
+ 1: { className: "x15x95ik x1az1eml xid9utz x1c8xbx5 x153jb6y xy8obcc x1hz01jw xas2l8k x2b8uid" }
591
627
  }[t !== void 0 | 0],
592
628
  children: t
593
629
  });
594
630
  return /* @__PURE__ */ v("div", {
595
- ref: a,
631
+ ref: o,
632
+ role: r ? "region" : void 0,
633
+ "aria-label": r ? a : void 0,
634
+ tabIndex: r ? 0 : void 0,
596
635
  ...{
597
- 0: {},
598
- 1: { className: "x98rzlu x2lwn1j x1odjw0f x1e4zzel" }
636
+ 0: { className: "xeuugli" },
637
+ 1: { className: "xeuugli x98rzlu x2lwn1j x1odjw0f x1e4zzel x1t137rt x13qnu6 x9v5kkp x19rmrnh x1bqaal" }
599
638
  }[!!r | 0],
600
639
  children: [
601
- i === "start" && s,
640
+ i === "start" && c,
602
641
  e,
603
- i === "end" && s
642
+ i === "end" && c
604
643
  ]
605
644
  });
606
645
  }
607
646
  // packages/collections/src/inspector.tsx
608
- function R({ master: e, detail: t, label: n, ...r }) {
609
- return /* @__PURE__ */ v("div", {
610
- ...u({ className: "xrvj5dj x1mkdm3x xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xb3r6kr" }, r),
611
- children: [/* @__PURE__ */ _("div", {
612
- className: "xeuugli",
613
- children: e
614
- }), /* @__PURE__ */ _("aside", {
615
- "aria-label": n,
616
- className: "xeuugli x1jvlu93 xpvm0e4 x178xt8z x13fuv20 xhjagg4",
617
- children: t
618
- })]
647
+ var z = 860;
648
+ function B({ master: t, detail: n, label: r, masterLabel: i, revealKey: a, returnFocusRef: o, ...s }) {
649
+ let c = m(null), l = m(null), d = m(null);
650
+ p(() => {
651
+ a !== void 0 && c.current !== null && d.current !== null && c.current.clientWidth <= z && (d.current.focus({ preventScroll: !0 }), d.current.scrollIntoView({
652
+ block: "start",
653
+ behavior: "instant"
654
+ }));
655
+ }, [a]);
656
+ function ee() {
657
+ let e = o?.current ?? l.current;
658
+ e?.focus({ preventScroll: !0 }), e?.scrollIntoView({
659
+ block: "nearest",
660
+ behavior: "instant"
661
+ });
662
+ }
663
+ return /* @__PURE__ */ _("div", {
664
+ ...u({ className: "x9vvk8s x12h1iku xeuugli xbixft x1hz01jw xtqrqnz x1778rvt" }, s),
665
+ children: /* @__PURE__ */ v("div", {
666
+ ref: c,
667
+ className: "xrvj5dj x4ruv2j x1y7acmc x7a106z x1j825kq xeuugli",
668
+ children: [/* @__PURE__ */ _("div", {
669
+ ref: l,
670
+ role: "group",
671
+ "aria-label": i,
672
+ tabIndex: -1,
673
+ className: "xeuugli",
674
+ children: t
675
+ }), /* @__PURE__ */ v("aside", {
676
+ ref: d,
677
+ "aria-label": r,
678
+ tabIndex: -1,
679
+ className: "x7wzq59 x7cfggw xqfmuo8 xeuugli x1sbza1b xhuqrux xexx8yu xdz7uhd xpilrb4 xdctr63 x1t7ytsu x97x49r x972fbf x1mg79u0 x13fuv20 xhjagg4 x14ijc3v x13qnu6 x9v5kkp x19rmrnh x12ijfkc",
680
+ children: [/* @__PURE__ */ _("div", {
681
+ className: "x1s85apg x1yamub6 x1xxlxpq",
682
+ children: /* @__PURE__ */ v(e, {
683
+ size: "sm",
684
+ variant: "ghost",
685
+ onClick: ee,
686
+ children: ["Back to ", i.toLowerCase()]
687
+ })
688
+ }), n]
689
+ })]
690
+ })
619
691
  });
620
692
  }
621
- function z({ items: e, ...t }) {
693
+ function V({ items: e, ...t }) {
622
694
  return /* @__PURE__ */ _("dl", {
623
- ...u({ className: "x1ghz6dp xrvj5dj x10i657a x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
695
+ ...u({ className: "x1ghz6dp xrvj5dj xezdspq x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
624
696
  children: e.map(({ label: e, value: t }) => /* @__PURE__ */ v("div", {
625
697
  className: "xjp7ctv",
626
698
  children: [/* @__PURE__ */ _("dt", {
627
- className: "x153jb6y",
699
+ className: "xeuugli x153jb6y xj0a0fe",
628
700
  children: e
629
701
  }), /* @__PURE__ */ _("dd", {
630
- className: "x1ghz6dp xbixft xj0a0fe xss6m8b",
702
+ className: "xeuugli x1ghz6dp xbixft xj0a0fe xss6m8b",
631
703
  children: t
632
704
  })]
633
705
  }, e))
634
706
  });
635
707
  }
636
708
  // packages/collections/src/list-footer.tsx
637
- function B({ children: e, actions: t, ...n }) {
709
+ function H({ children: e, actions: t, ...n }) {
638
710
  return /* @__PURE__ */ v("div", {
639
- ...u({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
640
- children: [/* @__PURE__ */ _("div", { children: e }), t != null && /* @__PURE__ */ _("div", {
641
- className: "x78zum5 x6s0dn4 x1hnptsi",
711
+ ...u({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak xeuugli x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
712
+ children: [/* @__PURE__ */ _("div", {
713
+ className: "xeuugli xj0a0fe",
714
+ children: e
715
+ }), t != null && /* @__PURE__ */ _("div", {
716
+ className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli",
642
717
  children: t
643
718
  })]
644
719
  });
645
720
  }
646
721
  // packages/collections/src/metrics.tsx
647
- var V = {
722
+ var U = {
648
723
  grid: {
649
724
  k1xSpc: "x78zum5",
650
725
  kwnvtZ: "x1a02dak",
651
726
  khm7nJ: "xpb3s3w",
652
727
  k1C7PZ: "x1i3977y",
728
+ k7Eaqz: "xeuugli",
653
729
  kogj98: "x1ghz6dp",
654
730
  $$css: !0
655
731
  },
@@ -661,49 +737,46 @@ var V = {
661
737
  kogj98: "x1ghz6dp",
662
738
  $$css: !0
663
739
  }
664
- }, H = {
665
- inline: V.grid,
666
- columns: V.columns
740
+ }, W = {
741
+ inline: U.grid,
742
+ columns: U.columns
667
743
  };
668
- function U({ layout: e = "inline", ...t }) {
669
- return /* @__PURE__ */ _("dl", { ...u(d.props(H[e]), t) });
744
+ function G({ layout: e = "inline", ...t }) {
745
+ return /* @__PURE__ */ _("dl", { ...u(d.props(W[e]), t) });
670
746
  }
671
- function W({ label: e, value: t, ...n }) {
747
+ function K({ label: e, value: t, ...n }) {
672
748
  return /* @__PURE__ */ v("div", {
673
- ...u({ className: "x3nfvp2 x1pha0wt xunmzkg xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
749
+ ...u({ className: "x3nfvp2 x1pha0wt x1a02dak xunmzkg xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
674
750
  children: [/* @__PURE__ */ _("dt", {
675
- className: "x153jb6y x9ek82g",
751
+ className: "xeuugli x153jb6y x9ek82g xj0a0fe",
676
752
  children: e
677
753
  }), /* @__PURE__ */ _("dd", {
678
- className: "x1ghz6dp xbixft xk50ysn xss6m8b",
754
+ className: "xeuugli x1ghz6dp xbixft xk4h15q xss6m8b xj0a0fe",
679
755
  children: t
680
756
  })]
681
757
  });
682
758
  }
683
759
  // packages/collections/src/table.tsx
684
- var G = {
685
- kzqmXN: "x5lhr3w",
760
+ var q = {
761
+ kzqmXN: "x11ymkkh x2ipgtl",
686
762
  $$css: !0
687
- }, K = {
763
+ }, J = {
688
764
  secondary: {
689
765
  k1xSpc: "x1n9xxwz xazwdyr",
690
766
  $$css: !0
691
767
  },
692
- compactWidth: {
693
- kzqmXN: "x2ipgtl",
694
- $$css: !0
695
- },
696
- column: (e) => [G, { "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(`${e}%`) }],
768
+ column: (e) => [q, { "--x-1xmrurk": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(`${e}%`) }],
697
769
  th: {
698
770
  kVAEAm: "x1n2onr6",
699
- kZKoxP: "xc9qbxq",
771
+ kZKoxP: "x24vdcc",
700
772
  kB7OPa: "x9f619",
701
773
  k8WAf4: "xt970qd",
702
774
  kg3NbH: "x1m92p3w",
703
775
  kWkggS: "xpvm0e4",
704
776
  kMwMTN: "x153jb6y",
705
777
  kGuDYH: "xy8obcc",
706
- k63SB2: "xo1l8bm",
778
+ k63SB2: "xj57cvi",
779
+ kLWn49: "xas2l8k",
707
780
  khDVqt: "xuxw1ft",
708
781
  k5JduY: "x1s928wv",
709
782
  kwXMNM: "x1j6awrg",
@@ -723,13 +796,13 @@ var G = {
723
796
  $$css: !0
724
797
  }
725
798
  };
726
- function q({ headers: e, children: t, label: n, ...r }) {
799
+ function Y({ headers: e, children: t, label: n, ...r }) {
727
800
  let i = e.findLastIndex((e) => typeof e == "string" || e.secondary !== !0);
728
801
  return /* @__PURE__ */ _("div", {
729
802
  role: "region",
730
803
  "aria-label": n,
731
804
  tabIndex: 0,
732
- className: "xeuugli xh8yej3 xw2csxc x13qnu6 x9v5kkp x19rmrnh x1bqaal",
805
+ className: "xeuugli xh8yej3 xw2csxc x1t137rt x13qnu6 x9v5kkp x19rmrnh x1bqaal",
733
806
  children: /* @__PURE__ */ v("table", {
734
807
  ...u({ "aria-label": n }, {
735
808
  0: { className: "xh8yej3 x1mwwwfo xpvm0e4 x1hz01jw xvmahel xtqrqnz x1778rvt xdpxx8g" },
@@ -737,17 +810,21 @@ function q({ headers: e, children: t, label: n, ...r }) {
737
810
  }[!!e.some((e) => typeof e != "string") | 0], r),
738
811
  children: [/* @__PURE__ */ _("thead", { children: /* @__PURE__ */ _("tr", { children: e.map((t, n) => /* @__PURE__ */ _("th", {
739
812
  scope: "col",
740
- ...d.props(K.th, typeof t != "string" && K.column(t.width), typeof t != "string" && K.compactWidth, typeof t != "string" && t.secondary === !0 && K.secondary, n === e.length - 1 && K.lastHeader, n === i && K.lastPrimaryHeader),
741
- children: typeof t == "string" ? t : t.label
813
+ ...d.props(J.th, typeof t != "string" && J.column(t.width), typeof t != "string" && t.secondary === !0 && J.secondary, n === e.length - 1 && J.lastHeader, n === i && J.lastPrimaryHeader),
814
+ children: /* @__PURE__ */ _("span", {
815
+ title: typeof t == "string" ? t : t.label,
816
+ className: "x1lliihq xb3r6kr xlyipyv",
817
+ children: typeof t == "string" ? t : t.label
818
+ })
742
819
  }, typeof t == "string" ? t : t.label)) }) }), /* @__PURE__ */ _("tbody", { children: t })]
743
820
  })
744
821
  });
745
822
  }
746
- function J({ children: e, secondary: t = !1, mobileLabel: n, ...r }) {
823
+ function X({ children: e, secondary: t = !1, mobileLabel: n, ...r }) {
747
824
  return /* @__PURE__ */ v("td", {
748
825
  ...u({
749
- 0: { className: "x14o62y9 x9f619 x1t0vds8 x1m92p3w xbixft xxymvpz xuxw1ft xss6m8b xb3r6kr xlyipyv" },
750
- 1: { className: "x14o62y9 x9f619 x1t0vds8 x1m92p3w xbixft xxymvpz xuxw1ft xss6m8b xb3r6kr xlyipyv x1n9xxwz xazwdyr" }
826
+ 0: { className: "x1v2how9 x9f619 x1hmw7ec x1m92p3w xbixft xxymvpz xuxw1ft xss6m8b xb3r6kr xlyipyv" },
827
+ 1: { className: "x1v2how9 x9f619 x1hmw7ec x1m92p3w xbixft xxymvpz xuxw1ft xss6m8b xb3r6kr xlyipyv x1n9xxwz xazwdyr" }
751
828
  }[!!t | 0], r),
752
829
  children: [e, n !== void 0 && /* @__PURE__ */ _("small", {
753
830
  className: "x1s85apg xacuhyv x153jb6y xy8obcc xas2l8k xb3r6kr xlyipyv",
@@ -756,64 +833,64 @@ function J({ children: e, secondary: t = !1, mobileLabel: n, ...r }) {
756
833
  });
757
834
  }
758
835
  // packages/collections/src/timestamp.tsx
759
- function Y({ dateTime: e, label: t, title: n }) {
836
+ function ge({ dateTime: e, label: t, title: n }) {
760
837
  return n === void 0 ? /* @__PURE__ */ _("time", {
761
838
  dateTime: e,
762
- className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xuxw1ft x13qnu6 x9v5kkp x19rmrnh x7s97pk",
839
+ className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
763
840
  children: t
764
- }) : /* @__PURE__ */ v(c.Root, { children: [/* @__PURE__ */ _(c.Trigger, {
841
+ }) : /* @__PURE__ */ v(s.Root, { children: [/* @__PURE__ */ _(s.Trigger, {
765
842
  render: /* @__PURE__ */ _("time", {
766
843
  dateTime: e,
767
844
  tabIndex: 0,
768
845
  "aria-label": n,
769
- className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xuxw1ft x13qnu6 x9v5kkp x19rmrnh x7s97pk"
846
+ className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk"
770
847
  }),
771
848
  children: t
772
- }), /* @__PURE__ */ _(c.Portal, { children: /* @__PURE__ */ _(c.Positioner, { children: /* @__PURE__ */ _(c.Popup, { children: n }) }) })] });
849
+ }), /* @__PURE__ */ _(s.Portal, { children: /* @__PURE__ */ _(s.Positioner, { children: /* @__PURE__ */ _(s.Popup, { children: n }) }) })] });
773
850
  }
774
851
  // packages/collections/src/timeline.tsx
775
- function X({ label: e, children: t }) {
852
+ function Z({ label: e, children: t }) {
776
853
  return /* @__PURE__ */ _("ol", {
777
854
  "aria-label": e,
778
855
  className: "xe8uvvx x1ghz6dp x1717udv xeuugli",
779
856
  children: t
780
857
  });
781
858
  }
782
- function Z({ icon: e, title: t, time: n, metadata: r, children: a, details: o, defaultOpen: s = !1 }) {
859
+ function Q({ icon: e, title: t, time: n, metadata: i, children: a, details: o, defaultOpen: s = !1 }) {
783
860
  let [c, l] = h(s), u = /* @__PURE__ */ v("div", {
784
861
  className: "x78zum5 x1pha0wt x1hnptsi x1a02dak xeuugli",
785
862
  children: [/* @__PURE__ */ _("div", {
786
- className: "xeuugli xk50ysn xj0a0fe",
787
- children: o === void 0 ? t : /* @__PURE__ */ _(i.Trigger, {
788
- className: "x14atkfc xisnujt xwu7q15 xt970qd xlqzeqv",
863
+ className: "xeuugli xk4h15q xj0a0fe",
864
+ children: o === void 0 ? t : /* @__PURE__ */ _(r.Trigger, {
865
+ className: "x14atkfc x16exltd xwu7q15 xt970qd xlqzeqv",
789
866
  children: t
790
867
  })
791
- }), n !== void 0 && /* @__PURE__ */ _("div", {
792
- className: "x153jb6y xy8obcc xss6m8b",
868
+ }), n != null && /* @__PURE__ */ _("div", {
869
+ className: "xeuugli x153jb6y xy8obcc xas2l8k xss6m8b xj0a0fe",
793
870
  children: n
794
871
  })]
795
872
  }), d = /* @__PURE__ */ v(g, { children: [
796
873
  u,
797
- a !== void 0 && (!c || o === void 0) && /* @__PURE__ */ _("div", {
874
+ a != null && (!c || o === void 0) && /* @__PURE__ */ _("div", {
798
875
  className: "xeuugli x1ewvobj xj0a0fe",
799
876
  children: a
800
877
  }),
801
- r !== void 0 && /* @__PURE__ */ _("div", {
802
- className: "x153jb6y xy8obcc",
803
- children: r
878
+ i != null && /* @__PURE__ */ _("div", {
879
+ className: "xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
880
+ children: i
804
881
  }),
805
- o !== void 0 && /* @__PURE__ */ _(i.Panel, { children: o })
882
+ o !== void 0 && /* @__PURE__ */ _(r.Panel, { children: o })
806
883
  ] });
807
884
  return /* @__PURE__ */ v("li", {
808
- className: "x1n2onr6 xrvj5dj x1qpdrs7 x1y1mm1b xhlx3wy xeuugli x1hz01jw xtqrqnz x1778rvt xbixft x1cpjm7i x1hmns74 x1lk18uv x1gi6gvw x1jw5pjq x1vgi0k x1mi36wk x1wse844 xup0pd7",
885
+ className: "x1n2onr6 xrvj5dj x1eqwfih x1y1mm1b xhlx3wy xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt xbixft x1cpjm7i x1hmns74 x1lk18uv x1gi6gvw x1jw5pjq x1vgi0k x1mi36wk x1wse844 xup0pd7",
809
886
  children: [/* @__PURE__ */ _("span", {
810
887
  "aria-hidden": !0,
811
- className: "x78zum5 x6s0dn4 x1qx5ct2 x153jb6y",
888
+ className: "x78zum5 x6s0dn4 xl56j7k x1b1e0sl x153jb6y",
812
889
  children: e
813
890
  }), o === void 0 ? /* @__PURE__ */ _("div", {
814
891
  className: "xrvj5dj x1hnptsi xeuugli",
815
892
  children: d
816
- }) : /* @__PURE__ */ _(i.Root, {
893
+ }) : /* @__PURE__ */ _(r.Root, {
817
894
  open: c,
818
895
  onOpenChange: l,
819
896
  className: "xrvj5dj x1hnptsi xeuugli xh8yej3",
@@ -821,8 +898,8 @@ function Z({ icon: e, title: t, time: n, metadata: r, children: a, details: o, d
821
898
  })]
822
899
  });
823
900
  }
824
- var Q = {
825
- Root: X,
826
- Item: Z
901
+ var $ = {
902
+ Root: Z,
903
+ Item: Q
827
904
  };
828
- export { J as Cell, I as CollectionEnd, D as CollectionPagination, L as CollectionScroll, w as CollectionToolbar, E as ColumnControls, N as DataTable, M as DataTableText, z as Details, T as FilterChips, R as Inspector, B as ListFooter, W as Metric, U as MetricGrid, q as Table, Q as Timeline, Y as Timestamp };
905
+ export { X as Cell, L as CollectionEnd, O as CollectionPagination, R as CollectionScroll, T as CollectionToolbar, D as ColumnControls, P as DataTable, N as DataTableText, V as Details, E as FilterChips, B as Inspector, H as ListFooter, K as Metric, G as MetricGrid, Y as Table, $ as Timeline, ge as Timestamp };