@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.
Files changed (61) hide show
  1. package/README.md +60 -39
  2. package/dist/ai.js +231 -170
  3. package/dist/assets/stylex.css +402 -164
  4. package/dist/{categorical-values-dGbaZ0tp.js → categorical-values-DYRiw5Qd.js} +2 -2
  5. package/dist/{chart-frame-DgPdIguO.js → chart-frame-RL1hCWBC.js} +1 -1
  6. package/dist/{chart-input-Sac4StHN.js → chart-input-Bm3ot1yD.js} +2 -2
  7. package/dist/charts/cartesian.js +5 -5
  8. package/dist/charts/distribution.js +2 -2
  9. package/dist/charts/graph.js +2 -2
  10. package/dist/charts/hierarchy.js +3 -3
  11. package/dist/charts/matrix.js +2 -2
  12. package/dist/charts/timeline.js +1 -1
  13. package/dist/charts.js +1 -1
  14. package/dist/{code-block-BRNdtTaP.js → code-block-B30xQKqg.js} +1 -1
  15. package/dist/collections.js +305 -261
  16. package/dist/content/code.js +1 -1
  17. package/dist/content/diff.js +2 -2
  18. package/dist/content/link.js +1 -1
  19. package/dist/content/markdown.js +4 -4
  20. package/dist/content/tree.js +2 -2
  21. package/dist/{content-link-Dd8gapwc.js → content-link-BrPrpBof.js} +1 -1
  22. package/dist/content.js +35 -35
  23. package/dist/feedback.js +1 -1
  24. package/dist/forms/dates.js +7 -7
  25. package/dist/forms.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/layout.js +138 -86
  28. package/dist/navigation/commands.js +1 -1
  29. package/dist/packages/ai/src/conversation.d.ts +2 -1
  30. package/dist/packages/ai/src/index.d.ts +4 -0
  31. package/dist/packages/ai/src/message-action.d.ts +10 -0
  32. package/dist/packages/ai/src/message-boundary.d.ts +6 -0
  33. package/dist/packages/ai/src/message.d.ts +2 -1
  34. package/dist/packages/collections/src/data-table.d.ts +6 -0
  35. package/dist/packages/collections/src/index.d.ts +2 -2
  36. package/dist/packages/collections/src/timeline.d.ts +10 -3
  37. package/dist/packages/core/src/actions.d.ts +7 -0
  38. package/dist/packages/core/src/agent-avatar-glyphs.d.ts +5 -0
  39. package/dist/packages/core/src/agent-avatar.d.ts +17 -0
  40. package/dist/packages/core/src/copy-value.d.ts +2 -1
  41. package/dist/packages/core/src/index.d.ts +5 -1
  42. package/dist/packages/forms/src/agent-avatar-picker.d.ts +8 -0
  43. package/dist/packages/forms/src/field-styles.d.ts +19 -0
  44. package/dist/packages/forms/src/forms.d.ts +2 -1
  45. package/dist/packages/forms/src/index.d.ts +2 -0
  46. package/dist/packages/foundations/src/tokens.stylex.d.ts +52 -0
  47. package/dist/packages/layout/src/app-shell.d.ts +2 -1
  48. package/dist/packages/layout/src/index.d.ts +2 -1
  49. package/dist/packages/layout/src/page-toolbar.d.ts +3 -1
  50. package/dist/packages/layout/src/sidebar.d.ts +4 -0
  51. package/dist/packages/layout/src/view-stack.d.ts +13 -0
  52. package/dist/packages/layout/src/workbench.d.ts +5 -2
  53. package/dist/{pierre-tree-DdE1boiT.js → pierre-tree-CRk09rx7.js} +2 -2
  54. package/dist/{src-Eg_ytPjv.js → src-Cc0Sadzr.js} +376 -293
  55. package/dist/{src-DV0BNk1M.js → src-DuuAmS-c.js} +1 -1
  56. package/dist/src-elMBQ2Dh.js +1087 -0
  57. package/dist/theme.js +1 -1
  58. package/dist/tokens.js +61 -10
  59. package/package.json +1 -1
  60. package/packages/foundations/src/tokens.stylex.ts +54 -0
  61. package/dist/src-Bc5sEhdO.js +0 -680
package/dist/ai.js CHANGED
@@ -1,112 +1,114 @@
1
- import { b as e, f as t, p as n, t as r, v as i } from "./src-Bc5sEhdO.js";
2
- import { t as a } from "./content-link-Dd8gapwc.js";
3
- import { c as o, u as s } from "./src-Eg_ytPjv.js";
4
- import { r as c } from "./src-CfDf8TY8.js";
5
- import * as l from "@stylexjs/stylex";
6
- import { createContext as u, useContext as d, useId as f, useRef as p } from "react";
7
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
8
- import { ArrowDown as g, ArrowUp as _, ExternalLink as v, File as y, Square as b } from "lucide-react";
9
- import { MessageScroller as x, useMessageScroller as S, useMessageScrollerScrollable as C } from "@shadcn/react/message-scroller";
1
+ import { C as e, S as t, T as n, f as r, h as i, p as a, t as o, w as s } from "./src-elMBQ2Dh.js";
2
+ import { t as c } from "./content-link-BrPrpBof.js";
3
+ import { r as l, t as u } from "./src-CfDf8TY8.js";
4
+ import { c as d, u as f } from "./src-Cc0Sadzr.js";
5
+ import { t as p } from "./accessibility-C-aIZ1Yx.js";
6
+ import * as m from "@stylexjs/stylex";
7
+ import { createContext as h, useContext as g, useId as _, useRef as v } from "react";
8
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
9
+ import { ArrowDown as x, ArrowUp as S, ExternalLink as C, File as w, GitBranch as T, Square as E } from "lucide-react";
10
+ import { MessageScroller as D, useMessageScroller as O, useMessageScrollerScrollable as k } from "@shadcn/react/message-scroller";
10
11
  // packages/ai/src/approval.tsx
11
- function w(e) {
12
- return /* @__PURE__ */ h("section", {
12
+ function A(e) {
13
+ return /* @__PURE__ */ b("section", {
13
14
  "aria-label": e.title,
14
15
  "data-request-id": e.requestId,
15
16
  className: "x78zum5 xdt5ytf x1n8ia3y xeuugli x1c8xbx5 xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt",
16
17
  children: [
17
- /* @__PURE__ */ m("h3", {
18
+ /* @__PURE__ */ y("h3", {
18
19
  className: "x1ghz6dp xtqrqnz x1778rvt xk50ysn xj0a0fe",
19
20
  children: e.title
20
21
  }),
21
- e.description !== void 0 && /* @__PURE__ */ m("p", {
22
+ e.description !== void 0 && /* @__PURE__ */ y("p", {
22
23
  className: "x1ghz6dp x153jb6y xj0a0fe",
23
24
  children: e.description
24
25
  }),
25
26
  e.children,
26
- e.status === "pending" ? /* @__PURE__ */ h(t, { children: [/* @__PURE__ */ m(i, {
27
+ e.status === "pending" ? /* @__PURE__ */ b(r, { children: [/* @__PURE__ */ y(t, {
27
28
  variant: "solid",
28
29
  onClick: e.onApprove,
29
30
  disabled: e.disabled === !0 || e.busy !== void 0,
30
31
  pending: e.busy === "approve",
31
32
  pendingLabel: "Approving…",
32
33
  children: e.approveLabel ?? "Approve"
33
- }), /* @__PURE__ */ m(i, {
34
+ }), /* @__PURE__ */ y(t, {
34
35
  onClick: e.onDeny,
35
36
  disabled: e.disabled === !0 || e.busy !== void 0,
36
37
  pending: e.busy === "deny",
37
38
  pendingLabel: "Denying…",
38
39
  children: e.denyLabel ?? "Deny"
39
- })] }) : /* @__PURE__ */ m(r, { children: e.statusLabel })
40
+ })] }) : /* @__PURE__ */ y(o, { children: e.statusLabel })
40
41
  ]
41
42
  });
42
43
  }
43
44
  // packages/ai/src/conversation.tsx
44
- var T = u(void 0);
45
- function E({ children: e, initialPosition: t = "end", follow: n = !0 }) {
46
- let r = p(null);
47
- return /* @__PURE__ */ m(T.Provider, {
45
+ var j = h(void 0);
46
+ function M({ children: e, initialPosition: t = "end", follow: n = !0 }) {
47
+ let r = v(null);
48
+ return /* @__PURE__ */ y(j.Provider, {
48
49
  value: r,
49
- children: /* @__PURE__ */ m(x.Provider, {
50
+ children: /* @__PURE__ */ y(D.Provider, {
50
51
  autoScroll: n,
51
52
  defaultScrollPosition: t,
52
- children: /* @__PURE__ */ m(x.Root, {
53
+ children: /* @__PURE__ */ y(D.Root, {
53
54
  className: "x1n2onr6 x78zum5 xdt5ytf x5yr21d x2lwn1j xeuugli xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt",
54
55
  children: e
55
56
  })
56
57
  })
57
58
  });
58
59
  }
59
- function D({ label: e, children: t }) {
60
- let n = d(T);
61
- return /* @__PURE__ */ m(x.Viewport, {
62
- ref: n,
60
+ function N({ label: e, children: t, scrollRestorationId: n }) {
61
+ let r = g(j);
62
+ return /* @__PURE__ */ y(D.Viewport, {
63
+ ref: r,
63
64
  "aria-label": e,
65
+ "data-scroll-restoration-id": n,
64
66
  className: "x98rzlu x2lwn1j xeuugli x1odjw0f x1046ku7 x185mbhu x1ok0vyi x13qnu6 x9v5kkp x19rmrnh x1bqaal",
65
67
  children: t
66
68
  });
67
69
  }
68
- function O({ children: e, streaming: t = !1 }) {
69
- return /* @__PURE__ */ m(x.Content, {
70
+ function P({ children: e, streaming: t = !1 }) {
71
+ return /* @__PURE__ */ y(D.Content, {
70
72
  "aria-live": "polite",
71
73
  "aria-relevant": "additions",
72
74
  "aria-busy": t,
73
- className: "x78zum5 xdt5ytf x1j825kq x1c8xbx5 xeuugli",
75
+ className: "x9f619 x78zum5 xdt5ytf x1j825kq xi2fr2z x1m92p3w xvueqy4 xh8yej3 xe10afn xeuugli",
74
76
  children: e
75
77
  });
76
78
  }
77
- function k({ messageId: e, children: t }) {
78
- return /* @__PURE__ */ m(x.Item, {
79
+ function F({ messageId: e, children: t }) {
80
+ return /* @__PURE__ */ y(D.Item, {
79
81
  messageId: e,
80
82
  className: "xeuugli xj0a0fe",
81
83
  children: t
82
84
  });
83
85
  }
84
- function A({ label: e = "Jump to latest" }) {
85
- let { scrollToEnd: t } = S(), { end: n } = C(), r = d(T);
86
- return n ? /* @__PURE__ */ m("div", {
86
+ function I({ label: e = "Jump to latest" }) {
87
+ let { scrollToEnd: n } = O(), { end: r } = k(), i = g(j);
88
+ return r ? /* @__PURE__ */ y("div", {
87
89
  className: "x10l6tqk xwthv0x x1nrll8i xuuh30",
88
- children: /* @__PURE__ */ h(i, {
90
+ children: /* @__PURE__ */ b(t, {
89
91
  onClick: () => {
90
- t({ behavior: "instant" }), r?.current?.focus({ preventScroll: !0 });
92
+ n({ behavior: "instant" }), i?.current?.focus({ preventScroll: !0 });
91
93
  },
92
- children: [/* @__PURE__ */ m(g, {
94
+ children: [/* @__PURE__ */ y(x, {
93
95
  size: 16,
94
96
  "aria-hidden": !0
95
97
  }), e]
96
98
  })
97
99
  }) : null;
98
100
  }
99
- var j = {
100
- Root: E,
101
- Viewport: D,
102
- Content: O,
103
- Item: k,
104
- JumpToLatest: A
105
- }, M = {
101
+ var L = {
102
+ Root: M,
103
+ Viewport: N,
104
+ Content: P,
105
+ Item: F,
106
+ JumpToLatest: I
107
+ }, R = {
106
108
  root: {
107
109
  k1xSpc: "x78zum5",
108
110
  kXwgrk: "xdt5ytf",
109
- kOIVth: "x1n8ia3y",
111
+ kOIVth: "x1hnptsi",
110
112
  k7Eaqz: "xeuugli",
111
113
  kMwMTN: "xbixft",
112
114
  kMv6JI: "x1hz01jw",
@@ -115,10 +117,8 @@ var j = {
115
117
  $$css: !0
116
118
  },
117
119
  user: {
118
- kmVPX3: "x1c8xbx5",
119
- kMzoRj: "xmkeg23",
120
- ksu8eU: "x1y0btm7",
121
- kVAM5u: "x1ey3b81",
120
+ k8WAf4: "x1qokhjc",
121
+ kg3NbH: "x1m92p3w",
122
122
  kaIpWk: "x1ok0vyi",
123
123
  kWkggS: "x1r7kqkb",
124
124
  $$css: !0
@@ -129,57 +129,67 @@ var j = {
129
129
  k8WAf4: "xn9t2bk",
130
130
  $$css: !0
131
131
  }
132
- }, N = {
133
- user: M.user,
134
- assistant: M.assistant,
135
- system: M.system
132
+ }, z = {
133
+ user: R.user,
134
+ assistant: R.assistant,
135
+ system: R.system
136
+ }, B = {
137
+ "x-default-marker": "x-default-marker",
138
+ $$css: !0
136
139
  };
137
- function P({ author: e, children: t, id: n, kind: r = "assistant", meta: i, actions: a, attachments: o }) {
138
- return /* @__PURE__ */ h("article", {
140
+ function V({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s }) {
141
+ return /* @__PURE__ */ b("article", {
139
142
  id: n,
140
143
  "aria-label": e,
141
- ...l.props(M.root, N[r]),
144
+ ...m.props(R.root, z[r], B),
142
145
  children: [
143
- /* @__PURE__ */ h("header", {
144
- className: "x78zum5 x1pha0wt x1hnptsi x1a02dak xeuugli",
145
- children: [/* @__PURE__ */ m("span", {
146
- className: "xk50ysn xj0a0fe",
147
- children: e
148
- }), i !== void 0 && /* @__PURE__ */ m("div", {
149
- className: "x153jb6y xy8obcc xas2l8k",
150
- children: i
151
- })]
146
+ /* @__PURE__ */ b("header", {
147
+ className: "x78zum5 x6s0dn4 x1hnptsi x1a02dak xeuugli",
148
+ children: [
149
+ a !== void 0 && /* @__PURE__ */ y("span", {
150
+ className: "x3nfvp2 x2lah0s",
151
+ children: a
152
+ }),
153
+ /* @__PURE__ */ y("span", {
154
+ className: "xk50ysn xj0a0fe",
155
+ children: e
156
+ }),
157
+ i !== void 0 && /* @__PURE__ */ y("div", {
158
+ className: "x153jb6y xy8obcc xas2l8k",
159
+ children: i
160
+ })
161
+ ]
152
162
  }),
153
- /* @__PURE__ */ m("div", {
163
+ /* @__PURE__ */ y("div", {
154
164
  className: "xeuugli xj0a0fe",
155
165
  children: t
156
166
  }),
157
- o !== void 0 && /* @__PURE__ */ m("div", {
167
+ s !== void 0 && /* @__PURE__ */ y("div", {
158
168
  className: "x78zum5 x1a02dak x1qjc9v5 x1hnptsi",
159
- children: o
169
+ children: s
160
170
  }),
161
- a !== void 0 && /* @__PURE__ */ m("footer", {
162
- className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi",
163
- children: a
171
+ o !== void 0 && /* @__PURE__ */ y("footer", {
172
+ className: "x78zum5 x1a02dak x6s0dn4 xunmzkg x1hc1fzr x1ac4sdd xea5s0o xbfgl4k",
173
+ children: o
164
174
  })
165
175
  ]
166
176
  });
167
177
  }
168
- function F({ name: e, description: t, href: n, actions: r }) {
169
- return /* @__PURE__ */ h("div", {
178
+ function H({ name: e, description: t, href: n, actions: r }) {
179
+ return /* @__PURE__ */ b("div", {
170
180
  className: "x78zum5 x6s0dn4 x1n8ia3y xeuugli x193iq5w x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 x1hz01jw xtqrqnz x1778rvt",
171
181
  children: [
172
- /* @__PURE__ */ m(y, {
182
+ /* @__PURE__ */ y(w, {
173
183
  size: 16,
174
184
  "aria-hidden": !0,
175
185
  className: "x153jb6y x2lah0s"
176
186
  }),
177
- /* @__PURE__ */ h("div", {
187
+ /* @__PURE__ */ b("div", {
178
188
  className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
179
- children: [n === void 0 ? /* @__PURE__ */ m("span", { children: e }) : /* @__PURE__ */ m(a, {
189
+ children: [n === void 0 ? /* @__PURE__ */ y("span", { children: e }) : /* @__PURE__ */ y(c, {
180
190
  href: n,
181
191
  children: e
182
- }), t !== void 0 && /* @__PURE__ */ m("span", {
192
+ }), t !== void 0 && /* @__PURE__ */ y("span", {
183
193
  className: "x153jb6y xy8obcc xas2l8k",
184
194
  children: t
185
195
  })]
@@ -188,109 +198,160 @@ function F({ name: e, description: t, href: n, actions: r }) {
188
198
  ]
189
199
  });
190
200
  }
201
+ // packages/ai/src/message-action.tsx
202
+ function U(t) {
203
+ if (t.kind === "link") {
204
+ let { kind: e, label: n, ...r } = t;
205
+ return /* @__PURE__ */ y(s, {
206
+ ...r,
207
+ "aria-label": n
208
+ });
209
+ }
210
+ let { kind: n, label: r, ...i } = t;
211
+ return /* @__PURE__ */ y(e, {
212
+ ...i,
213
+ variant: "ghost",
214
+ "aria-label": r
215
+ });
216
+ }
217
+ function W(e) {
218
+ return /* @__PURE__ */ b(u.Root, { children: [/* @__PURE__ */ y(u.Trigger, { render: U(e) }), /* @__PURE__ */ y(u.Portal, { children: /* @__PURE__ */ y(u.Positioner, { children: /* @__PURE__ */ y(u.Popup, { children: e.label }) }) })] });
219
+ }
220
+ // packages/ai/src/message-boundary.tsx
221
+ function G({ label: e, children: t }) {
222
+ return /* @__PURE__ */ b(i.Root, {
223
+ className: "xeuugli x1kbiq1m xykt701 xpu655y",
224
+ children: [/* @__PURE__ */ b(i.Trigger, {
225
+ className: "xlqzeqv x1hnptsi x153jb6y xy8obcc xas2l8k xo1l8bm",
226
+ children: [/* @__PURE__ */ y(T, {
227
+ size: 14,
228
+ "aria-hidden": !0,
229
+ className: "x2lah0s"
230
+ }), /* @__PURE__ */ y("span", {
231
+ className: "xeuugli xj0a0fe",
232
+ children: e
233
+ })]
234
+ }), /* @__PURE__ */ y(i.Panel, {
235
+ className: "x153jb6y xy8obcc xas2l8k",
236
+ children: t
237
+ })]
238
+ });
239
+ }
191
240
  // packages/ai/src/prompt-input.tsx
192
- var I = { action: {
241
+ var K = { action: {
193
242
  keTefX: "xvc5jky",
194
243
  $$css: !0
195
244
  } };
196
- function L({ label: e, value: t, onValueChange: n, onSubmit: r, name: a = "prompt", placeholder: c, maxLength: l, required: u = !0, pending: d = !1, disabled: p = !1, submitDisabled: g = !1, submitLabel: v = "Send message", pendingLabel: y = "Sending…", enterBehavior: x = "newline", compact: S = !1, description: C, error: w, controls: T, attachments: E, onStop: D, stopPending: O = !1, stopLabel: k = "Stop response" }) {
197
- let A = f(), j = p || d;
198
- function M(e) {
199
- if (x !== "submit" || e.key !== "Enter" || e.repeat) return;
245
+ function q({ label: t, value: n, onValueChange: r, onSubmit: i, name: a = "prompt", placeholder: o, maxLength: s, required: c = !0, pending: l = !1, disabled: h = !1, submitDisabled: g = !1, submitLabel: v = "Send message", pendingLabel: x = "Sending…", enterBehavior: C = "newline", compact: w = !1, description: T, error: D, controls: O, attachments: k, onStop: A, stopPending: j = !1, stopLabel: M = "Stop response" }) {
246
+ let N = _(), P = h || l, F = v;
247
+ A === void 0 ? l ? F = x : C === "submit" && (F = `${v} · Enter`) : F = j ? "Stopping…" : M;
248
+ function I(e) {
249
+ if (C !== "submit" || e.key !== "Enter" || e.repeat) return;
200
250
  let t = e.altKey || e.ctrlKey || e.metaKey;
201
- e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), !j && !g && D === void 0 && e.currentTarget.form?.requestSubmit());
251
+ e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), !P && !g && A === void 0 && e.currentTarget.form?.requestSubmit());
202
252
  }
203
- function N(e) {
204
- e.preventDefault(), !j && !g && D === void 0 && r(e);
253
+ function L(e) {
254
+ e.preventDefault(), !P && !g && A === void 0 && i(e);
205
255
  }
206
- return /* @__PURE__ */ h("form", {
207
- onSubmit: N,
208
- className: "x78zum5 xdt5ytf x1n8ia3y xeuugli",
209
- children: [
210
- /* @__PURE__ */ h(o.Root, {
211
- invalid: w !== void 0,
212
- children: [
213
- /* @__PURE__ */ m(o.Label, { children: e }),
214
- /* @__PURE__ */ m(s, {
215
- compact: S,
216
- name: a,
217
- value: t,
218
- onChange: (e) => n(e.currentTarget.value),
219
- onKeyDown: M,
220
- placeholder: c,
221
- maxLength: l,
222
- required: u,
223
- disabled: p,
224
- readOnly: d,
225
- "aria-errormessage": w === void 0 ? void 0 : A
226
- }),
227
- C !== void 0 && /* @__PURE__ */ m(o.Description, { children: C }),
228
- w !== void 0 && /* @__PURE__ */ m(o.Error, {
229
- id: A,
230
- match: !0,
231
- role: "alert",
232
- children: w
233
- })
234
- ]
235
- }),
236
- E,
237
- /* @__PURE__ */ h("div", {
238
- className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1n8ia3y",
239
- children: [/* @__PURE__ */ m("div", {
240
- className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
241
- children: T
242
- }), D === void 0 ? /* @__PURE__ */ h(i, {
243
- xstyle: I.action,
244
- type: "submit",
245
- variant: "solid",
246
- disabled: p || g,
247
- pending: d,
248
- pendingLabel: y,
249
- children: [/* @__PURE__ */ m(_, {
250
- size: 16,
251
- "aria-hidden": !0
252
- }), v]
253
- }) : /* @__PURE__ */ h(i, {
254
- xstyle: I.action,
255
- type: "button",
256
- onClick: (e) => {
257
- e.preventDefault(), D();
258
- },
259
- disabled: p,
260
- pending: O,
261
- pendingLabel: "Stopping…",
262
- children: [/* @__PURE__ */ m(b, {
263
- size: 14,
264
- "aria-hidden": !0
265
- }), k]
266
- })]
267
- })
268
- ]
256
+ return /* @__PURE__ */ y("form", {
257
+ onSubmit: L,
258
+ className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4",
259
+ children: /* @__PURE__ */ b(d.Root, {
260
+ invalid: D !== void 0,
261
+ children: [
262
+ /* @__PURE__ */ y(d.Label, {
263
+ ...m.props(p.hidden),
264
+ children: t
265
+ }),
266
+ /* @__PURE__ */ b("div", {
267
+ ...{
268
+ 0: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep" },
269
+ 1: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1oddvo6" }
270
+ }[D !== void 0 | 0],
271
+ children: [
272
+ /* @__PURE__ */ y(f, {
273
+ appearance: "plain",
274
+ rows: w ? 1 : 2,
275
+ compact: w,
276
+ name: a,
277
+ value: n,
278
+ onChange: (e) => r(e.currentTarget.value),
279
+ onKeyDown: I,
280
+ placeholder: o ?? t,
281
+ maxLength: s,
282
+ required: c,
283
+ disabled: h,
284
+ readOnly: l,
285
+ "aria-errormessage": D === void 0 ? void 0 : N
286
+ }),
287
+ k,
288
+ /* @__PURE__ */ b("div", {
289
+ className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi",
290
+ children: [O !== void 0 && /* @__PURE__ */ y("div", {
291
+ className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
292
+ children: O
293
+ }), /* @__PURE__ */ b(u.Root, { children: [/* @__PURE__ */ y(u.Trigger, { render: A === void 0 ? /* @__PURE__ */ y(e, {
294
+ xstyle: K.action,
295
+ type: "submit",
296
+ variant: "solid",
297
+ "aria-label": l ? x : v,
298
+ disabled: h || g,
299
+ pending: l,
300
+ children: /* @__PURE__ */ y(S, {
301
+ size: 16,
302
+ "aria-hidden": !0
303
+ })
304
+ }) : /* @__PURE__ */ y(e, {
305
+ xstyle: K.action,
306
+ type: "button",
307
+ "aria-label": j ? "Stopping…" : M,
308
+ onClick: (e) => {
309
+ e.preventDefault(), A();
310
+ },
311
+ disabled: h,
312
+ pending: j,
313
+ children: /* @__PURE__ */ y(E, {
314
+ size: 14,
315
+ "aria-hidden": !0
316
+ })
317
+ }) }), /* @__PURE__ */ y(u.Portal, { children: /* @__PURE__ */ y(u.Positioner, { children: /* @__PURE__ */ y(u.Popup, { children: F }) }) })] })]
318
+ })
319
+ ]
320
+ }),
321
+ T !== void 0 && /* @__PURE__ */ y(d.Description, { children: T }),
322
+ D !== void 0 && /* @__PURE__ */ y(d.Error, {
323
+ id: N,
324
+ match: !0,
325
+ role: "alert",
326
+ children: D
327
+ })
328
+ ]
329
+ })
269
330
  });
270
331
  }
271
332
  // packages/ai/src/sources.tsx
272
- function R({ sources: e, label: t = "Sources" }) {
273
- return /* @__PURE__ */ h("section", {
333
+ function J({ sources: e, label: t = "Sources" }) {
334
+ return /* @__PURE__ */ b("section", {
274
335
  "aria-label": t,
275
336
  className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1hz01jw xtqrqnz x1778rvt xbixft",
276
- children: [/* @__PURE__ */ m("h3", {
337
+ children: [/* @__PURE__ */ y("h3", {
277
338
  className: "x1ghz6dp xtqrqnz x1778rvt xk50ysn",
278
339
  children: t
279
- }), /* @__PURE__ */ m("ol", {
340
+ }), /* @__PURE__ */ y("ol", {
280
341
  className: "x78zum5 xdt5ytf x1n8ia3y x1ghz6dp x1717udv x3ct3a4",
281
- children: e.map((e) => /* @__PURE__ */ h("li", {
342
+ children: e.map((e) => /* @__PURE__ */ b("li", {
282
343
  className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
283
- children: [/* @__PURE__ */ h("span", {
344
+ children: [/* @__PURE__ */ b("span", {
284
345
  className: "x3nfvp2 x1pha0wt xunmzkg x1a02dak",
285
- children: [/* @__PURE__ */ m(a, {
346
+ children: [/* @__PURE__ */ y(c, {
286
347
  href: e.href,
287
348
  children: e.title
288
- }), /* @__PURE__ */ m(v, {
349
+ }), /* @__PURE__ */ y(C, {
289
350
  size: 12,
290
351
  "aria-hidden": !0,
291
352
  className: "x2lah0s x153jb6y"
292
353
  })]
293
- }), e.description !== void 0 && /* @__PURE__ */ m("p", {
354
+ }), e.description !== void 0 && /* @__PURE__ */ y("p", {
294
355
  className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
295
356
  children: e.description
296
357
  })]
@@ -298,22 +359,22 @@ function R({ sources: e, label: t = "Sources" }) {
298
359
  })]
299
360
  });
300
361
  }
301
- function z({ source: t, label: r }) {
302
- return /* @__PURE__ */ m("span", {
362
+ function Y({ source: e, label: t }) {
363
+ return /* @__PURE__ */ y("span", {
303
364
  className: "xt0psk2 x11njtxf xss6m8b",
304
- children: /* @__PURE__ */ h(c.Root, { children: [/* @__PURE__ */ m(c.Trigger, {
305
- render: /* @__PURE__ */ m(e, {}),
306
- "aria-label": `Source ${r}: ${t.title}`,
307
- children: r
308
- }), /* @__PURE__ */ m(c.Portal, { children: /* @__PURE__ */ m(c.Positioner, {
365
+ children: /* @__PURE__ */ b(l.Root, { children: [/* @__PURE__ */ y(l.Trigger, {
366
+ render: /* @__PURE__ */ y(n, {}),
367
+ "aria-label": `Source ${t}: ${e.title}`,
368
+ children: t
369
+ }), /* @__PURE__ */ y(l.Portal, { children: /* @__PURE__ */ y(l.Positioner, {
309
370
  side: "top",
310
- children: /* @__PURE__ */ m(c.Popup, { children: /* @__PURE__ */ h(n, {
371
+ children: /* @__PURE__ */ y(l.Popup, { children: /* @__PURE__ */ b(a, {
311
372
  compact: !0,
312
373
  children: [
313
- /* @__PURE__ */ m(c.Title, { children: t.title }),
314
- t.description !== void 0 && /* @__PURE__ */ m(c.Description, { children: t.description }),
315
- /* @__PURE__ */ m(a, {
316
- href: t.href,
374
+ /* @__PURE__ */ y(l.Title, { children: e.title }),
375
+ e.description !== void 0 && /* @__PURE__ */ y(l.Description, { children: e.description }),
376
+ /* @__PURE__ */ y(c, {
377
+ href: e.href,
317
378
  children: "Open source"
318
379
  })
319
380
  ]
@@ -321,4 +382,4 @@ function z({ source: t, label: r }) {
321
382
  }) })] })
322
383
  });
323
384
  }
324
- export { w as Approval, j as Conversation, z as InlineCitation, P as Message, F as MessageAttachment, L as PromptInput, R as Sources };
385
+ export { A as Approval, L as Conversation, Y as InlineCitation, V as Message, W as MessageAction, H as MessageAttachment, G as MessageBoundary, q as PromptInput, J as Sources };