@mechane-ai/elements 0.39.0 → 0.41.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 (110) hide show
  1. package/NOTICE +11 -19
  2. package/README.md +49 -25
  3. package/dist/accessibility-P89UG9-r.js +25 -0
  4. package/dist/agent.js +1 -0
  5. package/dist/ai.js +50 -44
  6. package/dist/{categorical-values-BECG-J6R.js → categorical-values-DnGR_pQx.js} +3 -3
  7. package/dist/{chart-frame-CJFnI39T.js → chart-frame-BsyI1Zc8.js} +58 -57
  8. package/dist/{chart-input-DwAobO8Y.js → chart-input-r4S3-QCT.js} +2 -2
  9. package/dist/chart-navigation-D7OkLdSx.js +119 -0
  10. package/dist/charts/cartesian.js +560 -583
  11. package/dist/charts/distribution.js +218 -218
  12. package/dist/charts/graph.js +86 -85
  13. package/dist/charts/hierarchy.js +4 -4
  14. package/dist/charts/matrix.js +148 -147
  15. package/dist/charts/timeline.js +77 -76
  16. package/dist/charts.js +2 -2
  17. package/dist/code-block-C4K1sM9O.js +255 -0
  18. package/dist/collections.js +828 -607
  19. package/dist/constants.stylex-BILvnwUk.js +84 -0
  20. package/dist/content/code.js +1 -1
  21. package/dist/content/diff.js +3 -3
  22. package/dist/content/link.js +1 -1
  23. package/dist/content/markdown.js +2 -2
  24. package/dist/content/tree.js +184 -77
  25. package/dist/{content-link-B3ObdyZY.js → content-link-CBDqSvgP.js} +1 -1
  26. package/dist/content.js +1 -1
  27. package/dist/control-styles-D3q_Qyxi.js +179 -0
  28. package/dist/csp.js +14 -1
  29. package/dist/feedback.js +1 -1
  30. package/dist/forms/dates.js +359 -245
  31. package/dist/forms-I-WMHTkr.js +139 -0
  32. package/dist/forms.js +3 -3
  33. package/dist/index.js +1 -1
  34. package/dist/layout.js +271 -241
  35. package/dist/navigation/commands.js +87 -76
  36. package/dist/{navigation-D2_sGy3C.js → navigation-CveMIuXI.js} +1 -1
  37. package/dist/navigation.js +2 -2
  38. package/dist/overlays.js +1 -1
  39. package/dist/packages/ai/src/message-action.d.ts +1 -1
  40. package/dist/packages/charts/src/chart-navigation.d.ts +18 -2
  41. package/dist/packages/charts/src/chart-surface.d.ts +23 -0
  42. package/dist/packages/charts/src/distribution/distribution-plot.d.ts +3 -2
  43. package/dist/packages/collections/src/data-table.d.ts +7 -2
  44. package/dist/packages/collections/src/index.d.ts +4 -1
  45. package/dist/packages/collections/src/query-controls.d.ts +18 -0
  46. package/dist/packages/collections/src/table-query.d.ts +64 -0
  47. package/dist/packages/collections/src/use-collection-controls.d.ts +3 -8
  48. package/dist/packages/content/src/pierre-theme.d.ts +0 -1
  49. package/dist/packages/core/src/actions.d.ts +15 -13
  50. package/dist/packages/core/src/copy-value.d.ts +3 -2
  51. package/dist/packages/core/src/disclosure.d.ts +14 -11
  52. package/dist/packages/feedback/src/notifications.d.ts +15 -15
  53. package/dist/packages/feedback/src/toast.d.ts +9 -3
  54. package/dist/packages/forms/src/combobox.d.ts +31 -41
  55. package/dist/packages/forms/src/dates/event-month.d.ts +17 -0
  56. package/dist/packages/forms/src/dates/index.d.ts +2 -0
  57. package/dist/packages/forms/src/field-styles.d.ts +0 -19
  58. package/dist/packages/forms/src/form-controls.d.ts +26 -24
  59. package/dist/packages/forms/src/forms.d.ts +17 -14
  60. package/dist/packages/forms/src/select-control.d.ts +6 -4
  61. package/dist/packages/forms/src/select.d.ts +14 -18
  62. package/dist/packages/forms/src/selection-state.d.ts +11 -0
  63. package/dist/packages/forms/src/selection-styles.d.ts +3 -0
  64. package/dist/packages/forms/src/selection.d.ts +21 -19
  65. package/dist/packages/foundations/src/agent/index.d.ts +2 -0
  66. package/dist/packages/foundations/src/control-state.d.ts +2 -3
  67. package/dist/packages/foundations/src/control-styles.d.ts +19 -0
  68. package/dist/packages/foundations/src/csp/index.d.ts +1 -1
  69. package/dist/packages/foundations/src/csp/provider.d.ts +3 -0
  70. package/dist/packages/foundations/src/style-composition.d.ts +4 -1
  71. package/dist/packages/layout/src/app-shell.d.ts +12 -1
  72. package/dist/packages/layout/src/index.d.ts +1 -1
  73. package/dist/packages/layout/src/navigation-rail.d.ts +15 -2
  74. package/dist/packages/layout/src/resizable.d.ts +2 -2
  75. package/dist/packages/layout/src/sidebar.d.ts +4 -3
  76. package/dist/packages/navigation/src/tab-styles.d.ts +1 -1
  77. package/dist/packages/navigation/src/tabs.d.ts +12 -10
  78. package/dist/packages/overlays/src/alert-dialog.d.ts +19 -13
  79. package/dist/packages/overlays/src/dialog.d.ts +39 -24
  80. package/dist/packages/overlays/src/drawer.d.ts +16 -26
  81. package/dist/packages/overlays/src/menu.d.ts +37 -44
  82. package/dist/packages/overlays/src/overlay-root.d.ts +10 -0
  83. package/dist/packages/overlays/src/popover.d.ts +11 -20
  84. package/dist/packages/overlays/src/preview.d.ts +6 -13
  85. package/dist/packages/overlays/src/tooltip.d.ts +12 -15
  86. package/dist/{pierre-diff-CaPsfQRo.js → pierre-diff-DJ3oOfPX.js} +5 -5
  87. package/dist/{src-DPRmO-JY.js → src-CNV1ewzb.js} +379 -407
  88. package/dist/{src-CSWIG_op.js → src-CQQvXi7a.js} +58 -81
  89. package/dist/{src-DWjAoOyd.js → src-D2OHco8V.js} +42 -41
  90. package/dist/src-DfOAlAd2.js +750 -0
  91. package/dist/src-na2DdkKI.js +561 -0
  92. package/dist/{src-C-Sx37kz.js → src-s3tWwnN4.js} +361 -518
  93. package/dist/styles.js +3 -0
  94. package/dist/{elements.css → styles2.css} +195 -97
  95. package/dist/tokens.js +3 -1
  96. package/dist/{tokens.stylex-CJbIDPB9.js → tokens.stylex-dF5CACEJ.js} +13 -93
  97. package/package.json +8 -9
  98. package/skills/elements-workspace/SKILL.md +12 -0
  99. package/dist/accessibility-C-aIZ1Yx.js +0 -15
  100. package/dist/chart-navigation-CBIeNtJq.js +0 -67
  101. package/dist/code-block-aC0Htt4N.js +0 -184
  102. package/dist/forms-BQQFas9g.js +0 -118
  103. package/dist/foundations.css +0 -7
  104. package/dist/packages/content/src/tree/pierre-tree.d.ts +0 -3
  105. package/dist/pierre-theme-BpNaWn1x.js +0 -126
  106. package/dist/pierre-tree-CYCRjdGG.js +0 -106
  107. package/dist/src-d7EAi61b.js +0 -617
  108. package/dist/src-nkgFDl-g.js +0 -1171
  109. package/dist/style-composition-uYlczSsB.js +0 -9
  110. package/styles.css +0 -2
package/NOTICE CHANGED
@@ -31,26 +31,18 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31
31
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32
32
  SOFTWARE.
33
33
 
34
- Bundled Sonner
34
+ Bundled Streamdown stylesheet
35
35
 
36
- MIT License
36
+ Copyright 2023 Vercel, Inc.
37
37
 
38
- Copyright (c) 2023 Emil Kowalski
38
+ Licensed under the Apache License, Version 2.0 (the "License");
39
+ you may not use this file except in compliance with the License.
40
+ You may obtain a copy of the License at
39
41
 
40
- Permission is hereby granted, free of charge, to any person obtaining a copy
41
- of this software and associated documentation files (the "Software"), to deal
42
- in the Software without restriction, including without limitation the rights
43
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
44
- copies of the Software, and to permit persons to whom the Software is
45
- furnished to do so, subject to the following conditions:
42
+ http://www.apache.org/licenses/LICENSE-2.0
46
43
 
47
- The above copyright notice and this permission notice shall be included in all
48
- copies or substantial portions of the Software.
49
-
50
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
51
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
52
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
53
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
54
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
55
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56
- SOFTWARE.
44
+ Unless required by applicable law or agreed to in writing, software
45
+ distributed under the License is distributed on an "AS IS" BASIS,
46
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
47
+ See the License for the specific language governing permissions and
48
+ limitations under the License.
package/README.md CHANGED
@@ -4,6 +4,15 @@ React components for applications, AI interfaces, and analytical graphics. Eleme
4
4
  surfaces, shared visual tokens, and accessible interactions. Mechane's Console consumes the same package. Components
5
5
  receive values and callbacks; applications own routing, data, identity, and persistence.
6
6
 
7
+ Interactive Elements use the UI SDK React primitives or compose other Elements. StyleX owns their appearance.
8
+ Applications import the Elements family that owns the interaction. When adding a control, start with the matching family
9
+ and its Storybook example. Keep focus, value changes, and dismissal with one primitive. Native links retain browser
10
+ navigation and modifier-key behavior.
11
+
12
+ Hosts that expose component actions can import `createAgent` from `@mechane-ai/elements/agent`. Mounting Elements alone
13
+ does not grant an external agent access. Keep credentials out of observable values and retain human approval for
14
+ privileged actions.
15
+
7
16
  ## Workspace implementation guides
8
17
 
9
18
  - [Workspace layout](skills/elements-workspace/SKILL.md) covers shell lifetime, full-width reports, task navigation and
@@ -34,14 +43,12 @@ export function Example() {
34
43
  return (
35
44
  <Dialog.Root>
36
45
  <Dialog.Trigger render={<Button />}>Details</Dialog.Trigger>
37
- <Dialog.Portal>
38
- <Dialog.Backdrop />
39
- <Dialog.Popup>
40
- <Dialog.Title>Details</Dialog.Title>
41
- <Dialog.Description>The application supplies this content.</Dialog.Description>
42
- <Dialog.Close render={<Button variant="outline" />}>Close</Dialog.Close>
43
- </Dialog.Popup>
44
- </Dialog.Portal>
46
+ <Dialog.Backdrop />
47
+ <Dialog.Popup>
48
+ <Dialog.Title>Details</Dialog.Title>
49
+ <Dialog.Description>The application supplies this content.</Dialog.Description>
50
+ <Dialog.Close render={<Button variant="outline" />}>Close</Dialog.Close>
51
+ </Dialog.Popup>
45
52
  </Dialog.Root>
46
53
  );
47
54
  }
@@ -62,7 +69,7 @@ Every path below belongs to `@mechane-ai/elements`. There is one package, versio
62
69
  | ---------------------- | ----------------------------------------------------------------------------------- |
63
70
  | Root | Buttons, text, surfaces, disclosure, avatars, and CopyValue. |
64
71
  | `/forms` | Fields, inputs, selection, appearance picking, file picking, and settings sections. |
65
- | `/forms/dates` | Civil-date calendars and range selection. |
72
+ | `/forms/dates` | Civil-date pickers, range selection, and a controlled event month. |
66
73
  | `/overlays` | Dialog, Drawer, Menu, Popover, Preview, Tooltip, and AlertDialog. |
67
74
  | `/feedback` | Async regions, skeletons, progress, meters, notices, empty states, and toasts. |
68
75
  | `/navigation` | Tabs, page navigation, breadcrumbs, skip links, and shortcut labels. |
@@ -84,6 +91,7 @@ Every path below belongs to `@mechane-ai/elements`. There is one package, versio
84
91
  | `/charts/hierarchy` | Treemaps. |
85
92
  | `/charts/timeline` | Waterfall intervals and instants. |
86
93
  | `/theme` | Light and dark theme props. |
94
+ | `/agent` | Optional UI SDK bridge for a host that enables component inspection and actions. |
87
95
  | `/csp` | Application-supplied content security policy configuration. |
88
96
  | `/tokens` | Compiled token references for runtime styles. |
89
97
  | `/tokens.stylex` | Variable definitions for StyleX authoring and themes. |
@@ -103,7 +111,7 @@ before adding a surface. Stack related page sections. `PageContent` insets conte
103
111
  with full-width finite rows, and `CollectionLayout` gives a primary collection its available height. Dialogs, inspectors
104
112
  and structured message Cards retain their own containing width. `Panel` bounds an independent unit.
105
113
 
106
- Use Base UI's `render` composition and named variants for appearance. Native attributes, events, and refs remain
114
+ Use Elements' `render` composition and named variants for appearance. Native attributes, events, and refs remain
107
115
  available. Typed `xstyle` inputs permit placement styles compiled by the application's StyleX setup. Applications own
108
116
  asynchronous work and pass its pending, success, or failure state to controls.
109
117
 
@@ -114,11 +122,12 @@ Detail titles wrap; list metadata truncates. Sidebar items share contiguous hit
114
122
  `NavigationRail` in its `rail` slot for persistent area links. It occupies 48px of the 240px navigation budget beside a
115
123
  192px contextual sidebar. Collapsing hides the contextual sidebar and retains the rail. The phone drawer renders those
116
124
  area links with visible labels above its pages. Its width, toolbar height, and footer cell share the same 48px geometry.
117
- Put a `NavigationRailMenu` in `railFooter` for a pinned icon menu beside the desktop rail and above the phone drawer's
118
- bottom-left control. Applications supply the menu content and actions. `Avatar` supports `shape="circle"` for an
119
- initials or photo trigger. Applications supply selection, URLs, native link handlers, and action callbacks. Omit the
120
- rail for a sidebar that collapses to page icons. `SidebarFooter layout="navigation"` holds persistent controls in the
121
- contextual sidebar and reserves their intrinsic height while its pages scroll independently.
125
+ Use `railFooter={{ navigation, menu }}` to group persistent links such as Settings with the account menu. The shell
126
+ supplies the same gap between these targets as between the primary links. Supply menu content and actions in `menu`.
127
+ `Avatar` supports `shape="circle"` for an initials or photo trigger. Applications supply selection, URLs, native link
128
+ handlers, and action callbacks. Omit the rail for a sidebar that collapses to page icons.
129
+ `SidebarFooter layout="navigation"` holds persistent controls in the contextual sidebar and reserves their intrinsic
130
+ height while its pages scroll independently.
122
131
 
123
132
  Use `PageLayout` for a screen. Give it the page title, actions, and optional `navigation` with the destination links,
124
133
  selected ID, and view actions. The toolbar and navigation keep their natural height above the scrolling body. Wrap each
@@ -148,6 +157,22 @@ supplied selection; Escape dismisses details while retaining the cursor.
148
157
  supplies the accessible name with the panel content and owns opening, closing, and focus restoration. The inspector
149
158
  replaces the main column at compact widths while keeping that column mounted.
150
159
 
160
+ Every `DataTable` requires a `query`. For a finite list, supply the complete authorized rows and declare how users can
161
+ search and filter them.
162
+
163
+ ```tsx
164
+ query={{
165
+ mode: 'local',
166
+ search: (item) => item.name,
167
+ filters: [{ id: 'status', label: 'Status', value: (item) => item.status }],
168
+ }}
169
+ ```
170
+
171
+ For paged records use `mode: 'controlled'` with query values and callbacks. Apply search and filters before server
172
+ pagination. When an enclosing collection already supplies the controls, declare its capabilities with `TableQueryFrame`
173
+ and use `mode: 'frame'` on its table. A static table, or an individual capability that does not apply, requires a
174
+ reason.
175
+
151
176
  Each `DataTable` column declares a role: `primary`, `text`, `status`, `number`, `timestamp`, or `actions`. Roles own
152
177
  alignment and minimum sizing; the primary column uses available space. Headers and placeholders follow the same
153
178
  geometry. The table uses 48px rows by default and truncates text to preserve stable column and virtualization geometry.
@@ -232,18 +257,17 @@ compiler. Consumer styles can then use `[conditions.coarsePointer]` from that en
232
257
  `stylex.createTheme(colors, ...)` with `colors` from `/tokens.stylex`.
233
258
 
234
259
  When an application's Content Security Policy requires nonces, wrap its component tree in `CSPProvider` from
235
- `@mechane-ai/elements/csp` and pass the same request nonce used in its policy. Preserve that nonce during hydration.
236
- This is [Base UI's CSP provider](https://base-ui.com/react/utils/csp-provider); it authorizes component style tags such
237
- as Select's scrollbar rules. The application owns nonce generation and its security policy.
260
+ `@mechane-ai/elements/csp` and pass the same request nonce used in its policy. Preserve that nonce during hydration. The
261
+ application owns nonce generation and its security policy.
238
262
 
239
263
  Mount one `Toaster` from `/feedback` and call its exported `toast` API with a plain-text object such as
240
- `toast.error({ title: 'Could not save' })`. Elements includes Sonner's structural styles in the published stylesheet, so
241
- the production package injects no additional toast style tag. Keep initial-read failures and field validation local;
242
- retained-content refresh failures can use one notification with Retry. Loading updates require a stable ID, and
243
- dismissal names its ID through `toast.dismiss({ id })`. Actions and loading notices persist. Keep titles, descriptions
244
- and action labels brief; longer explanations belong in the relevant view. Shared toasts bound visible text and wrap
245
- actions without narrowing the message. Opening a page or discovering background status does not warrant a notification.
246
- The application owns stable IDs and dismissal on recovery or navigation.
264
+ `toast.error({ title: 'Could not save' })`. The feedback family owns UI SDK toast behavior and Elements styling. Keep
265
+ initial-read failures and field validation local; retained-content refresh failures can use one notification with Retry.
266
+ Loading updates require a stable ID, and dismissal names its ID through `toast.dismiss({ id })`. Actions and loading
267
+ notices persist. Keep titles, descriptions and action labels brief; longer explanations belong in the relevant view.
268
+ Shared toasts bound visible text and wrap actions without narrowing the message. Opening a page or discovering
269
+ background status does not warrant a notification. The application owns stable IDs and dismissal on recovery or
270
+ navigation.
247
271
 
248
272
  ## Loading content
249
273
 
@@ -0,0 +1,25 @@
1
+ import "@stylexjs/stylex";
2
+ // packages/foundations/src/style-composition.ts
3
+ function e({ className: e, style: t, styles: n }) {
4
+ return {
5
+ className: (t) => [n.className, typeof e == "function" ? e(t) : e].filter(Boolean).join(" "),
6
+ style: (e) => ({
7
+ ...n.style,
8
+ ...typeof t == "function" ? t(e) : t
9
+ })
10
+ };
11
+ }
12
+ // packages/foundations/src/accessibility.ts
13
+ var t = { hidden: {
14
+ kVAEAm: "x10l6tqk",
15
+ kzqmXN: "x1i1rx1s",
16
+ kZKoxP: "xjm9jq1",
17
+ kmVPX3: "x1717udv",
18
+ kogj98: "xkdpibf",
19
+ kVQacm: "xb3r6kr",
20
+ kz4h6p: "x1hyvwdk",
21
+ khDVqt: "xuxw1ft",
22
+ kMzoRj: "xc342km",
23
+ $$css: !0
24
+ } };
25
+ export { e as n, t };
package/dist/agent.js ADDED
@@ -0,0 +1 @@
1
+ export { createAgent } from "@ui-sdk/react/agent";
package/dist/ai.js CHANGED
@@ -1,11 +1,12 @@
1
- import { D as e, E as t, T as n, _ as r, i, j as a, m as o, p as s, t as c, w as l } from "./src-C-Sx37kz.js";
2
- import { t as u } from "./code-block-aC0Htt4N.js";
3
- import { a as d } from "./src-DWjAoOyd.js";
4
- import { t as f } from "./content-link-B3ObdyZY.js";
5
- import { r as p, t as m } from "./src-d7EAi61b.js";
6
- import { f as h, l as g } from "./src-nkgFDl-g.js";
7
- import { r as ee, t as _ } from "./forms-BQQFas9g.js";
8
- import { t as v } from "./accessibility-C-aIZ1Yx.js";
1
+ import { D as e, E as t, T as n, _ as r, i, m as a, p as o, t as s, w as c } from "./src-s3tWwnN4.js";
2
+ import { t as l } from "./code-block-C4K1sM9O.js";
3
+ import { a as u } from "./src-D2OHco8V.js";
4
+ import { t as d } from "./content-link-CBDqSvgP.js";
5
+ import { r as f, t as p } from "./src-na2DdkKI.js";
6
+ import { f as m, l as h } from "./src-DfOAlAd2.js";
7
+ import { i as g, t as _ } from "./forms-I-WMHTkr.js";
8
+ import { t as ee } from "./accessibility-P89UG9-r.js";
9
+ import { r as v } from "./control-styles-D3q_Qyxi.js";
9
10
  import { t as y } from "./visible-motion-1GcUaEi4.js";
10
11
  import * as b from "@stylexjs/stylex";
11
12
  import { createContext as x, useContext as S, useEffect as C, useId as w, useLayoutEffect as T, useRef as E, useState as D } from "react";
@@ -28,29 +29,31 @@ function R(e) {
28
29
  children: e.description
29
30
  }),
30
31
  e.children,
31
- e.status === "pending" ? /* @__PURE__ */ k(s, { children: [/* @__PURE__ */ O(l, {
32
+ e.status === "pending" ? /* @__PURE__ */ k(o, { children: [/* @__PURE__ */ O(c, {
32
33
  variant: "solid",
34
+ "data-agent-confirm": `Approve ${e.title}?`,
33
35
  onClick: e.onApprove,
34
36
  disabled: e.isDisabled === !0 || e.busy !== void 0,
35
37
  isPending: e.busy === "approve",
36
38
  pendingLabel: "Approving…",
37
39
  children: e.approveLabel ?? "Approve"
38
- }), /* @__PURE__ */ O(l, {
40
+ }), /* @__PURE__ */ O(c, {
41
+ "data-agent-confirm": `Deny ${e.title}?`,
39
42
  onClick: e.onDeny,
40
43
  disabled: e.isDisabled === !0 || e.busy !== void 0,
41
44
  isPending: e.busy === "deny",
42
45
  pendingLabel: "Denying…",
43
46
  children: e.denyLabel ?? "Deny"
44
- })] }) : /* @__PURE__ */ O(c, { children: e.statusLabel })
47
+ })] }) : /* @__PURE__ */ O(s, { children: e.statusLabel })
45
48
  ]
46
49
  });
47
50
  }
48
51
  // packages/ai/src/command-details.tsx
49
- function z({ command: e, output: t, commandNotice: n, outputNotice: r, outputLanguage: a, isRunning: s = !1 }) {
50
- return /* @__PURE__ */ k(o, {
52
+ function z({ command: e, output: t, commandNotice: n, outputNotice: r, outputLanguage: o, isRunning: s = !1 }) {
53
+ return /* @__PURE__ */ k(a, {
51
54
  isCompact: !0,
52
55
  children: [
53
- e === "" && n !== void 0 ? /* @__PURE__ */ O(i, { children: "Command omitted from this preview." }) : e === void 0 ? /* @__PURE__ */ O(i, { children: s ? "Preparing command…" : "Command unavailable." }) : /* @__PURE__ */ O(u, {
56
+ e === "" && n !== void 0 ? /* @__PURE__ */ O(i, { children: "Command omitted from this preview." }) : e === void 0 ? /* @__PURE__ */ O(i, { children: s ? "Preparing command…" : "Command unavailable." }) : /* @__PURE__ */ O(l, {
54
57
  code: e,
55
58
  language: "bash",
56
59
  filename: "Command",
@@ -60,14 +63,14 @@ function z({ command: e, output: t, commandNotice: n, outputNotice: r, outputLan
60
63
  maxHeight: 240
61
64
  }),
62
65
  n !== void 0 && /* @__PURE__ */ O(i, { children: n }),
63
- t === void 0 || t.length === 0 ? /* @__PURE__ */ O(i, { children: s ? "Waiting for output…" : t === void 0 ? "Output unavailable." : r === void 0 ? "No output." : "Output omitted from this preview." }) : a === void 0 ? /* @__PURE__ */ O(d, {
66
+ t === void 0 || t.length === 0 ? /* @__PURE__ */ O(i, { children: s ? "Waiting for output…" : t === void 0 ? "Output unavailable." : r === void 0 ? "No output." : "Output omitted from this preview." }) : o === void 0 ? /* @__PURE__ */ O(u, {
64
67
  output: t,
65
68
  label: "Output",
66
69
  variant: "embedded",
67
70
  isRunning: s
68
- }) : /* @__PURE__ */ O(u, {
71
+ }) : /* @__PURE__ */ O(l, {
69
72
  code: t,
70
- language: a,
73
+ language: o,
71
74
  filename: "Output",
72
75
  variant: "embedded",
73
76
  showLineNumbers: !1,
@@ -188,7 +191,7 @@ function Y({ label: e = "Jump to latest" }) {
188
191
  }
189
192
  function X({ label: e, onActivate: t }) {
190
193
  let { scrollToEnd: n } = I(), r = S(U);
191
- return /* @__PURE__ */ k(l, {
194
+ return /* @__PURE__ */ k(c, {
192
195
  onClick: () => {
193
196
  t?.(), requestAnimationFrame(() => {
194
197
  let e = r?.current;
@@ -311,7 +314,7 @@ function oe({ name: e, description: t, href: n, actions: r }) {
311
314
  }),
312
315
  /* @__PURE__ */ k("div", {
313
316
  className: "x78zum5 xdt5ytf xfko13i x1slnebi xeuugli xj0a0fe",
314
- children: [n === void 0 ? /* @__PURE__ */ O("span", { children: e }) : /* @__PURE__ */ O(f, {
317
+ children: [n === void 0 ? /* @__PURE__ */ O("span", { children: e }) : /* @__PURE__ */ O(d, {
315
318
  href: n,
316
319
  children: e
317
320
  }), t !== void 0 && /* @__PURE__ */ O("span", {
@@ -343,7 +346,7 @@ function se(e) {
343
346
  });
344
347
  }
345
348
  function ce(e) {
346
- return /* @__PURE__ */ k(m.Root, { children: [/* @__PURE__ */ O(m.Trigger, { render: se(e) }), /* @__PURE__ */ O(m.Portal, { children: /* @__PURE__ */ O(m.Positioner, { children: /* @__PURE__ */ O(m.Popup, { children: e.label }) }) })] });
349
+ return /* @__PURE__ */ k(p.Root, { children: [/* @__PURE__ */ O(p.Trigger, { render: se(e) }), /* @__PURE__ */ O(p.Popup, { children: e.label })] });
347
350
  }
348
351
  // packages/ai/src/message-boundary.tsx
349
352
  function le({ label: e, children: t }) {
@@ -385,8 +388,8 @@ function ue({ isCompact: e = !1 }) {
385
388
  children: /* @__PURE__ */ k("div", {
386
389
  className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep",
387
390
  children: [/* @__PURE__ */ O("div", {
388
- ...b.props(a.base, a.field, a.textarea, a.plainTextarea),
389
- children: /* @__PURE__ */ O(h, {
391
+ ...b.props(v.base, v.field, v.textarea, v.plainTextarea),
392
+ children: /* @__PURE__ */ O(m, {
390
393
  lines: e ? 1 : 2,
391
394
  width: "22ch"
392
395
  })
@@ -394,8 +397,8 @@ function ue({ isCompact: e = !1 }) {
394
397
  className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi",
395
398
  children: [/* @__PURE__ */ O("div", {
396
399
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd xy8obcc xas2l8k",
397
- children: /* @__PURE__ */ O(h, { width: "8ch" })
398
- }), /* @__PURE__ */ O(g, {
400
+ children: /* @__PURE__ */ O(m, { width: "8ch" })
401
+ }), /* @__PURE__ */ O(h, {
399
402
  isIconOnly: !0,
400
403
  xstyle: $.action
401
404
  })]
@@ -403,9 +406,9 @@ function ue({ isCompact: e = !1 }) {
403
406
  })
404
407
  });
405
408
  }
406
- function de({ label: e, value: t, onValueChange: r, onSubmit: i, name: a = "prompt", placeholder: o, maxLength: s, required: c = !0, isPending: l = !1, disabled: u = !1, isSubmitDisabled: d = !1, submitLabel: f = "Send message", pendingLabel: p = "Sending…", enterBehavior: h = "newline", isCompact: g = !1, description: y, error: x, controls: S, attachments: C, onStop: T, isStopPending: E = !1, stopLabel: D = "Stop response" }) {
407
- let A = w(), M = u, N = g && C === void 0 && S === void 0, P = !M && !l && !d, F = f;
408
- T === void 0 ? l ? F = p : h === "submit" && (F = `${f} · Enter`) : F = E ? "Stopping…" : D;
409
+ function de({ label: e, value: t, onValueChange: r, onSubmit: i, name: a = "prompt", placeholder: o, maxLength: s, required: c = !0, isPending: l = !1, disabled: u = !1, isSubmitDisabled: d = !1, submitLabel: f = "Send message", pendingLabel: m = "Sending…", enterBehavior: h = "newline", isCompact: v = !1, description: y, error: x, controls: S, attachments: C, onStop: T, isStopPending: E = !1, stopLabel: D = "Stop response" }) {
410
+ let A = w(), M = u, N = v && C === void 0 && S === void 0, P = !M && !l && !d, F = f;
411
+ T === void 0 ? l ? F = m : h === "submit" && (F = `${f} · Enter`) : F = E ? "Stopping…" : D;
409
412
  function I(e) {
410
413
  if (h !== "submit" || e.key !== "Enter" || e.repeat) return;
411
414
  let t = e.altKey || e.ctrlKey || e.metaKey;
@@ -421,7 +424,7 @@ function de({ label: e, value: t, onValueChange: r, onSubmit: i, name: a = "prom
421
424
  invalid: x !== void 0,
422
425
  children: [
423
426
  /* @__PURE__ */ O(_.Label, {
424
- ...b.props(v.hidden),
427
+ ...b.props(ee.hidden),
425
428
  children: e
426
429
  }),
427
430
  /* @__PURE__ */ k("div", {
@@ -432,15 +435,16 @@ function de({ label: e, value: t, onValueChange: r, onSubmit: i, name: a = "prom
432
435
  3: { className: "x78zum5 x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1q0g3np xuk3077 xn9t2bk x1oddvo6" }
433
436
  }[!!N << 1 | x !== void 0],
434
437
  children: [
435
- /* @__PURE__ */ O(ee, {
438
+ /* @__PURE__ */ O(g, {
439
+ isSensitive: !0,
436
440
  appearance: "plain",
437
- rows: g ? 1 : 2,
438
- isCompact: g,
441
+ rows: v ? 1 : 2,
442
+ isCompact: v,
439
443
  shouldGrow: N,
440
444
  xstyle: N ? $.inlineInput : void 0,
441
445
  name: a,
442
446
  value: t,
443
- onChange: (e) => r(e.currentTarget.value),
447
+ onValueChange: r,
444
448
  onKeyDown: I,
445
449
  placeholder: o ?? e,
446
450
  maxLength: s,
@@ -457,11 +461,12 @@ function de({ label: e, value: t, onValueChange: r, onSubmit: i, name: a = "prom
457
461
  children: [S !== void 0 && /* @__PURE__ */ O("div", {
458
462
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
459
463
  children: S
460
- }), /* @__PURE__ */ k(m.Root, { children: [/* @__PURE__ */ O(m.Trigger, { render: T === void 0 ? /* @__PURE__ */ O(n, {
464
+ }), /* @__PURE__ */ k(p.Root, { children: [/* @__PURE__ */ O(p.Trigger, { render: T === void 0 ? /* @__PURE__ */ O(n, {
461
465
  xstyle: $.action,
462
466
  type: "submit",
467
+ "data-agent-confirm": f,
463
468
  variant: "solid",
464
- "aria-label": l ? p : f,
469
+ "aria-label": l ? m : f,
465
470
  disabled: u || d,
466
471
  isPending: l,
467
472
  children: /* @__PURE__ */ O(j, {
@@ -471,6 +476,7 @@ function de({ label: e, value: t, onValueChange: r, onSubmit: i, name: a = "prom
471
476
  }) : /* @__PURE__ */ O(n, {
472
477
  xstyle: $.action,
473
478
  type: "button",
479
+ "data-agent-confirm": D,
474
480
  "aria-label": E ? "Stopping…" : D,
475
481
  onClick: (e) => {
476
482
  e.preventDefault(), T();
@@ -481,7 +487,7 @@ function de({ label: e, value: t, onValueChange: r, onSubmit: i, name: a = "prom
481
487
  size: 14,
482
488
  "aria-hidden": !0
483
489
  })
484
- }) }), /* @__PURE__ */ O(m.Portal, { children: /* @__PURE__ */ O(m.Positioner, { children: /* @__PURE__ */ O(m.Popup, { children: F }) }) })] })]
490
+ }) }), /* @__PURE__ */ O(p.Popup, { children: F })] })]
485
491
  })
486
492
  ]
487
493
  }),
@@ -535,7 +541,7 @@ function pe({ sources: e, label: t = "Sources" }) {
535
541
  className: "x78zum5 xdt5ytf x1n8ia3y x1ghz6dp x1717udv x3ct3a4",
536
542
  children: e.map((e) => /* @__PURE__ */ k("li", {
537
543
  className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
538
- children: [/* @__PURE__ */ O("span", { children: /* @__PURE__ */ O(f, {
544
+ children: [/* @__PURE__ */ O("span", { children: /* @__PURE__ */ O(d, {
539
545
  href: e.href,
540
546
  children: e.title
541
547
  }) }), e.description !== void 0 && /* @__PURE__ */ O("p", {
@@ -550,24 +556,24 @@ function pe({ sources: e, label: t = "Sources" }) {
550
556
  function me({ source: t, label: n }) {
551
557
  return /* @__PURE__ */ O("span", {
552
558
  className: "xt0psk2 x11njtxf xss6m8b",
553
- children: /* @__PURE__ */ k(p.Root, { children: [/* @__PURE__ */ O(p.Trigger, {
559
+ children: /* @__PURE__ */ k(f.Root, { children: [/* @__PURE__ */ O(f.Trigger, {
554
560
  render: /* @__PURE__ */ O(e, {}),
555
561
  "aria-label": `Source ${n}: ${t.title}`,
556
562
  children: n
557
- }), /* @__PURE__ */ O(p.Portal, { children: /* @__PURE__ */ O(p.Positioner, {
563
+ }), /* @__PURE__ */ O(f.Popup, {
558
564
  side: "top",
559
- children: /* @__PURE__ */ O(p.Popup, { children: /* @__PURE__ */ k(o, {
565
+ children: /* @__PURE__ */ k(a, {
560
566
  isCompact: !0,
561
567
  children: [
562
- /* @__PURE__ */ O(p.Title, { children: t.title }),
563
- t.description !== void 0 && /* @__PURE__ */ O(p.Description, { children: t.description }),
564
- /* @__PURE__ */ O(f, {
568
+ /* @__PURE__ */ O(f.Title, { children: t.title }),
569
+ t.description !== void 0 && /* @__PURE__ */ O(f.Description, { children: t.description }),
570
+ /* @__PURE__ */ O(d, {
565
571
  href: t.href,
566
572
  children: "Open source"
567
573
  })
568
574
  ]
569
- }) })
570
- }) })] })
575
+ })
576
+ })] })
571
577
  });
572
578
  }
573
579
  export { R as Approval, H as CommandActivity, z as CommandDetails, Z as Conversation, me as InlineCitation, ae as Message, ce as MessageAction, oe as MessageAttachment, le as MessageBoundary, de as PromptInput, ue as PromptInputPlaceholder, fe as ReplyIndicator, pe as Sources };
@@ -1,6 +1,6 @@
1
- import { c as e } from "./src-nkgFDl-g.js";
2
- import { t } from "./chart-frame-CJFnI39T.js";
3
- import { n } from "./chart-input-DwAobO8Y.js";
1
+ import { c as e } from "./src-DfOAlAd2.js";
2
+ import { t } from "./chart-frame-BsyI1Zc8.js";
3
+ import { n } from "./chart-input-r4S3-QCT.js";
4
4
  import * as r from "@stylexjs/stylex";
5
5
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
6
  // packages/charts/src/categorical-values.tsx