@mechane-ai/elements 0.7.1 → 0.9.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 +73 -36
- package/dist/ai.js +231 -170
- package/dist/assets/stylex.css +464 -166
- package/dist/{categorical-values-75J0TUkR.js → categorical-values-DYRiw5Qd.js} +2 -2
- package/dist/{chart-frame--DOsZKwP.js → chart-frame-RL1hCWBC.js} +2 -1
- package/dist/{chart-input-C-g586YE.js → chart-input-Bm3ot1yD.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-B30xQKqg.js} +1 -1
- package/dist/collections.js +369 -244
- 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 +4 -4
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-HLYu0cmz.js → content-link-BrPrpBof.js} +1 -1
- package/dist/content.js +35 -35
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +7 -7
- package/dist/forms.js +1 -1
- package/dist/index.js +1 -1
- package/dist/layout.js +144 -91
- package/dist/navigation/commands.js +1 -1
- package/dist/packages/ai/src/conversation.d.ts +2 -1
- package/dist/packages/ai/src/index.d.ts +4 -0
- package/dist/packages/ai/src/message-action.d.ts +10 -0
- package/dist/packages/ai/src/message-boundary.d.ts +6 -0
- package/dist/packages/ai/src/message.d.ts +2 -1
- package/dist/packages/charts/src/chart-theme.d.ts +1 -0
- package/dist/packages/collections/src/data-table.d.ts +9 -1
- package/dist/packages/collections/src/index.d.ts +4 -2
- package/dist/packages/collections/src/metrics.d.ts +5 -2
- package/dist/packages/collections/src/timeline.d.ts +26 -0
- package/dist/packages/core/src/actions.d.ts +7 -0
- package/dist/packages/core/src/agent-avatar-glyphs.d.ts +5 -0
- package/dist/packages/core/src/agent-avatar.d.ts +17 -0
- package/dist/packages/core/src/copy-value.d.ts +2 -1
- package/dist/packages/core/src/index.d.ts +5 -1
- package/dist/packages/forms/src/agent-avatar-picker.d.ts +8 -0
- package/dist/packages/forms/src/field-styles.d.ts +19 -0
- package/dist/packages/forms/src/forms.d.ts +2 -1
- package/dist/packages/forms/src/index.d.ts +2 -0
- package/dist/packages/foundations/src/tokens.stylex.d.ts +52 -0
- package/dist/packages/layout/src/app-shell.d.ts +2 -1
- package/dist/packages/layout/src/index.d.ts +2 -1
- package/dist/packages/layout/src/page-toolbar.d.ts +3 -1
- package/dist/packages/layout/src/sidebar.d.ts +4 -0
- package/dist/packages/layout/src/view-stack.d.ts +13 -0
- package/dist/packages/layout/src/workbench.d.ts +5 -2
- package/dist/{pierre-tree-DVybsnm4.js → pierre-tree-CRk09rx7.js} +2 -2
- package/dist/{src-DjTM64tN.js → src-Cc0Sadzr.js} +378 -295
- package/dist/{src-B_DCatpY.js → src-DuuAmS-c.js} +1 -1
- package/dist/src-elMBQ2Dh.js +1087 -0
- package/dist/theme.js +1 -1
- package/dist/tokens.js +61 -10
- package/package.json +1 -1
- package/packages/foundations/src/tokens.stylex.ts +54 -0
- package/dist/src-BkCsvZGi.js +0 -675
package/dist/layout.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e } from "./src-CfDf8TY8.js";
|
|
2
|
-
import {
|
|
2
|
+
import { C as t, S as n, i as r, n as i } from "./src-elMBQ2Dh.js";
|
|
3
3
|
import { mergeProps as a } from "@base-ui/react/merge-props";
|
|
4
4
|
import "@stylexjs/stylex";
|
|
5
5
|
import { createContext as o, useContext as s, useEffect as c, useId as l, useRef as u, useState as d } from "react";
|
|
@@ -64,7 +64,7 @@ function w({ header: e, footer: t, close: n, children: r }) {
|
|
|
64
64
|
role: "region",
|
|
65
65
|
"aria-label": "Navigation links",
|
|
66
66
|
tabIndex: 0,
|
|
67
|
-
className: "x98rzlu x2lwn1j x1odjw0f xish69e x7d1sxj x13qnu6 x9v5kkp x19rmrnh x1bqaal",
|
|
67
|
+
className: "x98rzlu x2lwn1j x1odjw0f xish69e x1t137rt x7d1sxj x13qnu6 x9v5kkp x19rmrnh x1bqaal",
|
|
68
68
|
children: r
|
|
69
69
|
}),
|
|
70
70
|
t != null && /* @__PURE__ */ p("div", {
|
|
@@ -75,7 +75,7 @@ function w({ header: e, footer: t, close: n, children: r }) {
|
|
|
75
75
|
}
|
|
76
76
|
function T() {
|
|
77
77
|
return /* @__PURE__ */ p(e.Close, {
|
|
78
|
-
render: /* @__PURE__ */ p(
|
|
78
|
+
render: /* @__PURE__ */ p(t, {
|
|
79
79
|
variant: "ghost",
|
|
80
80
|
"aria-label": "Close navigation",
|
|
81
81
|
xstyle: C.close
|
|
@@ -91,23 +91,38 @@ function E({ children: e, label: t = "Main" }) {
|
|
|
91
91
|
return /* @__PURE__ */ p("nav", {
|
|
92
92
|
"aria-label": t,
|
|
93
93
|
...{
|
|
94
|
-
0: { className: "x78zum5 xdt5ytf
|
|
95
|
-
1: { className: "x78zum5 xdt5ytf
|
|
94
|
+
0: { className: "x78zum5 xdt5ytf xksvo5r" },
|
|
95
|
+
1: { className: "x78zum5 xdt5ytf xksvo5r x1dbbav" }
|
|
96
96
|
}[!!r | 0],
|
|
97
97
|
children: e
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
function D({ children: e,
|
|
100
|
+
function D({ children: e, label: t }) {
|
|
101
|
+
let n = s(S), r = n !== null && !n.isExpanded, i = l();
|
|
102
|
+
return /* @__PURE__ */ m("section", {
|
|
103
|
+
"aria-labelledby": i,
|
|
104
|
+
className: "xn9t2bk",
|
|
105
|
+
children: [/* @__PURE__ */ p("div", {
|
|
106
|
+
id: i,
|
|
107
|
+
...{
|
|
108
|
+
0: { className: "xn9t2bk xksvo5r x153jb6y xy8obcc xas2l8k xk50ysn" },
|
|
109
|
+
1: { className: "xn9t2bk xksvo5r x153jb6y xy8obcc xas2l8k xk50ysn x1s85apg xeod2sa" }
|
|
110
|
+
}[!!r | 0],
|
|
111
|
+
children: t
|
|
112
|
+
}), e]
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function O({ children: e, icon: t, selected: r = !1, onClick: i, ...a }) {
|
|
101
116
|
let o = s(S), c = l(), u = o !== null && !o.isExpanded;
|
|
102
117
|
return /* @__PURE__ */ p("div", {
|
|
103
118
|
...{
|
|
104
119
|
0: { className: "x78zum5 xeuugli x1ok0vyi" },
|
|
105
120
|
1: { className: "x78zum5 xeuugli x1ok0vyi x1r7kqkb" }
|
|
106
|
-
}[!!
|
|
107
|
-
children: /* @__PURE__ */ m(
|
|
121
|
+
}[!!r | 0],
|
|
122
|
+
children: /* @__PURE__ */ m(n, {
|
|
108
123
|
...a,
|
|
109
124
|
variant: "ghost",
|
|
110
|
-
"aria-current":
|
|
125
|
+
"aria-current": r ? "page" : void 0,
|
|
111
126
|
"aria-labelledby": a["aria-labelledby"] ?? c,
|
|
112
127
|
title: a.title ?? (typeof e == "string" ? e : void 0),
|
|
113
128
|
onClick: (e) => {
|
|
@@ -129,7 +144,7 @@ function D({ children: e, icon: t, selected: n = !1, onClick: i, ...a }) {
|
|
|
129
144
|
})
|
|
130
145
|
});
|
|
131
146
|
}
|
|
132
|
-
function
|
|
147
|
+
function k({ children: e, icon: t, selected: n = !1, onClick: r, className: i, style: a, ...o }) {
|
|
133
148
|
let c = s(S), u = l(), d = c !== null && !c.isExpanded, f = {
|
|
134
149
|
0: { className: "x9f619 x78zum5 x6s0dn4 x1ok0vyi xbixft xjbqb8w x1hz01jw xtqrqnz x1778rvt xo1l8bm xvmahel xdpxx8g xkrqix3 xzro8vx x13qnu6 x9v5kkp x19rmrnh x1bqaal x1nhvcw1 x1hnptsi x15rya3k x17kqdoe x1avwmir xh8yej3 xeuugli xt970qd xksvo5r" },
|
|
135
150
|
2: { className: "x9f619 x78zum5 x6s0dn4 x1ok0vyi xbixft xjbqb8w x1hz01jw xtqrqnz x1778rvt xo1l8bm xvmahel xdpxx8g xkrqix3 xzro8vx x13qnu6 x9v5kkp x19rmrnh x1bqaal x1hnptsi x15rya3k x17kqdoe x1avwmir xh8yej3 xeuugli xt970qd xksvo5r xl56j7k x1l31gyv" },
|
|
@@ -165,7 +180,7 @@ function O({ children: e, icon: t, selected: n = !1, onClick: r, className: i, s
|
|
|
165
180
|
})]
|
|
166
181
|
});
|
|
167
182
|
}
|
|
168
|
-
function
|
|
183
|
+
function A({ children: e, grow: t = !1 }) {
|
|
169
184
|
let n = s(S), r = n !== null && !n.isExpanded;
|
|
170
185
|
return /* @__PURE__ */ p("span", {
|
|
171
186
|
...{
|
|
@@ -177,7 +192,7 @@ function k({ children: e, grow: t = !1 }) {
|
|
|
177
192
|
children: e
|
|
178
193
|
});
|
|
179
194
|
}
|
|
180
|
-
function
|
|
195
|
+
function j({ children: e }) {
|
|
181
196
|
let t = s(S), n = t !== null && !t.isExpanded;
|
|
182
197
|
return /* @__PURE__ */ p("div", {
|
|
183
198
|
...{
|
|
@@ -187,17 +202,17 @@ function A({ children: e }) {
|
|
|
187
202
|
children: e
|
|
188
203
|
});
|
|
189
204
|
}
|
|
190
|
-
function
|
|
191
|
-
let
|
|
192
|
-
return
|
|
205
|
+
function M() {
|
|
206
|
+
let n = s(S);
|
|
207
|
+
return n === null ? null : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
|
|
193
208
|
className: "x9f619 x2lah0s xrlepb6 xs1s249 x32b0ac xelkwwr x78zum5 x1ykma7f",
|
|
194
|
-
children: /* @__PURE__ */ p(
|
|
195
|
-
ref:
|
|
209
|
+
children: /* @__PURE__ */ p(t, {
|
|
210
|
+
ref: n.navigationToggleRef,
|
|
196
211
|
variant: "ghost",
|
|
197
|
-
"aria-label":
|
|
198
|
-
"aria-controls":
|
|
199
|
-
"aria-expanded":
|
|
200
|
-
onClick:
|
|
212
|
+
"aria-label": n.isExpanded ? "Collapse navigation" : "Expand navigation",
|
|
213
|
+
"aria-controls": n.sidebarId,
|
|
214
|
+
"aria-expanded": n.isExpanded,
|
|
215
|
+
onClick: n.onToggle,
|
|
201
216
|
xstyle: C.toggle,
|
|
202
217
|
children: /* @__PURE__ */ p(g, {
|
|
203
218
|
size: 16,
|
|
@@ -207,9 +222,9 @@ function j() {
|
|
|
207
222
|
}), /* @__PURE__ */ p("div", {
|
|
208
223
|
className: "x9f619 x2lah0s xrlepb6 xs1s249 x32b0ac xelkwwr x1s85apg x1rhi5y4",
|
|
209
224
|
children: /* @__PURE__ */ p(e.Trigger, {
|
|
210
|
-
ref:
|
|
211
|
-
handle:
|
|
212
|
-
render: /* @__PURE__ */ p(
|
|
225
|
+
ref: n.mobileNavigationToggleRef,
|
|
226
|
+
handle: n.drawerHandle,
|
|
227
|
+
render: /* @__PURE__ */ p(t, {
|
|
213
228
|
variant: "ghost",
|
|
214
229
|
"aria-label": "Open navigation",
|
|
215
230
|
xstyle: C.toggle
|
|
@@ -222,38 +237,41 @@ function j() {
|
|
|
222
237
|
})] });
|
|
223
238
|
}
|
|
224
239
|
// packages/layout/src/app-shell.tsx
|
|
225
|
-
var
|
|
240
|
+
var N = { drawer: {
|
|
226
241
|
kzqmXN: "x68ju84",
|
|
227
242
|
ks0D6T: "x1recik0",
|
|
228
243
|
$$css: !0
|
|
229
244
|
} };
|
|
230
|
-
function
|
|
231
|
-
let [
|
|
245
|
+
function P({ sidebarHeader: t, sidebar: n, footer: r, children: i, mainId: a = "main", focus: o = !1 }) {
|
|
246
|
+
let [s, f] = d(!0), [h, g] = d(!1), [_] = d(() => e.createHandle()), v = l(), y = u(null), b = u(null);
|
|
232
247
|
return c(() => {
|
|
233
248
|
let e = globalThis.matchMedia(x.sidebarDesktopQuery);
|
|
234
249
|
function t() {
|
|
235
|
-
e.matches &&
|
|
250
|
+
e.matches && g(!1);
|
|
236
251
|
}
|
|
237
252
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
238
253
|
}, []), /* @__PURE__ */ m(S.Provider, {
|
|
239
254
|
value: {
|
|
240
|
-
isExpanded:
|
|
241
|
-
sidebarId:
|
|
242
|
-
drawerHandle:
|
|
243
|
-
navigationToggleRef:
|
|
244
|
-
mobileNavigationToggleRef:
|
|
245
|
-
onToggle: () =>
|
|
246
|
-
onNavigate: () =>
|
|
255
|
+
isExpanded: s,
|
|
256
|
+
sidebarId: v,
|
|
257
|
+
drawerHandle: _,
|
|
258
|
+
navigationToggleRef: y,
|
|
259
|
+
mobileNavigationToggleRef: b,
|
|
260
|
+
onToggle: () => f((e) => !e),
|
|
261
|
+
onNavigate: () => g(!1)
|
|
247
262
|
},
|
|
248
263
|
children: [/* @__PURE__ */ m("div", {
|
|
249
264
|
className: "x9f619 x1ov3xa9 x78zum5 xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xvmahel",
|
|
250
265
|
children: [/* @__PURE__ */ p("aside", {
|
|
251
|
-
id:
|
|
266
|
+
id: v,
|
|
252
267
|
"aria-label": "Navigation",
|
|
268
|
+
hidden: o,
|
|
253
269
|
...{
|
|
254
270
|
0: { className: "x9f619 x78zum5 x1ykma7f xdt5ytf xs1s249 x32b0ac xelkwwr xpvm0e4 x7wzq59 x13vifvy xtdtrs8 x68ju84 x2lah0s x2lwn1j xeuugli" },
|
|
255
|
-
|
|
256
|
-
|
|
271
|
+
2: { className: "x9f619 x78zum5 x1ykma7f xdt5ytf xs1s249 x32b0ac xelkwwr xpvm0e4 x7wzq59 x13vifvy xtdtrs8 x2lah0s x2lwn1j xeuugli xrlepb6" },
|
|
272
|
+
1: { className: "x9f619 xdt5ytf xs1s249 x32b0ac xelkwwr xpvm0e4 x7wzq59 x13vifvy xtdtrs8 x68ju84 x2lah0s x2lwn1j xeuugli x1s85apg" },
|
|
273
|
+
3: { className: "x9f619 xdt5ytf xs1s249 x32b0ac xelkwwr xpvm0e4 x7wzq59 x13vifvy xtdtrs8 x2lah0s x2lwn1j xeuugli xrlepb6 x1s85apg" }
|
|
274
|
+
}[!s << 1 | !!o],
|
|
257
275
|
children: /* @__PURE__ */ p(w, {
|
|
258
276
|
header: t,
|
|
259
277
|
footer: r,
|
|
@@ -266,12 +284,12 @@ function N({ sidebarHeader: t, sidebar: n, footer: r, children: i, mainId: a = "
|
|
|
266
284
|
children: i
|
|
267
285
|
})]
|
|
268
286
|
}), /* @__PURE__ */ p(e.Root, {
|
|
269
|
-
handle:
|
|
270
|
-
open:
|
|
271
|
-
onOpenChange:
|
|
287
|
+
handle: _,
|
|
288
|
+
open: h && !o,
|
|
289
|
+
onOpenChange: g,
|
|
272
290
|
children: /* @__PURE__ */ m(e.Portal, { children: [/* @__PURE__ */ p(e.Backdrop, {}), /* @__PURE__ */ p(e.Viewport, { children: /* @__PURE__ */ m(e.Popup, {
|
|
273
|
-
xstyle:
|
|
274
|
-
finalFocus: () => globalThis.matchMedia(x.sidebarDesktopQuery).matches ?
|
|
291
|
+
xstyle: N.drawer,
|
|
292
|
+
finalFocus: () => globalThis.matchMedia(x.sidebarDesktopQuery).matches ? y.current : b.current,
|
|
275
293
|
children: [/* @__PURE__ */ p(e.Title, {
|
|
276
294
|
visuallyHidden: !0,
|
|
277
295
|
children: "Navigation"
|
|
@@ -286,14 +304,14 @@ function N({ sidebarHeader: t, sidebar: n, footer: r, children: i, mainId: a = "
|
|
|
286
304
|
});
|
|
287
305
|
}
|
|
288
306
|
// packages/layout/src/detail-page.tsx
|
|
289
|
-
function
|
|
307
|
+
function F({ children: e }) {
|
|
290
308
|
return /* @__PURE__ */ p("div", {
|
|
291
309
|
className: "x9f619 x13na7z x96idz6 x9g60mw xeuugli xvueqy4 xnjsko4 x10gdey3 x14y0u4g x1foqgtu x1uwsqpk x14oio8y",
|
|
292
310
|
children: e
|
|
293
311
|
});
|
|
294
312
|
}
|
|
295
313
|
// packages/layout/src/focus-page.tsx
|
|
296
|
-
function
|
|
314
|
+
function I({ children: e }) {
|
|
297
315
|
return /* @__PURE__ */ p("main", {
|
|
298
316
|
id: "main",
|
|
299
317
|
tabIndex: -1,
|
|
@@ -305,18 +323,18 @@ function F({ children: e }) {
|
|
|
305
323
|
});
|
|
306
324
|
}
|
|
307
325
|
// packages/layout/src/workbench.tsx
|
|
308
|
-
function
|
|
326
|
+
function L({ header: e, children: t, inspector: n }) {
|
|
309
327
|
return /* @__PURE__ */ m("div", {
|
|
310
328
|
className: "x78zum5 xdt5ytf x1b7uu3i xeuugli x2lwn1j",
|
|
311
|
-
children: [/* @__PURE__ */ p("div", {
|
|
329
|
+
children: [e != null && /* @__PURE__ */ p("div", {
|
|
312
330
|
className: "x1ydxw8w xnx3t7k xso031l x1q0q8m5 x1qndepd",
|
|
313
331
|
children: e
|
|
314
332
|
}), /* @__PURE__ */ m("div", {
|
|
315
333
|
className: "x78zum5 x98rzlu xeuugli x2lwn1j x7giv3",
|
|
316
334
|
children: [/* @__PURE__ */ p("div", {
|
|
317
335
|
...{
|
|
318
|
-
0: { className: "x78zum5 x98rzlu xdt5ytf xeuugli x2lwn1j" },
|
|
319
|
-
1: { className: "x98rzlu xdt5ytf xeuugli x2lwn1j x78zum5 x1g9v1si" }
|
|
336
|
+
0: { className: "x1n2onr6 x78zum5 x98rzlu xdt5ytf xeuugli x2lwn1j" },
|
|
337
|
+
1: { className: "x1n2onr6 x98rzlu xdt5ytf xeuugli x2lwn1j x78zum5 x1g9v1si" }
|
|
320
338
|
}[n != null | 0],
|
|
321
339
|
children: t
|
|
322
340
|
}), n != null && /* @__PURE__ */ p("aside", {
|
|
@@ -327,37 +345,71 @@ function I({ header: e, children: t, inspector: n }) {
|
|
|
327
345
|
})]
|
|
328
346
|
});
|
|
329
347
|
}
|
|
330
|
-
function
|
|
348
|
+
function R({ label: e, children: t, flush: n = !1, scrollRestorationId: r }) {
|
|
331
349
|
return /* @__PURE__ */ p("div", {
|
|
332
|
-
|
|
333
|
-
|
|
350
|
+
role: "region",
|
|
351
|
+
"aria-label": e,
|
|
352
|
+
tabIndex: 0,
|
|
353
|
+
"data-scroll-restoration-id": r,
|
|
354
|
+
...{
|
|
355
|
+
0: { className: "x1odjw0f x98rzlu xeuugli x2lwn1j x1jvlu93" },
|
|
356
|
+
1: { className: "x1odjw0f x98rzlu xeuugli x2lwn1j x1717udv" }
|
|
357
|
+
}[!!n | 0],
|
|
358
|
+
children: t
|
|
334
359
|
});
|
|
335
360
|
}
|
|
336
|
-
function
|
|
361
|
+
function z({ children: e }) {
|
|
337
362
|
return /* @__PURE__ */ p("div", {
|
|
338
363
|
className: "x2lah0s x1c8xbx5 x178xt8z x13fuv20 xhjagg4 xpvm0e4",
|
|
339
364
|
children: e
|
|
340
365
|
});
|
|
341
366
|
}
|
|
342
|
-
// packages/layout/src/
|
|
343
|
-
|
|
367
|
+
// packages/layout/src/view-stack.tsx
|
|
368
|
+
function B({ children: e }) {
|
|
369
|
+
return /* @__PURE__ */ p("div", {
|
|
370
|
+
className: "x1n2onr6 x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j",
|
|
371
|
+
children: e
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
function V({ active: e, children: t }) {
|
|
375
|
+
return /* @__PURE__ */ p("section", {
|
|
376
|
+
"aria-hidden": !e,
|
|
377
|
+
inert: !e,
|
|
378
|
+
...{
|
|
379
|
+
0: { className: "x1n2onr6 x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j" },
|
|
380
|
+
1: { className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j x10l6tqk x10a8y8t xlshs6z x47corl" }
|
|
381
|
+
}[!e | 0],
|
|
382
|
+
children: t
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
var H = {
|
|
386
|
+
Root: B,
|
|
387
|
+
Panel: V
|
|
388
|
+
}, U = { action: {
|
|
344
389
|
kOIVth: "x1hnptsi",
|
|
345
390
|
$$css: !0
|
|
346
391
|
} };
|
|
347
|
-
function
|
|
392
|
+
function W({ title: e, actions: t, breadcrumb: n = !1, navigation: r = !0, views: i, leading: a }) {
|
|
348
393
|
return /* @__PURE__ */ m("div", {
|
|
349
394
|
className: "x9f619 x78zum5 x12h1iku x14ut1dr x1qjc9v5 xcn9na3 x2lah0s xso031l x1q0q8m5 x1qndepd xpvm0e4 xbixft x1hz01jw x12myhf4 x1778rvt xvmahel xeuugli",
|
|
350
395
|
children: [
|
|
351
|
-
r && /* @__PURE__ */ p(
|
|
396
|
+
a === void 0 ? r && /* @__PURE__ */ p(M, {}) : /* @__PURE__ */ p("div", {
|
|
397
|
+
className: "x78zum5 x6s0dn4 xyibt8p x2lah0s",
|
|
398
|
+
children: a
|
|
399
|
+
}),
|
|
352
400
|
/* @__PURE__ */ p(n ? "nav" : "h1", {
|
|
353
401
|
tabIndex: n ? void 0 : -1,
|
|
354
402
|
"aria-label": n ? "Breadcrumb" : void 0,
|
|
355
|
-
className: "x78zum5 x6s0dn4 x1hnptsi x1m92p3w xeuugli xs83m0k x1ghz6dp x1qlqyl8 xo1l8bm",
|
|
403
|
+
className: "x78zum5 x6s0dn4 x1hnptsi x1m92p3w xeuugli xs83m0k x1ghz6dp x1qlqyl8 xo1l8bm x1t137rt",
|
|
356
404
|
children: /* @__PURE__ */ p("span", {
|
|
357
405
|
className: "xeuugli xb3r6kr xlyipyv xuxw1ft",
|
|
358
406
|
children: e
|
|
359
407
|
})
|
|
360
408
|
}),
|
|
409
|
+
i != null && /* @__PURE__ */ p("div", {
|
|
410
|
+
className: "x78zum5 x6s0dn4 xeuugli x2lah0s",
|
|
411
|
+
children: i
|
|
412
|
+
}),
|
|
361
413
|
t != null && /* @__PURE__ */ p("div", {
|
|
362
414
|
className: "x78zum5 x6s0dn4 xunmzkg x5g2kb4 xeuugli x2lah0s x8x9d4c",
|
|
363
415
|
children: t
|
|
@@ -365,16 +417,16 @@ function B({ title: e, actions: t, breadcrumb: n = !1, navigation: r = !0 }) {
|
|
|
365
417
|
]
|
|
366
418
|
});
|
|
367
419
|
}
|
|
368
|
-
function
|
|
420
|
+
function G({ icon: e, children: t, ...r }) {
|
|
369
421
|
let i = e != null;
|
|
370
422
|
return /* @__PURE__ */ p("div", {
|
|
371
423
|
className: "x9f619 x78zum5 x1qjc9v5 xeuugli",
|
|
372
|
-
children: /* @__PURE__ */ m(
|
|
373
|
-
...
|
|
424
|
+
children: /* @__PURE__ */ m(n, {
|
|
425
|
+
...r,
|
|
374
426
|
variant: "ghost",
|
|
375
427
|
size: "sm",
|
|
376
|
-
"aria-label":
|
|
377
|
-
xstyle:
|
|
428
|
+
"aria-label": r["aria-label"] ?? (typeof t == "string" ? t : void 0),
|
|
429
|
+
xstyle: U.action,
|
|
378
430
|
children: [e, i ? /* @__PURE__ */ p("span", {
|
|
379
431
|
className: "xeuugli xb3r6kr xlyipyv xuxw1ft xt0psk2 xlllsrz",
|
|
380
432
|
children: t
|
|
@@ -383,14 +435,14 @@ function V({ icon: e, children: t, ...n }) {
|
|
|
383
435
|
});
|
|
384
436
|
}
|
|
385
437
|
// packages/layout/src/record-page.tsx
|
|
386
|
-
function
|
|
438
|
+
function K({ children: e }) {
|
|
387
439
|
return /* @__PURE__ */ p("div", {
|
|
388
440
|
className: "x78zum5 xdt5ytf xeuugli xbixft x1hz01jw xtqrqnz x1778rvt xvmahel",
|
|
389
441
|
children: e
|
|
390
442
|
});
|
|
391
443
|
}
|
|
392
|
-
function
|
|
393
|
-
return /* @__PURE__ */ p(
|
|
444
|
+
function q({ backLabel: e, backHref: t, onBack: n, actions: r, navigation: i = !0 }) {
|
|
445
|
+
return /* @__PURE__ */ p(W, {
|
|
394
446
|
breadcrumb: !0,
|
|
395
447
|
navigation: i,
|
|
396
448
|
actions: r,
|
|
@@ -409,52 +461,53 @@ function U({ backLabel: e, backHref: t, onBack: n, actions: r, navigation: i = !
|
|
|
409
461
|
})
|
|
410
462
|
});
|
|
411
463
|
}
|
|
412
|
-
function
|
|
413
|
-
return /* @__PURE__ */ p(
|
|
464
|
+
function J({ children: e }) {
|
|
465
|
+
return /* @__PURE__ */ p(F, { children: /* @__PURE__ */ p("div", {
|
|
414
466
|
className: "x78zum5 x1a02dak x1cy8zhl x1m6b44x xeuugli",
|
|
415
467
|
children: e
|
|
416
468
|
}) });
|
|
417
469
|
}
|
|
418
|
-
function
|
|
470
|
+
function Y({ children: e }) {
|
|
419
471
|
return /* @__PURE__ */ p("div", {
|
|
420
|
-
className: "x78zum5 xdt5ytf x1ewej1i x1iyjqo2
|
|
472
|
+
className: "x78zum5 xdt5ytf x1ewej1i x1iyjqo2 x1m6b44x xeuugli",
|
|
421
473
|
children: e
|
|
422
474
|
});
|
|
423
475
|
}
|
|
424
|
-
function
|
|
476
|
+
function X({ title: e, description: t, icon: n, titleRef: a }) {
|
|
425
477
|
return /* @__PURE__ */ m("header", {
|
|
426
478
|
className: "xrvj5dj x1n8ia3y xeuugli",
|
|
427
479
|
children: [/* @__PURE__ */ m("div", {
|
|
428
480
|
className: "x78zum5 x6s0dn4 x1n8ia3y xeuugli",
|
|
429
|
-
children: [
|
|
481
|
+
children: [n != null && /* @__PURE__ */ p("span", {
|
|
430
482
|
"aria-hidden": !0,
|
|
431
483
|
className: "x3nfvp2 x6s0dn4 x2lah0s",
|
|
432
|
-
children:
|
|
433
|
-
}), /* @__PURE__ */ p(
|
|
484
|
+
children: n
|
|
485
|
+
}), /* @__PURE__ */ p(i, {
|
|
434
486
|
ref: a,
|
|
435
487
|
tabIndex: -1,
|
|
488
|
+
className: "xeuugli x1t137rt",
|
|
436
489
|
children: e
|
|
437
490
|
})]
|
|
438
|
-
}),
|
|
491
|
+
}), t != null && /* @__PURE__ */ p(r, { children: t })]
|
|
439
492
|
});
|
|
440
493
|
}
|
|
441
|
-
function
|
|
494
|
+
function Z({ children: e, label: t = "Properties" }) {
|
|
442
495
|
return /* @__PURE__ */ p("aside", {
|
|
443
496
|
"aria-label": t,
|
|
444
497
|
className: "x78zum5 xdt5ytf x1irul0l x1iyjqo2 x1j825kq xeuugli",
|
|
445
498
|
children: e
|
|
446
499
|
});
|
|
447
500
|
}
|
|
448
|
-
var
|
|
449
|
-
Root:
|
|
450
|
-
Toolbar:
|
|
451
|
-
Body:
|
|
452
|
-
Content:
|
|
453
|
-
Header:
|
|
454
|
-
Aside:
|
|
501
|
+
var Q = {
|
|
502
|
+
Root: K,
|
|
503
|
+
Toolbar: q,
|
|
504
|
+
Body: J,
|
|
505
|
+
Content: Y,
|
|
506
|
+
Header: X,
|
|
507
|
+
Aside: Z
|
|
455
508
|
};
|
|
456
509
|
// packages/layout/src/resizable.tsx
|
|
457
|
-
function
|
|
510
|
+
function $({ orientation: e = "horizontal", initialSizes: t, onSizesChange: n, disabled: r, ref: i, ...o }) {
|
|
458
511
|
return /* @__PURE__ */ p(v, {
|
|
459
512
|
orientation: e,
|
|
460
513
|
defaultLayout: t,
|
|
@@ -470,7 +523,7 @@ function Y({ orientation: e = "horizontal", initialSizes: t, onSizesChange: n, d
|
|
|
470
523
|
...a({ className: "xeuugli x2lwn1j xh8yej3 x5yr21d" }, o)
|
|
471
524
|
});
|
|
472
525
|
}
|
|
473
|
-
function
|
|
526
|
+
function ee({ id: e, initialSizePercent: t, minimumSizePercent: n = 10, maximumSizePercent: r = 100, collapsible: i = !1, ref: o, ...s }) {
|
|
474
527
|
return /* @__PURE__ */ p(y, {
|
|
475
528
|
id: e,
|
|
476
529
|
defaultSize: t === void 0 ? void 0 : `${t}%`,
|
|
@@ -481,15 +534,15 @@ function X({ id: e, initialSizePercent: t, minimumSizePercent: n = 10, maximumSi
|
|
|
481
534
|
...a({ className: "xeuugli x2lwn1j xysyzu8" }, s)
|
|
482
535
|
});
|
|
483
536
|
}
|
|
484
|
-
function
|
|
537
|
+
function te({ ref: e, ...t }) {
|
|
485
538
|
return /* @__PURE__ */ p(b, {
|
|
486
539
|
elementRef: e,
|
|
487
540
|
...a({ className: "x1fa40ue x1i1rx1s xgc0pbm xir5lan xfaai28 x1rbdpqn x8wp5i9 x13qnu6 x9v5kkp x19rmrnh x13iak60" }, t)
|
|
488
541
|
});
|
|
489
542
|
}
|
|
490
|
-
var
|
|
491
|
-
Root:
|
|
492
|
-
Pane:
|
|
493
|
-
Handle:
|
|
543
|
+
var ne = {
|
|
544
|
+
Root: $,
|
|
545
|
+
Pane: ee,
|
|
546
|
+
Handle: te
|
|
494
547
|
};
|
|
495
|
-
export {
|
|
548
|
+
export { P as AppShell, F as DetailPage, I as FocusPage, E as Navigation, O as NavigationItem, k as NavigationLink, D as NavigationSection, W as PageToolbar, Q as RecordPage, ne as Resizable, j as SidebarFooter, A as SidebarLabel, G as ToolbarAction, H as ViewStack, L as Workbench, z as WorkbenchFooter, R as WorkbenchScroll };
|
|
@@ -7,6 +7,7 @@ export type ConversationRootProps = {
|
|
|
7
7
|
export type ConversationViewportProps = {
|
|
8
8
|
readonly label: string;
|
|
9
9
|
readonly children: ReactNode;
|
|
10
|
+
readonly scrollRestorationId?: string;
|
|
10
11
|
};
|
|
11
12
|
export type ConversationContentProps = {
|
|
12
13
|
readonly children: ReactNode;
|
|
@@ -20,7 +21,7 @@ export type ConversationJumpProps = {
|
|
|
20
21
|
readonly label?: string;
|
|
21
22
|
};
|
|
22
23
|
declare function ConversationRoot({ children, initialPosition, follow }: ConversationRootProps): ReactNode;
|
|
23
|
-
declare function ConversationViewport({ label, children }: ConversationViewportProps): ReactNode;
|
|
24
|
+
declare function ConversationViewport({ label, children, scrollRestorationId }: ConversationViewportProps): ReactNode;
|
|
24
25
|
declare function ConversationContent({ children, streaming }: ConversationContentProps): ReactNode;
|
|
25
26
|
declare function ConversationItem({ messageId, children }: ConversationItemProps): ReactNode;
|
|
26
27
|
declare function ConversationJumpToLatest({ label }: ConversationJumpProps): ReactNode;
|
|
@@ -4,6 +4,10 @@ export type { ConversationRootProps, ConversationViewportProps, ConversationCont
|
|
|
4
4
|
export { Conversation } from './conversation.tsx';
|
|
5
5
|
export type { MessageKind, MessageProps, MessageAttachmentProps } from './message.tsx';
|
|
6
6
|
export { Message, MessageAttachment } from './message.tsx';
|
|
7
|
+
export type { MessageActionProps } from './message-action.tsx';
|
|
8
|
+
export { MessageAction } from './message-action.tsx';
|
|
9
|
+
export type { MessageBoundaryProps } from './message-boundary.tsx';
|
|
10
|
+
export { MessageBoundary } from './message-boundary.tsx';
|
|
7
11
|
export type { PromptInputProps } from './prompt-input.tsx';
|
|
8
12
|
export { PromptInput } from './prompt-input.tsx';
|
|
9
13
|
export type { Source, SourcesProps, InlineCitationProps } from './sources.tsx';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { IconButton, IconLink } from '../../core/src/index.ts';
|
|
3
|
+
export type MessageActionProps = {
|
|
4
|
+
readonly label: string;
|
|
5
|
+
} & ((Omit<ComponentProps<typeof IconButton>, 'aria-label' | 'variant' | 'nativeButton'> & {
|
|
6
|
+
readonly kind?: 'button';
|
|
7
|
+
}) | (Omit<ComponentProps<typeof IconLink>, 'aria-label'> & {
|
|
8
|
+
readonly kind: 'link';
|
|
9
|
+
}));
|
|
10
|
+
export declare function MessageAction(props: MessageActionProps): ReactNode;
|
|
@@ -6,6 +6,7 @@ export type MessageProps = {
|
|
|
6
6
|
readonly id?: string;
|
|
7
7
|
readonly kind?: MessageKind;
|
|
8
8
|
readonly meta?: ReactNode;
|
|
9
|
+
readonly avatar?: ReactNode;
|
|
9
10
|
readonly actions?: ReactNode;
|
|
10
11
|
readonly attachments?: ReactNode;
|
|
11
12
|
};
|
|
@@ -15,5 +16,5 @@ export type MessageAttachmentProps = {
|
|
|
15
16
|
readonly href?: string;
|
|
16
17
|
readonly actions?: ReactNode;
|
|
17
18
|
};
|
|
18
|
-
export declare function Message({ author, children, id, kind, meta, actions, attachments, }: MessageProps): ReactNode;
|
|
19
|
+
export declare function Message({ author, children, id, kind, meta, avatar, actions, attachments, }: MessageProps): ReactNode;
|
|
19
20
|
export declare function MessageAttachment({ name, description, href, actions }: MessageAttachmentProps): ReactNode;
|
|
@@ -38,6 +38,7 @@ export declare const chartStyles: Readonly<{
|
|
|
38
38
|
readonly vectorEffect: stylex.StyleXClassNameFor<"vectorEffect", "non-scaling-stroke">;
|
|
39
39
|
}>;
|
|
40
40
|
readonly focus: Readonly<{
|
|
41
|
+
readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "none">;
|
|
41
42
|
readonly ':focus-visible': stylex.StyleXClassNameFor<":focus-visible", {
|
|
42
43
|
readonly outlineColor: stylex.StyleXVar<string>;
|
|
43
44
|
readonly outlineStyle: "solid";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
type ColumnAlignment = 'start' | 'end';
|
|
3
|
+
type RowSizing = 'fixed' | 'content';
|
|
3
4
|
export type DataTableColumn<Row> = {
|
|
4
5
|
readonly id: string;
|
|
5
6
|
readonly label: string;
|
|
@@ -10,6 +11,12 @@ export type DataTableColumn<Row> = {
|
|
|
10
11
|
readonly truncate?: boolean;
|
|
11
12
|
readonly sortable?: boolean;
|
|
12
13
|
};
|
|
14
|
+
export type DataTableTextProps = {
|
|
15
|
+
readonly children: string;
|
|
16
|
+
readonly secondary?: string | undefined;
|
|
17
|
+
readonly leading?: ReactNode;
|
|
18
|
+
};
|
|
19
|
+
export declare function DataTableText({ children, secondary, leading }: DataTableTextProps): ReactNode;
|
|
13
20
|
export type DataTableSort = {
|
|
14
21
|
readonly columnId: string;
|
|
15
22
|
readonly direction: 'ascending' | 'descending';
|
|
@@ -58,10 +65,11 @@ export type DataTableProps<Row> = SortProperties<Row> & OptionalSelection<Row> &
|
|
|
58
65
|
readonly focusRowId?: string | undefined;
|
|
59
66
|
readonly hideCaption?: boolean;
|
|
60
67
|
readonly hideHeaders?: boolean;
|
|
68
|
+
readonly rowSizing?: RowSizing;
|
|
61
69
|
readonly window?: DataTableWindow;
|
|
62
70
|
readonly endContent?: ReactNode;
|
|
63
71
|
readonly onEndReached?: () => void;
|
|
64
72
|
readonly footer?: ReactNode;
|
|
65
73
|
};
|
|
66
|
-
export declare function DataTable<Row extends object>({ rows, columns, getRowId, caption, empty, sort, onSortChange, selectedIds, onSelectionChange, selectionLabel, rowAction, activeRowId, focusRowId, hideCaption, hideHeaders, window, endContent, onEndReached, footer, }: DataTableProps<Row>): ReactNode;
|
|
74
|
+
export declare function DataTable<Row extends object>({ rows, columns, getRowId, caption, empty, sort, onSortChange, selectedIds, onSelectionChange, selectionLabel, rowAction, activeRowId, focusRowId, hideCaption, hideHeaders, rowSizing, window, endContent, onEndReached, footer, }: DataTableProps<Row>): ReactNode;
|
|
67
75
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { CollectionToolbarProps, FilterChip, FilterChipsProps, ColumnChoice, ColumnControlsProps, CollectionPaginationProps, } from './collection-controls.tsx';
|
|
2
2
|
export { CollectionToolbar, FilterChips, ColumnControls, CollectionPagination } from './collection-controls.tsx';
|
|
3
|
-
export type { DataTableColumn, DataTableSort, DataTableWindow, DataTableProps, DataTableRowAction, } from './data-table.tsx';
|
|
4
|
-
export { DataTable } from './data-table.tsx';
|
|
3
|
+
export type { DataTableColumn, DataTableSort, DataTableWindow, DataTableProps, DataTableRowAction, DataTableTextProps, } from './data-table.tsx';
|
|
4
|
+
export { DataTable, DataTableText } from './data-table.tsx';
|
|
5
5
|
export type { CollectionEndProps, CollectionScrollProps } from './collection-scroll.tsx';
|
|
6
6
|
export { CollectionEnd, CollectionScroll } from './collection-scroll.tsx';
|
|
7
7
|
export { Inspector, Details } from './inspector.tsx';
|
|
@@ -10,3 +10,5 @@ export { MetricGrid, Metric } from './metrics.tsx';
|
|
|
10
10
|
export { Table, Cell } from './table.tsx';
|
|
11
11
|
export type { TimestampProps } from './timestamp.tsx';
|
|
12
12
|
export { Timestamp } from './timestamp.tsx';
|
|
13
|
+
export { Timeline } from './timeline.tsx';
|
|
14
|
+
export type { TimelineProps, TimelineItemProps } from './timeline.tsx';
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
-
type
|
|
2
|
+
type MetricLayout = 'inline' | 'columns';
|
|
3
|
+
type MetricGridProps = ComponentProps<'dl'> & {
|
|
4
|
+
readonly layout?: MetricLayout;
|
|
5
|
+
};
|
|
3
6
|
type MetricProps = ComponentProps<'div'> & {
|
|
4
7
|
readonly label: string;
|
|
5
8
|
readonly value: string;
|
|
6
9
|
};
|
|
7
|
-
export declare function MetricGrid(props: MetricGridProps): ReactNode;
|
|
10
|
+
export declare function MetricGrid({ layout, ...props }: MetricGridProps): ReactNode;
|
|
8
11
|
export declare function Metric({ label, value, ...props }: MetricProps): ReactNode;
|
|
9
12
|
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type TimelineProps = {
|
|
3
|
+
readonly label: string;
|
|
4
|
+
readonly children: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export type TimelineItemProps = {
|
|
7
|
+
readonly icon: ReactNode;
|
|
8
|
+
readonly time?: ReactNode;
|
|
9
|
+
readonly metadata?: ReactNode;
|
|
10
|
+
readonly children?: ReactNode;
|
|
11
|
+
} & ({
|
|
12
|
+
readonly title: ReactNode;
|
|
13
|
+
readonly details?: never;
|
|
14
|
+
readonly defaultOpen?: never;
|
|
15
|
+
} | {
|
|
16
|
+
readonly title: string;
|
|
17
|
+
readonly details: ReactNode;
|
|
18
|
+
readonly defaultOpen?: boolean;
|
|
19
|
+
});
|
|
20
|
+
declare function TimelineRoot({ label, children }: TimelineProps): ReactNode;
|
|
21
|
+
declare function TimelineItem({ icon, title, time, metadata, children, details, defaultOpen, }: TimelineItemProps): ReactNode;
|
|
22
|
+
export declare const Timeline: {
|
|
23
|
+
Root: typeof TimelineRoot;
|
|
24
|
+
Item: typeof TimelineItem;
|
|
25
|
+
};
|
|
26
|
+
export {};
|