@mechane-ai/elements 0.37.0 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { D as e, E as t, T as n, _ as r, i, j as a, m as o, p as s, t as c, w as l } from "./src-C-Sx37kz.js";
2
- import { t as u } from "./code-block-DT1TCkTC.js";
3
- import { a as d } from "./src-D9DktxEq.js";
2
+ import { t as u } from "./code-block-aC0Htt4N.js";
3
+ import { a as d } from "./src-DWjAoOyd.js";
4
4
  import { t as f } from "./content-link-B3ObdyZY.js";
5
5
  import { r as p, t as m } from "./src-d7EAi61b.js";
6
6
  import { f as h, l as g } from "./src-nkgFDl-g.js";
@@ -6,9 +6,10 @@ import { t as i } from "./pierre-theme-BpNaWn1x.js";
6
6
  import * as a from "@stylexjs/stylex";
7
7
  import { useEffect as o, useRef as s, useState as c } from "react";
8
8
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
9
+ import { getFiletypeFromFileName as d } from "@pierre/diffs";
9
10
  // packages/content/src/code/use-highlighted-code.ts
10
- var d = 2e5, f = 4096;
11
- function p(e, t) {
11
+ var f = 2e5, p = 4096;
12
+ function m(e, t) {
12
13
  let n = s(null), [r, a] = c();
13
14
  return o(() => () => {
14
15
  n.current !== null && (n.current.tokenizer.dispose(), n.current = null);
@@ -17,7 +18,7 @@ function p(e, t) {
17
18
  async function o() {
18
19
  try {
19
20
  let o = await import("@pierre/highlights");
20
- if (!r || e.length > d || !o.isSupportedLanguage(t)) return;
21
+ if (!r || e.length > f || !o.isSupportedLanguage(t)) return;
21
22
  let s = n.current, c = s !== null && s.language === t, l = c ? s : {
22
23
  language: t,
23
24
  source: e,
@@ -25,7 +26,7 @@ function p(e, t) {
25
26
  code: e,
26
27
  lang: t,
27
28
  theme: i,
28
- tokenizeMaxLineLength: f
29
+ tokenizeMaxLineLength: p
29
30
  })
30
31
  };
31
32
  if (c) {
@@ -49,11 +50,11 @@ function p(e, t) {
49
50
  };
50
51
  let u = l.tokenizer;
51
52
  u.flush();
52
- let p = Array.from({ length: u.lineCount }, (e, t) => u.getLineTokens(t).tokens);
53
+ let d = Array.from({ length: u.lineCount }, (e, t) => u.getLineTokens(t).tokens);
53
54
  a({
54
55
  code: e,
55
56
  language: t,
56
- lines: p,
57
+ lines: d,
57
58
  hasFailed: !1
58
59
  });
59
60
  } catch {
@@ -71,13 +72,13 @@ function p(e, t) {
71
72
  }, [e, t]), r !== void 0 && r.code === e && r.language === t ? r : void 0;
72
73
  }
73
74
  // packages/content/src/code/code-block.tsx
74
- var m = {
75
+ var h = {
75
76
  kVQacm: "xysyzu8",
76
77
  k9g6sI: "x12h1iku",
77
78
  $$css: !0
78
- }, h = {
79
+ }, g = {
79
80
  viewport: (e) => [
80
- m,
81
+ h,
81
82
  {
82
83
  kskxy: e == null ? e : "x1jols5v",
83
84
  $$css: !0
@@ -96,62 +97,62 @@ var m = {
96
97
  k63SB2: "x1b5ytql",
97
98
  $$css: !0
98
99
  }
99
- }, g = 2e5;
100
- function _({ token: e }) {
100
+ }, _ = 2e5;
101
+ function v({ token: e }) {
101
102
  let n = e.fontStyle ?? 0, [r, i] = [!!(n & 1), !!(n & 2)];
102
103
  return /* @__PURE__ */ l("span", {
103
- ...a.props(h.token(e.color ?? t.ink), r && h.italic, i && h.bold),
104
+ ...a.props(g.token(e.color ?? t.ink), r && g.italic, i && g.bold),
104
105
  children: e.content
105
106
  });
106
107
  }
107
- function v({ code: t, variant: i = "default", language: o = "text", filename: s, isStreaming: c = !1, shouldWrap: d = !1, showLineNumbers: f = !0, selectedLines: m, annotations: v = [], maxHeight: y = 400, maxLines: b = 2e3 }) {
108
- let x = p(t, o), S = n(), C = t.slice(0, g).split(/\r\n|\n|\r/u), w = C.slice(0, Math.max(1, b)).map((e, t) => ({
108
+ function y({ code: t, variant: i = "default", language: o, filename: s, isStreaming: c = !1, shouldWrap: f = !1, showLineNumbers: p = !0, selectedLines: h, annotations: y = [], maxHeight: b = 400, maxLines: x = 2e3 }) {
109
+ let S = o ?? (s === void 0 ? "text" : d(s)), C = m(t, S), w = n(), T = t.slice(0, _).split(/\r\n|\n|\r/u), E = T.slice(0, Math.max(1, x)).map((e, t) => ({
109
110
  text: e,
110
111
  line: t + 1
111
- })), T = s ?? o, E = i === "embedded";
112
+ })), D = s ?? S, O = i === "embedded";
112
113
  return /* @__PURE__ */ u("section", {
113
114
  "aria-label": s ?? "Code",
114
- ...a.props(r.root, E && r.embedded),
115
+ ...a.props(r.root, O && r.embedded),
115
116
  children: [
116
117
  /* @__PURE__ */ u("div", {
117
- ...a.props(r.header, E && r.embeddedHeader),
118
+ ...a.props(r.header, O && r.embeddedHeader),
118
119
  children: [/* @__PURE__ */ u("span", {
119
120
  ...a.props(r.label),
120
- children: [T, c && !E && " · streaming"]
121
+ children: [D, c && !O && " · streaming"]
121
122
  }), /* @__PURE__ */ l(e, {
122
123
  label: s ?? "code",
123
124
  value: t,
124
- display: E ? "icon" : "value",
125
+ display: O ? "icon" : "value",
125
126
  children: "Copy"
126
127
  })]
127
128
  }),
128
129
  /* @__PURE__ */ l("div", {
129
- ref: S.ref,
130
+ ref: w.ref,
130
131
  role: "region",
131
- "aria-label": `${T} source`,
132
- tabIndex: S.tabIndex,
133
- ...a.props(r.scrollRegion, h.viewport(y)),
132
+ "aria-label": `${D} source`,
133
+ tabIndex: w.tabIndex,
134
+ ...a.props(r.scrollRegion, g.viewport(b)),
134
135
  children: /* @__PURE__ */ l("pre", {
135
136
  ...{
136
137
  0: { className: "x1ghz6dp xn9t2bk xiard35 xy8obcc x1778rvt xeq4nuv xk8lq53" },
137
138
  1: { className: "x1ghz6dp xn9t2bk xiard35 xy8obcc x1778rvt xeq4nuv xeuugli x126k92a xj0a0fe" }
138
- }[!!d | 0],
139
+ }[!!f | 0],
139
140
  children: /* @__PURE__ */ l("code", {
140
141
  className: "xjb2p0i",
141
- children: w.map(({ text: e, line: t }) => {
142
- let n = x === void 0 ? void 0 : x.lines[t - 1], r = m !== void 0 && t >= m.start && t <= (m.end ?? m.start), i = v.find((e) => e.line === t);
142
+ children: E.map(({ text: e, line: t }) => {
143
+ let n = C === void 0 ? void 0 : C.lines[t - 1], r = h !== void 0 && t >= h.start && t <= (h.end ?? h.start), i = y.find((e) => e.line === t);
143
144
  return /* @__PURE__ */ u("span", { children: [/* @__PURE__ */ u("span", {
144
145
  ...{
145
146
  0: { className: "x78zum5 x16exltd" },
146
147
  1: { className: "x78zum5 x16exltd x1r8u7ye" }
147
148
  }[!!r | 0],
148
- children: [f && /* @__PURE__ */ l("span", {
149
+ children: [p && /* @__PURE__ */ l("span", {
149
150
  "aria-hidden": !0,
150
151
  className: "x1rg5ohu x2lah0s xl3ry0p x5g2kb4 xp4054r x153jb6y x87ps6o",
151
152
  children: t
152
153
  }), /* @__PURE__ */ u("span", {
153
154
  className: "x1lliihq x12lumcd x1doqdfy xeuugli",
154
- children: [n === void 0 ? e : n.map((e) => /* @__PURE__ */ l(_, { token: e }, e.offset)), e.length === 0 && "\n"]
155
+ children: [n === void 0 ? e : n.map((e) => /* @__PURE__ */ l(v, { token: e }, e.offset)), e.length === 0 && "\n"]
155
156
  })]
156
157
  }), i !== void 0 && /* @__PURE__ */ l("span", {
157
158
  className: "x1lliihq x9f619 x7wzq59 x1o0tod xzfn7dr x1mvvolr x1r7kqkb x1hz01jw xtqrqnz x1778rvt xeaf4i8 xj0a0fe",
@@ -161,11 +162,11 @@ function v({ code: t, variant: i = "default", language: o = "text", filename: s,
161
162
  })
162
163
  })
163
164
  }),
164
- C.length > w.length && /* @__PURE__ */ l("div", {
165
+ T.length > E.length && /* @__PURE__ */ l("div", {
165
166
  ...a.props(r.note),
166
167
  children: "Additional lines omitted. Copy includes the complete source."
167
168
  }),
168
- t.length > g && /* @__PURE__ */ l("div", {
169
+ t.length > _ && /* @__PURE__ */ l("div", {
169
170
  ...a.props(r.note),
170
171
  children: "Preview limited to the first 200,000 characters. Copy includes the complete source."
171
172
  }),
@@ -173,11 +174,11 @@ function v({ code: t, variant: i = "default", language: o = "text", filename: s,
173
174
  ...a.props(r.note),
174
175
  children: "No source text."
175
176
  }),
176
- x !== void 0 && x.hasFailed && /* @__PURE__ */ l("div", {
177
+ C !== void 0 && C.hasFailed && /* @__PURE__ */ l("div", {
177
178
  ...a.props(r.note),
178
179
  children: "Syntax highlighting unavailable. The source is shown unchanged."
179
180
  })
180
181
  ]
181
182
  });
182
183
  }
183
- export { v as t };
184
+ export { y as t };
@@ -4,14 +4,14 @@ import { t as s } from "./header-styles-COxCYFZx.js";
4
4
  import { i as c, r as l, t as u } from "./src-d7EAi61b.js";
5
5
  import { f as d } from "./src-nkgFDl-g.js";
6
6
  import { t as f } from "./accessibility-C-aIZ1Yx.js";
7
- import { p, x as ee } from "./tokens.stylex-CJbIDPB9.js";
8
- import { t as m } from "./use-scroll-tab-index-Dxpdh4W7.js";
9
- import { n as h } from "./forms-BQQFas9g.js";
10
- import { mergeProps as g } from "@base-ui/react/merge-props";
11
- import * as _ from "@stylexjs/stylex";
12
- import { Children as v, Fragment as y, useEffect as b, useLayoutEffect as x, useMemo as S, useRef as C, useState as w, useSyncExternalStore as T } from "react";
7
+ import { p, x as m } from "./tokens.stylex-CJbIDPB9.js";
8
+ import { t as h } from "./use-scroll-tab-index-Dxpdh4W7.js";
9
+ import { n as g } from "./forms-BQQFas9g.js";
10
+ import { mergeProps as _ } from "@base-ui/react/merge-props";
11
+ import * as v from "@stylexjs/stylex";
12
+ import { Children as y, Fragment as ee, useEffect as b, useLayoutEffect as x, useMemo as S, useRef as C, useState as w, useSyncExternalStore as T } from "react";
13
13
  import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
14
- import { ArrowDown as k, ArrowUp as te, ArrowUpDown as ne, ChevronLeft as A, ChevronRight as j, CircleDashed as M, ListFilter as N, Search as re, Settings2 as P, X as ie } from "lucide-react";
14
+ import { ArrowDown as k, ArrowUp as te, ArrowUpDown as ne, ChevronLeft as A, ChevronRight as j, CircleDashed as re, ListFilter as M, Search as N, Settings2 as P, X as ie } from "lucide-react";
15
15
  import { createColumnHelper as ae, tableFeatures as oe, useTable as se } from "@tanstack/react-table";
16
16
  import { defaultRangeExtractor as ce, useVirtualizer as le } from "@tanstack/react-virtual";
17
17
  // packages/collections/src/collection-controls.tsx
@@ -31,11 +31,11 @@ var F = {
31
31
  }
32
32
  };
33
33
  function I({ label: e, children: t, actions: n }) {
34
- let r = v.toArray(t).length > 0, i = v.toArray(n).length > 0;
34
+ let r = y.toArray(t).length > 0, i = y.toArray(n).length > 0;
35
35
  return !r && !i ? null : /* @__PURE__ */ O("div", {
36
36
  role: "group",
37
37
  "aria-label": e,
38
- ..._.props(s.row, s.blockEnd, F.toolbar),
38
+ ...v.props(s.row, s.blockEnd, F.toolbar),
39
39
  children: [t, i && /* @__PURE__ */ D("div", {
40
40
  className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli xvc5jky",
41
41
  children: n
@@ -308,21 +308,21 @@ var pe = oe({}), me = 76, R = p.compactTable.slice(7), he = /* @__PURE__ */ new
308
308
  }, ge = {
309
309
  fixed: B.content,
310
310
  content: B.contentCell
311
- }, H = {
311
+ }, _e = {
312
312
  primary: B.start,
313
313
  text: B.start,
314
314
  status: B.start,
315
315
  number: B.end,
316
316
  timestamp: B.end,
317
317
  actions: B.end
318
- }, _e = {
318
+ }, ve = {
319
319
  content: B.content,
320
320
  fill: B.fillFrame
321
- }, ve = {
321
+ }, ye = {
322
322
  content: B.content,
323
323
  fill: B.fillViewport
324
324
  };
325
- function ye(e) {
325
+ function be(e) {
326
326
  return e.map((e) => {
327
327
  let t = V[e.role], n = e.width ?? (t.isFlexible ? void 0 : t.minimumWidth);
328
328
  return {
@@ -331,67 +331,43 @@ function ye(e) {
331
331
  };
332
332
  });
333
333
  }
334
- function be(e, t = 0) {
334
+ function xe(e, t = 0) {
335
335
  return {
336
336
  minimumWidth: e.reduce((e, t) => e + (t.width ?? V[t.role].minimumWidth), t),
337
337
  compactWidth: e.filter((e) => e.isSecondary !== !0).reduce((e, t) => e + (t.width ?? V[t.role].minimumWidth), t)
338
338
  };
339
339
  }
340
- function xe(e) {
340
+ function Se(e) {
341
341
  let t = globalThis.matchMedia(R);
342
342
  return t.addEventListener("change", e), () => t.removeEventListener("change", e);
343
343
  }
344
- function Se() {
344
+ function Ce() {
345
345
  return globalThis.matchMedia(R).matches;
346
346
  }
347
- function Ce({ columns: e, canSelect: t = !1 }) {
348
- return /* @__PURE__ */ O("colgroup", { children: [t && /* @__PURE__ */ D("col", { className: "x1d7z9mz xeuugli x1dc62k6" }), e.map((e) => /* @__PURE__ */ D("col", { ..._.props(e.width !== void 0 && B.width(e.width), e.isSecondary === !0 && B.secondary) }, e.id))] });
347
+ function we({ columns: e, canSelect: t = !1 }) {
348
+ return /* @__PURE__ */ O("colgroup", { children: [t && /* @__PURE__ */ D("col", { className: "x1d7z9mz xeuugli x1dc62k6" }), e.map((e) => /* @__PURE__ */ D("col", { ...v.props(e.width !== void 0 && B.width(e.width), e.isSecondary === !0 && B.secondary) }, e.id))] });
349
349
  }
350
- function U({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHeaders: r = !1 }) {
351
- let i = ye(e), { minimumWidth: a, compactWidth: o } = be(i);
350
+ function H({ columns: e, rows: t = 3, hideCaption: n = !0, ...r }) {
351
+ let i = typeof r.window?.height == "string" ? r.window.height : "content", a = Array.from({ length: t }, (e, t) => ({ id: String(t) })), o = e.map(({ placeholder: e, ...t }) => ({
352
+ ...t,
353
+ cell: () => e ?? /* @__PURE__ */ D(d, { width: "60%" })
354
+ }));
352
355
  return /* @__PURE__ */ D("div", {
353
356
  "aria-hidden": !0,
354
357
  inert: !0,
355
- ..._.props(B.frame, _e[t], B.placeholder),
356
- children: /* @__PURE__ */ D("div", {
357
- ..._.props(B.viewport, ve[t]),
358
- children: /* @__PURE__ */ O("table", {
359
- ..._.props(B.table, B.fixed, B.minimumWidth(a, o)),
360
- children: [
361
- /* @__PURE__ */ D(Ce, { columns: i }),
362
- /* @__PURE__ */ D("thead", {
363
- ..._.props(r && f.hidden),
364
- children: /* @__PURE__ */ D("tr", { children: i.map((e) => /* @__PURE__ */ D("th", {
365
- ..._.props(B.header, H[e.role], e.width !== void 0 && B.width(e.width), e.isSecondary === !0 && B.secondary),
366
- children: /* @__PURE__ */ D("span", {
367
- className: "x1lliihq xeuugli xb3r6kr xlyipyv xuxw1ft",
368
- children: e.label
369
- })
370
- }, e.id)) })
371
- }),
372
- /* @__PURE__ */ D("tbody", { children: [
373
- "first",
374
- "second",
375
- "third"
376
- ].map((e) => /* @__PURE__ */ D("tr", {
377
- className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6",
378
- children: i.map((e) => /* @__PURE__ */ D("td", {
379
- ..._.props(B.cell, ge[n], H[e.role], e.width !== void 0 && B.width(e.width), e.isSecondary === !0 && B.secondary),
380
- children: /* @__PURE__ */ D(we, {
381
- role: e.role,
382
- isFixed: n === "fixed",
383
- shouldTruncate: void 0,
384
- children: e.placeholder ?? /* @__PURE__ */ D(d, { width: "60%" })
385
- })
386
- }, e.id))
387
- }, e)) })
388
- ]
389
- })
358
+ ...v.props(ve[i], B.placeholder),
359
+ children: /* @__PURE__ */ D(K, {
360
+ ...r,
361
+ hideCaption: n,
362
+ rows: a,
363
+ getRowId: (e) => e.id,
364
+ columns: o,
365
+ empty: null
390
366
  })
391
367
  });
392
368
  }
393
- function W({ children: e, leading: t, isDecorative: n = !1 }) {
394
- let r = v.toArray(t).length > 0;
369
+ function U({ children: e, leading: t, isDecorative: n = !1 }) {
370
+ let r = y.toArray(t).length > 0;
395
371
  return /* @__PURE__ */ O("span", {
396
372
  "aria-hidden": n || void 0,
397
373
  inert: n || void 0,
@@ -406,9 +382,9 @@ function W({ children: e, leading: t, isDecorative: n = !1 }) {
406
382
  })]
407
383
  });
408
384
  }
409
- function G({ children: e, secondary: t, leading: n, trailing: r }) {
410
- let i = v.toArray(r).length > 0;
411
- return /* @__PURE__ */ O(W, {
385
+ function W({ children: e, secondary: t, leading: n, trailing: r }) {
386
+ let i = y.toArray(r).length > 0;
387
+ return /* @__PURE__ */ O(U, {
412
388
  leading: n,
413
389
  children: [/* @__PURE__ */ O("span", {
414
390
  className: "x78zum5 x6s0dn4 x1hnptsi xeuugli",
@@ -427,8 +403,8 @@ function G({ children: e, secondary: t, leading: n, trailing: r }) {
427
403
  })]
428
404
  });
429
405
  }
430
- function K({ leading: e, isSecondary: t = !1 }) {
431
- return /* @__PURE__ */ O(W, {
406
+ function G({ leading: e, isSecondary: t = !1 }) {
407
+ return /* @__PURE__ */ O(U, {
432
408
  leading: e,
433
409
  isDecorative: !0,
434
410
  children: [/* @__PURE__ */ D("span", {
@@ -440,8 +416,8 @@ function K({ leading: e, isSecondary: t = !1 }) {
440
416
  })]
441
417
  });
442
418
  }
443
- function q({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, onSortChange: s, selectedIds: c, onSelectionChange: l, selectionLabel: u, rowAction: d, activeRowId: p, focusRowId: h, onRowHighlightChange: g, hideCaption: v = !1, hideHeaders: E = !1, rowSizing: A = "fixed", window: j, endContent: M, onEndReached: N, footer: re }) {
444
- let P = S(() => ye(t), [t]), ie = T(xe, Se, () => !1), oe = S(() => {
419
+ function K({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, onSortChange: s, selectedIds: c, onSelectionChange: l, selectionLabel: u, rowAction: d, activeRowId: p, focusRowId: g, onRowHighlightChange: _, hideCaption: y = !1, hideHeaders: E = !1, rowSizing: A = "fixed", window: j, endContent: re, onEndReached: M, footer: N }) {
420
+ let P = S(() => be(t), [t]), ie = T(Se, Ce, () => !1), oe = S(() => {
445
421
  let e = ae();
446
422
  return e.columns(P.map((t) => e.display({
447
423
  id: t.id,
@@ -452,10 +428,10 @@ function q({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
452
428
  columns: oe,
453
429
  data: e,
454
430
  getRowId: n
455
- }), I = m(), L = I.viewport, ue = C(null), de = C(null), R = C(null), [z, V] = w(0), [U, W] = w(), [G, K] = w(), q = C(void 0), J = C(void 0), Ee = C(void 0), Y = e.findIndex((e) => n(e) === U), De = P.findIndex((e) => e.role === "primary" && e.isSecondary !== !0), Oe = De === -1 ? P.findIndex((e) => e.isSecondary !== !0) : De, ke = typeof j?.height == "string" ? j.height : "content", Ae = new Set(e.map(n)), X = U !== void 0 && Ae.has(U) ? U : void 0;
456
- U !== void 0 && X === void 0 && W(void 0), fe({
431
+ }), I = h(), L = I.viewport, ue = C(null), de = C(null), R = C(null), [z, V] = w(0), [H, U] = w(), [W, G] = w(), K = C(void 0), q = C(void 0), J = C(void 0), Y = e.findIndex((e) => n(e) === H), De = P.findIndex((e) => e.role === "primary" && e.isSecondary !== !0), Oe = De === -1 ? P.findIndex((e) => e.isSecondary !== !0) : De, ke = typeof j?.height == "string" ? j.height : "content", Ae = new Set(e.map(n)), X = H !== void 0 && Ae.has(H) ? H : void 0;
432
+ H !== void 0 && X === void 0 && U(void 0), fe({
457
433
  end: ue,
458
- onEndReached: j === void 0 ? N : void 0,
434
+ onEndReached: j === void 0 ? M : void 0,
459
435
  content: e.length
460
436
  }), b(() => {
461
437
  let e = de.current, t = R.current;
@@ -464,7 +440,7 @@ function q({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
464
440
  return n.observe(e), n.observe(t), () => n.disconnect();
465
441
  }, [
466
442
  j,
467
- v,
443
+ y,
468
444
  E
469
445
  ]);
470
446
  let Z = le({
@@ -476,7 +452,7 @@ function q({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
476
452
  if (r === void 0) throw RangeError("The virtual row is outside the supplied table page.");
477
453
  return n(r);
478
454
  },
479
- estimateSize: () => A === "fixed" ? ee.rowHeight : j?.estimatedRowHeight ?? ee.rowHeight,
455
+ estimateSize: () => A === "fixed" ? m.rowHeight : j?.estimatedRowHeight ?? m.rowHeight,
480
456
  scrollMargin: z,
481
457
  scrollPaddingStart: z,
482
458
  overscan: 6,
@@ -500,41 +476,41 @@ function q({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
500
476
  index: e.index,
501
477
  spacerHeight: e.start - (n[t - 1]?.end ?? z)
502
478
  }];
503
- }), Me = je.some(({ row: e }) => e.id === G) ? G : void 0, Q = Me ?? X;
504
- G !== void 0 && Me === void 0 && K(void 0), b(() => {
505
- if (g === void 0) {
506
- q.current = void 0;
479
+ }), Me = je.some(({ row: e }) => e.id === W) ? W : void 0, Q = Me ?? X;
480
+ W !== void 0 && Me === void 0 && G(void 0), b(() => {
481
+ if (_ === void 0) {
482
+ K.current = void 0;
507
483
  return;
508
484
  }
509
- if (q.current !== void 0 && q.current.id === Q) return;
485
+ if (K.current !== void 0 && K.current.id === Q) return;
510
486
  let e = { isCurrent: !0 };
511
487
  return queueMicrotask(() => {
512
- e.isCurrent && (q.current = { id: Q }, g(Q));
488
+ e.isCurrent && (K.current = { id: Q }, _(Q));
513
489
  }), () => {
514
490
  e.isCurrent = !1;
515
491
  };
516
- }, [Q, g]);
517
- let Ne = je.some(({ row: e }) => e.id === h);
492
+ }, [Q, _]);
493
+ let Ne = je.some(({ row: e }) => e.id === g);
518
494
  x(() => {
519
- if (h === void 0) {
520
- Ee.current = void 0;
495
+ if (g === void 0) {
496
+ J.current = void 0;
521
497
  return;
522
498
  }
523
- if (Ee.current === h) return;
499
+ if (J.current === g) return;
524
500
  if (!Ne && j !== void 0) {
525
- let t = e.findIndex((e) => n(e) === h);
501
+ let t = e.findIndex((e) => n(e) === g);
526
502
  t !== -1 && Z.scrollToIndex(t, { align: "auto" });
527
503
  return;
528
504
  }
529
- let t = L.current?.querySelector(`[data-row-id="${CSS.escape(h)}"] [data-row-action]`);
505
+ let t = L.current?.querySelector(`[data-row-id="${CSS.escape(g)}"] [data-row-action]`);
530
506
  if (t == null || t.matches(":disabled")) return;
531
507
  let r = requestAnimationFrame(() => {
532
- t.focus({ preventScroll: !0 }), document.activeElement === t && (Ee.current = h);
508
+ t.focus({ preventScroll: !0 }), document.activeElement === t && (J.current = g);
533
509
  });
534
510
  return () => cancelAnimationFrame(r);
535
511
  }, [
536
512
  e,
537
- h,
513
+ g,
538
514
  d?.disabled,
539
515
  Ne,
540
516
  j,
@@ -544,15 +520,15 @@ function q({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
544
520
  ]);
545
521
  let Pe = j !== void 0 && (e.length === 0 || Z.range?.endIndex === e.length - 1);
546
522
  b(() => {
547
- Pe && N?.();
523
+ Pe && M?.();
548
524
  }, [
549
525
  Pe,
550
- N,
526
+ M,
551
527
  e.length
552
528
  ]), x(() => {
553
- if (J.current === void 0) return;
554
- let e = Array.from(L.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId === J.current)?.querySelector("[data-row-action]");
555
- e != null && (e.focus({ preventScroll: j !== void 0 }), J.current = void 0);
529
+ if (q.current === void 0) return;
530
+ let e = Array.from(L.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId === q.current)?.querySelector("[data-row-action]");
531
+ e != null && (e.focus({ preventScroll: j !== void 0 }), q.current = void 0);
556
532
  });
557
533
  function Fe(t, r) {
558
534
  let i = t.metaKey || t.ctrlKey, a = t.altKey || t.shiftKey;
@@ -561,39 +537,39 @@ function q({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
561
537
  if (o === void 0) return;
562
538
  t.preventDefault();
563
539
  let s = r + o, c = e[s];
564
- c !== void 0 && (J.current = n(c), W(J.current), j !== void 0 && Z.scrollToIndex(s, { align: "auto" }));
540
+ c !== void 0 && (q.current = n(c), U(q.current), j !== void 0 && Z.scrollToIndex(s, { align: "auto" }));
565
541
  }
566
- let Ie = P.filter((e) => !ie || e.isSecondary !== !0).length + (c === void 0 ? 0 : 1), $ = c === void 0 ? 0 : me, Le = re != null && typeof re != "boolean", { minimumWidth: Re, compactWidth: ze } = be(P, $), Be = Z.getTotalSize() - (Z.getVirtualItems().at(-1)?.end ?? z) + z;
542
+ let Ie = P.filter((e) => !ie || e.isSecondary !== !0).length + (c === void 0 ? 0 : 1), $ = c === void 0 ? 0 : me, Le = N != null && typeof N != "boolean", { minimumWidth: Re, compactWidth: ze } = xe(P, $), Be = Z.getTotalSize() - (Z.getVirtualItems().at(-1)?.end ?? z) + z;
567
543
  return /* @__PURE__ */ O("div", {
568
- ..._.props(B.frame, _e[ke]),
544
+ ...v.props(B.frame, ve[ke]),
569
545
  children: [/* @__PURE__ */ O("div", {
570
546
  ref: I.ref,
571
547
  "data-table-viewport": !0,
572
548
  role: "region",
573
549
  "aria-label": r,
574
550
  tabIndex: I.tabIndex,
575
- ..._.props(B.viewport, ve[ke], typeof j?.height == "number" && B.virtual(j.height)),
551
+ ...v.props(B.viewport, ye[ke], typeof j?.height == "number" && B.virtual(j.height)),
576
552
  children: [/* @__PURE__ */ O("table", {
577
553
  "aria-rowcount": j === void 0 ? void 0 : Math.max(1, e.length) + 1,
578
- ..._.props(B.table, B.fixed, B.minimumWidth(Re, ze)),
554
+ ...v.props(B.table, B.fixed, B.minimumWidth(Re, ze)),
579
555
  children: [
580
556
  /* @__PURE__ */ D("caption", {
581
557
  ref: de,
582
- ..._.props(B.caption, v && f.hidden),
558
+ ...v.props(B.caption, y && f.hidden),
583
559
  children: r
584
560
  }),
585
- /* @__PURE__ */ D(Ce, {
561
+ /* @__PURE__ */ D(we, {
586
562
  columns: P,
587
563
  canSelect: c !== void 0
588
564
  }),
589
565
  /* @__PURE__ */ D("thead", {
590
566
  ref: R,
591
- ..._.props(E && f.hidden),
567
+ ...v.props(E && f.hidden),
592
568
  children: /* @__PURE__ */ O("tr", { children: [c !== void 0 && /* @__PURE__ */ D("th", {
593
569
  scope: "col",
594
570
  className: "x9f619 x7wzq59 x13vifvy x11ru5tl x1krvmzm xt970qd xso031l x1q0q8m5 x1qndepd x153jb6y xpvm0e4 xj57cvi xy8obcc xas2l8k xuxw1ft x1d7z9mz xeuugli x1dc62k6",
595
571
  children: /* @__PURE__ */ D("span", {
596
- ..._.props(f.hidden),
572
+ ...v.props(f.hidden),
597
573
  children: "Select"
598
574
  })
599
575
  }), P.map((e) => {
@@ -602,7 +578,7 @@ function q({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
602
578
  scope: "col",
603
579
  title: e.label,
604
580
  "aria-sort": t,
605
- ..._.props(B.header, H[e.role], e.width !== void 0 && B.width(e.width), e.isSecondary === !0 && B.secondary),
581
+ ...v.props(B.header, _e[e.role], e.width !== void 0 && B.width(e.width), e.isSecondary === !0 && B.secondary),
606
582
  children: e.canSort === !0 && s !== void 0 ? /* @__PURE__ */ O("button", {
607
583
  type: "button",
608
584
  className: "x3nfvp2 x6s0dn4 x1hnptsi x193iq5w xeuugli x2zujid x17oiadl x1717udv xc342km x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x1ypdohk xp9636p x1s9zmfe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
@@ -631,17 +607,17 @@ function q({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
631
607
  })] })
632
608
  }),
633
609
  /* @__PURE__ */ O("tbody", {
634
- onPointerLeave: () => K(void 0),
635
- onKeyDownCapture: () => K(void 0),
610
+ onPointerLeave: () => G(void 0),
611
+ onKeyDownCapture: () => G(void 0),
636
612
  onBlur: (e) => {
637
- e.currentTarget.contains(e.relatedTarget) || W(void 0);
613
+ e.currentTarget.contains(e.relatedTarget) || U(void 0);
638
614
  },
639
615
  children: [
640
- je.map(({ row: e, index: t, spacerHeight: n }) => /* @__PURE__ */ O(y, { children: [n > 0 && /* @__PURE__ */ D("tr", {
616
+ je.map(({ row: e, index: t, spacerHeight: n }) => /* @__PURE__ */ O(ee, { children: [n > 0 && /* @__PURE__ */ D("tr", {
641
617
  "aria-hidden": "true",
642
618
  children: /* @__PURE__ */ D("td", {
643
619
  colSpan: Ie,
644
- ..._.props(B.spacer(n))
620
+ ...v.props(B.spacer(n))
645
621
  })
646
622
  }), /* @__PURE__ */ O("tr", {
647
623
  "data-index": t,
@@ -649,19 +625,19 @@ function q({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
649
625
  "aria-rowindex": j === void 0 ? void 0 : t + 2,
650
626
  ref: j === void 0 || A === "fixed" ? void 0 : Z.measureElement,
651
627
  onPointerMove: (t) => {
652
- t.pointerType === "mouse" && K(e.id);
628
+ t.pointerType === "mouse" && G(e.id);
653
629
  },
654
630
  onPointerEnter: (t) => {
655
- t.pointerType === "mouse" && K(e.id);
631
+ t.pointerType === "mouse" && G(e.id);
656
632
  },
657
633
  onPointerLeave: () => {
658
- K((t) => t === e.id ? void 0 : t);
634
+ G((t) => t === e.id ? void 0 : t);
659
635
  },
660
636
  onPointerDown: (e) => {
661
- e.pointerType !== "mouse" && K(void 0);
637
+ e.pointerType !== "mouse" && G(void 0);
662
638
  },
663
639
  onFocus: () => {
664
- K(void 0), W(e.id);
640
+ G(void 0), U(e.id);
665
641
  },
666
642
  ...{
667
643
  0: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6" },
@@ -681,19 +657,19 @@ function q({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
681
657
  children: /* @__PURE__ */ D(o.Indicator, {})
682
658
  })
683
659
  }), P.map((n, r) => /* @__PURE__ */ D("td", {
684
- ..._.props(B.cell, ge[A], H[n.role], n.width !== void 0 && B.width(n.width), n.isSecondary === !0 && B.secondary),
685
- children: d !== void 0 && r === Oe ? /* @__PURE__ */ D(Te, {
660
+ ...v.props(B.cell, ge[A], _e[n.role], n.width !== void 0 && B.width(n.width), n.isSecondary === !0 && B.secondary),
661
+ children: d !== void 0 && r === Oe ? /* @__PURE__ */ D(Ee, {
686
662
  row: e.original,
687
663
  action: d,
688
664
  isActive: p === e.id,
689
665
  onKeyDown: (e) => Fe(e, t),
690
- children: /* @__PURE__ */ D(we, {
666
+ children: /* @__PURE__ */ D(Te, {
691
667
  role: n.role,
692
668
  isFixed: A === "fixed",
693
669
  shouldTruncate: n.shouldTruncate,
694
670
  children: n.cell(e.original)
695
671
  })
696
- }) : /* @__PURE__ */ D(we, {
672
+ }) : /* @__PURE__ */ D(Te, {
697
673
  role: n.role,
698
674
  isFixed: A === "fixed",
699
675
  shouldTruncate: n.shouldTruncate,
@@ -705,7 +681,7 @@ function q({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
705
681
  "aria-hidden": "true",
706
682
  children: /* @__PURE__ */ D("td", {
707
683
  colSpan: Ie,
708
- ..._.props(B.spacer(Be))
684
+ ...v.props(B.spacer(Be))
709
685
  })
710
686
  }),
711
687
  e.length === 0 && /* @__PURE__ */ D("tr", { children: /* @__PURE__ */ D("td", {
@@ -724,16 +700,16 @@ function q({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
724
700
  ...{
725
701
  0: {},
726
702
  1: { className: "xid9utz xg7ukam x153jb6y xy8obcc xas2l8k x15x95ik x1az1eml" }
727
- }[M !== void 0 | 0],
728
- children: M
703
+ }[re !== void 0 | 0],
704
+ children: re
729
705
  })]
730
706
  }), Le && /* @__PURE__ */ D("div", {
731
707
  className: "xg7ukam x178xt8z x13fuv20 xhjagg4",
732
- children: re
708
+ children: N
733
709
  })]
734
710
  });
735
711
  }
736
- function we({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
712
+ function Te({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
737
713
  let i = V[e], a = t && i.shouldTruncate, o = typeof r == "string" && (n ?? a);
738
714
  return /* @__PURE__ */ D("span", {
739
715
  ...{
@@ -756,12 +732,12 @@ function we({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
756
732
  })
757
733
  });
758
734
  }
759
- function J(e) {
735
+ function q(e) {
760
736
  if (e.defaultPrevented || e.button !== 0) return !1;
761
737
  let t = e.metaKey || e.ctrlKey, n = e.altKey || e.shiftKey;
762
738
  return t || n ? !1 : e.detail === 0 || e.currentTarget.ownerDocument.getSelection()?.isCollapsed !== !1;
763
739
  }
764
- function Te({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
740
+ function Ee({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
765
741
  let a = t.label?.(e), o = t.href === void 0 ? /* @__PURE__ */ D("button", {
766
742
  type: "button",
767
743
  disabled: t.disabled,
@@ -770,7 +746,7 @@ function Te({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
770
746
  "data-row-action": !0,
771
747
  onKeyDown: i,
772
748
  onClick: (n) => {
773
- J(n) && t.onActivate(e);
749
+ q(n) && t.onActivate(e);
774
750
  },
775
751
  className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli x17tes2r x17oiadl x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x1t137rt x1s928wv x1j6awrg xarstr8 x11q50lq xa2q2qx x1x5eltu x1jdy9wv xtgyt42 x19mxcj1",
776
752
  children: r
@@ -780,7 +756,7 @@ function Te({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
780
756
  "data-row-action": !0,
781
757
  onKeyDown: i,
782
758
  onClick: (n) => {
783
- t.onActivate !== void 0 && J(n) && (n.preventDefault(), t.onActivate(e));
759
+ t.onActivate !== void 0 && q(n) && (n.preventDefault(), t.onActivate(e));
784
760
  },
785
761
  className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli x17tes2r x17oiadl x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x1t137rt x1s928wv x1j6awrg xarstr8 x11q50lq xa2q2qx x1x5eltu x1jdy9wv xtgyt42 x19mxcj1",
786
762
  children: r
@@ -792,7 +768,7 @@ function Te({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
792
768
  }) })] });
793
769
  }
794
770
  // packages/collections/src/collection-scroll.tsx
795
- function Ee(e) {
771
+ function J(e) {
796
772
  switch (e.status) {
797
773
  case "loading": return /* @__PURE__ */ D(n, {
798
774
  role: "status",
@@ -823,7 +799,7 @@ function Ee(e) {
823
799
  }
824
800
  }
825
801
  function Y({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, endPosition: i = "end", label: a = "Collection" }) {
826
- let o = m(), s = o.viewport, c = C(null);
802
+ let o = h(), s = o.viewport, c = C(null);
827
803
  fe({
828
804
  end: c,
829
805
  viewport: r ? s : void 0,
@@ -872,7 +848,7 @@ function Oe({ master: e, detail: t, label: n, masterLabel: r, revealKey: i, retu
872
848
  });
873
849
  }
874
850
  return /* @__PURE__ */ D("div", {
875
- ...g({ className: "x9vvk8s x12h1iku xeuugli xbixft x1hz01jw xtqrqnz x1778rvt" }, s),
851
+ ..._({ className: "x9vvk8s x12h1iku xeuugli xbixft x1hz01jw xtqrqnz x1778rvt" }, s),
876
852
  children: /* @__PURE__ */ O("div", {
877
853
  ref: c,
878
854
  className: "xrvj5dj x4ruv2j x1y7acmc x7a106z x1j825kq xeuugli",
@@ -902,7 +878,7 @@ function Oe({ master: e, detail: t, label: n, masterLabel: r, revealKey: i, retu
902
878
  }
903
879
  function ke({ items: e, ...t }) {
904
880
  return /* @__PURE__ */ D("dl", {
905
- ...g({ className: "x1ghz6dp xrvj5dj xezdspq x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
881
+ ..._({ className: "x1ghz6dp xrvj5dj xezdspq x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
906
882
  children: e.map(({ label: e, value: t }) => /* @__PURE__ */ O("div", {
907
883
  className: "xjp7ctv",
908
884
  children: [/* @__PURE__ */ D("dt", {
@@ -918,7 +894,7 @@ function ke({ items: e, ...t }) {
918
894
  // packages/collections/src/list-footer.tsx
919
895
  function Ae({ children: e, actions: t, ...n }) {
920
896
  return /* @__PURE__ */ O("div", {
921
- ...g({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak xeuugli x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
897
+ ..._({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak xeuugli x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
922
898
  children: [/* @__PURE__ */ D("div", {
923
899
  className: "xeuugli xj0a0fe",
924
900
  children: e
@@ -1049,23 +1025,23 @@ var X = {
1049
1025
  columns: X.columns
1050
1026
  };
1051
1027
  function Me({ layout: e = "inline", ...t }) {
1052
- return /* @__PURE__ */ D("dl", { ...g(_.props(je[e]), t) });
1028
+ return /* @__PURE__ */ D("dl", { ..._(v.props(je[e]), t) });
1053
1029
  }
1054
1030
  function Q({ label: e, value: t, detail: n, isLoading: r = !1, hasDetail: i = !1, variant: a = "inline", trend: o, ...s }) {
1055
1031
  let c = Z[a];
1056
1032
  return /* @__PURE__ */ O("div", {
1057
- ...g(_.props(X.metric, c.metric), s),
1033
+ ..._(v.props(X.metric, c.metric), s),
1058
1034
  children: [
1059
1035
  /* @__PURE__ */ D("dt", {
1060
- ..._.props(X.label, c.label),
1036
+ ...v.props(X.label, c.label),
1061
1037
  children: e
1062
1038
  }),
1063
1039
  /* @__PURE__ */ D("dd", {
1064
- ..._.props(X.value, c.value),
1040
+ ...v.props(X.value, c.value),
1065
1041
  children: r ? /* @__PURE__ */ D(d, { width: c.valueWidth }) : t
1066
1042
  }),
1067
1043
  (r ? i : n !== void 0) && /* @__PURE__ */ D("dd", {
1068
- ..._.props(X.detail, c.detail),
1044
+ ...v.props(X.detail, c.detail),
1069
1045
  children: r ? /* @__PURE__ */ D(d, { width: "24ch" }) : n
1070
1046
  }),
1071
1047
  o !== void 0 && /* @__PURE__ */ D("dd", {
@@ -1182,8 +1158,8 @@ var Ie = {
1182
1158
  ]);
1183
1159
  function ze({ option: e }) {
1184
1160
  return /* @__PURE__ */ D("span", {
1185
- ..._.props($.icon, Le[e.tone ?? "neutral"]),
1186
- children: e.icon ?? /* @__PURE__ */ D(M, {
1161
+ ...v.props($.icon, Le[e.tone ?? "neutral"]),
1162
+ children: e.icon ?? /* @__PURE__ */ D(re, {
1187
1163
  size: 14,
1188
1164
  "aria-hidden": !0
1189
1165
  })
@@ -1200,7 +1176,7 @@ function Be({ groups: t }) {
1200
1176
  "aria-label": o,
1201
1177
  title: "Filters"
1202
1178
  }),
1203
- children: /* @__PURE__ */ D(N, {
1179
+ children: /* @__PURE__ */ D(M, {
1204
1180
  size: 14,
1205
1181
  "aria-hidden": !0
1206
1182
  })
@@ -1222,7 +1198,7 @@ function Be({ groups: t }) {
1222
1198
  });
1223
1199
  }
1224
1200
  function Ve({ label: e, value: t, onChange: n }) {
1225
- return /* @__PURE__ */ D(h, {
1201
+ return /* @__PURE__ */ D(g, {
1226
1202
  type: "search",
1227
1203
  "aria-label": e,
1228
1204
  placeholder: "Filter…",
@@ -1242,7 +1218,7 @@ function He({ group: e }) {
1242
1218
  e || n("");
1243
1219
  },
1244
1220
  children: [/* @__PURE__ */ O(c.SubmenuTrigger, { children: [
1245
- e.icon ?? /* @__PURE__ */ D(N, {
1221
+ e.icon ?? /* @__PURE__ */ D(M, {
1246
1222
  size: 14,
1247
1223
  "aria-hidden": !0
1248
1224
  }),
@@ -1296,25 +1272,25 @@ var Ue = { input: {
1296
1272
  $$css: !0
1297
1273
  } };
1298
1274
  function We({ search: t, filters: n = [], filterContent: r, chips: i = [], viewActions: a, display: o, isPlaceholder: s = !1, isReady: c }) {
1299
- let [u, d] = w(!1), [f, p] = w(!1), ee = C(null), m = C(null), g = C(null), _ = s || !c, y = t !== void 0 && (u || t.value.length > 0);
1275
+ let [u, d] = w(!1), [f, p] = w(!1), m = C(null), h = C(null), _ = C(null), v = s || !c, ee = t !== void 0 && (u || t.value.length > 0);
1300
1276
  x(() => {
1301
- u && !s && c && (g.current?.focus(), g.current?.select());
1277
+ u && !s && c && (_.current?.focus(), _.current?.select());
1302
1278
  }, [
1303
1279
  u,
1304
1280
  s,
1305
1281
  c
1306
1282
  ]);
1307
1283
  function b() {
1308
- (ee.current ?? m.current?.querySelector("button"))?.focus();
1284
+ (m.current ?? h.current?.querySelector("button"))?.focus();
1309
1285
  }
1310
1286
  function S() {
1311
- t !== void 0 && !s && c && (g.current?.focus(), g.current?.select(), d(!0));
1287
+ t !== void 0 && !s && c && (_.current?.focus(), _.current?.select(), d(!0));
1312
1288
  }
1313
1289
  function T() {
1314
1290
  t?.onChange(""), d(!1), b();
1315
1291
  }
1316
1292
  function E(e) {
1317
- y && !e.defaultPrevented && e.key === "Escape" && e.target instanceof Element && e.target.closest("[role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"], [data-native-find], input:not([data-view-find]), textarea, select") === null && (e.preventDefault(), e.stopPropagation(), T());
1293
+ ee && !e.defaultPrevented && e.key === "Escape" && e.target instanceof Element && e.target.closest("[role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"], [data-native-find], input:not([data-view-find]), textarea, select") === null && (e.preventDefault(), e.stopPropagation(), T());
1318
1294
  }
1319
1295
  let k = n.filter((e) => e.value !== e.defaultValue).map((e) => ({
1320
1296
  id: `filter:${e.id}`,
@@ -1325,39 +1301,39 @@ function We({ search: t, filters: n = [], filterContent: r, chips: i = [], viewA
1325
1301
  ...e,
1326
1302
  id: `chip:${e.id}`
1327
1303
  });
1328
- let te = r !== void 0 || n.length > 0, ne = v.toArray([a, o]).length > 0, A = t !== void 0 || te || ne, j = t?.label ?? "Search this view", M = t?.placeholder ?? "Find in view…";
1304
+ let te = r !== void 0 || n.length > 0, ne = y.toArray([a, o]).length > 0, A = t !== void 0 || te || ne, j = t?.label ?? "Search this view", re = t?.placeholder ?? "Find in view…";
1329
1305
  return {
1330
1306
  openSearch: S,
1331
1307
  onKeyDown: E,
1332
1308
  actions: A ? /* @__PURE__ */ O("div", {
1333
- ref: m,
1334
- "aria-hidden": _,
1335
- inert: _,
1309
+ ref: h,
1310
+ "aria-hidden": v,
1311
+ inert: v,
1336
1312
  className: "x78zum5 x6s0dn4 x1a02dak x13a6bvl x1hnptsi xeuugli x193iq5w",
1337
1313
  children: [
1338
1314
  t !== void 0 && /* @__PURE__ */ D(e, {
1339
- ref: ee,
1315
+ ref: m,
1340
1316
  type: "button",
1341
1317
  disabled: s,
1342
1318
  "aria-label": "Find in view",
1343
1319
  title: "Find in view",
1344
1320
  "data-view-find-trigger": !0,
1345
- "aria-expanded": y,
1321
+ "aria-expanded": ee,
1346
1322
  onClick: S,
1347
- children: /* @__PURE__ */ D(re, {
1323
+ children: /* @__PURE__ */ D(N, {
1348
1324
  size: 14,
1349
1325
  "aria-hidden": !0
1350
1326
  })
1351
1327
  }),
1352
- y && /* @__PURE__ */ O("div", {
1328
+ ee && /* @__PURE__ */ O("div", {
1353
1329
  className: "x78zum5 x6s0dn4 xunmzkg xdl07me x193iq5w",
1354
- children: [/* @__PURE__ */ D(h, {
1355
- ref: g,
1330
+ children: [/* @__PURE__ */ D(g, {
1331
+ ref: _,
1356
1332
  type: "search",
1357
1333
  disabled: s,
1358
1334
  "data-view-find": !0,
1359
1335
  "aria-label": j,
1360
- placeholder: M,
1336
+ placeholder: re,
1361
1337
  value: t.value,
1362
1338
  onChange: (e) => t.onChange(e.target.value),
1363
1339
  onKeyDown: (e) => {
@@ -1385,7 +1361,7 @@ function We({ search: t, filters: n = [], filterContent: r, chips: i = [], viewA
1385
1361
  "aria-label": "Filters",
1386
1362
  title: "Filters"
1387
1363
  }),
1388
- children: /* @__PURE__ */ D(N, {
1364
+ children: /* @__PURE__ */ D(M, {
1389
1365
  size: 14,
1390
1366
  "aria-hidden": !0
1391
1367
  })
@@ -1402,8 +1378,8 @@ function We({ search: t, filters: n = [], filterContent: r, chips: i = [], viewA
1402
1378
  ]
1403
1379
  }) : void 0,
1404
1380
  chips: k.length > 0 && /* @__PURE__ */ D("div", {
1405
- "aria-hidden": _,
1406
- inert: _,
1381
+ "aria-hidden": v,
1382
+ inert: v,
1407
1383
  className: "xjp7ctv",
1408
1384
  children: /* @__PURE__ */ D(L, {
1409
1385
  filters: k,
@@ -1414,4 +1390,4 @@ function We({ search: t, filters: n = [], filterContent: r, chips: i = [], viewA
1414
1390
  })
1415
1391
  };
1416
1392
  }
1417
- export { Ee as CollectionEnd, Be as CollectionFilters, de as CollectionPagination, Y as CollectionScroll, I as CollectionToolbar, q as DataTable, U as DataTablePlaceholder, G as DataTableText, K as DataTableTextPlaceholder, ke as Details, ue as DisplayOptions, L as FilterChips, Oe as Inspector, Ae as ListFooter, Q as Metric, Me as MetricGrid, Ie as Timeline, Ne as Timestamp, We as useCollectionControls };
1393
+ export { J as CollectionEnd, Be as CollectionFilters, de as CollectionPagination, Y as CollectionScroll, I as CollectionToolbar, K as DataTable, H as DataTablePlaceholder, W as DataTableText, G as DataTableTextPlaceholder, ke as Details, ue as DisplayOptions, L as FilterChips, Oe as Inspector, Ae as ListFooter, Q as Metric, Me as MetricGrid, Ie as Timeline, Ne as Timestamp, We as useCollectionControls };
@@ -1 +1 @@
1
- export { t as CodeBlock } from "../code-block-DT1TCkTC.js";
1
+ export { t as CodeBlock } from "../code-block-aC0Htt4N.js";
@@ -1,5 +1,5 @@
1
1
  import { D as e, _ as t, v as n } from "../src-C-Sx37kz.js";
2
- import { t as r } from "../code-block-DT1TCkTC.js";
2
+ import { t as r } from "../code-block-aC0Htt4N.js";
3
3
  import { t as i } from "../viewer-styles-DsFYri4K.js";
4
4
  import * as a from "@stylexjs/stylex";
5
5
  import { useEffect as o, useState as s } from "react";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "../use-scroll-tab-index-Dxpdh4W7.js";
2
2
  import { t } from "../visible-motion-1GcUaEi4.js";
3
- import { t as n } from "../code-block-DT1TCkTC.js";
3
+ import { t as n } from "../code-block-aC0Htt4N.js";
4
4
  import { n as r, t as i } from "../content-link-B3ObdyZY.js";
5
5
  import { t as a } from "../viewer-styles-DsFYri4K.js";
6
6
  import * as o from "@stylexjs/stylex";
package/dist/content.js CHANGED
@@ -1 +1 @@
1
- export { o as JsonViewer, a as LogViewer, r as MediaViewer, i as MediaViewerPlaceholder, n as StackTrace, t as Trace } from "./src-D9DktxEq.js";
1
+ export { o as JsonViewer, a as LogViewer, r as MediaViewer, i as MediaViewerPlaceholder, n as StackTrace, t as Trace } from "./src-DWjAoOyd.js";
@@ -11,8 +11,9 @@ function c({ commands: e, target: t, isEnabled: n }) {
11
11
  hotkey: e.shortcut,
12
12
  callback: (n) => {
13
13
  if (n.defaultPrevented || n.repeat || e.shouldRun?.(n) === !1) return;
14
- let r = t !== null && "current" in t ? t.current : t, i = n.target instanceof Element ? n.target.closest("dialog[open], [role=\"dialog\"][aria-modal=\"true\"], [role=\"alertdialog\"]") : null;
15
- (i === null || r !== null && i.contains(r)) && (n.preventDefault(), n.stopPropagation(), e.onSelect());
14
+ let r = t !== null && "current" in t ? t.current : t, i = (r?.ownerDocument ?? globalThis.document).querySelectorAll(":is(dialog[open], [role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"], [data-base-ui-popover-popup]):not([data-closed])");
15
+ for (let e of i) if (r === null || !e.contains(r)) return;
16
+ n.target instanceof Element && n.target.closest("input, textarea, select, [contenteditable]:not([contenteditable=\"false\"])") !== null || (n.preventDefault(), n.stopPropagation(), e.onSelect());
16
17
  },
17
18
  options: {
18
19
  requireReset: !0,
@@ -1,5 +1,4 @@
1
1
  import type { ComponentProps, ReactNode } from 'react';
2
- type TableSizing = 'content' | 'fill';
3
2
  type RowSizing = 'fixed' | 'content';
4
3
  export type DataTableColumnRole = 'primary' | 'text' | 'status' | 'number' | 'timestamp' | 'actions';
5
4
  export type DataTableColumnLayout = {
@@ -14,15 +13,14 @@ export type DataTableColumn<Row> = DataTableColumnLayout & {
14
13
  readonly shouldTruncate?: boolean;
15
14
  readonly canSort?: boolean;
16
15
  };
17
- export type DataTablePlaceholderProps = {
16
+ export type DataTablePlaceholderProps = Pick<DataTableProps<object>, 'caption' | 'hideCaption' | 'hideHeaders' | 'rowSizing' | 'window' | 'footer'> & {
18
17
  readonly columns: ReadonlyArray<DataTableColumnLayout & {
18
+ readonly shouldTruncate?: boolean;
19
19
  readonly placeholder?: ReactNode;
20
20
  }>;
21
- readonly sizing?: TableSizing;
22
- readonly rowSizing?: RowSizing;
23
- readonly hideHeaders?: boolean;
21
+ readonly rows?: number;
24
22
  };
25
- export declare function DataTablePlaceholder({ columns: suppliedColumns, sizing, rowSizing, hideHeaders, }: DataTablePlaceholderProps): ReactNode;
23
+ export declare function DataTablePlaceholder({ columns, rows, hideCaption, ...props }: DataTablePlaceholderProps): ReactNode;
26
24
  export type DataTableTextProps = {
27
25
  readonly children: string;
28
26
  readonly secondary?: string | undefined;
@@ -1,7 +1,7 @@
1
1
  import { D as e, _ as t, v as n, w as r } from "./src-C-Sx37kz.js";
2
2
  import { t as i } from "./use-scroll-tab-index-Dxpdh4W7.js";
3
3
  import { t as a } from "./viewer-styles-DsFYri4K.js";
4
- import { t as o } from "./code-block-DT1TCkTC.js";
4
+ import { t as o } from "./code-block-aC0Htt4N.js";
5
5
  import { t as s } from "./content-link-B3ObdyZY.js";
6
6
  import * as c from "@stylexjs/stylex";
7
7
  import { useCallback as l, useEffect as u, useLayoutEffect as d, useRef as f, useState as p } from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mechane-ai/elements",
3
- "version": "0.37.0",
3
+ "version": "0.38.0",
4
4
  "description": "Elements by Mechane — React components for applications, AI interfaces, and analytical graphics",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {