@mechane-ai/elements 0.12.0 → 0.13.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 (48) hide show
  1. package/README.md +15 -0
  2. package/dist/ai.js +167 -140
  3. package/dist/{categorical-values-CTrHn9jH.js → categorical-values-DwobbjBq.js} +2 -2
  4. package/dist/{chart-frame-38ES6kwK.js → chart-frame-DAxsgMyl.js} +1 -1
  5. package/dist/{chart-input-C9fu7f1Q.js → chart-input-B0snxbMH.js} +2 -2
  6. package/dist/charts/cartesian.js +6 -6
  7. package/dist/charts/distribution.js +2 -2
  8. package/dist/charts/graph.js +2 -2
  9. package/dist/charts/hierarchy.js +3 -3
  10. package/dist/charts/matrix.js +2 -2
  11. package/dist/charts/timeline.js +2 -2
  12. package/dist/charts.js +1 -1
  13. package/dist/{code-block-BjV2EFZS.js → code-block-VwrOHz5j.js} +1 -1
  14. package/dist/collections.js +282 -199
  15. package/dist/content/code.js +1 -1
  16. package/dist/content/diff.js +2 -2
  17. package/dist/content/link.js +1 -1
  18. package/dist/content/markdown.js +2 -2
  19. package/dist/content/tree.js +2 -2
  20. package/dist/{content-link-C460m-O7.js → content-link-Oj-MtNYi.js} +1 -1
  21. package/dist/content.js +3 -3
  22. package/dist/elements.css +8 -16
  23. package/dist/feedback.js +1 -1
  24. package/dist/forms/dates.js +1 -1
  25. package/dist/forms.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/layout.js +1 -1
  28. package/dist/navigation/commands.js +1 -1
  29. package/dist/navigation.js +26 -12
  30. package/dist/packages/ai/src/index.d.ts +2 -2
  31. package/dist/packages/ai/src/prompt-input.d.ts +4 -0
  32. package/dist/packages/collections/src/data-table.d.ts +19 -2
  33. package/dist/packages/collections/src/index.d.ts +2 -2
  34. package/dist/packages/feedback/src/async-region.d.ts +15 -9
  35. package/dist/packages/feedback/src/control-placeholders.d.ts +8 -3
  36. package/dist/packages/feedback/src/index.d.ts +2 -3
  37. package/dist/packages/foundations/src/control-styles.d.ts +21 -0
  38. package/dist/packages/foundations/src/tokens.stylex.d.ts +5 -0
  39. package/dist/packages/navigation/src/index.d.ts +2 -2
  40. package/dist/packages/navigation/src/page-navigation.d.ts +5 -0
  41. package/dist/{pierre-tree-DKN2eGlZ.js → pierre-tree-Db1yaDM2.js} +2 -2
  42. package/dist/{src-CI6KtN2w.js → src-B0UTwpOz.js} +339 -364
  43. package/dist/{src-3gzujMhN.js → src-BNlyCwOr.js} +21 -7
  44. package/dist/{src-DOzle5d4.js → src-DMsnWyru.js} +155 -170
  45. package/dist/tokens.js +8 -4
  46. package/package.json +1 -1
  47. package/packages/foundations/src/tokens.stylex.ts +2 -0
  48. package/dist/packages/feedback/src/loading.d.ts +0 -7
package/README.md CHANGED
@@ -154,6 +154,21 @@ structural styles in the published stylesheet, so the production package injects
154
154
  initial-read failures and field validation local; retained-content refresh failures can use one notification with Retry.
155
155
  The application owns stable notification IDs and dismissal on recovery or navigation.
156
156
 
157
+ ## Loading content
158
+
159
+ Use `AsyncRegion` from `/feedback` with an explicit `pending`, `ready`, or `failed` state and a destination-specific
160
+ `placeholder`. Pending reserves that geometry immediately and reveals it after two seconds. Ready content enters in
161
+ 80ms; ready-at-mount and failed content appear immediately. Reduced motion removes the fades. There is no minimum
162
+ loading duration, and ordinary callers do not configure timing.
163
+
164
+ Wrap a page in `LoadingScope` and pass its navigation `identity` to share one clock across dependent reads. Updating the
165
+ identity resets pending presentation without remounting ready children. Keep refreshes in the ready state and retain
166
+ their content, focus, and drafts; display progress or failure alongside the last result.
167
+
168
+ Build placeholders from the same layouts as their destinations. `DataTablePlaceholder` accepts the real table's
169
+ `DataTableColumnLayout` definitions and optional decorative cells. The async region owns the loading announcement; its
170
+ placeholders must not contain interactive controls, invented records, or independent status announcements.
171
+
157
172
  ## Develop and release
158
173
 
159
174
  From `workspaces/core`:
package/dist/ai.js CHANGED
@@ -1,65 +1,66 @@
1
- import { C as e, E as t, T as n, f as r, g as i, p as a, t as o, w as s } from "./src-3gzujMhN.js";
2
- import { t as c } from "./content-link-C460m-O7.js";
3
- import { r as l, t as u } from "./src-CVlgjAlw.js";
4
- import { c as d, u as f } from "./src-DOzle5d4.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, File as C, GitBranch as w, Square as T } from "lucide-react";
10
- import { MessageScroller as E, useMessageScroller as D, useMessageScrollerScrollable as O } from "@shadcn/react/message-scroller";
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-BNlyCwOr.js";
2
+ import { t as l } from "./content-link-Oj-MtNYi.js";
3
+ import { r as u, t as d } from "./src-CVlgjAlw.js";
4
+ import { c as f, d as p } from "./src-B0UTwpOz.js";
5
+ import { c as m, u as h } from "./src-DMsnWyru.js";
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, useRef as x } from "react";
9
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
10
+ import { ArrowDown as w, ArrowUp as T, File as E, GitBranch as D, Square as O } from "lucide-react";
11
+ import { MessageScroller as k, useMessageScroller as A, useMessageScrollerScrollable as j } from "@shadcn/react/message-scroller";
11
12
  // packages/ai/src/approval.tsx
12
- function k(t) {
13
- return /* @__PURE__ */ b("section", {
13
+ function M(t) {
14
+ return /* @__PURE__ */ C("section", {
14
15
  "aria-label": t.title,
15
16
  "data-request-id": t.requestId,
16
17
  className: "x78zum5 xdt5ytf x1n8ia3y xeuugli x1c8xbx5 xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
17
18
  children: [
18
- /* @__PURE__ */ y("h3", {
19
+ /* @__PURE__ */ S("h3", {
19
20
  className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
20
21
  children: t.title
21
22
  }),
22
- t.description !== void 0 && /* @__PURE__ */ y("p", {
23
+ t.description !== void 0 && /* @__PURE__ */ S("p", {
23
24
  className: "x1ghz6dp x153jb6y xj0a0fe",
24
25
  children: t.description
25
26
  }),
26
27
  t.children,
27
- t.status === "pending" ? /* @__PURE__ */ b(r, { children: [/* @__PURE__ */ y(e, {
28
+ t.status === "pending" ? /* @__PURE__ */ C(i, { children: [/* @__PURE__ */ S(e, {
28
29
  variant: "solid",
29
30
  onClick: t.onApprove,
30
31
  disabled: t.disabled === !0 || t.busy !== void 0,
31
32
  pending: t.busy === "approve",
32
33
  pendingLabel: "Approving…",
33
34
  children: t.approveLabel ?? "Approve"
34
- }), /* @__PURE__ */ y(e, {
35
+ }), /* @__PURE__ */ S(e, {
35
36
  onClick: t.onDeny,
36
37
  disabled: t.disabled === !0 || t.busy !== void 0,
37
38
  pending: t.busy === "deny",
38
39
  pendingLabel: "Denying…",
39
40
  children: t.denyLabel ?? "Deny"
40
- })] }) : /* @__PURE__ */ y(o, { children: t.statusLabel })
41
+ })] }) : /* @__PURE__ */ S(s, { children: t.statusLabel })
41
42
  ]
42
43
  });
43
44
  }
44
45
  // packages/ai/src/conversation.tsx
45
- var A = h(void 0);
46
- function j({ children: e, initialPosition: t = "end", follow: n = !0, viewportRef: r }) {
47
- let i = v(null), a = r ?? i;
48
- return /* @__PURE__ */ y(A.Provider, {
46
+ var N = v(void 0);
47
+ function P({ children: e, initialPosition: t = "end", follow: n = !0, viewportRef: r }) {
48
+ let i = x(null), a = r ?? i;
49
+ return /* @__PURE__ */ S(N.Provider, {
49
50
  value: a,
50
- children: /* @__PURE__ */ y(E.Provider, {
51
+ children: /* @__PURE__ */ S(k.Provider, {
51
52
  autoScroll: n,
52
53
  defaultScrollPosition: t,
53
- children: /* @__PURE__ */ y(E.Root, {
54
+ children: /* @__PURE__ */ S(k.Root, {
54
55
  className: "x1n2onr6 x78zum5 xdt5ytf x5yr21d x2lwn1j xeuugli xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
55
56
  children: e
56
57
  })
57
58
  })
58
59
  });
59
60
  }
60
- function M({ label: e, children: t, scrollRestorationId: n }) {
61
- let r = g(A);
62
- return /* @__PURE__ */ y(E.Viewport, {
61
+ function F({ label: e, children: t, scrollRestorationId: n }) {
62
+ let r = y(N);
63
+ return /* @__PURE__ */ S(k.Viewport, {
63
64
  ref: r,
64
65
  "aria-label": e,
65
66
  "data-scroll-restoration-id": n,
@@ -67,8 +68,8 @@ function M({ label: e, children: t, scrollRestorationId: n }) {
67
68
  children: t
68
69
  });
69
70
  }
70
- function N({ children: e, streaming: t = !1 }) {
71
- return /* @__PURE__ */ y(E.Content, {
71
+ function I({ children: e, streaming: t = !1 }) {
72
+ return /* @__PURE__ */ S(k.Content, {
72
73
  "aria-live": "polite",
73
74
  "aria-relevant": "additions",
74
75
  "aria-busy": t,
@@ -76,50 +77,50 @@ function N({ children: e, streaming: t = !1 }) {
76
77
  children: e
77
78
  });
78
79
  }
79
- function P({ messageId: e, children: t }) {
80
- return /* @__PURE__ */ y(E.Item, {
80
+ function L({ messageId: e, children: t }) {
81
+ return /* @__PURE__ */ S(k.Item, {
81
82
  messageId: e,
82
83
  className: "xeuugli xj0a0fe",
83
84
  children: t
84
85
  });
85
86
  }
86
- function F({ children: e }) {
87
- return /* @__PURE__ */ y("div", {
87
+ function R({ children: e }) {
88
+ return /* @__PURE__ */ S("div", {
88
89
  className: "x9f619 x2lah0s xeuugli xh8yej3 xe10afn xvueqy4 xn9t2bk x1m92p3w",
89
90
  children: e
90
91
  });
91
92
  }
92
- function I({ label: e = "Jump to latest" }) {
93
- let { end: t } = O();
94
- return t ? /* @__PURE__ */ y("div", {
93
+ function z({ label: e = "Jump to latest" }) {
94
+ let { end: t } = j();
95
+ return t ? /* @__PURE__ */ S("div", {
95
96
  className: "x10l6tqk xwthv0x x1nrll8i xuuh30 x1tv4vx4 xeuugli",
96
- children: /* @__PURE__ */ y(L, { label: e })
97
+ children: /* @__PURE__ */ S(B, { label: e })
97
98
  }) : null;
98
99
  }
99
- function L({ label: t, onActivate: n }) {
100
- let { scrollToEnd: r } = D(), i = g(A);
101
- return /* @__PURE__ */ b(e, {
100
+ function B({ label: t, onActivate: n }) {
101
+ let { scrollToEnd: r } = A(), i = y(N);
102
+ return /* @__PURE__ */ C(e, {
102
103
  onClick: () => {
103
104
  n?.(), requestAnimationFrame(() => {
104
105
  let e = i?.current;
105
106
  e != null && (r({ behavior: "instant" }), e.focus({ preventScroll: !0 }));
106
107
  });
107
108
  },
108
- children: [/* @__PURE__ */ y(x, {
109
+ children: [/* @__PURE__ */ S(w, {
109
110
  size: 14,
110
111
  "aria-hidden": !0
111
112
  }), t]
112
113
  });
113
114
  }
114
- var R = {
115
- Root: j,
116
- Viewport: M,
117
- Content: N,
118
- Item: P,
119
- Controls: F,
120
- LatestButton: L,
121
- JumpToLatest: I
122
- }, z = {
115
+ var V = {
116
+ Root: P,
117
+ Viewport: F,
118
+ Content: I,
119
+ Item: L,
120
+ Controls: R,
121
+ LatestButton: B,
122
+ JumpToLatest: z
123
+ }, H = {
123
124
  root: {
124
125
  k1xSpc: "x78zum5",
125
126
  kXwgrk: "xdt5ytf",
@@ -145,72 +146,72 @@ var R = {
145
146
  k8WAf4: "xn9t2bk",
146
147
  $$css: !0
147
148
  }
148
- }, B = {
149
- user: z.user,
150
- assistant: z.assistant,
151
- system: z.system
152
- }, V = {
149
+ }, U = {
150
+ user: H.user,
151
+ assistant: H.assistant,
152
+ system: H.system
153
+ }, W = {
153
154
  "x-default-marker": "x-default-marker",
154
155
  $$css: !0
155
156
  };
156
- function H({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s }) {
157
- return /* @__PURE__ */ b("article", {
157
+ function G({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s }) {
158
+ return /* @__PURE__ */ C("article", {
158
159
  id: n,
159
160
  "aria-label": e,
160
- ...m.props(z.root, B[r], V),
161
+ ..._.props(H.root, U[r], W),
161
162
  children: [
162
- /* @__PURE__ */ b("header", {
163
+ /* @__PURE__ */ C("header", {
163
164
  className: "x78zum5 x6s0dn4 x1hnptsi x1a02dak xeuugli",
164
165
  children: [
165
- a !== void 0 && /* @__PURE__ */ y("span", {
166
+ a !== void 0 && /* @__PURE__ */ S("span", {
166
167
  className: "x3nfvp2 x2lah0s",
167
168
  children: a
168
169
  }),
169
- /* @__PURE__ */ y("span", {
170
+ /* @__PURE__ */ S("span", {
170
171
  className: "xk4h15q xeuugli xj0a0fe",
171
172
  children: e
172
173
  }),
173
- i !== void 0 && /* @__PURE__ */ y("div", {
174
+ i !== void 0 && /* @__PURE__ */ S("div", {
174
175
  className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
175
176
  children: i
176
177
  })
177
178
  ]
178
179
  }),
179
- /* @__PURE__ */ y("div", {
180
+ /* @__PURE__ */ S("div", {
180
181
  className: "xeuugli xj0a0fe x1ytb0s6",
181
182
  children: t
182
183
  }),
183
- s !== void 0 && /* @__PURE__ */ y("div", {
184
+ s !== void 0 && /* @__PURE__ */ S("div", {
184
185
  className: "x78zum5 x1a02dak x1qjc9v5 x1hnptsi xeuugli",
185
186
  children: s
186
187
  }),
187
- o !== void 0 && /* @__PURE__ */ y("footer", {
188
+ o !== void 0 && /* @__PURE__ */ S("footer", {
188
189
  className: "x78zum5 x1a02dak x6s0dn4 xeuugli xunmzkg x1hc1fzr x1ac4sdd xea5s0o xbfgl4k",
189
190
  children: o
190
191
  })
191
192
  ]
192
193
  });
193
194
  }
194
- function U({ name: e, description: t, href: n, actions: r }) {
195
- return /* @__PURE__ */ b("div", {
195
+ function K({ name: e, description: t, href: n, actions: r }) {
196
+ return /* @__PURE__ */ C("div", {
196
197
  className: "x78zum5 x1a02dak x6s0dn4 x1n8ia3y xeuugli x193iq5w x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 x1hz01jw xtqrqnz x1778rvt xj57cvi",
197
198
  children: [
198
- /* @__PURE__ */ y(C, {
199
+ /* @__PURE__ */ S(E, {
199
200
  size: 16,
200
201
  "aria-hidden": !0,
201
202
  className: "x153jb6y x2lah0s"
202
203
  }),
203
- /* @__PURE__ */ b("div", {
204
+ /* @__PURE__ */ C("div", {
204
205
  className: "x78zum5 xdt5ytf xfko13i x1slnebi xeuugli xj0a0fe",
205
- children: [n === void 0 ? /* @__PURE__ */ y("span", { children: e }) : /* @__PURE__ */ y(c, {
206
+ children: [n === void 0 ? /* @__PURE__ */ S("span", { children: e }) : /* @__PURE__ */ S(l, {
206
207
  href: n,
207
208
  children: e
208
- }), t !== void 0 && /* @__PURE__ */ y("span", {
209
+ }), t !== void 0 && /* @__PURE__ */ S("span", {
209
210
  className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
210
211
  children: t
211
212
  })]
212
213
  }),
213
- r !== void 0 && /* @__PURE__ */ y("div", {
214
+ r !== void 0 && /* @__PURE__ */ S("div", {
214
215
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli",
215
216
  children: r
216
217
  })
@@ -218,158 +219,184 @@ function U({ name: e, description: t, href: n, actions: r }) {
218
219
  });
219
220
  }
220
221
  // packages/ai/src/message-action.tsx
221
- function W(e) {
222
+ function q(e) {
222
223
  if (e.kind === "link") {
223
- let { kind: t, label: r, ...i } = e;
224
- return /* @__PURE__ */ y(n, {
224
+ let { kind: t, label: n, ...i } = e;
225
+ return /* @__PURE__ */ S(r, {
225
226
  ...i,
226
- "aria-label": r
227
+ "aria-label": n
227
228
  });
228
229
  }
229
- let { kind: t, label: r, ...i } = e;
230
- return /* @__PURE__ */ y(s, {
230
+ let { kind: t, label: n, ...i } = e;
231
+ return /* @__PURE__ */ S(c, {
231
232
  ...i,
232
233
  variant: "ghost",
233
- "aria-label": r
234
+ "aria-label": n
234
235
  });
235
236
  }
236
- function G(e) {
237
- return /* @__PURE__ */ b(u.Root, { children: [/* @__PURE__ */ y(u.Trigger, { render: W(e) }), /* @__PURE__ */ y(u.Portal, { children: /* @__PURE__ */ y(u.Positioner, { children: /* @__PURE__ */ y(u.Popup, { children: e.label }) }) })] });
237
+ function J(e) {
238
+ return /* @__PURE__ */ C(d.Root, { children: [/* @__PURE__ */ S(d.Trigger, { render: q(e) }), /* @__PURE__ */ S(d.Portal, { children: /* @__PURE__ */ S(d.Positioner, { children: /* @__PURE__ */ S(d.Popup, { children: e.label }) }) })] });
238
239
  }
239
240
  // packages/ai/src/message-boundary.tsx
240
- function K({ label: e, children: t }) {
241
- return /* @__PURE__ */ b(i.Root, {
241
+ function Y({ label: e, children: t }) {
242
+ return /* @__PURE__ */ C(a.Root, {
242
243
  className: "xeuugli x1kbiq1m xykt701 xpu655y",
243
- children: [/* @__PURE__ */ b(i.Trigger, {
244
+ children: [/* @__PURE__ */ C(a.Trigger, {
244
245
  className: "xlqzeqv x1hnptsi x153jb6y xy8obcc xas2l8k xj57cvi",
245
- children: [/* @__PURE__ */ y(w, {
246
+ children: [/* @__PURE__ */ S(D, {
246
247
  size: 14,
247
248
  "aria-hidden": !0,
248
249
  className: "x2lah0s"
249
- }), /* @__PURE__ */ y("span", {
250
+ }), /* @__PURE__ */ S("span", {
250
251
  className: "xeuugli xj0a0fe",
251
252
  children: e
252
253
  })]
253
- }), /* @__PURE__ */ y(i.Panel, {
254
+ }), /* @__PURE__ */ S(a.Panel, {
254
255
  className: "x153jb6y xy8obcc xas2l8k",
255
256
  children: t
256
257
  })]
257
258
  });
258
259
  }
259
260
  // packages/ai/src/prompt-input.tsx
260
- var q = { action: {
261
+ var X = { action: {
261
262
  keTefX: "xvc5jky",
262
263
  $$css: !0
263
264
  } };
264
- function J({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prompt", placeholder: a, maxLength: o, 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: E, error: D, controls: O, attachments: k, onStop: A, stopPending: j = !1, stopLabel: M = "Stop response" }) {
265
- let N = _(), P = h || l, F = v;
266
- A === void 0 ? l ? F = x : C === "submit" && (F = `${v} · Enter`) : F = j ? "Stopping…" : M;
265
+ function Z({ compact: e = !1 }) {
266
+ return /* @__PURE__ */ S("div", {
267
+ "aria-hidden": !0,
268
+ inert: !0,
269
+ className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
270
+ children: /* @__PURE__ */ C("div", {
271
+ className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep",
272
+ children: [/* @__PURE__ */ S("div", {
273
+ ..._.props(n.base, n.field, n.textarea, n.plainTextarea),
274
+ children: /* @__PURE__ */ S(p, {
275
+ lines: e ? 1 : 2,
276
+ width: "22ch"
277
+ })
278
+ }), /* @__PURE__ */ C("div", {
279
+ className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi",
280
+ children: [/* @__PURE__ */ S("div", {
281
+ className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd xy8obcc xas2l8k",
282
+ children: /* @__PURE__ */ S(p, { width: "8ch" })
283
+ }), /* @__PURE__ */ S(f, {
284
+ icon: !0,
285
+ xstyle: X.action
286
+ })]
287
+ })]
288
+ })
289
+ });
290
+ }
291
+ function Q({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prompt", placeholder: a, maxLength: o, required: s = !0, pending: l = !1, disabled: u = !1, submitDisabled: f = !1, submitLabel: p = "Send message", pendingLabel: v = "Sending…", enterBehavior: y = "newline", compact: x = !1, description: w, error: E, controls: D, attachments: k, onStop: A, stopPending: j = !1, stopLabel: M = "Stop response" }) {
292
+ let N = b(), P = u || l, F = p;
293
+ A === void 0 ? l ? F = v : y === "submit" && (F = `${p} · Enter`) : F = j ? "Stopping…" : M;
267
294
  function I(e) {
268
- if (C !== "submit" || e.key !== "Enter" || e.repeat) return;
295
+ if (y !== "submit" || e.key !== "Enter" || e.repeat) return;
269
296
  let t = e.altKey || e.ctrlKey || e.metaKey;
270
- e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), !P && !g && A === void 0 && e.currentTarget.form?.requestSubmit());
297
+ e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), !P && !f && A === void 0 && e.currentTarget.form?.requestSubmit());
271
298
  }
272
299
  function L(e) {
273
- e.preventDefault(), !P && !g && A === void 0 && r(e);
300
+ e.preventDefault(), !P && !f && A === void 0 && r(e);
274
301
  }
275
- return /* @__PURE__ */ y("form", {
302
+ return /* @__PURE__ */ S("form", {
276
303
  onSubmit: L,
277
304
  className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
278
- children: /* @__PURE__ */ b(d.Root, {
279
- invalid: D !== void 0,
305
+ children: /* @__PURE__ */ C(m.Root, {
306
+ invalid: E !== void 0,
280
307
  children: [
281
- /* @__PURE__ */ y(d.Label, {
282
- ...m.props(p.hidden),
308
+ /* @__PURE__ */ S(m.Label, {
309
+ ..._.props(g.hidden),
283
310
  children: e
284
311
  }),
285
- /* @__PURE__ */ b("div", {
312
+ /* @__PURE__ */ C("div", {
286
313
  ...{
287
314
  0: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep" },
288
315
  1: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1oddvo6" }
289
- }[D !== void 0 | 0],
316
+ }[E !== void 0 | 0],
290
317
  children: [
291
- /* @__PURE__ */ y(f, {
318
+ /* @__PURE__ */ S(h, {
292
319
  appearance: "plain",
293
- rows: w ? 1 : 2,
294
- compact: w,
320
+ rows: x ? 1 : 2,
321
+ compact: x,
295
322
  name: i,
296
323
  value: t,
297
324
  onChange: (e) => n(e.currentTarget.value),
298
325
  onKeyDown: I,
299
326
  placeholder: a ?? e,
300
327
  maxLength: o,
301
- required: c,
302
- disabled: h,
328
+ required: s,
329
+ disabled: u,
303
330
  readOnly: l,
304
- "aria-errormessage": D === void 0 ? void 0 : N
331
+ "aria-errormessage": E === void 0 ? void 0 : N
305
332
  }),
306
333
  k,
307
- /* @__PURE__ */ b("div", {
334
+ /* @__PURE__ */ C("div", {
308
335
  className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi",
309
- children: [O !== void 0 && /* @__PURE__ */ y("div", {
336
+ children: [D !== void 0 && /* @__PURE__ */ S("div", {
310
337
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
311
- children: O
312
- }), /* @__PURE__ */ b(u.Root, { children: [/* @__PURE__ */ y(u.Trigger, { render: A === void 0 ? /* @__PURE__ */ y(s, {
313
- xstyle: q.action,
338
+ children: D
339
+ }), /* @__PURE__ */ C(d.Root, { children: [/* @__PURE__ */ S(d.Trigger, { render: A === void 0 ? /* @__PURE__ */ S(c, {
340
+ xstyle: X.action,
314
341
  type: "submit",
315
342
  variant: "solid",
316
- "aria-label": l ? x : v,
317
- disabled: h || g,
343
+ "aria-label": l ? v : p,
344
+ disabled: u || f,
318
345
  pending: l,
319
- children: /* @__PURE__ */ y(S, {
346
+ children: /* @__PURE__ */ S(T, {
320
347
  size: 16,
321
348
  "aria-hidden": !0
322
349
  })
323
- }) : /* @__PURE__ */ y(s, {
324
- xstyle: q.action,
350
+ }) : /* @__PURE__ */ S(c, {
351
+ xstyle: X.action,
325
352
  type: "button",
326
353
  "aria-label": j ? "Stopping…" : M,
327
354
  onClick: (e) => {
328
355
  e.preventDefault(), A();
329
356
  },
330
- disabled: h,
357
+ disabled: u,
331
358
  pending: j,
332
- children: /* @__PURE__ */ y(T, {
359
+ children: /* @__PURE__ */ S(O, {
333
360
  size: 14,
334
361
  "aria-hidden": !0
335
362
  })
336
- }) }), /* @__PURE__ */ y(u.Portal, { children: /* @__PURE__ */ y(u.Positioner, { children: /* @__PURE__ */ y(u.Popup, { children: F }) }) })] })]
363
+ }) }), /* @__PURE__ */ S(d.Portal, { children: /* @__PURE__ */ S(d.Positioner, { children: /* @__PURE__ */ S(d.Popup, { children: F }) }) })] })]
337
364
  })
338
365
  ]
339
366
  }),
340
- E !== void 0 && /* @__PURE__ */ y(d.Description, { children: E }),
341
- D !== void 0 && /* @__PURE__ */ y(d.Error, {
367
+ w !== void 0 && /* @__PURE__ */ S(m.Description, { children: w }),
368
+ E !== void 0 && /* @__PURE__ */ S(m.Error, {
342
369
  id: N,
343
370
  match: !0,
344
371
  role: "alert",
345
- children: D
372
+ children: E
346
373
  })
347
374
  ]
348
375
  })
349
376
  });
350
377
  }
351
378
  // packages/ai/src/sources.tsx
352
- function Y({ sources: e, label: t = "Sources" }) {
353
- return /* @__PURE__ */ b("section", {
379
+ function $({ sources: e, label: t = "Sources" }) {
380
+ return /* @__PURE__ */ C("section", {
354
381
  "aria-label": t,
355
382
  className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft",
356
383
  children: [
357
- /* @__PURE__ */ y("h3", {
384
+ /* @__PURE__ */ S("h3", {
358
385
  className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
359
386
  children: t
360
387
  }),
361
- e.length === 0 && /* @__PURE__ */ y("p", {
388
+ e.length === 0 && /* @__PURE__ */ S("p", {
362
389
  className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
363
390
  children: "No sources supplied."
364
391
  }),
365
- /* @__PURE__ */ y("ol", {
392
+ /* @__PURE__ */ S("ol", {
366
393
  className: "x78zum5 xdt5ytf x1n8ia3y x1ghz6dp x1717udv x3ct3a4",
367
- children: e.map((e) => /* @__PURE__ */ b("li", {
394
+ children: e.map((e) => /* @__PURE__ */ C("li", {
368
395
  className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
369
- children: [/* @__PURE__ */ y("span", { children: /* @__PURE__ */ y(c, {
396
+ children: [/* @__PURE__ */ S("span", { children: /* @__PURE__ */ S(l, {
370
397
  href: e.href,
371
398
  children: e.title
372
- }) }), e.description !== void 0 && /* @__PURE__ */ y("p", {
399
+ }) }), e.description !== void 0 && /* @__PURE__ */ S("p", {
373
400
  className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
374
401
  children: e.description
375
402
  })]
@@ -378,21 +405,21 @@ function Y({ sources: e, label: t = "Sources" }) {
378
405
  ]
379
406
  });
380
407
  }
381
- function X({ source: e, label: n }) {
382
- return /* @__PURE__ */ y("span", {
408
+ function ee({ source: e, label: n }) {
409
+ return /* @__PURE__ */ S("span", {
383
410
  className: "xt0psk2 x11njtxf xss6m8b",
384
- children: /* @__PURE__ */ b(l.Root, { children: [/* @__PURE__ */ y(l.Trigger, {
385
- render: /* @__PURE__ */ y(t, {}),
411
+ children: /* @__PURE__ */ C(u.Root, { children: [/* @__PURE__ */ S(u.Trigger, {
412
+ render: /* @__PURE__ */ S(t, {}),
386
413
  "aria-label": `Source ${n}: ${e.title}`,
387
414
  children: n
388
- }), /* @__PURE__ */ y(l.Portal, { children: /* @__PURE__ */ y(l.Positioner, {
415
+ }), /* @__PURE__ */ S(u.Portal, { children: /* @__PURE__ */ S(u.Positioner, {
389
416
  side: "top",
390
- children: /* @__PURE__ */ y(l.Popup, { children: /* @__PURE__ */ b(a, {
417
+ children: /* @__PURE__ */ S(u.Popup, { children: /* @__PURE__ */ C(o, {
391
418
  compact: !0,
392
419
  children: [
393
- /* @__PURE__ */ y(l.Title, { children: e.title }),
394
- e.description !== void 0 && /* @__PURE__ */ y(l.Description, { children: e.description }),
395
- /* @__PURE__ */ y(c, {
420
+ /* @__PURE__ */ S(u.Title, { children: e.title }),
421
+ e.description !== void 0 && /* @__PURE__ */ S(u.Description, { children: e.description }),
422
+ /* @__PURE__ */ S(l, {
396
423
  href: e.href,
397
424
  children: "Open source"
398
425
  })
@@ -401,4 +428,4 @@ function X({ source: e, label: n }) {
401
428
  }) })] })
402
429
  });
403
430
  }
404
- export { k as Approval, R as Conversation, X as InlineCitation, H as Message, G as MessageAction, U as MessageAttachment, K as MessageBoundary, J as PromptInput, Y as Sources };
431
+ export { M as Approval, V as Conversation, ee as InlineCitation, G as Message, J as MessageAction, K as MessageAttachment, Y as MessageBoundary, Q as PromptInput, Z as PromptInputPlaceholder, $ as Sources };
@@ -1,5 +1,5 @@
1
- import { n as e, s as t } from "./chart-frame-38ES6kwK.js";
2
- import { n } from "./chart-input-C9fu7f1Q.js";
1
+ import { n as e, s as t } from "./chart-frame-DAxsgMyl.js";
2
+ import { n } from "./chart-input-B0snxbMH.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,4 +1,4 @@
1
- import { g as e } from "./src-3gzujMhN.js";
1
+ import { g as e } from "./src-BNlyCwOr.js";
2
2
  import { chartColors as t, colors as n } from "./tokens.js";
3
3
  import * as r from "@stylexjs/stylex";
4
4
  import { useId as i } from "react";
@@ -1,5 +1,5 @@
1
- import { m as e } from "./src-CI6KtN2w.js";
2
- import { r as t } from "./chart-frame-38ES6kwK.js";
1
+ import { m as e } from "./src-B0UTwpOz.js";
2
+ import { r as t } from "./chart-frame-DAxsgMyl.js";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  // packages/charts/src/chart-input.tsx
5
5
  function r(e) {
@@ -1,10 +1,10 @@
1
- import { u as e } from "../src-CI6KtN2w.js";
2
- import { i as t, n, r, t as i } from "../categorical-values-CTrHn9jH.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-38ES6kwK.js";
4
- import { n as f, r as p, t as m } from "../chart-input-C9fu7f1Q.js";
1
+ import { u as e } from "../src-B0UTwpOz.js";
2
+ import { i as t, n, r, t as i } from "../categorical-values-DwobbjBq.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-DAxsgMyl.js";
4
+ import { n as f, r as p, t as m } from "../chart-input-B0snxbMH.js";
5
5
  import { t as h } from "../plot-width--OgdohB5.js";
6
- import { E as g } from "../src-3gzujMhN.js";
7
- import { g as _ } from "../src-DOzle5d4.js";
6
+ import { E as g } from "../src-BNlyCwOr.js";
7
+ import { g as _ } from "../src-DMsnWyru.js";
8
8
  import { colors as v } from "../tokens.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-38ES6kwK.js";
2
- import { n as a, r as o, t as s } from "../chart-input-C9fu7f1Q.js";
1
+ import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-DAxsgMyl.js";
2
+ import { n as a, r as o, t as s } from "../chart-input-B0snxbMH.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";
@@ -1,5 +1,5 @@
1
- import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-38ES6kwK.js";
2
- import { n as a, t as o } from "../chart-input-C9fu7f1Q.js";
1
+ import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-DAxsgMyl.js";
2
+ import { n as a, t as o } from "../chart-input-B0snxbMH.js";
3
3
  import * as s from "@stylexjs/stylex";
4
4
  import { useId as c } from "react";
5
5
  import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
- import { i as e, r as t, t as n } from "../categorical-values-CTrHn9jH.js";
2
- import { o as r, r as i, s as a } from "../chart-frame-38ES6kwK.js";
3
- import { t as o } from "../chart-input-C9fu7f1Q.js";
1
+ import { i as e, r as t, t as n } from "../categorical-values-DwobbjBq.js";
2
+ import { o as r, r as i, s as a } from "../chart-frame-DAxsgMyl.js";
3
+ import { t as o } from "../chart-input-B0snxbMH.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";