@mcp-b/react-components 0.14.1 → 0.16.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 (241) hide show
  1. package/dist/AgentActivity-BNUNrP9O.d.ts +36 -0
  2. package/dist/{AgentChat-Cgb1xuT7.d.ts → AgentChat-CrlpbvQJ.d.ts} +62 -8
  3. package/dist/{CodeBlock-DUh9WOGo.d.ts → CodeBlock-BRajW4QU.d.ts} +1 -1
  4. package/dist/{CodeBlock-BUFXG8HW.js → CodeBlock-BmB4Xaqq.js} +15 -4
  5. package/dist/{FileTree-mpEIcfzA.js → FileTree-CkVbIMWV.js} +82 -89
  6. package/dist/Message-BkMdE3bS.js +375 -0
  7. package/dist/{ModelSelector-DVgVBdvw.js → ModelSelector-SlJNgwKY.js} +17 -8
  8. package/dist/{PromptInput-ClNqBiIw.d.ts → PromptInput-BWTuXMOD.d.ts} +123 -5
  9. package/dist/ResponsiveSidebarShell-Dd9DCcBT.d.ts +67 -0
  10. package/dist/{Select-Dl_vF_Bt.d.ts → Select-BeEsefzh.d.ts} +12 -2
  11. package/dist/{ThinkChat-7DQ2CogF.js → ThinkChat-CzC-zNGA.js} +27 -37
  12. package/dist/{ThinkChatActivity-m9orbdeI.d.ts → ThinkChatActivity-BFQnb2ct.d.ts} +3 -10
  13. package/dist/ThinkChatActivitySummary-BPmu9a-c.d.ts +39 -0
  14. package/dist/{ThinkChatToolParts-Cv4o7j6F.d.ts → ThinkChatToolParts-CSzVwMXf.d.ts} +62 -3
  15. package/dist/ThinkExecutionRun-ChhWhOoU.d.ts +30 -0
  16. package/dist/Toggle-CAAlNl-M.d.ts +69 -0
  17. package/dist/ToggleGroup-8hPv-b69.d.ts +73 -0
  18. package/dist/Workspace-D39LxGvP.d.ts +62 -0
  19. package/dist/WorkspaceFile-DOZkPwzu.d.ts +106 -0
  20. package/dist/WorkspaceFileView-rSN_yT0L.js +744 -0
  21. package/dist/WorkspaceLink-DIPbXrUM.js +337 -0
  22. package/dist/WorkspaceLink-DK1DWMHe.d.ts +89 -0
  23. package/dist/components/Activity.d.ts +27 -1
  24. package/dist/components/Activity.js +33 -15
  25. package/dist/components/AgentActivity.d.ts +2 -0
  26. package/dist/components/AgentActivity.js +45 -0
  27. package/dist/components/AgentActivityPreview.d.ts +46 -0
  28. package/dist/components/AgentActivityPreview.js +94 -0
  29. package/dist/components/AgentAttention.d.ts +73 -0
  30. package/dist/components/AgentAttention.js +85 -0
  31. package/dist/components/AgentChat.d.ts +2 -2
  32. package/dist/components/AgentChat.js +231 -205
  33. package/dist/components/AgentChatMessageEditor.d.ts +29 -0
  34. package/dist/components/AgentChatMessageEditor.js +92 -0
  35. package/dist/components/AgentChatTurnError.d.ts +17 -0
  36. package/dist/components/AgentChatTurnError.js +40 -0
  37. package/dist/components/AgentConnection.d.ts +12 -17
  38. package/dist/components/AgentConnection.js +99 -91
  39. package/dist/components/AppFrame.d.ts +24 -0
  40. package/dist/components/AppFrame.js +25 -0
  41. package/dist/components/AppTopBar.d.ts +71 -0
  42. package/dist/components/AppTopBar.js +82 -0
  43. package/dist/components/Artifact.js +1 -1
  44. package/dist/components/BrowserLiveView.js +1 -1
  45. package/dist/components/BrowserReplay.js +1 -1
  46. package/dist/components/BrowserRunPanel.js +1 -1
  47. package/dist/components/Card.d.ts +3 -0
  48. package/dist/components/Card.js +2 -1
  49. package/dist/components/ChainOfThought.d.ts +1 -1
  50. package/dist/components/ChainOfThought.js +1 -1
  51. package/dist/components/ChatGptSignInScreen.js +2 -2
  52. package/dist/components/Checkbox.js +5 -13
  53. package/dist/components/CheckboxGroup.d.ts +58 -2
  54. package/dist/components/CheckboxGroup.js +59 -1
  55. package/dist/components/CodeBlock.d.ts +1 -1
  56. package/dist/components/CodeBlock.js +1 -1
  57. package/dist/components/CodexModelSelector.js +1 -1
  58. package/dist/components/Commit.js +2 -2
  59. package/dist/components/ContextMenu.js +1 -1
  60. package/dist/components/Conversation.js +1 -1
  61. package/dist/components/DescriptionList.d.ts +12 -0
  62. package/dist/components/DescriptionList.js +11 -0
  63. package/dist/components/DescriptionListParts.d.ts +37 -0
  64. package/dist/components/DescriptionListParts.js +35 -0
  65. package/dist/components/EnvironmentVariables.js +2 -2
  66. package/dist/components/Fieldset.d.ts +13 -1
  67. package/dist/components/Fieldset.js +11 -2
  68. package/dist/components/FileTree.js +1 -1
  69. package/dist/components/IconButton.d.ts +33 -0
  70. package/dist/components/IconButton.js +27 -0
  71. package/dist/components/McpConnectionRequest.d.ts +44 -0
  72. package/dist/components/McpConnectionRequest.js +122 -0
  73. package/dist/components/McpServerPicker.d.ts +48 -23
  74. package/dist/components/McpServerPicker.js +238 -189
  75. package/dist/components/Menubar.js +1 -1
  76. package/dist/components/Message.d.ts +1 -0
  77. package/dist/components/Message.js +1 -285
  78. package/dist/components/MessageScroller.js +1 -1
  79. package/dist/components/ModelSelector.d.ts +15 -3
  80. package/dist/components/ModelSelector.js +1 -1
  81. package/dist/components/NaniteScene.d.ts +10 -1
  82. package/dist/components/NaniteScene.js +36 -1
  83. package/dist/components/Pricing.d.ts +37 -0
  84. package/dist/components/Pricing.js +17 -0
  85. package/dist/components/PricingBillingToggle.d.ts +23 -0
  86. package/dist/components/PricingBillingToggle.js +86 -0
  87. package/dist/components/PricingConfirmationDialog.d.ts +25 -0
  88. package/dist/components/PricingConfirmationDialog.js +57 -0
  89. package/dist/components/PricingFAQ.d.ts +18 -0
  90. package/dist/components/PricingFAQ.js +27 -0
  91. package/dist/components/PricingPage.d.ts +2 -38
  92. package/dist/components/PricingPage.js +39 -359
  93. package/dist/components/PricingPlanCard.d.ts +22 -0
  94. package/dist/components/PricingPlanCard.js +109 -0
  95. package/dist/components/PricingUsageCalculator.d.ts +22 -0
  96. package/dist/components/PricingUsageCalculator.js +96 -0
  97. package/dist/components/PromptInput.d.ts +2 -2
  98. package/dist/components/PromptInput.js +210 -15
  99. package/dist/components/Queue.js +1 -1
  100. package/dist/components/Reasoning.d.ts +2 -1
  101. package/dist/components/Reasoning.js +14 -29
  102. package/dist/components/ResizableSidePanel.d.ts +57 -0
  103. package/dist/components/ResizableSidePanel.js +151 -0
  104. package/dist/components/ResponsiveSidebarShell.d.ts +2 -0
  105. package/dist/components/ResponsiveSidebarShell.js +129 -0
  106. package/dist/components/Select.d.ts +2 -2
  107. package/dist/components/Select.js +11 -2
  108. package/dist/components/Slider.d.ts +13 -1
  109. package/dist/components/Slider.js +11 -0
  110. package/dist/components/Sources.js +1 -1
  111. package/dist/components/Stepper.d.ts +4 -0
  112. package/dist/components/Stepper.js +5 -3
  113. package/dist/components/SubagentRun.d.ts +86 -0
  114. package/dist/components/SubagentRun.js +108 -0
  115. package/dist/components/SubagentRunDetails.d.ts +44 -0
  116. package/dist/components/SubagentRunDetails.js +48 -0
  117. package/dist/components/SubagentRunIndicator.d.ts +22 -0
  118. package/dist/components/SubagentRunIndicator.js +33 -0
  119. package/dist/components/SubagentRunList.d.ts +25 -0
  120. package/dist/components/SubagentRunList.js +26 -0
  121. package/dist/components/SubagentRunSelector.d.ts +47 -0
  122. package/dist/components/SubagentRunSelector.js +55 -0
  123. package/dist/components/Task.js +1 -1
  124. package/dist/components/Terminal.js +2 -2
  125. package/dist/components/TestResults.js +1 -1
  126. package/dist/components/Textarea.d.ts +21 -0
  127. package/dist/components/Textarea.js +19 -0
  128. package/dist/components/ThemeModeControl.d.ts +24 -0
  129. package/dist/components/ThemeModeControl.js +52 -0
  130. package/dist/components/ThemeProvider.d.ts +38 -0
  131. package/dist/components/ThemeProvider.js +80 -0
  132. package/dist/components/ThinkChat.d.ts +34 -7
  133. package/dist/components/ThinkChat.js +7 -4
  134. package/dist/components/ThinkChatActivity.d.ts +3 -2
  135. package/dist/components/ThinkChatActivity.js +18 -297
  136. package/dist/components/ThinkChatActivitySummary.d.ts +2 -0
  137. package/dist/components/ThinkChatActivitySummary.js +421 -0
  138. package/dist/components/ThinkChatToolPanels.d.ts +15 -5
  139. package/dist/components/ThinkChatToolPanels.js +116 -9
  140. package/dist/components/ThinkChatToolParts.d.ts +2 -2
  141. package/dist/components/ThinkChatToolParts.js +51 -9
  142. package/dist/components/ThinkExecutionDetail.d.ts +20 -0
  143. package/dist/components/ThinkExecutionDetail.js +80 -0
  144. package/dist/components/ThinkExecutionRun.d.ts +2 -0
  145. package/dist/components/ThinkExecutionRun.js +72 -0
  146. package/dist/components/ThinkExecutionStatus.d.ts +22 -0
  147. package/dist/components/ThinkExecutionStatus.js +36 -0
  148. package/dist/components/ThinkExecutionWorkbench.d.ts +7 -0
  149. package/dist/components/ThinkExecutionWorkbench.js +69 -225
  150. package/dist/components/ThinkFullApp.d.ts +58 -14
  151. package/dist/components/ThinkFullApp.js +129 -160
  152. package/dist/components/ThinkFullAppViewSwitch.d.ts +31 -0
  153. package/dist/components/ThinkFullAppViewSwitch.js +34 -0
  154. package/dist/components/ThinkRoutine.d.ts +36 -0
  155. package/dist/components/ThinkRoutine.js +15 -0
  156. package/dist/components/ThinkRoutineBrowser.d.ts +25 -0
  157. package/dist/components/ThinkRoutineBrowser.js +156 -0
  158. package/dist/components/ThinkRoutineDetail.d.ts +24 -0
  159. package/dist/components/ThinkRoutineDetail.js +102 -0
  160. package/dist/components/ThinkRoutineForm.d.ts +32 -0
  161. package/dist/components/ThinkRoutineForm.js +151 -0
  162. package/dist/components/ThinkRoutineLibrary.d.ts +74 -0
  163. package/dist/components/ThinkRoutineLibrary.js +178 -0
  164. package/dist/components/ThinkRoutineRuns.d.ts +24 -0
  165. package/dist/components/ThinkRoutineRuns.js +68 -0
  166. package/dist/components/ThinkThreadPicker.d.ts +18 -1
  167. package/dist/components/ThinkThreadPicker.js +51 -5
  168. package/dist/components/ThinkThreadShell.d.ts +12 -9
  169. package/dist/components/ThinkThreadShell.js +17 -137
  170. package/dist/components/Toggle.d.ts +1 -68
  171. package/dist/components/ToggleGroup.d.ts +1 -72
  172. package/dist/components/Tooltip.d.ts +3 -1
  173. package/dist/components/Tooltip.js +4 -2
  174. package/dist/components/WebPreview.js +1 -1
  175. package/dist/components/Workspace.d.ts +2 -0
  176. package/dist/components/Workspace.js +424 -0
  177. package/dist/components/WorkspaceBrowser.d.ts +32 -0
  178. package/dist/components/WorkspaceBrowser.js +103 -0
  179. package/dist/components/WorkspaceExplorer.d.ts +12 -79
  180. package/dist/components/WorkspaceExplorer.js +116 -330
  181. package/dist/components/WorkspaceFile.d.ts +2 -0
  182. package/dist/components/WorkspaceFile.js +195 -0
  183. package/dist/components/WorkspaceFileView.d.ts +26 -0
  184. package/dist/components/WorkspaceFileView.js +2 -0
  185. package/dist/components/WorkspaceHeader.d.ts +35 -0
  186. package/dist/components/WorkspaceHeader.js +51 -0
  187. package/dist/components/WorkspaceLink.d.ts +2 -0
  188. package/dist/components/WorkspaceLink.js +2 -0
  189. package/dist/components/icons.d.ts +2 -2
  190. package/dist/components/icons.js +2 -2
  191. package/dist/{copy-button-DUMLYdsk.js → copy-button-Dejn5heL.js} +1 -1
  192. package/dist/icons-CpfUer49.js +85 -0
  193. package/dist/{icons-CUCz_Sft.d.ts → icons-GQd1xF4e.d.ts} +51 -1
  194. package/dist/styles/activity-header.css +75 -0
  195. package/dist/styles/activity.css +49 -63
  196. package/dist/styles/agent-activity-preview-overlay.css +80 -0
  197. package/dist/styles/agent-activity-preview.css +235 -0
  198. package/dist/styles/agent-attention.css +122 -0
  199. package/dist/styles/agent-chat.css +141 -4
  200. package/dist/styles/app-frame.css +15 -0
  201. package/dist/styles/app-top-bar.css +100 -0
  202. package/dist/styles/avatar.css +0 -1
  203. package/dist/styles/browser-control-overlay.css +184 -0
  204. package/dist/styles/card.css +21 -0
  205. package/dist/styles/checkbox-group.css +69 -0
  206. package/dist/styles/description-list.css +50 -0
  207. package/dist/styles/fieldset.css +11 -0
  208. package/dist/styles/index.css +15 -2
  209. package/dist/styles/mcp-connection-request.css +60 -0
  210. package/dist/styles/mcp-server-picker.css +95 -68
  211. package/dist/styles/message.css +4 -43
  212. package/dist/styles/nanite-scene.css +16 -0
  213. package/dist/styles/pricing-page.css +21 -27
  214. package/dist/styles/prompt-input.css +225 -32
  215. package/dist/styles/reasoning.css +1 -55
  216. package/dist/styles/recipes.css +23 -15
  217. package/dist/styles/resizable-side-panel.css +66 -0
  218. package/dist/styles/responsive-sidebar-shell.css +169 -0
  219. package/dist/styles/select.css +10 -0
  220. package/dist/styles/stepper.css +13 -0
  221. package/dist/styles/streamdown.css +0 -4
  222. package/dist/styles/subagent-run.css +205 -0
  223. package/dist/styles/textarea.css +20 -0
  224. package/dist/styles/theme-mode-control.css +72 -0
  225. package/dist/styles/think-execution-status.css +49 -0
  226. package/dist/styles/think-execution-workbench.css +8 -72
  227. package/dist/styles/think-full-app.css +106 -131
  228. package/dist/styles/think-routine-library.css +491 -0
  229. package/dist/styles/think-thread-picker.css +47 -3
  230. package/dist/styles/toggle-group.css +7 -0
  231. package/dist/styles/workspace-explorer.css +511 -64
  232. package/dist/utils/codex-model-catalog.d.ts +4 -4
  233. package/dist/utils/mcp-server-catalog.d.ts +82 -78
  234. package/dist/utils/mcp-server-catalog.js +64 -41
  235. package/dist/utils/structured-code.d.ts +1 -1
  236. package/dist/utils/theme.d.ts +22 -0
  237. package/dist/utils/theme.js +55 -0
  238. package/package.json +34 -28
  239. package/dist/icons-Ba9THQKz.js +0 -64
  240. package/dist/styles/think-resize-handle.css +0 -33
  241. package/dist/styles/think-thread-shell.css +0 -219
@@ -0,0 +1,57 @@
1
+ import { SeparatorProps } from "./Separator.js";
2
+ import * as React from "react";
3
+
4
+ //#region src/components/ResizableSidePanel.d.ts
5
+ type ResizableSidePanelSide = "start" | "end";
6
+ interface ResizableSidePanelRootProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ /** Short noun used by the resize separator, such as “threads” or “workbench”. */
8
+ label: string;
9
+ /** Logical side occupied by the resizable panel. */
10
+ side?: ResizableSidePanelSide;
11
+ /** Initial panel size in CSS pixels. */
12
+ defaultSize: number;
13
+ /** Smallest allowed panel size in CSS pixels. */
14
+ minSize: number;
15
+ /** Largest allowed panel size in CSS pixels. */
16
+ maxSize: number;
17
+ /** Keyboard resize increment in CSS pixels. */
18
+ keyboardStep?: number;
19
+ /** Called whenever pointer or keyboard input changes the panel size. */
20
+ onSizeChange?: (size: number) => void;
21
+ }
22
+ interface ResizableSidePanelHandleProps extends Omit<SeparatorProps, "aria-label" | "aria-orientation" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "decorative" | "orientation"> {}
23
+ /**
24
+ * Shared sizing seam for a logical start- or end-side panel. Consumers retain
25
+ * ownership of panel placement, visibility, compact behavior, and top bars.
26
+ */
27
+ declare function ResizableSidePanelRoot({
28
+ children,
29
+ className,
30
+ defaultSize,
31
+ keyboardStep,
32
+ label,
33
+ maxSize,
34
+ minSize,
35
+ onSizeChange,
36
+ ref,
37
+ side,
38
+ style,
39
+ ...props
40
+ }: ResizableSidePanelRootProps & {
41
+ ref?: React.Ref<HTMLDivElement>;
42
+ }): React.JSX.Element;
43
+ declare function ResizableSidePanelHandle({
44
+ className,
45
+ onKeyDown,
46
+ onPointerDown,
47
+ ref,
48
+ ...props
49
+ }: ResizableSidePanelHandleProps & {
50
+ ref?: React.Ref<HTMLDivElement>;
51
+ }): React.JSX.Element;
52
+ declare const ResizableSidePanel: {
53
+ Root: typeof ResizableSidePanelRoot;
54
+ Handle: typeof ResizableSidePanelHandle;
55
+ };
56
+ //#endregion
57
+ export { ResizableSidePanel, ResizableSidePanelHandleProps, ResizableSidePanelRootProps, ResizableSidePanelSide };
@@ -0,0 +1,151 @@
1
+ import { t as cx } from "../class-names-9UtZwb0J.js";
2
+ import { Separator } from "./Separator.js";
3
+ import * as React from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/components/ResizableSidePanel.tsx
6
+ const ResizableSidePanelContext = React.createContext(null);
7
+ function clampSize(size, minSize, maxSize) {
8
+ return Math.min(maxSize, Math.max(minSize, size));
9
+ }
10
+ function panelSizeDelta(physicalDelta, side, direction) {
11
+ const sideDirection = side === "start" ? 1 : -1;
12
+ const writingDirection = direction === "ltr" ? 1 : -1;
13
+ return physicalDelta * sideDirection * writingDirection;
14
+ }
15
+ /**
16
+ * Shared sizing seam for a logical start- or end-side panel. Consumers retain
17
+ * ownership of panel placement, visibility, compact behavior, and top bars.
18
+ */
19
+ function ResizableSidePanelRoot({ children, className, defaultSize, keyboardStep = 24, label, maxSize, minSize, onSizeChange, ref, side = "start", style, ...props }) {
20
+ const [size, setInnerSize] = React.useState(() => clampSize(defaultSize, minSize, maxSize));
21
+ const cleanupResizeRef = React.useRef(null);
22
+ const setSize = React.useCallback((nextSize) => {
23
+ const clampedSize = clampSize(nextSize, minSize, maxSize);
24
+ setInnerSize(clampedSize);
25
+ onSizeChange?.(clampedSize);
26
+ }, [
27
+ maxSize,
28
+ minSize,
29
+ onSizeChange
30
+ ]);
31
+ const stopResize = React.useCallback(() => {
32
+ cleanupResizeRef.current?.();
33
+ cleanupResizeRef.current = null;
34
+ }, []);
35
+ React.useEffect(() => stopResize, [stopResize]);
36
+ const beginResize = React.useCallback((event) => {
37
+ if (event.button !== 0) return;
38
+ event.preventDefault();
39
+ stopResize();
40
+ const startX = event.clientX;
41
+ const startSize = size;
42
+ const pointerId = event.pointerId;
43
+ const direction = getComputedStyle(event.currentTarget).direction === "rtl" ? "rtl" : "ltr";
44
+ const onMove = (move) => {
45
+ if (move.pointerId !== pointerId) return;
46
+ setSize(startSize + panelSizeDelta(move.clientX - startX, side, direction));
47
+ };
48
+ const onEnd = (end) => {
49
+ if (end.pointerId === pointerId) stopResize();
50
+ };
51
+ const cleanup = () => {
52
+ window.removeEventListener("pointermove", onMove);
53
+ window.removeEventListener("pointerup", onEnd);
54
+ window.removeEventListener("pointercancel", onEnd);
55
+ document.body.classList.remove("is-resizing-side-panel");
56
+ };
57
+ cleanupResizeRef.current = cleanup;
58
+ document.body.classList.add("is-resizing-side-panel");
59
+ window.addEventListener("pointermove", onMove);
60
+ window.addEventListener("pointerup", onEnd);
61
+ window.addEventListener("pointercancel", onEnd);
62
+ }, [
63
+ setSize,
64
+ side,
65
+ size,
66
+ stopResize
67
+ ]);
68
+ const context = React.useMemo(() => ({
69
+ beginResize,
70
+ keyboardStep,
71
+ label,
72
+ maxSize,
73
+ minSize,
74
+ setSize,
75
+ side,
76
+ size
77
+ }), [
78
+ beginResize,
79
+ keyboardStep,
80
+ label,
81
+ maxSize,
82
+ minSize,
83
+ setSize,
84
+ side,
85
+ size
86
+ ]);
87
+ const rootStyle = {
88
+ ...style,
89
+ "--resizable-side-panel-size": `${size}px`
90
+ };
91
+ return /* @__PURE__ */ jsx(ResizableSidePanelContext.Provider, {
92
+ value: context,
93
+ children: /* @__PURE__ */ jsx("div", {
94
+ ref,
95
+ "data-slot": "resizable-side-panel",
96
+ "data-panel-side": side,
97
+ className: cx("resizable-side-panel", className),
98
+ style: rootStyle,
99
+ ...props,
100
+ children
101
+ })
102
+ });
103
+ }
104
+ function ResizableSidePanelHandle({ className, onKeyDown, onPointerDown, ref, ...props }) {
105
+ const context = React.useContext(ResizableSidePanelContext);
106
+ if (!context) throw new Error("ResizableSidePanel.Handle must be rendered inside ResizableSidePanel.Root.");
107
+ const { beginResize, keyboardStep, label, maxSize, minSize, setSize, side, size } = context;
108
+ const resizeBy = (physicalDelta, direction) => {
109
+ setSize(size + panelSizeDelta(physicalDelta, side, direction));
110
+ };
111
+ return /* @__PURE__ */ jsx(Separator, {
112
+ ...props,
113
+ ref,
114
+ decorative: false,
115
+ orientation: "vertical",
116
+ tabIndex: 0,
117
+ "aria-label": `Resize ${label} panel`,
118
+ "aria-valuemin": minSize,
119
+ "aria-valuemax": maxSize,
120
+ "aria-valuenow": size,
121
+ className: cx("resizable-side-panel__handle", className),
122
+ onPointerDown: (event) => {
123
+ onPointerDown?.(event);
124
+ if (!event.defaultPrevented) beginResize(event);
125
+ },
126
+ onKeyDown: (event) => {
127
+ onKeyDown?.(event);
128
+ if (event.defaultPrevented) return;
129
+ const direction = getComputedStyle(event.currentTarget).direction === "rtl" ? "rtl" : "ltr";
130
+ if (event.key === "ArrowLeft") {
131
+ event.preventDefault();
132
+ resizeBy(-keyboardStep, direction);
133
+ } else if (event.key === "ArrowRight") {
134
+ event.preventDefault();
135
+ resizeBy(keyboardStep, direction);
136
+ } else if (event.key === "Home") {
137
+ event.preventDefault();
138
+ setSize(minSize);
139
+ } else if (event.key === "End") {
140
+ event.preventDefault();
141
+ setSize(maxSize);
142
+ }
143
+ }
144
+ });
145
+ }
146
+ const ResizableSidePanel = {
147
+ Root: ResizableSidePanelRoot,
148
+ Handle: ResizableSidePanelHandle
149
+ };
150
+ //#endregion
151
+ export { ResizableSidePanel };
@@ -0,0 +1,2 @@
1
+ import { i as ResponsiveSidebarShellTopBarControls, n as ResponsiveSidebarShellControls, r as ResponsiveSidebarShellProps, t as ResponsiveSidebarShell } from "../ResponsiveSidebarShell-Dd9DCcBT.js";
2
+ export { ResponsiveSidebarShell, ResponsiveSidebarShellControls, ResponsiveSidebarShellProps, ResponsiveSidebarShellTopBarControls };
@@ -0,0 +1,129 @@
1
+ import { t as cx } from "../class-names-9UtZwb0J.js";
2
+ import { z as SidebarIcon } from "../icons-CpfUer49.js";
3
+ import { Button } from "./Button.js";
4
+ import { n as mergeRefs } from "../merge-refs-DF_7w2x_.js";
5
+ import { AppTopBar } from "./AppTopBar.js";
6
+ import { ResizableSidePanel } from "./ResizableSidePanel.js";
7
+ import * as React from "react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ //#region src/components/ResponsiveSidebarShell.tsx
10
+ const sidebarDefaultWidth = 256;
11
+ const sidebarMinWidth = 224;
12
+ const sidebarMaxWidth = 384;
13
+ const sidebarKeyboardStep = 24;
14
+ const compactSidebarWidthRem = 56;
15
+ function useControllableSidebar({ sidebarOpen, defaultSidebarOpen, onSidebarOpenChange }) {
16
+ const [innerOpen, setInnerOpen] = React.useState(defaultSidebarOpen ?? true);
17
+ return [sidebarOpen ?? innerOpen, React.useCallback((next) => {
18
+ if (sidebarOpen === void 0) setInnerOpen(next);
19
+ onSidebarOpenChange?.(next);
20
+ }, [sidebarOpen, onSidebarOpenChange])];
21
+ }
22
+ function isCompactSidebar(root) {
23
+ const rootFontSize = Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
24
+ return root.getBoundingClientRect().width <= compactSidebarWidthRem * rootFontSize;
25
+ }
26
+ /**
27
+ * Responsive master-detail shell with a resizable desktop sidebar and a compact
28
+ * floating sidebar that leaves the main content in place as a dismiss target.
29
+ */
30
+ function ResponsiveSidebarShell({ sidebar, topBar, sidebarLabel, sidebarOpen, defaultSidebarOpen, defaultSidebarWidth = sidebarDefaultWidth, onSidebarOpenChange, toolbarLabel = "Sidebar controls", showMainLabel = "Show main content", className, children, ref, style, ...props }) {
31
+ const sidebarId = React.useId();
32
+ const rootRef = React.useRef(null);
33
+ const mainRef = React.useRef(null);
34
+ const openerRef = React.useRef(null);
35
+ const [isSidebarOpen, setSidebarOpen] = useControllableSidebar({
36
+ sidebarOpen,
37
+ defaultSidebarOpen,
38
+ onSidebarOpenChange
39
+ });
40
+ const toggleLabel = `${sidebarLabel.charAt(0).toUpperCase()}${sidebarLabel.slice(1)}`;
41
+ const toggleTooltip = `${isSidebarOpen ? "Hide" : "Show"} ${sidebarLabel}`;
42
+ const closeSidebar = React.useCallback(() => {
43
+ setSidebarOpen(false);
44
+ queueMicrotask(() => mainRef.current?.focus({ preventScroll: true }));
45
+ }, [setSidebarOpen]);
46
+ const closeSidebarOnCompact = React.useCallback(() => {
47
+ if (rootRef.current && isCompactSidebar(rootRef.current)) closeSidebar();
48
+ }, [closeSidebar]);
49
+ const toggleSidebar = React.useCallback((trigger) => {
50
+ if (trigger) openerRef.current = trigger;
51
+ setSidebarOpen(!isSidebarOpen);
52
+ }, [isSidebarOpen, setSidebarOpen]);
53
+ const dismissSidebar = React.useCallback(() => {
54
+ setSidebarOpen(false);
55
+ queueMicrotask(() => openerRef.current?.focus({ preventScroll: true }));
56
+ }, [setSidebarOpen]);
57
+ const sidebarContent = typeof sidebar === "function" ? sidebar({
58
+ closeSidebar,
59
+ closeSidebarOnCompact
60
+ }) : sidebar;
61
+ const sidebarToggle = /* @__PURE__ */ jsx(AppTopBar.Button, {
62
+ className: "responsive-sidebar-shell__toggle",
63
+ label: toggleLabel,
64
+ tooltip: toggleTooltip,
65
+ type: "button",
66
+ "aria-controls": sidebarId,
67
+ "aria-expanded": isSidebarOpen,
68
+ onClick: (event) => toggleSidebar(event.currentTarget),
69
+ children: /* @__PURE__ */ jsx(SidebarIcon, {})
70
+ });
71
+ const topBarContent = typeof topBar === "function" ? topBar({
72
+ sidebarId,
73
+ sidebarOpen: isSidebarOpen,
74
+ sidebarToggle,
75
+ toggleSidebar
76
+ }) : topBar;
77
+ return /* @__PURE__ */ jsxs("div", {
78
+ ref: mergeRefs(rootRef, ref),
79
+ className: cx("responsive-sidebar-shell", className),
80
+ style,
81
+ ...props,
82
+ onKeyDown: (event) => {
83
+ props.onKeyDown?.(event);
84
+ if (!event.defaultPrevented && event.key === "Escape" && isSidebarOpen && rootRef.current && isCompactSidebar(rootRef.current)) {
85
+ event.preventDefault();
86
+ dismissSidebar();
87
+ }
88
+ },
89
+ children: [topBarContent ?? /* @__PURE__ */ jsx(AppTopBar.Root, {
90
+ "aria-label": toolbarLabel,
91
+ children: /* @__PURE__ */ jsx(AppTopBar.Leading, { children: sidebarToggle })
92
+ }), /* @__PURE__ */ jsxs(ResizableSidePanel.Root, {
93
+ className: "responsive-sidebar-shell__frame",
94
+ label: sidebarLabel,
95
+ side: "start",
96
+ defaultSize: defaultSidebarWidth,
97
+ minSize: sidebarMinWidth,
98
+ maxSize: sidebarMaxWidth,
99
+ keyboardStep: sidebarKeyboardStep,
100
+ "data-sidebar-open": isSidebarOpen ? "true" : "false",
101
+ children: [
102
+ isSidebarOpen ? /* @__PURE__ */ jsx(ResizableSidePanel.Handle, { className: "responsive-sidebar-shell__resizer" }) : null,
103
+ /* @__PURE__ */ jsx("div", {
104
+ id: sidebarId,
105
+ className: "responsive-sidebar-shell__sidebar",
106
+ "aria-hidden": isSidebarOpen ? void 0 : true,
107
+ inert: isSidebarOpen ? void 0 : true,
108
+ children: sidebarContent
109
+ }),
110
+ /* @__PURE__ */ jsx("div", {
111
+ ref: mainRef,
112
+ className: "responsive-sidebar-shell__main",
113
+ tabIndex: -1,
114
+ children
115
+ }),
116
+ isSidebarOpen ? /* @__PURE__ */ jsx(Button, {
117
+ type: "button",
118
+ variant: "ghost",
119
+ color: "neutral",
120
+ className: "responsive-sidebar-shell__peek",
121
+ "aria-label": showMainLabel,
122
+ onClick: closeSidebar
123
+ }) : null
124
+ ]
125
+ })]
126
+ });
127
+ }
128
+ //#endregion
129
+ export { ResponsiveSidebarShell };
@@ -1,2 +1,2 @@
1
- import { _ as SelectTriggerProps, a as SelectIconProps, c as SelectItemTextProps, d as SelectPortalProps, f as SelectPositionerProps, g as SelectSeparatorProps, h as SelectScrollUpArrowProps, i as SelectGroupProps, l as SelectListProps, m as SelectScrollDownArrowProps, n as SelectBackdropProps, o as SelectItemIndicatorProps, p as SelectProps, r as SelectGroupLabelProps, s as SelectItemProps, t as Select, u as SelectPopupProps, v as SelectValueProps } from "../Select-Dl_vF_Bt.js";
2
- export { Select, SelectBackdropProps, SelectGroupLabelProps, SelectGroupProps, SelectIconProps, SelectItemIndicatorProps, SelectItemProps, SelectItemTextProps, SelectListProps, SelectPopupProps, SelectPortalProps, SelectPositionerProps, SelectProps, SelectScrollDownArrowProps, SelectScrollUpArrowProps, SelectSeparatorProps, SelectTriggerProps, SelectValueProps };
1
+ import { _ as SelectSeparatorProps, a as SelectIconProps, c as SelectItemTextProps, d as SelectPopupProps, f as SelectPortalProps, g as SelectScrollUpArrowProps, h as SelectScrollDownArrowProps, i as SelectGroupProps, l as SelectLabelProps, m as SelectProps, n as SelectBackdropProps, o as SelectItemIndicatorProps, p as SelectPositionerProps, r as SelectGroupLabelProps, s as SelectItemProps, t as Select, u as SelectListProps, v as SelectTriggerProps, y as SelectValueProps } from "../Select-BeEsefzh.js";
2
+ export { Select, SelectBackdropProps, SelectGroupLabelProps, SelectGroupProps, SelectIconProps, SelectItemIndicatorProps, SelectItemProps, SelectItemTextProps, SelectLabelProps, SelectListProps, SelectPopupProps, SelectPortalProps, SelectPositionerProps, SelectProps, SelectScrollDownArrowProps, SelectScrollUpArrowProps, SelectSeparatorProps, SelectTriggerProps, SelectValueProps };
@@ -1,4 +1,4 @@
1
- import { a as CheckIcon, i as ArrowUpIcon, t as ArrowDownIcon } from "../icons-Ba9THQKz.js";
1
+ import { i as ArrowUpIcon, o as CheckIcon, t as ArrowDownIcon } from "../icons-CpfUer49.js";
2
2
  import "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { Select as Select$1 } from "@base-ui/react/select";
@@ -34,6 +34,15 @@ function SelectRoot(props) {
34
34
  ...props
35
35
  });
36
36
  }
37
+ function SelectLabel({ className = "", ref, ...props }) {
38
+ const classes = ["select__label", className].filter(Boolean).join(" ");
39
+ return /* @__PURE__ */ jsx(Select$1.Label, {
40
+ ref,
41
+ "data-slot": "select-label",
42
+ className: classes,
43
+ ...props
44
+ });
45
+ }
37
46
  function SelectTrigger({ size = "default", className = "", ref, ...props }) {
38
47
  const normalizedSize = size === "md" ? "default" : size;
39
48
  const classes = [
@@ -203,7 +212,7 @@ function SelectScrollDownArrow({ className = "", children, ref, ...props }) {
203
212
  }
204
213
  const Select = {
205
214
  Root: SelectRoot,
206
- Label: Select$1.Label,
215
+ Label: SelectLabel,
207
216
  Trigger: SelectTrigger,
208
217
  Value: SelectValue,
209
218
  Icon: SelectIcon,
@@ -21,6 +21,9 @@ interface SliderOutputProps extends Omit<React.ComponentPropsWithRef<typeof Slid
21
21
  className?: string;
22
22
  children?: (value: number, values: readonly number[], formattedValues: readonly string[]) => React.ReactNode;
23
23
  }
24
+ interface SliderLabelProps extends Omit<React.ComponentPropsWithRef<typeof Slider$1.Label>, "className"> {
25
+ className?: string;
26
+ }
24
27
  /**
25
28
  * A slider component for selecting values from a range.
26
29
  *
@@ -111,8 +114,17 @@ declare function SliderOutput({
111
114
  }: SliderOutputProps & {
112
115
  ref?: React.Ref<HTMLOutputElement>;
113
116
  }): React.JSX.Element;
117
+ /** Visible label that participates in Base UI's slider naming relationship. */
118
+ declare function SliderLabel({
119
+ className,
120
+ ref,
121
+ ...props
122
+ }: SliderLabelProps & {
123
+ ref?: React.Ref<HTMLSpanElement>;
124
+ }): React.JSX.Element;
114
125
  declare const Slider: {
115
126
  Root: typeof SliderRoot;
127
+ Label: typeof SliderLabel;
116
128
  Value: typeof SliderOutput;
117
129
  Control: typeof SliderControl;
118
130
  Track: typeof SliderTrack;
@@ -120,4 +132,4 @@ declare const Slider: {
120
132
  Thumb: typeof SliderThumb;
121
133
  };
122
134
  //#endregion
123
- export { Slider, SliderControlProps, SliderIndicatorProps, SliderOutputProps, SliderProps, SliderThumbProps, SliderTrackProps };
135
+ export { Slider, SliderControlProps, SliderIndicatorProps, SliderLabelProps, SliderOutputProps, SliderProps, SliderThumbProps, SliderTrackProps };
@@ -104,8 +104,19 @@ function SliderOutput({ className = "", children, ref, ...props }) {
104
104
  children: (formattedValues, values) => typeof children === "function" ? children(values[0] ?? 0, values, formattedValues) : formattedValues.join(" - ")
105
105
  });
106
106
  }
107
+ /** Visible label that participates in Base UI's slider naming relationship. */
108
+ function SliderLabel({ className = "", ref, ...props }) {
109
+ const classes = ["slider__label", className].filter(Boolean).join(" ");
110
+ return /* @__PURE__ */ jsx(Slider$1.Label, {
111
+ ref,
112
+ "data-slot": "slider-label",
113
+ className: classes,
114
+ ...props
115
+ });
116
+ }
107
117
  const Slider = {
108
118
  Root: SliderRoot,
119
+ Label: SliderLabel,
109
120
  Value: SliderOutput,
110
121
  Control: SliderControl,
111
122
  Track: SliderTrack,
@@ -1,6 +1,6 @@
1
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-Ba9THQKz.js";
3
+ import { C as LinkIcon, l as ChevronRightIcon } from "../icons-CpfUer49.js";
4
4
  import "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Sources.tsx
@@ -119,6 +119,7 @@ declare function StepperTrigger({
119
119
  children,
120
120
  disabled,
121
121
  id,
122
+ type,
122
123
  "aria-controls": ariaControls,
123
124
  tabIndex,
124
125
  onClick,
@@ -173,10 +174,13 @@ declare function StepperPanel({
173
174
  interface StepperContentProps extends React.ComponentPropsWithoutRef<"div"> {
174
175
  value: number;
175
176
  forceMount?: boolean;
177
+ /** Optional vertical rhythm for direct content children. */
178
+ spacing?: "none" | "compact" | "default";
176
179
  }
177
180
  declare function StepperContent({
178
181
  value,
179
182
  forceMount,
183
+ spacing,
180
184
  className,
181
185
  children,
182
186
  id,
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { N as SpinnerIcon, a as CheckIcon } from "../icons-Ba9THQKz.js";
2
+ import { B as SpinnerIcon, o as CheckIcon } from "../icons-CpfUer49.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";
@@ -153,7 +153,7 @@ function StepperItem({ step, completed = false, disabled = false, loading = fals
153
153
  })
154
154
  });
155
155
  }
156
- function StepperTrigger({ className, children, disabled, id, "aria-controls": ariaControls, tabIndex, onClick, onKeyDown, ref, ...props }) {
156
+ function StepperTrigger({ className, children, disabled, id, type = "button", "aria-controls": ariaControls, tabIndex, onClick, onKeyDown, ref, ...props }) {
157
157
  const { activeStep, focusFirst, focusLast, focusNext, focusPrev, idPrefix, registerTrigger, setActiveStep } = useStepper();
158
158
  const { isDisabled, isLoading, state, step } = useStepItem();
159
159
  const isSelected = activeStep === step;
@@ -213,6 +213,7 @@ function StepperTrigger({ className, children, disabled, id, "aria-controls": ar
213
213
  onClick: handleClick,
214
214
  onKeyDown: handleKeyDown,
215
215
  tabIndex: typeof tabIndex === "number" ? tabIndex : isSelected ? 0 : -1,
216
+ type,
216
217
  ...props,
217
218
  children
218
219
  });
@@ -278,7 +279,7 @@ function StepperPanel({ className, ref, ...props }) {
278
279
  ...props
279
280
  });
280
281
  }
281
- function StepperContent({ value, forceMount = false, className, children, id, "aria-labelledby": ariaLabelledBy, ref, ...props }) {
282
+ function StepperContent({ value, forceMount = false, spacing = "none", className, children, id, "aria-labelledby": ariaLabelledBy, ref, ...props }) {
282
283
  const { activeStep, idPrefix } = useStepper();
283
284
  const isActive = activeStep === value;
284
285
  if (!forceMount && !isActive) return null;
@@ -288,6 +289,7 @@ function StepperContent({ value, forceMount = false, className, children, id, "a
288
289
  id: id ?? `${idPrefix}-panel-${value}`,
289
290
  "aria-labelledby": ariaLabelledBy ?? `${idPrefix}-trigger-${value}`,
290
291
  className: cx("stepper__content", !isActive && "stepper__content--hidden", className),
292
+ "data-spacing": spacing,
291
293
  "data-state": isActive ? "active" : "inactive",
292
294
  hidden: !isActive,
293
295
  tabIndex: 0,
@@ -0,0 +1,86 @@
1
+ import { Collapsible } from "./Collapsible.js";
2
+ import { BadgeProps } from "./Badge.js";
3
+ import { SubagentRunIndicator, SubagentRunIndicatorProps, getSubagentRunName, getSubagentRunTooltip } from "./SubagentRunIndicator.js";
4
+ import { SubagentRunList, SubagentRunListProps } from "./SubagentRunList.js";
5
+ import { SubagentRunSelector, SubagentRunSelectorProps } from "./SubagentRunSelector.js";
6
+ import { SubagentRunActions, SubagentRunActionsProps, SubagentRunMilestone, SubagentRunMilestoneProps, SubagentRunMilestones, SubagentRunMilestonesProps, SubagentRunProgress, SubagentRunProgressProps } from "./SubagentRunDetails.js";
7
+ import * as React from "react";
8
+
9
+ //#region src/components/SubagentRun.d.ts
10
+ interface SubagentRunProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
11
+ className?: string;
12
+ }
13
+ /**
14
+ * Transport-neutral inline disclosure for one delegated agent run.
15
+ *
16
+ * @deprecated Retained subagent transcripts should open in an adjacent
17
+ * `ThinkFullApp` workbench panel. Use `SubagentRunSelector` in the transcript.
18
+ */
19
+ declare function SubagentRun({
20
+ className,
21
+ ref,
22
+ ...props
23
+ }: SubagentRunProps): React.JSX.Element;
24
+ interface SubagentRunTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
25
+ className?: string;
26
+ }
27
+ /**
28
+ * @deprecated Retained subagent transcripts should not expand inline. Use
29
+ * `SubagentRunSelector` and render the child in a `ThinkFullApp` workbench panel.
30
+ */
31
+ declare function SubagentRunTrigger({
32
+ className,
33
+ children,
34
+ ref,
35
+ ...props
36
+ }: SubagentRunTriggerProps): React.JSX.Element;
37
+ interface SubagentRunHeadingProps extends React.HTMLAttributes<HTMLSpanElement> {}
38
+ declare function SubagentRunHeading({
39
+ className,
40
+ ref,
41
+ ...props
42
+ }: SubagentRunHeadingProps & {
43
+ ref?: React.Ref<HTMLSpanElement>;
44
+ }): React.JSX.Element;
45
+ interface SubagentRunTitleProps extends React.HTMLAttributes<HTMLSpanElement> {}
46
+ declare function SubagentRunTitle({
47
+ className,
48
+ ref,
49
+ ...props
50
+ }: SubagentRunTitleProps & {
51
+ ref?: React.Ref<HTMLSpanElement>;
52
+ }): React.JSX.Element;
53
+ interface SubagentRunDescriptionProps extends React.HTMLAttributes<HTMLSpanElement> {}
54
+ declare function SubagentRunDescription({
55
+ className,
56
+ ref,
57
+ ...props
58
+ }: SubagentRunDescriptionProps & {
59
+ ref?: React.Ref<HTMLSpanElement>;
60
+ }): React.JSX.Element;
61
+ type SubagentRunStatusTone = "active" | "complete" | "error" | "stopped" | "warning";
62
+ interface SubagentRunStatusProps extends Omit<BadgeProps, "color"> {
63
+ tone?: SubagentRunStatusTone;
64
+ }
65
+ /** Visible status label. A transport adapter owns any debounced live announcement. */
66
+ declare function SubagentRunStatus({
67
+ className,
68
+ tone,
69
+ size,
70
+ ...props
71
+ }: SubagentRunStatusProps): React.JSX.Element;
72
+ interface SubagentRunContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
73
+ className?: string;
74
+ }
75
+ /**
76
+ * @deprecated Retained subagent transcripts should live in an adjacent
77
+ * `ThinkFullApp` workbench panel, not below the selector.
78
+ */
79
+ declare function SubagentRunContent({
80
+ className,
81
+ children,
82
+ ref,
83
+ ...props
84
+ }: SubagentRunContentProps): React.JSX.Element;
85
+ //#endregion
86
+ export { SubagentRun, SubagentRunActions, type SubagentRunActionsProps, SubagentRunContent, SubagentRunContentProps, SubagentRunDescription, SubagentRunDescriptionProps, SubagentRunHeading, SubagentRunHeadingProps, SubagentRunIndicator, type SubagentRunIndicatorProps, SubagentRunList, type SubagentRunListProps, SubagentRunMilestone, type SubagentRunMilestoneProps, SubagentRunMilestones, type SubagentRunMilestonesProps, SubagentRunProgress, type SubagentRunProgressProps, SubagentRunProps, SubagentRunSelector, type SubagentRunSelectorProps, SubagentRunStatus, SubagentRunStatusProps, SubagentRunStatusTone, SubagentRunTitle, SubagentRunTitleProps, SubagentRunTrigger, SubagentRunTriggerProps, getSubagentRunName, getSubagentRunTooltip };