@mechane-ai/elements 0.7.1 → 0.8.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/README.md +17 -1
- package/dist/ai.js +3 -3
- package/dist/assets/stylex.css +62 -2
- package/dist/{categorical-values-75J0TUkR.js → categorical-values-dGbaZ0tp.js} +2 -2
- package/dist/{chart-frame--DOsZKwP.js → chart-frame-DgPdIguO.js} +2 -1
- package/dist/{chart-input-C-g586YE.js → chart-input-Sac4StHN.js} +2 -2
- package/dist/charts/cartesian.js +6 -5
- package/dist/charts/distribution.js +2 -2
- package/dist/charts/graph.js +2 -2
- package/dist/charts/hierarchy.js +3 -3
- package/dist/charts/matrix.js +2 -2
- package/dist/charts/timeline.js +1 -1
- package/dist/charts.js +1 -1
- package/dist/{code-block-D0Jmsj7w.js → code-block-BRNdtTaP.js} +1 -1
- package/dist/collections.js +186 -105
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +2 -2
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +2 -2
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-HLYu0cmz.js → content-link-Dd8gapwc.js} +1 -1
- package/dist/content.js +2 -2
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +1 -1
- package/dist/forms.js +1 -1
- package/dist/index.js +1 -1
- package/dist/layout.js +7 -6
- package/dist/navigation/commands.js +1 -1
- package/dist/packages/charts/src/chart-theme.d.ts +1 -0
- package/dist/packages/collections/src/data-table.d.ts +3 -1
- package/dist/packages/collections/src/index.d.ts +2 -0
- package/dist/packages/collections/src/metrics.d.ts +5 -2
- package/dist/packages/collections/src/timeline.d.ts +19 -0
- package/dist/packages/core/src/copy-value.d.ts +1 -1
- package/dist/{pierre-tree-DVybsnm4.js → pierre-tree-DdE1boiT.js} +2 -2
- package/dist/{src-BkCsvZGi.js → src-Bc5sEhdO.js} +35 -30
- package/dist/{src-B_DCatpY.js → src-DV0BNk1M.js} +1 -1
- package/dist/{src-DjTM64tN.js → src-Eg_ytPjv.js} +3 -3
- package/package.json +1 -1
package/dist/collections.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as e, f as t, i as n, v as r, y as i } from "./src-
|
|
2
|
-
import { r as a } from "./src-
|
|
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
3
|
import { r as o } from "./src-CfDf8TY8.js";
|
|
4
4
|
import { t as s } from "./accessibility-C-aIZ1Yx.js";
|
|
5
5
|
import { mergeProps as c } from "@base-ui/react/merge-props";
|
|
@@ -8,9 +8,9 @@ import { Fragment as ee, useEffect as u, useLayoutEffect as d, useMemo as te, us
|
|
|
8
8
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
9
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
10
|
import { createColumnHelper as ae, tableFeatures as b, useTable as oe } from "@tanstack/react-table";
|
|
11
|
-
import { defaultRangeExtractor as
|
|
11
|
+
import { defaultRangeExtractor as se, useVirtualizer as ce } from "@tanstack/react-virtual";
|
|
12
12
|
// packages/collections/src/collection-controls.tsx
|
|
13
|
-
function
|
|
13
|
+
function x({ label: e, children: t, actions: n }) {
|
|
14
14
|
return /* @__PURE__ */ h("div", {
|
|
15
15
|
role: "group",
|
|
16
16
|
"aria-label": e,
|
|
@@ -21,7 +21,7 @@ function S({ label: e, children: t, actions: n }) {
|
|
|
21
21
|
})]
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function S({ filters: e, onRemove: t, label: n = "Applied filters" }) {
|
|
25
25
|
return /* @__PURE__ */ m("div", {
|
|
26
26
|
role: "group",
|
|
27
27
|
"aria-label": n,
|
|
@@ -40,7 +40,7 @@ function C({ filters: e, onRemove: t, label: n = "Applied filters" }) {
|
|
|
40
40
|
}, e.id))
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function C({ columns: e, onVisibilityChange: t, label: n = "Columns" }) {
|
|
44
44
|
return /* @__PURE__ */ h(o.Root, { children: [/* @__PURE__ */ h(o.Trigger, {
|
|
45
45
|
render: /* @__PURE__ */ m(r, {
|
|
46
46
|
variant: "outline",
|
|
@@ -69,7 +69,7 @@ function w({ columns: e, onVisibilityChange: t, label: n = "Columns" }) {
|
|
|
69
69
|
})
|
|
70
70
|
}) })] });
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function w({ description: t, previous: n, next: i }) {
|
|
73
73
|
return /* @__PURE__ */ h("nav", {
|
|
74
74
|
"aria-label": "Pagination",
|
|
75
75
|
className: "x78zum5 x6s0dn4 x1qughib x1a02dak xaml1ju",
|
|
@@ -96,7 +96,7 @@ function T({ description: t, previous: n, next: i }) {
|
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
// packages/collections/src/use-end-reached.ts
|
|
99
|
-
function
|
|
99
|
+
function T({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
100
100
|
u(() => {
|
|
101
101
|
if (n === void 0 || e.current === null) return;
|
|
102
102
|
let r = new IntersectionObserver((e) => {
|
|
@@ -111,7 +111,7 @@ function E({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
|
111
111
|
]);
|
|
112
112
|
}
|
|
113
113
|
// packages/collections/src/data-table.tsx
|
|
114
|
-
var
|
|
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 = {
|
|
115
115
|
kmVPX3: "x1717udv",
|
|
116
116
|
kMzoRj: "xc342km",
|
|
117
117
|
$$css: !0
|
|
@@ -132,6 +132,7 @@ var ce = b({}), le = "a, button, input, select, textarea, label, summary, [role=
|
|
|
132
132
|
k7Eaqz: "xeuugli",
|
|
133
133
|
kVQacm: "xysyzu8",
|
|
134
134
|
kZeWKH: "xish69e",
|
|
135
|
+
k3XXqK: "x1t137rt",
|
|
135
136
|
kPJHz1: "x13qnu6",
|
|
136
137
|
k7shQP: "x9v5kkp",
|
|
137
138
|
kZs9gx: "x19rmrnh",
|
|
@@ -196,7 +197,7 @@ var ce = b({}), le = "a, button, input, select, textarea, label, summary, [role=
|
|
|
196
197
|
},
|
|
197
198
|
cell: {
|
|
198
199
|
k7Eaqz: "x1cxjkq6",
|
|
199
|
-
k8WAf4: "
|
|
200
|
+
k8WAf4: "xt970qd",
|
|
200
201
|
kg3NbH: "x1m92p3w",
|
|
201
202
|
kXLuUW: "xxymvpz",
|
|
202
203
|
kHjlTd: "xj0a0fe",
|
|
@@ -222,10 +223,8 @@ var ce = b({}), le = "a, button, input, select, textarea, label, summary, [role=
|
|
|
222
223
|
k1xSpc: "xazwdyr",
|
|
223
224
|
$$css: !0
|
|
224
225
|
},
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
khDVqt: "xuxw1ft",
|
|
228
|
-
kg5iWk: "xlyipyv",
|
|
226
|
+
contentCell: {
|
|
227
|
+
k8WAf4: "xn9t2bk",
|
|
229
228
|
$$css: !0
|
|
230
229
|
},
|
|
231
230
|
spacer: (e) => [
|
|
@@ -236,17 +235,20 @@ var ce = b({}), le = "a, button, input, select, textarea, label, summary, [role=
|
|
|
236
235
|
},
|
|
237
236
|
{ "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
|
|
238
237
|
]
|
|
238
|
+
}, fe = {
|
|
239
|
+
fixed: O.content,
|
|
240
|
+
content: O.contentCell
|
|
239
241
|
}, k = {
|
|
240
242
|
start: O.start,
|
|
241
243
|
end: O.end
|
|
242
|
-
},
|
|
244
|
+
}, pe = {
|
|
243
245
|
content: O.content,
|
|
244
246
|
fill: O.fillFrame
|
|
245
|
-
},
|
|
247
|
+
}, me = {
|
|
246
248
|
content: O.content,
|
|
247
249
|
fill: O.fillViewport
|
|
248
250
|
};
|
|
249
|
-
function
|
|
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 }) {
|
|
250
252
|
let F = te(() => {
|
|
251
253
|
let e = ae();
|
|
252
254
|
return e.columns(t.map((t) => e.display({
|
|
@@ -254,52 +256,52 @@ function M({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
254
256
|
header: t.label
|
|
255
257
|
})));
|
|
256
258
|
}, [t]), I = oe({
|
|
257
|
-
features:
|
|
259
|
+
features: le,
|
|
258
260
|
columns: F,
|
|
259
261
|
data: e,
|
|
260
262
|
getRowId: n
|
|
261
|
-
}), 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),
|
|
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";
|
|
262
264
|
d(() => {
|
|
263
|
-
if (
|
|
265
|
+
if (x === void 0) {
|
|
264
266
|
K.current = void 0;
|
|
265
267
|
return;
|
|
266
268
|
}
|
|
267
|
-
if (K.current ===
|
|
268
|
-
let e = L.current?.querySelector(`[data-row-id="${CSS.escape(
|
|
269
|
+
if (K.current === x) return;
|
|
270
|
+
let e = L.current?.querySelector(`[data-row-id="${CSS.escape(x)}"] [data-row-action]`);
|
|
269
271
|
if (e == null) return;
|
|
270
272
|
let t = requestAnimationFrame(() => {
|
|
271
|
-
e.focus({ preventScroll: !0 }), K.current =
|
|
273
|
+
e.focus({ preventScroll: !0 }), K.current = x;
|
|
272
274
|
});
|
|
273
275
|
return () => cancelAnimationFrame(t);
|
|
274
|
-
}, [e,
|
|
276
|
+
}, [e, x]), T({
|
|
275
277
|
end: R,
|
|
276
|
-
onEndReached:
|
|
278
|
+
onEndReached: D === void 0 ? N : void 0,
|
|
277
279
|
content: e.length
|
|
278
280
|
}), u(() => {
|
|
279
281
|
let e = z.current, t = B.current;
|
|
280
|
-
if (
|
|
282
|
+
if (D === void 0 || e === null || t === null) return;
|
|
281
283
|
let n = new ResizeObserver(() => H(e.offsetHeight + t.offsetHeight));
|
|
282
284
|
return n.observe(e), n.observe(t), () => n.disconnect();
|
|
283
285
|
}, [
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
286
|
+
D,
|
|
287
|
+
S,
|
|
288
|
+
C
|
|
287
289
|
]);
|
|
288
|
-
let
|
|
290
|
+
let X = ce({
|
|
289
291
|
count: e.length,
|
|
290
|
-
enabled:
|
|
292
|
+
enabled: D !== void 0,
|
|
291
293
|
getScrollElement: () => L.current,
|
|
292
294
|
getItemKey: (t) => {
|
|
293
295
|
let r = e[t];
|
|
294
296
|
if (r === void 0) throw RangeError("The virtual row is outside the supplied table page.");
|
|
295
297
|
return n(r);
|
|
296
298
|
},
|
|
297
|
-
estimateSize: () =>
|
|
299
|
+
estimateSize: () => w === "fixed" ? E : D?.estimatedRowHeight ?? E,
|
|
298
300
|
scrollMargin: V,
|
|
299
301
|
scrollPaddingStart: V,
|
|
300
302
|
overscan: 6,
|
|
301
303
|
rangeExtractor: (t) => {
|
|
302
|
-
let n =
|
|
304
|
+
let n = se(t);
|
|
303
305
|
return q === -1 ? n : [.../* @__PURE__ */ new Set([
|
|
304
306
|
...n,
|
|
305
307
|
q - 1,
|
|
@@ -307,60 +309,60 @@ function M({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
307
309
|
q + 1
|
|
308
310
|
])].filter((t) => t >= 0 && t < e.length).toSorted((e, t) => e - t);
|
|
309
311
|
}
|
|
310
|
-
}),
|
|
312
|
+
}), ge = D === void 0 ? I.getRowModel().rows.map((e, t) => ({
|
|
311
313
|
row: e,
|
|
312
314
|
index: t,
|
|
313
315
|
gap: 0
|
|
314
|
-
})) :
|
|
316
|
+
})) : X.getVirtualItems().flatMap((e, t, n) => {
|
|
315
317
|
let r = I.getRowModel().rows[e.index];
|
|
316
318
|
return r === void 0 ? [] : [{
|
|
317
319
|
row: r,
|
|
318
320
|
index: e.index,
|
|
319
321
|
gap: e.start - (n[t - 1]?.end ?? V)
|
|
320
322
|
}];
|
|
321
|
-
}),
|
|
323
|
+
}), Z = D !== void 0 && (e.length === 0 || X.range?.endIndex === e.length - 1);
|
|
322
324
|
u(() => {
|
|
323
|
-
|
|
325
|
+
Z && N?.();
|
|
324
326
|
}, [
|
|
325
|
-
|
|
326
|
-
|
|
327
|
+
Z,
|
|
328
|
+
N,
|
|
327
329
|
e.length
|
|
328
330
|
]), d(() => {
|
|
329
331
|
if (G.current === void 0) return;
|
|
330
332
|
let e = Array.from(L.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId === G.current)?.querySelector("[data-row-action]");
|
|
331
|
-
e != null && (e.focus({ preventScroll:
|
|
333
|
+
e != null && (e.focus({ preventScroll: D !== void 0 }), G.current = void 0);
|
|
332
334
|
});
|
|
333
|
-
function
|
|
335
|
+
function _e(t, r) {
|
|
334
336
|
let i = t.metaKey || t.ctrlKey, a = t.altKey || t.shiftKey;
|
|
335
337
|
if (i || a) return;
|
|
336
|
-
let o =
|
|
338
|
+
let o = de.get(t.key);
|
|
337
339
|
if (o === void 0) return;
|
|
338
340
|
t.preventDefault();
|
|
339
341
|
let s = r + o, c = e[s];
|
|
340
|
-
c !== void 0 && (G.current = n(c), W(G.current),
|
|
342
|
+
c !== void 0 && (G.current = n(c), W(G.current), D !== void 0 && X.scrollToIndex(s, { align: "auto" }));
|
|
341
343
|
}
|
|
342
|
-
let
|
|
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;
|
|
343
345
|
return /* @__PURE__ */ h("div", {
|
|
344
|
-
...l.props(O.frame,
|
|
346
|
+
...l.props(O.frame, pe[Y]),
|
|
345
347
|
children: [/* @__PURE__ */ h("div", {
|
|
346
348
|
ref: L,
|
|
347
349
|
role: "region",
|
|
348
350
|
"aria-label": r,
|
|
349
351
|
tabIndex: 0,
|
|
350
|
-
...l.props(O.viewport,
|
|
352
|
+
...l.props(O.viewport, me[Y], typeof D?.height == "number" && O.virtual(D.height)),
|
|
351
353
|
children: [/* @__PURE__ */ h("table", {
|
|
352
|
-
"aria-rowcount":
|
|
353
|
-
...l.props(O.table, t.some((e) => e.truncate === !0) && O.fixed, O.minimumWidth(
|
|
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)),
|
|
354
356
|
children: [
|
|
355
357
|
/* @__PURE__ */ m("caption", {
|
|
356
358
|
ref: z,
|
|
357
|
-
...l.props(O.caption,
|
|
359
|
+
...l.props(O.caption, S && s.hidden),
|
|
358
360
|
children: r
|
|
359
361
|
}),
|
|
360
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))] }),
|
|
361
363
|
/* @__PURE__ */ m("thead", {
|
|
362
364
|
ref: B,
|
|
363
|
-
...l.props(
|
|
365
|
+
...l.props(C && s.hidden),
|
|
364
366
|
children: /* @__PURE__ */ h("tr", { children: [g !== void 0 && /* @__PURE__ */ m("th", {
|
|
365
367
|
scope: "col",
|
|
366
368
|
className: "x7wzq59 x13vifvy x1vjfegm xc9qbxq xt970qd xso031l x1q0q8m5 x1qndepd x153jb6y xpvm0e4 xo1l8bm xy8obcc xuxw1ft x187nhsf xeuugli x1m92p3w",
|
|
@@ -396,31 +398,31 @@ function M({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
396
398
|
e.currentTarget.contains(e.relatedTarget) || W(void 0);
|
|
397
399
|
},
|
|
398
400
|
children: [
|
|
399
|
-
|
|
401
|
+
ge.map(({ row: e, index: n, gap: r }) => /* @__PURE__ */ h(ee, { children: [r > 0 && /* @__PURE__ */ m("tr", {
|
|
400
402
|
"aria-hidden": "true",
|
|
401
403
|
children: /* @__PURE__ */ m("td", {
|
|
402
|
-
colSpan:
|
|
404
|
+
colSpan: Q,
|
|
403
405
|
...l.props(O.spacer(r))
|
|
404
406
|
})
|
|
405
407
|
}), /* @__PURE__ */ h("tr", {
|
|
406
408
|
"data-index": n,
|
|
407
409
|
"data-row-id": e.id,
|
|
408
|
-
"aria-rowindex":
|
|
409
|
-
ref:
|
|
410
|
+
"aria-rowindex": D === void 0 ? void 0 : n + 2,
|
|
411
|
+
ref: D === void 0 || w === "fixed" ? void 0 : X.measureElement,
|
|
410
412
|
onFocus: () => W(e.id),
|
|
411
413
|
onClick: (e) => {
|
|
412
|
-
if (y === void 0 || !
|
|
414
|
+
if (y === void 0 || !M(e) || e.target instanceof Element && e.target.closest(ue) !== null) return;
|
|
413
415
|
let t = e.currentTarget.querySelector("[data-row-action]");
|
|
414
416
|
t?.focus({ preventScroll: !0 }), t?.click();
|
|
415
417
|
},
|
|
416
418
|
...{
|
|
417
|
-
0: { className: "
|
|
418
|
-
2: { className: "
|
|
419
|
-
1: { className: "
|
|
420
|
-
3: { className: "
|
|
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" }
|
|
421
423
|
}[(y !== void 0) << 1 | (g?.has(e.id) === !0 || b === e.id)],
|
|
422
424
|
children: [g !== void 0 && /* @__PURE__ */ m("td", {
|
|
423
|
-
className: "
|
|
425
|
+
className: "xt970qd xxymvpz xj0a0fe x187nhsf xeuugli x1m92p3w",
|
|
424
426
|
children: /* @__PURE__ */ m(a.Root, {
|
|
425
427
|
"aria-label": v(e.original),
|
|
426
428
|
checked: g.has(e.id),
|
|
@@ -431,37 +433,33 @@ function M({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
431
433
|
children: /* @__PURE__ */ m(a.Indicator, {})
|
|
432
434
|
})
|
|
433
435
|
}), t.map((t, r) => /* @__PURE__ */ m("td", {
|
|
434
|
-
...l.props(O.cell, k[t.align ?? "start"], t.width !== void 0 && O.width(t.width), t.secondary === !0 && O.secondary
|
|
435
|
-
children: y !== void 0 && r ===
|
|
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, {
|
|
436
438
|
row: e.original,
|
|
437
439
|
action: y,
|
|
438
440
|
active: b === e.id,
|
|
439
|
-
onKeyDown: (e) =>
|
|
440
|
-
children: /* @__PURE__ */ m(
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
1: { className: "x1lliihq xeuugli x193iq5w xb3r6kr xuxw1ft xlyipyv" }
|
|
444
|
-
}[t.truncate === !0 | 0],
|
|
441
|
+
onKeyDown: (e) => _e(e, n),
|
|
442
|
+
children: /* @__PURE__ */ m(j, {
|
|
443
|
+
fixed: w === "fixed",
|
|
444
|
+
truncate: t.truncate,
|
|
445
445
|
children: t.cell(e.original)
|
|
446
446
|
})
|
|
447
|
-
}) : /* @__PURE__ */ m(
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
1: { className: "x1lliihq xeuugli x193iq5w xb3r6kr xuxw1ft xlyipyv" }
|
|
451
|
-
}[t.truncate === !0 | 0],
|
|
447
|
+
}) : /* @__PURE__ */ m(j, {
|
|
448
|
+
fixed: w === "fixed",
|
|
449
|
+
truncate: t.truncate,
|
|
452
450
|
children: t.cell(e.original)
|
|
453
451
|
})
|
|
454
452
|
}, t.id))]
|
|
455
453
|
})] }, e.id)),
|
|
456
|
-
|
|
454
|
+
D !== void 0 && be > 0 && /* @__PURE__ */ m("tr", {
|
|
457
455
|
"aria-hidden": "true",
|
|
458
456
|
children: /* @__PURE__ */ m("td", {
|
|
459
|
-
colSpan:
|
|
460
|
-
...l.props(O.spacer(
|
|
457
|
+
colSpan: Q,
|
|
458
|
+
...l.props(O.spacer(be))
|
|
461
459
|
})
|
|
462
460
|
}),
|
|
463
461
|
e.length === 0 && /* @__PURE__ */ m("tr", { children: /* @__PURE__ */ m("td", {
|
|
464
|
-
colSpan:
|
|
462
|
+
colSpan: Q,
|
|
465
463
|
className: "x1ttojsm x2b8uid x153jb6y",
|
|
466
464
|
children: i
|
|
467
465
|
}) })
|
|
@@ -472,9 +470,9 @@ function M({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
472
470
|
ref: R,
|
|
473
471
|
...{
|
|
474
472
|
0: {},
|
|
475
|
-
1: { className: "xid9utz x1c8xbx5" }
|
|
476
|
-
}[
|
|
477
|
-
children:
|
|
473
|
+
1: { className: "xid9utz x1c8xbx5 x15x95ik x1az1eml" }
|
|
474
|
+
}[A !== void 0 | 0],
|
|
475
|
+
children: A
|
|
478
476
|
})]
|
|
479
477
|
}), P !== void 0 && /* @__PURE__ */ m("div", {
|
|
480
478
|
className: "x1c8xbx5 x178xt8z x13fuv20 xhjagg4",
|
|
@@ -482,12 +480,30 @@ function M({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
482
480
|
})]
|
|
483
481
|
});
|
|
484
482
|
}
|
|
485
|
-
function
|
|
483
|
+
function j({ fixed: e, truncate: t, children: n }) {
|
|
484
|
+
return /* @__PURE__ */ m("span", {
|
|
485
|
+
...{
|
|
486
|
+
0: { className: "x78zum5 x6s0dn4 xeuugli xh8yej3 x1dqyrwa" },
|
|
487
|
+
1: { className: "x78zum5 x6s0dn4 xeuugli xh8yej3 xt7dq6l" }
|
|
488
|
+
}[!e | 0],
|
|
489
|
+
children: /* @__PURE__ */ m("span", {
|
|
490
|
+
title: typeof n == "string" ? n : void 0,
|
|
491
|
+
...{
|
|
492
|
+
0: { className: "x1lliihq xeuugli x193iq5w" },
|
|
493
|
+
2: { className: "x1lliihq xeuugli x193iq5w xh8yej3 xjexgjb xb3r6kr" },
|
|
494
|
+
1: { className: "x1lliihq xeuugli x193iq5w xb3r6kr xuxw1ft xlyipyv" },
|
|
495
|
+
3: { className: "x1lliihq xeuugli x193iq5w xh8yej3 xjexgjb xb3r6kr xuxw1ft xlyipyv" }
|
|
496
|
+
}[!!e << 1 | !!(t ?? e)],
|
|
497
|
+
children: n
|
|
498
|
+
})
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
function M(e) {
|
|
486
502
|
if (e.defaultPrevented || e.button !== 0) return !1;
|
|
487
503
|
let t = e.metaKey || e.ctrlKey, n = e.altKey || e.shiftKey;
|
|
488
504
|
return t || n ? !1 : e.detail === 0 || e.currentTarget.ownerDocument.getSelection()?.isCollapsed !== !1;
|
|
489
505
|
}
|
|
490
|
-
function
|
|
506
|
+
function he({ row: e, action: t, active: n, children: r, onKeyDown: i }) {
|
|
491
507
|
return t.href === void 0 ? /* @__PURE__ */ m("button", {
|
|
492
508
|
type: "button",
|
|
493
509
|
"aria-label": t.label?.(e),
|
|
@@ -495,9 +511,9 @@ function de({ row: e, action: t, active: n, children: r, onKeyDown: i }) {
|
|
|
495
511
|
"data-row-action": !0,
|
|
496
512
|
onKeyDown: i,
|
|
497
513
|
onClick: (n) => {
|
|
498
|
-
|
|
514
|
+
M(n) && t.onActivate(e);
|
|
499
515
|
},
|
|
500
|
-
className: "x1rh3ycu x1hx0egp
|
|
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",
|
|
501
517
|
children: r
|
|
502
518
|
}) : /* @__PURE__ */ m("a", {
|
|
503
519
|
href: t.href(e),
|
|
@@ -505,20 +521,20 @@ function de({ row: e, action: t, active: n, children: r, onKeyDown: i }) {
|
|
|
505
521
|
"data-row-action": !0,
|
|
506
522
|
onKeyDown: i,
|
|
507
523
|
onClick: (n) => {
|
|
508
|
-
t.onActivate !== void 0 &&
|
|
524
|
+
t.onActivate !== void 0 && M(n) && (n.preventDefault(), t.onActivate(e));
|
|
509
525
|
},
|
|
510
|
-
className: "x1rh3ycu x1hx0egp
|
|
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",
|
|
511
527
|
children: r
|
|
512
528
|
});
|
|
513
529
|
}
|
|
514
530
|
// packages/collections/src/collection-scroll.tsx
|
|
515
|
-
function
|
|
531
|
+
function N(e) {
|
|
516
532
|
switch (e.status) {
|
|
517
533
|
case "loading": return /* @__PURE__ */ m("span", {
|
|
518
534
|
role: "status",
|
|
519
535
|
children: e.message ?? "Loading…"
|
|
520
536
|
});
|
|
521
|
-
case "complete": return /* @__PURE__ */ m(n, { children: e.message
|
|
537
|
+
case "complete": return e.message === void 0 ? null : /* @__PURE__ */ m(n, { children: e.message });
|
|
522
538
|
case "ready": return /* @__PURE__ */ m(r, {
|
|
523
539
|
onClick: e.onLoadMore,
|
|
524
540
|
children: e.message ?? "Load more"
|
|
@@ -532,9 +548,9 @@ function P(e) {
|
|
|
532
548
|
});
|
|
533
549
|
}
|
|
534
550
|
}
|
|
535
|
-
function
|
|
551
|
+
function P({ children: e, endContent: t, onEndReached: n, fill: r = !1, endPosition: i = "end" }) {
|
|
536
552
|
let a = f(null), o = f(null);
|
|
537
|
-
|
|
553
|
+
T({
|
|
538
554
|
end: o,
|
|
539
555
|
viewport: r ? a : void 0,
|
|
540
556
|
onEndReached: n,
|
|
@@ -544,7 +560,7 @@ function F({ children: e, endContent: t, onEndReached: n, fill: r = !1, endPosit
|
|
|
544
560
|
ref: o,
|
|
545
561
|
...{
|
|
546
562
|
0: {},
|
|
547
|
-
1: { className: "xid9utz x1c8xbx5 x153jb6y xy8obcc x2b8uid" }
|
|
563
|
+
1: { className: "x15x95ik x1az1eml xid9utz x1c8xbx5 x153jb6y xy8obcc x2b8uid" }
|
|
548
564
|
}[t !== void 0 | 0],
|
|
549
565
|
children: t
|
|
550
566
|
});
|
|
@@ -562,7 +578,7 @@ function F({ children: e, endContent: t, onEndReached: n, fill: r = !1, endPosit
|
|
|
562
578
|
});
|
|
563
579
|
}
|
|
564
580
|
// packages/collections/src/inspector.tsx
|
|
565
|
-
function
|
|
581
|
+
function F({ master: e, detail: t, label: n, ...r }) {
|
|
566
582
|
return /* @__PURE__ */ h("div", {
|
|
567
583
|
...c({ className: "xrvj5dj x1mkdm3x xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xb3r6kr" }, r),
|
|
568
584
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -575,7 +591,7 @@ function I({ master: e, detail: t, label: n, ...r }) {
|
|
|
575
591
|
})]
|
|
576
592
|
});
|
|
577
593
|
}
|
|
578
|
-
function
|
|
594
|
+
function I({ items: e, ...t }) {
|
|
579
595
|
return /* @__PURE__ */ m("dl", {
|
|
580
596
|
...c({ className: "x1ghz6dp xrvj5dj x10i657a x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
|
|
581
597
|
children: e.map(({ label: e, value: t }) => /* @__PURE__ */ h("div", {
|
|
@@ -591,7 +607,7 @@ function L({ items: e, ...t }) {
|
|
|
591
607
|
});
|
|
592
608
|
}
|
|
593
609
|
// packages/collections/src/list-footer.tsx
|
|
594
|
-
function
|
|
610
|
+
function L({ children: e, actions: t, ...n }) {
|
|
595
611
|
return /* @__PURE__ */ h("div", {
|
|
596
612
|
...c({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
|
|
597
613
|
children: [/* @__PURE__ */ m("div", { children: e }), t != null && /* @__PURE__ */ m("div", {
|
|
@@ -601,10 +617,31 @@ function R({ children: e, actions: t, ...n }) {
|
|
|
601
617
|
});
|
|
602
618
|
}
|
|
603
619
|
// packages/collections/src/metrics.tsx
|
|
604
|
-
|
|
605
|
-
|
|
620
|
+
var R = {
|
|
621
|
+
grid: {
|
|
622
|
+
k1xSpc: "x78zum5",
|
|
623
|
+
kwnvtZ: "x1a02dak",
|
|
624
|
+
khm7nJ: "xpb3s3w",
|
|
625
|
+
k1C7PZ: "x1i3977y",
|
|
626
|
+
kogj98: "x1ghz6dp",
|
|
627
|
+
$$css: !0
|
|
628
|
+
},
|
|
629
|
+
columns: {
|
|
630
|
+
k1xSpc: "xrvj5dj",
|
|
631
|
+
kumcoG: "xpuu00s",
|
|
632
|
+
kOIVth: "x1j825kq",
|
|
633
|
+
k7Eaqz: "xeuugli",
|
|
634
|
+
kogj98: "x1ghz6dp",
|
|
635
|
+
$$css: !0
|
|
636
|
+
}
|
|
637
|
+
}, z = {
|
|
638
|
+
inline: R.grid,
|
|
639
|
+
columns: R.columns
|
|
640
|
+
};
|
|
641
|
+
function B({ layout: e = "inline", ...t }) {
|
|
642
|
+
return /* @__PURE__ */ m("dl", { ...c(l.props(z[e]), t) });
|
|
606
643
|
}
|
|
607
|
-
function
|
|
644
|
+
function V({ label: e, value: t, ...n }) {
|
|
608
645
|
return /* @__PURE__ */ h("div", {
|
|
609
646
|
...c({ className: "x3nfvp2 x1pha0wt xunmzkg xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
|
|
610
647
|
children: [/* @__PURE__ */ m("dt", {
|
|
@@ -617,10 +654,10 @@ function B({ label: e, value: t, ...n }) {
|
|
|
617
654
|
});
|
|
618
655
|
}
|
|
619
656
|
// packages/collections/src/table.tsx
|
|
620
|
-
var
|
|
657
|
+
var H = {
|
|
621
658
|
kzqmXN: "x5lhr3w",
|
|
622
659
|
$$css: !0
|
|
623
|
-
},
|
|
660
|
+
}, U = {
|
|
624
661
|
secondary: {
|
|
625
662
|
k1xSpc: "x1n9xxwz xazwdyr",
|
|
626
663
|
$$css: !0
|
|
@@ -629,7 +666,7 @@ var V = {
|
|
|
629
666
|
kzqmXN: "x2ipgtl",
|
|
630
667
|
$$css: !0
|
|
631
668
|
},
|
|
632
|
-
column: (e) => [
|
|
669
|
+
column: (e) => [H, { "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(`${e}%`) }],
|
|
633
670
|
th: {
|
|
634
671
|
kVAEAm: "x1n2onr6",
|
|
635
672
|
kZKoxP: "xc9qbxq",
|
|
@@ -659,7 +696,7 @@ var V = {
|
|
|
659
696
|
$$css: !0
|
|
660
697
|
}
|
|
661
698
|
};
|
|
662
|
-
function
|
|
699
|
+
function W({ headers: e, children: t, label: n, ...r }) {
|
|
663
700
|
let i = e.findLastIndex((e) => typeof e == "string" || e.secondary !== !0);
|
|
664
701
|
return /* @__PURE__ */ m("div", {
|
|
665
702
|
role: "region",
|
|
@@ -673,13 +710,13 @@ function U({ headers: e, children: t, label: n, ...r }) {
|
|
|
673
710
|
}[!!e.some((e) => typeof e != "string") | 0], r),
|
|
674
711
|
children: [/* @__PURE__ */ m("thead", { children: /* @__PURE__ */ m("tr", { children: e.map((t, n) => /* @__PURE__ */ m("th", {
|
|
675
712
|
scope: "col",
|
|
676
|
-
...l.props(
|
|
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),
|
|
677
714
|
children: typeof t == "string" ? t : t.label
|
|
678
715
|
}, typeof t == "string" ? t : t.label)) }) }), /* @__PURE__ */ m("tbody", { children: t })]
|
|
679
716
|
})
|
|
680
717
|
});
|
|
681
718
|
}
|
|
682
|
-
function
|
|
719
|
+
function G({ children: e, secondary: t = !1, mobileLabel: n, ...r }) {
|
|
683
720
|
return /* @__PURE__ */ h("td", {
|
|
684
721
|
...c({
|
|
685
722
|
0: { className: "x14o62y9 x9f619 x1t0vds8 x1m92p3w xbixft xxymvpz xuxw1ft xss6m8b xb3r6kr xlyipyv" },
|
|
@@ -692,7 +729,7 @@ function W({ children: e, secondary: t = !1, mobileLabel: n, ...r }) {
|
|
|
692
729
|
});
|
|
693
730
|
}
|
|
694
731
|
// packages/collections/src/timestamp.tsx
|
|
695
|
-
function
|
|
732
|
+
function K({ dateTime: e, label: t, title: n }) {
|
|
696
733
|
return /* @__PURE__ */ m("time", {
|
|
697
734
|
dateTime: e,
|
|
698
735
|
title: n,
|
|
@@ -700,4 +737,48 @@ function G({ dateTime: e, label: t, title: n }) {
|
|
|
700
737
|
children: t
|
|
701
738
|
});
|
|
702
739
|
}
|
|
703
|
-
|
|
740
|
+
// packages/collections/src/timeline.tsx
|
|
741
|
+
function q({ label: e, children: t }) {
|
|
742
|
+
return /* @__PURE__ */ m("ol", {
|
|
743
|
+
"aria-label": e,
|
|
744
|
+
className: "xe8uvvx x1ghz6dp x1717udv xeuugli",
|
|
745
|
+
children: t
|
|
746
|
+
});
|
|
747
|
+
}
|
|
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", {
|
|
752
|
+
"aria-hidden": !0,
|
|
753
|
+
className: "x78zum5 x6s0dn4 x1qx5ct2 x153jb6y",
|
|
754
|
+
children: e
|
|
755
|
+
}), /* @__PURE__ */ h("div", {
|
|
756
|
+
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
|
+
]
|
|
777
|
+
})]
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
var Y = {
|
|
781
|
+
Root: q,
|
|
782
|
+
Item: J
|
|
783
|
+
};
|
|
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 };
|
package/dist/content/code.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as CodeBlock } from "../code-block-
|
|
1
|
+
export { t as CodeBlock } from "../code-block-BRNdtTaP.js";
|
package/dist/content/diff.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as e, h as t } from "../src-
|
|
2
|
-
import { t as n } from "../code-block-
|
|
1
|
+
import { g as e, h as t } from "../src-Bc5sEhdO.js";
|
|
2
|
+
import { t as n } from "../code-block-BRNdtTaP.js";
|
|
3
3
|
import "@stylexjs/stylex";
|
|
4
4
|
import { useEffect as r, useState as i } from "react";
|
|
5
5
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
package/dist/content/link.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as ContentLink } from "../content-link-
|
|
1
|
+
export { t as ContentLink } from "../content-link-Dd8gapwc.js";
|
package/dist/content/markdown.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../code-block-
|
|
2
|
-
import { n as t, t as n } from "../content-link-
|
|
1
|
+
import { t as e } from "../code-block-BRNdtTaP.js";
|
|
2
|
+
import { n as t, t as n } from "../content-link-Dd8gapwc.js";
|
|
3
3
|
import * as r from "@stylexjs/stylex";
|
|
4
4
|
import { Children as i, createElement as a } from "react";
|
|
5
5
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|