@mechane-ai/elements 0.8.0 → 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 +60 -39
- package/dist/ai.js +231 -170
- package/dist/assets/stylex.css +402 -164
- package/dist/{categorical-values-dGbaZ0tp.js → categorical-values-DYRiw5Qd.js} +2 -2
- package/dist/{chart-frame-DgPdIguO.js → chart-frame-RL1hCWBC.js} +1 -1
- package/dist/{chart-input-Sac4StHN.js → chart-input-Bm3ot1yD.js} +2 -2
- package/dist/charts/cartesian.js +5 -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-BRNdtTaP.js → code-block-B30xQKqg.js} +1 -1
- package/dist/collections.js +305 -261
- 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-Dd8gapwc.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 +138 -86
- 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/collections/src/data-table.d.ts +6 -0
- package/dist/packages/collections/src/index.d.ts +2 -2
- package/dist/packages/collections/src/timeline.d.ts +10 -3
- 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-DdE1boiT.js → pierre-tree-CRk09rx7.js} +2 -2
- package/dist/{src-Eg_ytPjv.js → src-Cc0Sadzr.js} +376 -293
- package/dist/{src-DV0BNk1M.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-Bc5sEhdO.js +0 -680
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";
|
|
@@ -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
|
|
@@ -97,17 +97,32 @@ function E({ children: e, label: t = "Main" }) {
|
|
|
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,28 +345,58 @@ 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,
|
|
@@ -358,6 +406,10 @@ function B({ title: e, actions: t, breadcrumb: n = !1, navigation: r = !0 }) {
|
|
|
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,53 +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
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,
|
|
436
488
|
className: "xeuugli x1t137rt",
|
|
437
489
|
children: e
|
|
438
490
|
})]
|
|
439
|
-
}),
|
|
491
|
+
}), t != null && /* @__PURE__ */ p(r, { children: t })]
|
|
440
492
|
});
|
|
441
493
|
}
|
|
442
|
-
function
|
|
494
|
+
function Z({ children: e, label: t = "Properties" }) {
|
|
443
495
|
return /* @__PURE__ */ p("aside", {
|
|
444
496
|
"aria-label": t,
|
|
445
497
|
className: "x78zum5 xdt5ytf x1irul0l x1iyjqo2 x1j825kq xeuugli",
|
|
446
498
|
children: e
|
|
447
499
|
});
|
|
448
500
|
}
|
|
449
|
-
var
|
|
450
|
-
Root:
|
|
451
|
-
Toolbar:
|
|
452
|
-
Body:
|
|
453
|
-
Content:
|
|
454
|
-
Header:
|
|
455
|
-
Aside:
|
|
501
|
+
var Q = {
|
|
502
|
+
Root: K,
|
|
503
|
+
Toolbar: q,
|
|
504
|
+
Body: J,
|
|
505
|
+
Content: Y,
|
|
506
|
+
Header: X,
|
|
507
|
+
Aside: Z
|
|
456
508
|
};
|
|
457
509
|
// packages/layout/src/resizable.tsx
|
|
458
|
-
function
|
|
510
|
+
function $({ orientation: e = "horizontal", initialSizes: t, onSizesChange: n, disabled: r, ref: i, ...o }) {
|
|
459
511
|
return /* @__PURE__ */ p(v, {
|
|
460
512
|
orientation: e,
|
|
461
513
|
defaultLayout: t,
|
|
@@ -471,7 +523,7 @@ function Y({ orientation: e = "horizontal", initialSizes: t, onSizesChange: n, d
|
|
|
471
523
|
...a({ className: "xeuugli x2lwn1j xh8yej3 x5yr21d" }, o)
|
|
472
524
|
});
|
|
473
525
|
}
|
|
474
|
-
function
|
|
526
|
+
function ee({ id: e, initialSizePercent: t, minimumSizePercent: n = 10, maximumSizePercent: r = 100, collapsible: i = !1, ref: o, ...s }) {
|
|
475
527
|
return /* @__PURE__ */ p(y, {
|
|
476
528
|
id: e,
|
|
477
529
|
defaultSize: t === void 0 ? void 0 : `${t}%`,
|
|
@@ -482,15 +534,15 @@ function X({ id: e, initialSizePercent: t, minimumSizePercent: n = 10, maximumSi
|
|
|
482
534
|
...a({ className: "xeuugli x2lwn1j xysyzu8" }, s)
|
|
483
535
|
});
|
|
484
536
|
}
|
|
485
|
-
function
|
|
537
|
+
function te({ ref: e, ...t }) {
|
|
486
538
|
return /* @__PURE__ */ p(b, {
|
|
487
539
|
elementRef: e,
|
|
488
540
|
...a({ className: "x1fa40ue x1i1rx1s xgc0pbm xir5lan xfaai28 x1rbdpqn x8wp5i9 x13qnu6 x9v5kkp x19rmrnh x13iak60" }, t)
|
|
489
541
|
});
|
|
490
542
|
}
|
|
491
|
-
var
|
|
492
|
-
Root:
|
|
493
|
-
Pane:
|
|
494
|
-
Handle:
|
|
543
|
+
var ne = {
|
|
544
|
+
Root: $,
|
|
545
|
+
Pane: ee,
|
|
546
|
+
Handle: te
|
|
495
547
|
};
|
|
496
|
-
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;
|
|
@@ -11,6 +11,12 @@ export type DataTableColumn<Row> = {
|
|
|
11
11
|
readonly truncate?: boolean;
|
|
12
12
|
readonly sortable?: boolean;
|
|
13
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;
|
|
14
20
|
export type DataTableSort = {
|
|
15
21
|
readonly columnId: string;
|
|
16
22
|
readonly direction: 'ascending' | 'descending';
|
|
@@ -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';
|
|
@@ -5,13 +5,20 @@ export type TimelineProps = {
|
|
|
5
5
|
};
|
|
6
6
|
export type TimelineItemProps = {
|
|
7
7
|
readonly icon: ReactNode;
|
|
8
|
-
readonly title: ReactNode;
|
|
9
8
|
readonly time?: ReactNode;
|
|
10
9
|
readonly metadata?: ReactNode;
|
|
11
10
|
readonly children?: ReactNode;
|
|
12
|
-
}
|
|
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
|
+
});
|
|
13
20
|
declare function TimelineRoot({ label, children }: TimelineProps): ReactNode;
|
|
14
|
-
declare function TimelineItem({ icon, title, time, metadata, children }: TimelineItemProps): ReactNode;
|
|
21
|
+
declare function TimelineItem({ icon, title, time, metadata, children, details, defaultOpen, }: TimelineItemProps): ReactNode;
|
|
15
22
|
export declare const Timeline: {
|
|
16
23
|
Root: typeof TimelineRoot;
|
|
17
24
|
Item: typeof TimelineItem;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Button as BaseButton } from '@base-ui/react/button';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
3
|
import type { ComponentProps, ReactNode } from 'react';
|
|
3
4
|
import type { ControlStyle, PlacementStyle } from '../../foundations/src/style-composition.ts';
|
|
4
5
|
type ButtonVariant = 'solid' | 'outline' | 'ghost';
|
|
@@ -17,6 +18,11 @@ type ButtonProps = ComponentProps<typeof BaseButton> & PendingProps & {
|
|
|
17
18
|
type IconButtonProps = Omit<ButtonProps, 'aria-label' | 'pendingLabel'> & {
|
|
18
19
|
readonly 'aria-label': string;
|
|
19
20
|
};
|
|
21
|
+
type IconLinkProps = Omit<useRender.ComponentProps<'a'>, 'aria-label'> & {
|
|
22
|
+
readonly 'aria-label': string;
|
|
23
|
+
readonly 'size'?: ControlSize;
|
|
24
|
+
readonly 'xstyle'?: PlacementStyle;
|
|
25
|
+
};
|
|
20
26
|
type TextButtonProps = ComponentProps<typeof BaseButton> & PendingProps & {
|
|
21
27
|
readonly tone?: ButtonTone;
|
|
22
28
|
readonly xstyle?: PlacementStyle;
|
|
@@ -28,4 +34,5 @@ export declare function Button({ variant, tone, size, pending, pendingLabel, chi
|
|
|
28
34
|
export declare function IconButton({ size, children, xstyle, ...props }: IconButtonProps): ReactNode;
|
|
29
35
|
export declare function TextButton({ tone, pending, pendingLabel, children, className, style, xstyle, disabled, ...props }: TextButtonProps): ReactNode;
|
|
30
36
|
export declare function TextLink({ xstyle, ...props }: TextLinkProps): ReactNode;
|
|
37
|
+
export declare function IconLink({ size, children, xstyle, render, ref, ...props }: IconLinkProps): ReactNode;
|
|
31
38
|
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export declare const seededAgentAvatarShapes: readonly ["spark", "facet", "orbit", "loop", "clover", "petal", "wheel", "compass", "grid", "steps", "chevron", "wave", "ripple", "arch", "bridge", "peak", "zigzag", "helix", "kite", "cube", "prism", "frame", "brackets", "diamond", "hexagon", "signal", "crest", "bolt", "link", "split", "aster", "portal"];
|
|
3
|
+
export declare const agentAvatarShapes: readonly ["spark", "facet", "orbit", "loop", "clover", "petal", "wheel", "compass", "grid", "steps", "chevron", "wave", "ripple", "arch", "bridge", "peak", "zigzag", "helix", "kite", "cube", "prism", "frame", "brackets", "diamond", "hexagon", "signal", "crest", "bolt", "link", "split", "aster", "portal"];
|
|
4
|
+
export type AgentAvatarShape = (typeof agentAvatarShapes)[number];
|
|
5
|
+
export declare const agentAvatarGlyphs: Readonly<Record<AgentAvatarShape, ReactNode>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AgentAvatarShape } from './agent-avatar-glyphs.tsx';
|
|
3
|
+
export declare const agentAvatarColors: readonly ["ember", "coral", "rose", "berry", "plum", "orchid", "violet", "indigo", "iris", "cobalt", "blue", "sky", "cyan", "lagoon", "teal", "jade", "mint", "forest", "leaf", "moss", "olive", "ochre", "amber", "copper"];
|
|
4
|
+
export type AgentAvatarColor = (typeof agentAvatarColors)[number];
|
|
5
|
+
export type AgentAvatarSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
6
|
+
export type AgentAppearance = {
|
|
7
|
+
readonly shape: AgentAvatarShape;
|
|
8
|
+
readonly color: AgentAvatarColor;
|
|
9
|
+
};
|
|
10
|
+
export declare function agentAppearance(seed: string): AgentAppearance;
|
|
11
|
+
export type AgentAvatarProps = {
|
|
12
|
+
readonly seed: string;
|
|
13
|
+
readonly appearance?: AgentAppearance | undefined;
|
|
14
|
+
readonly size?: AgentAvatarSize;
|
|
15
|
+
readonly label?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function AgentAvatar({ seed, appearance, size, label }: AgentAvatarProps): ReactNode;
|
|
@@ -4,6 +4,7 @@ type CopySource = string | (() => string);
|
|
|
4
4
|
type CopyValueProps = Omit<ComponentProps<typeof BaseButton>, 'value'> & {
|
|
5
5
|
readonly value: CopySource;
|
|
6
6
|
readonly label: string;
|
|
7
|
+
readonly display?: 'value' | 'icon';
|
|
7
8
|
};
|
|
8
|
-
export declare function CopyValue({ value, label, children, className, style, disabled, onClick, render, ...props }: CopyValueProps): ReactNode;
|
|
9
|
+
export declare function CopyValue({ value, label, display, children, className, style, disabled, onClick, render, ...props }: CopyValueProps): ReactNode;
|
|
9
10
|
export {};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
export { Button, IconButton, TextButton, TextLink } from './actions.tsx';
|
|
1
|
+
export { Button, IconButton, IconLink, TextButton, TextLink } from './actions.tsx';
|
|
2
2
|
export type { AvatarProps } from './avatar.tsx';
|
|
3
3
|
export { Avatar } from './avatar.tsx';
|
|
4
|
+
export type { AgentAvatarShape } from './agent-avatar-glyphs.tsx';
|
|
5
|
+
export { agentAvatarShapes } from './agent-avatar-glyphs.tsx';
|
|
6
|
+
export type { AgentAppearance, AgentAvatarColor, AgentAvatarProps, AgentAvatarSize } from './agent-avatar.tsx';
|
|
7
|
+
export { AgentAvatar, agentAppearance, agentAvatarColors } from './agent-avatar.tsx';
|
|
4
8
|
export { CopyValue } from './copy-value.tsx';
|
|
5
9
|
export { Accordion, Collapsible } from './disclosure.tsx';
|
|
6
10
|
export { Panel, Row, Stack, Columns, Divider } from './surfaces.tsx';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AgentAppearance } from '../../core/src/index.ts';
|
|
3
|
+
export type AgentAvatarPickerProps = {
|
|
4
|
+
readonly value: AgentAppearance;
|
|
5
|
+
readonly onValueChange: (value: AgentAppearance) => void;
|
|
6
|
+
readonly disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function AgentAvatarPicker({ value, onValueChange, disabled }: AgentAvatarPickerProps): ReactNode;
|