@mechane-ai/elements 0.60.0 → 0.62.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 (96) hide show
  1. package/dist/ai.js +290 -222
  2. package/dist/{article-COShcQPh.js → article-DBRkXW1r.js} +6 -6
  3. package/dist/article.js +1 -1
  4. package/dist/catalog.json +21 -1
  5. package/dist/{categorical-values-DdZLdWhL.js → categorical-values-Bq5dMg0i.js} +1 -1
  6. package/dist/{cells-BTTLURWI.js → cells-X8SVrZBc.js} +1 -1
  7. package/dist/charts/cartesian.js +1 -1
  8. package/dist/charts/cells.js +1 -1
  9. package/dist/charts/comparison.js +1 -1
  10. package/dist/charts/distribution.js +1 -1
  11. package/dist/charts/figure.js +12 -12
  12. package/dist/charts/graph.js +1 -1
  13. package/dist/charts/hierarchy.js +1 -1
  14. package/dist/charts/image.js +1 -1
  15. package/dist/charts/matrix.js +1 -1
  16. package/dist/charts/plot.js +4 -4
  17. package/dist/charts/relationship.js +1 -1
  18. package/dist/charts/text.js +1 -1
  19. package/dist/charts/timeline.js +2 -2
  20. package/dist/charts/trend.js +1 -1
  21. package/dist/charts.js +2 -2
  22. package/dist/{code-block-BZsY2sh3.js → code-block-C_Ze7QLO.js} +1 -1
  23. package/dist/collections.js +1 -1
  24. package/dist/{commands-D0bF2JxV.js → commands-BWwMKUdd.js} +2 -2
  25. package/dist/content/code.js +1 -1
  26. package/dist/content/diff.js +10 -10
  27. package/dist/content/link.js +1 -1
  28. package/dist/content/markdown.js +1 -1
  29. package/dist/content/tree.js +2 -2
  30. package/dist/{content-link-PnpcnTCx.js → content-link-BSR0a887.js} +1 -1
  31. package/dist/content.js +1 -1
  32. package/dist/{dates-Cq90-D2X.js → dates-DNb7_KSp.js} +31 -32
  33. package/dist/{dumbbell-plot-BeHhL-01.js → dumbbell-plot-DWybxZAH.js} +4 -4
  34. package/dist/{embedding-map-DbETVJXp.js → embedding-map-B5JjgyGR.js} +7 -7
  35. package/dist/feedback.js +1 -1
  36. package/dist/{figure-frame-ClYRIRAq.js → figure-frame-zyCmHlgX.js} +11 -11
  37. package/dist/forms/dates.js +1 -1
  38. package/dist/{forms-CEbwzlRR.js → forms-C5vXBA_C.js} +17 -17
  39. package/dist/forms.js +2 -2
  40. package/dist/{image-grid-DB5U7Jtx.js → image-grid-Cgkz2fsU.js} +3 -3
  41. package/dist/index.js +1 -1
  42. package/dist/kits/evaluation.js +5 -5
  43. package/dist/kits/interpretability.js +12 -12
  44. package/dist/kits/operations.js +6 -6
  45. package/dist/kits/research.js +8 -8
  46. package/dist/kits/training.js +6 -6
  47. package/dist/layout.js +1 -1
  48. package/dist/lesson.js +3 -3
  49. package/dist/{markdown-VpLw_P9T.js → markdown-BkFwgQzJ.js} +2 -2
  50. package/dist/mdx.js +6 -6
  51. package/dist/navigation/commands.js +1 -1
  52. package/dist/navigation-Bqouujdr.js +44 -0
  53. package/dist/navigation.js +3 -3
  54. package/dist/packages/ai/src/command-activity.d.ts +5 -1
  55. package/dist/packages/ai/src/index.d.ts +1 -1
  56. package/dist/packages/ai/src/message.d.ts +9 -1
  57. package/dist/packages/charts/src/plot/plot-marks.d.ts +2 -1
  58. package/dist/packages/charts/src/timeline/index.d.ts +1 -1
  59. package/dist/packages/charts/src/timeline/trace-timeline-layout.d.ts +28 -2
  60. package/dist/packages/charts/src/timeline/trace-timeline.d.ts +7 -3
  61. package/dist/packages/charts/src/timeline/waterfall.d.ts +3 -1
  62. package/dist/packages/core/src/filter-chips.d.ts +21 -0
  63. package/dist/packages/core/src/index.d.ts +2 -0
  64. package/dist/packages/navigation/src/navigation.d.ts +4 -0
  65. package/dist/{param-BdqTpZER.js → param-BLGHbZoi.js} +1 -1
  66. package/dist/{pierre-diff-aGyQK5xK.js → pierre-diff-TAaZTeg-.js} +1 -1
  67. package/dist/{plot-layout-B-b6tioh.js → plot-layout-JgEcW4fY.js} +2 -2
  68. package/dist/{plot-marks-FVsbFkUs.js → plot-marks-DgCtcd3L.js} +7 -6
  69. package/dist/{plot-surface-BlR44uTL.js → plot-surface-CAAzoXJh.js} +1 -1
  70. package/dist/{reference-lines-BDfsv8dy.js → reference-lines-BGE13uMG.js} +2 -2
  71. package/dist/{scene-CY05-A1k.js → scene-GBAHedGg.js} +7 -7
  72. package/dist/scene.js +1 -1
  73. package/dist/{slope-chart-DTyF1lNG.js → slope-chart-Bh7fntOb.js} +5 -5
  74. package/dist/{src-BAlO76fa.js → src-CoRsRnHQ.js} +40 -40
  75. package/dist/{src-Dxs3Buo_.js → src-D_BL6n5Q.js} +186 -187
  76. package/dist/{src-Cuwx-PLT.js → src-Ddx3fHei.js} +119 -120
  77. package/dist/{src-C-Wg9m9H.js → src-DxZdE_P5.js} +20 -21
  78. package/dist/{src-Ci8DeY8J.js → src-KTMBylbq.js} +1 -1
  79. package/dist/{src-4qgpiWvP.js → src-XMHLpSe9.js} +44 -44
  80. package/dist/{src-9EJskqB_.js → src-k0l1Y4Xl.js} +662 -428
  81. package/dist/styles2.css +61 -12
  82. package/dist/{time-series-BbUBF3IE.js → time-series-_wZflmIb.js} +34 -34
  83. package/dist/timeline-DsNPo_57.js +869 -0
  84. package/dist/{token-heatmap-o_9l6vaq.js → token-heatmap-Chnea1Iv.js} +3 -3
  85. package/dist/{token-predictions-DaAztlOS.js → token-predictions-DQEd5sj7.js} +4 -4
  86. package/dist/{transport-4V9rfYHN.js → transport-CagqVWwW.js} +4 -4
  87. package/dist/{tree-diagram-BDj4TGXb.js → tree-diagram-CL8RI9gT.js} +8 -8
  88. package/dist/{treemap-DUSFlCPK.js → treemap-C3zmI4of.js} +4 -4
  89. package/dist/{use-tween-BsaEO862.js → use-tween-C2VZtQjV.js} +1 -1
  90. package/dist/{violin-plot-ULdC_dcY.js → violin-plot-CgpyGuSe.js} +4 -4
  91. package/dist/waterfall-S8CLEUib.js +740 -0
  92. package/package.json +1 -1
  93. package/dist/control-styles-D3q_Qyxi.js +0 -179
  94. package/dist/navigation-CveMIuXI.js +0 -39
  95. package/dist/timeline-C1d9YJlJ.js +0 -620
  96. package/dist/waterfall-Dre6i02Z.js +0 -684
package/dist/ai.js CHANGED
@@ -1,39 +1,38 @@
1
- import { D as e, O as t, T as n, h as r, i, k as a, m as o, t as s, v as c } from "./src-9EJskqB_.js";
2
- import { t as l } from "./code-block-BZsY2sh3.js";
3
- import { f as u } from "./src-BAlO76fa.js";
4
- import { t as d } from "./content-link-PnpcnTCx.js";
5
- import { n as f, r as p } from "./markdown-VpLw_P9T.js";
6
- import { r as m, t as h } from "./src-na2DdkKI.js";
7
- import { c as g, d as _ } from "./src-C-Wg9m9H.js";
8
- import { i as ee, t as v } from "./forms-CEbwzlRR.js";
9
- import { t as te } from "./accessibility-P89UG9-r.js";
10
- import { r as y } from "./control-styles-D3q_Qyxi.js";
11
- import * as b from "@stylexjs/stylex";
12
- import { createParts as x } from "@ui-sdk/react/primitive";
13
- import { createContext as S, useCallback as C, useContext as w, useEffect as T, useId as ne, useLayoutEffect as E, useRef as D, useState as O } from "react";
14
- import { createInputHistory as re, definePrimitive as k, dispatch as ie, isComposing as ae } from "@ui-sdk/core";
15
- import { jsx as A, jsxs as j } from "react/jsx-runtime";
16
- import { ArrowDown as M, ArrowUp as oe, File as N, GitBranch as P, Square as se, Terminal as F } from "lucide-react";
17
- import { matchesShortcut as I } from "@ui-sdk/core/shortcuts";
18
- import { useShortcutHint as ce } from "@ui-sdk/react/shortcuts";
19
- import { ScrollArea as L, ScrollAreaContent as R, ScrollAreaScrollToEnd as z, ScrollAreaViewport as B, createScrollAreaController as V } from "@ui-sdk/react/scroll-area";
1
+ import { A as e, E as t, F as n, O as r, h as i, i as a, k as o, m as s, t as c, v as l } from "./src-k0l1Y4Xl.js";
2
+ import { t as u } from "./code-block-C_Ze7QLO.js";
3
+ import { f as d } from "./src-CoRsRnHQ.js";
4
+ import { t as f } from "./content-link-BSR0a887.js";
5
+ import { n as p, r as m } from "./markdown-BkFwgQzJ.js";
6
+ import { r as h, t as g } from "./src-na2DdkKI.js";
7
+ import { c as _, d as v } from "./src-DxZdE_P5.js";
8
+ import { i as y, t as b } from "./forms-C5vXBA_C.js";
9
+ import { t as ee } from "./accessibility-P89UG9-r.js";
10
+ import * as x from "@stylexjs/stylex";
11
+ import { createParts as S } from "@ui-sdk/react/primitive";
12
+ import { createContext as C, useCallback as w, useContext as T, useEffect as E, useId as te, useLayoutEffect as D, useRef as O, useState as k } from "react";
13
+ import { createInputHistory as ne, definePrimitive as A, dispatch as re, isComposing as ie } from "@ui-sdk/core";
14
+ import { jsx as j, jsxs as M } from "react/jsx-runtime";
15
+ import { ArrowDown as N, ArrowUp as ae, File as P, GitBranch as F, Square as oe, Terminal as I } from "lucide-react";
16
+ import { matchesShortcut as L } from "@ui-sdk/core/shortcuts";
17
+ import { useShortcutHint as se } from "@ui-sdk/react/shortcuts";
18
+ import { ScrollArea as R, ScrollAreaContent as z, ScrollAreaScrollToEnd as B, ScrollAreaViewport as V, createScrollAreaController as H } from "@ui-sdk/react/scroll-area";
20
19
  // packages/ai/src/approval.tsx
21
- function H(e) {
22
- return /* @__PURE__ */ j("section", {
20
+ function U(e) {
21
+ return /* @__PURE__ */ M("section", {
23
22
  "aria-label": e.title,
24
23
  "data-request-id": e.requestId,
25
24
  className: "x78zum5 xdt5ytf x1n8ia3y xeuugli x1c8xbx5 xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
26
25
  children: [
27
- /* @__PURE__ */ A("h3", {
26
+ /* @__PURE__ */ j("h3", {
28
27
  className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
29
28
  children: e.title
30
29
  }),
31
- e.description !== void 0 && /* @__PURE__ */ A("p", {
30
+ e.description !== void 0 && /* @__PURE__ */ j("p", {
32
31
  className: "x1ghz6dp x153jb6y xj0a0fe",
33
32
  children: e.description
34
33
  }),
35
34
  e.children,
36
- e.status === "pending" ? /* @__PURE__ */ j(o, { children: [/* @__PURE__ */ A(n, {
35
+ e.status === "pending" ? /* @__PURE__ */ M(s, { children: [/* @__PURE__ */ j(t, {
37
36
  variant: "solid",
38
37
  "data-agent-confirm": `Approve ${e.title}?`,
39
38
  onClick: e.onApprove,
@@ -41,23 +40,23 @@ function H(e) {
41
40
  isPending: e.busy === "approve",
42
41
  pendingLabel: "Approving…",
43
42
  children: e.approveLabel ?? "Approve"
44
- }), /* @__PURE__ */ A(n, {
43
+ }), /* @__PURE__ */ j(t, {
45
44
  "data-agent-confirm": `Deny ${e.title}?`,
46
45
  onClick: e.onDeny,
47
46
  disabled: e.isDisabled === !0 || e.busy !== void 0,
48
47
  isPending: e.busy === "deny",
49
48
  pendingLabel: "Denying…",
50
49
  children: e.denyLabel ?? "Deny"
51
- })] }) : /* @__PURE__ */ A(s, { children: e.statusLabel })
50
+ })] }) : /* @__PURE__ */ j(c, { children: e.statusLabel })
52
51
  ]
53
52
  });
54
53
  }
55
54
  // packages/ai/src/command-details.tsx
56
- function U({ command: e, output: t, commandNotice: n, outputNotice: a, outputLanguage: o, isRunning: s = !1 }) {
57
- return /* @__PURE__ */ j(r, {
55
+ function W({ command: e, output: t, commandNotice: n, outputNotice: r, outputLanguage: o, isRunning: s = !1 }) {
56
+ return /* @__PURE__ */ M(i, {
58
57
  isCompact: !0,
59
58
  children: [
60
- e === "" && n !== void 0 ? /* @__PURE__ */ A(i, { children: "Command omitted from this preview." }) : e === void 0 ? /* @__PURE__ */ A(i, { children: s ? "Preparing command…" : "Command unavailable." }) : /* @__PURE__ */ A(l, {
59
+ e === "" && n !== void 0 ? /* @__PURE__ */ j(a, { children: "Command omitted from this preview." }) : e === void 0 ? /* @__PURE__ */ j(a, { children: s ? "Preparing command…" : "Command unavailable." }) : /* @__PURE__ */ j(u, {
61
60
  code: e,
62
61
  language: "bash",
63
62
  filename: "Command",
@@ -66,13 +65,13 @@ function U({ command: e, output: t, commandNotice: n, outputNotice: a, outputLan
66
65
  shouldWrap: !0,
67
66
  maxHeight: 240
68
67
  }),
69
- n !== void 0 && /* @__PURE__ */ A(i, { children: n }),
70
- t === void 0 || t.length === 0 ? /* @__PURE__ */ A(i, { children: s ? "Waiting for output…" : t === void 0 ? "Output unavailable." : a === void 0 ? "No output." : "Output omitted from this preview." }) : o === void 0 ? /* @__PURE__ */ A(u, {
68
+ n !== void 0 && /* @__PURE__ */ j(a, { children: n }),
69
+ t === void 0 || t.length === 0 ? /* @__PURE__ */ j(a, { children: s ? "Waiting for output…" : t === void 0 ? "Output unavailable." : r === void 0 ? "No output." : "Output omitted from this preview." }) : o === void 0 ? /* @__PURE__ */ j(d, {
71
70
  output: t,
72
71
  label: "Output",
73
72
  variant: "embedded",
74
73
  isRunning: s
75
- }) : /* @__PURE__ */ A(l, {
74
+ }) : /* @__PURE__ */ j(u, {
76
75
  code: t,
77
76
  language: o,
78
77
  filename: "Output",
@@ -82,53 +81,69 @@ function U({ command: e, output: t, commandNotice: n, outputNotice: a, outputLan
82
81
  isStreaming: s,
83
82
  maxHeight: 320
84
83
  }),
85
- a !== void 0 && /* @__PURE__ */ A(i, { children: a })
84
+ r !== void 0 && /* @__PURE__ */ j(a, { children: r })
86
85
  ]
87
86
  });
88
87
  }
89
88
  // packages/ai/src/command-activity.tsx
90
- var W = {
89
+ var G = {
91
90
  pending: "Preparing",
92
91
  running: "Running",
93
92
  complete: "",
94
93
  failed: "Failed",
95
94
  stopped: "Stopped",
96
95
  unknown: "Outcome unknown"
97
- }, G = /* @__PURE__ */ new Set(["pending", "running"]);
98
- function le({ status: e, ...t }) {
99
- let n = t.command?.trim().split(/\r\n|\n|\r/u)[0], r = n === void 0 || n.length === 0 ? "Command" : n;
100
- return /* @__PURE__ */ j(c.Root, {
96
+ }, ce = /* @__PURE__ */ new Set(["pending", "running"]);
97
+ function le({ status: e, duration: t, meta: n, ...r }) {
98
+ let i = r.command?.trim().split(/\r\n|\n|\r/u)[0], a = i === void 0 || i.length === 0 ? "Command" : i, o = n !== void 0 && n.length > 0, s = t !== void 0 && t.length > 0, c = o || s, u = c ? /* @__PURE__ */ M("span", {
99
+ className: "x3nfvp2 x6s0dn4 x1hnptsi xvc5jky x2lah0s xy8obcc xss6m8b x153jb6y xuxw1ft",
100
+ children: [o && /* @__PURE__ */ j("span", {
101
+ className: "x153jb6y",
102
+ children: n
103
+ }), s && /* @__PURE__ */ j("span", {
104
+ className: "x153jb6y",
105
+ children: t
106
+ })]
107
+ }) : null, d = /* @__PURE__ */ M("span", {
108
+ ...{
109
+ 0: { className: "x3nfvp2 x6s0dn4 x1hnptsi xeuugli x153jb6y xj57cvi" },
110
+ 1: { className: "x6s0dn4 x1hnptsi xeuugli x153jb6y xj57cvi x78zum5 x12lumcd" }
111
+ }[!!c | 0],
112
+ children: [
113
+ /* @__PURE__ */ j(I, {
114
+ size: 14,
115
+ "aria-hidden": !0,
116
+ className: "x2lah0s"
117
+ }),
118
+ /* @__PURE__ */ j("span", {
119
+ className: "xiard35 xy8obcc xeuugli xb3r6kr xlyipyv x1sdyfia",
120
+ children: a
121
+ }),
122
+ G[e].length > 0 && /* @__PURE__ */ j("span", {
123
+ className: "x2lah0s xy8obcc x153jb6y",
124
+ children: G[e]
125
+ }),
126
+ u
127
+ ]
128
+ });
129
+ return /* @__PURE__ */ M(l.Root, {
101
130
  defaultOpen: !1,
102
- children: [/* @__PURE__ */ A(c.Trigger, {
131
+ children: [c ? /* @__PURE__ */ j(l.Trigger, {
132
+ className: "xt970qd xunmzkg x153jb6y xj57cvi",
133
+ children: d
134
+ }) : /* @__PURE__ */ j(l.Trigger, {
103
135
  variant: "inline",
104
- children: /* @__PURE__ */ j("span", {
105
- className: "x3nfvp2 x6s0dn4 x1hnptsi xeuugli",
106
- children: [
107
- /* @__PURE__ */ A(F, {
108
- size: 14,
109
- "aria-hidden": !0,
110
- className: "x2lah0s"
111
- }),
112
- /* @__PURE__ */ A("span", {
113
- className: "xiard35 xy8obcc xeuugli xb3r6kr xlyipyv x1sdyfia",
114
- children: r
115
- }),
116
- W[e].length > 0 && /* @__PURE__ */ A("span", {
117
- className: "x2lah0s xy8obcc x153jb6y",
118
- children: W[e]
119
- })
120
- ]
121
- })
122
- }), /* @__PURE__ */ A(c.Panel, { children: /* @__PURE__ */ A(U, {
123
- ...t,
124
- isRunning: G.has(e)
136
+ children: d
137
+ }), /* @__PURE__ */ j(l.Panel, { children: /* @__PURE__ */ j(W, {
138
+ ...r,
139
+ isRunning: ce.has(e)
125
140
  }) })]
126
141
  });
127
142
  }
128
143
  // packages/ai/src/conversation.tsx
129
- var K = S(void 0);
144
+ var K = C(void 0);
130
145
  function q() {
131
- let e = w(K);
146
+ let e = T(K);
132
147
  if (e === void 0) throw Error("Render the parts of a conversation inside Conversation.Root.");
133
148
  return e;
134
149
  }
@@ -136,20 +151,20 @@ function J(e) {
136
151
  return e.scrollHeight - e.clientHeight - e.scrollTop <= 1;
137
152
  }
138
153
  function ue({ children: e, initialPosition: t = "end", shouldFollow: n = !0, viewportRef: r }) {
139
- let i = D(null), a = r ?? i, [o] = O(t), [s] = O(V), [c, l] = O(o === "end"), [u] = O(() => ({
154
+ let i = O(null), a = r ?? i, [o] = k(t), [s] = k(H), [c, l] = k(o === "end"), [u] = k(() => ({
140
155
  controller: s,
141
156
  viewport: a,
142
157
  reachEnd: () => l(!0)
143
158
  }));
144
- return E(() => {
159
+ return D(() => {
145
160
  typeof o == "object" && a.current?.scrollTo({
146
161
  top: o.top,
147
162
  left: o.left ?? 0,
148
163
  behavior: "instant"
149
164
  });
150
- }, [o, a]), /* @__PURE__ */ A(K.Provider, {
165
+ }, [o, a]), /* @__PURE__ */ j(K.Provider, {
151
166
  value: u,
152
- children: /* @__PURE__ */ A(L, {
167
+ children: /* @__PURE__ */ j(R, {
153
168
  stickToEnd: n && c,
154
169
  controller: s,
155
170
  className: "x1n2onr6 x78zum5 xdt5ytf x5yr21d x2lwn1j xeuugli xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
@@ -158,10 +173,10 @@ function ue({ children: e, initialPosition: t = "end", shouldFollow: n = !0, vie
158
173
  });
159
174
  }
160
175
  function de({ label: e, children: t, scrollRestorationId: n }) {
161
- let { viewport: r, reachEnd: i } = q(), a = C((e) => {
176
+ let { viewport: r, reachEnd: i } = q(), a = w((e) => {
162
177
  r.current = e, e !== null && J(e) && i();
163
178
  }, [r, i]);
164
- return /* @__PURE__ */ A(B, {
179
+ return /* @__PURE__ */ j(V, {
165
180
  ref: a,
166
181
  role: "region",
167
182
  "aria-label": e,
@@ -174,8 +189,8 @@ function de({ label: e, children: t, scrollRestorationId: n }) {
174
189
  children: t
175
190
  });
176
191
  }
177
- function Y({ children: e, isStreaming: t = !1 }) {
178
- return /* @__PURE__ */ A(R, {
192
+ function fe({ children: e, isStreaming: t = !1 }) {
193
+ return /* @__PURE__ */ j(z, {
179
194
  "aria-live": "polite",
180
195
  "aria-relevant": "additions",
181
196
  "aria-busy": t,
@@ -183,48 +198,48 @@ function Y({ children: e, isStreaming: t = !1 }) {
183
198
  children: e
184
199
  });
185
200
  }
186
- function fe({ messageId: e, shouldRevealOnAppend: t = !1, children: n }) {
201
+ function Y({ messageId: e, shouldRevealOnAppend: t = !1, children: n }) {
187
202
  let { controller: r } = q();
188
- return E(() => {
203
+ return D(() => {
189
204
  t && r.scrollToEnd({ behavior: "instant" });
190
205
  }, [
191
206
  e,
192
207
  t,
193
208
  r
194
- ]), /* @__PURE__ */ A("div", {
209
+ ]), /* @__PURE__ */ j("div", {
195
210
  "data-message-id": e,
196
211
  className: "xeuugli xj0a0fe",
197
212
  children: n
198
213
  });
199
214
  }
200
215
  function pe({ children: e }) {
201
- return /* @__PURE__ */ A("div", {
216
+ return /* @__PURE__ */ j("div", {
202
217
  className: "x9f619 x2lah0s xeuugli xh8yej3 xe10afn xvueqy4 xn9t2bk x1m92p3w",
203
218
  children: e
204
219
  });
205
220
  }
206
221
  function me({ label: e = "Jump to latest" }) {
207
- return /* @__PURE__ */ A(z, { render: (t, { visible: r }) => /* @__PURE__ */ A("div", {
222
+ return /* @__PURE__ */ j(B, { render: (n, { visible: r }) => /* @__PURE__ */ j("div", {
208
223
  hidden: !r,
209
224
  className: "x10l6tqk xwthv0x x1nrll8i xuuh30 x1tv4vx4 xeuugli",
210
- children: /* @__PURE__ */ j(n, {
211
- ...t,
212
- children: [/* @__PURE__ */ A(M, {
225
+ children: /* @__PURE__ */ M(t, {
226
+ ...n,
227
+ children: [/* @__PURE__ */ j(N, {
213
228
  size: 14,
214
229
  "aria-hidden": !0
215
230
  }), e]
216
231
  })
217
232
  }) });
218
233
  }
219
- function he({ label: e, onActivate: t }) {
234
+ function he({ label: e, onActivate: n }) {
220
235
  let { controller: r, viewport: i } = q();
221
- return /* @__PURE__ */ j(n, {
236
+ return /* @__PURE__ */ M(t, {
222
237
  onClick: () => {
223
- t?.(), requestAnimationFrame(() => {
238
+ n?.(), requestAnimationFrame(() => {
224
239
  r.scrollToEnd({ behavior: "instant" }), i.current?.focus({ preventScroll: !0 });
225
240
  });
226
241
  },
227
- children: [/* @__PURE__ */ A(M, {
242
+ children: [/* @__PURE__ */ j(N, {
228
243
  size: 14,
229
244
  "aria-hidden": !0
230
245
  }), e]
@@ -233,8 +248,8 @@ function he({ label: e, onActivate: t }) {
233
248
  var ge = {
234
249
  Root: ue,
235
250
  Viewport: de,
236
- Content: Y,
237
- Item: fe,
251
+ Content: fe,
252
+ Item: Y,
238
253
  Controls: pe,
239
254
  LatestButton: he,
240
255
  JumpToLatest: me
@@ -251,6 +266,44 @@ var ge = {
251
266
  k63SB2: "xj57cvi",
252
267
  $$css: !0
253
268
  },
269
+ speaker: {
270
+ k1xSpc: "x3nfvp2",
271
+ kGNEyG: "x6s0dn4",
272
+ kmuXW: "x2lah0s",
273
+ k8WAf4: "x10dazmo",
274
+ kg3NbH: "x5g2kb4",
275
+ kaIpWk: "xy32g2j",
276
+ kGuDYH: "xy8obcc",
277
+ kLWn49: "xas2l8k",
278
+ k63SB2: "xk4h15q",
279
+ khDVqt: "xuxw1ft",
280
+ $$css: !0
281
+ },
282
+ speakerNeutral: {
283
+ kMwMTN: "x153jb6y",
284
+ kWkggS: "x1r7kqkb",
285
+ $$css: !0
286
+ },
287
+ speakerAccent: {
288
+ kMwMTN: "x1v5v99g",
289
+ kWkggS: "x1ld8el8",
290
+ $$css: !0
291
+ },
292
+ speakerPositive: {
293
+ kMwMTN: "x7ixh4y",
294
+ kWkggS: "x1r8u7ye",
295
+ $$css: !0
296
+ },
297
+ speakerWarning: {
298
+ kMwMTN: "x1f9ixgr",
299
+ kWkggS: "x1dqe72f",
300
+ $$css: !0
301
+ },
302
+ speakerNegative: {
303
+ kMwMTN: "xr5kp14",
304
+ kWkggS: "xcqwzn",
305
+ $$css: !0
306
+ },
254
307
  user: {
255
308
  k8WAf4: "x1qokhjc",
256
309
  kg3NbH: "x1m92p3w",
@@ -280,6 +333,12 @@ var ge = {
280
333
  assistant: X.assistant,
281
334
  system: X.system
282
335
  }, ve = {
336
+ neutral: X.speakerNeutral,
337
+ accent: X.speakerAccent,
338
+ positive: X.speakerPositive,
339
+ warning: X.speakerWarning,
340
+ negative: X.speakerNegative
341
+ }, ye = {
283
342
  user: X.bubble,
284
343
  assistant: X.chatReply,
285
344
  system: null
@@ -287,7 +346,7 @@ var ge = {
287
346
  function Z({ kind: e }) {
288
347
  return { kind: e };
289
348
  }
290
- var ye = k({
349
+ var be = A({
291
350
  name: "message",
292
351
  options: { kind: "string" },
293
352
  state: Z,
@@ -299,76 +358,85 @@ var ye = k({
299
358
  root: e({}),
300
359
  description: e({})
301
360
  })
302
- }), { Root: be, Description: xe } = x(ye, {
361
+ }), { Root: xe, Description: Se } = S(be, {
303
362
  root: "article",
304
363
  description: "div"
305
- }), Se = {
364
+ }), Ce = {
306
365
  "x-default-marker": "x-default-marker",
307
366
  $$css: !0
308
367
  };
309
- function Ce({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s, variant: c = "default" }) {
310
- let l = c === "chat", u = !l || a !== void 0 || i !== void 0, d = l && r === "assistant", p = u ? /* @__PURE__ */ j("header", {
368
+ function we({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avatar: a, actions: o, attachments: s, variant: c = "default", speaker: l, speakerTone: u = "neutral", quote: d }) {
369
+ let f = c === "chat", m = l !== void 0 && l.length > 0, h = d !== void 0 && d.length > 0, g = !f || a !== void 0 || i !== void 0 || m, _ = e.length > 0 && (!m || e !== l), v = e.length > 0 ? e : l ?? "", y = f && r === "assistant", b = g ? /* @__PURE__ */ M("header", {
311
370
  className: "x78zum5 x6s0dn4 x1hnptsi x1a02dak xeuugli",
312
371
  children: [
313
- a !== void 0 && /* @__PURE__ */ A("span", {
372
+ a !== void 0 && /* @__PURE__ */ j("span", {
314
373
  className: "x3nfvp2 x2lah0s",
315
374
  children: a
316
375
  }),
317
- /* @__PURE__ */ A("span", {
376
+ _ && /* @__PURE__ */ j("span", {
318
377
  className: "xk4h15q xeuugli xj0a0fe",
319
378
  children: e
320
379
  }),
321
- i !== void 0 && /* @__PURE__ */ A("div", {
322
- className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
380
+ m && /* @__PURE__ */ j("span", {
381
+ ...x.props(X.speaker, ve[u]),
382
+ children: l
383
+ }),
384
+ i !== void 0 && /* @__PURE__ */ j("div", {
385
+ className: "x153jb6y xy8obcc xas2l8k xss6m8b xeuugli xj0a0fe",
323
386
  children: i
324
387
  })
325
388
  ]
326
389
  }) : null;
327
- return /* @__PURE__ */ j(be, {
390
+ return /* @__PURE__ */ M(xe, {
328
391
  kind: r,
329
392
  ...n !== void 0 && { id: n },
330
- "aria-label": e,
331
- ...b.props(X.root, _e[r], l && ve[r], Se),
393
+ "aria-label": v,
394
+ ...x.props(X.root, _e[r], f && ye[r], Ce),
332
395
  children: [
333
- p,
334
- /* @__PURE__ */ A(xe, {
396
+ b,
397
+ h && /* @__PURE__ */ j("p", {
398
+ title: d,
399
+ className: "x1ghz6dp xyibt8p xyumdvf x1t7ytsu x97x49r x153jb6y xy8obcc xas2l8k xb3r6kr xlyipyv xuxw1ft xeuugli x193iq5w",
400
+ children: d
401
+ }),
402
+ /* @__PURE__ */ j(Se, {
335
403
  className: "xeuugli xj0a0fe x1ytb0s6",
336
- children: l && r === "assistant" && typeof t == "string" ? /* @__PURE__ */ A(f, { children: t }) : t
404
+ children: f && r === "assistant" && typeof t == "string" ? /* @__PURE__ */ j(p, { children: t }) : t
337
405
  }),
338
- s !== void 0 && /* @__PURE__ */ A("div", {
406
+ s !== void 0 && /* @__PURE__ */ j("div", {
339
407
  className: "x78zum5 x1a02dak x1qjc9v5 x1hnptsi xeuugli",
340
408
  children: s
341
409
  }),
342
- (o !== void 0 || d) && /* @__PURE__ */ A("footer", {
410
+ (o !== void 0 || y) && /* @__PURE__ */ j("footer", {
343
411
  ...{
344
412
  0: { className: "x78zum5 x1a02dak x6s0dn4 xeuugli xunmzkg x1hc1fzr x12vu8c0 xtf8l8m x1thm12b" },
345
413
  1: { className: "x78zum5 x1a02dak x6s0dn4 xeuugli xunmzkg x1hc1fzr x12vu8c0 xtf8l8m x1thm12b x17tes2r x17oiadl" }
346
- }[!!d | 0],
414
+ }[!!y | 0],
347
415
  children: o
348
416
  })
349
417
  ]
350
418
  });
351
419
  }
352
- function we({ name: e, description: t, href: n, actions: r }) {
353
- return /* @__PURE__ */ j("div", {
420
+ function Te({ name: e, description: t, href: n, actions: r }) {
421
+ return /* @__PURE__ */ M("div", {
354
422
  className: "x78zum5 x1a02dak x6s0dn4 x1n8ia3y xeuugli x193iq5w x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 x1hz01jw xtqrqnz x1778rvt xj57cvi",
355
423
  children: [
356
- /* @__PURE__ */ A(N, {
424
+ /* @__PURE__ */ j(P, {
357
425
  size: 16,
358
426
  "aria-hidden": !0,
359
427
  className: "x153jb6y x2lah0s"
360
428
  }),
361
- /* @__PURE__ */ j("div", {
429
+ /* @__PURE__ */ M("div", {
362
430
  className: "x78zum5 xdt5ytf xfko13i x1slnebi xeuugli xj0a0fe",
363
- children: [n === void 0 ? /* @__PURE__ */ A("span", { children: e }) : /* @__PURE__ */ A(d, {
431
+ children: [n === void 0 ? /* @__PURE__ */ j("span", { children: e }) : /* @__PURE__ */ j(f, {
364
432
  href: n,
365
433
  children: e
366
- }), t !== void 0 && /* @__PURE__ */ A("span", {
367
- className: "x153jb6y xy8obcc xas2l8k xeuugli xj0a0fe",
434
+ }), t !== void 0 && /* @__PURE__ */ j("span", {
435
+ className: "x153jb6y xy8obcc xas2l8k xss6m8b xeuugli xj0a0fe",
368
436
  children: t
369
437
  })]
370
438
  }),
371
- r !== void 0 && /* @__PURE__ */ A("div", {
439
+ r !== void 0 && /* @__PURE__ */ j("div", {
372
440
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli",
373
441
  children: r
374
442
  })
@@ -376,39 +444,39 @@ function we({ name: e, description: t, href: n, actions: r }) {
376
444
  });
377
445
  }
378
446
  // packages/ai/src/message-action.tsx
379
- function Te(n) {
380
- if (n.kind === "link") {
381
- let { kind: e, label: r, ...i } = n;
382
- return /* @__PURE__ */ A(t, {
383
- ...i,
384
- "aria-label": r
447
+ function Ee(e) {
448
+ if (e.kind === "link") {
449
+ let { kind: t, label: n, ...r } = e;
450
+ return /* @__PURE__ */ j(o, {
451
+ ...r,
452
+ "aria-label": n
385
453
  });
386
454
  }
387
- let { kind: r, label: i, ...a } = n;
388
- return /* @__PURE__ */ A(e, {
389
- ...a,
455
+ let { kind: t, label: n, ...i } = e;
456
+ return /* @__PURE__ */ j(r, {
457
+ ...i,
390
458
  variant: "ghost",
391
- "aria-label": i
459
+ "aria-label": n
392
460
  });
393
461
  }
394
- function Ee(e) {
395
- return /* @__PURE__ */ j(h.Root, { children: [/* @__PURE__ */ A(h.Trigger, { render: Te(e) }), /* @__PURE__ */ A(h.Popup, { children: e.label })] });
462
+ function De(e) {
463
+ return /* @__PURE__ */ M(g.Root, { children: [/* @__PURE__ */ j(g.Trigger, { render: Ee(e) }), /* @__PURE__ */ j(g.Popup, { children: e.label })] });
396
464
  }
397
465
  // packages/ai/src/message-boundary.tsx
398
- function De({ label: e, children: t }) {
399
- return /* @__PURE__ */ j(c.Root, {
466
+ function Oe({ label: e, children: t }) {
467
+ return /* @__PURE__ */ M(l.Root, {
400
468
  className: "xeuugli x1kbiq1m xykt701 xpu655y",
401
- children: [/* @__PURE__ */ j(c.Trigger, {
469
+ children: [/* @__PURE__ */ M(l.Trigger, {
402
470
  className: "xlqzeqv x1hnptsi x153jb6y xy8obcc xas2l8k xj57cvi",
403
- children: [/* @__PURE__ */ A(P, {
471
+ children: [/* @__PURE__ */ j(F, {
404
472
  size: 14,
405
473
  "aria-hidden": !0,
406
474
  className: "x2lah0s"
407
- }), /* @__PURE__ */ A("span", {
475
+ }), /* @__PURE__ */ j("span", {
408
476
  className: "xeuugli xj0a0fe",
409
477
  children: e
410
478
  })]
411
- }), /* @__PURE__ */ A(c.Panel, {
479
+ }), /* @__PURE__ */ j(l.Panel, {
412
480
  className: "x153jb6y xy8obcc xas2l8k",
413
481
  children: t
414
482
  })]
@@ -426,25 +494,25 @@ var Q = {
426
494
  $$css: !0
427
495
  }
428
496
  }, $ = "mod+enter";
429
- function Oe({ isCompact: e = !1 }) {
430
- return /* @__PURE__ */ A("div", {
497
+ function ke({ isCompact: e = !1 }) {
498
+ return /* @__PURE__ */ j("div", {
431
499
  "aria-hidden": !0,
432
500
  inert: !0,
433
501
  className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
434
- children: /* @__PURE__ */ j("div", {
502
+ children: /* @__PURE__ */ M("div", {
435
503
  className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep",
436
- children: [/* @__PURE__ */ A("div", {
437
- ...b.props(y.base, y.field, y.textarea, y.plainTextarea),
438
- children: /* @__PURE__ */ A(_, {
504
+ children: [/* @__PURE__ */ j("div", {
505
+ ...x.props(n.base, n.field, n.textarea, n.plainTextarea),
506
+ children: /* @__PURE__ */ j(v, {
439
507
  lines: e ? 1 : 2,
440
508
  width: "22ch"
441
509
  })
442
- }), /* @__PURE__ */ j("div", {
510
+ }), /* @__PURE__ */ M("div", {
443
511
  className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi",
444
- children: [/* @__PURE__ */ A("div", {
512
+ children: [/* @__PURE__ */ j("div", {
445
513
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd xy8obcc xas2l8k",
446
- children: /* @__PURE__ */ A(_, { width: "8ch" })
447
- }), /* @__PURE__ */ A(g, {
514
+ children: /* @__PURE__ */ j(v, { width: "8ch" })
515
+ }), /* @__PURE__ */ j(_, {
448
516
  isIconOnly: !0,
449
517
  xstyle: Q.action
450
518
  })]
@@ -452,132 +520,132 @@ function Oe({ isCompact: e = !1 }) {
452
520
  })
453
521
  });
454
522
  }
455
- function ke({ label: t, value: n, 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: m = "newline", history: g, isCompact: _ = !1, description: y, error: x, controls: S, attachments: C, onStop: w, isStopPending: T = !1, stopLabel: k = "Stop response" }) {
456
- let M = ne(), N = u, P = _ && C === void 0 && S === void 0, F = !N && !l && !d, L = ce($), R = D({
457
- history: g,
458
- value: n,
459
- onValueChange: r
523
+ function Ae({ label: e, value: t, onValueChange: n, 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: m = "newline", history: h, isCompact: _ = !1, description: v, error: S, controls: C, attachments: w, onStop: T, isStopPending: E = !1, stopLabel: A = "Stop response" }) {
524
+ let N = te(), P = u, F = _ && w === void 0 && C === void 0, I = !P && !l && !d, R = se($), z = O({
525
+ history: h,
526
+ value: t,
527
+ onValueChange: n
460
528
  });
461
- E(() => {
462
- R.current = {
463
- history: g,
464
- value: n,
465
- onValueChange: r
529
+ D(() => {
530
+ z.current = {
531
+ history: h,
532
+ value: t,
533
+ onValueChange: n
466
534
  };
467
535
  });
468
- let [z] = O(() => re({
469
- entries: () => R.current.history,
470
- read: () => R.current.value,
471
- write: (e, t) => !ie({ options: () => R.current }, "onValueChange", e, {
536
+ let [B] = k(() => ne({
537
+ entries: () => z.current.history,
538
+ read: () => z.current.value,
539
+ write: (e, t) => !re({ options: () => z.current }, "onValueChange", e, {
472
540
  reason: "input-change",
473
541
  event: t
474
542
  })
475
- })), B = `${f} · ${L.text}`;
476
- w === void 0 ? l ? B = p : m === "submit" && (B = `${f} · Enter`) : B = T ? "Stopping…" : k;
477
- function V(e) {
478
- if (z.keydown(e.nativeEvent) || e.key !== "Enter" || e.repeat || ae(e)) return;
479
- let t = I(e.nativeEvent, $), n = !t && I(e.nativeEvent, "enter");
480
- (t || m === "submit" && n) && (e.preventDefault(), F && w === void 0 && e.currentTarget.form?.requestSubmit());
481
- }
543
+ })), V = `${f} · ${R.text}`;
544
+ T === void 0 ? l ? V = p : m === "submit" && (V = `${f} · Enter`) : V = E ? "Stopping…" : A;
482
545
  function H(e) {
483
- e.preventDefault(), F && w === void 0 && i(e);
546
+ if (B.keydown(e.nativeEvent) || e.key !== "Enter" || e.repeat || ie(e)) return;
547
+ let t = L(e.nativeEvent, $), n = !t && L(e.nativeEvent, "enter");
548
+ (t || m === "submit" && n) && (e.preventDefault(), I && T === void 0 && e.currentTarget.form?.requestSubmit());
484
549
  }
485
- return /* @__PURE__ */ A("form", {
486
- onSubmit: H,
550
+ function U(e) {
551
+ e.preventDefault(), I && T === void 0 && i(e);
552
+ }
553
+ return /* @__PURE__ */ j("form", {
554
+ onSubmit: U,
487
555
  className: "x78zum5 xdt5ytf x1hnptsi xeuugli xh8yej3 xe10afn xvueqy4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
488
- children: /* @__PURE__ */ j(v.Root, {
489
- invalid: x !== void 0,
556
+ children: /* @__PURE__ */ M(b.Root, {
557
+ invalid: S !== void 0,
490
558
  children: [
491
- /* @__PURE__ */ A(v.Label, {
492
- ...b.props(te.hidden),
493
- children: t
559
+ /* @__PURE__ */ j(b.Label, {
560
+ ...x.props(ee.hidden),
561
+ children: e
494
562
  }),
495
- /* @__PURE__ */ j("div", {
563
+ /* @__PURE__ */ M("div", {
496
564
  ...{
497
565
  0: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep" },
498
566
  2: { className: "x78zum5 x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1q0g3np xuk3077 xn9t2bk" },
499
567
  1: { className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1oddvo6" },
500
568
  3: { className: "x78zum5 x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep x1q0g3np xuk3077 xn9t2bk x1oddvo6" }
501
- }[!!P << 1 | x !== void 0],
569
+ }[!!F << 1 | S !== void 0],
502
570
  children: [
503
- /* @__PURE__ */ A(ee, {
571
+ /* @__PURE__ */ j(y, {
504
572
  isSensitive: !0,
505
573
  appearance: "plain",
506
574
  rows: _ ? 1 : 2,
507
575
  isCompact: _,
508
- shouldGrow: P,
509
- xstyle: P ? Q.inlineInput : void 0,
576
+ shouldGrow: F,
577
+ xstyle: F ? Q.inlineInput : void 0,
510
578
  name: a,
511
- value: n,
512
- onValueChange: r,
513
- onKeyDown: V,
514
- placeholder: o ?? t,
579
+ value: t,
580
+ onValueChange: n,
581
+ onKeyDown: H,
582
+ placeholder: o ?? e,
515
583
  maxLength: s,
516
584
  required: c,
517
585
  disabled: u,
518
- "aria-errormessage": x === void 0 ? void 0 : M
586
+ "aria-errormessage": S === void 0 ? void 0 : N
519
587
  }),
520
- C,
521
- /* @__PURE__ */ j("div", {
588
+ w,
589
+ /* @__PURE__ */ M("div", {
522
590
  ...{
523
591
  0: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi" },
524
592
  1: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi x2lah0s" }
525
- }[!!P | 0],
526
- children: [S !== void 0 && /* @__PURE__ */ A("div", {
593
+ }[!!F | 0],
594
+ children: [C !== void 0 && /* @__PURE__ */ j("div", {
527
595
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
528
- children: S
529
- }), /* @__PURE__ */ j(h.Root, { children: [/* @__PURE__ */ A(h.Trigger, { render: w === void 0 ? /* @__PURE__ */ A(e, {
596
+ children: C
597
+ }), /* @__PURE__ */ M(g.Root, { children: [/* @__PURE__ */ j(g.Trigger, { render: T === void 0 ? /* @__PURE__ */ j(r, {
530
598
  xstyle: Q.action,
531
599
  type: "submit",
532
600
  "data-agent-confirm": f,
533
601
  variant: "solid",
534
602
  "aria-label": l ? p : f,
535
- "aria-keyshortcuts": m === "submit" ? `Enter ${L.ariaKeyshortcuts}` : L.ariaKeyshortcuts,
603
+ "aria-keyshortcuts": m === "submit" ? `Enter ${R.ariaKeyshortcuts}` : R.ariaKeyshortcuts,
536
604
  disabled: u || d,
537
605
  isPending: l,
538
- children: /* @__PURE__ */ A(oe, {
606
+ children: /* @__PURE__ */ j(ae, {
539
607
  size: 16,
540
608
  "aria-hidden": !0
541
609
  })
542
- }) : /* @__PURE__ */ A(e, {
610
+ }) : /* @__PURE__ */ j(r, {
543
611
  xstyle: Q.action,
544
612
  type: "button",
545
- "data-agent-confirm": k,
546
- "aria-label": T ? "Stopping…" : k,
613
+ "data-agent-confirm": A,
614
+ "aria-label": E ? "Stopping…" : A,
547
615
  onClick: (e) => {
548
- e.preventDefault(), w();
616
+ e.preventDefault(), T();
549
617
  },
550
618
  disabled: u,
551
- isPending: T,
552
- children: /* @__PURE__ */ A(se, {
619
+ isPending: E,
620
+ children: /* @__PURE__ */ j(oe, {
553
621
  size: 14,
554
622
  "aria-hidden": !0
555
623
  })
556
- }) }), /* @__PURE__ */ A(h.Popup, { children: B })] })]
624
+ }) }), /* @__PURE__ */ j(g.Popup, { children: V })] })]
557
625
  })
558
626
  ]
559
627
  }),
560
- y !== void 0 && /* @__PURE__ */ A(v.Description, { children: y }),
561
- x !== void 0 && /* @__PURE__ */ A(v.Error, {
562
- id: M,
628
+ v !== void 0 && /* @__PURE__ */ j(b.Description, { children: v }),
629
+ S !== void 0 && /* @__PURE__ */ j(b.Error, {
630
+ id: N,
563
631
  match: !0,
564
632
  role: "alert",
565
- children: x
633
+ children: S
566
634
  })
567
635
  ]
568
636
  })
569
637
  });
570
638
  }
571
639
  // packages/ai/src/reply-indicator.tsx
572
- function Ae({ label: e, delayMs: t = 200, isAnimated: n = !0 }) {
573
- let [r, i] = O(t === 0), { ref: a, isActive: o } = p(n && r);
574
- return T(() => {
640
+ function je({ label: e, delayMs: t = 200, isAnimated: n = !0 }) {
641
+ let [r, i] = k(t === 0), { ref: a, isActive: o } = m(n && r);
642
+ return E(() => {
575
643
  let e = setTimeout(() => i(!0), t);
576
644
  return () => clearTimeout(e);
577
- }, [t]), /* @__PURE__ */ A("div", {
645
+ }, [t]), /* @__PURE__ */ j("div", {
578
646
  ref: a,
579
647
  className: "x1tn5z8q x153jb6y x1hz01jw xtqrqnz x1ytb0s6",
580
- children: r && /* @__PURE__ */ A("span", {
648
+ children: r && /* @__PURE__ */ j("span", {
581
649
  role: "status",
582
650
  ...{
583
651
  0: {},
@@ -590,27 +658,27 @@ function Ae({ label: e, delayMs: t = 200, isAnimated: n = !0 }) {
590
658
  });
591
659
  }
592
660
  // packages/ai/src/sources.tsx
593
- function je({ sources: e, label: t = "Sources" }) {
594
- return /* @__PURE__ */ j("section", {
661
+ function Me({ sources: e, label: t = "Sources" }) {
662
+ return /* @__PURE__ */ M("section", {
595
663
  "aria-label": t,
596
664
  className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft",
597
665
  children: [
598
- /* @__PURE__ */ A("h3", {
666
+ /* @__PURE__ */ j("h3", {
599
667
  className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
600
668
  children: t
601
669
  }),
602
- e.length === 0 && /* @__PURE__ */ A("p", {
670
+ e.length === 0 && /* @__PURE__ */ j("p", {
603
671
  className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
604
672
  children: "No sources supplied."
605
673
  }),
606
- /* @__PURE__ */ A("ol", {
674
+ /* @__PURE__ */ j("ol", {
607
675
  className: "x78zum5 xdt5ytf x1n8ia3y x1ghz6dp x1717udv x3ct3a4",
608
- children: e.map((e) => /* @__PURE__ */ j("li", {
676
+ children: e.map((e) => /* @__PURE__ */ M("li", {
609
677
  className: "x78zum5 xdt5ytf xfko13i xeuugli xj0a0fe",
610
- children: [/* @__PURE__ */ A("span", { children: /* @__PURE__ */ A(d, {
678
+ children: [/* @__PURE__ */ j("span", { children: /* @__PURE__ */ j(f, {
611
679
  href: e.href,
612
680
  children: e.title
613
- }) }), e.description !== void 0 && /* @__PURE__ */ A("p", {
681
+ }) }), e.description !== void 0 && /* @__PURE__ */ j("p", {
614
682
  className: "x1ghz6dp x153jb6y xy8obcc xas2l8k xj0a0fe",
615
683
  children: e.description
616
684
  })]
@@ -619,22 +687,22 @@ function je({ sources: e, label: t = "Sources" }) {
619
687
  ]
620
688
  });
621
689
  }
622
- function Me({ source: e, label: t }) {
623
- return /* @__PURE__ */ A("span", {
690
+ function Ne({ source: t, label: n }) {
691
+ return /* @__PURE__ */ j("span", {
624
692
  className: "xt0psk2 x11njtxf xss6m8b",
625
- children: /* @__PURE__ */ j(m.Root, { children: [/* @__PURE__ */ A(m.Trigger, {
626
- render: /* @__PURE__ */ A(a, {}),
627
- "aria-label": `Source ${t}: ${e.title}`,
628
- children: t
629
- }), /* @__PURE__ */ A(m.Popup, {
693
+ children: /* @__PURE__ */ M(h.Root, { children: [/* @__PURE__ */ j(h.Trigger, {
694
+ render: /* @__PURE__ */ j(e, {}),
695
+ "aria-label": `Source ${n}: ${t.title}`,
696
+ children: n
697
+ }), /* @__PURE__ */ j(h.Popup, {
630
698
  side: "top",
631
- children: /* @__PURE__ */ j(r, {
699
+ children: /* @__PURE__ */ M(i, {
632
700
  isCompact: !0,
633
701
  children: [
634
- /* @__PURE__ */ A(m.Title, { children: e.title }),
635
- e.description !== void 0 && /* @__PURE__ */ A(m.Description, { children: e.description }),
636
- /* @__PURE__ */ A(d, {
637
- href: e.href,
702
+ /* @__PURE__ */ j(h.Title, { children: t.title }),
703
+ t.description !== void 0 && /* @__PURE__ */ j(h.Description, { children: t.description }),
704
+ /* @__PURE__ */ j(f, {
705
+ href: t.href,
638
706
  children: "Open source"
639
707
  })
640
708
  ]
@@ -642,4 +710,4 @@ function Me({ source: e, label: t }) {
642
710
  })] })
643
711
  });
644
712
  }
645
- export { H as Approval, le as CommandActivity, U as CommandDetails, ge as Conversation, Me as InlineCitation, Ce as Message, Ee as MessageAction, we as MessageAttachment, De as MessageBoundary, ke as PromptInput, Oe as PromptInputPlaceholder, Ae as ReplyIndicator, je as Sources };
713
+ export { U as Approval, le as CommandActivity, W as CommandDetails, ge as Conversation, Ne as InlineCitation, we as Message, De as MessageAction, Te as MessageAttachment, Oe as MessageBoundary, Ae as PromptInput, ke as PromptInputPlaceholder, je as ReplyIndicator, Me as Sources };