@mcp-b/react-components 0.19.0 → 0.20.1

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 (142) hide show
  1. package/dist/{AgentChat-ClxViuUM.d.ts → AgentChat-C-ZyXbJz.d.ts} +4 -1
  2. package/dist/{Button-DLGzHsjc.d.ts → Button-yRInko9u.d.ts} +0 -1
  3. package/dist/{CodeBlock-gV4kZeCI.d.ts → CodeBlock-Bbls1CnA.d.ts} +1 -1
  4. package/dist/{Combobox-CYc37s5l.d.ts → Combobox-xEEF6fUb.d.ts} +0 -1
  5. package/dist/{PromptInput-Bdh9pqlo.d.ts → PromptInput-Cq-8RoXD.d.ts} +6 -4
  6. package/dist/{Tabs-ColWK-XA.d.ts → Tabs-C49J5m0Q.d.ts} +16 -2
  7. package/dist/{ThinkChat-15EhfvYJ.js → ThinkChat-E_HrfH76.js} +15 -6
  8. package/dist/{ThinkChatActivity-Bzot45kX.d.ts → ThinkChatActivity-CdbL0aoA.d.ts} +1 -1
  9. package/dist/{Workspace-Jez8ffUj.d.ts → Workspace-CWtust-2.d.ts} +1 -1
  10. package/dist/{WorkspaceExplorer-B9dQWNVK.d.ts → WorkspaceExplorer-DGigwsgH.d.ts} +1 -1
  11. package/dist/{WorkspaceFile-CzyHnESE.d.ts → WorkspaceFile-D8Un_xge.d.ts} +1 -1
  12. package/dist/components/AgentAttention.d.ts +1 -1
  13. package/dist/components/AgentChat.d.ts +1 -1
  14. package/dist/components/AgentChat.js +4 -2
  15. package/dist/components/AgentChatMessageEditor.js +1 -0
  16. package/dist/components/AgentConnection.js +14 -11
  17. package/dist/components/AgentToolDetail.js +1 -1
  18. package/dist/components/AlertDialog.d.ts +24 -5
  19. package/dist/components/AlertDialog.js +15 -4
  20. package/dist/components/AppTopBar.js +1 -0
  21. package/dist/components/Artifact.d.ts +1 -1
  22. package/dist/components/Badge.d.ts +7 -10
  23. package/dist/components/Badge.js +14 -48
  24. package/dist/components/Button.d.ts +1 -1
  25. package/dist/components/Button.js +1 -3
  26. package/dist/components/Checkbox.d.ts +2 -5
  27. package/dist/components/Checkbox.js +0 -1
  28. package/dist/components/CodeBlock.d.ts +1 -1
  29. package/dist/components/Combobox.d.ts +1 -1
  30. package/dist/components/Combobox.js +1 -2
  31. package/dist/components/Commit.d.ts +1 -1
  32. package/dist/components/Context.js +8 -1
  33. package/dist/components/Conversation.d.ts +1 -1
  34. package/dist/components/Dialog.d.ts +1 -0
  35. package/dist/components/Dialog.js +14 -3
  36. package/dist/components/EnvironmentVariables.d.ts +1 -1
  37. package/dist/components/IconButton.d.ts +1 -1
  38. package/dist/components/InlineCitation.js +1 -0
  39. package/dist/components/Marker.d.ts +3 -11
  40. package/dist/components/Marker.js +15 -43
  41. package/dist/components/MediaPreviewCard.js +1 -1
  42. package/dist/components/Menubar.d.ts +5 -1
  43. package/dist/components/Menubar.js +9 -2
  44. package/dist/components/Message.d.ts +1 -1
  45. package/dist/components/MessageScroller.d.ts +1 -1
  46. package/dist/components/ModelSelector.d.ts +1 -1
  47. package/dist/components/NavigationMenu.d.ts +2 -6
  48. package/dist/components/Popover.d.ts +6 -1
  49. package/dist/components/Popover.js +12 -4
  50. package/dist/components/PromptInput.d.ts +1 -1
  51. package/dist/components/Queue.d.ts +1 -1
  52. package/dist/components/RadioGroup.d.ts +1 -3
  53. package/dist/components/ResponsiveSidebarShell.js +1 -1
  54. package/dist/components/ScrollArea.d.ts +19 -8
  55. package/dist/components/ScrollArea.js +17 -8
  56. package/dist/components/Select.js +2 -2
  57. package/dist/components/Slider.d.ts +1 -3
  58. package/dist/components/Stepper.d.ts +6 -20
  59. package/dist/components/Stepper.js +31 -129
  60. package/dist/components/SubagentRunDetails.js +1 -0
  61. package/dist/components/Tabs.d.ts +1 -1
  62. package/dist/components/Tabs.js +8 -8
  63. package/dist/components/Terminal.d.ts +2 -2
  64. package/dist/components/ThinkChat.d.ts +15 -6
  65. package/dist/components/ThinkChat.js +1 -1
  66. package/dist/components/ThinkChatActivity.d.ts +1 -1
  67. package/dist/components/ThinkChatActivitySummary.js +6 -2
  68. package/dist/components/ThinkChatToolPanels.js +9 -4
  69. package/dist/components/ThinkFullApp.d.ts +2 -2
  70. package/dist/components/ThinkFullApp.js +3 -3
  71. package/dist/components/ThinkRoutineLibrary.js +1 -1
  72. package/dist/components/Toast.d.ts +1 -0
  73. package/dist/components/Toast.js +9 -2
  74. package/dist/components/Toggle.js +7 -7
  75. package/dist/components/Toolbar.d.ts +10 -2
  76. package/dist/components/Toolbar.js +17 -4
  77. package/dist/components/WebPreview.d.ts +1 -1
  78. package/dist/components/Workspace.d.ts +1 -1
  79. package/dist/components/WorkspaceBrowser.d.ts +1 -1
  80. package/dist/components/WorkspaceExplorer.d.ts +3 -3
  81. package/dist/components/WorkspaceExplorer.js +1 -1
  82. package/dist/components/WorkspaceFile.d.ts +1 -1
  83. package/dist/components/WorkspaceFileView.d.ts +1 -1
  84. package/dist/{copy-button-D7aAYA-2.d.ts → copy-button-BrvQ7z4W.d.ts} +1 -1
  85. package/dist/{merge-refs-DF_7w2x_.js → merge-refs-KlanQB7A.js} +1 -1
  86. package/dist/styles/accordion.css +3 -3
  87. package/dist/styles/activity.css +4 -4
  88. package/dist/styles/agent-chat.css +1 -1
  89. package/dist/styles/agent-connection.css +3 -3
  90. package/dist/styles/agent-tool-detail.css +1 -1
  91. package/dist/styles/alert-dialog.css +1 -107
  92. package/dist/styles/approval.css +1 -1
  93. package/dist/styles/artifact.css +1 -6
  94. package/dist/styles/badge.css +2 -2
  95. package/dist/styles/base-ui-motion.css +26 -13
  96. package/dist/styles/base.css +1 -1
  97. package/dist/styles/browser-run-panel.css +2 -2
  98. package/dist/styles/button.css +2 -2
  99. package/dist/styles/chain-of-thought.css +1 -1
  100. package/dist/styles/chatgpt-sign-in-screen.css +1 -1
  101. package/dist/styles/checkbox.css +2 -2
  102. package/dist/styles/codex-model-selector.css +3 -3
  103. package/dist/styles/collapsible.css +1 -1
  104. package/dist/styles/context.css +1 -1
  105. package/dist/styles/dialog.css +1 -54
  106. package/dist/styles/field.css +6 -6
  107. package/dist/styles/inline-citation.css +2 -2
  108. package/dist/styles/label.css +3 -6
  109. package/dist/styles/marker.css +1 -1
  110. package/dist/styles/mcp-server-picker.css +1 -1
  111. package/dist/styles/media-preview-card.css +1 -1
  112. package/dist/styles/menubar.css +2 -41
  113. package/dist/styles/message.css +0 -7
  114. package/dist/styles/motion-reduction.css +2 -4
  115. package/dist/styles/navigation-menu.css +6 -1
  116. package/dist/styles/number-field.css +8 -8
  117. package/dist/styles/plan.css +2 -2
  118. package/dist/styles/popover.css +2 -38
  119. package/dist/styles/pricing-page.css +1 -1
  120. package/dist/styles/progress.css +4 -4
  121. package/dist/styles/prompt-input.css +1 -1
  122. package/dist/styles/radio.css +2 -2
  123. package/dist/styles/recipes.css +93 -18
  124. package/dist/styles/scroll-area.css +0 -18
  125. package/dist/styles/select.css +5 -8
  126. package/dist/styles/slider.css +0 -1
  127. package/dist/styles/stepper.css +4 -4
  128. package/dist/styles/streamdown.css +1 -1
  129. package/dist/styles/subagent-run.css +2 -9
  130. package/dist/styles/switch.css +2 -2
  131. package/dist/styles/tabs.css +59 -4
  132. package/dist/styles/task.css +1 -1
  133. package/dist/styles/terminal.css +1 -5
  134. package/dist/styles/theme-mode-control.css +1 -1
  135. package/dist/styles/think-thread-picker.css +1 -1
  136. package/dist/styles/toast.css +1 -30
  137. package/dist/styles/toggle.css +5 -19
  138. package/dist/styles/toolbar.css +17 -74
  139. package/dist/styles/tooltip.css +1 -1
  140. package/dist/styles/workspace-explorer.css +0 -9
  141. package/dist/utils/structured-code.d.ts +1 -1
  142. package/package.json +2 -2
@@ -1,3 +1,4 @@
1
+ import { r as Tabs } from "../Tabs-C49J5m0Q.js";
1
2
  import * as React from "react";
2
3
 
3
4
  //#region src/components/Stepper.d.ts
@@ -12,15 +13,8 @@ type StepIndicators = {
12
13
  interface StepperContextValue {
13
14
  activeStep: number;
14
15
  setActiveStep: (step: number) => void;
15
- stepsCount: number;
16
16
  orientation: StepperOrientation;
17
17
  indicators: StepIndicators;
18
- idPrefix: string;
19
- registerTrigger: (step: number, node: HTMLButtonElement | null) => void;
20
- focusNext: (step: number) => void;
21
- focusPrev: (step: number) => void;
22
- focusFirst: () => void;
23
- focusLast: () => void;
24
18
  }
25
19
  interface StepItemContextValue {
26
20
  step: number;
@@ -87,14 +81,13 @@ declare function Stepper({
87
81
  }: StepperProps & {
88
82
  ref?: React.Ref<HTMLDivElement>;
89
83
  }): React.JSX.Element;
90
- interface StepperNavProps extends React.ComponentPropsWithoutRef<"nav"> {}
84
+ interface StepperNavProps extends Omit<React.ComponentPropsWithoutRef<typeof Tabs.List>, "unstyled"> {}
91
85
  declare function StepperNav({
92
86
  className,
93
87
  ref,
94
- role,
95
88
  ...props
96
89
  }: StepperNavProps & {
97
- ref?: React.Ref<HTMLElement>;
90
+ ref?: React.Ref<HTMLDivElement>;
98
91
  }): React.JSX.Element;
99
92
  interface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {
100
93
  step: number;
@@ -113,17 +106,12 @@ declare function StepperItem({
113
106
  }: StepperItemProps & {
114
107
  ref?: React.Ref<HTMLDivElement>;
115
108
  }): React.JSX.Element;
116
- interface StepperTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {}
109
+ interface StepperTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof Tabs.Tab>, "unstyled" | "value"> {}
117
110
  declare function StepperTrigger({
118
111
  className,
119
112
  children,
120
113
  disabled,
121
- id,
122
114
  type,
123
- "aria-controls": ariaControls,
124
- tabIndex,
125
- onClick,
126
- onKeyDown,
127
115
  ref,
128
116
  ...props
129
117
  }: StepperTriggerProps & {
@@ -171,7 +159,7 @@ declare function StepperPanel({
171
159
  }: StepperPanelProps & {
172
160
  ref?: React.Ref<HTMLDivElement>;
173
161
  }): React.JSX.Element;
174
- interface StepperContentProps extends React.ComponentPropsWithoutRef<"div"> {
162
+ interface StepperContentProps extends Omit<React.ComponentPropsWithoutRef<typeof Tabs.Panel>, "keepMounted" | "unstyled" | "value"> {
175
163
  value: number;
176
164
  forceMount?: boolean;
177
165
  /** Optional vertical rhythm for direct content children. */
@@ -183,12 +171,10 @@ declare function StepperContent({
183
171
  spacing,
184
172
  className,
185
173
  children,
186
- id,
187
- "aria-labelledby": ariaLabelledBy,
188
174
  ref,
189
175
  ...props
190
176
  }: StepperContentProps & {
191
177
  ref?: React.Ref<HTMLDivElement>;
192
- }): React.JSX.Element | null;
178
+ }): React.JSX.Element;
193
179
  //#endregion
194
180
  export { StepIndicators, StepItemContextValue, Stepper, StepperContent, StepperContentProps, StepperContextValue, StepperDescription, StepperDescriptionProps, StepperIndicator, StepperIndicatorProps, StepperItem, StepperItemProps, StepperNav, StepperNavProps, StepperOrientation, StepperPanel, StepperPanelProps, StepperProps, StepperSeparator, StepperSeparatorProps, StepperState, StepperTitle, StepperTitleProps, StepperTrigger, StepperTriggerProps, useStepItem, useStepper };
@@ -1,6 +1,6 @@
1
- import { t as cx } from "../class-names-BiMDVpUo.js";
1
+ import { n as mergeBaseClassName, t as cx } from "../class-names-BiMDVpUo.js";
2
2
  import { K as SpinnerIcon, u as CheckIcon } from "../icons-DKXiSepE.js";
3
- import { t as assignRef } from "../merge-refs-DF_7w2x_.js";
3
+ import { Tabs } from "./Tabs.js";
4
4
  import * as React from "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region src/components/Stepper.tsx
@@ -38,97 +38,47 @@ function useStepItem() {
38
38
  * @see {@link https://reui.io/docs/components/base/stepper | ReUI Stepper}
39
39
  */
40
40
  function Stepper({ defaultValue = 1, value, onValueChange, orientation = "horizontal", indicators = EMPTY_STEP_INDICATORS, className, children, ref, ...props }) {
41
- const idPrefix = `stepper-${React.useId()}`;
42
41
  const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue);
43
- const triggerNodes = React.useRef(/* @__PURE__ */ new Map());
44
- const [triggerSteps, setTriggerSteps] = React.useState([]);
45
42
  const activeStep = value ?? uncontrolledValue;
46
43
  const setActiveStep = React.useCallback((step) => {
47
44
  if (value === void 0) setUncontrolledValue(step);
48
45
  onValueChange?.(step);
49
46
  }, [onValueChange, value]);
50
- const registerTrigger = React.useCallback((step, node) => {
51
- if (node) {
52
- triggerNodes.current.set(step, node);
53
- setTriggerSteps((steps) => steps.includes(step) ? steps : [...steps, step]);
54
- return;
55
- }
56
- triggerNodes.current.delete(step);
57
- setTriggerSteps((steps) => steps.filter((currentStep) => currentStep !== step));
58
- }, []);
59
- const focusStep = React.useCallback((step) => {
60
- triggerNodes.current.get(step)?.focus();
61
- }, []);
62
- const getEnabledSteps = React.useCallback(() => triggerSteps.filter((step) => {
63
- const node = triggerNodes.current.get(step);
64
- return node && !node.disabled;
65
- }), [triggerSteps]);
66
- const focusNext = React.useCallback((step) => {
67
- const enabledSteps = getEnabledSteps();
68
- const currentIndex = enabledSteps.indexOf(step);
69
- if (currentIndex === -1 || enabledSteps.length === 0) return;
70
- focusStep(enabledSteps[(currentIndex + 1) % enabledSteps.length]);
71
- }, [focusStep, getEnabledSteps]);
72
- const focusPrev = React.useCallback((step) => {
73
- const enabledSteps = getEnabledSteps();
74
- const currentIndex = enabledSteps.indexOf(step);
75
- if (currentIndex === -1 || enabledSteps.length === 0) return;
76
- focusStep(enabledSteps[(currentIndex - 1 + enabledSteps.length) % enabledSteps.length]);
77
- }, [focusStep, getEnabledSteps]);
78
- const focusFirst = React.useCallback(() => {
79
- const [firstStep] = getEnabledSteps();
80
- if (firstStep !== void 0) focusStep(firstStep);
81
- }, [focusStep, getEnabledSteps]);
82
- const focusLast = React.useCallback(() => {
83
- const enabledSteps = getEnabledSteps();
84
- const lastStep = enabledSteps[enabledSteps.length - 1];
85
- if (lastStep !== void 0) focusStep(lastStep);
86
- }, [focusStep, getEnabledSteps]);
87
47
  const contextValue = React.useMemo(() => ({
88
48
  activeStep,
89
49
  setActiveStep,
90
- stepsCount: triggerSteps.length,
91
50
  orientation,
92
- indicators,
93
- idPrefix,
94
- registerTrigger,
95
- focusNext,
96
- focusPrev,
97
- focusFirst,
98
- focusLast
51
+ indicators
99
52
  }), [
100
53
  activeStep,
101
- focusFirst,
102
- focusLast,
103
- focusNext,
104
- focusPrev,
105
- idPrefix,
106
54
  indicators,
107
55
  orientation,
108
- registerTrigger,
109
- setActiveStep,
110
- triggerSteps.length
56
+ setActiveStep
111
57
  ]);
112
58
  return /* @__PURE__ */ jsx(StepperContext.Provider, {
113
59
  value: contextValue,
114
- children: /* @__PURE__ */ jsx("div", {
60
+ children: /* @__PURE__ */ jsx(Tabs.Root, {
115
61
  ref,
116
- className: cx("stepper", className),
117
- "data-orientation": orientation,
62
+ value: activeStep,
63
+ onValueChange: setActiveStep,
64
+ orientation,
65
+ className: mergeBaseClassName("stepper", className),
66
+ "data-slot": "stepper",
67
+ unstyled: true,
118
68
  ...props,
119
69
  children
120
70
  })
121
71
  });
122
72
  }
123
- function StepperNav({ className, ref, role, ...props }) {
73
+ function StepperNav({ className, ref, ...props }) {
124
74
  const { activeStep, orientation } = useStepper();
125
- return /* @__PURE__ */ jsx("nav", {
75
+ return /* @__PURE__ */ jsx(Tabs.List, {
126
76
  ref,
127
- role: role ?? "tablist",
128
- "aria-orientation": orientation,
129
- className: cx("stepper__nav", className),
77
+ className: mergeBaseClassName("stepper__nav", className),
130
78
  "data-active-step": activeStep,
79
+ "data-slot": "stepper-list",
131
80
  "data-orientation": orientation,
81
+ unstyled: true,
132
82
  ...props
133
83
  });
134
84
  }
@@ -160,67 +110,21 @@ function StepperItem({ step, completed = false, disabled = false, loading = fals
160
110
  })
161
111
  });
162
112
  }
163
- function StepperTrigger({ className, children, disabled, id, type = "button", "aria-controls": ariaControls, tabIndex, onClick, onKeyDown, ref, ...props }) {
164
- const { activeStep, focusFirst, focusLast, focusNext, focusPrev, idPrefix, registerTrigger, setActiveStep } = useStepper();
113
+ function StepperTrigger({ className, children, disabled, type = "button", ref, ...props }) {
114
+ const { activeStep } = useStepper();
165
115
  const { isDisabled, isLoading, state, step } = useStepItem();
166
116
  const isSelected = activeStep === step;
167
- const triggerId = id ?? `${idPrefix}-trigger-${step}`;
168
- const setTriggerRef = React.useCallback((node) => {
169
- registerTrigger(step, node);
170
- assignRef(ref, node);
171
- }, [
117
+ return /* @__PURE__ */ jsx(Tabs.Tab, {
172
118
  ref,
173
- registerTrigger,
174
- step
175
- ]);
176
- const handleClick = (event) => {
177
- onClick?.(event);
178
- if (!event.defaultPrevented) setActiveStep(step);
179
- };
180
- const handleKeyDown = (event) => {
181
- onKeyDown?.(event);
182
- if (event.defaultPrevented) return;
183
- switch (event.key) {
184
- case "ArrowDown":
185
- case "ArrowRight":
186
- event.preventDefault();
187
- focusNext(step);
188
- break;
189
- case "ArrowLeft":
190
- case "ArrowUp":
191
- event.preventDefault();
192
- focusPrev(step);
193
- break;
194
- case "End":
195
- event.preventDefault();
196
- focusLast();
197
- break;
198
- case "Home":
199
- event.preventDefault();
200
- focusFirst();
201
- break;
202
- case " ":
203
- case "Enter":
204
- event.preventDefault();
205
- setActiveStep(step);
206
- break;
207
- }
208
- };
209
- return /* @__PURE__ */ jsx("button", {
210
- ref: setTriggerRef,
211
- role: "tab",
212
- id: triggerId,
213
- "aria-controls": ariaControls,
119
+ value: step,
214
120
  "aria-current": isSelected ? "step" : void 0,
215
- "aria-selected": isSelected,
216
- className: cx("stepper__trigger", className),
121
+ className: mergeBaseClassName("stepper__trigger", className),
217
122
  "data-loading": isLoading ? "" : void 0,
123
+ "data-slot": "stepper-trigger",
218
124
  "data-state": state,
219
125
  disabled: disabled ?? isDisabled,
220
- onClick: handleClick,
221
- onKeyDown: handleKeyDown,
222
- tabIndex: typeof tabIndex === "number" ? tabIndex : isSelected ? 0 : -1,
223
126
  type,
127
+ unstyled: true,
224
128
  ...props,
225
129
  children
226
130
  });
@@ -286,20 +190,18 @@ function StepperPanel({ className, ref, ...props }) {
286
190
  ...props
287
191
  });
288
192
  }
289
- function StepperContent({ value, forceMount = false, spacing = "none", className, children, id, "aria-labelledby": ariaLabelledBy, ref, ...props }) {
290
- const { activeStep, idPrefix } = useStepper();
193
+ function StepperContent({ value, forceMount = false, spacing = "none", className, children, ref, ...props }) {
194
+ const { activeStep } = useStepper();
291
195
  const isActive = activeStep === value;
292
- if (!forceMount && !isActive) return null;
293
- return /* @__PURE__ */ jsx("div", {
196
+ return /* @__PURE__ */ jsx(Tabs.Panel, {
294
197
  ref,
295
- role: "tabpanel",
296
- id: id ?? `${idPrefix}-panel-${value}`,
297
- "aria-labelledby": ariaLabelledBy ?? `${idPrefix}-trigger-${value}`,
298
- className: cx("stepper__content", !isActive && "stepper__content--hidden", className),
198
+ value,
199
+ keepMounted: forceMount,
200
+ className: mergeBaseClassName("stepper__content", className),
299
201
  "data-spacing": spacing,
202
+ "data-slot": "stepper-content",
300
203
  "data-state": isActive ? "active" : "inactive",
301
- hidden: !isActive,
302
- tabIndex: 0,
204
+ unstyled: true,
303
205
  ...props,
304
206
  children
305
207
  });
@@ -24,6 +24,7 @@ function SubagentRunProgress({ className, label, value, ref, ...props }) {
24
24
  function SubagentRunActions({ className, ref, ...props }) {
25
25
  return /* @__PURE__ */ jsx("div", {
26
26
  ref,
27
+ "data-slot": "subagent-run-actions",
27
28
  className: cx("subagent-run__actions", className),
28
29
  ...props
29
30
  });
@@ -1,2 +1,2 @@
1
- import { a as TabsListProps, i as TabsIndicatorProps, n as TabProps, o as TabsProps, r as Tabs, t as TabPanelProps } from "../Tabs-ColWK-XA.js";
1
+ import { a as TabsListProps, i as TabsIndicatorProps, n as TabProps, o as TabsProps, r as Tabs, t as TabPanelProps } from "../Tabs-C49J5m0Q.js";
2
2
  export { TabPanelProps, TabProps, Tabs, TabsIndicatorProps, TabsListProps, TabsProps };
@@ -27,8 +27,8 @@ function tabsListVariants({ variant = "default", className } = {}) {
27
27
  *
28
28
  * @see {@link https://base-ui.com/react/components/tabs | Base UI Tabs}
29
29
  */
30
- function TabsRoot({ orientation = "horizontal", variant = "default", className, ref, ...props }) {
31
- const classes = mergeBaseClassName(["tabs", variant !== "default" && `tabs--${variant}`].filter(Boolean).join(" "), className);
30
+ function TabsRoot({ orientation = "horizontal", variant = "default", className, unstyled = false, ref, ...props }) {
31
+ const classes = unstyled ? className : mergeBaseClassName(["tabs", variant !== "default" && `tabs--${variant}`].filter(Boolean).join(" "), className);
32
32
  return /* @__PURE__ */ jsx(Tabs$1.Root, {
33
33
  ref,
34
34
  "data-slot": "tabs",
@@ -38,8 +38,8 @@ function TabsRoot({ orientation = "horizontal", variant = "default", className,
38
38
  ...props
39
39
  });
40
40
  }
41
- function TabsList({ className, variant = "default", ref, ...props }) {
42
- const classes = mergeBaseClassName(tabsListVariants({ variant }), className);
41
+ function TabsList({ className, variant = "default", unstyled = false, ref, ...props }) {
42
+ const classes = unstyled ? className : mergeBaseClassName(tabsListVariants({ variant }), className);
43
43
  return /* @__PURE__ */ jsx(Tabs$1.List, {
44
44
  ref,
45
45
  "data-slot": "tabs-list",
@@ -48,8 +48,8 @@ function TabsList({ className, variant = "default", ref, ...props }) {
48
48
  ...props
49
49
  });
50
50
  }
51
- function Tab({ className, ref, ...props }) {
52
- const classes = mergeBaseClassName("tabs__tab", className);
51
+ function Tab({ className, unstyled = false, ref, ...props }) {
52
+ const classes = unstyled ? className : mergeBaseClassName("tabs__tab", className);
53
53
  return /* @__PURE__ */ jsx(Tabs$1.Tab, {
54
54
  ref,
55
55
  "data-slot": "tabs-trigger",
@@ -66,8 +66,8 @@ function TabsIndicator({ className, ref, ...props }) {
66
66
  ...props
67
67
  });
68
68
  }
69
- function TabPanel({ className, ref, ...props }) {
70
- const classes = mergeBaseClassName("tabs__panel", className);
69
+ function TabPanel({ className, unstyled = false, ref, ...props }) {
70
+ const classes = unstyled ? className : mergeBaseClassName("tabs__panel", className);
71
71
  return /* @__PURE__ */ jsx(Tabs$1.Panel, {
72
72
  ref,
73
73
  "data-slot": "tabs-content",
@@ -1,5 +1,5 @@
1
- import { r as ButtonProps } from "../Button-DLGzHsjc.js";
2
- import { t as CopyButtonProps } from "../copy-button-D7aAYA-2.js";
1
+ import { r as ButtonProps } from "../Button-yRInko9u.js";
2
+ import { t as CopyButtonProps } from "../copy-button-BrvQ7z4W.js";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/components/Terminal.d.ts
@@ -1,16 +1,16 @@
1
1
  import { i as AgentMessageRenderPartContext } from "../AgentMessageParts-CyD2UB3V.js";
2
- import { r as AgentChatProps } from "../AgentChat-ClxViuUM.js";
2
+ import { r as AgentChatProps } from "../AgentChat-C-ZyXbJz.js";
3
3
  import { i as useOptionalAgentToolRuns, n as AgentToolRunsProvider, r as AgentToolRunsProviderProps, t as AgentToolEventsValue } from "../AgentToolRunsContext-BVe4stgw.js";
4
4
  import { S as isThinkChatActivityPart } from "../ThinkChatToolParts-CSzVwMXf.js";
5
5
  import { l as describeThinkChatActivityPart } from "../ThinkChatActivitySummary-D1xOrNrq.js";
6
- import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-Bzot45kX.js";
6
+ import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-CdbL0aoA.js";
7
7
  import { n as ThinkChatValue } from "../ThinkChatContext-DrsZqdaO.js";
8
8
  import { n as ThinkRecoveryNoticeProps, t as ThinkRecoveryNotice } from "../ThinkRecoveryNotice-DFIcG9UX.js";
9
9
  import { n as BrowserLiveViewProps, t as BrowserLiveView } from "../BrowserLiveView-BV5qgFgI.js";
10
10
  import { n as BrowserReplayProps, t as BrowserReplay } from "../BrowserReplay-xWvRjRAC.js";
11
- import { d as inferWorkspaceLanguage, i as WorkspaceFileState } from "../WorkspaceFile-CzyHnESE.js";
12
- import { a as WorkspaceSource, c as workspaceBinaryFileQueryOptions, d as workspaceFileStatQueryOptions, f as workspaceInfoQueryOptions, i as WorkspaceQueryKey, l as workspaceDirectoryQueryOptions, m as workspaceTextFileQueryOptions, n as WorkspaceFileReadTarget, o as WorkspaceState, p as workspaceQueryKey, r as WorkspaceInfo, s as useWorkspace, t as UseWorkspaceOptions, u as workspaceFileAssetQueryOptions } from "../Workspace-Jez8ffUj.js";
13
- import { n as WorkspaceExplorerProps, t as WorkspaceExplorer } from "../WorkspaceExplorer-B9dQWNVK.js";
11
+ import { d as inferWorkspaceLanguage, i as WorkspaceFileState } from "../WorkspaceFile-D8Un_xge.js";
12
+ import { a as WorkspaceSource, c as workspaceBinaryFileQueryOptions, d as workspaceFileStatQueryOptions, f as workspaceInfoQueryOptions, i as WorkspaceQueryKey, l as workspaceDirectoryQueryOptions, m as workspaceTextFileQueryOptions, n as WorkspaceFileReadTarget, o as WorkspaceState, p as workspaceQueryKey, r as WorkspaceInfo, s as useWorkspace, t as UseWorkspaceOptions, u as workspaceFileAssetQueryOptions } from "../Workspace-CWtust-2.js";
13
+ import { n as WorkspaceExplorerProps, t as WorkspaceExplorer } from "../WorkspaceExplorer-DGigwsgH.js";
14
14
  import * as React from "react";
15
15
  import { UIMessage } from "ai";
16
16
  import { UseAgentOptions } from "agents/react";
@@ -34,6 +34,8 @@ interface ThinkChatProviderProps<State = unknown, MessageT extends UIMessage = U
34
34
  interface ThinkChatRootProps<State = unknown> {
35
35
  /** Agent to connect to: a kebab-case class name, or full `useAgent` options. */
36
36
  agent: string | UseAgentOptions<State>;
37
+ /** Disable durable pending-approval discovery. Also disable it on `ThinkChat.Messages`. */
38
+ approvalsEnabled?: boolean;
37
39
  /** Instance name (e.g. a session or room id). Wins over `agent.name`. */
38
40
  name?: string;
39
41
  /**
@@ -91,6 +93,12 @@ interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends
91
93
  renderPart?: AgentChatProps<MessageT>["renderPart"];
92
94
  /** Whole upstream Think stub. `ThinkChat.Root` wires `agent.stub` automatically. */
93
95
  thinkStub?: AgentStub<Think>;
96
+ /**
97
+ * Disable transcript approval scanning, automatic responses, cards, and
98
+ * composer controls. Set the matching prop on `ThinkChat.Root` to also skip
99
+ * durable pending-approval discovery; `ThinkFullApp` wires both from here.
100
+ */
101
+ approvalsEnabled?: AgentChatProps<MessageT>["approvalsEnabled"];
94
102
  /** Parent-owned Ask/Bypass policy; omit to keep AgentChat's session-local mode. */
95
103
  permissionModeControl?: AgentChatProps<MessageT>["permissionModeControl"];
96
104
  /** Called after a Think approve/reject RPC settles. Root uses this to refresh approvals. */
@@ -106,7 +114,7 @@ interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends
106
114
  }
107
115
  /** Shared pending-approval options for components and TanStack Router loaders. */
108
116
  declare function thinkPendingExecutionApprovalsQueryOptions(stub: AgentStub<Think>, sourceKey: string): ThinkPendingExecutionApprovalsQueryOptions;
109
- declare function useThinkPendingExecutionApprovals(stub: AgentStub<Think>, sourceKey: string, refreshSignal?: unknown): {
117
+ declare function useThinkPendingExecutionApprovals(stub: AgentStub<Think>, sourceKey: string, refreshSignal?: unknown, enabled?: boolean): {
110
118
  pendingApprovals: readonly PendingApproval[];
111
119
  refreshPendingApprovals: () => Promise<void>;
112
120
  };
@@ -141,6 +149,7 @@ declare function ThinkChatProvider<State = unknown, MessageT extends UIMessage =
141
149
  */
142
150
  declare function ThinkChatRoot<State = unknown, MessageT extends UIMessage = UIMessage>({
143
151
  agent: agentOption,
152
+ approvalsEnabled,
144
153
  name,
145
154
  sourceKey,
146
155
  children
@@ -5,7 +5,7 @@ import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
5
5
  import { describeThinkChatActivityPart } from "./ThinkChatActivitySummary.js";
6
6
  import { ThinkChatActivity, createThinkChatActivityRenderer, renderThinkChatActivityPart } from "./ThinkChatActivity.js";
7
7
  import { ThinkRecoveryNotice } from "./ThinkRecoveryNotice.js";
8
- import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../ThinkChat-15EhfvYJ.js";
8
+ import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../ThinkChat-E_HrfH76.js";
9
9
  import { BrowserReplay } from "./BrowserReplay.js";
10
10
  import { useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryOptions, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions } from "./Workspace.js";
11
11
  import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
@@ -1,4 +1,4 @@
1
1
  import { S as isThinkChatActivityPart } from "../ThinkChatToolParts-CSzVwMXf.js";
2
2
  import { l as describeThinkChatActivityPart } from "../ThinkChatActivitySummary-D1xOrNrq.js";
3
- import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-Bzot45kX.js";
3
+ import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-CdbL0aoA.js";
4
4
  export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, describeThinkChatActivityPart, isThinkChatActivityPart, renderThinkChatActivityPart };
@@ -240,7 +240,7 @@ function describeBrowserToolPart(part) {
240
240
  if (part.type === "tool-browser_execute") {
241
241
  const output = part.state === "output-available" ? part.output : void 0;
242
242
  if (failed || output?.status === "error") return "Browser automation failed";
243
- if (output?.status === "paused") return "Browser waiting for approval";
243
+ if (output?.status === "paused") return isHumanWaitPause(output) ? "Browser waiting for human" : "Browser waiting for approval";
244
244
  return working ? "Using the browser" : "Used the browser";
245
245
  }
246
246
  const page = displayUrl(part.input?.url) || "a page";
@@ -257,11 +257,15 @@ function describeBrowserToolPart(part) {
257
257
  function describeExecuteToolPart(part) {
258
258
  const output = part.state === "output-available" ? part.output : void 0;
259
259
  if (isPartFailed(part) || output?.status === "error") return "Code failed";
260
- if (output?.status === "paused") return "Code waiting for approval";
260
+ if (output?.status === "paused") return isHumanWaitPause(output) ? "Code waiting for human" : "Code waiting for approval";
261
261
  const label = isPartWorking(part) ? "Running code" : "Ran code";
262
262
  const snippet = summarizeToolInput(part.input);
263
263
  return snippet ? `${label} · ${snippet}` : label;
264
264
  }
265
+ function isHumanWaitPause(output) {
266
+ const pending = output.pending ?? [];
267
+ return pending.length > 0 && pending.every((action) => action.connector === "human" && action.method === "waitFor");
268
+ }
265
269
  function describeFetchToolPart(part) {
266
270
  const target = part.input?.url ?? part.input?.path ?? "";
267
271
  const output = part.state === "output-available" ? part.output : void 0;
@@ -329,20 +329,25 @@ function formatAuditValue(value) {
329
329
  const maxLength = 240;
330
330
  return formatted.length > maxLength ? `${formatted.slice(0, maxLength - 1)}…` : formatted;
331
331
  }
332
+ function isHumanWait(action) {
333
+ return action.connector === "human" && action.method === "waitFor";
334
+ }
332
335
  function toolCallStateLabel(call) {
333
- const state = call.state === "pending" ? "awaiting approval" : call.state === "applied" ? "applied" : call.state;
334
- const qualifiers = [call.requiresApproval && call.state !== "pending" ? "approval required" : "", call.ephemeral ? "re-executes on replay" : ""].filter(Boolean);
336
+ const humanWait = isHumanWait(call);
337
+ const state = call.state === "pending" ? humanWait ? "waiting for human" : "awaiting approval" : call.state === "applied" ? "applied" : call.state;
338
+ const qualifiers = [call.requiresApproval && call.state !== "pending" && !humanWait ? "approval required" : "", call.ephemeral ? "re-executes on replay" : ""].filter(Boolean);
335
339
  return qualifiers.length ? `${state} · ${qualifiers.join(" · ")}` : state;
336
340
  }
337
341
  function formatPendingActions(pending) {
338
342
  return pending.map((action) => {
339
343
  const args = action.args === void 0 ? "" : JSON.stringify(action.args);
340
- return `awaiting approval: ${action.connector}.${action.method}(${args})`;
344
+ return `${isHumanWait(action) ? "waiting for a human step" : "awaiting approval"}: ${action.connector}.${action.method}(${args})`;
341
345
  }).join("\n");
342
346
  }
343
347
  function executeStatusText(output) {
344
348
  if (!output) return void 0;
345
- return output.status === "paused" ? "paused · needs approval" : output.status;
349
+ if (output.status !== "paused") return output.status;
350
+ return output.pending.length > 0 && output.pending.every(isHumanWait) ? "paused · waiting for human" : "paused · needs approval";
346
351
  }
347
352
  /** The codemode execute tool as an activity panel: highlighted TypeScript
348
353
  plus logs, result, and the paused pending-approval list. */
@@ -1,6 +1,6 @@
1
1
  import { l as WorkspaceNavigationAdapter } from "../WorkspaceLink-O-EBKUJ8.js";
2
- import { r as WorkspaceFileAssetResolver } from "../WorkspaceFile-CzyHnESE.js";
3
- import { a as WorkspaceSource } from "../Workspace-Jez8ffUj.js";
2
+ import { r as WorkspaceFileAssetResolver } from "../WorkspaceFile-D8Un_xge.js";
3
+ import { a as WorkspaceSource } from "../Workspace-CWtust-2.js";
4
4
  import { ThinkChatMessagesProps } from "./ThinkChat.js";
5
5
  import { t as ThinkAgent } from "../think-agent-Cip5KAPj.js";
6
6
  import { t as ThinkExecutionRun } from "../ThinkExecutionRun-ChhWhOoU.js";
@@ -2,9 +2,9 @@ import { t as cx } from "../class-names-BiMDVpUo.js";
2
2
  import { S as FileIcon, X as TerminalIcon, d as ChevronDownIcon } from "../icons-DKXiSepE.js";
3
3
  import { Button } from "./Button.js";
4
4
  import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../WorkspaceLink-BYYeTQLf.js";
5
- import { n as mergeRefs } from "../merge-refs-DF_7w2x_.js";
6
5
  import { AppTopBar } from "./AppTopBar.js";
7
- import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../ThinkChat-15EhfvYJ.js";
6
+ import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../ThinkChat-E_HrfH76.js";
7
+ import { t as mergeRefs } from "../merge-refs-KlanQB7A.js";
8
8
  import { useWorkspace } from "./Workspace.js";
9
9
  import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
10
10
  import { ResizableSidePanel } from "./ResizableSidePanel.js";
@@ -113,7 +113,7 @@ function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat,
113
113
  const appRef = React.useRef(null);
114
114
  const viewScopeRef = React.useRef(null);
115
115
  const workbenchPanelRef = React.useRef(null);
116
- const approvals = useThinkPendingExecutionApprovals(agent.stub, sourceKey, `${chat.messages.length}:${chat.status}`);
116
+ const approvals = useThinkPendingExecutionApprovals(agent.stub, sourceKey, `${chat.messages.length}:${chat.status}`, messages?.approvalsEnabled !== false);
117
117
  const resolvedMessages = React.useMemo(() => {
118
118
  const approvalProps = resolveThinkApprovalProps({
119
119
  thinkStub: messages?.thinkStub,
@@ -65,7 +65,7 @@ function RoutineTopBarActions({ busy, onDelete, editLink, onRun, routineName })
65
65
  disabled: busy,
66
66
  children: "Cancel"
67
67
  }), /* @__PURE__ */ jsx(AlertDialog.Close, {
68
- variant: "destructive",
68
+ color: "destructive",
69
69
  disabled: busy,
70
70
  onClick: onDelete,
71
71
  children: "Delete schedule"
@@ -88,6 +88,7 @@ declare function ToastDescription({
88
88
  * Action button within the toast.
89
89
  */
90
90
  declare function ToastAction({
91
+ render,
91
92
  className,
92
93
  ref,
93
94
  ...props
@@ -1,4 +1,5 @@
1
1
  import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
2
+ import { buttonVariants } from "./Button.js";
2
3
  import "react";
3
4
  import { jsx } from "react/jsx-runtime";
4
5
  import { Toast as Toast$1 } from "@base-ui/react/toast";
@@ -82,11 +83,17 @@ function ToastDescription({ className, ref, ...props }) {
82
83
  /**
83
84
  * Action button within the toast.
84
85
  */
85
- function ToastAction({ className, ref, ...props }) {
86
- const classes = mergeBaseClassName(["toast__action"].filter(Boolean).join(" "), className);
86
+ function ToastAction({ render, className, ref, ...props }) {
87
+ const classes = mergeBaseClassName(render == null ? buttonVariants({
88
+ variant: "normal",
89
+ color: "primary",
90
+ size: "xs",
91
+ className: "toast__action"
92
+ }) : "toast__action", className);
87
93
  return /* @__PURE__ */ jsx(Toast$1.Action, {
88
94
  ref,
89
95
  "data-slot": "toast-action",
96
+ render,
90
97
  className: classes,
91
98
  ...props
92
99
  });
@@ -7,7 +7,7 @@ function toggleVariants({ variant = "default", size = "md", className } = {}) {
7
7
  return [
8
8
  "toggle",
9
9
  variant === "outline" && "toggle--outline",
10
- size !== "md" && `toggle--${size}`,
10
+ `toggle--${size ?? "md"}`,
11
11
  className
12
12
  ].filter(Boolean).join(" ");
13
13
  }
@@ -52,15 +52,15 @@ function toggleVariants({ variant = "default", size = "md", className } = {}) {
52
52
  * @see {@link https://base-ui.com/react/components/toggle | Base UI Toggle}
53
53
  */
54
54
  function Toggle({ className, variant, size, ref, ...props }) {
55
- const classes = mergeBaseClassName(toggleVariants({
56
- variant,
57
- size
58
- }), className);
55
+ const resolvedSize = size ?? "md";
59
56
  return /* @__PURE__ */ jsx(Toggle$1, {
60
57
  ref,
61
58
  "data-slot": "toggle",
62
- "data-size": size ?? "md",
63
- className: classes,
59
+ "data-size": resolvedSize,
60
+ className: mergeBaseClassName(toggleVariants({
61
+ variant,
62
+ size: resolvedSize
63
+ }), className),
64
64
  ...props
65
65
  });
66
66
  }
@@ -9,11 +9,17 @@ interface ToolbarRootProps extends React.ComponentPropsWithoutRef<typeof Toolbar
9
9
  /**
10
10
  * Props for the Toolbar.Button component.
11
11
  */
12
- interface ToolbarButtonProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Button> {}
12
+ interface ToolbarButtonProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Button> {
13
+ /** Skip the default Button chrome when a composed control owns its visuals. */
14
+ unstyled?: boolean;
15
+ }
13
16
  /**
14
17
  * Props for the Toolbar.Link component.
15
18
  */
16
- interface ToolbarLinkProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Link> {}
19
+ interface ToolbarLinkProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Link> {
20
+ /** Skip the default Button chrome when a composed link owns its visuals. */
21
+ unstyled?: boolean;
22
+ }
17
23
  /**
18
24
  * Props for the Toolbar.Group component.
19
25
  */
@@ -52,6 +58,7 @@ declare function ToolbarRoot({
52
58
  * A clickable button within the toolbar.
53
59
  */
54
60
  declare function ToolbarButton({
61
+ unstyled,
55
62
  className,
56
63
  ref,
57
64
  ...props
@@ -62,6 +69,7 @@ declare function ToolbarButton({
62
69
  * A link element within the toolbar.
63
70
  */
64
71
  declare function ToolbarLink({
72
+ unstyled,
65
73
  className,
66
74
  ref,
67
75
  ...props