@mcp-b/react-components 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/dist/{AgentChat-B9LD_WF1.d.ts → AgentChat-Br6tKEl8.d.ts} +38 -10
  2. package/dist/{BrowserLiveView-ZktFZiMD.d.ts → BrowserLiveView-BV5qgFgI.d.ts} +11 -10
  3. package/dist/{BrowserReplay-6G-mnwcn.d.ts → BrowserReplay-xWvRjRAC.d.ts} +2 -1
  4. package/dist/{Button-Ct5I6aTu.d.ts → Button-FX_hpqxm.d.ts} +8 -11
  5. package/dist/{CodeBlock-XNQOupQ3.js → CodeBlock-BUFXG8HW.js} +22 -12
  6. package/dist/{CodeBlock-CxQXv3C4.d.ts → CodeBlock-DUh9WOGo.d.ts} +13 -7
  7. package/dist/{Combobox-D9anamNr.d.ts → Combobox-B9Fcd6q-.d.ts} +4 -14
  8. package/dist/{FileTree-wMyZhhHO.js → FileTree-mpEIcfzA.js} +1 -1
  9. package/dist/{Menu-B5vDqZe_.d.ts → Menu-Bgu-ufb5.d.ts} +29 -65
  10. package/dist/{ModelSelector-DXtpcRmT.js → ModelSelector-DVgVBdvw.js} +23 -20
  11. package/dist/{PromptInput-D6-G24p7.d.ts → PromptInput-p5KmOmt1.d.ts} +313 -89
  12. package/dist/Select-Dl_vF_Bt.d.ts +213 -0
  13. package/dist/{Tabs-D9EAq09D.d.ts → Tabs-3Zc4tb9D.d.ts} +9 -6
  14. package/dist/ThinkChat-7DQ2CogF.js +222 -0
  15. package/dist/{ThinkChatActivity-B2UD95My.d.ts → ThinkChatActivity-Cuk28Js_.d.ts} +4 -4
  16. package/dist/ThinkChatContext-C3Eb1Xpi.d.ts +16 -0
  17. package/dist/{ThinkChatToolParts-DnUiZgCC.d.ts → ThinkChatToolParts-Cv4o7j6F.d.ts} +13 -5
  18. package/dist/{attachment-preview-ChtC3HiU.js → attachment-preview-DIs50Q0h.js} +3 -3
  19. package/dist/components/Accordion.d.ts +17 -6
  20. package/dist/components/Accordion.js +23 -36
  21. package/dist/components/Activity.d.ts +5 -5
  22. package/dist/components/Activity.js +9 -9
  23. package/dist/components/AgentChat.d.ts +1 -1
  24. package/dist/components/AgentChat.js +354 -132
  25. package/dist/components/AgentConnection.js +6 -22
  26. package/dist/components/AlertDialog.d.ts +40 -32
  27. package/dist/components/AlertDialog.js +46 -39
  28. package/dist/components/Artifact.d.ts +1 -1
  29. package/dist/components/Artifact.js +5 -5
  30. package/dist/components/Autocomplete.js +10 -2
  31. package/dist/components/Avatar.d.ts +2 -2
  32. package/dist/components/Avatar.js +3 -3
  33. package/dist/components/Badge.d.ts +11 -14
  34. package/dist/components/Badge.js +11 -33
  35. package/dist/components/BrowserLiveView.d.ts +1 -1
  36. package/dist/components/BrowserLiveView.js +39 -45
  37. package/dist/components/BrowserReplay.d.ts +1 -1
  38. package/dist/components/BrowserReplay.js +4 -4
  39. package/dist/components/BrowserRunPanel.js +91 -55
  40. package/dist/components/Button.d.ts +2 -2
  41. package/dist/components/Button.js +7 -30
  42. package/dist/components/ChainOfThought.d.ts +5 -5
  43. package/dist/components/ChainOfThought.js +8 -5
  44. package/dist/components/ChatGptSignInScreen.js +3 -3
  45. package/dist/components/Checkbox.d.ts +10 -2
  46. package/dist/components/Checkbox.js +13 -6
  47. package/dist/components/CheckboxGroup.d.ts +6 -6
  48. package/dist/components/CheckboxGroup.js +6 -6
  49. package/dist/components/CodeBlock.d.ts +1 -1
  50. package/dist/components/CodeBlock.js +1 -1
  51. package/dist/components/CodexModelSelector.d.ts +58 -0
  52. package/dist/components/CodexModelSelector.js +170 -0
  53. package/dist/components/Collapsible.d.ts +2 -4
  54. package/dist/components/Collapsible.js +9 -7
  55. package/dist/components/Combobox.d.ts +2 -2
  56. package/dist/components/Combobox.js +20 -22
  57. package/dist/components/Commit.d.ts +6 -6
  58. package/dist/components/Commit.js +14 -26
  59. package/dist/components/Context.js +5 -1
  60. package/dist/components/ContextMenu.d.ts +20 -72
  61. package/dist/components/ContextMenu.js +46 -56
  62. package/dist/components/Conversation.d.ts +3 -7
  63. package/dist/components/Conversation.js +3 -4
  64. package/dist/components/Dialog.d.ts +38 -30
  65. package/dist/components/Dialog.js +46 -34
  66. package/dist/components/EnvironmentVariables.d.ts +2 -7
  67. package/dist/components/EnvironmentVariables.js +13 -36
  68. package/dist/components/Field.d.ts +3 -3
  69. package/dist/components/Field.js +7 -8
  70. package/dist/components/Fieldset.d.ts +2 -2
  71. package/dist/components/Fieldset.js +2 -2
  72. package/dist/components/FileTree.js +1 -1
  73. package/dist/components/Label.d.ts +1 -1
  74. package/dist/components/Label.js +1 -1
  75. package/dist/components/Marker.js +1 -15
  76. package/dist/components/McpServerPicker.d.ts +31 -6
  77. package/dist/components/McpServerPicker.js +136 -72
  78. package/dist/components/Menu.d.ts +2 -2
  79. package/dist/components/Menu.js +41 -51
  80. package/dist/components/Menubar.d.ts +16 -52
  81. package/dist/components/Menubar.js +44 -56
  82. package/dist/components/Message.d.ts +4 -3
  83. package/dist/components/Message.js +16 -9
  84. package/dist/components/MessageScroller.d.ts +1 -1
  85. package/dist/components/MessageScroller.js +1 -1
  86. package/dist/components/Meter.js +5 -0
  87. package/dist/components/ModelSelector.d.ts +12 -9
  88. package/dist/components/ModelSelector.js +1 -1
  89. package/dist/components/NavigationMenu.d.ts +3 -14
  90. package/dist/components/NavigationMenu.js +22 -38
  91. package/dist/components/NumberField.js +6 -0
  92. package/dist/components/Popover.d.ts +21 -44
  93. package/dist/components/Popover.js +33 -23
  94. package/dist/components/PreviewCard.d.ts +20 -18
  95. package/dist/components/PreviewCard.js +30 -20
  96. package/dist/components/PricingPage.js +30 -29
  97. package/dist/components/Progress.d.ts +7 -3
  98. package/dist/components/Progress.js +9 -4
  99. package/dist/components/PromptInput.d.ts +2 -2
  100. package/dist/components/PromptInput.js +184 -148
  101. package/dist/components/Queue.d.ts +8 -19
  102. package/dist/components/Queue.js +6 -6
  103. package/dist/components/RadioGroup.d.ts +10 -9
  104. package/dist/components/RadioGroup.js +8 -9
  105. package/dist/components/Reasoning.d.ts +4 -4
  106. package/dist/components/Reasoning.js +12 -21
  107. package/dist/components/ScrollArea.d.ts +2 -9
  108. package/dist/components/ScrollArea.js +5 -23
  109. package/dist/components/Select.d.ts +2 -2
  110. package/dist/components/Select.js +100 -134
  111. package/dist/components/Slider.d.ts +10 -7
  112. package/dist/components/Slider.js +12 -11
  113. package/dist/components/Sources.d.ts +4 -4
  114. package/dist/components/Sources.js +8 -5
  115. package/dist/components/Stepper.js +2 -8
  116. package/dist/components/Switch.d.ts +6 -3
  117. package/dist/components/Switch.js +7 -4
  118. package/dist/components/Tabs.d.ts +2 -2
  119. package/dist/components/Tabs.js +9 -4
  120. package/dist/components/Task.d.ts +4 -4
  121. package/dist/components/Task.js +10 -6
  122. package/dist/components/Terminal.d.ts +2 -2
  123. package/dist/components/Terminal.js +5 -5
  124. package/dist/components/TestResults.d.ts +4 -4
  125. package/dist/components/TestResults.js +5 -5
  126. package/dist/components/ThinkChat.d.ts +37 -30
  127. package/dist/components/ThinkChat.js +1 -152
  128. package/dist/components/ThinkChatActivity.d.ts +2 -2
  129. package/dist/components/ThinkChatActivity.js +4 -11
  130. package/dist/components/ThinkChatContext.d.ts +2 -2
  131. package/dist/components/ThinkChatContext.js +9 -2
  132. package/dist/components/ThinkChatToolPanels.d.ts +1 -1
  133. package/dist/components/ThinkChatToolPanels.js +27 -15
  134. package/dist/components/ThinkChatToolParts.d.ts +1 -1
  135. package/dist/components/ThinkExecutionWorkbench.d.ts +10 -7
  136. package/dist/components/ThinkExecutionWorkbench.js +382 -359
  137. package/dist/components/ThinkFullApp.d.ts +16 -13
  138. package/dist/components/ThinkFullApp.js +35 -25
  139. package/dist/components/ThinkThreadPicker.d.ts +1 -31
  140. package/dist/components/ThinkThreadPicker.js +32 -171
  141. package/dist/components/ThinkThreadShell.d.ts +35 -0
  142. package/dist/components/ThinkThreadShell.js +146 -0
  143. package/dist/components/Toast.js +7 -0
  144. package/dist/components/ToggleGroup.d.ts +6 -2
  145. package/dist/components/ToggleGroup.js +6 -2
  146. package/dist/components/Toolbar.js +6 -0
  147. package/dist/components/Tooltip.d.ts +36 -27
  148. package/dist/components/Tooltip.js +45 -29
  149. package/dist/components/WebPreview.d.ts +1 -1
  150. package/dist/components/WebPreview.js +3 -3
  151. package/dist/components/WorkspaceExplorer.d.ts +6 -8
  152. package/dist/components/WorkspaceExplorer.js +9 -7
  153. package/dist/components/icons.d.ts +2 -2
  154. package/dist/components/icons.js +2 -2
  155. package/dist/{copy-button-C6JSKtFE.js → copy-button-DUMLYdsk.js} +7 -6
  156. package/dist/{copy-button-BKXqGiNm.d.ts → copy-button-DtPMgN7e.d.ts} +3 -2
  157. package/dist/icons-Ba9THQKz.js +64 -0
  158. package/dist/icons-CUCz_Sft.d.ts +210 -0
  159. package/dist/merge-refs-DF_7w2x_.js +18 -0
  160. package/dist/styles/accessibility.css +14 -0
  161. package/dist/styles/accordion.css +21 -61
  162. package/dist/styles/activity.css +23 -58
  163. package/dist/styles/agent-chat.css +49 -5
  164. package/dist/styles/agent-connection.css +8 -10
  165. package/dist/styles/alert-dialog.css +20 -26
  166. package/dist/styles/artifact.css +6 -6
  167. package/dist/styles/attachment-preview.css +1 -1
  168. package/dist/styles/autocomplete.css +5 -170
  169. package/dist/styles/avatar.css +8 -8
  170. package/dist/styles/badge.css +8 -10
  171. package/dist/styles/base-ui-motion.css +176 -0
  172. package/dist/styles/base.css +19 -25
  173. package/dist/styles/browser-live-view.css +7 -7
  174. package/dist/styles/browser-replay.css +5 -5
  175. package/dist/styles/browser-run-panel.css +59 -112
  176. package/dist/styles/button.css +48 -43
  177. package/dist/styles/card.css +3 -5
  178. package/dist/styles/chain-of-thought.css +14 -70
  179. package/dist/styles/chatgpt-sign-in-screen.css +3 -3
  180. package/dist/styles/checkbox-group.css +1 -1
  181. package/dist/styles/checkbox.css +3 -7
  182. package/dist/styles/code-block.css +10 -10
  183. package/dist/styles/codex-model-selector.css +186 -0
  184. package/dist/styles/collapsible.css +11 -27
  185. package/dist/styles/combobox.css +3 -149
  186. package/dist/styles/commit.css +19 -35
  187. package/dist/styles/context-menu.css +1 -77
  188. package/dist/styles/context.css +12 -12
  189. package/dist/styles/conversation.css +7 -7
  190. package/dist/styles/dialog.css +34 -55
  191. package/dist/styles/environment-variables.css +10 -10
  192. package/dist/styles/field.css +16 -58
  193. package/dist/styles/fieldset.css +2 -2
  194. package/dist/styles/file-tree.css +7 -9
  195. package/dist/styles/index.css +12 -2
  196. package/dist/styles/input.css +1 -51
  197. package/dist/styles/label.css +2 -2
  198. package/dist/styles/marker.css +2 -4
  199. package/dist/styles/mcp-server-picker.css +66 -19
  200. package/dist/styles/menu.css +6 -153
  201. package/dist/styles/menubar.css +6 -105
  202. package/dist/styles/message-scroller.css +1 -1
  203. package/dist/styles/message.css +87 -9
  204. package/dist/styles/meter.css +4 -20
  205. package/dist/styles/model-selector.css +32 -20
  206. package/dist/styles/navigation-menu.css +14 -54
  207. package/dist/styles/number-field.css +8 -23
  208. package/dist/styles/popover.css +13 -68
  209. package/dist/styles/preview-card.css +5 -46
  210. package/dist/styles/pricing-page.css +43 -43
  211. package/dist/styles/progress.css +7 -16
  212. package/dist/styles/prompt-input.css +100 -44
  213. package/dist/styles/queue.css +12 -28
  214. package/dist/styles/radio.css +4 -8
  215. package/dist/styles/reasoning.css +3 -62
  216. package/dist/styles/recipes.css +475 -0
  217. package/dist/styles/select.css +7 -103
  218. package/dist/styles/shell.css +3 -3
  219. package/dist/styles/slider.css +5 -7
  220. package/dist/styles/sources.css +9 -66
  221. package/dist/styles/stepper.css +16 -14
  222. package/dist/styles/streamdown.css +11 -57
  223. package/dist/styles/switch.css +4 -7
  224. package/dist/styles/tabs.css +7 -8
  225. package/dist/styles/task.css +13 -42
  226. package/dist/styles/terminal.css +7 -7
  227. package/dist/styles/test-results.css +21 -37
  228. package/dist/styles/think-execution-workbench.css +337 -0
  229. package/dist/styles/think-full-app.css +27 -410
  230. package/dist/styles/think-resize-handle.css +33 -0
  231. package/dist/styles/think-thread-picker.css +18 -247
  232. package/dist/styles/think-thread-shell.css +219 -0
  233. package/dist/styles/toast.css +14 -25
  234. package/dist/styles/toggle-group.css +16 -14
  235. package/dist/styles/toggle.css +14 -15
  236. package/dist/styles/toolbar.css +13 -25
  237. package/dist/styles/tooltip.css +6 -16
  238. package/dist/styles/web-preview.css +15 -15
  239. package/dist/styles/workspace-explorer.css +21 -14
  240. package/dist/summarize-tool-input-BUJsENSn.js +12 -0
  241. package/dist/utils/codex-model-catalog.d.ts +142 -0
  242. package/dist/utils/codex-model-catalog.js +112 -0
  243. package/dist/utils/structured-code.d.ts +1 -1
  244. package/package.json +8 -2
  245. package/dist/Select-CRsKCJ9x.d.ts +0 -200
  246. package/dist/ThinkChatContext-BLAAb8J5.d.ts +0 -28
  247. package/dist/components/McpServerConnections.d.ts +0 -41
  248. package/dist/components/McpServerConnections.js +0 -188
  249. package/dist/components/useStickToBottom.d.ts +0 -33
  250. package/dist/components/useStickToBottom.js +0 -107
  251. package/dist/icons-CbjtbIJK.d.ts +0 -51
  252. package/dist/icons-D2Q5n5C1.js +0 -291
  253. package/dist/styles/mcp-server-connections.css +0 -145
@@ -1,27 +1,19 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { C as MonitorIcon, E as PencilIcon, F as WarningIcon, L as XIcon, M as SpinnerIcon, N as SquareIcon, O as PlusIcon, h as FileIcon, i as ArrowUpIcon, o as ChevronDownIcon, w as PaperclipIcon } from "../icons-D2Q5n5C1.js";
2
+ import { D as PencilIcon, F as StopIcon, L as WarningIcon, N as SpinnerIcon, P as SquareIcon, S as MicrophoneIcon, T as PaperclipIcon, h as FileIcon, i as ArrowUpIcon, k as PlusIcon, o as ChevronDownIcon, w as MonitorIcon, z as XIcon } from "../icons-Ba9THQKz.js";
3
3
  import { Button } from "./Button.js";
4
- import { Tooltip, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipTrigger } from "./Tooltip.js";
5
- import { t as AttachmentPreview } from "../attachment-preview-ChtC3HiU.js";
6
- import { Combobox, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxList, ComboboxSeparator } from "./Combobox.js";
7
- import { MenuContent, MenuItem, MenuPopup, MenuPortal, MenuPositioner, MenuRadioGroup, MenuRadioItem, MenuRadioItemIndicator, MenuRoot, MenuTrigger } from "./Menu.js";
8
- import { Select, SelectContent, SelectItem, SelectPortal, SelectPositioner, SelectTrigger, SelectValue } from "./Select.js";
9
- import { Tab, TabPanel, TabsList } from "./Tabs.js";
4
+ import { Tooltip } from "./Tooltip.js";
5
+ import { t as AttachmentPreview } from "../attachment-preview-DIs50Q0h.js";
6
+ import { Combobox } from "./Combobox.js";
7
+ import { Menu } from "./Menu.js";
8
+ import { Select } from "./Select.js";
9
+ import { Tabs } from "./Tabs.js";
10
10
  import * as React from "react";
11
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
12
  import { getToolApproval, getToolInput, getToolOutput } from "@cloudflare/think/react";
13
13
  import { getToolName, isToolUIPart } from "ai";
14
14
  //#region src/components/PromptInput.tsx
15
- const PromptInputContext = React.createContext(null);
16
15
  const PromptInputController = React.createContext(null);
17
- const ProviderAttachmentsContext = React.createContext(null);
18
16
  const LocalAttachmentsContext = React.createContext(null);
19
- const LocalReferencedSourcesContext = React.createContext(null);
20
- function usePromptInputContext(component) {
21
- const ctx = React.useContext(PromptInputContext);
22
- if (!ctx) throw new Error(`${component} must be used inside a <PromptInput>.`);
23
- return ctx;
24
- }
25
17
  function usePromptInputController() {
26
18
  const ctx = React.useContext(PromptInputController);
27
19
  if (!ctx) throw new Error("Wrap your component inside <PromptInputProvider> to use usePromptInputController().");
@@ -31,24 +23,16 @@ function useOptionalPromptInputController() {
31
23
  return React.useContext(PromptInputController);
32
24
  }
33
25
  function useProviderAttachments() {
34
- const ctx = React.useContext(ProviderAttachmentsContext);
35
- if (!ctx) throw new Error("Wrap your component inside <PromptInputProvider> to use useProviderAttachments().");
36
- return ctx;
37
- }
38
- function useOptionalProviderAttachments() {
39
- return React.useContext(ProviderAttachmentsContext);
26
+ const controller = useOptionalPromptInputController();
27
+ if (!controller) throw new Error("Wrap your component inside <PromptInputProvider> to use useProviderAttachments().");
28
+ return controller.attachments;
40
29
  }
41
30
  function usePromptInputAttachments() {
42
- const provider = useOptionalProviderAttachments();
43
- const context = React.useContext(LocalAttachmentsContext) ?? provider;
31
+ const controller = useOptionalPromptInputController();
32
+ const context = React.useContext(LocalAttachmentsContext) ?? controller?.attachments;
44
33
  if (!context) throw new Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider.");
45
34
  return context;
46
35
  }
47
- function usePromptInputReferencedSources() {
48
- const ctx = React.useContext(LocalReferencedSourcesContext);
49
- if (!ctx) throw new Error("usePromptInputReferencedSources must be used within a PromptInput.");
50
- return ctx;
51
- }
52
36
  function PromptInputProvider({ initialInput = "", children }) {
53
37
  const [textInput, setTextInput] = React.useState(initialInput);
54
38
  const [attachmentFiles, setAttachmentFiles] = React.useState([]);
@@ -103,10 +87,7 @@ function PromptInputProvider({ initialInput = "", children }) {
103
87
  }), [attachments, textInput]);
104
88
  return /* @__PURE__ */ jsx(PromptInputController.Provider, {
105
89
  value: controller,
106
- children: /* @__PURE__ */ jsx(ProviderAttachmentsContext.Provider, {
107
- value: attachments,
108
- children
109
- })
90
+ children
110
91
  });
111
92
  }
112
93
  /**
@@ -116,8 +97,8 @@ function PromptInputProvider({ initialInput = "", children }) {
116
97
  *
117
98
  * Use for assistant/chat submit forms. Do not use it as a generic textarea or
118
99
  * non-chat form. Sigvelo changes: uses shared Menu, Select, Combobox, Tabs,
119
- * Button, and Tooltip components; maps styles to CSS tokens; adds local
120
- * attachment and referenced-source helpers.
100
+ * Button, and Tooltip components; maps styles to CSS tokens; and adds local
101
+ * attachment helpers.
121
102
  *
122
103
  * The form handles Enter-to-submit while multiline editing remains in the
123
104
  * textarea. Attachment controls need accessible labels through their buttons
@@ -140,15 +121,12 @@ function PromptInputProvider({ initialInput = "", children }) {
140
121
  *
141
122
  * @see {@link https://elements.ai-sdk.dev/components/prompt-input | AI Elements Prompt Input}
142
123
  */
143
- function PromptInput({ className, accept, multiple, globalDrop, syncHiddenInput, maxFiles, maxFileSize, onError, onSubmit, children, id, ref, ...props }) {
144
- const generatedId = React.useId();
145
- const formId = id ?? generatedId;
124
+ function PromptInput({ className, accept, multiple, globalDrop, syncHiddenInput, maxFiles, maxFileSize, onError, onSubmit, children, ref, ...props }) {
146
125
  const controller = useOptionalPromptInputController();
147
126
  const usingProvider = Boolean(controller);
148
127
  const formRef = React.useRef(null);
149
128
  const inputRef = React.useRef(null);
150
129
  const [localFiles, setLocalFiles] = React.useState([]);
151
- const [referencedSources, setReferencedSources] = React.useState([]);
152
130
  const files = controller?.attachments.files ?? localFiles;
153
131
  const filesRef = React.useRef(files);
154
132
  filesRef.current = files;
@@ -215,11 +193,6 @@ function PromptInput({ className, accept, multiple, globalDrop, syncHiddenInput,
215
193
  return [];
216
194
  });
217
195
  }, [controller]);
218
- const clearReferencedSources = React.useCallback(() => setReferencedSources([]), []);
219
- const clear = React.useCallback(() => {
220
- clearAttachments();
221
- clearReferencedSources();
222
- }, [clearAttachments, clearReferencedSources]);
223
196
  const openFileDialog = React.useCallback(() => inputRef.current?.click(), []);
224
197
  React.useEffect(() => {
225
198
  if (!controller) return;
@@ -261,25 +234,6 @@ function PromptInput({ className, accept, multiple, globalDrop, syncHiddenInput,
261
234
  openFileDialog,
262
235
  remove
263
236
  ]);
264
- const referencedSourcesCtx = React.useMemo(() => ({
265
- add: (incoming) => {
266
- const array = Array.isArray(incoming) ? incoming : [incoming];
267
- setReferencedSources((prev) => [...prev, ...array.map((source) => ({
268
- ...source,
269
- id: source.id ?? createId()
270
- }))]);
271
- },
272
- clear: clearReferencedSources,
273
- remove: (sourceId) => setReferencedSources((prev) => prev.filter((source) => source.id !== sourceId)),
274
- sources: referencedSources
275
- }), [clearReferencedSources, referencedSources]);
276
- const submit = React.useCallback(() => {
277
- formRef.current?.requestSubmit();
278
- }, []);
279
- const ctx = React.useMemo(() => ({
280
- formId,
281
- submit
282
- }), [formId, submit]);
283
237
  const handleSubmit = React.useCallback(async (event) => {
284
238
  event.preventDefault();
285
239
  const textarea = event.currentTarget.querySelector("textarea[data-prompt-input-textarea=\"true\"]");
@@ -295,42 +249,35 @@ function PromptInput({ className, accept, multiple, globalDrop, syncHiddenInput,
295
249
  textarea.dispatchEvent(new Event("input", { bubbles: true }));
296
250
  }
297
251
  controller?.textInput.clear();
298
- clear();
252
+ clearAttachments();
299
253
  } catch {}
300
254
  }, [
301
- clear,
255
+ clearAttachments,
302
256
  controller,
303
257
  files,
304
258
  onSubmit
305
259
  ]);
306
- return /* @__PURE__ */ jsx(PromptInputContext.Provider, {
307
- value: ctx,
308
- children: /* @__PURE__ */ jsx(LocalAttachmentsContext.Provider, {
309
- value: attachmentsCtx,
310
- children: /* @__PURE__ */ jsxs(LocalReferencedSourcesContext.Provider, {
311
- value: referencedSourcesCtx,
312
- children: [/* @__PURE__ */ jsx("input", {
313
- ref: inputRef,
314
- accept,
315
- "aria-label": "Upload files",
316
- className: "prompt-input__file-input",
317
- multiple,
318
- onChange: (event) => {
319
- if (event.currentTarget.files?.length) add(event.currentTarget.files);
320
- event.currentTarget.value = "";
321
- },
322
- tabIndex: -1,
323
- type: "file"
324
- }), /* @__PURE__ */ jsx("form", {
325
- ref: formRef,
326
- id: formId,
327
- className: cx("prompt-input", className),
328
- onSubmit: handleSubmit,
329
- ...props,
330
- children
331
- })]
332
- })
333
- })
260
+ return /* @__PURE__ */ jsxs(LocalAttachmentsContext.Provider, {
261
+ value: attachmentsCtx,
262
+ children: [/* @__PURE__ */ jsx("input", {
263
+ ref: inputRef,
264
+ accept,
265
+ "aria-label": "Upload files",
266
+ className: "prompt-input__file-input",
267
+ multiple,
268
+ onChange: (event) => {
269
+ if (event.currentTarget.files?.length) add(event.currentTarget.files);
270
+ event.currentTarget.value = "";
271
+ },
272
+ tabIndex: -1,
273
+ type: "file"
274
+ }), /* @__PURE__ */ jsx("form", {
275
+ ref: formRef,
276
+ className: cx("prompt-input", className),
277
+ onSubmit: handleSubmit,
278
+ ...props,
279
+ children
280
+ })]
334
281
  });
335
282
  }
336
283
  function PromptInputHeader({ className, children, ref, ...props }) {
@@ -421,7 +368,6 @@ function PromptInputTools({ className, children, ref, ...props }) {
421
368
  const MIN_TEXTAREA_HEIGHT_PX = 24;
422
369
  const MAX_TEXTAREA_HEIGHT_PX = 240;
423
370
  function PromptInputTextarea({ className, placeholder = "How can I help?", rows = 1, minHeight = MIN_TEXTAREA_HEIGHT_PX, maxHeight = MAX_TEXTAREA_HEIGHT_PX, onChange, onCompositionEnd, onCompositionStart, onKeyDown, onInput, onPaste, ref, ...props }) {
424
- const { submit } = usePromptInputContext("PromptInputTextarea");
425
371
  const controller = useOptionalPromptInputController();
426
372
  const attachments = usePromptInputAttachments();
427
373
  const innerRef = React.useRef(null);
@@ -470,7 +416,7 @@ function PromptInputTextarea({ className, placeholder = "How can I help?", rows
470
416
  if (event.defaultPrevented) return;
471
417
  if (event.key === "Enter" && !event.shiftKey && !isComposing && !event.nativeEvent.isComposing) {
472
418
  event.preventDefault();
473
- submit();
419
+ event.currentTarget.form?.requestSubmit();
474
420
  }
475
421
  if (event.key === "Backspace" && event.currentTarget.value === "" && attachments.files.length > 0) {
476
422
  event.preventDefault();
@@ -516,10 +462,10 @@ function PromptInputButton({ className, tooltip, variant = "ghost", color = "neu
516
462
  children
517
463
  });
518
464
  if (!tooltipConfig) return button;
519
- return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: button }), /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsx(TooltipPositioner, {
465
+ return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: button }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
520
466
  side: tooltipConfig.side,
521
467
  sideOffset: 6,
522
- children: /* @__PURE__ */ jsxs(TooltipPopup, { children: [/* @__PURE__ */ jsx("span", {
468
+ children: /* @__PURE__ */ jsxs(Tooltip.Popup, { children: [/* @__PURE__ */ jsx("span", {
523
469
  className: "prompt-input__tooltip-content",
524
470
  children: tooltipConfig.content
525
471
  }), tooltipConfig.shortcut ? /* @__PURE__ */ jsx("kbd", {
@@ -528,25 +474,118 @@ function PromptInputButton({ className, tooltip, variant = "ghost", color = "neu
528
474
  }) : null] })
529
475
  }) })] });
530
476
  }
477
+ /**
478
+ * Voice-dictation control for PromptInput. Final upstream transcripts are
479
+ * appended to the composer while interim text remains ephemeral.
480
+ */
481
+ function PromptInputDictation({ voice, className, disabled, ref, ...props }) {
482
+ const controller = useOptionalPromptInputController();
483
+ const buttonRef = React.useRef(null);
484
+ const committedTranscriptRef = React.useRef("");
485
+ const [isStarting, setIsStarting] = React.useState(false);
486
+ const [startError, setStartError] = React.useState(null);
487
+ React.useImperativeHandle(ref, () => buttonRef.current, []);
488
+ React.useEffect(() => {
489
+ const transcript = voice.transcript;
490
+ if (!transcript) return;
491
+ const previous = committedTranscriptRef.current;
492
+ const addition = transcript.startsWith(previous) ? transcript.slice(previous.length).trim() : transcript.trim();
493
+ committedTranscriptRef.current = transcript;
494
+ if (!addition) return;
495
+ if (controller) {
496
+ controller.textInput.setInput(appendDictationTranscript(controller.textInput.value, addition));
497
+ return;
498
+ }
499
+ const textarea = buttonRef.current?.form?.querySelector("textarea[data-prompt-input-textarea=\"true\"]");
500
+ if (!textarea) return;
501
+ textarea.value = appendDictationTranscript(textarea.value, addition);
502
+ textarea.dispatchEvent(new Event("input", { bubbles: true }));
503
+ }, [controller, voice.transcript]);
504
+ const error = startError ?? voice.error;
505
+ const listening = voice.isListening;
506
+ const label = listening ? "Stop dictation" : error ? "Retry dictation" : "Start dictation";
507
+ const status = error ? `Dictation failed: ${error}` : listening ? voice.interimTranscript ? "Listening. Speech detected." : "Listening for speech." : isStarting ? "Starting dictation." : "";
508
+ const level = Math.min(Math.max(voice.audioLevel, 0), 1);
509
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PromptInputButton, {
510
+ ref: buttonRef,
511
+ className: cx("prompt-input__dictation", className),
512
+ tooltip: {
513
+ content: label,
514
+ side: "top"
515
+ },
516
+ "aria-label": label,
517
+ "aria-pressed": listening,
518
+ "data-error": error ? "true" : void 0,
519
+ "data-listening": listening ? "true" : void 0,
520
+ "data-starting": isStarting ? "true" : void 0,
521
+ disabled: disabled || isStarting,
522
+ onClick: () => {
523
+ setStartError(null);
524
+ if (listening) {
525
+ voice.stop();
526
+ return;
527
+ }
528
+ setIsStarting(true);
529
+ voice.start().catch((reason) => {
530
+ setStartError(reason instanceof Error ? reason.message : String(reason));
531
+ }).finally(() => setIsStarting(false));
532
+ },
533
+ ...props,
534
+ children: /* @__PURE__ */ jsx("span", {
535
+ className: "prompt-input__dictation-icon",
536
+ style: { "--prompt-input-dictation-level": level },
537
+ "aria-hidden": "true",
538
+ children: isStarting ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : listening ? /* @__PURE__ */ jsx(StopIcon, {}) : /* @__PURE__ */ jsx(MicrophoneIcon, {})
539
+ })
540
+ }), /* @__PURE__ */ jsx("span", {
541
+ className: "prompt-input__dictation-status",
542
+ role: "status",
543
+ "aria-live": "polite",
544
+ "aria-atomic": "true",
545
+ children: status
546
+ })] });
547
+ }
548
+ function appendDictationTranscript(current, transcript) {
549
+ if (!current) return transcript;
550
+ return `${current}${/\s$/u.test(current) ? "" : " "}${transcript}`;
551
+ }
531
552
  function PromptInputActionMenu(props) {
532
- return /* @__PURE__ */ jsx(MenuRoot, { ...props });
553
+ return /* @__PURE__ */ jsx(Menu.Root, { ...props });
533
554
  }
534
555
  function PromptInputActionMenuTrigger({ className, children, ...props }) {
535
- return /* @__PURE__ */ jsx(MenuTrigger, { render: /* @__PURE__ */ jsx(PromptInputButton, {
536
- className,
537
- ...props,
538
- children: children ?? /* @__PURE__ */ jsx(PlusIcon, {})
539
- }) });
540
- }
541
- function PromptInputActionMenuContent({ className, children, ...props }) {
542
- return /* @__PURE__ */ jsx(MenuContent, {
543
- className: cx("prompt-input__action-menu", className),
544
- ...props,
545
- children
556
+ return /* @__PURE__ */ jsx(Menu.Trigger, {
557
+ unstyled: true,
558
+ render: /* @__PURE__ */ jsx(PromptInputButton, {
559
+ className: cx("prompt-input__action-menu-trigger", className),
560
+ ...props,
561
+ children: children ?? /* @__PURE__ */ jsx(PlusIcon, {})
562
+ })
546
563
  });
547
564
  }
565
+ function PromptInputActionMenuContent({ anchor, positionMethod, side, sideOffset = 4, align, alignOffset, collisionBoundary, collisionPadding, sticky, arrowPadding, disableAnchorTracking, collisionAvoidance, className, children, tabIndex = 0, ...props }) {
566
+ return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
567
+ anchor,
568
+ positionMethod,
569
+ side,
570
+ sideOffset,
571
+ align,
572
+ alignOffset,
573
+ collisionBoundary,
574
+ collisionPadding,
575
+ sticky,
576
+ arrowPadding,
577
+ disableAnchorTracking,
578
+ collisionAvoidance,
579
+ children: /* @__PURE__ */ jsx(Menu.Popup, {
580
+ tabIndex,
581
+ className: cx("prompt-input__action-menu", className),
582
+ ...props,
583
+ children
584
+ })
585
+ }) });
586
+ }
548
587
  function PromptInputActionMenuItem({ className, ...props }) {
549
- return /* @__PURE__ */ jsx(MenuItem, {
588
+ return /* @__PURE__ */ jsx(Menu.Item, {
550
589
  className: cx("prompt-input__action-menu-item", className),
551
590
  ...props
552
591
  });
@@ -595,28 +634,32 @@ const PERMISSION_MODES = [{
595
634
  * whoever owns the approvals (`AgentChat` wires both ends).
596
635
  */
597
636
  function PromptInputPermissionSelector({ value, onValueChange, question = "How should agent actions be approved?" }) {
598
- return /* @__PURE__ */ jsxs(MenuRoot, { children: [/* @__PURE__ */ jsx(MenuTrigger, { render: /* @__PURE__ */ jsxs(PromptInputButton, {
599
- size: "xs",
600
- className: "prompt-input__permissions-trigger",
601
- "data-mode": value,
602
- "aria-label": (PERMISSION_MODES.find((mode) => mode.value === value) ?? PERMISSION_MODES[0]).label,
603
- children: [/* @__PURE__ */ jsx("span", {
604
- className: "prompt-input__permissions-current",
605
- children: PERMISSION_MODES.map((mode) => /* @__PURE__ */ jsxs("span", {
606
- className: "prompt-input__permissions-current-option",
607
- "data-active": mode.value === value || void 0,
608
- children: [mode.value === "bypass" ? /* @__PURE__ */ jsx(WarningIcon, { size: 14 }) : null, mode.label]
609
- }, mode.value))
610
- }), /* @__PURE__ */ jsx(ChevronDownIcon, { size: 12 })]
611
- }) }), /* @__PURE__ */ jsx(MenuPortal, { children: /* @__PURE__ */ jsx(MenuPositioner, { children: /* @__PURE__ */ jsxs(MenuPopup, {
637
+ const selected = PERMISSION_MODES.find((mode) => mode.value === value) ?? PERMISSION_MODES[0];
638
+ return /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsx(Menu.Trigger, {
639
+ unstyled: true,
640
+ render: /* @__PURE__ */ jsxs(PromptInputButton, {
641
+ size: "xs",
642
+ className: "prompt-input__permissions-trigger",
643
+ "data-mode": value,
644
+ "aria-label": selected.label,
645
+ children: [/* @__PURE__ */ jsx("span", {
646
+ className: "prompt-input__permissions-current",
647
+ children: PERMISSION_MODES.map((mode) => /* @__PURE__ */ jsxs("span", {
648
+ className: "prompt-input__permissions-current-option",
649
+ "data-active": mode.value === value || void 0,
650
+ children: [mode.value === "bypass" ? /* @__PURE__ */ jsx(WarningIcon, { size: 14 }) : null, mode.label]
651
+ }, mode.value))
652
+ }), /* @__PURE__ */ jsx(ChevronDownIcon, { size: 12 })]
653
+ })
654
+ }), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { children: /* @__PURE__ */ jsxs(Menu.Popup, {
612
655
  className: "prompt-input__permissions-menu",
613
656
  children: [/* @__PURE__ */ jsx("div", {
614
657
  className: "prompt-input__permissions-question",
615
658
  children: question
616
- }), /* @__PURE__ */ jsx(MenuRadioGroup, {
659
+ }), /* @__PURE__ */ jsx(Menu.RadioGroup, {
617
660
  value,
618
661
  onValueChange: (mode) => onValueChange(mode),
619
- children: PERMISSION_MODES.map((mode) => /* @__PURE__ */ jsxs(MenuRadioItem, {
662
+ children: PERMISSION_MODES.map((mode) => /* @__PURE__ */ jsxs(Menu.RadioItem, {
620
663
  value: mode.value,
621
664
  closeOnClick: true,
622
665
  className: "prompt-input__permissions-option",
@@ -629,7 +672,7 @@ function PromptInputPermissionSelector({ value, onValueChange, question = "How s
629
672
  className: "prompt-input__permissions-option-description",
630
673
  children: mode.description
631
674
  })]
632
- }), /* @__PURE__ */ jsx(MenuRadioItemIndicator, { className: "prompt-input__permissions-check" })]
675
+ }), /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { className: "prompt-input__permissions-check" })]
633
676
  }, mode.value))
634
677
  })]
635
678
  }) }) })] });
@@ -702,7 +745,7 @@ function formatApprovalValue(value) {
702
745
  * sends the text as the native approval `reason`. Submit (or Enter) sends the
703
746
  * current selection — approve by default.
704
747
  */
705
- function PromptInputApproval({ part, approval: durableApproval, onRespond, executionApprovals, onSkip, question, count, className, ref, ...props }) {
748
+ function PromptInputApproval({ part, approval: durableApproval, onRespond, thinkStub, onExecutionSettled, onSkip, question, count, className, ref, ...props }) {
706
749
  const [selected, setSelected] = React.useState("approve");
707
750
  const [reason, setReason] = React.useState("");
708
751
  const [busy, setBusy] = React.useState(false);
@@ -717,7 +760,7 @@ function PromptInputApproval({ part, approval: durableApproval, onRespond, execu
717
760
  setBusy(false);
718
761
  }, [approvalId]);
719
762
  if (!part && !durableApproval) return null;
720
- if (approval ? !onRespond : !(executionApprovals && (paused || durableApproval))) return null;
763
+ if (approval ? !onRespond : !(thinkStub && (paused || durableApproval))) return null;
721
764
  const toolName = durableApproval?.descriptor.action ?? (part ? getToolName(part) : "action");
722
765
  const respond = async (approved) => {
723
766
  if (busy) return;
@@ -730,10 +773,11 @@ function PromptInputApproval({ part, approval: durableApproval, onRespond, execu
730
773
  approved,
731
774
  reason: denyReason
732
775
  });
733
- else if (paused) await (approved ? executionApprovals?.approve(paused.executionId) : executionApprovals?.reject(paused.executionId, denyReason));
734
- else if (durableApproval) await (approved ? executionApprovals?.approve(durableApproval.executionId) : executionApprovals?.reject(durableApproval.executionId, denyReason));
776
+ else if (paused && thinkStub) await (approved ? thinkStub.approveExecution(paused.executionId) : thinkStub.rejectExecution(paused.executionId, denyReason));
777
+ else if (durableApproval && thinkStub) await (approved ? thinkStub.approveExecution(durableApproval.executionId) : thinkStub.rejectExecution(durableApproval.executionId, denyReason));
735
778
  } finally {
736
779
  setBusy(false);
780
+ if (!approval) onExecutionSettled?.();
737
781
  }
738
782
  };
739
783
  const submit = () => void respond(selected === "approve");
@@ -881,14 +925,6 @@ function PromptInputApproval({ part, approval: durableApproval, onRespond, execu
881
925
  });
882
926
  }
883
927
  const PromptInputSelect = Select;
884
- function PromptInputSelectTrigger(props) {
885
- return /* @__PURE__ */ jsx(SelectTrigger, { ...props });
886
- }
887
- function PromptInputSelectContent(props) {
888
- return /* @__PURE__ */ jsx(SelectPortal, { children: /* @__PURE__ */ jsx(SelectPositioner, { children: /* @__PURE__ */ jsx(SelectContent, { ...props }) }) });
889
- }
890
- const PromptInputSelectItem = SelectItem;
891
- const PromptInputSelectValue = SelectValue;
892
928
  const PromptInputHoverCardContext = React.createContext(null);
893
929
  function PromptInputHoverCard({ openDelay = 0, closeDelay = 0, className, children, ref, ...props }) {
894
930
  const [open, setOpen] = React.useState(false);
@@ -945,9 +981,9 @@ function PromptInputHoverCardContent({ className, ref, ...props }) {
945
981
  ...props
946
982
  });
947
983
  }
948
- const PromptInputTabsList = TabsList;
949
- const PromptInputTab = Tab;
950
- const PromptInputTabBody = TabPanel;
984
+ const PromptInputTabsList = Tabs.List;
985
+ const PromptInputTab = Tabs.Tab;
986
+ const PromptInputTabBody = Tabs.Panel;
951
987
  function PromptInputTabLabel({ className, ref, ...props }) {
952
988
  return /* @__PURE__ */ jsx("h3", {
953
989
  ref,
@@ -963,18 +999,18 @@ function PromptInputTabItem({ className, ref, ...props }) {
963
999
  });
964
1000
  }
965
1001
  const PromptInputCommand = Combobox;
966
- const PromptInputCommandInput = ComboboxInput;
1002
+ const PromptInputCommandInput = Combobox.Input;
967
1003
  function PromptInputCommandList({ className, ref, ...props }) {
968
- return /* @__PURE__ */ jsx(ComboboxList, {
1004
+ return /* @__PURE__ */ jsx(Combobox.List, {
969
1005
  ref,
970
1006
  className: cx("prompt-input__command-list", className),
971
1007
  ...props
972
1008
  });
973
1009
  }
974
- const PromptInputCommandEmpty = ComboboxEmpty;
975
- const PromptInputCommandGroup = ComboboxGroup;
976
- const PromptInputCommandItem = ComboboxItem;
977
- const PromptInputCommandSeparator = ComboboxSeparator;
1010
+ const PromptInputCommandEmpty = Combobox.Empty;
1011
+ const PromptInputCommandGroup = Combobox.Group;
1012
+ const PromptInputCommandItem = Combobox.Item;
1013
+ const PromptInputCommandSeparator = Combobox.Separator;
978
1014
  function defaultSubmitIcon(status) {
979
1015
  switch (status) {
980
1016
  case "submitted": return /* @__PURE__ */ jsx(SpinnerIcon, { className: "prompt-input__submit-spinner" });
@@ -1066,4 +1102,4 @@ function createId() {
1066
1102
  return globalThis.crypto?.randomUUID?.() ?? `prompt-input-${Date.now()}-${Math.random()}`;
1067
1103
  }
1068
1104
  //#endregion
1069
- export { PromptInput, PromptInputActionAddAttachments, PromptInputActionAddScreenshot, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputActionMenuTrigger, PromptInputApproval, PromptInputAttachment, PromptInputAttachments, PromptInputBody, PromptInputButton, PromptInputCommand, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandInput, PromptInputCommandItem, PromptInputCommandList, PromptInputCommandSeparator, PromptInputFooter, PromptInputHeader, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardTrigger, PromptInputPermissionSelector, PromptInputProvider, PromptInputSelect, PromptInputSelectContent, PromptInputSelectItem, PromptInputSelectTrigger, PromptInputSelectValue, PromptInputSubmit, PromptInputTab, PromptInputTabBody, PromptInputTabItem, PromptInputTabLabel, PromptInputTabsList, PromptInputTextarea, PromptInputTools, getApprovalRequestId, getApprovalStateKey, getPendingToolApprovals, usePromptInputAttachments, usePromptInputController, usePromptInputReferencedSources, useProviderAttachments };
1105
+ export { PromptInput, PromptInputActionAddAttachments, PromptInputActionAddScreenshot, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputActionMenuTrigger, PromptInputApproval, PromptInputAttachment, PromptInputAttachments, PromptInputBody, PromptInputButton, PromptInputCommand, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandInput, PromptInputCommandItem, PromptInputCommandList, PromptInputCommandSeparator, PromptInputDictation, PromptInputFooter, PromptInputHeader, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardTrigger, PromptInputPermissionSelector, PromptInputProvider, PromptInputSelect, PromptInputSubmit, PromptInputTab, PromptInputTabBody, PromptInputTabItem, PromptInputTabLabel, PromptInputTabsList, PromptInputTextarea, PromptInputTools, getApprovalRequestId, getApprovalStateKey, getPendingToolApprovals, usePromptInputAttachments, usePromptInputController, useProviderAttachments };
@@ -1,20 +1,9 @@
1
- import { CollapsiblePanelProps, CollapsibleRootProps, CollapsibleTriggerProps } from "./Collapsible.js";
2
- import { r as ButtonProps } from "../Button-Ct5I6aTu.js";
3
- import { ScrollAreaRootProps } from "./ScrollArea.js";
1
+ import { Collapsible } from "./Collapsible.js";
2
+ import { r as ButtonProps } from "../Button-FX_hpqxm.js";
3
+ import { ScrollArea } from "./ScrollArea.js";
4
4
  import * as React from "react";
5
5
 
6
6
  //#region src/components/Queue.d.ts
7
- interface QueueMessagePart {
8
- type: string;
9
- text?: string;
10
- url?: string;
11
- filename?: string;
12
- mediaType?: string;
13
- }
14
- interface QueueMessage {
15
- id: string;
16
- parts: QueueMessagePart[];
17
- }
18
7
  interface QueueTodo {
19
8
  id: string;
20
9
  title: string;
@@ -72,7 +61,7 @@ declare function Queue({
72
61
  }: QueueProps & {
73
62
  ref?: React.Ref<HTMLDivElement>;
74
63
  }): React.JSX.Element;
75
- interface QueueSectionProps extends Omit<CollapsibleRootProps, "className" | "unstyled"> {
64
+ interface QueueSectionProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
76
65
  className?: string;
77
66
  }
78
67
  /**
@@ -87,7 +76,7 @@ declare function QueueSection({
87
76
  }: QueueSectionProps & {
88
77
  ref?: React.Ref<HTMLDivElement>;
89
78
  }): React.JSX.Element;
90
- interface QueueSectionTriggerProps extends Omit<CollapsibleTriggerProps, "className" | "unstyled"> {
79
+ interface QueueSectionTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
91
80
  className?: string;
92
81
  }
93
82
  declare function QueueSectionTrigger({
@@ -115,7 +104,7 @@ declare function QueueSectionLabel({
115
104
  }: QueueSectionLabelProps & {
116
105
  ref?: React.Ref<HTMLSpanElement>;
117
106
  }): React.JSX.Element;
118
- interface QueueListProps extends Omit<ScrollAreaRootProps, "className"> {
107
+ interface QueueListProps extends Omit<React.ComponentProps<typeof ScrollArea.Root>, "className"> {
119
108
  className?: string;
120
109
  }
121
110
  declare function QueueList({
@@ -126,7 +115,7 @@ declare function QueueList({
126
115
  }: QueueListProps & {
127
116
  ref?: React.Ref<HTMLDivElement>;
128
117
  }): React.JSX.Element;
129
- interface QueueSectionContentProps extends Omit<CollapsiblePanelProps, "className" | "unstyled"> {
118
+ interface QueueSectionContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
130
119
  className?: string;
131
120
  }
132
121
  declare function QueueSectionContent({
@@ -238,4 +227,4 @@ declare function QueueItemFile({
238
227
  ref?: React.Ref<HTMLDivElement>;
239
228
  }): React.JSX.Element;
240
229
  //#endregion
241
- export { Queue, QueueItem, QueueItemAction, QueueItemActionProps, QueueItemActions, QueueItemActionsProps, QueueItemAttachment, QueueItemAttachmentProps, QueueItemContent, QueueItemContentProps, QueueItemDescription, QueueItemDescriptionProps, QueueItemFile, QueueItemFileProps, QueueItemImage, QueueItemImageProps, QueueItemIndicator, QueueItemIndicatorProps, QueueItemProps, QueueItemStatus, QueueList, QueueListProps, QueueMessage, QueueMessagePart, QueueProps, QueueSection, QueueSectionContent, QueueSectionContentProps, QueueSectionLabel, QueueSectionLabelProps, QueueSectionProps, QueueSectionTrigger, QueueSectionTriggerProps, QueueTodo };
230
+ export { Queue, QueueItem, QueueItemAction, QueueItemActionProps, QueueItemActions, QueueItemActionsProps, QueueItemAttachment, QueueItemAttachmentProps, QueueItemContent, QueueItemContentProps, QueueItemDescription, QueueItemDescriptionProps, QueueItemFile, QueueItemFileProps, QueueItemImage, QueueItemImageProps, QueueItemIndicator, QueueItemIndicatorProps, QueueItemProps, QueueItemStatus, QueueList, QueueListProps, QueueProps, QueueSection, QueueSectionContent, QueueSectionContentProps, QueueSectionLabel, QueueSectionLabelProps, QueueSectionProps, QueueSectionTrigger, QueueSectionTriggerProps, QueueTodo };
@@ -1,6 +1,6 @@
1
- import { CollapsiblePanel, CollapsibleRoot, CollapsibleTrigger } from "./Collapsible.js";
1
+ import { Collapsible } from "./Collapsible.js";
2
2
  import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { a as CheckIcon, c as ChevronRightIcon, h as FileIcon, u as DotIcon } from "../icons-D2Q5n5C1.js";
3
+ import { a as CheckIcon, c as ChevronRightIcon, h as FileIcon, u as DotIcon } from "../icons-Ba9THQKz.js";
4
4
  import { Button } from "./Button.js";
5
5
  import { Badge } from "./Badge.js";
6
6
  import { ScrollArea } from "./ScrollArea.js";
@@ -57,7 +57,7 @@ function Queue({ className, children, ref, ...props }) {
57
57
  * of QueueItem children.
58
58
  */
59
59
  function QueueSection({ className, defaultOpen = true, ref, ...props }) {
60
- return /* @__PURE__ */ jsx(CollapsibleRoot, {
60
+ return /* @__PURE__ */ jsx(Collapsible.Root, {
61
61
  ref,
62
62
  className: cx("queue__section", className),
63
63
  defaultOpen,
@@ -66,7 +66,7 @@ function QueueSection({ className, defaultOpen = true, ref, ...props }) {
66
66
  });
67
67
  }
68
68
  function QueueSectionTrigger({ className, children, ref, ...props }) {
69
- return /* @__PURE__ */ jsxs(CollapsibleTrigger, {
69
+ return /* @__PURE__ */ jsxs(Collapsible.Trigger, {
70
70
  ref,
71
71
  className: cx("queue__section-trigger", className),
72
72
  ...props,
@@ -97,7 +97,7 @@ function QueueSectionLabel({ className, children, count, label, icon, ref, ...pr
97
97
  });
98
98
  }
99
99
  function QueueList({ className, children, ref, ...props }) {
100
- return /* @__PURE__ */ jsxs(ScrollArea, {
100
+ return /* @__PURE__ */ jsxs(ScrollArea.Root, {
101
101
  ref,
102
102
  className: cx("queue__list", className),
103
103
  ...props,
@@ -117,7 +117,7 @@ function QueueList({ className, children, ref, ...props }) {
117
117
  });
118
118
  }
119
119
  function QueueSectionContent({ className, ref, ...props }) {
120
- return /* @__PURE__ */ jsx(CollapsiblePanel, {
120
+ return /* @__PURE__ */ jsx(Collapsible.Panel, {
121
121
  ref,
122
122
  className: cx("queue__section-content", className),
123
123
  ...props,