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