@mechane-ai/elements 0.11.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 (69) hide show
  1. package/README.md +23 -4
  2. package/dist/ai.js +167 -141
  3. package/dist/{categorical-values-FYc43JCa.js → categorical-values-DwobbjBq.js} +2 -2
  4. package/dist/{chart-frame-Bczk5sWj.js → chart-frame-DAxsgMyl.js} +4 -4
  5. package/dist/{chart-input-CbzVN76m.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 +3 -3
  9. package/dist/charts/hierarchy.js +3 -3
  10. package/dist/charts/matrix.js +2 -2
  11. package/dist/charts/timeline.js +4 -4
  12. package/dist/charts.js +1 -1
  13. package/dist/{code-block-B7xzM3tD.js → code-block-VwrOHz5j.js} +2 -2
  14. package/dist/collections.js +402 -267
  15. package/dist/content/code.js +1 -1
  16. package/dist/content/diff.js +3 -3
  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-CatGOrbo.js → content-link-Oj-MtNYi.js} +1 -1
  21. package/dist/content.js +3 -4
  22. package/dist/elements.css +141 -96
  23. package/dist/feedback.js +1 -1
  24. package/dist/forms/dates.js +22 -23
  25. package/dist/forms.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/layout.js +223 -237
  28. package/dist/navigation/commands.js +3 -3
  29. package/dist/navigation.js +26 -12
  30. package/dist/overlays.js +1 -1
  31. package/dist/packages/ai/src/index.d.ts +2 -2
  32. package/dist/packages/ai/src/prompt-input.d.ts +4 -0
  33. package/dist/packages/collections/src/collection-controls.d.ts +1 -1
  34. package/dist/packages/collections/src/data-table.d.ts +24 -6
  35. package/dist/packages/collections/src/index.d.ts +2 -2
  36. package/dist/packages/core/src/actions.d.ts +5 -8
  37. package/dist/packages/feedback/src/async-region.d.ts +15 -9
  38. package/dist/packages/feedback/src/control-placeholders.d.ts +21 -0
  39. package/dist/packages/feedback/src/index.d.ts +4 -3
  40. package/dist/packages/forms/src/field-styles.d.ts +2 -74
  41. package/dist/packages/forms/src/form-actions.d.ts +11 -0
  42. package/dist/packages/forms/src/form-controls.d.ts +1 -1
  43. package/dist/packages/forms/src/forms.d.ts +3 -3
  44. package/dist/packages/forms/src/index.d.ts +2 -0
  45. package/dist/packages/forms/src/select.d.ts +2 -2
  46. package/dist/packages/forms/src/selection-styles.d.ts +0 -13
  47. package/dist/packages/foundations/src/control-styles.d.ts +122 -0
  48. package/dist/packages/foundations/src/style-composition.d.ts +0 -2
  49. package/dist/packages/foundations/src/tokens.stylex.d.ts +13 -2
  50. package/dist/packages/layout/src/frame.stylex.d.ts +0 -1
  51. package/dist/packages/layout/src/index.d.ts +2 -0
  52. package/dist/packages/layout/src/page-content.d.ts +5 -0
  53. package/dist/packages/layout/src/page-toolbar.d.ts +1 -1
  54. package/dist/packages/layout/src/sidebar.d.ts +3 -3
  55. package/dist/packages/navigation/src/index.d.ts +2 -2
  56. package/dist/packages/navigation/src/page-navigation.d.ts +5 -0
  57. package/dist/{pierre-diff--zsiHCCB.js → pierre-diff-sUAU-xeL.js} +1 -1
  58. package/dist/{pierre-theme-D9hnHv3Z.js → pierre-theme-CBAncKdH.js} +1 -1
  59. package/dist/{pierre-tree-D47uA7lb.js → pierre-tree-Db1yaDM2.js} +3 -3
  60. package/dist/src-B0UTwpOz.js +1003 -0
  61. package/dist/{src-D05isEh_.js → src-BNlyCwOr.js} +141 -69
  62. package/dist/{src-Cs0dRc4X.js → src-CVlgjAlw.js} +1 -1
  63. package/dist/src-DMsnWyru.js +1184 -0
  64. package/dist/tokens.js +18 -8
  65. package/package.json +1 -1
  66. package/packages/foundations/src/tokens.stylex.ts +15 -5
  67. package/dist/packages/feedback/src/loading.d.ts +0 -7
  68. package/dist/src-C_heP5kL.js +0 -1264
  69. package/dist/src-DXsGTJgv.js +0 -969
package/README.md CHANGED
@@ -104,8 +104,10 @@ which view is active and when to unmount it; use this for a draft or reading pos
104
104
  `WorkbenchScroll` requires an accessible `label`; its `flush` mode leaves list insets to the table. Its
105
105
  `scrollRestorationId` identifies the actual scroll region for application-owned restoration.
106
106
 
107
- `DataTable` uses 48px rows by default and truncates text to preserve stable column and virtualization geometry. Set
108
- `rowSizing="content"` for records that need multiline cells; virtualization then measures those rows. Long content
107
+ Each `DataTable` column declares a role: `primary`, `text`, `status`, `number`, `timestamp`, or `actions`. Roles own
108
+ alignment and minimum sizing; the primary column uses available space. Headers and placeholders follow the same
109
+ geometry. The table uses 48px rows by default and truncates text to preserve stable column and virtualization geometry.
110
+ Set `rowSizing="content"` for records that need multiline cells; virtualization then measures those rows. Long content
109
111
  belongs in a detail view or a deliberately content-sized row, not behind a clipped control. Use `DataTableText` for a
110
112
  primary string and optional secondary string inside one cell; both text elements own their ellipsis. Arbitrary nested
111
113
  layouts do not inherit text truncation. Give dates and numeric values sufficient column width or explicit content
@@ -125,8 +127,10 @@ acknowledgement, and draft retention.
125
127
  record and store named choices rather than catalog indexes. Identity palettes remain separate from status colors.
126
128
 
127
129
  `MetricGrid layout="columns"` distributes supplied metrics by available container width. Its inline layout suits compact
128
- record summaries. `SettingsSection` keeps wide tables inside their scroll region; group sections with `Stack` and align
129
- form actions with `Row`.
130
+ record summaries. `PageContent` owns report insets and section gaps; keep full-width tables outside it so their cell
131
+ insets remain the only gutter. `SettingsSection` keeps wide tables inside their scroll region, and `SettingsRow` aligns
132
+ labels and controls. `FormActions` owns submission rows and their internal spacing. The enclosing section owns the gap
133
+ before and after the actions.
130
134
 
131
135
  The default theme is light, with system fonts and a compact spacing scale. Import `themeProps` from
132
136
  `@mechane-ai/elements/theme` and spread `themeProps.light` or `themeProps.dark` onto the document root. Portaled content
@@ -150,6 +154,21 @@ structural styles in the published stylesheet, so the production package injects
150
154
  initial-read failures and field validation local; retained-content refresh failures can use one notification with Retry.
151
155
  The application owns stable notification IDs and dismissal on recovery or navigation.
152
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
+
153
172
  ## Develop and release
154
173
 
155
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-D05isEh_.js";
2
- import { t as c } from "./content-link-CatGOrbo.js";
3
- import { r as l, t as u } from "./src-Cs0dRc4X.js";
4
- import { c as d, u as f } from "./src-C_heP5kL.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,51 +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, {
102
- size: "sm",
100
+ function B({ label: t, onActivate: n }) {
101
+ let { scrollToEnd: r } = A(), i = y(N);
102
+ return /* @__PURE__ */ C(e, {
103
103
  onClick: () => {
104
104
  n?.(), requestAnimationFrame(() => {
105
105
  let e = i?.current;
106
106
  e != null && (r({ behavior: "instant" }), e.focus({ preventScroll: !0 }));
107
107
  });
108
108
  },
109
- children: [/* @__PURE__ */ y(x, {
109
+ children: [/* @__PURE__ */ S(w, {
110
110
  size: 14,
111
111
  "aria-hidden": !0
112
112
  }), t]
113
113
  });
114
114
  }
115
- var R = {
116
- Root: j,
117
- Viewport: M,
118
- Content: N,
119
- Item: P,
120
- Controls: F,
121
- LatestButton: L,
122
- JumpToLatest: I
123
- }, 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 = {
124
124
  root: {
125
125
  k1xSpc: "x78zum5",
126
126
  kXwgrk: "xdt5ytf",
@@ -146,72 +146,72 @@ var R = {
146
146
  k8WAf4: "xn9t2bk",
147
147
  $$css: !0
148
148
  }
149
- }, B = {
150
- user: z.user,
151
- assistant: z.assistant,
152
- system: z.system
153
- }, V = {
149
+ }, U = {
150
+ user: H.user,
151
+ assistant: H.assistant,
152
+ system: H.system
153
+ }, W = {
154
154
  "x-default-marker": "x-default-marker",
155
155
  $$css: !0
156
156
  };
157
- function H({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s }) {
158
- 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", {
159
159
  id: n,
160
160
  "aria-label": e,
161
- ...m.props(z.root, B[r], V),
161
+ ..._.props(H.root, U[r], W),
162
162
  children: [
163
- /* @__PURE__ */ b("header", {
163
+ /* @__PURE__ */ C("header", {
164
164
  className: "x78zum5 x6s0dn4 x1hnptsi x1a02dak xeuugli",
165
165
  children: [
166
- a !== void 0 && /* @__PURE__ */ y("span", {
166
+ a !== void 0 && /* @__PURE__ */ S("span", {
167
167
  className: "x3nfvp2 x2lah0s",
168
168
  children: a
169
169
  }),
170
- /* @__PURE__ */ y("span", {
170
+ /* @__PURE__ */ S("span", {
171
171
  className: "xk4h15q xeuugli xj0a0fe",
172
172
  children: e
173
173
  }),
174
- i !== void 0 && /* @__PURE__ */ y("div", {
174
+ i !== void 0 && /* @__PURE__ */ S("div", {
175
175
  className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
176
176
  children: i
177
177
  })
178
178
  ]
179
179
  }),
180
- /* @__PURE__ */ y("div", {
180
+ /* @__PURE__ */ S("div", {
181
181
  className: "xeuugli xj0a0fe x1ytb0s6",
182
182
  children: t
183
183
  }),
184
- s !== void 0 && /* @__PURE__ */ y("div", {
184
+ s !== void 0 && /* @__PURE__ */ S("div", {
185
185
  className: "x78zum5 x1a02dak x1qjc9v5 x1hnptsi xeuugli",
186
186
  children: s
187
187
  }),
188
- o !== void 0 && /* @__PURE__ */ y("footer", {
188
+ o !== void 0 && /* @__PURE__ */ S("footer", {
189
189
  className: "x78zum5 x1a02dak x6s0dn4 xeuugli xunmzkg x1hc1fzr x1ac4sdd xea5s0o xbfgl4k",
190
190
  children: o
191
191
  })
192
192
  ]
193
193
  });
194
194
  }
195
- function U({ name: e, description: t, href: n, actions: r }) {
196
- return /* @__PURE__ */ b("div", {
195
+ function K({ name: e, description: t, href: n, actions: r }) {
196
+ return /* @__PURE__ */ C("div", {
197
197
  className: "x78zum5 x1a02dak x6s0dn4 x1n8ia3y xeuugli x193iq5w x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 x1hz01jw xtqrqnz x1778rvt xj57cvi",
198
198
  children: [
199
- /* @__PURE__ */ y(C, {
199
+ /* @__PURE__ */ S(E, {
200
200
  size: 16,
201
201
  "aria-hidden": !0,
202
202
  className: "x153jb6y x2lah0s"
203
203
  }),
204
- /* @__PURE__ */ b("div", {
204
+ /* @__PURE__ */ C("div", {
205
205
  className: "x78zum5 xdt5ytf xfko13i x1slnebi xeuugli xj0a0fe",
206
- 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, {
207
207
  href: n,
208
208
  children: e
209
- }), t !== void 0 && /* @__PURE__ */ y("span", {
209
+ }), t !== void 0 && /* @__PURE__ */ S("span", {
210
210
  className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
211
211
  children: t
212
212
  })]
213
213
  }),
214
- r !== void 0 && /* @__PURE__ */ y("div", {
214
+ r !== void 0 && /* @__PURE__ */ S("div", {
215
215
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli",
216
216
  children: r
217
217
  })
@@ -219,158 +219,184 @@ function U({ name: e, description: t, href: n, actions: r }) {
219
219
  });
220
220
  }
221
221
  // packages/ai/src/message-action.tsx
222
- function W(e) {
222
+ function q(e) {
223
223
  if (e.kind === "link") {
224
- let { kind: t, label: r, ...i } = e;
225
- return /* @__PURE__ */ y(n, {
224
+ let { kind: t, label: n, ...i } = e;
225
+ return /* @__PURE__ */ S(r, {
226
226
  ...i,
227
- "aria-label": r
227
+ "aria-label": n
228
228
  });
229
229
  }
230
- let { kind: t, label: r, ...i } = e;
231
- return /* @__PURE__ */ y(s, {
230
+ let { kind: t, label: n, ...i } = e;
231
+ return /* @__PURE__ */ S(c, {
232
232
  ...i,
233
233
  variant: "ghost",
234
- "aria-label": r
234
+ "aria-label": n
235
235
  });
236
236
  }
237
- function G(e) {
238
- 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 }) }) })] });
239
239
  }
240
240
  // packages/ai/src/message-boundary.tsx
241
- function K({ label: e, children: t }) {
242
- return /* @__PURE__ */ b(i.Root, {
241
+ function Y({ label: e, children: t }) {
242
+ return /* @__PURE__ */ C(a.Root, {
243
243
  className: "xeuugli x1kbiq1m xykt701 xpu655y",
244
- children: [/* @__PURE__ */ b(i.Trigger, {
244
+ children: [/* @__PURE__ */ C(a.Trigger, {
245
245
  className: "xlqzeqv x1hnptsi x153jb6y xy8obcc xas2l8k xj57cvi",
246
- children: [/* @__PURE__ */ y(w, {
246
+ children: [/* @__PURE__ */ S(D, {
247
247
  size: 14,
248
248
  "aria-hidden": !0,
249
249
  className: "x2lah0s"
250
- }), /* @__PURE__ */ y("span", {
250
+ }), /* @__PURE__ */ S("span", {
251
251
  className: "xeuugli xj0a0fe",
252
252
  children: e
253
253
  })]
254
- }), /* @__PURE__ */ y(i.Panel, {
254
+ }), /* @__PURE__ */ S(a.Panel, {
255
255
  className: "x153jb6y xy8obcc xas2l8k",
256
256
  children: t
257
257
  })]
258
258
  });
259
259
  }
260
260
  // packages/ai/src/prompt-input.tsx
261
- var q = { action: {
261
+ var X = { action: {
262
262
  keTefX: "xvc5jky",
263
263
  $$css: !0
264
264
  } };
265
- 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" }) {
266
- let N = _(), P = h || l, F = v;
267
- 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;
268
294
  function I(e) {
269
- if (C !== "submit" || e.key !== "Enter" || e.repeat) return;
295
+ if (y !== "submit" || e.key !== "Enter" || e.repeat) return;
270
296
  let t = e.altKey || e.ctrlKey || e.metaKey;
271
- 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());
272
298
  }
273
299
  function L(e) {
274
- e.preventDefault(), !P && !g && A === void 0 && r(e);
300
+ e.preventDefault(), !P && !f && A === void 0 && r(e);
275
301
  }
276
- return /* @__PURE__ */ y("form", {
302
+ return /* @__PURE__ */ S("form", {
277
303
  onSubmit: L,
278
304
  className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
279
- children: /* @__PURE__ */ b(d.Root, {
280
- invalid: D !== void 0,
305
+ children: /* @__PURE__ */ C(m.Root, {
306
+ invalid: E !== void 0,
281
307
  children: [
282
- /* @__PURE__ */ y(d.Label, {
283
- ...m.props(p.hidden),
308
+ /* @__PURE__ */ S(m.Label, {
309
+ ..._.props(g.hidden),
284
310
  children: e
285
311
  }),
286
- /* @__PURE__ */ b("div", {
312
+ /* @__PURE__ */ C("div", {
287
313
  ...{
288
314
  0: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep" },
289
315
  1: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1oddvo6" }
290
- }[D !== void 0 | 0],
316
+ }[E !== void 0 | 0],
291
317
  children: [
292
- /* @__PURE__ */ y(f, {
318
+ /* @__PURE__ */ S(h, {
293
319
  appearance: "plain",
294
- rows: w ? 1 : 2,
295
- compact: w,
320
+ rows: x ? 1 : 2,
321
+ compact: x,
296
322
  name: i,
297
323
  value: t,
298
324
  onChange: (e) => n(e.currentTarget.value),
299
325
  onKeyDown: I,
300
326
  placeholder: a ?? e,
301
327
  maxLength: o,
302
- required: c,
303
- disabled: h,
328
+ required: s,
329
+ disabled: u,
304
330
  readOnly: l,
305
- "aria-errormessage": D === void 0 ? void 0 : N
331
+ "aria-errormessage": E === void 0 ? void 0 : N
306
332
  }),
307
333
  k,
308
- /* @__PURE__ */ b("div", {
334
+ /* @__PURE__ */ C("div", {
309
335
  className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi",
310
- children: [O !== void 0 && /* @__PURE__ */ y("div", {
336
+ children: [D !== void 0 && /* @__PURE__ */ S("div", {
311
337
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
312
- children: O
313
- }), /* @__PURE__ */ b(u.Root, { children: [/* @__PURE__ */ y(u.Trigger, { render: A === void 0 ? /* @__PURE__ */ y(s, {
314
- 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,
315
341
  type: "submit",
316
342
  variant: "solid",
317
- "aria-label": l ? x : v,
318
- disabled: h || g,
343
+ "aria-label": l ? v : p,
344
+ disabled: u || f,
319
345
  pending: l,
320
- children: /* @__PURE__ */ y(S, {
346
+ children: /* @__PURE__ */ S(T, {
321
347
  size: 16,
322
348
  "aria-hidden": !0
323
349
  })
324
- }) : /* @__PURE__ */ y(s, {
325
- xstyle: q.action,
350
+ }) : /* @__PURE__ */ S(c, {
351
+ xstyle: X.action,
326
352
  type: "button",
327
353
  "aria-label": j ? "Stopping…" : M,
328
354
  onClick: (e) => {
329
355
  e.preventDefault(), A();
330
356
  },
331
- disabled: h,
357
+ disabled: u,
332
358
  pending: j,
333
- children: /* @__PURE__ */ y(T, {
359
+ children: /* @__PURE__ */ S(O, {
334
360
  size: 14,
335
361
  "aria-hidden": !0
336
362
  })
337
- }) }), /* @__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 }) }) })] })]
338
364
  })
339
365
  ]
340
366
  }),
341
- E !== void 0 && /* @__PURE__ */ y(d.Description, { children: E }),
342
- 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, {
343
369
  id: N,
344
370
  match: !0,
345
371
  role: "alert",
346
- children: D
372
+ children: E
347
373
  })
348
374
  ]
349
375
  })
350
376
  });
351
377
  }
352
378
  // packages/ai/src/sources.tsx
353
- function Y({ sources: e, label: t = "Sources" }) {
354
- return /* @__PURE__ */ b("section", {
379
+ function $({ sources: e, label: t = "Sources" }) {
380
+ return /* @__PURE__ */ C("section", {
355
381
  "aria-label": t,
356
382
  className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft",
357
383
  children: [
358
- /* @__PURE__ */ y("h3", {
384
+ /* @__PURE__ */ S("h3", {
359
385
  className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
360
386
  children: t
361
387
  }),
362
- e.length === 0 && /* @__PURE__ */ y("p", {
388
+ e.length === 0 && /* @__PURE__ */ S("p", {
363
389
  className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
364
390
  children: "No sources supplied."
365
391
  }),
366
- /* @__PURE__ */ y("ol", {
392
+ /* @__PURE__ */ S("ol", {
367
393
  className: "x78zum5 xdt5ytf x1n8ia3y x1ghz6dp x1717udv x3ct3a4",
368
- children: e.map((e) => /* @__PURE__ */ b("li", {
394
+ children: e.map((e) => /* @__PURE__ */ C("li", {
369
395
  className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
370
- children: [/* @__PURE__ */ y("span", { children: /* @__PURE__ */ y(c, {
396
+ children: [/* @__PURE__ */ S("span", { children: /* @__PURE__ */ S(l, {
371
397
  href: e.href,
372
398
  children: e.title
373
- }) }), e.description !== void 0 && /* @__PURE__ */ y("p", {
399
+ }) }), e.description !== void 0 && /* @__PURE__ */ S("p", {
374
400
  className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
375
401
  children: e.description
376
402
  })]
@@ -379,21 +405,21 @@ function Y({ sources: e, label: t = "Sources" }) {
379
405
  ]
380
406
  });
381
407
  }
382
- function X({ source: e, label: n }) {
383
- return /* @__PURE__ */ y("span", {
408
+ function ee({ source: e, label: n }) {
409
+ return /* @__PURE__ */ S("span", {
384
410
  className: "xt0psk2 x11njtxf xss6m8b",
385
- children: /* @__PURE__ */ b(l.Root, { children: [/* @__PURE__ */ y(l.Trigger, {
386
- render: /* @__PURE__ */ y(t, {}),
411
+ children: /* @__PURE__ */ C(u.Root, { children: [/* @__PURE__ */ S(u.Trigger, {
412
+ render: /* @__PURE__ */ S(t, {}),
387
413
  "aria-label": `Source ${n}: ${e.title}`,
388
414
  children: n
389
- }), /* @__PURE__ */ y(l.Portal, { children: /* @__PURE__ */ y(l.Positioner, {
415
+ }), /* @__PURE__ */ S(u.Portal, { children: /* @__PURE__ */ S(u.Positioner, {
390
416
  side: "top",
391
- children: /* @__PURE__ */ y(l.Popup, { children: /* @__PURE__ */ b(a, {
417
+ children: /* @__PURE__ */ S(u.Popup, { children: /* @__PURE__ */ C(o, {
392
418
  compact: !0,
393
419
  children: [
394
- /* @__PURE__ */ y(l.Title, { children: e.title }),
395
- e.description !== void 0 && /* @__PURE__ */ y(l.Description, { children: e.description }),
396
- /* @__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, {
397
423
  href: e.href,
398
424
  children: "Open source"
399
425
  })
@@ -402,4 +428,4 @@ function X({ source: e, label: n }) {
402
428
  }) })] })
403
429
  });
404
430
  }
405
- 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-Bczk5sWj.js";
2
- import { n } from "./chart-input-CbzVN76m.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-D05isEh_.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";
@@ -125,7 +125,7 @@ function f({ items: e, label: t = "Legend" }) {
125
125
  }
126
126
  function p({ label: e, selected: t = !1, onSelect: n, children: r }) {
127
127
  return n === void 0 ? /* @__PURE__ */ a("div", {
128
- className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli xaeotn9 xwu7q15 x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b",
128
+ className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r xwu7q15 x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b",
129
129
  children: r
130
130
  }) : /* @__PURE__ */ a("button", {
131
131
  type: "button",
@@ -133,8 +133,8 @@ function p({ label: e, selected: t = !1, onSelect: n, children: r }) {
133
133
  "aria-pressed": t,
134
134
  onClick: n,
135
135
  ...{
136
- 0: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli xaeotn9 xwu7q15 x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b x1ypdohk x1t137rt xzro8vx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal" },
137
- 1: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli xaeotn9 xwu7q15 x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xss6m8b x1ypdohk x1t137rt xzro8vx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1r7kqkb x1jmj9dw" }
136
+ 0: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r xwu7q15 x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b x1ypdohk x1t137rt xzro8vx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal" },
137
+ 1: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r xwu7q15 x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xss6m8b x1ypdohk x1t137rt xzro8vx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1r7kqkb xh3r7i3" }
138
138
  }[!!t | 0],
139
139
  children: r
140
140
  });
@@ -1,5 +1,5 @@
1
- import { f as e } from "./src-DXsGTJgv.js";
2
- import { r as t } from "./chart-frame-Bczk5sWj.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) {