@mechane-ai/elements 0.21.0 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.js +130 -114
- package/dist/{categorical-values-DG0kzYxN.js → categorical-values-B_Z-X-tI.js} +2 -2
- package/dist/{chart-frame-DxAZ0h_q.js → chart-frame-CT_mfkYD.js} +1 -1
- package/dist/{chart-input-Dru0GScv.js → chart-input-C78Vq8ON.js} +2 -2
- package/dist/charts/cartesian.js +6 -6
- 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 +2 -2
- package/dist/charts.js +1 -1
- package/dist/{code-block-DlUwVaPP.js → code-block-C3wqGP_q.js} +1 -1
- package/dist/collections.js +3 -3
- 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 +8 -8
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-BIMrgXbz.js → content-link-Dc-pl2ee.js} +1 -1
- package/dist/content.js +3 -3
- package/dist/elements.css +4 -10
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +1 -1
- package/dist/forms.js +1 -1
- package/dist/foundations.css +7 -0
- package/dist/index.js +1 -1
- package/dist/layout.js +1 -1
- package/dist/navigation/commands.js +1 -1
- package/dist/packages/ai/src/conversation.d.ts +2 -1
- package/dist/packages/core/src/disclosure.d.ts +4 -2
- package/dist/{pierre-tree-D3XsgEH6.js → pierre-tree-Ba80jL2Z.js} +2 -2
- package/dist/{src-D4zPPr32.js → src-CWA2Tigm.js} +1 -1
- package/dist/{src-0mocxTaR.js → src-D3AGX7uZ.js} +1 -1
- package/dist/{src-qU5Z5LRH.js → src-F1zdubkU.js} +121 -55
- package/package.json +1 -1
- package/styles.css +1 -1
package/dist/ai.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { C as e, E as t, O as n, T as r, f as i, g as a, p as o, t as s, w as c } from "./src-
|
|
2
|
-
import { t as l } from "./content-link-
|
|
1
|
+
import { C as e, E as t, O as n, T as r, f as i, g as a, p as o, t as s, w as c } from "./src-F1zdubkU.js";
|
|
2
|
+
import { t as l } from "./content-link-Dc-pl2ee.js";
|
|
3
3
|
import { r as u, t as d } from "./src-d7EAi61b.js";
|
|
4
|
-
import { c as f, d as p } from "./src-
|
|
5
|
-
import { c as m, u as h } from "./src-
|
|
4
|
+
import { c as f, d as p } from "./src-D3AGX7uZ.js";
|
|
5
|
+
import { c as m, u as h } from "./src-CWA2Tigm.js";
|
|
6
6
|
import { t as g } from "./accessibility-C-aIZ1Yx.js";
|
|
7
7
|
import { t as _ } from "./visible-motion-1GcUaEi4.js";
|
|
8
8
|
import * as v from "@stylexjs/stylex";
|
|
9
|
-
import { createContext as y, useContext as b, useEffect as x, useId as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { ArrowDown as
|
|
9
|
+
import { createContext as y, useContext as b, useEffect as x, useId as S, useLayoutEffect as C, useRef as w, useState as T } from "react";
|
|
10
|
+
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
11
|
+
import { ArrowDown as O, ArrowUp as ee, File as k, GitBranch as A, Square as j } from "lucide-react";
|
|
12
12
|
import { MessageScroller as M, useMessageScroller as N, useMessageScrollerScrollable as P } from "@shadcn/react/message-scroller";
|
|
13
13
|
// packages/ai/src/approval.tsx
|
|
14
14
|
function F(t) {
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ D("section", {
|
|
16
16
|
"aria-label": t.title,
|
|
17
17
|
"data-request-id": t.requestId,
|
|
18
18
|
className: "x78zum5 xdt5ytf x1n8ia3y xeuugli x1c8xbx5 xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
19
19
|
children: [
|
|
20
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ E("h3", {
|
|
21
21
|
className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
|
|
22
22
|
children: t.title
|
|
23
23
|
}),
|
|
24
|
-
t.description !== void 0 && /* @__PURE__ */
|
|
24
|
+
t.description !== void 0 && /* @__PURE__ */ E("p", {
|
|
25
25
|
className: "x1ghz6dp x153jb6y xj0a0fe",
|
|
26
26
|
children: t.description
|
|
27
27
|
}),
|
|
28
28
|
t.children,
|
|
29
|
-
t.status === "pending" ? /* @__PURE__ */
|
|
29
|
+
t.status === "pending" ? /* @__PURE__ */ D(i, { children: [/* @__PURE__ */ E(e, {
|
|
30
30
|
variant: "solid",
|
|
31
31
|
onClick: t.onApprove,
|
|
32
32
|
disabled: t.isDisabled === !0 || t.busy !== void 0,
|
|
33
33
|
isPending: t.busy === "approve",
|
|
34
34
|
pendingLabel: "Approving…",
|
|
35
35
|
children: t.approveLabel ?? "Approve"
|
|
36
|
-
}), /* @__PURE__ */
|
|
36
|
+
}), /* @__PURE__ */ E(e, {
|
|
37
37
|
onClick: t.onDeny,
|
|
38
38
|
disabled: t.isDisabled === !0 || t.busy !== void 0,
|
|
39
39
|
isPending: t.busy === "deny",
|
|
40
40
|
pendingLabel: "Denying…",
|
|
41
41
|
children: t.denyLabel ?? "Deny"
|
|
42
|
-
})] }) : /* @__PURE__ */
|
|
42
|
+
})] }) : /* @__PURE__ */ E(s, { children: t.statusLabel })
|
|
43
43
|
]
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
// packages/ai/src/conversation.tsx
|
|
47
47
|
var I = y(void 0);
|
|
48
48
|
function L({ children: e, initialPosition: t = "end", shouldFollow: n = !0, viewportRef: r }) {
|
|
49
|
-
let i =
|
|
50
|
-
return
|
|
49
|
+
let i = w(null), a = r ?? i, [o] = T(t);
|
|
50
|
+
return C(() => {
|
|
51
51
|
typeof o == "object" && a.current?.scrollTo({
|
|
52
52
|
top: o.top,
|
|
53
53
|
left: o.left ?? 0,
|
|
54
54
|
behavior: "instant"
|
|
55
55
|
});
|
|
56
|
-
}, [o, a]), /* @__PURE__ */
|
|
56
|
+
}, [o, a]), /* @__PURE__ */ E(I.Provider, {
|
|
57
57
|
value: a,
|
|
58
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ E(M.Provider, {
|
|
59
59
|
autoScroll: n,
|
|
60
60
|
defaultScrollPosition: typeof o == "object" ? "start" : o,
|
|
61
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ E(M.Root, {
|
|
62
62
|
className: "x1n2onr6 x78zum5 xdt5ytf x5yr21d x2lwn1j xeuugli xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
63
63
|
children: e
|
|
64
64
|
})
|
|
@@ -67,7 +67,7 @@ function L({ children: e, initialPosition: t = "end", shouldFollow: n = !0, view
|
|
|
67
67
|
}
|
|
68
68
|
function R({ label: e, children: t, scrollRestorationId: n }) {
|
|
69
69
|
let r = b(I);
|
|
70
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ E(M.Viewport, {
|
|
71
71
|
ref: r,
|
|
72
72
|
"aria-label": e,
|
|
73
73
|
"data-scroll-restoration-id": n,
|
|
@@ -76,7 +76,7 @@ function R({ label: e, children: t, scrollRestorationId: n }) {
|
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
function z({ children: e, isStreaming: t = !1 }) {
|
|
79
|
-
return /* @__PURE__ */
|
|
79
|
+
return /* @__PURE__ */ E(M.Content, {
|
|
80
80
|
"aria-live": "polite",
|
|
81
81
|
"aria-relevant": "additions",
|
|
82
82
|
"aria-busy": t,
|
|
@@ -84,36 +84,43 @@ function z({ children: e, isStreaming: t = !1 }) {
|
|
|
84
84
|
children: e
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
function B({ messageId: e,
|
|
88
|
-
|
|
87
|
+
function B({ messageId: e, shouldRevealOnAppend: t = !1, children: n }) {
|
|
88
|
+
let { scrollToEnd: r } = N();
|
|
89
|
+
return C(() => {
|
|
90
|
+
t && r({ behavior: "instant" });
|
|
91
|
+
}, [
|
|
92
|
+
e,
|
|
93
|
+
t,
|
|
94
|
+
r
|
|
95
|
+
]), /* @__PURE__ */ E(M.Item, {
|
|
89
96
|
messageId: e,
|
|
90
97
|
className: "xeuugli xj0a0fe",
|
|
91
|
-
children:
|
|
98
|
+
children: n
|
|
92
99
|
});
|
|
93
100
|
}
|
|
94
101
|
function V({ children: e }) {
|
|
95
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ E("div", {
|
|
96
103
|
className: "x9f619 x2lah0s xeuugli xh8yej3 xe10afn xvueqy4 xn9t2bk x1m92p3w",
|
|
97
104
|
children: e
|
|
98
105
|
});
|
|
99
106
|
}
|
|
100
107
|
function H({ label: e = "Jump to latest" }) {
|
|
101
108
|
let { end: t } = P();
|
|
102
|
-
return t ? /* @__PURE__ */
|
|
109
|
+
return t ? /* @__PURE__ */ E("div", {
|
|
103
110
|
className: "x10l6tqk xwthv0x x1nrll8i xuuh30 x1tv4vx4 xeuugli",
|
|
104
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ E(U, { label: e })
|
|
105
112
|
}) : null;
|
|
106
113
|
}
|
|
107
114
|
function U({ label: t, onActivate: n }) {
|
|
108
115
|
let { scrollToEnd: r } = N(), i = b(I);
|
|
109
|
-
return /* @__PURE__ */
|
|
116
|
+
return /* @__PURE__ */ D(e, {
|
|
110
117
|
onClick: () => {
|
|
111
118
|
n?.(), requestAnimationFrame(() => {
|
|
112
119
|
let e = i?.current;
|
|
113
120
|
e != null && (r({ behavior: "instant" }), e.focus({ preventScroll: !0 }));
|
|
114
121
|
});
|
|
115
122
|
},
|
|
116
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ E(O, {
|
|
117
124
|
size: 14,
|
|
118
125
|
"aria-hidden": !0
|
|
119
126
|
}), t]
|
|
@@ -154,6 +161,10 @@ var W = {
|
|
|
154
161
|
kaIpWk: "xy32g2j",
|
|
155
162
|
$$css: !0
|
|
156
163
|
},
|
|
164
|
+
chatReply: {
|
|
165
|
+
kAzted: "x17tes2r x17oiadl",
|
|
166
|
+
$$css: !0
|
|
167
|
+
},
|
|
157
168
|
assistant: { $$css: !0 },
|
|
158
169
|
system: {
|
|
159
170
|
kMwMTN: "x153jb6y",
|
|
@@ -165,68 +176,72 @@ var W = {
|
|
|
165
176
|
assistant: G.assistant,
|
|
166
177
|
system: G.system
|
|
167
178
|
}, q = {
|
|
179
|
+
user: G.bubble,
|
|
180
|
+
assistant: G.chatReply,
|
|
181
|
+
system: null
|
|
182
|
+
}, J = {
|
|
168
183
|
"x-default-marker": "x-default-marker",
|
|
169
184
|
$$css: !0
|
|
170
185
|
};
|
|
171
|
-
function
|
|
172
|
-
let l = c === "chat"
|
|
186
|
+
function Y({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s, variant: c = "default" }) {
|
|
187
|
+
let l = c === "chat", u = !l || a !== void 0 || i !== void 0 ? /* @__PURE__ */ D("header", {
|
|
173
188
|
className: "x78zum5 x6s0dn4 x1hnptsi x1a02dak xeuugli",
|
|
174
189
|
children: [
|
|
175
|
-
a !== void 0 && /* @__PURE__ */
|
|
190
|
+
a !== void 0 && /* @__PURE__ */ E("span", {
|
|
176
191
|
className: "x3nfvp2 x2lah0s",
|
|
177
192
|
children: a
|
|
178
193
|
}),
|
|
179
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ E("span", {
|
|
180
195
|
className: "xk4h15q xeuugli xj0a0fe",
|
|
181
196
|
children: e
|
|
182
197
|
}),
|
|
183
|
-
i !== void 0 && /* @__PURE__ */
|
|
198
|
+
i !== void 0 && /* @__PURE__ */ E("div", {
|
|
184
199
|
className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
|
|
185
200
|
children: i
|
|
186
201
|
})
|
|
187
202
|
]
|
|
188
203
|
}) : null;
|
|
189
|
-
return /* @__PURE__ */
|
|
204
|
+
return /* @__PURE__ */ D("article", {
|
|
190
205
|
id: n,
|
|
191
206
|
"aria-label": e,
|
|
192
|
-
...v.props(G.root, K[r], l &&
|
|
207
|
+
...v.props(G.root, K[r], l && q[r], J),
|
|
193
208
|
children: [
|
|
194
209
|
u,
|
|
195
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ E("div", {
|
|
196
211
|
className: "xeuugli xj0a0fe x1ytb0s6",
|
|
197
212
|
children: t
|
|
198
213
|
}),
|
|
199
|
-
s !== void 0 && /* @__PURE__ */
|
|
214
|
+
s !== void 0 && /* @__PURE__ */ E("div", {
|
|
200
215
|
className: "x78zum5 x1a02dak x1qjc9v5 x1hnptsi xeuugli",
|
|
201
216
|
children: s
|
|
202
217
|
}),
|
|
203
|
-
o !== void 0 && /* @__PURE__ */
|
|
218
|
+
o !== void 0 && /* @__PURE__ */ E("footer", {
|
|
204
219
|
className: "x78zum5 x1a02dak x6s0dn4 xeuugli xunmzkg x1hc1fzr x12vu8c0 xtf8l8m x1thm12b",
|
|
205
220
|
children: o
|
|
206
221
|
})
|
|
207
222
|
]
|
|
208
223
|
});
|
|
209
224
|
}
|
|
210
|
-
function
|
|
211
|
-
return /* @__PURE__ */
|
|
225
|
+
function X({ name: e, description: t, href: n, actions: r }) {
|
|
226
|
+
return /* @__PURE__ */ D("div", {
|
|
212
227
|
className: "x78zum5 x1a02dak x6s0dn4 x1n8ia3y xeuugli x193iq5w x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
213
228
|
children: [
|
|
214
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ E(k, {
|
|
215
230
|
size: 16,
|
|
216
231
|
"aria-hidden": !0,
|
|
217
232
|
className: "x153jb6y x2lah0s"
|
|
218
233
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ D("div", {
|
|
220
235
|
className: "x78zum5 xdt5ytf xfko13i x1slnebi xeuugli xj0a0fe",
|
|
221
|
-
children: [n === void 0 ? /* @__PURE__ */
|
|
236
|
+
children: [n === void 0 ? /* @__PURE__ */ E("span", { children: e }) : /* @__PURE__ */ E(l, {
|
|
222
237
|
href: n,
|
|
223
238
|
children: e
|
|
224
|
-
}), t !== void 0 && /* @__PURE__ */
|
|
239
|
+
}), t !== void 0 && /* @__PURE__ */ E("span", {
|
|
225
240
|
className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
|
|
226
241
|
children: t
|
|
227
242
|
})]
|
|
228
243
|
}),
|
|
229
|
-
r !== void 0 && /* @__PURE__ */
|
|
244
|
+
r !== void 0 && /* @__PURE__ */ E("div", {
|
|
230
245
|
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli",
|
|
231
246
|
children: r
|
|
232
247
|
})
|
|
@@ -234,39 +249,39 @@ function Y({ name: e, description: t, href: n, actions: r }) {
|
|
|
234
249
|
});
|
|
235
250
|
}
|
|
236
251
|
// packages/ai/src/message-action.tsx
|
|
237
|
-
function
|
|
252
|
+
function Z(e) {
|
|
238
253
|
if (e.kind === "link") {
|
|
239
254
|
let { kind: t, label: n, ...i } = e;
|
|
240
|
-
return /* @__PURE__ */
|
|
255
|
+
return /* @__PURE__ */ E(r, {
|
|
241
256
|
...i,
|
|
242
257
|
"aria-label": n
|
|
243
258
|
});
|
|
244
259
|
}
|
|
245
260
|
let { kind: t, label: n, ...i } = e;
|
|
246
|
-
return /* @__PURE__ */
|
|
261
|
+
return /* @__PURE__ */ E(c, {
|
|
247
262
|
...i,
|
|
248
263
|
variant: "ghost",
|
|
249
264
|
"aria-label": n
|
|
250
265
|
});
|
|
251
266
|
}
|
|
252
|
-
function
|
|
253
|
-
return /* @__PURE__ */
|
|
267
|
+
function Q(e) {
|
|
268
|
+
return /* @__PURE__ */ D(d.Root, { children: [/* @__PURE__ */ E(d.Trigger, { render: Z(e) }), /* @__PURE__ */ E(d.Portal, { children: /* @__PURE__ */ E(d.Positioner, { children: /* @__PURE__ */ E(d.Popup, { children: e.label }) }) })] });
|
|
254
269
|
}
|
|
255
270
|
// packages/ai/src/message-boundary.tsx
|
|
256
|
-
function
|
|
257
|
-
return /* @__PURE__ */
|
|
271
|
+
function te({ label: e, children: t }) {
|
|
272
|
+
return /* @__PURE__ */ D(a.Root, {
|
|
258
273
|
className: "xeuugli x1kbiq1m xykt701 xpu655y",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ D(a.Trigger, {
|
|
260
275
|
className: "xlqzeqv x1hnptsi x153jb6y xy8obcc xas2l8k xj57cvi",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
276
|
+
children: [/* @__PURE__ */ E(A, {
|
|
262
277
|
size: 14,
|
|
263
278
|
"aria-hidden": !0,
|
|
264
279
|
className: "x2lah0s"
|
|
265
|
-
}), /* @__PURE__ */
|
|
280
|
+
}), /* @__PURE__ */ E("span", {
|
|
266
281
|
className: "xeuugli xj0a0fe",
|
|
267
282
|
children: e
|
|
268
283
|
})]
|
|
269
|
-
}), /* @__PURE__ */
|
|
284
|
+
}), /* @__PURE__ */ E(a.Panel, {
|
|
270
285
|
className: "x153jb6y xy8obcc xas2l8k",
|
|
271
286
|
children: t
|
|
272
287
|
})]
|
|
@@ -276,6 +291,7 @@ function Q({ label: e, children: t }) {
|
|
|
276
291
|
var $ = {
|
|
277
292
|
inlineInput: {
|
|
278
293
|
kUk6DE: "x12lumcd",
|
|
294
|
+
kSGwAc: "xamitd3",
|
|
279
295
|
$$css: !0
|
|
280
296
|
},
|
|
281
297
|
action: {
|
|
@@ -283,25 +299,25 @@ var $ = {
|
|
|
283
299
|
$$css: !0
|
|
284
300
|
}
|
|
285
301
|
};
|
|
286
|
-
function
|
|
287
|
-
return /* @__PURE__ */
|
|
302
|
+
function ne({ isCompact: e = !1 }) {
|
|
303
|
+
return /* @__PURE__ */ E("div", {
|
|
288
304
|
"aria-hidden": !0,
|
|
289
305
|
inert: !0,
|
|
290
306
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
291
|
-
children: /* @__PURE__ */
|
|
307
|
+
children: /* @__PURE__ */ D("div", {
|
|
292
308
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
309
|
+
children: [/* @__PURE__ */ E("div", {
|
|
294
310
|
...v.props(n.base, n.field, n.textarea, n.plainTextarea),
|
|
295
|
-
children: /* @__PURE__ */
|
|
311
|
+
children: /* @__PURE__ */ E(p, {
|
|
296
312
|
lines: e ? 1 : 2,
|
|
297
313
|
width: "22ch"
|
|
298
314
|
})
|
|
299
|
-
}), /* @__PURE__ */
|
|
315
|
+
}), /* @__PURE__ */ D("div", {
|
|
300
316
|
className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
317
|
+
children: [/* @__PURE__ */ E("div", {
|
|
302
318
|
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd xy8obcc xas2l8k",
|
|
303
|
-
children: /* @__PURE__ */
|
|
304
|
-
}), /* @__PURE__ */
|
|
319
|
+
children: /* @__PURE__ */ E(p, { width: "8ch" })
|
|
320
|
+
}), /* @__PURE__ */ E(f, {
|
|
305
321
|
isIconOnly: !0,
|
|
306
322
|
xstyle: $.action
|
|
307
323
|
})]
|
|
@@ -309,36 +325,36 @@ function te({ isCompact: e = !1 }) {
|
|
|
309
325
|
})
|
|
310
326
|
});
|
|
311
327
|
}
|
|
312
|
-
function
|
|
313
|
-
let M =
|
|
314
|
-
|
|
328
|
+
function re({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prompt", placeholder: a, maxLength: o, required: s = !0, isPending: l = !1, disabled: u = !1, isSubmitDisabled: f = !1, submitLabel: p = "Send message", pendingLabel: _ = "Sending…", enterBehavior: y = "newline", isCompact: b = !1, description: x, error: C, controls: w, attachments: T, onStop: O, isStopPending: k = !1, stopLabel: A = "Stop response" }) {
|
|
329
|
+
let M = S(), N = u, P = b && T === void 0 && w === void 0, F = !N && !l && !f, I = p;
|
|
330
|
+
O === void 0 ? l ? I = _ : y === "submit" && (I = `${p} · Enter`) : I = k ? "Stopping…" : A;
|
|
315
331
|
function L(e) {
|
|
316
332
|
if (y !== "submit" || e.key !== "Enter" || e.repeat) return;
|
|
317
333
|
let t = e.altKey || e.ctrlKey || e.metaKey;
|
|
318
|
-
e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), F &&
|
|
334
|
+
e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), F && O === void 0 && e.currentTarget.form?.requestSubmit());
|
|
319
335
|
}
|
|
320
336
|
function R(e) {
|
|
321
|
-
e.preventDefault(), F &&
|
|
337
|
+
e.preventDefault(), F && O === void 0 && r(e);
|
|
322
338
|
}
|
|
323
|
-
return /* @__PURE__ */
|
|
339
|
+
return /* @__PURE__ */ E("form", {
|
|
324
340
|
onSubmit: R,
|
|
325
341
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
326
|
-
children: /* @__PURE__ */
|
|
327
|
-
invalid:
|
|
342
|
+
children: /* @__PURE__ */ D(m.Root, {
|
|
343
|
+
invalid: C !== void 0,
|
|
328
344
|
children: [
|
|
329
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ E(m.Label, {
|
|
330
346
|
...v.props(g.hidden),
|
|
331
347
|
children: e
|
|
332
348
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ D("div", {
|
|
334
350
|
...{
|
|
335
351
|
0: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep" },
|
|
336
352
|
2: { className: "x78zum5 x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1q0g3np xuk3077 xn9t2bk" },
|
|
337
353
|
1: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1oddvo6" },
|
|
338
354
|
3: { className: "x78zum5 x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1q0g3np xuk3077 xn9t2bk x1oddvo6" }
|
|
339
|
-
}[!!P << 1 |
|
|
355
|
+
}[!!P << 1 | C !== void 0],
|
|
340
356
|
children: [
|
|
341
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ E(h, {
|
|
342
358
|
appearance: "plain",
|
|
343
359
|
rows: b ? 1 : 2,
|
|
344
360
|
isCompact: b,
|
|
@@ -352,66 +368,66 @@ function ne({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prom
|
|
|
352
368
|
maxLength: o,
|
|
353
369
|
required: s,
|
|
354
370
|
disabled: u,
|
|
355
|
-
"aria-errormessage":
|
|
371
|
+
"aria-errormessage": C === void 0 ? void 0 : M
|
|
356
372
|
}),
|
|
357
|
-
|
|
358
|
-
/* @__PURE__ */
|
|
373
|
+
T,
|
|
374
|
+
/* @__PURE__ */ D("div", {
|
|
359
375
|
...{
|
|
360
376
|
0: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi" },
|
|
361
377
|
1: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi x2lah0s" }
|
|
362
378
|
}[!!P | 0],
|
|
363
|
-
children: [
|
|
379
|
+
children: [w !== void 0 && /* @__PURE__ */ E("div", {
|
|
364
380
|
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
|
|
365
|
-
children:
|
|
366
|
-
}), /* @__PURE__ */
|
|
381
|
+
children: w
|
|
382
|
+
}), /* @__PURE__ */ D(d.Root, { children: [/* @__PURE__ */ E(d.Trigger, { render: O === void 0 ? /* @__PURE__ */ E(c, {
|
|
367
383
|
xstyle: $.action,
|
|
368
384
|
type: "submit",
|
|
369
385
|
variant: "solid",
|
|
370
386
|
"aria-label": l ? _ : p,
|
|
371
387
|
disabled: u || f,
|
|
372
388
|
isPending: l,
|
|
373
|
-
children: /* @__PURE__ */
|
|
389
|
+
children: /* @__PURE__ */ E(ee, {
|
|
374
390
|
size: 16,
|
|
375
391
|
"aria-hidden": !0
|
|
376
392
|
})
|
|
377
|
-
}) : /* @__PURE__ */
|
|
393
|
+
}) : /* @__PURE__ */ E(c, {
|
|
378
394
|
xstyle: $.action,
|
|
379
395
|
type: "button",
|
|
380
396
|
"aria-label": k ? "Stopping…" : A,
|
|
381
397
|
onClick: (e) => {
|
|
382
|
-
e.preventDefault(),
|
|
398
|
+
e.preventDefault(), O();
|
|
383
399
|
},
|
|
384
400
|
disabled: u,
|
|
385
401
|
isPending: k,
|
|
386
|
-
children: /* @__PURE__ */
|
|
402
|
+
children: /* @__PURE__ */ E(j, {
|
|
387
403
|
size: 14,
|
|
388
404
|
"aria-hidden": !0
|
|
389
405
|
})
|
|
390
|
-
}) }), /* @__PURE__ */
|
|
406
|
+
}) }), /* @__PURE__ */ E(d.Portal, { children: /* @__PURE__ */ E(d.Positioner, { children: /* @__PURE__ */ E(d.Popup, { children: I }) }) })] })]
|
|
391
407
|
})
|
|
392
408
|
]
|
|
393
409
|
}),
|
|
394
|
-
x !== void 0 && /* @__PURE__ */
|
|
395
|
-
|
|
410
|
+
x !== void 0 && /* @__PURE__ */ E(m.Description, { children: x }),
|
|
411
|
+
C !== void 0 && /* @__PURE__ */ E(m.Error, {
|
|
396
412
|
id: M,
|
|
397
413
|
match: !0,
|
|
398
414
|
role: "alert",
|
|
399
|
-
children:
|
|
415
|
+
children: C
|
|
400
416
|
})
|
|
401
417
|
]
|
|
402
418
|
})
|
|
403
419
|
});
|
|
404
420
|
}
|
|
405
421
|
// packages/ai/src/reply-indicator.tsx
|
|
406
|
-
function
|
|
407
|
-
let [r, i] =
|
|
422
|
+
function ie({ label: e, delayMs: t = 200, isAnimated: n = !0 }) {
|
|
423
|
+
let [r, i] = T(t === 0), { ref: a, isActive: o } = _(n && r);
|
|
408
424
|
return x(() => {
|
|
409
425
|
let e = setTimeout(() => i(!0), t);
|
|
410
426
|
return () => clearTimeout(e);
|
|
411
|
-
}, [t]), /* @__PURE__ */
|
|
427
|
+
}, [t]), /* @__PURE__ */ E("div", {
|
|
412
428
|
ref: a,
|
|
413
|
-
className: "x153jb6y x1hz01jw xy8obcc xas2l8k",
|
|
414
|
-
children: r && /* @__PURE__ */
|
|
429
|
+
className: "x17tes2r x17oiadl x78zum5 x6s0dn4 x153jb6y x1hz01jw xy8obcc xas2l8k",
|
|
430
|
+
children: r && /* @__PURE__ */ E("span", {
|
|
415
431
|
role: "status",
|
|
416
432
|
...{
|
|
417
433
|
0: {},
|
|
@@ -424,27 +440,27 @@ function re({ label: e, delayMs: t = 200, isAnimated: n = !0 }) {
|
|
|
424
440
|
});
|
|
425
441
|
}
|
|
426
442
|
// packages/ai/src/sources.tsx
|
|
427
|
-
function
|
|
428
|
-
return /* @__PURE__ */
|
|
443
|
+
function ae({ sources: e, label: t = "Sources" }) {
|
|
444
|
+
return /* @__PURE__ */ D("section", {
|
|
429
445
|
"aria-label": t,
|
|
430
446
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft",
|
|
431
447
|
children: [
|
|
432
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ E("h3", {
|
|
433
449
|
className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
|
|
434
450
|
children: t
|
|
435
451
|
}),
|
|
436
|
-
e.length === 0 && /* @__PURE__ */
|
|
452
|
+
e.length === 0 && /* @__PURE__ */ E("p", {
|
|
437
453
|
className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
438
454
|
children: "No sources supplied."
|
|
439
455
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ E("ol", {
|
|
441
457
|
className: "x78zum5 xdt5ytf x1n8ia3y x1ghz6dp x1717udv x3ct3a4",
|
|
442
|
-
children: e.map((e) => /* @__PURE__ */
|
|
458
|
+
children: e.map((e) => /* @__PURE__ */ D("li", {
|
|
443
459
|
className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
460
|
+
children: [/* @__PURE__ */ E("span", { children: /* @__PURE__ */ E(l, {
|
|
445
461
|
href: e.href,
|
|
446
462
|
children: e.title
|
|
447
|
-
}) }), e.description !== void 0 && /* @__PURE__ */
|
|
463
|
+
}) }), e.description !== void 0 && /* @__PURE__ */ E("p", {
|
|
448
464
|
className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
449
465
|
children: e.description
|
|
450
466
|
})]
|
|
@@ -453,21 +469,21 @@ function ie({ sources: e, label: t = "Sources" }) {
|
|
|
453
469
|
]
|
|
454
470
|
});
|
|
455
471
|
}
|
|
456
|
-
function
|
|
457
|
-
return /* @__PURE__ */
|
|
472
|
+
function oe({ source: e, label: n }) {
|
|
473
|
+
return /* @__PURE__ */ E("span", {
|
|
458
474
|
className: "xt0psk2 x11njtxf xss6m8b",
|
|
459
|
-
children: /* @__PURE__ */
|
|
460
|
-
render: /* @__PURE__ */
|
|
475
|
+
children: /* @__PURE__ */ D(u.Root, { children: [/* @__PURE__ */ E(u.Trigger, {
|
|
476
|
+
render: /* @__PURE__ */ E(t, {}),
|
|
461
477
|
"aria-label": `Source ${n}: ${e.title}`,
|
|
462
478
|
children: n
|
|
463
|
-
}), /* @__PURE__ */
|
|
479
|
+
}), /* @__PURE__ */ E(u.Portal, { children: /* @__PURE__ */ E(u.Positioner, {
|
|
464
480
|
side: "top",
|
|
465
|
-
children: /* @__PURE__ */
|
|
481
|
+
children: /* @__PURE__ */ E(u.Popup, { children: /* @__PURE__ */ D(o, {
|
|
466
482
|
isCompact: !0,
|
|
467
483
|
children: [
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
-
e.description !== void 0 && /* @__PURE__ */
|
|
470
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ E(u.Title, { children: e.title }),
|
|
485
|
+
e.description !== void 0 && /* @__PURE__ */ E(u.Description, { children: e.description }),
|
|
486
|
+
/* @__PURE__ */ E(l, {
|
|
471
487
|
href: e.href,
|
|
472
488
|
children: "Open source"
|
|
473
489
|
})
|
|
@@ -476,4 +492,4 @@ function ae({ source: e, label: n }) {
|
|
|
476
492
|
}) })] })
|
|
477
493
|
});
|
|
478
494
|
}
|
|
479
|
-
export { F as Approval, W as Conversation,
|
|
495
|
+
export { F as Approval, W as Conversation, oe as InlineCitation, Y as Message, Q as MessageAction, X as MessageAttachment, te as MessageBoundary, re as PromptInput, ne as PromptInputPlaceholder, ie as ReplyIndicator, ae as Sources };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as e, s as t } from "./chart-frame-
|
|
2
|
-
import { n } from "./chart-input-
|
|
1
|
+
import { n as e, s as t } from "./chart-frame-CT_mfkYD.js";
|
|
2
|
+
import { n } from "./chart-input-C78Vq8ON.js";
|
|
3
3
|
import * as r from "@stylexjs/stylex";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
// packages/charts/src/categorical-values.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as e } from "./src-
|
|
2
|
-
import { r as t } from "./chart-frame-
|
|
1
|
+
import { m as e } from "./src-D3AGX7uZ.js";
|
|
2
|
+
import { r as t } from "./chart-frame-CT_mfkYD.js";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
// packages/charts/src/chart-input.tsx
|
|
5
5
|
function r(e) {
|
package/dist/charts/cartesian.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { u as e } from "../src-
|
|
2
|
-
import { i as t, n, r, t as i } from "../categorical-values-
|
|
3
|
-
import { a, i as o, n as s, o as c, r as l, s as u, t as d } from "../chart-frame-
|
|
4
|
-
import { n as f, r as p, t as m } from "../chart-input-
|
|
1
|
+
import { u as e } from "../src-D3AGX7uZ.js";
|
|
2
|
+
import { i as t, n, r, t as i } from "../categorical-values-B_Z-X-tI.js";
|
|
3
|
+
import { a, i as o, n as s, o as c, r as l, s as u, t as d } from "../chart-frame-CT_mfkYD.js";
|
|
4
|
+
import { n as f, r as p, t as m } from "../chart-input-C78Vq8ON.js";
|
|
5
5
|
import { t as h } from "../plot-width--OgdohB5.js";
|
|
6
|
-
import { E as g } from "../src-
|
|
7
|
-
import { g as _ } from "../src-
|
|
6
|
+
import { E as g } from "../src-F1zdubkU.js";
|
|
7
|
+
import { g as _ } from "../src-CWA2Tigm.js";
|
|
8
8
|
import { r as v } from "../tokens.stylex-DTHHFbyl.js";
|
|
9
9
|
import * as y from "@stylexjs/stylex";
|
|
10
10
|
import { useEffect as b, useId as x, useMemo as S, useRef as C, useState as w } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-
|
|
2
|
-
import { n as a, r as o, t as s } from "../chart-input-
|
|
1
|
+
import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-CT_mfkYD.js";
|
|
2
|
+
import { n as a, r as o, t as s } from "../chart-input-C78Vq8ON.js";
|
|
3
3
|
import { t as c } from "../plot-width--OgdohB5.js";
|
|
4
4
|
import * as l from "@stylexjs/stylex";
|
|
5
5
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
package/dist/charts/graph.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "../use-scroll-tab-index-Dxpdh4W7.js";
|
|
2
|
-
import { a as t, n, r, s as i, t as a } from "../chart-frame-
|
|
3
|
-
import { n as o, t as s } from "../chart-input-
|
|
2
|
+
import { a as t, n, r, s as i, t as a } from "../chart-frame-CT_mfkYD.js";
|
|
3
|
+
import { n as o, t as s } from "../chart-input-C78Vq8ON.js";
|
|
4
4
|
import * as c from "@stylexjs/stylex";
|
|
5
5
|
import { useId as l } from "react";
|
|
6
6
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
package/dist/charts/hierarchy.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as e, r as t, t as n } from "../categorical-values-
|
|
2
|
-
import { o as r, r as i, s as a } from "../chart-frame-
|
|
3
|
-
import { t as o } from "../chart-input-
|
|
1
|
+
import { i as e, r as t, t as n } from "../categorical-values-B_Z-X-tI.js";
|
|
2
|
+
import { o as r, r as i, s as a } from "../chart-frame-CT_mfkYD.js";
|
|
3
|
+
import { t as o } from "../chart-input-C78Vq8ON.js";
|
|
4
4
|
import { t as s } from "../plot-width--OgdohB5.js";
|
|
5
5
|
import * as c from "@stylexjs/stylex";
|
|
6
6
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
package/dist/charts/matrix.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as e } from "../tokens.stylex-DTHHFbyl.js";
|
|
2
|
-
import { n as t, r as n, t as r } from "../chart-input-
|
|
3
|
-
import { a as i, n as a, r as o, s, t as c } from "../chart-frame-
|
|
2
|
+
import { n as t, r as n, t as r } from "../chart-input-C78Vq8ON.js";
|
|
3
|
+
import { a as i, n as a, r as o, s, t as c } from "../chart-frame-CT_mfkYD.js";
|
|
4
4
|
import { t as l } from "../use-scroll-tab-index-Dxpdh4W7.js";
|
|
5
5
|
import * as u from "@stylexjs/stylex";
|
|
6
6
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
package/dist/charts/timeline.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as e } from "../src-
|
|
2
|
-
import { n as t, t as n } from "../chart-input-
|
|
1
|
+
import { c as e } from "../src-F1zdubkU.js";
|
|
2
|
+
import { n as t, t as n } from "../chart-input-C78Vq8ON.js";
|
|
3
3
|
import * as r from "@stylexjs/stylex";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
import { scaleLinear as o } from "@visx/scale";
|