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