@mcp-b/react-components 0.12.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 (229) hide show
  1. package/dist/{AgentChat-CRmsKg9B.d.ts → AgentChat-Br6tKEl8.d.ts} +29 -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-p5KmOmt1.d.ts} +302 -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-Cuk28Js_.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 +304 -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 +139 -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 +9 -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 +95 -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,5 +1,5 @@
1
1
  import "react";
2
- import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { jsx } from "react/jsx-runtime";
3
3
  import { Slider as Slider$1 } from "@base-ui/react/slider";
4
4
  //#region src/components/Slider.tsx
5
5
  /**
@@ -33,20 +33,13 @@ import { Slider as Slider$1 } from "@base-ui/react/slider";
33
33
  *
34
34
  * @see {@link https://base-ui.com/react/components/slider | Base UI Slider}
35
35
  */
36
- function Slider({ className = "", children, defaultValue, max = 100, min = 0, ref, value, ...props }) {
36
+ function SliderRoot({ className = "", ref, ...props }) {
37
37
  const classes = ["slider", className].filter(Boolean).join(" ");
38
- const resolvedDefaultValue = children == null && value === void 0 && defaultValue === void 0 ? [min, max] : defaultValue;
39
- const thumbValues = Array.isArray(value) ? value : Array.isArray(resolvedDefaultValue) ? resolvedDefaultValue : [value ?? resolvedDefaultValue ?? min];
40
38
  return /* @__PURE__ */ jsx(Slider$1.Root, {
41
39
  ref,
42
40
  "data-slot": "slider",
43
41
  className: classes,
44
- defaultValue: resolvedDefaultValue,
45
- max,
46
- min,
47
- value,
48
- ...props,
49
- children: children ?? /* @__PURE__ */ jsx(SliderControl, { children: /* @__PURE__ */ jsxs(SliderTrack, { children: [/* @__PURE__ */ jsx(SliderIndicator, {}), thumbValues.map((_, index) => /* @__PURE__ */ jsx(SliderThumb, { index }, index))] }) })
42
+ ...props
50
43
  });
51
44
  }
52
45
  /**
@@ -111,5 +104,13 @@ function SliderOutput({ className = "", children, ref, ...props }) {
111
104
  children: (formattedValues, values) => typeof children === "function" ? children(values[0] ?? 0, values, formattedValues) : formattedValues.join(" - ")
112
105
  });
113
106
  }
107
+ const Slider = {
108
+ Root: SliderRoot,
109
+ Value: SliderOutput,
110
+ Control: SliderControl,
111
+ Track: SliderTrack,
112
+ Indicator: SliderIndicator,
113
+ Thumb: SliderThumb
114
+ };
114
115
  //#endregion
115
- export { Slider, SliderControl, SliderIndicator, SliderOutput, SliderThumb, SliderTrack };
116
+ export { Slider };
@@ -1,11 +1,11 @@
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/Sources.d.ts
5
5
  /**
6
6
  * Props for the Sources root. Wraps Base UI Collapsible.Root.
7
7
  */
8
- interface SourcesProps extends Omit<CollapsibleRootProps, "className" | "unstyled"> {
8
+ interface SourcesProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
9
9
  className?: string;
10
10
  }
11
11
  /**
@@ -35,7 +35,7 @@ declare function Sources({
35
35
  }: SourcesProps & {
36
36
  ref?: React.Ref<HTMLDivElement>;
37
37
  }): React.JSX.Element;
38
- interface SourcesTriggerProps extends Omit<CollapsibleTriggerProps, "className" | "unstyled"> {
38
+ interface SourcesTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
39
39
  className?: string;
40
40
  /** Number of sources to show in the trigger label. */
41
41
  count: number;
@@ -53,7 +53,7 @@ declare function SourcesTrigger({
53
53
  }: SourcesTriggerProps & {
54
54
  ref?: React.Ref<HTMLButtonElement>;
55
55
  }): React.JSX.Element;
56
- interface SourcesContentProps extends Omit<CollapsiblePanelProps, "className" | "unstyled"> {
56
+ interface SourcesContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
57
57
  className?: string;
58
58
  }
59
59
  /**
@@ -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 { b as LinkIcon, c as ChevronRightIcon } from "../icons-D2Q5n5C1.js";
3
+ import { b as LinkIcon, c as ChevronRightIcon } from "../icons-Ba9THQKz.js";
4
4
  import "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Sources.tsx
@@ -25,7 +25,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
25
25
  * @see {@link https://elements.ai-sdk.dev/components/sources | AI Elements Sources}
26
26
  */
27
27
  function Sources({ className, ref, ...props }) {
28
- return /* @__PURE__ */ jsx(CollapsibleRoot, {
28
+ return /* @__PURE__ */ jsx(Collapsible.Root, {
29
29
  ref,
30
30
  className: cx("sources", className),
31
31
  ...props,
@@ -37,8 +37,9 @@ function Sources({ className, ref, ...props }) {
37
37
  * chevron that rotates when open.
38
38
  */
39
39
  function SourcesTrigger({ className, count, children, ref, ...props }) {
40
- return /* @__PURE__ */ jsx(CollapsibleTrigger, {
40
+ return /* @__PURE__ */ jsx(Collapsible.Trigger, {
41
41
  ref,
42
+ "data-slot": "sources-trigger",
42
43
  className: cx("sources__trigger", className),
43
44
  ...props,
44
45
  unstyled: true,
@@ -51,6 +52,7 @@ function SourcesTrigger({ className, count, children, ref, ...props }) {
51
52
  count === 1 ? "source" : "sources"
52
53
  ]
53
54
  }), /* @__PURE__ */ jsx("span", {
55
+ "data-slot": "sources-trigger-icon",
54
56
  className: "sources__trigger-icon",
55
57
  "aria-hidden": "true",
56
58
  children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
@@ -61,8 +63,9 @@ function SourcesTrigger({ className, count, children, ref, ...props }) {
61
63
  * The collapsible panel that contains Source children.
62
64
  */
63
65
  function SourcesContent({ className, children, ref, ...props }) {
64
- return /* @__PURE__ */ jsx(CollapsiblePanel, {
66
+ return /* @__PURE__ */ jsx(Collapsible.Panel, {
65
67
  ref,
68
+ "data-slot": "sources-content",
66
69
  className: cx("sources__content", className),
67
70
  ...props,
68
71
  unstyled: true,
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { M as SpinnerIcon, a as CheckIcon } from "../icons-D2Q5n5C1.js";
2
+ import { N as SpinnerIcon, a as CheckIcon } from "../icons-Ba9THQKz.js";
3
3
  import { t as assignRef } from "../merge-refs-DF_7w2x_.js";
4
4
  import * as React from "react";
5
5
  import { jsx } from "react/jsx-runtime";
@@ -34,10 +34,9 @@ interface SwitchThumbProps extends Omit<React.ComponentPropsWithRef<typeof Switc
34
34
  *
35
35
  * @see {@link https://base-ui.com/react/components/switch | Base UI Switch}
36
36
  */
37
- declare function Switch({
37
+ declare function SwitchRoot({
38
38
  size,
39
39
  className,
40
- children,
41
40
  ref,
42
41
  ...props
43
42
  }: SwitchProps & {
@@ -53,5 +52,9 @@ declare function SwitchThumb({
53
52
  }: SwitchThumbProps & {
54
53
  ref?: React.Ref<HTMLSpanElement>;
55
54
  }): React.JSX.Element;
55
+ declare const Switch: {
56
+ Root: typeof SwitchRoot;
57
+ Thumb: typeof SwitchThumb;
58
+ };
56
59
  //#endregion
57
- export { Switch, SwitchProps, SwitchThumb, SwitchThumbProps };
60
+ export { Switch, SwitchProps, SwitchThumbProps };
@@ -23,7 +23,7 @@ import { Switch as Switch$1 } from "@base-ui/react/switch";
23
23
  *
24
24
  * @see {@link https://base-ui.com/react/components/switch | Base UI Switch}
25
25
  */
26
- function Switch({ size = "default", className = "", children, ref, ...props }) {
26
+ function SwitchRoot({ size = "default", className = "", ref, ...props }) {
27
27
  const normalizedSize = size === "md" ? "default" : size;
28
28
  const classes = [
29
29
  "switch",
@@ -35,8 +35,7 @@ function Switch({ size = "default", className = "", children, ref, ...props }) {
35
35
  "data-slot": "switch",
36
36
  "data-size": normalizedSize,
37
37
  className: classes,
38
- ...props,
39
- children: children ?? /* @__PURE__ */ jsx(SwitchThumb, {})
38
+ ...props
40
39
  });
41
40
  }
42
41
  /**
@@ -51,5 +50,9 @@ function SwitchThumb({ className = "", ref, ...props }) {
51
50
  ...props
52
51
  });
53
52
  }
53
+ const Switch = {
54
+ Root: SwitchRoot,
55
+ Thumb: SwitchThumb
56
+ };
54
57
  //#endregion
55
- export { Switch, SwitchThumb };
58
+ export { Switch };
@@ -1,2 +1,2 @@
1
- import { a as Tabs, c as TabsList, d as TabsProps, f as TabsTrigger, i as TabProps, l as TabsListProps, m as tabsListVariants, n as TabPanel, o as TabsContent, p as TabsTriggerProps, r as TabPanelProps, s as TabsContentProps, t as Tab, u as TabsListVariantsOptions } from "../Tabs-D9EAq09D.js";
2
- export { Tab, TabPanel, TabPanelProps, TabProps, Tabs, TabsContent, TabsContentProps, TabsList, TabsListProps, TabsListVariantsOptions, TabsProps, TabsTrigger, TabsTriggerProps, tabsListVariants };
1
+ import { a as TabsListVariantsOptions, i as TabsListProps, n as TabProps, o as TabsProps, r as Tabs, s as tabsListVariants, t as TabPanelProps } from "../Tabs-3Zc4tb9D.js";
2
+ export { TabPanelProps, TabProps, Tabs, TabsListProps, TabsListVariantsOptions, TabsProps, tabsListVariants };
@@ -26,7 +26,7 @@ function tabsListVariants({ variant = "default", className } = {}) {
26
26
  *
27
27
  * @see {@link https://base-ui.com/react/components/tabs | Base UI Tabs}
28
28
  */
29
- function Tabs({ orientation = "horizontal", variant = "default", className = "", ref, ...props }) {
29
+ function TabsRoot({ orientation = "horizontal", variant = "default", className = "", ref, ...props }) {
30
30
  const classes = [
31
31
  "tabs",
32
32
  variant !== "default" && `tabs--${variant}`,
@@ -72,7 +72,12 @@ function TabPanel({ className = "", ref, ...props }) {
72
72
  ...props
73
73
  });
74
74
  }
75
- const TabsTrigger = Tab;
76
- const TabsContent = TabPanel;
75
+ const Tabs = {
76
+ Root: TabsRoot,
77
+ List: TabsList,
78
+ Tab,
79
+ Indicator: Tabs$1.Indicator,
80
+ Panel: TabPanel
81
+ };
77
82
  //#endregion
78
- export { Tab, TabPanel, Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants };
83
+ export { Tabs, tabsListVariants };
@@ -1,8 +1,8 @@
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/Task.d.ts
5
- interface TaskProps extends Omit<CollapsibleRootProps, "className" | "unstyled"> {
5
+ interface TaskProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
6
6
  className?: string;
7
7
  }
8
8
  /**
@@ -36,7 +36,7 @@ declare function Task({
36
36
  }: TaskProps & {
37
37
  ref?: React.Ref<HTMLDivElement>;
38
38
  }): React.JSX.Element;
39
- interface TaskTriggerProps extends Omit<CollapsibleTriggerProps, "className" | "unstyled"> {
39
+ interface TaskTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
40
40
  className?: string;
41
41
  /** Heading text shown in the trigger row. */
42
42
  title: string;
@@ -53,7 +53,7 @@ declare function TaskTrigger({
53
53
  }: TaskTriggerProps & {
54
54
  ref?: React.Ref<HTMLButtonElement>;
55
55
  }): React.JSX.Element;
56
- interface TaskContentProps extends Omit<CollapsiblePanelProps, "className" | "unstyled"> {
56
+ interface TaskContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
57
57
  className?: string;
58
58
  }
59
59
  /**
@@ -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 SearchIcon, c as ChevronRightIcon, h as FileIcon } from "../icons-D2Q5n5C1.js";
3
+ import { c as ChevronRightIcon, h as FileIcon, j as SearchIcon } from "../icons-Ba9THQKz.js";
4
4
  import "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Task.tsx
@@ -28,7 +28,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
28
28
  * @see {@link https://elements.ai-sdk.dev/components/task | AI Elements Task}
29
29
  */
30
30
  function Task({ className, defaultOpen = true, ref, ...props }) {
31
- return /* @__PURE__ */ jsx(CollapsibleRoot, {
31
+ return /* @__PURE__ */ jsx(Collapsible.Root, {
32
32
  ref,
33
33
  className: cx("task", className),
34
34
  defaultOpen,
@@ -40,15 +40,17 @@ function Task({ className, defaultOpen = true, ref, ...props }) {
40
40
  * Clickable header that toggles the task content.
41
41
  */
42
42
  function TaskTrigger({ className, title, children, ref, ...props }) {
43
- if (children !== void 0 && children !== null) return /* @__PURE__ */ jsx(CollapsibleTrigger, {
43
+ if (children !== void 0 && children !== null) return /* @__PURE__ */ jsx(Collapsible.Trigger, {
44
44
  ref,
45
+ "data-slot": "task-trigger",
45
46
  className: cx("task__trigger", className),
46
47
  ...props,
47
48
  unstyled: true,
48
49
  children
49
50
  });
50
- return /* @__PURE__ */ jsxs(CollapsibleTrigger, {
51
+ return /* @__PURE__ */ jsxs(Collapsible.Trigger, {
51
52
  ref,
53
+ "data-slot": "task-trigger",
52
54
  className: cx("task__trigger", className),
53
55
  ...props,
54
56
  unstyled: true,
@@ -63,6 +65,7 @@ function TaskTrigger({ className, title, children, ref, ...props }) {
63
65
  children: title
64
66
  }),
65
67
  /* @__PURE__ */ jsx("span", {
68
+ "data-slot": "task-trigger-icon",
66
69
  className: "task__trigger-icon",
67
70
  "aria-hidden": "true",
68
71
  children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
@@ -74,8 +77,9 @@ function TaskTrigger({ className, title, children, ref, ...props }) {
74
77
  * The collapsible panel containing TaskItem children.
75
78
  */
76
79
  function TaskContent({ className, children, ref, ...props }) {
77
- return /* @__PURE__ */ jsx(CollapsiblePanel, {
80
+ return /* @__PURE__ */ jsx(Collapsible.Panel, {
78
81
  ref,
82
+ "data-slot": "task-content",
79
83
  className: cx("task__content", className),
80
84
  ...props,
81
85
  unstyled: true,
@@ -1,5 +1,5 @@
1
- import { r as ButtonProps } from "../Button-Ct5I6aTu.js";
2
- import { t as CopyButtonProps } from "../copy-button-BKXqGiNm.js";
1
+ import { r as ButtonProps } from "../Button-FX_hpqxm.js";
2
+ import { t as CopyButtonProps } from "../copy-button-DtPMgN7e.js";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/components/Terminal.d.ts
@@ -1,8 +1,8 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { L as XIcon, P as TerminalIcon } from "../icons-D2Q5n5C1.js";
2
+ import { I as TerminalIcon, 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 CopyButton } from "../copy-button-C6JSKtFE.js";
4
+ import { Tooltip } from "./Tooltip.js";
5
+ import { t as CopyButton } from "../copy-button-DUMLYdsk.js";
6
6
  import { Badge } from "./Badge.js";
7
7
  import { ScrollArea } from "./ScrollArea.js";
8
8
  import * as React from "react";
@@ -217,7 +217,7 @@ function TerminalClearButton({ className, label = "Clear terminal", onClick, ...
217
217
  onClear?.();
218
218
  onClick?.(e);
219
219
  }, [onClear, onClick]);
220
- return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsx(Button, {
220
+ return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: /* @__PURE__ */ jsx(Button, {
221
221
  variant: "ghost",
222
222
  size: "icon",
223
223
  "aria-label": label,
@@ -225,7 +225,7 @@ function TerminalClearButton({ className, label = "Clear terminal", onClick, ...
225
225
  ...props,
226
226
  onClick: handleClick,
227
227
  children: /* @__PURE__ */ jsx(XIcon, {})
228
- }) }), /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsx(TooltipPositioner, { children: /* @__PURE__ */ jsx(TooltipPopup, { children: label }) }) })] });
228
+ }) }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, { children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: label }) }) })] });
229
229
  }
230
230
  const ANSI_REGEX = /\u001b\[[0-9;?]*[a-zA-Z]/g;
231
231
  function stripAnsi(input) {
@@ -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/TestResults.d.ts
@@ -101,7 +101,7 @@ declare function TestResultsContent({
101
101
  }: TestResultsContentProps & {
102
102
  ref?: React.Ref<HTMLDivElement>;
103
103
  }): React.JSX.Element;
104
- interface TestSuiteProps extends Omit<CollapsibleRootProps, "className" | "unstyled"> {
104
+ interface TestSuiteProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
105
105
  className?: string;
106
106
  name: string;
107
107
  status: TestStatusValue;
@@ -117,7 +117,7 @@ declare function TestSuite({
117
117
  }: TestSuiteProps & {
118
118
  ref?: React.Ref<HTMLDivElement>;
119
119
  }): React.JSX.Element;
120
- type TestSuiteNameProps = Omit<CollapsibleTriggerProps, "className" | "unstyled"> & {
120
+ type TestSuiteNameProps = Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> & {
121
121
  className?: string;
122
122
  };
123
123
  declare function TestSuiteName({
@@ -144,7 +144,7 @@ declare function TestSuiteStats({
144
144
  }: TestSuiteStatsProps & {
145
145
  ref?: React.Ref<HTMLDivElement>;
146
146
  }): React.JSX.Element;
147
- type TestSuiteContentProps = Omit<CollapsiblePanelProps, "className" | "unstyled"> & {
147
+ type TestSuiteContentProps = Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> & {
148
148
  className?: string;
149
149
  };
150
150
  declare function TestSuiteContent({
@@ -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 { L as XIcon, M as SpinnerIcon, a as CheckIcon, c as ChevronRightIcon } from "../icons-D2Q5n5C1.js";
3
+ import { N as SpinnerIcon, a as CheckIcon, c as ChevronRightIcon, z as XIcon } from "../icons-Ba9THQKz.js";
4
4
  import { Badge } from "./Badge.js";
5
5
  import * as React from "react";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -169,7 +169,7 @@ function TestSuite({ className, name, status, defaultOpen, children, ref, ...pro
169
169
  const isComposable = hasComposableTestSuiteChildren(children);
170
170
  return /* @__PURE__ */ jsx(TestSuiteContext.Provider, {
171
171
  value: contextValue,
172
- children: /* @__PURE__ */ jsx(CollapsibleRoot, {
172
+ children: /* @__PURE__ */ jsx(Collapsible.Root, {
173
173
  ref,
174
174
  className: cx("test-results__suite", className),
175
175
  defaultOpen: defaultOpen ?? status === "failed",
@@ -185,7 +185,7 @@ function TestSuite({ className, name, status, defaultOpen, children, ref, ...pro
185
185
  }
186
186
  function TestSuiteName({ className, children, ref, ...props }) {
187
187
  const { name, status } = React.useContext(TestSuiteContext);
188
- return /* @__PURE__ */ jsxs(CollapsibleTrigger, {
188
+ return /* @__PURE__ */ jsxs(Collapsible.Trigger, {
189
189
  ref,
190
190
  className: cx("test-results__suite-trigger", className),
191
191
  ...props,
@@ -230,7 +230,7 @@ function TestSuiteStats({ className, passed = 0, failed = 0, skipped = 0, childr
230
230
  });
231
231
  }
232
232
  function TestSuiteContent({ className, children, ref, ...props }) {
233
- return /* @__PURE__ */ jsx(CollapsiblePanel, {
233
+ return /* @__PURE__ */ jsx(Collapsible.Panel, {
234
234
  ref,
235
235
  className: cx("test-results__suite-content", className),
236
236
  ...props,
@@ -1,8 +1,8 @@
1
- import { a as AgentChatRenderPartContext, r as AgentChatProps } from "../AgentChat-CRmsKg9B.js";
1
+ import { a as AgentChatRenderPartContext, r as AgentChatProps } from "../AgentChat-Br6tKEl8.js";
2
2
  import { n as BrowserLiveViewProps, t as BrowserLiveView } from "../BrowserLiveView-BV5qgFgI.js";
3
3
  import { n as BrowserReplayProps, t as BrowserReplay } from "../BrowserReplay-xWvRjRAC.js";
4
4
  import { _ as isThinkChatActivityPart } from "../ThinkChatToolParts-Cv4o7j6F.js";
5
- import { a as ThinkChatToolRenderers, c as renderThinkChatActivityPart, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as describeThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-F4KFPcJA.js";
5
+ import { a as ThinkChatToolRenderers, c as renderThinkChatActivityPart, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as describeThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-Cuk28Js_.js";
6
6
  import { n as ThinkChatValue } from "../ThinkChatContext-C3Eb1Xpi.js";
7
7
  import { FileInfo, UseWorkspaceOptions, WorkspaceExplorer, WorkspaceExplorerProps, WorkspaceFileState, WorkspaceInfo, WorkspaceSource, WorkspaceState, inferWorkspaceLanguage, useWorkspace } from "./WorkspaceExplorer.js";
8
8
  import * as React from "react";
@@ -32,12 +32,19 @@ interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends
32
32
  emptyState?: React.ReactNode;
33
33
  /** Extra controls rendered inside the composer, next to the send button. */
34
34
  composerTools?: React.ReactNode;
35
+ /** Optional product state rendered in the PromptInput header, such as an Activity. */
36
+ composerHeader?: AgentChatProps<MessageT>["composerHeader"];
35
37
  /** Extra rows rendered in the built-in plus menu after files. */
36
38
  composerAddMenuItems?: AgentChatProps<MessageT>["composerAddMenuItems"];
37
39
  /** Composer placeholder text. */
38
40
  placeholder?: string;
39
41
  /** Rendered after each message (e.g. per-message actions). */
40
42
  renderMessageAfter?: AgentChatProps<MessageT>["renderMessageAfter"];
43
+ /**
44
+ * Durable backend edit/resend operation. Think does not synchronize
45
+ * `setMessages`, so wire this to an agent callable that creates the branch.
46
+ */
47
+ onEditAndResend?: AgentChatProps<MessageT>["onEditAndResend"];
41
48
  /**
42
49
  * Overrides the built-in connection notice (derived from the hook's
43
50
  * `isRecovering`/`connectionError`) shown between transcript and composer.
@@ -2,6 +2,6 @@ import { BrowserLiveView } from "./BrowserLiveView.js";
2
2
  import { BrowserReplay } from "./BrowserReplay.js";
3
3
  import { isThinkChatActivityPart } from "./ThinkChatToolParts.js";
4
4
  import { ThinkChatActivity, createThinkChatActivityRenderer, describeThinkChatActivityPart, renderThinkChatActivityPart } from "./ThinkChatActivity.js";
5
- import { a as useThinkChat, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkPendingApprovals, r as ThinkChatProvider, t as ThinkChat } from "../ThinkChat-B3wYahor.js";
5
+ import { a as useThinkChat, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkPendingApprovals, r as ThinkChatProvider, t as ThinkChat } from "../ThinkChat-7DQ2CogF.js";
6
6
  import { WorkspaceExplorer, inferWorkspaceLanguage, useWorkspace } from "./WorkspaceExplorer.js";
7
7
  export { BrowserLiveView, BrowserReplay, ThinkChat, ThinkChatActivity, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, WorkspaceExplorer, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, useThinkChat, useThinkPendingApprovals, useWorkspace };
@@ -1,3 +1,3 @@
1
1
  import { _ as isThinkChatActivityPart } from "../ThinkChatToolParts-Cv4o7j6F.js";
2
- import { a as ThinkChatToolRenderers, c as renderThinkChatActivityPart, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as describeThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-F4KFPcJA.js";
2
+ import { a as ThinkChatToolRenderers, c as renderThinkChatActivityPart, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as describeThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-Cuk28Js_.js";
3
3
  export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, describeThinkChatActivityPart, isThinkChatActivityPart, renderThinkChatActivityPart };
@@ -1,4 +1,4 @@
1
- import { A as SearchIcon, C as MonitorIcon, E as PencilIcon, F as WarningIcon, I as WrenchIcon, P as TerminalIcon, b as LinkIcon, h as FileIcon, y as InfoIcon } from "../icons-D2Q5n5C1.js";
1
+ import { D as PencilIcon, I as TerminalIcon, L as WarningIcon, R as WrenchIcon, b as LinkIcon, h as FileIcon, j as SearchIcon, w as MonitorIcon, y as InfoIcon } from "../icons-Ba9THQKz.js";
2
2
  import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityText, ActivityTrigger } from "./Activity.js";
3
3
  import { t as summarizeToolInput } from "../summarize-tool-input-BUJsENSn.js";
4
4
  import { useOptionalThinkChatContext } from "./ThinkChatContext.js";
@@ -1,6 +1,6 @@
1
1
  import { ActivityOutput, ActivityPanel } from "./Activity.js";
2
- import { Tab, TabPanel, Tabs, TabsList } from "./Tabs.js";
3
- import { t as CodeBlock } from "../CodeBlock-XNQOupQ3.js";
2
+ import { Tabs } from "./Tabs.js";
3
+ import { t as CodeBlock } from "../CodeBlock-BUFXG8HW.js";
4
4
  import { BrowserLiveView } from "./BrowserLiveView.js";
5
5
  import { displayUrl } from "./ThinkChatToolParts.js";
6
6
  import * as React from "react";
@@ -289,25 +289,25 @@ function ThinkChatBrowserPanel({ part }) {
289
289
  label: "Browser",
290
290
  status: executeStatusText(output),
291
291
  error: output?.status === "error",
292
- children: browserView && code ? /* @__PURE__ */ jsxs(Tabs, {
292
+ children: browserView && code ? /* @__PURE__ */ jsxs(Tabs.Root, {
293
293
  className: "activity__browser-tabs",
294
294
  defaultValue: "browser",
295
295
  children: [
296
- /* @__PURE__ */ jsxs(TabsList, {
296
+ /* @__PURE__ */ jsxs(Tabs.List, {
297
297
  variant: "line",
298
- children: [/* @__PURE__ */ jsx(Tab, {
298
+ children: [/* @__PURE__ */ jsx(Tabs.Tab, {
299
299
  value: "browser",
300
300
  children: "Preview"
301
- }), /* @__PURE__ */ jsx(Tab, {
301
+ }), /* @__PURE__ */ jsx(Tabs.Tab, {
302
302
  value: "code",
303
303
  children: "Code"
304
304
  })]
305
305
  }),
306
- /* @__PURE__ */ jsx(TabPanel, {
306
+ /* @__PURE__ */ jsx(Tabs.Panel, {
307
307
  value: "browser",
308
308
  children: browserView
309
309
  }),
310
- /* @__PURE__ */ jsx(TabPanel, {
310
+ /* @__PURE__ */ jsx(Tabs.Panel, {
311
311
  value: "code",
312
312
  children: codeView
313
313
  })