@mechane-ai/elements 0.9.0 → 0.11.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 (78) hide show
  1. package/NOTICE +24 -0
  2. package/README.md +7 -1
  3. package/dist/ai.js +153 -133
  4. package/dist/{categorical-values-DYRiw5Qd.js → categorical-values-FYc43JCa.js} +4 -4
  5. package/dist/{chart-frame-RL1hCWBC.js → chart-frame-Bczk5sWj.js} +22 -14
  6. package/dist/{chart-input-Bm3ot1yD.js → chart-input-CbzVN76m.js} +2 -2
  7. package/dist/charts/cartesian.js +529 -450
  8. package/dist/charts/distribution.js +302 -261
  9. package/dist/charts/graph.js +137 -103
  10. package/dist/charts/hierarchy.js +7 -7
  11. package/dist/charts/matrix.js +187 -174
  12. package/dist/charts/timeline.js +119 -92
  13. package/dist/charts.js +1 -1
  14. package/dist/code-block-B7xzM3tD.js +180 -0
  15. package/dist/collections.js +319 -242
  16. package/dist/content/code.js +1 -1
  17. package/dist/content/diff.js +81 -63
  18. package/dist/content/link.js +1 -1
  19. package/dist/content/markdown.js +115 -96
  20. package/dist/content/tree.js +43 -38
  21. package/dist/{content-link-BrPrpBof.js → content-link-CatGOrbo.js} +6 -2
  22. package/dist/content.js +172 -153
  23. package/dist/{assets/stylex.css → elements.css} +585 -229
  24. package/dist/feedback.js +1 -1
  25. package/dist/forms/dates.js +25 -25
  26. package/dist/forms.js +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/layout.js +239 -192
  29. package/dist/navigation/commands.js +45 -42
  30. package/dist/{navigation-yxK3iQXo.js → navigation-D2_sGy3C.js} +2 -2
  31. package/dist/navigation.js +10 -10
  32. package/dist/overlays.js +1 -1
  33. package/dist/packages/ai/src/conversation.d.ts +14 -2
  34. package/dist/packages/ai/src/index.d.ts +1 -1
  35. package/dist/packages/charts/src/cartesian/bar-chart.d.ts +5 -0
  36. package/dist/packages/charts/src/cartesian/index.d.ts +2 -2
  37. package/dist/packages/charts/src/chart-frame.d.ts +3 -0
  38. package/dist/packages/charts/src/chart-theme.d.ts +2 -1
  39. package/dist/packages/charts/src/distribution/distribution-plot.d.ts +22 -2
  40. package/dist/packages/charts/src/timeline/waterfall.d.ts +3 -2
  41. package/dist/packages/collections/src/collection-scroll.d.ts +2 -1
  42. package/dist/packages/collections/src/index.d.ts +1 -0
  43. package/dist/packages/collections/src/inspector.d.ts +6 -3
  44. package/dist/packages/content/src/diff/pierre-diff.d.ts +2 -1
  45. package/dist/packages/content/src/viewer-styles.d.ts +64 -0
  46. package/dist/packages/core/src/agent-avatar-glyphs.d.ts +1 -1
  47. package/dist/packages/core/src/index.d.ts +1 -1
  48. package/dist/packages/core/src/surfaces.d.ts +5 -0
  49. package/dist/packages/feedback/src/index.d.ts +4 -1
  50. package/dist/packages/feedback/src/toast.d.ts +5 -27
  51. package/dist/packages/forms/src/field-styles.d.ts +9 -0
  52. package/dist/packages/forms/src/selection-styles.d.ts +18 -2
  53. package/dist/packages/foundations/src/overlay-styles.d.ts +3 -1
  54. package/dist/packages/foundations/src/popup-styles.d.ts +7 -0
  55. package/dist/packages/foundations/src/tokens.stylex.d.ts +9 -0
  56. package/dist/packages/layout/src/frame.stylex.d.ts +1 -0
  57. package/dist/packages/layout/src/sidebar.d.ts +3 -1
  58. package/dist/packages/overlays/src/alert-dialog.d.ts +5 -2
  59. package/dist/packages/overlays/src/dialog.d.ts +7 -3
  60. package/dist/pierre-diff--zsiHCCB.js +71 -0
  61. package/dist/pierre-theme-D9hnHv3Z.js +126 -0
  62. package/dist/{pierre-tree-CRk09rx7.js → pierre-tree-D47uA7lb.js} +3 -3
  63. package/dist/{src-Cc0Sadzr.js → src-C_heP5kL.js} +295 -221
  64. package/dist/src-Cs0dRc4X.js +617 -0
  65. package/dist/src-D05isEh_.js +1652 -0
  66. package/dist/src-DXsGTJgv.js +969 -0
  67. package/dist/tokens.js +33 -25
  68. package/dist/viewer-styles-CpHqp5Qv.js +70 -0
  69. package/package.json +2 -1
  70. package/packages/foundations/src/tokens.stylex.ts +55 -48
  71. package/styles.css +1 -1
  72. package/dist/code-block-B30xQKqg.js +0 -175
  73. package/dist/pierre-diff-CZdzgiYm.js +0 -66
  74. package/dist/pierre-theme-BpESNIsV.js +0 -96
  75. package/dist/popup-styles-CvtZDE2t.js +0 -135
  76. package/dist/src-CfDf8TY8.js +0 -466
  77. package/dist/src-DuuAmS-c.js +0 -360
  78. package/dist/src-elMBQ2Dh.js +0 -1087
package/NOTICE CHANGED
@@ -30,3 +30,27 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
30
  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
+
34
+ Bundled Sonner
35
+
36
+ MIT License
37
+
38
+ Copyright (c) 2023 Emil Kowalski
39
+
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:
46
+
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.
package/README.md CHANGED
@@ -95,7 +95,8 @@ Use `ToolbarAction` for page-header actions, including links composed with `rend
95
95
  `CopyValue render={<ToolbarAction />}`; the rendered control owns its appearance and CopyValue owns copy feedback. Use
96
96
  `Row` for aligned inline actions, `Stack` for related content, and `RecordPage.Content` for separated page sections.
97
97
  Detail titles wrap; list metadata truncates. Sidebar items share contiguous hit areas. Put scrolling commands with the
98
- navigation and reserve the divided sidebar footer for persistent account information.
98
+ navigation and reserve the divided sidebar footer for persistent account controls. Use
99
+ `SidebarFooter layout="navigation"` for a group of commands; its intrinsic height keeps the scrolling navigation clear.
99
100
 
100
101
  `AppShell focus` temporarily hides navigation while retaining its expansion state. `ViewStack.Panel` keeps inactive
101
102
  content mounted and measurable but removes it from keyboard and assistive-technology navigation. The application owns
@@ -144,6 +145,11 @@ When an application's Content Security Policy requires nonces, wrap its componen
144
145
  This is [Base UI's CSP provider](https://base-ui.com/react/utils/csp-provider); it authorizes component style tags such
145
146
  as Select's scrollbar rules. The application owns nonce generation and its security policy.
146
147
 
148
+ Mount one `Toaster` from `/feedback` and call its exported `toast` API for notifications. Elements includes Sonner's
149
+ structural styles in the published stylesheet, so the production package injects no additional toast style tag. Keep
150
+ initial-read failures and field validation local; retained-content refresh failures can use one notification with Retry.
151
+ The application owns stable notification IDs and dismissal on recovery or navigation.
152
+
147
153
  ## Develop and release
148
154
 
149
155
  From `workspaces/core`:
package/dist/ai.js CHANGED
@@ -1,74 +1,74 @@
1
- import { C as e, S as t, T as n, f as r, h as i, p as a, t as o, w as s } from "./src-elMBQ2Dh.js";
2
- import { t as c } from "./content-link-BrPrpBof.js";
3
- import { r as l, t as u } from "./src-CfDf8TY8.js";
4
- import { c as d, u as f } from "./src-Cc0Sadzr.js";
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
5
  import { t as p } from "./accessibility-C-aIZ1Yx.js";
6
6
  import * as m from "@stylexjs/stylex";
7
7
  import { createContext as h, useContext as g, useId as _, useRef as v } from "react";
8
8
  import { jsx as y, jsxs as b } from "react/jsx-runtime";
9
- import { ArrowDown as x, ArrowUp as S, ExternalLink as C, File as w, GitBranch as T, Square as E } from "lucide-react";
10
- import { MessageScroller as D, useMessageScroller as O, useMessageScrollerScrollable as k } from "@shadcn/react/message-scroller";
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";
11
11
  // packages/ai/src/approval.tsx
12
- function A(e) {
12
+ function k(t) {
13
13
  return /* @__PURE__ */ b("section", {
14
- "aria-label": e.title,
15
- "data-request-id": e.requestId,
16
- className: "x78zum5 xdt5ytf x1n8ia3y xeuugli x1c8xbx5 xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt",
14
+ "aria-label": t.title,
15
+ "data-request-id": t.requestId,
16
+ className: "x78zum5 xdt5ytf x1n8ia3y xeuugli x1c8xbx5 xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
17
17
  children: [
18
18
  /* @__PURE__ */ y("h3", {
19
- className: "x1ghz6dp xtqrqnz x1778rvt xk50ysn xj0a0fe",
20
- children: e.title
19
+ className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
20
+ children: t.title
21
21
  }),
22
- e.description !== void 0 && /* @__PURE__ */ y("p", {
22
+ t.description !== void 0 && /* @__PURE__ */ y("p", {
23
23
  className: "x1ghz6dp x153jb6y xj0a0fe",
24
- children: e.description
24
+ children: t.description
25
25
  }),
26
- e.children,
27
- e.status === "pending" ? /* @__PURE__ */ b(r, { children: [/* @__PURE__ */ y(t, {
26
+ t.children,
27
+ t.status === "pending" ? /* @__PURE__ */ b(r, { children: [/* @__PURE__ */ y(e, {
28
28
  variant: "solid",
29
- onClick: e.onApprove,
30
- disabled: e.disabled === !0 || e.busy !== void 0,
31
- pending: e.busy === "approve",
29
+ onClick: t.onApprove,
30
+ disabled: t.disabled === !0 || t.busy !== void 0,
31
+ pending: t.busy === "approve",
32
32
  pendingLabel: "Approving…",
33
- children: e.approveLabel ?? "Approve"
34
- }), /* @__PURE__ */ y(t, {
35
- onClick: e.onDeny,
36
- disabled: e.disabled === !0 || e.busy !== void 0,
37
- pending: e.busy === "deny",
33
+ children: t.approveLabel ?? "Approve"
34
+ }), /* @__PURE__ */ y(e, {
35
+ onClick: t.onDeny,
36
+ disabled: t.disabled === !0 || t.busy !== void 0,
37
+ pending: t.busy === "deny",
38
38
  pendingLabel: "Denying…",
39
- children: e.denyLabel ?? "Deny"
40
- })] }) : /* @__PURE__ */ y(o, { children: e.statusLabel })
39
+ children: t.denyLabel ?? "Deny"
40
+ })] }) : /* @__PURE__ */ y(o, { children: t.statusLabel })
41
41
  ]
42
42
  });
43
43
  }
44
44
  // packages/ai/src/conversation.tsx
45
- var j = h(void 0);
46
- function M({ children: e, initialPosition: t = "end", follow: n = !0 }) {
47
- let r = v(null);
48
- return /* @__PURE__ */ y(j.Provider, {
49
- value: r,
50
- children: /* @__PURE__ */ y(D.Provider, {
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, {
49
+ value: a,
50
+ children: /* @__PURE__ */ y(E.Provider, {
51
51
  autoScroll: n,
52
52
  defaultScrollPosition: t,
53
- children: /* @__PURE__ */ y(D.Root, {
54
- className: "x1n2onr6 x78zum5 xdt5ytf x5yr21d x2lwn1j xeuugli xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt",
53
+ children: /* @__PURE__ */ y(E.Root, {
54
+ className: "x1n2onr6 x78zum5 xdt5ytf x5yr21d x2lwn1j xeuugli xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
55
55
  children: e
56
56
  })
57
57
  })
58
58
  });
59
59
  }
60
- function N({ label: e, children: t, scrollRestorationId: n }) {
61
- let r = g(j);
62
- return /* @__PURE__ */ y(D.Viewport, {
60
+ function M({ label: e, children: t, scrollRestorationId: n }) {
61
+ let r = g(A);
62
+ return /* @__PURE__ */ y(E.Viewport, {
63
63
  ref: r,
64
64
  "aria-label": e,
65
65
  "data-scroll-restoration-id": n,
66
- className: "x98rzlu x2lwn1j xeuugli x1odjw0f x1046ku7 x185mbhu x1ok0vyi x13qnu6 x9v5kkp x19rmrnh x1bqaal",
66
+ className: "x98rzlu x2lwn1j xeuugli x1odjw0f x1046ku7 x185mbhu x1ok0vyi x1t137rt x13qnu6 x9v5kkp x19rmrnh x1bqaal",
67
67
  children: t
68
68
  });
69
69
  }
70
- function P({ children: e, streaming: t = !1 }) {
71
- return /* @__PURE__ */ y(D.Content, {
70
+ function N({ children: e, streaming: t = !1 }) {
71
+ return /* @__PURE__ */ y(E.Content, {
72
72
  "aria-live": "polite",
73
73
  "aria-relevant": "additions",
74
74
  "aria-busy": t,
@@ -76,35 +76,51 @@ function P({ children: e, streaming: t = !1 }) {
76
76
  children: e
77
77
  });
78
78
  }
79
- function F({ messageId: e, children: t }) {
80
- return /* @__PURE__ */ y(D.Item, {
79
+ function P({ messageId: e, children: t }) {
80
+ return /* @__PURE__ */ y(E.Item, {
81
81
  messageId: e,
82
82
  className: "xeuugli xj0a0fe",
83
83
  children: t
84
84
  });
85
85
  }
86
+ function F({ children: e }) {
87
+ return /* @__PURE__ */ y("div", {
88
+ className: "x9f619 x2lah0s xeuugli xh8yej3 xe10afn xvueqy4 xn9t2bk x1m92p3w",
89
+ children: e
90
+ });
91
+ }
86
92
  function I({ label: e = "Jump to latest" }) {
87
- let { scrollToEnd: n } = O(), { end: r } = k(), i = g(j);
88
- return r ? /* @__PURE__ */ y("div", {
89
- className: "x10l6tqk xwthv0x x1nrll8i xuuh30",
90
- children: /* @__PURE__ */ b(t, {
91
- onClick: () => {
92
- n({ behavior: "instant" }), i?.current?.focus({ preventScroll: !0 });
93
- },
94
- children: [/* @__PURE__ */ y(x, {
95
- size: 16,
96
- "aria-hidden": !0
97
- }), e]
98
- })
93
+ let { end: t } = O();
94
+ return t ? /* @__PURE__ */ y("div", {
95
+ className: "x10l6tqk xwthv0x x1nrll8i xuuh30 x1tv4vx4 xeuugli",
96
+ children: /* @__PURE__ */ y(L, { label: e })
99
97
  }) : null;
100
98
  }
101
- var L = {
102
- Root: M,
103
- Viewport: N,
104
- Content: P,
105
- Item: F,
99
+ function L({ label: t, onActivate: n }) {
100
+ let { scrollToEnd: r } = D(), i = g(A);
101
+ return /* @__PURE__ */ b(e, {
102
+ size: "sm",
103
+ onClick: () => {
104
+ n?.(), requestAnimationFrame(() => {
105
+ let e = i?.current;
106
+ e != null && (r({ behavior: "instant" }), e.focus({ preventScroll: !0 }));
107
+ });
108
+ },
109
+ children: [/* @__PURE__ */ y(x, {
110
+ size: 14,
111
+ "aria-hidden": !0
112
+ }), t]
113
+ });
114
+ }
115
+ var R = {
116
+ Root: j,
117
+ Viewport: M,
118
+ Content: N,
119
+ Item: P,
120
+ Controls: F,
121
+ LatestButton: L,
106
122
  JumpToLatest: I
107
- }, R = {
123
+ }, z = {
108
124
  root: {
109
125
  k1xSpc: "x78zum5",
110
126
  kXwgrk: "xdt5ytf",
@@ -114,6 +130,7 @@ var L = {
114
130
  kMv6JI: "x1hz01jw",
115
131
  kGuDYH: "xtqrqnz",
116
132
  kLWn49: "x1778rvt",
133
+ k63SB2: "xj57cvi",
117
134
  $$css: !0
118
135
  },
119
136
  user: {
@@ -129,19 +146,19 @@ var L = {
129
146
  k8WAf4: "xn9t2bk",
130
147
  $$css: !0
131
148
  }
132
- }, z = {
133
- user: R.user,
134
- assistant: R.assistant,
135
- system: R.system
136
149
  }, B = {
150
+ user: z.user,
151
+ assistant: z.assistant,
152
+ system: z.system
153
+ }, V = {
137
154
  "x-default-marker": "x-default-marker",
138
155
  $$css: !0
139
156
  };
140
- function V({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s }) {
157
+ function H({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s }) {
141
158
  return /* @__PURE__ */ b("article", {
142
159
  id: n,
143
160
  "aria-label": e,
144
- ...m.props(R.root, z[r], B),
161
+ ...m.props(z.root, B[r], V),
145
162
  children: [
146
163
  /* @__PURE__ */ b("header", {
147
164
  className: "x78zum5 x6s0dn4 x1hnptsi x1a02dak xeuugli",
@@ -151,79 +168,82 @@ function V({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avat
151
168
  children: a
152
169
  }),
153
170
  /* @__PURE__ */ y("span", {
154
- className: "xk50ysn xj0a0fe",
171
+ className: "xk4h15q xeuugli xj0a0fe",
155
172
  children: e
156
173
  }),
157
174
  i !== void 0 && /* @__PURE__ */ y("div", {
158
- className: "x153jb6y xy8obcc xas2l8k",
175
+ className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
159
176
  children: i
160
177
  })
161
178
  ]
162
179
  }),
163
180
  /* @__PURE__ */ y("div", {
164
- className: "xeuugli xj0a0fe",
181
+ className: "xeuugli xj0a0fe x1ytb0s6",
165
182
  children: t
166
183
  }),
167
184
  s !== void 0 && /* @__PURE__ */ y("div", {
168
- className: "x78zum5 x1a02dak x1qjc9v5 x1hnptsi",
185
+ className: "x78zum5 x1a02dak x1qjc9v5 x1hnptsi xeuugli",
169
186
  children: s
170
187
  }),
171
188
  o !== void 0 && /* @__PURE__ */ y("footer", {
172
- className: "x78zum5 x1a02dak x6s0dn4 xunmzkg x1hc1fzr x1ac4sdd xea5s0o xbfgl4k",
189
+ className: "x78zum5 x1a02dak x6s0dn4 xeuugli xunmzkg x1hc1fzr x1ac4sdd xea5s0o xbfgl4k",
173
190
  children: o
174
191
  })
175
192
  ]
176
193
  });
177
194
  }
178
- function H({ name: e, description: t, href: n, actions: r }) {
195
+ function U({ name: e, description: t, href: n, actions: r }) {
179
196
  return /* @__PURE__ */ b("div", {
180
- className: "x78zum5 x6s0dn4 x1n8ia3y xeuugli x193iq5w x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 x1hz01jw xtqrqnz x1778rvt",
197
+ className: "x78zum5 x1a02dak x6s0dn4 x1n8ia3y xeuugli x193iq5w x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 x1hz01jw xtqrqnz x1778rvt xj57cvi",
181
198
  children: [
182
- /* @__PURE__ */ y(w, {
199
+ /* @__PURE__ */ y(C, {
183
200
  size: 16,
184
201
  "aria-hidden": !0,
185
202
  className: "x153jb6y x2lah0s"
186
203
  }),
187
204
  /* @__PURE__ */ b("div", {
188
- className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
205
+ className: "x78zum5 xdt5ytf xfko13i x1slnebi xeuugli xj0a0fe",
189
206
  children: [n === void 0 ? /* @__PURE__ */ y("span", { children: e }) : /* @__PURE__ */ y(c, {
190
207
  href: n,
191
208
  children: e
192
209
  }), t !== void 0 && /* @__PURE__ */ y("span", {
193
- className: "x153jb6y xy8obcc xas2l8k",
210
+ className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
194
211
  children: t
195
212
  })]
196
213
  }),
197
- r
214
+ r !== void 0 && /* @__PURE__ */ y("div", {
215
+ className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli",
216
+ children: r
217
+ })
198
218
  ]
199
219
  });
200
220
  }
201
221
  // packages/ai/src/message-action.tsx
202
- function U(t) {
203
- if (t.kind === "link") {
204
- let { kind: e, label: n, ...r } = t;
205
- return /* @__PURE__ */ y(s, {
206
- ...r,
207
- "aria-label": n
222
+ function W(e) {
223
+ if (e.kind === "link") {
224
+ let { kind: t, label: r, ...i } = e;
225
+ return /* @__PURE__ */ y(n, {
226
+ ...i,
227
+ "aria-label": r
208
228
  });
209
229
  }
210
- let { kind: n, label: r, ...i } = t;
211
- return /* @__PURE__ */ y(e, {
230
+ let { kind: t, label: r, ...i } = e;
231
+ return /* @__PURE__ */ y(s, {
212
232
  ...i,
213
233
  variant: "ghost",
214
234
  "aria-label": r
215
235
  });
216
236
  }
217
- function W(e) {
218
- return /* @__PURE__ */ b(u.Root, { children: [/* @__PURE__ */ y(u.Trigger, { render: U(e) }), /* @__PURE__ */ y(u.Portal, { children: /* @__PURE__ */ y(u.Positioner, { children: /* @__PURE__ */ y(u.Popup, { children: e.label }) }) })] });
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 }) }) })] });
219
239
  }
220
240
  // packages/ai/src/message-boundary.tsx
221
- function G({ label: e, children: t }) {
241
+ function K({ label: e, children: t }) {
222
242
  return /* @__PURE__ */ b(i.Root, {
223
243
  className: "xeuugli x1kbiq1m xykt701 xpu655y",
224
244
  children: [/* @__PURE__ */ b(i.Trigger, {
225
- className: "xlqzeqv x1hnptsi x153jb6y xy8obcc xas2l8k xo1l8bm",
226
- children: [/* @__PURE__ */ y(T, {
245
+ className: "xlqzeqv x1hnptsi x153jb6y xy8obcc xas2l8k xj57cvi",
246
+ children: [/* @__PURE__ */ y(w, {
227
247
  size: 14,
228
248
  "aria-hidden": !0,
229
249
  className: "x2lah0s"
@@ -238,11 +258,11 @@ function G({ label: e, children: t }) {
238
258
  });
239
259
  }
240
260
  // packages/ai/src/prompt-input.tsx
241
- var K = { action: {
261
+ var q = { action: {
242
262
  keTefX: "xvc5jky",
243
263
  $$css: !0
244
264
  } };
245
- function q({ label: t, value: n, onValueChange: r, onSubmit: i, name: a = "prompt", placeholder: o, maxLength: s, required: c = !0, pending: l = !1, disabled: h = !1, submitDisabled: g = !1, submitLabel: v = "Send message", pendingLabel: x = "Sending…", enterBehavior: C = "newline", compact: w = !1, description: T, error: D, controls: O, attachments: k, onStop: A, stopPending: j = !1, stopLabel: M = "Stop response" }) {
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" }) {
246
266
  let N = _(), P = h || l, F = v;
247
267
  A === void 0 ? l ? F = x : C === "submit" && (F = `${v} · Enter`) : F = j ? "Stopping…" : M;
248
268
  function I(e) {
@@ -251,17 +271,17 @@ function q({ label: t, value: n, onValueChange: r, onSubmit: i, name: a = "promp
251
271
  e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), !P && !g && A === void 0 && e.currentTarget.form?.requestSubmit());
252
272
  }
253
273
  function L(e) {
254
- e.preventDefault(), !P && !g && A === void 0 && i(e);
274
+ e.preventDefault(), !P && !g && A === void 0 && r(e);
255
275
  }
256
276
  return /* @__PURE__ */ y("form", {
257
277
  onSubmit: L,
258
- className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4",
278
+ className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
259
279
  children: /* @__PURE__ */ b(d.Root, {
260
280
  invalid: D !== void 0,
261
281
  children: [
262
282
  /* @__PURE__ */ y(d.Label, {
263
283
  ...m.props(p.hidden),
264
- children: t
284
+ children: e
265
285
  }),
266
286
  /* @__PURE__ */ b("div", {
267
287
  ...{
@@ -273,12 +293,12 @@ function q({ label: t, value: n, onValueChange: r, onSubmit: i, name: a = "promp
273
293
  appearance: "plain",
274
294
  rows: w ? 1 : 2,
275
295
  compact: w,
276
- name: a,
277
- value: n,
278
- onChange: (e) => r(e.currentTarget.value),
296
+ name: i,
297
+ value: t,
298
+ onChange: (e) => n(e.currentTarget.value),
279
299
  onKeyDown: I,
280
- placeholder: o ?? t,
281
- maxLength: s,
300
+ placeholder: a ?? e,
301
+ maxLength: o,
282
302
  required: c,
283
303
  disabled: h,
284
304
  readOnly: l,
@@ -290,8 +310,8 @@ function q({ label: t, value: n, onValueChange: r, onSubmit: i, name: a = "promp
290
310
  children: [O !== void 0 && /* @__PURE__ */ y("div", {
291
311
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
292
312
  children: O
293
- }), /* @__PURE__ */ b(u.Root, { children: [/* @__PURE__ */ y(u.Trigger, { render: A === void 0 ? /* @__PURE__ */ y(e, {
294
- xstyle: K.action,
313
+ }), /* @__PURE__ */ b(u.Root, { children: [/* @__PURE__ */ y(u.Trigger, { render: A === void 0 ? /* @__PURE__ */ y(s, {
314
+ xstyle: q.action,
295
315
  type: "submit",
296
316
  variant: "solid",
297
317
  "aria-label": l ? x : v,
@@ -301,8 +321,8 @@ function q({ label: t, value: n, onValueChange: r, onSubmit: i, name: a = "promp
301
321
  size: 16,
302
322
  "aria-hidden": !0
303
323
  })
304
- }) : /* @__PURE__ */ y(e, {
305
- xstyle: K.action,
324
+ }) : /* @__PURE__ */ y(s, {
325
+ xstyle: q.action,
306
326
  type: "button",
307
327
  "aria-label": j ? "Stopping…" : M,
308
328
  onClick: (e) => {
@@ -310,7 +330,7 @@ function q({ label: t, value: n, onValueChange: r, onSubmit: i, name: a = "promp
310
330
  },
311
331
  disabled: h,
312
332
  pending: j,
313
- children: /* @__PURE__ */ y(E, {
333
+ children: /* @__PURE__ */ y(T, {
314
334
  size: 14,
315
335
  "aria-hidden": !0
316
336
  })
@@ -318,7 +338,7 @@ function q({ label: t, value: n, onValueChange: r, onSubmit: i, name: a = "promp
318
338
  })
319
339
  ]
320
340
  }),
321
- T !== void 0 && /* @__PURE__ */ y(d.Description, { children: T }),
341
+ E !== void 0 && /* @__PURE__ */ y(d.Description, { children: E }),
322
342
  D !== void 0 && /* @__PURE__ */ y(d.Error, {
323
343
  id: N,
324
344
  match: !0,
@@ -330,42 +350,42 @@ function q({ label: t, value: n, onValueChange: r, onSubmit: i, name: a = "promp
330
350
  });
331
351
  }
332
352
  // packages/ai/src/sources.tsx
333
- function J({ sources: e, label: t = "Sources" }) {
353
+ function Y({ sources: e, label: t = "Sources" }) {
334
354
  return /* @__PURE__ */ b("section", {
335
355
  "aria-label": t,
336
- className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1hz01jw xtqrqnz x1778rvt xbixft",
337
- children: [/* @__PURE__ */ y("h3", {
338
- className: "x1ghz6dp xtqrqnz x1778rvt xk50ysn",
339
- children: t
340
- }), /* @__PURE__ */ y("ol", {
341
- className: "x78zum5 xdt5ytf x1n8ia3y x1ghz6dp x1717udv x3ct3a4",
342
- children: e.map((e) => /* @__PURE__ */ b("li", {
343
- className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
344
- children: [/* @__PURE__ */ b("span", {
345
- className: "x3nfvp2 x1pha0wt xunmzkg x1a02dak",
346
- children: [/* @__PURE__ */ y(c, {
356
+ className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft",
357
+ children: [
358
+ /* @__PURE__ */ y("h3", {
359
+ className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
360
+ children: t
361
+ }),
362
+ e.length === 0 && /* @__PURE__ */ y("p", {
363
+ className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
364
+ children: "No sources supplied."
365
+ }),
366
+ /* @__PURE__ */ y("ol", {
367
+ className: "x78zum5 xdt5ytf x1n8ia3y x1ghz6dp x1717udv x3ct3a4",
368
+ children: e.map((e) => /* @__PURE__ */ b("li", {
369
+ className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
370
+ children: [/* @__PURE__ */ y("span", { children: /* @__PURE__ */ y(c, {
347
371
  href: e.href,
348
372
  children: e.title
349
- }), /* @__PURE__ */ y(C, {
350
- size: 12,
351
- "aria-hidden": !0,
352
- className: "x2lah0s x153jb6y"
373
+ }) }), e.description !== void 0 && /* @__PURE__ */ y("p", {
374
+ className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
375
+ children: e.description
353
376
  })]
354
- }), e.description !== void 0 && /* @__PURE__ */ y("p", {
355
- className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
356
- children: e.description
357
- })]
358
- }, e.id))
359
- })]
377
+ }, e.id))
378
+ })
379
+ ]
360
380
  });
361
381
  }
362
- function Y({ source: e, label: t }) {
382
+ function X({ source: e, label: n }) {
363
383
  return /* @__PURE__ */ y("span", {
364
384
  className: "xt0psk2 x11njtxf xss6m8b",
365
385
  children: /* @__PURE__ */ b(l.Root, { children: [/* @__PURE__ */ y(l.Trigger, {
366
- render: /* @__PURE__ */ y(n, {}),
367
- "aria-label": `Source ${t}: ${e.title}`,
368
- children: t
386
+ render: /* @__PURE__ */ y(t, {}),
387
+ "aria-label": `Source ${n}: ${e.title}`,
388
+ children: n
369
389
  }), /* @__PURE__ */ y(l.Portal, { children: /* @__PURE__ */ y(l.Positioner, {
370
390
  side: "top",
371
391
  children: /* @__PURE__ */ y(l.Popup, { children: /* @__PURE__ */ b(a, {
@@ -382,4 +402,4 @@ function Y({ source: e, label: t }) {
382
402
  }) })] })
383
403
  });
384
404
  }
385
- export { A as Approval, L as Conversation, Y as InlineCitation, V as Message, W as MessageAction, H as MessageAttachment, G as MessageBoundary, q as PromptInput, J as Sources };
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 };
@@ -1,5 +1,5 @@
1
- import { n as e, o as t } from "./chart-frame-RL1hCWBC.js";
2
- import { n } from "./chart-input-Bm3ot1yD.js";
1
+ import { n as e, s as t } from "./chart-frame-Bczk5sWj.js";
2
+ import { n } from "./chart-input-CbzVN76m.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
@@ -43,13 +43,13 @@ function f({ items: n, selection: o }) {
43
43
  selected: o?.selectedId === n.id,
44
44
  onSelect: o === void 0 ? void 0 : () => o.onSelect(n.id),
45
45
  children: [/* @__PURE__ */ a("span", {
46
- className: "x78zum5 x6s0dn4 x1hnptsi xeuugli",
46
+ className: "x78zum5 x6s0dn4 x1hnptsi x1slnebi xeuugli",
47
47
  children: [/* @__PURE__ */ i("span", {
48
48
  "aria-hidden": !0,
49
49
  ...r.props(s.swatch(t[n.tone]))
50
50
  }), n.label]
51
51
  }), /* @__PURE__ */ i("span", {
52
- className: "x153jb6y xp4054r",
52
+ className: "x153jb6y xp4054r xeuugli x193iq5w",
53
53
  children: n.valueLabel
54
54
  })]
55
55
  }) }, n.id))