@logicplanes/kaeso-ui 0.7.0 → 0.7.1-rc.1

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 (161) hide show
  1. package/LICENSE-Apache-2.0.txt +202 -0
  2. package/NOTICE.md +11 -1
  3. package/ai/component-guides.md +36 -2
  4. package/ai/component-registry.json +74 -5
  5. package/ai/component-registry.md +21 -6
  6. package/ai/icons.md +2 -2
  7. package/ai/tokens.md +1 -1
  8. package/dist/chunks/{app-frame-DibcP3SK.js → app-frame-tZReKtCM.js} +3 -3
  9. package/dist/chunks/{app-frame-DibcP3SK.js.map → app-frame-tZReKtCM.js.map} +1 -1
  10. package/dist/chunks/badge-DC-RFkFg.js +27 -0
  11. package/dist/chunks/badge-DC-RFkFg.js.map +1 -0
  12. package/dist/chunks/collapsible-BdwAesRa.js +53 -0
  13. package/dist/chunks/collapsible-BdwAesRa.js.map +1 -0
  14. package/dist/chunks/combobox-BdgWE05R.js +366 -0
  15. package/dist/chunks/combobox-BdgWE05R.js.map +1 -0
  16. package/dist/chunks/command-list-DFd-joEV.js +455 -0
  17. package/dist/chunks/command-list-DFd-joEV.js.map +1 -0
  18. package/dist/chunks/{command-palette-BEIK_hv9.js → command-palette-QsmneiR8.js} +2 -2
  19. package/dist/chunks/{command-palette-BEIK_hv9.js.map → command-palette-QsmneiR8.js.map} +1 -1
  20. package/dist/chunks/{core-B8c9Bty0.js → core-DSGLmc13.js} +19 -18
  21. package/dist/chunks/core-DSGLmc13.js.map +1 -0
  22. package/dist/chunks/{dashboard-Cuv86JNj.js → dashboard-B7ltvQ3f.js} +9 -8
  23. package/dist/chunks/dashboard-B7ltvQ3f.js.map +1 -0
  24. package/dist/chunks/data-table-YrA9Py2c.js +682 -0
  25. package/dist/chunks/data-table-YrA9Py2c.js.map +1 -0
  26. package/dist/chunks/{de-QtAgHLnQ.js → de-K_t_sSKN.js} +4 -1
  27. package/dist/chunks/de-K_t_sSKN.js.map +1 -0
  28. package/dist/chunks/{display-options-DZqFG-ly.js → display-options-Cw7rD12V.js} +2 -2
  29. package/dist/chunks/{display-options-DZqFG-ly.js.map → display-options-Cw7rD12V.js.map} +1 -1
  30. package/dist/chunks/{domain-BqNtp2rQ.js → domain-DLRk0kME.js} +2 -2
  31. package/dist/chunks/{domain-BqNtp2rQ.js.map → domain-DLRk0kME.js.map} +1 -1
  32. package/dist/chunks/figures-D_Tsrwwj.js +22 -0
  33. package/dist/chunks/figures-D_Tsrwwj.js.map +1 -0
  34. package/dist/chunks/{filter-chip-KMkD6acL.js → filter-chip-BMytSUWo.js} +4 -4
  35. package/dist/chunks/{filter-chip-KMkD6acL.js.map → filter-chip-BMytSUWo.js.map} +1 -1
  36. package/dist/chunks/icon-BMsYY158.js +110 -0
  37. package/dist/chunks/icon-BMsYY158.js.map +1 -0
  38. package/dist/chunks/{identity-DCNUQgql.js → identity-DjH8c9Qf.js} +784 -161
  39. package/dist/chunks/identity-DjH8c9Qf.js.map +1 -0
  40. package/dist/chunks/kaeso-P0VRfSI7.js +571 -0
  41. package/dist/chunks/kaeso-P0VRfSI7.js.map +1 -0
  42. package/dist/chunks/{list-Bhtqsv9E.js → list-0pRnkcpL.js} +155 -154
  43. package/dist/chunks/list-0pRnkcpL.js.map +1 -0
  44. package/dist/chunks/menu-BMry4pQ-.js +461 -0
  45. package/dist/chunks/menu-BMry4pQ-.js.map +1 -0
  46. package/dist/chunks/{meter-YuCR1Pjd.js → meter-D2ynBSmy.js} +2 -2
  47. package/dist/chunks/{meter-YuCR1Pjd.js.map → meter-D2ynBSmy.js.map} +1 -1
  48. package/dist/chunks/{nav-sheet-CQfZ7w_q.js → nav-sheet-B0o-icmO.js} +2 -2
  49. package/dist/chunks/{nav-sheet-CQfZ7w_q.js.map → nav-sheet-B0o-icmO.js.map} +1 -1
  50. package/dist/chunks/{page-header-C92GBvns.js → page-header-DiH555lF.js} +2 -2
  51. package/dist/chunks/{page-header-C92GBvns.js.map → page-header-DiH555lF.js.map} +1 -1
  52. package/dist/chunks/{picker-popover-icF27914.js → picker-popover-DAnkZmge.js} +3 -3
  53. package/dist/chunks/{picker-popover-icF27914.js.map → picker-popover-DAnkZmge.js.map} +1 -1
  54. package/dist/chunks/{rights-C44EtmsG.js → rights-C6gfyqsY.js} +3 -3
  55. package/dist/chunks/{rights-C44EtmsG.js.map → rights-C6gfyqsY.js.map} +1 -1
  56. package/dist/chunks/{select-B3eoWXfR.js → select-DQzn7_Fs.js} +2 -2
  57. package/dist/chunks/{select-B3eoWXfR.js.map → select-DQzn7_Fs.js.map} +1 -1
  58. package/dist/chunks/{sidebar-BnIqRDVN.js → sidebar-Bbm__0Nk.js} +2 -2
  59. package/dist/chunks/{sidebar-BnIqRDVN.js.map → sidebar-Bbm__0Nk.js.map} +1 -1
  60. package/dist/chunks/{sidebar-menu-CSElX37g.js → sidebar-menu-CycUvTPc.js} +2 -2
  61. package/dist/chunks/{sidebar-menu-CSElX37g.js.map → sidebar-menu-CycUvTPc.js.map} +1 -1
  62. package/dist/chunks/stat-CtOxD2Jk.js +240 -0
  63. package/dist/chunks/stat-CtOxD2Jk.js.map +1 -0
  64. package/dist/chunks/{styles-CklJ8C7c.js → styles-CN0ovMB2.js} +2 -2
  65. package/dist/chunks/{styles-CklJ8C7c.js.map → styles-CN0ovMB2.js.map} +1 -1
  66. package/dist/chunks/{swap-value-TlZecHRF.js → swap-value-ClhwTe97.js} +2 -2
  67. package/dist/chunks/swap-value-ClhwTe97.js.map +1 -0
  68. package/dist/chunks/{theme-menu-BgltuBqB.js → theme-menu-DmEo4nXz.js} +2 -2
  69. package/dist/chunks/{theme-menu-BgltuBqB.js.map → theme-menu-DmEo4nXz.js.map} +1 -1
  70. package/dist/chunks/{timeseries-h7XdvYTo.js → timeseries-CrpFP8va.js} +4 -4
  71. package/dist/chunks/{timeseries-h7XdvYTo.js.map → timeseries-CrpFP8va.js.map} +1 -1
  72. package/dist/chunks/{tooltip-OySqu0Bq.js → tooltip-DdZgOME7.js} +35 -35
  73. package/dist/chunks/tooltip-DdZgOME7.js.map +1 -0
  74. package/dist/chunks/vendor-marks-DF2Thhge.js +2052 -0
  75. package/dist/chunks/vendor-marks-DF2Thhge.js.map +1 -0
  76. package/dist/chunks/{zh-CN-8ZWE79zI.js → zh-CN-By8VGCbn.js} +4 -1
  77. package/dist/chunks/zh-CN-By8VGCbn.js.map +1 -0
  78. package/dist/components/app-frame.js +1 -1
  79. package/dist/components/badge.js +1 -1
  80. package/dist/components/charts/bar.js +3 -3
  81. package/dist/components/charts/donut.js +2 -2
  82. package/dist/components/charts/heatmap.js +2 -2
  83. package/dist/components/charts/sankey.js +3 -3
  84. package/dist/components/charts/sparkline.js +1 -1
  85. package/dist/components/charts/timeseries.js +1 -1
  86. package/dist/components/charts.js +2 -2
  87. package/dist/components/collapsible.js +1 -1
  88. package/dist/components/combobox.js +1 -1
  89. package/dist/components/command-palette.js +1 -1
  90. package/dist/components/dashboard/legend.js +22 -20
  91. package/dist/components/dashboard/legend.js.map +1 -1
  92. package/dist/components/dashboard/metric-tabs.js +66 -65
  93. package/dist/components/dashboard/metric-tabs.js.map +1 -1
  94. package/dist/components/dashboard/model-card.js +37 -36
  95. package/dist/components/dashboard/model-card.js.map +1 -1
  96. package/dist/components/dashboard/rank-list.js +1 -1
  97. package/dist/components/dashboard/rank-list.js.map +1 -1
  98. package/dist/components/dashboard.js +1 -1
  99. package/dist/components/data-table.js +1 -1
  100. package/dist/components/display-options.js +1 -1
  101. package/dist/components/filter-chip.js +1 -1
  102. package/dist/components/flow-canvas.js +1 -1
  103. package/dist/components/icon.js +1 -1
  104. package/dist/components/kaeso/conversation.js +1 -1
  105. package/dist/components/kaeso/identity.js +1 -1
  106. package/dist/components/kaeso/rights.js +1 -1
  107. package/dist/components/kaeso/usage.js +4 -4
  108. package/dist/components/kaeso.js +7 -7
  109. package/dist/components/list.js +1 -1
  110. package/dist/components/menu.js +2 -2
  111. package/dist/components/meter.js +1 -1
  112. package/dist/components/page-header.js +1 -1
  113. package/dist/components/playground.js +661 -656
  114. package/dist/components/playground.js.map +1 -1
  115. package/dist/components/select.js +1 -1
  116. package/dist/components/sidebar.js +1 -1
  117. package/dist/components/stat.js +1 -1
  118. package/dist/components/theme-menu.js +1 -1
  119. package/dist/i18n-provider.js +1 -1
  120. package/dist/index.js +28 -28
  121. package/dist/styles.css +1 -1
  122. package/dist/types/components/charts/marks.d.ts +0 -1
  123. package/dist/types/components/dashboard/swap-value.d.ts +0 -1
  124. package/dist/types/components/kaeso/docs.d.ts +11 -0
  125. package/dist/types/components/kaeso/identity.d.ts +29 -4
  126. package/dist/types/components/kaeso/index.d.ts +8 -2
  127. package/dist/types/components/kaeso/model-makers.d.ts +545 -0
  128. package/dist/types/components/kaeso/source-badge.d.ts +46 -0
  129. package/dist/types/components/kaeso/vendor-marks.d.ts +2 -0
  130. package/dist/types/components/menu/styles.d.ts +1 -1
  131. package/dist/types/icons/groups.d.ts +1 -1
  132. package/dist/types/icons/vocabulary.d.ts +10 -0
  133. package/dist/types/utils/figures.d.ts +3 -0
  134. package/foundations/typography.md +1 -1
  135. package/package.json +3 -2
  136. package/dist/chunks/badge-C6H9NlNw.js +0 -26
  137. package/dist/chunks/badge-C6H9NlNw.js.map +0 -1
  138. package/dist/chunks/collapsible-BFoDXP0y.js +0 -52
  139. package/dist/chunks/collapsible-BFoDXP0y.js.map +0 -1
  140. package/dist/chunks/combobox-B8GjFlO4.js +0 -365
  141. package/dist/chunks/combobox-B8GjFlO4.js.map +0 -1
  142. package/dist/chunks/command-list-ttU7YLEl.js +0 -454
  143. package/dist/chunks/command-list-ttU7YLEl.js.map +0 -1
  144. package/dist/chunks/core-B8c9Bty0.js.map +0 -1
  145. package/dist/chunks/dashboard-Cuv86JNj.js.map +0 -1
  146. package/dist/chunks/data-table-BMopFMG6.js +0 -641
  147. package/dist/chunks/data-table-BMopFMG6.js.map +0 -1
  148. package/dist/chunks/de-QtAgHLnQ.js.map +0 -1
  149. package/dist/chunks/icon-UqUodbsN.js +0 -108
  150. package/dist/chunks/icon-UqUodbsN.js.map +0 -1
  151. package/dist/chunks/identity-DCNUQgql.js.map +0 -1
  152. package/dist/chunks/kaeso-C-E-8Dxz.js +0 -506
  153. package/dist/chunks/kaeso-C-E-8Dxz.js.map +0 -1
  154. package/dist/chunks/list-Bhtqsv9E.js.map +0 -1
  155. package/dist/chunks/menu-Bl7vzB52.js +0 -460
  156. package/dist/chunks/menu-Bl7vzB52.js.map +0 -1
  157. package/dist/chunks/stat-DuWKmxGr.js +0 -239
  158. package/dist/chunks/stat-DuWKmxGr.js.map +0 -1
  159. package/dist/chunks/swap-value-TlZecHRF.js.map +0 -1
  160. package/dist/chunks/tooltip-OySqu0Bq.js.map +0 -1
  161. package/dist/chunks/zh-CN-8ZWE79zI.js.map +0 -1
@@ -0,0 +1,682 @@
1
+ "use client";
2
+ import { t as e } from "./cn-CF99d-bD.js";
3
+ import { t } from "./observe-resize-DerQK57d.js";
4
+ import { a as n, i as r, o as i, t as a } from "./inset-BTAjcK6a.js";
5
+ import { t as o } from "./icon-kQHSzziW.js";
6
+ import { n as s } from "./checkbox-BkMPWcR_.js";
7
+ import { r as c } from "./skeleton-DTiYxSYX.js";
8
+ import { t as l } from "./empty-BLeimJFU.js";
9
+ import { n as ee } from "./button-L10eO8bf.js";
10
+ import { r as te } from "./pagination-IL6wspAT.js";
11
+ import { t as u } from "./menu-BMry4pQ-.js";
12
+ import { r as ne } from "./text-BRYPrw1h.js";
13
+ import { t as d } from "./truncated-C6K1q8DJ.js";
14
+ import { t as re } from "./tone-CF_XXfiq.js";
15
+ import { n as ie, r as ae, t as oe } from "./selects-text-kRMTsm4s.js";
16
+ import { t as se } from "./use-scroll-margin-CpP0MUMb.js";
17
+ import { a as ce } from "./context-B2nNL7Im.js";
18
+ import { t as f } from "./formatters-Be5AdLB2.js";
19
+ import { t as le } from "./use-scroll-fade-CNLSc2jm.js";
20
+ import { r as ue } from "./status-Bi2tSKCj.js";
21
+ import { t as p } from "./avatar-rLwc_20v.js";
22
+ import { r as m } from "./tooltip-DVpJ_urN.js";
23
+ import { t as h } from "./use-hydrating-Dth8POSk.js";
24
+ import { t as g } from "./use-utc-while-hydrating-PP48Tcfz.js";
25
+ import { forwardRef as de, useLayoutEffect as _, useMemo as fe, useRef as v, useState as y } from "react";
26
+ import { Fragment as pe, jsx as b, jsxs as x } from "react/jsx-runtime";
27
+ import { ArrowDown01Icon as me, ArrowUp01Icon as he } from "@hugeicons/core-free-icons";
28
+ import { useVirtualizer as ge } from "@tanstack/react-virtual";
29
+ import { flexRender as _e, getCoreRowModel as ve, getSortedRowModel as ye, useReactTable as be } from "@tanstack/react-table";
30
+ // src/hooks/use-sticky-top.ts
31
+ var S = /(auto|scroll|hidden|overlay)/;
32
+ function xe(e) {
33
+ for (let t = e.parentElement; t; t = t.parentElement) {
34
+ let e = getComputedStyle(t);
35
+ if (S.test(e.overflowY) || S.test(e.overflowX)) return t;
36
+ }
37
+ return null;
38
+ }
39
+ function Se(e) {
40
+ let [t, n] = y(0);
41
+ return _(() => {
42
+ let t = e.current, r = t && xe(t);
43
+ if (!r) return;
44
+ let i = () => n(-(Number.parseFloat(getComputedStyle(r).paddingTop) || 0));
45
+ return i(), window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
46
+ }, [e]), t;
47
+ }
48
+ // src/components/data-table/time-columns.ts
49
+ var C = /* @__PURE__ */ new WeakSet(), w = { density: {
50
+ compact: { classes: "h-36 coarse:h-44" },
51
+ default: { classes: "h-40 coarse:h-44" },
52
+ comfortable: { classes: "h-48" }
53
+ } }, Ce = { density: "default" }, we = {
54
+ compact: 36,
55
+ default: 40,
56
+ comfortable: 48
57
+ };
58
+ function Te(e, t, n = 48) {
59
+ if (!t) return {
60
+ hidden: [],
61
+ tight: !1,
62
+ overflow: !1
63
+ };
64
+ let r = [...e].sort((e, t) => e.priority - t.priority), i = n, a = /* @__PURE__ */ new Set();
65
+ for (let e of r) i += e.size, (i <= t || e.priority <= 1 || e.fixed) && a.add(e.id);
66
+ let o = e.filter((e) => a.has(e.id)), s = o.reduce((e, t) => e + t.size, n), c = o.reduce((e, t) => e + (t.grow ? Ne(t) : t.size), 0);
67
+ if (c > t && o.some((e) => e.grow)) {
68
+ let e = o[o.length - 1];
69
+ for (let n of [...o].reverse()) {
70
+ if (c <= t) break;
71
+ n.grow || n.fixed || n === e || (a.delete(n.id), c -= n.size);
72
+ }
73
+ }
74
+ return {
75
+ hidden: e.filter((e) => !a.has(e.id)).map((e) => e.id),
76
+ tight: s > t,
77
+ overflow: c > t
78
+ };
79
+ }
80
+ function Ee(e) {
81
+ let t = getComputedStyle(e);
82
+ return e.getBoundingClientRect().width - (parseFloat(t.paddingLeft) || 0) - (parseFloat(t.paddingRight) || 0);
83
+ }
84
+ function De(e) {
85
+ let t = e.filter((e) => e.id && e.meta?.text && e.meta.align !== "end");
86
+ return t.find((e) => !C.has(e)) ?? t[0] ?? e[0];
87
+ }
88
+ function Oe(e, t, n) {
89
+ if (!e?.id) return;
90
+ let r = e.meta?.text?.(t.original, n);
91
+ if (r) return r;
92
+ let i = t.getValue(e.id);
93
+ return typeof i == "string" && i ? i : void 0;
94
+ }
95
+ var ke = "a[href], button, input, select, textarea, [tabindex], [contenteditable=true]", Ae = "input:not([type=checkbox]):not([type=radio]), textarea, select, [contenteditable=true]";
96
+ function je(e) {
97
+ return [...e.querySelectorAll(ke)].filter((e) => !e.closest("[role=checkbox], [aria-hidden=true], [hidden]") && !e.matches(":disabled, input[type=checkbox]"));
98
+ }
99
+ function T(e) {
100
+ return e ? [...e.querySelectorAll("[role=columnheader]")].flatMap((e) => {
101
+ let t = e.querySelector("[role=checkbox], button") ?? e.querySelector("[role=separator]");
102
+ return t ? [t] : [];
103
+ }) : [];
104
+ }
105
+ function Me(t, n) {
106
+ return n ? e("controls-on-fill", t ? "bg-raised-pressed hover:raised-selected-hover active:raised-selected-hover" : "bg-fill-2 hover:bg-fill-3 active:bg-fill-3") : t ? "hover:bg-raised-hover active:bg-raised-pressed hover:controls-on-fill" : "hover:bg-fill-1 active:bg-fill-2 hover:controls-on-fill";
107
+ }
108
+ var Ne = (e) => Math.min(e.size, e.minWidth ?? 136);
109
+ function Pe({ data: ue, columns: p, getRowId: m, density: h = "default", onRowClick: g, rowMenu: de, selectable: S, canSelectRow: xe, selection: C, onSelectionChange: Ce, sorting: Pe, onSortingChange: Fe, manualSorting: Ie, loading: E, error: D, onRetry: O, empty: Le, hasMore: k, loadingMore: A, onLoadMore: j, stickyFirstColumn: Re, virtualizeAbove: ze = 100, className: Be, activeRowId: Ve, freshRowIds: He, onHiddenColumnsChange: Ue, "aria-label": We, "data-force-row": Ge }, M) {
110
+ let N = n(), Ke = i(), qe = r(), P = ce(), F = f(), [Je, Ye] = y([]), [Xe, Ze] = y({}), [Qe, $e] = y(0), [et, I] = y("body"), [tt, nt] = y(0), L = v(null), rt = Pe ?? Je, R = C ?? Xe, it = fe(() => S ? [{
111
+ id: "__select",
112
+ size: 44,
113
+ enableSorting: !1,
114
+ enableResizing: !1,
115
+ meta: { priority: 1 },
116
+ header: ({ table: e }) => /* @__PURE__ */ b(s, {
117
+ "aria-label": P("dataTable.selectAllRows", "Select all rows"),
118
+ checked: e.getIsAllRowsSelected(),
119
+ indeterminate: e.getIsSomeRowsSelected() && !e.getIsAllRowsSelected(),
120
+ onCheckedChange: (t) => e.toggleAllRowsSelected(t)
121
+ }),
122
+ cell: ({ row: e }) => {
123
+ let t = Oe(De(p), e, F);
124
+ return /* @__PURE__ */ b(s, {
125
+ "aria-label": t ? P("dataTable.selectNamed", "Select {name}", { name: t }) : P("dataTable.selectRow", "Select row"),
126
+ checked: e.getIsSelected(),
127
+ disabled: !e.getCanSelect(),
128
+ onCheckedChange: (t) => e.toggleSelected(t)
129
+ });
130
+ }
131
+ }, ...p] : p, [
132
+ p,
133
+ S,
134
+ P,
135
+ F
136
+ ]), z = be({
137
+ data: ue,
138
+ columns: it,
139
+ state: {
140
+ sorting: rt,
141
+ rowSelection: R
142
+ },
143
+ onSortingChange: (e) => {
144
+ let t = typeof e == "function" ? e(rt) : e;
145
+ L.current = null, Pe || Ye(t), Fe?.(t);
146
+ },
147
+ onRowSelectionChange: (e) => {
148
+ let t = typeof e == "function" ? e(R) : e;
149
+ C || Ze(t), Ce?.(t);
150
+ },
151
+ getCoreRowModel: ve(),
152
+ getSortedRowModel: ye(),
153
+ manualSorting: !!Ie,
154
+ enableRowSelection: S ? xe ? (e) => xe(e.original) : !0 : !1,
155
+ columnResizeMode: "onChange",
156
+ ...m ? { getRowId: (e) => m(e) } : {},
157
+ defaultColumn: {
158
+ size: 140,
159
+ minSize: 64,
160
+ maxSize: 640
161
+ }
162
+ }), B = v(null), V = v(null), H = v(null), at = z.getVisibleLeafColumns(), ot = at.map((e) => ({
163
+ id: e.id,
164
+ size: e.getSize(),
165
+ priority: e.columnDef.meta?.priority ?? 2,
166
+ grow: !!e.columnDef.meta?.grow,
167
+ minWidth: e.columnDef.meta?.minWidth,
168
+ fixed: e.id === "__select"
169
+ })), st = JSON.stringify(ot), ct = (e) => {
170
+ let t = Te(ot, e, N ? 48 : 0);
171
+ return `${t.tight ? "!" : ""}${t.overflow ? ">" : ""}|${t.hidden.join(" ")}`;
172
+ }, lt = v(ct);
173
+ lt.current = ct;
174
+ let [ut, dt] = y("|");
175
+ _(() => {
176
+ let e = B.current;
177
+ if (e) return t([e], ([e]) => dt(lt.current(Math.round(e?.contentRect.width ?? 0))));
178
+ }, []), _(() => {
179
+ B.current && dt(lt.current(Math.round(Ee(B.current))));
180
+ }, [st]);
181
+ let [ft = "", pt = ""] = ut.split("|"), mt = ft.includes("!"), ht = ft.includes(">"), U = fe(() => new Set(pt.split(" ").filter(Boolean)), [pt]), gt = v(Ue);
182
+ gt.current = Ue, _(() => {
183
+ gt.current?.([...U]);
184
+ }, [U]);
185
+ let W = at.filter((e) => !U.has(e.id)), _t = (e) => e.columnDef.meta?.grow && mt ? Ne({
186
+ size: e.getSize(),
187
+ minWidth: e.columnDef.meta.minWidth
188
+ }) : e.getSize(), vt = {
189
+ gridTemplateColumns: W.map((e) => e.columnDef.meta?.grow ? `minmax(${_t(e)}px, 1fr)` : `${e.getSize()}px`).join(" "),
190
+ minWidth: W.reduce((e, t) => e + _t(t), 0)
191
+ }, yt = ht && W.length > 1 && !W[W.length - 1]?.columnDef.meta?.grow, G = z.getRowModel().rows, bt = ht && G.length === 0 && !E && !D, K = G.length > ze, xt = Math.max(we[h], ie() ? 44 : 0), q = () => ae(B.current), St = se(H, q, G.length, K), Ct = Se(V), wt = ge({
192
+ count: G.length,
193
+ getScrollElement: q,
194
+ estimateSize: () => xt,
195
+ overscan: 16,
196
+ enabled: K,
197
+ scrollMargin: St,
198
+ initialOffset: () => q()?.scrollTop ?? 0
199
+ }), Tt = (t) => e("flex min-w-0 items-center px-12", N && t === 0 && "pl-20", N && t === W.length - 1 && "pr-20"), J = N || Ke, Et = (t, n = !1, r = !1) => (Re && t === 0 || yt && t === W.length - 1) && e("sticky z-10", n ? J ? "bg-raised" : "bg-panel" : r ? "bg-inherit" : J ? "bg-raised group-hover/tr:bg-raised-hover group-active/tr:bg-raised-pressed" : "bg-panel group-hover/tr:bg-fill-1 group-active/tr:bg-fill-2", t === 0 ? "left-0" : "right-0", !N && !n && "row-rule"), Y = !!g || !!S, X = Y ? "gridcell" : "cell", Dt = Y && G.length > 0 && et === "body", Ot = Math.min(Qe, Math.max(G.length - 1, 0)), kt = (e) => {
200
+ K && wt.scrollToIndex(e, { align: "auto" });
201
+ let t = () => H.current?.querySelector(`[data-row-index="${e}"]`), n = t();
202
+ n ? n.focus() : requestAnimationFrame(() => t()?.focus());
203
+ }, At = (e) => {
204
+ let t = Math.max(0, Math.min(G.length - 1, e));
205
+ I("body"), $e(t), kt(t);
206
+ }, jt = v(null), Z = v(null), [Q, Mt] = y(null), [Nt, Pt] = y(""), Ft = () => new Set(G.map((e) => e.id)), It = () => {
207
+ Z.current = {
208
+ seen: Ft(),
209
+ pressed: !0
210
+ }, Pt(""), j?.();
211
+ }, Lt = v(!1), Rt = v(() => {});
212
+ Rt.current = () => {
213
+ let e = Lt.current && !A;
214
+ if (Lt.current = !!A, A) {
215
+ Z.current = {
216
+ seen: Ft(),
217
+ pressed: Z.current?.pressed ?? !1
218
+ }, Z.current.pressed || Pt("");
219
+ return;
220
+ }
221
+ let t = Z.current;
222
+ if (!t) return;
223
+ let n = G.findIndex((e) => !t.seen.has(e.id));
224
+ if (n < 0 && !e || (Z.current = null, n < 0)) return;
225
+ let r = G.reduce((e, n) => t.seen.has(n.id) ? e : e + 1, 0);
226
+ Pt(k ? P("dataTable.moreRows", "{count, plural, one {# more row loaded} other {# more rows loaded}}", { count: r }) : P("dataTable.moreRowsAll", "{count, plural, one {# more row loaded; all rows shown} other {# more rows loaded; all rows shown}}", { count: r }));
227
+ let i = document.activeElement, a = !!jt.current?.contains(i);
228
+ t.pressed && (a || !i || i === document.body) ? Y ? At(n) : Mt(G[n].id) : a && jt.current?.scrollIntoView({ block: "nearest" });
229
+ }, _(() => Rt.current(), [A, G]);
230
+ let zt = v(() => {});
231
+ zt.current = () => {
232
+ let e = Q === null ? -1 : G.findIndex((e) => e.id === Q);
233
+ e >= 0 && kt(e);
234
+ }, _(() => zt.current(), [Q]);
235
+ let Bt = (e) => {
236
+ let t = T(V.current), n = t[Math.max(0, Math.min(t.length - 1, e))];
237
+ return n ? (I("head"), nt(t.indexOf(n)), n.focus(), !0) : !1;
238
+ }, Vt = v(() => {});
239
+ Vt.current = () => {
240
+ let e = T(V.current), t = Math.min(tt, e.length - 1);
241
+ for (let n of V.current?.querySelectorAll(ke) ?? []) {
242
+ let r = e.indexOf(n) === t && !Dt ? "0" : "-1";
243
+ n.getAttribute("tabindex") !== r && n.setAttribute("tabindex", r);
244
+ }
245
+ }, _(() => Vt.current()), _(() => {
246
+ let e = V.current;
247
+ if (!e) return;
248
+ let t = new MutationObserver(() => Vt.current());
249
+ return t.observe(e, {
250
+ subtree: !0,
251
+ childList: !0,
252
+ attributes: !0,
253
+ attributeFilter: ["tabindex"]
254
+ }), () => t.disconnect();
255
+ }, []), _(() => {
256
+ let e = H.current;
257
+ if (!e || !Y) return;
258
+ let t = () => {
259
+ for (let t of e.querySelectorAll("[data-row-index]")) for (let e of t.querySelectorAll(ke)) e.getAttribute("tabindex") !== "-1" && e.setAttribute("tabindex", "-1");
260
+ };
261
+ t();
262
+ let n = new MutationObserver(t);
263
+ return n.observe(e, {
264
+ subtree: !0,
265
+ childList: !0,
266
+ attributes: !0,
267
+ attributeFilter: ["tabindex"]
268
+ }), () => n.disconnect();
269
+ }, [Y]), le(H, "[role=row]");
270
+ let Ht = (e, t) => {
271
+ let n = e ? z.getColumn(e) : void 0;
272
+ if (!n?.getCanResize()) return !1;
273
+ let r = n.columnDef.minSize ?? 64, i = n.columnDef.maxSize ?? 640;
274
+ return z.setColumnSizing((e) => ({
275
+ ...e,
276
+ [n.id]: Math.max(r, Math.min(i, n.getSize() + t))
277
+ })), !0;
278
+ }, Ut = (e) => {
279
+ if (e.altKey || e.metaKey || e.ctrlKey) return;
280
+ let t = T(V.current), n = t.indexOf(e.target);
281
+ if (n < 0) return;
282
+ let r = {
283
+ ArrowLeft: -16,
284
+ ArrowRight: 16
285
+ }[e.key];
286
+ if (e.shiftKey) {
287
+ r !== void 0 && Ht(e.target.closest("[role=columnheader]")?.dataset.col, r) && e.preventDefault();
288
+ return;
289
+ }
290
+ let i = {
291
+ ArrowLeft: n - 1,
292
+ ArrowRight: n + 1,
293
+ Home: 0,
294
+ End: t.length - 1
295
+ }[e.key];
296
+ i === void 0 ? e.key === "ArrowDown" && Y && G.length && (e.preventDefault(), At(Ot)) : (e.preventDefault(), i >= 0 && i < t.length && Bt(i));
297
+ }, Wt = () => Math.max(1, Math.floor((q()?.clientHeight ?? 400) / xt) - 1), Gt = (e, t) => {
298
+ let n = L.current ? G.findIndex((e) => e.id === L.current?.id) : -1;
299
+ n < 0 && (L.current = {
300
+ id: G[e].id,
301
+ base: R
302
+ });
303
+ let r = n < 0 ? e : n, i = { ...L.current?.base };
304
+ for (let e of G.slice(Math.min(r, t), Math.max(r, t) + 1)) e.getCanSelect() && (i[e.id] = !0);
305
+ z.setRowSelection(i);
306
+ }, Kt = (e, t, n) => {
307
+ let r = e.currentTarget, i = e.target;
308
+ if (i !== r) {
309
+ if (e.altKey || e.metaKey || e.ctrlKey || i.closest(Ae)) return;
310
+ let t = je(r), n = t.indexOf(i);
311
+ if (n < 0) return;
312
+ if (e.key === "Escape" && !i.closest("[data-popup-open], [aria-expanded=true]")) e.preventDefault(), r.focus();
313
+ else if (e.defaultPrevented) return;
314
+ else e.key === "ArrowRight" && t[n + 1] ? (e.preventDefault(), t[n + 1]?.focus()) : e.key === "ArrowLeft" && (e.preventDefault(), (t[n - 1] ?? r).focus());
315
+ return;
316
+ }
317
+ if (e.altKey) return;
318
+ if (e.metaKey || e.ctrlKey) {
319
+ e.key.toLowerCase() === "a" && S && !e.shiftKey && (e.preventDefault(), L.current = null, z.toggleAllRowsSelected(!0));
320
+ return;
321
+ }
322
+ let a = {
323
+ ArrowDown: n + 1,
324
+ ArrowUp: n - 1,
325
+ Home: 0,
326
+ End: G.length - 1,
327
+ PageDown: n + Wt(),
328
+ PageUp: n - Wt()
329
+ }[e.key];
330
+ if (a !== void 0) {
331
+ if (e.preventDefault(), e.key === "ArrowUp" && !e.shiftKey && a < 0 && Bt(tt)) return;
332
+ let t = Math.max(0, Math.min(G.length - 1, a));
333
+ e.shiftKey && S ? Gt(n, t) : L.current = null, At(t);
334
+ } else if (e.shiftKey) return;
335
+ else if (e.key === "ArrowRight") {
336
+ let t = je(r)[0];
337
+ if (!t) return;
338
+ e.preventDefault(), t.focus();
339
+ } else e.key === "Enter" ? (e.preventDefault(), g?.(t.original)) : (e.key === " " || e.key === "x") && S ? (e.preventDefault(), L.current = null, t.getCanSelect() && t.toggleSelected()) : e.key === "Escape" && S && Object.keys(R).length && (e.preventDefault(), L.current = null, z.toggleAllRowsSelected(!1));
340
+ }, qt = [
341
+ it,
342
+ W.map((e) => e.id).join(" "),
343
+ N,
344
+ yt,
345
+ Re,
346
+ J,
347
+ X
348
+ ], $ = v(null);
349
+ (!$.current || qt.some((e, t) => e !== $.current?.deps[t])) && ($.current = {
350
+ deps: qt,
351
+ rows: /* @__PURE__ */ new WeakMap()
352
+ });
353
+ let Jt = $.current.rows, Yt = (t, n, r) => {
354
+ let i = t.id === Ve, a = !!S && t.getIsSelected(), o = i || a, s = `${i} ${a}`, c = Jt.get(t), l = c?.state === s ? c.cells : Xt(t, o);
355
+ c?.state !== s && Jt.set(t, {
356
+ state: s,
357
+ cells: l
358
+ });
359
+ let ee = /* @__PURE__ */ b("div", {
360
+ role: "row",
361
+ "aria-rowindex": n + 2,
362
+ "aria-selected": S ? t.getIsSelected() : void 0,
363
+ "aria-current": i || void 0,
364
+ "data-active": i || void 0,
365
+ "data-fresh": He?.has(t.id) || void 0,
366
+ "data-row-index": n,
367
+ ...Ge && n === 0 ? { "data-force": Ge } : {},
368
+ tabIndex: Y ? Dt && n === Ot ? 0 : -1 : Q === t.id ? -1 : void 0,
369
+ ...Q === t.id ? { onBlur: () => Mt(null) } : {},
370
+ onFocus: (e) => {
371
+ e.target === e.currentTarget && (I("body"), n !== Qe && $e(n));
372
+ },
373
+ onClick: (e) => {
374
+ L.current = null, e.target.closest("button, a, [role=checkbox]") || oe(e.currentTarget) || g?.(t.original);
375
+ },
376
+ onKeyDown: (e) => Kt(e, t, n),
377
+ style: {
378
+ ...vt,
379
+ ...r
380
+ },
381
+ className: e("group/tr grid w-full text-body text-fg transition-control focus-ring-inset", !N && "row-rule", w.density[h].classes, g && "cursor-pointer", Me(J, o), "data-fresh:animate-row-fresh", r?.transform !== void 0 && "[transition-property:background-color,color,box-shadow,opacity]", "forced-colors:data-active:outline-2 forced-colors:data-active:-outline-offset-2 forced-colors:data-active:outline-solid"),
382
+ children: l
383
+ });
384
+ return de ? /* @__PURE__ */ x(u, { children: [/* @__PURE__ */ b(u.Trigger, { children: ee }), /* @__PURE__ */ b(u.Content, { children: de(t.original) })] }, t.id) : /* @__PURE__ */ b("div", { children: ee }, t.id);
385
+ };
386
+ function Xt(t, n) {
387
+ return t.getVisibleCells().filter((e) => !U.has(e.column.id)).map((r, i) => {
388
+ let a = r.column.columnDef.meta, o = _e(r.column.columnDef.cell, r.getContext()), s = r.getValue(), c = a?.text ? a.text(t.original, F) : typeof s == "string" ? s : void 0, l = a?.tone?.(t.original);
389
+ return /* @__PURE__ */ b("div", {
390
+ role: X,
391
+ className: e(Tt(i), a?.align === "end" && "justify-end text-right tabular", a?.mono && "mono text-small", l && re[l], Et(i, !1, n)),
392
+ children: c !== void 0 && typeof o != "object" ? /* @__PURE__ */ b(ne, {
393
+ truncate: !0,
394
+ tone: l ?? "default",
395
+ className: e("min-w-0", a?.mono && "text-small"),
396
+ mono: !!a?.mono,
397
+ children: c
398
+ }) : r.column.id === "__select" ? /* @__PURE__ */ b("span", {
399
+ className: "flex",
400
+ children: o
401
+ }) : /* @__PURE__ */ b(d, {
402
+ className: e("min-w-0 cell-fit", a?.grow && "flex-1"),
403
+ children: o
404
+ })
405
+ }, r.id);
406
+ });
407
+ }
408
+ let Zt = (t, n) => {
409
+ let r = t.column.columnDef.meta, i = t.column.getCanSort(), a = t.column.getCanResize(), s = t.column.getIsSorted(), c = _e(t.column.columnDef.header, t.getContext()), l = /* @__PURE__ */ x(pe, { children: [i ? /* @__PURE__ */ x("button", {
410
+ type: "button",
411
+ onClick: t.column.getToggleSortingHandler(),
412
+ className: e("relative -mx-6 inline-flex h-28 min-w-0 cursor-pointer items-center gap-4 rounded-pill px-6 text-caption font-medium transition-control focus-ring tap-target", J ? "hover:bg-raised-hover active:bg-raised-pressed" : "hover:bg-fill-1 active:bg-fill-2", "hover:text-fg", s ? "text-fg" : "text-fg-secondary", r?.align === "end" && "flex-row-reverse"),
413
+ children: [/* @__PURE__ */ b(d, { children: c }), /* @__PURE__ */ b(o, {
414
+ icon: s === "desc" ? me : he,
415
+ size: "xs",
416
+ className: e("shrink-0 transition-control", s ? "opacity-100" : "opacity-0 group-hover/th:opacity-60")
417
+ })]
418
+ }) : /* @__PURE__ */ b(d, {
419
+ className: "text-caption font-medium text-fg-secondary",
420
+ children: c
421
+ }), a && /* @__PURE__ */ b("div", {
422
+ role: "separator",
423
+ "aria-orientation": "vertical",
424
+ "aria-label": P("dataTable.resizeColumn", "Resize column"),
425
+ "aria-valuenow": t.column.getSize(),
426
+ "aria-valuemin": t.column.columnDef.minSize ?? 64,
427
+ "aria-valuemax": t.column.columnDef.maxSize ?? 640,
428
+ tabIndex: -1,
429
+ onMouseDown: t.getResizeHandler(),
430
+ onTouchStart: t.getResizeHandler(),
431
+ onDoubleClick: () => t.column.resetSize(),
432
+ className: "absolute inset-y-0 -right-8 z-10 w-16 cursor-col-resize after:absolute after:inset-y-8 after:right-8 after:w-1 after:bg-transparent after:transition-control group-hover/th:after:bg-line-strong coarse:after:bg-line focus-ring-inset"
433
+ })] });
434
+ return /* @__PURE__ */ b("div", {
435
+ role: "columnheader",
436
+ "data-col": t.column.id,
437
+ "aria-sort": s === "asc" ? "ascending" : s === "desc" ? "descending" : i ? "none" : void 0,
438
+ className: e("group/th relative", Tt(n), r?.align === "end" && "justify-end", Et(n, !0), Et(n, !0) && "rule-b"),
439
+ children: a ? /* @__PURE__ */ x(u, { children: [/* @__PURE__ */ b(u.Trigger, {
440
+ className: e("flex min-w-0 flex-1 items-center self-stretch", r?.align === "end" && "justify-end"),
441
+ children: l
442
+ }), /* @__PURE__ */ x(u.Content, { children: [
443
+ /* @__PURE__ */ b(u.Item, {
444
+ onClick: () => Ht(t.column.id, 32),
445
+ children: P("dataTable.widenColumn", "Widen column")
446
+ }),
447
+ /* @__PURE__ */ b(u.Item, {
448
+ onClick: () => Ht(t.column.id, -32),
449
+ children: P("dataTable.narrowColumn", "Narrow column")
450
+ }),
451
+ /* @__PURE__ */ b(u.Item, {
452
+ onClick: () => t.column.resetSize(),
453
+ children: P("dataTable.resetWidth", "Reset width")
454
+ })
455
+ ] })] }) : l
456
+ }, t.id);
457
+ };
458
+ return /* @__PURE__ */ x("div", {
459
+ ref: (e) => {
460
+ B.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
461
+ },
462
+ className: e("relative w-full min-w-0", !N && !qe && "px-24", Be),
463
+ children: [
464
+ /* @__PURE__ */ x("div", {
465
+ role: Y ? "grid" : "table",
466
+ "aria-label": We,
467
+ "aria-rowcount": G.length + +!bt,
468
+ "aria-multiselectable": S || void 0,
469
+ "aria-busy": E || void 0,
470
+ className: e("w-full overflow-clip", N && "rounded-group bg-raised shadow-xs"),
471
+ children: [/* @__PURE__ */ b("div", {
472
+ ref: V,
473
+ role: "rowgroup",
474
+ hidden: bt,
475
+ className: e("sticky top-0 z-20 overflow-hidden", J ? "bg-raised" : "bg-panel"),
476
+ ...Ct ? { style: { top: Ct } } : {},
477
+ onKeyDown: Ut,
478
+ onFocus: (e) => {
479
+ let t = T(V.current).indexOf(e.target);
480
+ t < 0 || (L.current = null, I("head"), nt(t));
481
+ },
482
+ onScroll: (e) => {
483
+ H.current && H.current.scrollLeft !== e.currentTarget.scrollLeft && (H.current.scrollLeft = e.currentTarget.scrollLeft);
484
+ },
485
+ children: z.getHeaderGroups().map((e) => /* @__PURE__ */ b("div", {
486
+ role: "row",
487
+ "aria-rowindex": 1,
488
+ className: "grid h-36 rule-b",
489
+ style: vt,
490
+ children: e.headers.filter((e) => !U.has(e.column.id)).map(Zt)
491
+ }, e.id))
492
+ }), /* @__PURE__ */ b("div", {
493
+ ref: H,
494
+ role: "rowgroup",
495
+ className: "overflow-x-auto overscroll-x-contain scrollbar-quiet scroll-fade-x",
496
+ onScroll: (e) => {
497
+ V.current && V.current.scrollLeft !== e.currentTarget.scrollLeft && (V.current.scrollLeft = e.currentTarget.scrollLeft);
498
+ },
499
+ children: D ? /* @__PURE__ */ b("div", {
500
+ role: "row",
501
+ children: /* @__PURE__ */ b("div", {
502
+ role: X,
503
+ "aria-colspan": W.length,
504
+ className: "block",
505
+ children: /* @__PURE__ */ b("div", {
506
+ role: "alert",
507
+ children: /* @__PURE__ */ b(a, { children: /* @__PURE__ */ b(l, {
508
+ size: "compact",
509
+ title: P("dataTable.loadFailed", "Couldn't load these rows"),
510
+ ...O ? {} : { description: P("dataTable.reloadToRetry", "Reload the page to try again.") },
511
+ actions: O && /* @__PURE__ */ b(ee, {
512
+ size: "sm",
513
+ onClick: O,
514
+ children: P("dataTable.tryAgain", "Try again")
515
+ })
516
+ }) })
517
+ })
518
+ })
519
+ }) : E && G.length === 0 ? Array.from({ length: 8 }, (t, n) => /* @__PURE__ */ b("div", {
520
+ role: "row",
521
+ className: e("grid", w.density[h].classes),
522
+ style: vt,
523
+ children: W.map((t, r) => /* @__PURE__ */ b("div", {
524
+ role: X,
525
+ className: e(Tt(r), t.columnDef.meta?.align === "end" && "justify-end"),
526
+ children: /* @__PURE__ */ b(c, {
527
+ shape: "line",
528
+ style: { width: `${40 + (n * 7 + r * 13) % 45}%` }
529
+ })
530
+ }, t.id))
531
+ }, n)) : G.length === 0 ? /* @__PURE__ */ b("div", {
532
+ role: "row",
533
+ children: /* @__PURE__ */ b("div", {
534
+ role: X,
535
+ "aria-colspan": W.length,
536
+ className: "block",
537
+ children: /* @__PURE__ */ b(a, { children: Le ?? /* @__PURE__ */ b(l, {
538
+ size: "compact",
539
+ title: P("dataTable.noRows", "No rows")
540
+ }) })
541
+ })
542
+ }) : K ? /* @__PURE__ */ b("div", {
543
+ className: "relative",
544
+ style: { height: wt.getTotalSize() },
545
+ children: wt.getVirtualItems().map((e) => Yt(G[e.index], e.index, {
546
+ position: "absolute",
547
+ top: 0,
548
+ left: 0,
549
+ transform: `translateY(${Math.round(e.start - St)}px)`
550
+ }))
551
+ }) : G.map((e, t) => Yt(e, t))
552
+ })]
553
+ }),
554
+ /* @__PURE__ */ b(te, {
555
+ ref: jt,
556
+ variant: "load-more",
557
+ hasMore: !!k,
558
+ loading: A,
559
+ ...j ? { onLoadMore: It } : {}
560
+ }),
561
+ j && /* @__PURE__ */ b("span", {
562
+ role: "status",
563
+ className: "sr-only",
564
+ children: Nt
565
+ })
566
+ ]
567
+ });
568
+ }
569
+ var Fe = /* @__PURE__ */ de(Pe);
570
+ process.env.NODE_ENV !== "production" && (Fe.displayName = "DataTable");
571
+ var Ie = Fe;
572
+ // src/components/data-table/columns.tsx
573
+ function E(e) {
574
+ return C.add(e), e;
575
+ }
576
+ function D(e, t, n, r = {}, i) {
577
+ return {
578
+ id: e.id,
579
+ header: () => e.header,
580
+ accessorFn: t,
581
+ cell: (e) => n(e.getValue(), e.row.original),
582
+ ...e.size ? { size: e.size } : {},
583
+ ...i ? { sortingFn: i } : {},
584
+ meta: {
585
+ ...e.priority === void 0 ? {} : { priority: e.priority },
586
+ ...e.grow ? { grow: !0 } : {},
587
+ ...e.minWidth === void 0 ? {} : { minWidth: e.minWidth },
588
+ ...e.tone ? { tone: e.tone } : {},
589
+ ...r
590
+ }
591
+ };
592
+ }
593
+ function O({ format: e }) {
594
+ return e(f());
595
+ }
596
+ function Le({ value: e }) {
597
+ let t = ce(), { formatNumber: n, formatTokens: r } = f(), i = t("dataTable.tokenCount", "{count} tokens", { count: n(e) });
598
+ return /* @__PURE__ */ b(m, {
599
+ content: i,
600
+ children: /* @__PURE__ */ x("span", { children: [/* @__PURE__ */ b("span", {
601
+ "aria-hidden": !0,
602
+ children: r(e)
603
+ }), /* @__PURE__ */ b("span", {
604
+ className: "sr-only",
605
+ children: i
606
+ })] })
607
+ });
608
+ }
609
+ function k({ value: e }) {
610
+ let t = g(), { formatDate: n } = f();
611
+ return /* @__PURE__ */ b("time", {
612
+ dateTime: new Date(e).toISOString(),
613
+ children: n(e, {
614
+ time: !0,
615
+ utc: t
616
+ })
617
+ });
618
+ }
619
+ function A({ value: e, now: t, live: n }) {
620
+ let r = h(), i = g(), { formatDate: a, formatRelative: o } = f(), s = a(e, {
621
+ time: !0,
622
+ seconds: !0,
623
+ utc: i
624
+ }), c = n && r ? a(e, {
625
+ time: !0,
626
+ utc: i
627
+ }) : o(e, t, { utc: i });
628
+ return /* @__PURE__ */ b(m, {
629
+ content: `${s} · ${a(e, {
630
+ time: !0,
631
+ utc: !0
632
+ })}`,
633
+ shape: "multiline",
634
+ children: /* @__PURE__ */ x("span", {
635
+ className: "text-fg-secondary",
636
+ children: [/* @__PURE__ */ b("time", {
637
+ dateTime: new Date(e).toISOString(),
638
+ children: c
639
+ }), /* @__PURE__ */ x("span", {
640
+ className: "sr-only",
641
+ children: [" ", s]
642
+ })]
643
+ })
644
+ });
645
+ }
646
+ var j = {
647
+ text: (e, t) => D(e, t, (e) => e, { text: (e) => t(e) }),
648
+ mono: (e, t) => D(e, t, (e) => e, {
649
+ mono: !0,
650
+ text: (e) => t(e)
651
+ }),
652
+ number: (e, t) => D(e, t, (e) => /* @__PURE__ */ b(O, { format: (t) => t.formatNumber(e) }), { align: "end" }),
653
+ money: (e, t, n = {}) => D(e, t, (e) => /* @__PURE__ */ b(O, { format: (t) => t.formatUSD(e, n.decimals === void 0 ? {} : { decimals: n.decimals }) }), {
654
+ align: "end",
655
+ mono: !1
656
+ }, (e, t, n) => Number(e.getValue(n)) - Number(t.getValue(n))),
657
+ tokens: (e, t) => D(e, t, (e) => /* @__PURE__ */ b(Le, { value: e }), { align: "end" }),
658
+ duration: (e, t) => D(e, t, (e) => /* @__PURE__ */ b(O, { format: (t) => t.formatDuration(e) }), { align: "end" }),
659
+ date: (e, t) => E(D(e, t, (e) => /* @__PURE__ */ b(k, { value: e }), { text: (e, n) => n.formatDate(t(e), { time: !0 }) }, "datetime")),
660
+ relative: (e, t, n = {}) => E(D(e, t, (e) => /* @__PURE__ */ b(A, {
661
+ value: e,
662
+ now: n.now ?? Date.now(),
663
+ live: n.now === void 0
664
+ }), { text: (e, n) => n.formatDate(t(e), { time: !0 }) }, (e, t, n) => new Date(e.getValue(n)).getTime() - new Date(t.getValue(n)).getTime())),
665
+ status: (e, t) => D(e, t, (e) => /* @__PURE__ */ b(ue, {
666
+ tone: e.tone,
667
+ children: e.label
668
+ }), { text: void 0 }),
669
+ avatar: (e, t) => D(e, t, (e) => /* @__PURE__ */ x("span", {
670
+ className: "inline-flex min-w-0 items-center gap-8",
671
+ children: [/* @__PURE__ */ b(p, {
672
+ name: e.name,
673
+ ...e.src ? { src: e.src } : {},
674
+ size: 24,
675
+ decorative: !0
676
+ }), /* @__PURE__ */ b(d, { children: e.name })]
677
+ }), { text: (e) => t(e).name }),
678
+ custom: (e, t, n, r = {}) => D(e, t, n, r)
679
+ };
680
+ export { w as i, Ie as n, Ce as r, j as t };
681
+
682
+ //# sourceMappingURL=data-table-YrA9Py2c.js.map