@mcp-b/react-components 0.12.0 → 0.14.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 (229) hide show
  1. package/dist/{AgentChat-CRmsKg9B.d.ts → AgentChat-Cgb1xuT7.d.ts} +36 -5
  2. package/dist/{Button-Ct5I6aTu.d.ts → Button-FX_hpqxm.d.ts} +8 -11
  3. package/dist/{CodeBlock-XNQOupQ3.js → CodeBlock-BUFXG8HW.js} +22 -12
  4. package/dist/{CodeBlock-CxQXv3C4.d.ts → CodeBlock-DUh9WOGo.d.ts} +13 -7
  5. package/dist/{Combobox-D9anamNr.d.ts → Combobox-B9Fcd6q-.d.ts} +4 -14
  6. package/dist/{FileTree-wMyZhhHO.js → FileTree-mpEIcfzA.js} +1 -1
  7. package/dist/{Menu-BLhnNnRK.d.ts → Menu-Bgu-ufb5.d.ts} +26 -65
  8. package/dist/{ModelSelector-BB-xB-Es.js → ModelSelector-DVgVBdvw.js} +7 -7
  9. package/dist/{PromptInput-IyM6ZETj.d.ts → PromptInput-ClNqBiIw.d.ts} +313 -46
  10. package/dist/Select-Dl_vF_Bt.d.ts +213 -0
  11. package/dist/{Tabs-D9EAq09D.d.ts → Tabs-3Zc4tb9D.d.ts} +9 -6
  12. package/dist/{ThinkChat-B3wYahor.js → ThinkChat-7DQ2CogF.js} +34 -2
  13. package/dist/{ThinkChatActivity-F4KFPcJA.d.ts → ThinkChatActivity-m9orbdeI.d.ts} +1 -1
  14. package/dist/{attachment-preview-ChtC3HiU.js → attachment-preview-DIs50Q0h.js} +3 -3
  15. package/dist/components/Accordion.d.ts +17 -6
  16. package/dist/components/Accordion.js +23 -36
  17. package/dist/components/Activity.d.ts +5 -5
  18. package/dist/components/Activity.js +9 -9
  19. package/dist/components/AgentChat.d.ts +1 -1
  20. package/dist/components/AgentChat.js +309 -116
  21. package/dist/components/AgentConnection.js +2 -2
  22. package/dist/components/AlertDialog.d.ts +40 -32
  23. package/dist/components/AlertDialog.js +46 -39
  24. package/dist/components/Artifact.d.ts +1 -1
  25. package/dist/components/Artifact.js +5 -5
  26. package/dist/components/Autocomplete.js +10 -2
  27. package/dist/components/Avatar.d.ts +2 -2
  28. package/dist/components/Avatar.js +3 -3
  29. package/dist/components/Badge.d.ts +11 -14
  30. package/dist/components/Badge.js +10 -18
  31. package/dist/components/BrowserLiveView.js +26 -36
  32. package/dist/components/BrowserReplay.js +4 -4
  33. package/dist/components/BrowserRunPanel.js +1 -1
  34. package/dist/components/Button.d.ts +2 -2
  35. package/dist/components/Button.js +7 -30
  36. package/dist/components/ChainOfThought.d.ts +5 -5
  37. package/dist/components/ChainOfThought.js +8 -5
  38. package/dist/components/ChatGptSignInScreen.js +3 -3
  39. package/dist/components/Checkbox.d.ts +10 -2
  40. package/dist/components/Checkbox.js +13 -6
  41. package/dist/components/CheckboxGroup.d.ts +6 -6
  42. package/dist/components/CheckboxGroup.js +6 -6
  43. package/dist/components/CodeBlock.d.ts +1 -1
  44. package/dist/components/CodeBlock.js +1 -1
  45. package/dist/components/CodexModelSelector.d.ts +23 -28
  46. package/dist/components/CodexModelSelector.js +116 -94
  47. package/dist/components/Collapsible.d.ts +2 -4
  48. package/dist/components/Collapsible.js +9 -7
  49. package/dist/components/Combobox.d.ts +2 -2
  50. package/dist/components/Combobox.js +20 -22
  51. package/dist/components/Commit.d.ts +5 -5
  52. package/dist/components/Commit.js +6 -6
  53. package/dist/components/Context.js +5 -1
  54. package/dist/components/ContextMenu.d.ts +20 -72
  55. package/dist/components/ContextMenu.js +46 -56
  56. package/dist/components/Conversation.d.ts +1 -1
  57. package/dist/components/Conversation.js +1 -1
  58. package/dist/components/Dialog.d.ts +38 -30
  59. package/dist/components/Dialog.js +46 -34
  60. package/dist/components/EnvironmentVariables.d.ts +1 -1
  61. package/dist/components/EnvironmentVariables.js +5 -5
  62. package/dist/components/Field.d.ts +3 -3
  63. package/dist/components/Field.js +7 -8
  64. package/dist/components/Fieldset.d.ts +2 -2
  65. package/dist/components/Fieldset.js +2 -2
  66. package/dist/components/FileTree.js +1 -1
  67. package/dist/components/Label.d.ts +1 -1
  68. package/dist/components/Label.js +1 -1
  69. package/dist/components/McpServerPicker.js +21 -19
  70. package/dist/components/Menu.d.ts +2 -2
  71. package/dist/components/Menu.js +39 -49
  72. package/dist/components/Menubar.d.ts +16 -52
  73. package/dist/components/Menubar.js +44 -56
  74. package/dist/components/Message.d.ts +1 -1
  75. package/dist/components/Message.js +6 -6
  76. package/dist/components/MessageScroller.d.ts +1 -1
  77. package/dist/components/MessageScroller.js +1 -1
  78. package/dist/components/Meter.js +5 -0
  79. package/dist/components/ModelSelector.d.ts +1 -1
  80. package/dist/components/ModelSelector.js +1 -1
  81. package/dist/components/NavigationMenu.d.ts +3 -14
  82. package/dist/components/NavigationMenu.js +22 -38
  83. package/dist/components/NumberField.js +6 -0
  84. package/dist/components/Popover.d.ts +21 -44
  85. package/dist/components/Popover.js +33 -23
  86. package/dist/components/PreviewCard.d.ts +20 -18
  87. package/dist/components/PreviewCard.js +30 -20
  88. package/dist/components/PricingPage.js +30 -29
  89. package/dist/components/Progress.d.ts +7 -3
  90. package/dist/components/Progress.js +9 -4
  91. package/dist/components/PromptInput.d.ts +2 -2
  92. package/dist/components/PromptInput.js +306 -54
  93. package/dist/components/Queue.d.ts +7 -7
  94. package/dist/components/Queue.js +6 -6
  95. package/dist/components/RadioGroup.d.ts +10 -9
  96. package/dist/components/RadioGroup.js +8 -9
  97. package/dist/components/Reasoning.d.ts +4 -4
  98. package/dist/components/Reasoning.js +10 -6
  99. package/dist/components/ScrollArea.d.ts +2 -9
  100. package/dist/components/ScrollArea.js +5 -23
  101. package/dist/components/Select.d.ts +2 -2
  102. package/dist/components/Select.js +100 -134
  103. package/dist/components/Slider.d.ts +10 -7
  104. package/dist/components/Slider.js +12 -11
  105. package/dist/components/Sources.d.ts +4 -4
  106. package/dist/components/Sources.js +8 -5
  107. package/dist/components/Stepper.js +1 -1
  108. package/dist/components/Switch.d.ts +6 -3
  109. package/dist/components/Switch.js +7 -4
  110. package/dist/components/Tabs.d.ts +2 -2
  111. package/dist/components/Tabs.js +9 -4
  112. package/dist/components/Task.d.ts +4 -4
  113. package/dist/components/Task.js +10 -6
  114. package/dist/components/Terminal.d.ts +2 -2
  115. package/dist/components/Terminal.js +5 -5
  116. package/dist/components/TestResults.d.ts +4 -4
  117. package/dist/components/TestResults.js +5 -5
  118. package/dist/components/ThinkChat.d.ts +14 -2
  119. package/dist/components/ThinkChat.js +1 -1
  120. package/dist/components/ThinkChatActivity.d.ts +1 -1
  121. package/dist/components/ThinkChatActivity.js +1 -1
  122. package/dist/components/ThinkChatToolPanels.js +8 -8
  123. package/dist/components/ThinkExecutionWorkbench.js +28 -28
  124. package/dist/components/ThinkFullApp.js +8 -8
  125. package/dist/components/ThinkThreadPicker.js +1 -1
  126. package/dist/components/ThinkThreadShell.js +5 -5
  127. package/dist/components/Toast.js +7 -0
  128. package/dist/components/ToggleGroup.d.ts +6 -2
  129. package/dist/components/ToggleGroup.js +6 -2
  130. package/dist/components/Toolbar.js +6 -0
  131. package/dist/components/Tooltip.d.ts +36 -27
  132. package/dist/components/Tooltip.js +45 -29
  133. package/dist/components/WebPreview.d.ts +1 -1
  134. package/dist/components/WebPreview.js +3 -3
  135. package/dist/components/WorkspaceExplorer.d.ts +6 -8
  136. package/dist/components/WorkspaceExplorer.js +6 -6
  137. package/dist/components/icons.d.ts +2 -2
  138. package/dist/components/icons.js +2 -2
  139. package/dist/{copy-button-C6JSKtFE.js → copy-button-DUMLYdsk.js} +7 -6
  140. package/dist/{copy-button-BKXqGiNm.d.ts → copy-button-DtPMgN7e.d.ts} +3 -2
  141. package/dist/icons-Ba9THQKz.js +64 -0
  142. package/dist/icons-CUCz_Sft.d.ts +210 -0
  143. package/dist/styles/accessibility.css +14 -0
  144. package/dist/styles/accordion.css +21 -61
  145. package/dist/styles/activity.css +23 -58
  146. package/dist/styles/agent-chat.css +45 -4
  147. package/dist/styles/agent-connection.css +8 -10
  148. package/dist/styles/alert-dialog.css +20 -26
  149. package/dist/styles/artifact.css +6 -6
  150. package/dist/styles/attachment-preview.css +1 -1
  151. package/dist/styles/autocomplete.css +5 -170
  152. package/dist/styles/avatar.css +8 -8
  153. package/dist/styles/badge.css +8 -10
  154. package/dist/styles/base-ui-motion.css +176 -0
  155. package/dist/styles/base.css +19 -25
  156. package/dist/styles/browser-live-view.css +7 -7
  157. package/dist/styles/browser-replay.css +5 -5
  158. package/dist/styles/browser-run-panel.css +5 -5
  159. package/dist/styles/button.css +48 -43
  160. package/dist/styles/card.css +3 -5
  161. package/dist/styles/chain-of-thought.css +14 -70
  162. package/dist/styles/chatgpt-sign-in-screen.css +3 -3
  163. package/dist/styles/checkbox-group.css +1 -1
  164. package/dist/styles/checkbox.css +3 -7
  165. package/dist/styles/code-block.css +10 -10
  166. package/dist/styles/codex-model-selector.css +33 -44
  167. package/dist/styles/collapsible.css +11 -27
  168. package/dist/styles/combobox.css +3 -149
  169. package/dist/styles/commit.css +19 -35
  170. package/dist/styles/context-menu.css +1 -77
  171. package/dist/styles/context.css +12 -12
  172. package/dist/styles/conversation.css +7 -7
  173. package/dist/styles/dialog.css +34 -55
  174. package/dist/styles/environment-variables.css +10 -10
  175. package/dist/styles/field.css +16 -58
  176. package/dist/styles/fieldset.css +2 -2
  177. package/dist/styles/file-tree.css +7 -9
  178. package/dist/styles/index.css +8 -1
  179. package/dist/styles/input.css +1 -51
  180. package/dist/styles/label.css +2 -2
  181. package/dist/styles/marker.css +2 -4
  182. package/dist/styles/mcp-server-picker.css +5 -5
  183. package/dist/styles/menu.css +6 -153
  184. package/dist/styles/menubar.css +6 -105
  185. package/dist/styles/message-scroller.css +1 -1
  186. package/dist/styles/message.css +86 -8
  187. package/dist/styles/meter.css +4 -20
  188. package/dist/styles/model-selector.css +13 -13
  189. package/dist/styles/navigation-menu.css +14 -54
  190. package/dist/styles/number-field.css +8 -23
  191. package/dist/styles/popover.css +13 -68
  192. package/dist/styles/preview-card.css +5 -46
  193. package/dist/styles/pricing-page.css +43 -43
  194. package/dist/styles/progress.css +7 -16
  195. package/dist/styles/prompt-input.css +185 -44
  196. package/dist/styles/queue.css +12 -28
  197. package/dist/styles/radio.css +4 -8
  198. package/dist/styles/reasoning.css +3 -62
  199. package/dist/styles/recipes.css +475 -0
  200. package/dist/styles/select.css +7 -103
  201. package/dist/styles/shell.css +3 -3
  202. package/dist/styles/slider.css +5 -7
  203. package/dist/styles/sources.css +9 -66
  204. package/dist/styles/stepper.css +16 -14
  205. package/dist/styles/streamdown.css +9 -9
  206. package/dist/styles/switch.css +4 -7
  207. package/dist/styles/tabs.css +7 -8
  208. package/dist/styles/task.css +13 -42
  209. package/dist/styles/terminal.css +7 -7
  210. package/dist/styles/test-results.css +21 -37
  211. package/dist/styles/think-execution-workbench.css +23 -23
  212. package/dist/styles/think-full-app.css +12 -20
  213. package/dist/styles/think-resize-handle.css +2 -2
  214. package/dist/styles/think-thread-picker.css +19 -10
  215. package/dist/styles/think-thread-shell.css +7 -7
  216. package/dist/styles/toast.css +14 -25
  217. package/dist/styles/toggle-group.css +16 -14
  218. package/dist/styles/toggle.css +14 -15
  219. package/dist/styles/toolbar.css +13 -25
  220. package/dist/styles/tooltip.css +6 -16
  221. package/dist/styles/web-preview.css +15 -15
  222. package/dist/styles/workspace-explorer.css +14 -13
  223. package/dist/utils/codex-model-catalog.d.ts +142 -0
  224. package/dist/utils/codex-model-catalog.js +112 -0
  225. package/dist/utils/structured-code.d.ts +1 -1
  226. package/package.json +8 -2
  227. package/dist/Select-CRsKCJ9x.d.ts +0 -200
  228. package/dist/icons-CbjtbIJK.d.ts +0 -51
  229. package/dist/icons-D2Q5n5C1.js +0 -291
@@ -1,12 +1,12 @@
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, R as WrenchIcon, 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";
@@ -450,6 +450,7 @@ function PromptInputButton({ className, tooltip, variant = "ghost", color = "neu
450
450
  const resolvedSize = size ?? (React.Children.count(children) > 1 ? "xs" : "icon-xs");
451
451
  const tooltipConfig = typeof tooltip === "string" ? { content: tooltip } : tooltip;
452
452
  const fallbackLabel = ariaLabel ?? (typeof tooltipConfig?.content === "string" ? tooltipConfig.content : void 0);
453
+ const hasResponsiveLabel = Boolean(tooltipConfig && React.Children.count(children) > 1);
453
454
  const button = /* @__PURE__ */ jsx(Button, {
454
455
  ref,
455
456
  type: "button",
@@ -458,14 +459,15 @@ function PromptInputButton({ className, tooltip, variant = "ghost", color = "neu
458
459
  size: resolvedSize,
459
460
  className: cx("prompt-input__button", className),
460
461
  "aria-label": fallbackLabel,
462
+ "data-responsive-label": hasResponsiveLabel || void 0,
461
463
  ...props,
462
464
  children
463
465
  });
464
466
  if (!tooltipConfig) return button;
465
- return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: button }), /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsx(TooltipPositioner, {
467
+ return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: button }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
466
468
  side: tooltipConfig.side,
467
469
  sideOffset: 6,
468
- children: /* @__PURE__ */ jsxs(TooltipPopup, { children: [/* @__PURE__ */ jsx("span", {
470
+ children: /* @__PURE__ */ jsxs(Tooltip.Popup, { children: [/* @__PURE__ */ jsx("span", {
469
471
  className: "prompt-input__tooltip-content",
470
472
  children: tooltipConfig.content
471
473
  }), tooltipConfig.shortcut ? /* @__PURE__ */ jsx("kbd", {
@@ -474,11 +476,236 @@ function PromptInputButton({ className, tooltip, variant = "ghost", color = "neu
474
476
  }) : null] })
475
477
  }) })] });
476
478
  }
479
+ /**
480
+ * Voice-dictation control for PromptInput. Final upstream transcripts are
481
+ * appended to the composer while interim text remains ephemeral.
482
+ */
483
+ function PromptInputDictation({ voice, beforeStart, className, disabled, ref, ...props }) {
484
+ const controller = useOptionalPromptInputController();
485
+ const attachments = usePromptInputAttachments();
486
+ const buttonRef = React.useRef(null);
487
+ const committedTranscriptRef = React.useRef("");
488
+ const submitAfterStopRef = React.useRef(false);
489
+ const recordingStartedAtRef = React.useRef(null);
490
+ const [elapsedSeconds, setElapsedSeconds] = React.useState(0);
491
+ const [isStarting, setIsStarting] = React.useState(false);
492
+ const [startError, setStartError] = React.useState(null);
493
+ React.useImperativeHandle(ref, () => buttonRef.current, []);
494
+ React.useEffect(() => {
495
+ const transcript = voice.transcript;
496
+ if (!transcript) return;
497
+ const previous = committedTranscriptRef.current;
498
+ const addition = transcript.startsWith(previous) ? transcript.slice(previous.length).trim() : transcript.trim();
499
+ committedTranscriptRef.current = transcript;
500
+ if (!addition) return;
501
+ if (controller) {
502
+ controller.textInput.setInput(appendDictationTranscript(controller.textInput.value, addition));
503
+ return;
504
+ }
505
+ const textarea = buttonRef.current?.form?.querySelector("textarea[data-prompt-input-textarea=\"true\"]");
506
+ if (!textarea) return;
507
+ textarea.value = appendDictationTranscript(textarea.value, addition);
508
+ textarea.dispatchEvent(new Event("input", { bubbles: true }));
509
+ }, [controller, voice.transcript]);
510
+ React.useEffect(() => {
511
+ if (!voice.isListening) {
512
+ recordingStartedAtRef.current = null;
513
+ setElapsedSeconds(0);
514
+ if (submitAfterStopRef.current) {
515
+ submitAfterStopRef.current = false;
516
+ window.requestAnimationFrame(() => buttonRef.current?.form?.requestSubmit());
517
+ }
518
+ return;
519
+ }
520
+ recordingStartedAtRef.current ??= Date.now();
521
+ const updateElapsed = () => {
522
+ setElapsedSeconds(Math.floor((Date.now() - (recordingStartedAtRef.current ?? Date.now())) / 1e3));
523
+ };
524
+ updateElapsed();
525
+ const timer = window.setInterval(updateElapsed, 250);
526
+ return () => window.clearInterval(timer);
527
+ }, [voice.isListening]);
528
+ const error = startError ?? voice.error;
529
+ const listening = voice.isListening;
530
+ const label = listening ? "Stop dictation" : error ? "Retry dictation" : "Start dictation";
531
+ const status = error ? `Dictation failed: ${error}` : listening ? voice.interimTranscript ? "Listening. Speech detected." : "Listening for speech." : isStarting ? "Starting dictation." : "";
532
+ const level = Math.min(Math.max(voice.audioLevel, 0), 1);
533
+ const elapsed = formatDictationElapsed(elapsedSeconds);
534
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
535
+ /* @__PURE__ */ jsx(PromptInputButton, {
536
+ ref: buttonRef,
537
+ className: cx("prompt-input__dictation", className),
538
+ tooltip: {
539
+ content: label,
540
+ side: "top"
541
+ },
542
+ "aria-label": label,
543
+ "aria-hidden": listening || void 0,
544
+ "aria-pressed": listening,
545
+ "data-error": error ? "true" : void 0,
546
+ "data-listening": listening ? "true" : void 0,
547
+ "data-starting": isStarting ? "true" : void 0,
548
+ disabled: disabled || isStarting || listening,
549
+ tabIndex: listening ? -1 : void 0,
550
+ onClick: () => {
551
+ setStartError(null);
552
+ if (listening) {
553
+ voice.stop();
554
+ return;
555
+ }
556
+ setIsStarting(true);
557
+ Promise.resolve().then(() => beforeStart?.(voice)).then(() => voice.start()).catch((reason) => {
558
+ setStartError(reason instanceof Error ? reason.message : String(reason));
559
+ }).finally(() => setIsStarting(false));
560
+ },
561
+ ...props,
562
+ children: /* @__PURE__ */ jsx("span", {
563
+ className: "prompt-input__dictation-icon",
564
+ style: { "--prompt-input-dictation-level": level },
565
+ "aria-hidden": "true",
566
+ children: isStarting ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : listening ? /* @__PURE__ */ jsx(StopIcon, {}) : /* @__PURE__ */ jsx(MicrophoneIcon, {})
567
+ })
568
+ }),
569
+ listening ? /* @__PURE__ */ jsxs("div", {
570
+ className: "prompt-input__recording",
571
+ role: "group",
572
+ "aria-label": "Voice recording controls",
573
+ children: [
574
+ /* @__PURE__ */ jsx(PromptInputButton, {
575
+ className: "prompt-input__recording-add",
576
+ tooltip: "Add photos or files",
577
+ onClick: () => attachments.openFileDialog(),
578
+ children: /* @__PURE__ */ jsx(PlusIcon, {})
579
+ }),
580
+ /* @__PURE__ */ jsx(PromptInputRecordingWaveform, {
581
+ active: true,
582
+ level
583
+ }),
584
+ /* @__PURE__ */ jsx("time", {
585
+ className: "prompt-input__recording-time",
586
+ dateTime: `PT${elapsedSeconds}S`,
587
+ children: elapsed
588
+ }),
589
+ /* @__PURE__ */ jsx(Button, {
590
+ className: "prompt-input__recording-button",
591
+ type: "button",
592
+ variant: "normal",
593
+ color: "neutral",
594
+ size: "icon",
595
+ "aria-label": "Stop dictation",
596
+ onClick: () => voice.stop(),
597
+ children: /* @__PURE__ */ jsx(SquareIcon, { size: 12 })
598
+ }),
599
+ /* @__PURE__ */ jsx(Button, {
600
+ className: "prompt-input__recording-button",
601
+ type: "button",
602
+ color: "primary",
603
+ size: "icon",
604
+ "aria-label": "Stop dictation and send",
605
+ onClick: () => {
606
+ submitAfterStopRef.current = true;
607
+ voice.stop();
608
+ },
609
+ children: /* @__PURE__ */ jsx(ArrowUpIcon, { size: 18 })
610
+ })
611
+ ]
612
+ }) : null,
613
+ /* @__PURE__ */ jsx("span", {
614
+ className: "prompt-input__dictation-status",
615
+ role: "status",
616
+ "aria-live": "polite",
617
+ "aria-atomic": "true",
618
+ children: status
619
+ })
620
+ ] });
621
+ }
622
+ /**
623
+ * Scrolling canvas waveform adapted from ElevenLabs UI's Waveform component.
624
+ * Cloudflare Voice already owns the microphone stream, so this renderer
625
+ * consumes its upstream `audioLevel` instead of requesting a second stream.
626
+ */
627
+ function PromptInputRecordingWaveform({ active, level }) {
628
+ const canvasRef = React.useRef(null);
629
+ const containerRef = React.useRef(null);
630
+ const historyRef = React.useRef([]);
631
+ const levelRef = React.useRef(level);
632
+ levelRef.current = level;
633
+ React.useEffect(() => {
634
+ const canvas = canvasRef.current;
635
+ const container = containerRef.current;
636
+ if (!canvas || !container) return;
637
+ const resize = () => {
638
+ const rect = container.getBoundingClientRect();
639
+ const dpr = window.devicePixelRatio || 1;
640
+ canvas.width = Math.max(1, Math.round(rect.width * dpr));
641
+ canvas.height = Math.max(1, Math.round(rect.height * dpr));
642
+ canvas.style.width = `${rect.width}px`;
643
+ canvas.style.height = `${rect.height}px`;
644
+ canvas.getContext("2d")?.setTransform(dpr, 0, 0, dpr, 0, 0);
645
+ };
646
+ const observer = new ResizeObserver(resize);
647
+ observer.observe(container);
648
+ resize();
649
+ const barWidth = 2;
650
+ const step = 4;
651
+ let animationFrame = 0;
652
+ let lastUpdate = 0;
653
+ let smoothedLevel = levelRef.current;
654
+ const draw = (time) => {
655
+ const context = canvas.getContext("2d");
656
+ const rect = canvas.getBoundingClientRect();
657
+ if (!context || rect.width === 0 || rect.height === 0) {
658
+ animationFrame = window.requestAnimationFrame(draw);
659
+ return;
660
+ }
661
+ const barCount = Math.max(1, Math.floor(rect.width / step));
662
+ if (active && time - lastUpdate >= 50) {
663
+ smoothedLevel += (levelRef.current - smoothedLevel) * .45;
664
+ historyRef.current.push(Math.max(.08, Math.min(1, smoothedLevel)));
665
+ if (historyRef.current.length > barCount) historyRef.current.shift();
666
+ lastUpdate = time;
667
+ }
668
+ context.clearRect(0, 0, rect.width, rect.height);
669
+ context.fillStyle = getComputedStyle(canvas).color;
670
+ const centerY = rect.height / 2;
671
+ for (let index = 0; index < barCount; index += 1) {
672
+ const historyIndex = historyRef.current.length - barCount + index;
673
+ const value = historyIndex >= 0 ? historyRef.current[historyIndex] ?? .08 : .08;
674
+ const barHeight = Math.max(2, value * rect.height * .9);
675
+ const x = index * step;
676
+ context.globalAlpha = .45 + value * .55;
677
+ context.beginPath();
678
+ context.roundRect(x, centerY - barHeight / 2, barWidth, barHeight, 1);
679
+ context.fill();
680
+ }
681
+ context.globalAlpha = 1;
682
+ animationFrame = window.requestAnimationFrame(draw);
683
+ };
684
+ animationFrame = window.requestAnimationFrame(draw);
685
+ return () => {
686
+ observer.disconnect();
687
+ window.cancelAnimationFrame(animationFrame);
688
+ };
689
+ }, [active]);
690
+ return /* @__PURE__ */ jsx("div", {
691
+ ref: containerRef,
692
+ className: "prompt-input__recording-waveform",
693
+ "aria-hidden": "true",
694
+ children: /* @__PURE__ */ jsx("canvas", { ref: canvasRef })
695
+ });
696
+ }
697
+ function formatDictationElapsed(totalSeconds) {
698
+ return `${Math.floor(totalSeconds / 60)}:${(totalSeconds % 60).toString().padStart(2, "0")}`;
699
+ }
700
+ function appendDictationTranscript(current, transcript) {
701
+ if (!current) return transcript;
702
+ return `${current}${/\s$/u.test(current) ? "" : " "}${transcript}`;
703
+ }
477
704
  function PromptInputActionMenu(props) {
478
- return /* @__PURE__ */ jsx(MenuRoot, { ...props });
705
+ return /* @__PURE__ */ jsx(Menu.Root, { ...props });
479
706
  }
480
707
  function PromptInputActionMenuTrigger({ className, children, ...props }) {
481
- return /* @__PURE__ */ jsx(MenuTrigger, {
708
+ return /* @__PURE__ */ jsx(Menu.Trigger, {
482
709
  unstyled: true,
483
710
  render: /* @__PURE__ */ jsx(PromptInputButton, {
484
711
  className: cx("prompt-input__action-menu-trigger", className),
@@ -487,16 +714,30 @@ function PromptInputActionMenuTrigger({ className, children, ...props }) {
487
714
  })
488
715
  });
489
716
  }
490
- function PromptInputActionMenuContent({ className, children, tabIndex = 0, ...props }) {
491
- return /* @__PURE__ */ jsx(MenuContent, {
492
- tabIndex,
493
- className: cx("prompt-input__action-menu", className),
494
- ...props,
495
- children
496
- });
717
+ function PromptInputActionMenuContent({ anchor, positionMethod, side, sideOffset = 4, align, alignOffset, collisionBoundary, collisionPadding, sticky, arrowPadding, disableAnchorTracking, collisionAvoidance, className, children, tabIndex = 0, ...props }) {
718
+ return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
719
+ anchor,
720
+ positionMethod,
721
+ side,
722
+ sideOffset,
723
+ align,
724
+ alignOffset,
725
+ collisionBoundary,
726
+ collisionPadding,
727
+ sticky,
728
+ arrowPadding,
729
+ disableAnchorTracking,
730
+ collisionAvoidance,
731
+ children: /* @__PURE__ */ jsx(Menu.Popup, {
732
+ tabIndex,
733
+ className: cx("prompt-input__action-menu", className),
734
+ ...props,
735
+ children
736
+ })
737
+ }) });
497
738
  }
498
739
  function PromptInputActionMenuItem({ className, ...props }) {
499
- return /* @__PURE__ */ jsx(MenuItem, {
740
+ return /* @__PURE__ */ jsx(Menu.Item, {
500
741
  className: cx("prompt-input__action-menu-item", className),
501
742
  ...props
502
743
  });
@@ -545,28 +786,47 @@ const PERMISSION_MODES = [{
545
786
  * whoever owns the approvals (`AgentChat` wires both ends).
546
787
  */
547
788
  function PromptInputPermissionSelector({ value, onValueChange, question = "How should agent actions be approved?" }) {
548
- return /* @__PURE__ */ jsxs(MenuRoot, { children: [/* @__PURE__ */ jsx(MenuTrigger, { render: /* @__PURE__ */ jsxs(PromptInputButton, {
549
- size: "xs",
550
- className: "prompt-input__permissions-trigger",
551
- "data-mode": value,
552
- "aria-label": (PERMISSION_MODES.find((mode) => mode.value === value) ?? PERMISSION_MODES[0]).label,
553
- children: [/* @__PURE__ */ jsx("span", {
554
- className: "prompt-input__permissions-current",
555
- children: PERMISSION_MODES.map((mode) => /* @__PURE__ */ jsxs("span", {
556
- className: "prompt-input__permissions-current-option",
557
- "data-active": mode.value === value || void 0,
558
- children: [mode.value === "bypass" ? /* @__PURE__ */ jsx(WarningIcon, { size: 14 }) : null, mode.label]
559
- }, mode.value))
560
- }), /* @__PURE__ */ jsx(ChevronDownIcon, { size: 12 })]
561
- }) }), /* @__PURE__ */ jsx(MenuPortal, { children: /* @__PURE__ */ jsx(MenuPositioner, { children: /* @__PURE__ */ jsxs(MenuPopup, {
789
+ const selected = PERMISSION_MODES.find((mode) => mode.value === value) ?? PERMISSION_MODES[0];
790
+ const trigger = /* @__PURE__ */ jsx(Menu.Trigger, {
791
+ unstyled: true,
792
+ render: /* @__PURE__ */ jsxs(PromptInputButton, {
793
+ size: "xs",
794
+ className: "prompt-input__permissions-trigger",
795
+ "data-mode": value,
796
+ "aria-label": selected.label,
797
+ children: [
798
+ /* @__PURE__ */ jsx("span", {
799
+ className: "prompt-input__permissions-icon",
800
+ children: value === "bypass" ? /* @__PURE__ */ jsx(WarningIcon, { size: 14 }) : /* @__PURE__ */ jsx(WrenchIcon, { size: 14 })
801
+ }),
802
+ /* @__PURE__ */ jsx("span", {
803
+ className: "prompt-input__permissions-current",
804
+ children: PERMISSION_MODES.map((mode) => /* @__PURE__ */ jsx("span", {
805
+ className: "prompt-input__permissions-current-option",
806
+ "data-active": mode.value === value || void 0,
807
+ children: mode.label
808
+ }, mode.value))
809
+ }),
810
+ /* @__PURE__ */ jsx(ChevronDownIcon, {
811
+ className: "prompt-input__permissions-chevron",
812
+ size: 12
813
+ })
814
+ ]
815
+ })
816
+ });
817
+ return /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: trigger }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
818
+ side: "top",
819
+ sideOffset: 6,
820
+ children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: selected.label })
821
+ }) })] }), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { children: /* @__PURE__ */ jsxs(Menu.Popup, {
562
822
  className: "prompt-input__permissions-menu",
563
823
  children: [/* @__PURE__ */ jsx("div", {
564
824
  className: "prompt-input__permissions-question",
565
825
  children: question
566
- }), /* @__PURE__ */ jsx(MenuRadioGroup, {
826
+ }), /* @__PURE__ */ jsx(Menu.RadioGroup, {
567
827
  value,
568
828
  onValueChange: (mode) => onValueChange(mode),
569
- children: PERMISSION_MODES.map((mode) => /* @__PURE__ */ jsxs(MenuRadioItem, {
829
+ children: PERMISSION_MODES.map((mode) => /* @__PURE__ */ jsxs(Menu.RadioItem, {
570
830
  value: mode.value,
571
831
  closeOnClick: true,
572
832
  className: "prompt-input__permissions-option",
@@ -579,7 +839,7 @@ function PromptInputPermissionSelector({ value, onValueChange, question = "How s
579
839
  className: "prompt-input__permissions-option-description",
580
840
  children: mode.description
581
841
  })]
582
- }), /* @__PURE__ */ jsx(MenuRadioItemIndicator, { className: "prompt-input__permissions-check" })]
842
+ }), /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { className: "prompt-input__permissions-check" })]
583
843
  }, mode.value))
584
844
  })]
585
845
  }) }) })] });
@@ -832,14 +1092,6 @@ function PromptInputApproval({ part, approval: durableApproval, onRespond, think
832
1092
  });
833
1093
  }
834
1094
  const PromptInputSelect = Select;
835
- function PromptInputSelectTrigger(props) {
836
- return /* @__PURE__ */ jsx(SelectTrigger, { ...props });
837
- }
838
- function PromptInputSelectContent(props) {
839
- return /* @__PURE__ */ jsx(SelectPortal, { children: /* @__PURE__ */ jsx(SelectPositioner, { children: /* @__PURE__ */ jsx(SelectContent, { ...props }) }) });
840
- }
841
- const PromptInputSelectItem = SelectItem;
842
- const PromptInputSelectValue = SelectValue;
843
1095
  const PromptInputHoverCardContext = React.createContext(null);
844
1096
  function PromptInputHoverCard({ openDelay = 0, closeDelay = 0, className, children, ref, ...props }) {
845
1097
  const [open, setOpen] = React.useState(false);
@@ -896,9 +1148,9 @@ function PromptInputHoverCardContent({ className, ref, ...props }) {
896
1148
  ...props
897
1149
  });
898
1150
  }
899
- const PromptInputTabsList = TabsList;
900
- const PromptInputTab = Tab;
901
- const PromptInputTabBody = TabPanel;
1151
+ const PromptInputTabsList = Tabs.List;
1152
+ const PromptInputTab = Tabs.Tab;
1153
+ const PromptInputTabBody = Tabs.Panel;
902
1154
  function PromptInputTabLabel({ className, ref, ...props }) {
903
1155
  return /* @__PURE__ */ jsx("h3", {
904
1156
  ref,
@@ -914,18 +1166,18 @@ function PromptInputTabItem({ className, ref, ...props }) {
914
1166
  });
915
1167
  }
916
1168
  const PromptInputCommand = Combobox;
917
- const PromptInputCommandInput = ComboboxInput;
1169
+ const PromptInputCommandInput = Combobox.Input;
918
1170
  function PromptInputCommandList({ className, ref, ...props }) {
919
- return /* @__PURE__ */ jsx(ComboboxList, {
1171
+ return /* @__PURE__ */ jsx(Combobox.List, {
920
1172
  ref,
921
1173
  className: cx("prompt-input__command-list", className),
922
1174
  ...props
923
1175
  });
924
1176
  }
925
- const PromptInputCommandEmpty = ComboboxEmpty;
926
- const PromptInputCommandGroup = ComboboxGroup;
927
- const PromptInputCommandItem = ComboboxItem;
928
- const PromptInputCommandSeparator = ComboboxSeparator;
1177
+ const PromptInputCommandEmpty = Combobox.Empty;
1178
+ const PromptInputCommandGroup = Combobox.Group;
1179
+ const PromptInputCommandItem = Combobox.Item;
1180
+ const PromptInputCommandSeparator = Combobox.Separator;
929
1181
  function defaultSubmitIcon(status) {
930
1182
  switch (status) {
931
1183
  case "submitted": return /* @__PURE__ */ jsx(SpinnerIcon, { className: "prompt-input__submit-spinner" });
@@ -1017,4 +1269,4 @@ function createId() {
1017
1269
  return globalThis.crypto?.randomUUID?.() ?? `prompt-input-${Date.now()}-${Math.random()}`;
1018
1270
  }
1019
1271
  //#endregion
1020
- 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, useProviderAttachments };
1272
+ 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,6 +1,6 @@
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
@@ -61,7 +61,7 @@ declare function Queue({
61
61
  }: QueueProps & {
62
62
  ref?: React.Ref<HTMLDivElement>;
63
63
  }): React.JSX.Element;
64
- interface QueueSectionProps extends Omit<CollapsibleRootProps, "className" | "unstyled"> {
64
+ interface QueueSectionProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
65
65
  className?: string;
66
66
  }
67
67
  /**
@@ -76,7 +76,7 @@ declare function QueueSection({
76
76
  }: QueueSectionProps & {
77
77
  ref?: React.Ref<HTMLDivElement>;
78
78
  }): React.JSX.Element;
79
- interface QueueSectionTriggerProps extends Omit<CollapsibleTriggerProps, "className" | "unstyled"> {
79
+ interface QueueSectionTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
80
80
  className?: string;
81
81
  }
82
82
  declare function QueueSectionTrigger({
@@ -104,7 +104,7 @@ declare function QueueSectionLabel({
104
104
  }: QueueSectionLabelProps & {
105
105
  ref?: React.Ref<HTMLSpanElement>;
106
106
  }): React.JSX.Element;
107
- interface QueueListProps extends Omit<ScrollAreaRootProps, "className"> {
107
+ interface QueueListProps extends Omit<React.ComponentProps<typeof ScrollArea.Root>, "className"> {
108
108
  className?: string;
109
109
  }
110
110
  declare function QueueList({
@@ -115,7 +115,7 @@ declare function QueueList({
115
115
  }: QueueListProps & {
116
116
  ref?: React.Ref<HTMLDivElement>;
117
117
  }): React.JSX.Element;
118
- interface QueueSectionContentProps extends Omit<CollapsiblePanelProps, "className" | "unstyled"> {
118
+ interface QueueSectionContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
119
119
  className?: string;
120
120
  }
121
121
  declare function QueueSectionContent({
@@ -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,
@@ -40,7 +40,7 @@ interface RadioIndicatorProps extends Omit<React.ComponentPropsWithRef<typeof Ra
40
40
  *
41
41
  * @see {@link https://base-ui.com/react/components/radio-group | Base UI Radio Group}
42
42
  */
43
- declare function RadioGroup({
43
+ declare function RadioGroupRoot({
44
44
  orientation,
45
45
  className,
46
46
  ref,
@@ -51,19 +51,13 @@ declare function RadioGroup({
51
51
  /**
52
52
  * A single radio button within a RadioGroup.
53
53
  */
54
- declare function Radio({
54
+ declare function RadioRoot({
55
55
  className,
56
56
  ref,
57
57
  ...props
58
58
  }: RadioProps & {
59
59
  ref?: React.Ref<HTMLButtonElement>;
60
60
  }): React.JSX.Element;
61
- declare function RadioGroupItem({
62
- children,
63
- ...props
64
- }: RadioProps & {
65
- ref?: React.Ref<HTMLButtonElement>;
66
- }): React.JSX.Element;
67
61
  /**
68
62
  * The visual indicator for a Radio button.
69
63
  */
@@ -74,5 +68,12 @@ declare function RadioIndicator({
74
68
  }: RadioIndicatorProps & {
75
69
  ref?: React.Ref<HTMLSpanElement>;
76
70
  }): React.JSX.Element;
71
+ declare const RadioGroup: {
72
+ Root: typeof RadioGroupRoot;
73
+ };
74
+ declare const Radio: {
75
+ Root: typeof RadioRoot;
76
+ Indicator: typeof RadioIndicator;
77
+ };
77
78
  //#endregion
78
- export { Radio, RadioGroup, RadioGroupItem, RadioGroupProps, RadioIndicator, RadioIndicatorProps, RadioProps };
79
+ export { Radio, RadioGroup, RadioGroupProps, RadioIndicatorProps, RadioProps };
@@ -26,7 +26,7 @@ import { Radio as Radio$1 } from "@base-ui/react/radio";
26
26
  *
27
27
  * @see {@link https://base-ui.com/react/components/radio-group | Base UI Radio Group}
28
28
  */
29
- function RadioGroup({ orientation = "vertical", className = "", ref, ...props }) {
29
+ function RadioGroupRoot({ orientation = "vertical", className = "", ref, ...props }) {
30
30
  return /* @__PURE__ */ jsx(RadioGroup$1, {
31
31
  ref,
32
32
  "data-slot": "radio-group",
@@ -41,7 +41,7 @@ function RadioGroup({ orientation = "vertical", className = "", ref, ...props })
41
41
  /**
42
42
  * A single radio button within a RadioGroup.
43
43
  */
44
- function Radio({ className = "", ref, ...props }) {
44
+ function RadioRoot({ className = "", ref, ...props }) {
45
45
  const classes = ["radio", className].filter(Boolean).join(" ");
46
46
  return /* @__PURE__ */ jsx(Radio$1.Root, {
47
47
  ref,
@@ -50,12 +50,6 @@ function Radio({ className = "", ref, ...props }) {
50
50
  ...props
51
51
  });
52
52
  }
53
- function RadioGroupItem({ children, ...props }) {
54
- return /* @__PURE__ */ jsx(Radio, {
55
- ...props,
56
- children: children ?? /* @__PURE__ */ jsx(RadioIndicator, {})
57
- });
58
- }
59
53
  /**
60
54
  * The visual indicator for a Radio button.
61
55
  */
@@ -68,5 +62,10 @@ function RadioIndicator({ className = "", ref, ...props }) {
68
62
  ...props
69
63
  });
70
64
  }
65
+ const RadioGroup = { Root: RadioGroupRoot };
66
+ const Radio = {
67
+ Root: RadioRoot,
68
+ Indicator: RadioIndicator
69
+ };
71
70
  //#endregion
72
- export { Radio, RadioGroup, RadioGroupItem, RadioIndicator };
71
+ export { Radio, RadioGroup };
@@ -1,4 +1,4 @@
1
- import { CollapsiblePanelProps, CollapsibleRootProps, CollapsibleTriggerProps } from "./Collapsible.js";
1
+ import { Collapsible } from "./Collapsible.js";
2
2
  import * as React from "react";
3
3
 
4
4
  //#region src/components/Reasoning.d.ts
@@ -9,7 +9,7 @@ interface ReasoningContextValue {
9
9
  duration?: number;
10
10
  }
11
11
  declare function useReasoning(): ReasoningContextValue;
12
- interface ReasoningProps extends Omit<CollapsibleRootProps, "className" | "onOpenChange" | "unstyled"> {
12
+ interface ReasoningProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "onOpenChange" | "unstyled"> {
13
13
  className?: string;
14
14
  /**
15
15
  * Whether the model is currently generating reasoning. When true the
@@ -52,7 +52,7 @@ declare function Reasoning({
52
52
  }: ReasoningProps & {
53
53
  ref?: React.Ref<HTMLDivElement>;
54
54
  }): React.JSX.Element;
55
- interface ReasoningTriggerProps extends Omit<CollapsibleTriggerProps, "className" | "unstyled"> {
55
+ interface ReasoningTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
56
56
  className?: string;
57
57
  getThinkingMessage?: (isStreaming: boolean, duration?: number) => React.ReactNode;
58
58
  }
@@ -69,7 +69,7 @@ declare function ReasoningTrigger({
69
69
  }: ReasoningTriggerProps & {
70
70
  ref?: React.Ref<HTMLButtonElement>;
71
71
  }): React.JSX.Element;
72
- interface ReasoningContentProps extends Omit<CollapsiblePanelProps, "className" | "unstyled"> {
72
+ interface ReasoningContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
73
73
  className?: string;
74
74
  }
75
75
  /**