@mcp-b/react-components 0.34.1 → 0.36.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.
- package/dist/{AgentChat-CV-GuYA6.d.ts → AgentChat-CVO7xyLC.d.ts} +22 -3
- package/dist/{CodeBlock-CM5gfmdq.js → CodeBlock-Bk4nn7l-.js} +4 -3
- package/dist/{CodeBlock-DzGhYyNe.d.ts → CodeBlock-C380GD5t.d.ts} +2 -5
- package/dist/{Dialog-DeOSJ0Oy.d.ts → Dialog-B_FhRWaz.d.ts} +22 -37
- package/dist/{Menu-DVmjBIuM.d.ts → Menu-yb6QXWA3.d.ts} +64 -75
- package/dist/{PromptInput-DOyee1kM.d.ts → PromptInput-BRX7FhjH.d.ts} +7 -272
- package/dist/ResponsiveSidebarShell-DWjULskY.d.ts +68 -0
- package/dist/{Select-D96d09ww.d.ts → Select-RrceeEIe.d.ts} +17 -52
- package/dist/{ThinkChat-en0UbkVv.js → ThinkChat-ByR-QT_D.js} +19 -12
- package/dist/{ThinkChatActivity-CgqpROz_.d.ts → ThinkChatActivity-Dkmm2pIj.d.ts} +1 -1
- package/dist/{ToggleGroup-CSBWfPXo.d.ts → ToggleGroup-BrQZOQn_.d.ts} +4 -6
- package/dist/{WorkspaceFile-C8Riev9j.d.ts → WorkspaceFile-BLaFmMrt.d.ts} +18 -2
- package/dist/{WorkspaceFileView-BtzVKAed.js → WorkspaceFileView-DTHJLKW_.js} +11 -17
- package/dist/components/agents-sdk/AgentChat.d.ts +2 -2
- package/dist/components/agents-sdk/AgentChat.js +47 -26
- package/dist/components/agents-sdk/BrowserLiveView.d.ts +47 -1
- package/dist/components/agents-sdk/BrowserReplay.d.ts +40 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/McpConnectionRequest.js +14 -15
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +17 -24
- package/dist/components/agents-sdk/McpServerPicker.d.ts +2 -2
- package/dist/components/agents-sdk/McpServerPicker.js +19 -17
- package/dist/components/agents-sdk/ModelSelector.d.ts +9 -9
- package/dist/components/agents-sdk/ModelSelector.js +504 -1
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/SubagentRunDetails.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +18 -95
- package/dist/components/agents-sdk/ThinkChat.js +2 -12
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +2 -4
- package/dist/components/agents-sdk/ThinkChatActivity.js +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.js +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +3 -8
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +5 -3
- package/dist/components/agents-sdk/ThinkExecutionRun.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +2 -2
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +4 -4
- package/dist/components/agents-sdk/ThinkFullApp.js +12 -14
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkPendingApproval.js +3 -3
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +5 -4
- package/dist/components/agents-sdk/ThinkRoutineForm.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +2 -3
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +11 -15
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -4
- package/dist/components/agents-sdk/ThinkThreadShell.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.d.ts +140 -2
- package/dist/components/agents-sdk/Workspace.js +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +32 -5
- package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -5
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceFile.js +41 -4
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/ai-sdk/Activity.d.ts +5 -0
- package/dist/components/ai-sdk/Activity.js +33 -13
- package/dist/components/ai-sdk/Approval.d.ts +1 -2
- package/dist/components/ai-sdk/Approval.js +4 -7
- package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/Context.js +1 -1
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/Message.js +2 -6
- package/dist/components/ai-sdk/MessageScroller.d.ts +5 -0
- package/dist/components/ai-sdk/MessageScroller.js +18 -12
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +18 -10
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.d.ts +2 -2
- package/dist/components/ai-sdk/PromptInput.js +124 -127
- package/dist/components/ai-sdk/Queue.js +1 -1
- package/dist/components/ai-sdk/Reasoning.d.ts +3 -4
- package/dist/components/ai-sdk/Reasoning.js +29 -13
- package/dist/components/ai-sdk/ToolInvocation.d.ts +3 -5
- package/dist/components/ai-sdk/ToolInvocation.js +2 -2
- package/dist/components/extension/ChatGptSignInScreen.js +2 -2
- package/dist/components/extension/CodexModelSelector.d.ts +1 -1
- package/dist/components/extension/CodexModelSelector.js +1 -1
- package/dist/components/extension/ConversationTabPicker.js +1 -1
- package/dist/components/foundations/Accordion.d.ts +1 -3
- package/dist/components/foundations/Accordion.js +1 -3
- package/dist/components/foundations/AlertDialog.d.ts +16 -36
- package/dist/components/foundations/Autocomplete.d.ts +12 -33
- package/dist/components/foundations/Autocomplete.js +2 -1
- package/dist/components/foundations/Combobox.d.ts +119 -2
- package/dist/components/foundations/Combobox.js +6 -23
- package/dist/components/foundations/ContextMenu.d.ts +50 -57
- package/dist/components/foundations/ContextMenu.js +4 -28
- package/dist/components/foundations/DescriptionList.d.ts +34 -2
- package/dist/components/foundations/DescriptionList.js +33 -2
- package/dist/components/foundations/Dialog.d.ts +1 -1
- package/dist/components/foundations/Dialog.js +2 -1
- package/dist/components/foundations/EmptyState.d.ts +5 -2
- package/dist/components/foundations/EmptyState.js +11 -7
- package/dist/components/foundations/Menu.d.ts +1 -1
- package/dist/components/foundations/Menu.js +3 -21
- package/dist/components/foundations/Menubar.d.ts +35 -64
- package/dist/components/foundations/Menubar.js +3 -22
- package/dist/components/foundations/Popover.d.ts +8 -21
- package/dist/components/foundations/Popover.js +3 -48
- package/dist/components/foundations/PreviewCard.d.ts +44 -29
- package/dist/components/foundations/PreviewCard.js +3 -6
- package/dist/components/foundations/RadioGroup.d.ts +4 -6
- package/dist/components/foundations/Select.d.ts +1 -1
- package/dist/components/foundations/Select.js +7 -21
- package/dist/components/foundations/Slider.d.ts +31 -44
- package/dist/components/foundations/Slider.js +26 -25
- package/dist/components/foundations/Stepper.d.ts +3 -3
- package/dist/components/foundations/Stepper.js +5 -6
- package/dist/components/foundations/ToggleGroup.d.ts +1 -1
- package/dist/components/foundations/Tooltip.d.ts +6 -8
- package/dist/components/foundations/Tooltip.js +4 -3
- package/dist/components/general-purpose/Commit.js +1 -1
- package/dist/components/general-purpose/EnvironmentVariables.js +1 -1
- package/dist/components/general-purpose/PricingBillingToggle.d.ts +2 -3
- package/dist/components/general-purpose/PricingBillingToggle.js +4 -22
- package/dist/components/general-purpose/PricingPage.d.ts +3 -4
- package/dist/components/general-purpose/ResizableSidePanel.js +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -67
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
- package/dist/components/general-purpose/SettingsFormDialog.d.ts +7 -2
- package/dist/components/general-purpose/SettingsFormDialog.js +18 -3
- package/dist/components/general-purpose/Terminal.js +3 -3
- package/dist/components/general-purpose/ThemeModeControl.js +1 -1
- package/dist/components/general-purpose/WebPreview.js +4 -4
- package/dist/components/nanites/AgentConnection.js +16 -11
- package/dist/components/nanites/AgentToolDetail.js +6 -7
- package/dist/{format-CmopcfqJ.js → format-DB2mX9DA.js} +16 -1
- package/dist/{mcp-server-U71zhxFF.js → mcp-server-SD_S-IpB.js} +18 -2
- package/dist/message-scroller-C8cplcQO.js +32 -0
- package/dist/{progress-ring-Dz_ztrW2.js → progress-ring-BEocM1e3.js} +1 -1
- package/dist/provider-logos-zjZycgV6.js +74 -0
- package/dist/styles/agent-chat.css +25 -0
- package/dist/styles/agent-connection.css +4 -31
- package/dist/styles/agent-tool-detail.css +0 -7
- package/dist/styles/alert-dialog.css +0 -2
- package/dist/styles/base-ui-motion.css +7 -5
- package/dist/styles/chatgpt-sign-in-screen.css +5 -3
- package/dist/styles/dialog.css +0 -2
- package/dist/styles/field.css +2 -2
- package/dist/styles/model-selector.css +30 -12
- package/dist/styles/popover.css +0 -1
- package/dist/styles/preview-card.css +0 -4
- package/dist/styles/pricing-page.css +1 -13
- package/dist/styles/prompt-input.css +12 -10
- package/dist/styles/recipes.css +22 -14
- package/dist/styles/slider.css +2 -2
- package/dist/styles/think-execution-workbench.css +9 -13
- package/dist/styles/think-routine-library.css +2 -30
- package/dist/styles/tooltip.css +0 -1
- package/dist/utils/structured-code.d.ts +1 -1
- package/package.json +17 -7
- package/dist/BrowserLiveView-tJTWkoyu.d.ts +0 -48
- package/dist/BrowserReplay-B0BQZr-N.d.ts +0 -41
- package/dist/Combobox-WrrDDaEv.d.ts +0 -154
- package/dist/ModelSelector-DzdEs2fX.js +0 -504
- package/dist/Workspace-EhvvlHOB.d.ts +0 -278
- package/dist/WorkspaceExplorer-DygQnEyi.d.ts +0 -32
- package/dist/components/foundations/DescriptionListParts.d.ts +0 -37
- package/dist/components/foundations/DescriptionListParts.js +0 -35
|
@@ -4,17 +4,56 @@ import { Button } from "../foundations/Button.js";
|
|
|
4
4
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
5
5
|
import { IconButton } from "../foundations/IconButton.js";
|
|
6
6
|
import { t as AttachmentPreview } from "../../attachment-preview-1CXJvrmb.js";
|
|
7
|
-
import { i as formatErrorMessage, n as clamp, r as formatClock } from "../../format-
|
|
8
|
-
import {
|
|
7
|
+
import { i as formatErrorMessage, n as clamp, r as formatClock } from "../../format-DB2mX9DA.js";
|
|
8
|
+
import { Autocomplete } from "../foundations/Autocomplete.js";
|
|
9
9
|
import { Kbd } from "../foundations/Kbd.js";
|
|
10
10
|
import { Menu } from "../foundations/Menu.js";
|
|
11
|
-
import {
|
|
11
|
+
import { PreviewCard } from "../foundations/PreviewCard.js";
|
|
12
12
|
import { Tabs } from "../foundations/Tabs.js";
|
|
13
|
+
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
13
14
|
import * as React from "react";
|
|
14
15
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
16
|
//#region src/components/ai-sdk/PromptInput.tsx
|
|
16
17
|
const PromptInputController = React.createContext(null);
|
|
17
18
|
const LocalAttachmentsContext = React.createContext(null);
|
|
19
|
+
function useAttachmentStore() {
|
|
20
|
+
const [files, setFiles] = React.useState([]);
|
|
21
|
+
const filesRef = React.useRef(files);
|
|
22
|
+
React.useEffect(() => {
|
|
23
|
+
filesRef.current = files;
|
|
24
|
+
}, [files]);
|
|
25
|
+
React.useEffect(() => () => {
|
|
26
|
+
revokeFileUrls(filesRef.current);
|
|
27
|
+
}, []);
|
|
28
|
+
const add = React.useCallback((incomingFiles) => {
|
|
29
|
+
const incoming = Array.from(incomingFiles);
|
|
30
|
+
setFiles((current) => [...current, ...incoming.map(fileToPart)]);
|
|
31
|
+
}, []);
|
|
32
|
+
const remove = React.useCallback((id) => {
|
|
33
|
+
setFiles((current) => {
|
|
34
|
+
const found = current.find((file) => file.id === id);
|
|
35
|
+
if (found?.url) URL.revokeObjectURL(found.url);
|
|
36
|
+
return current.filter((file) => file.id !== id);
|
|
37
|
+
});
|
|
38
|
+
}, []);
|
|
39
|
+
const clear = React.useCallback(() => {
|
|
40
|
+
setFiles((current) => {
|
|
41
|
+
revokeFileUrls(current);
|
|
42
|
+
return [];
|
|
43
|
+
});
|
|
44
|
+
}, []);
|
|
45
|
+
return React.useMemo(() => ({
|
|
46
|
+
add,
|
|
47
|
+
clear,
|
|
48
|
+
files,
|
|
49
|
+
remove
|
|
50
|
+
}), [
|
|
51
|
+
add,
|
|
52
|
+
clear,
|
|
53
|
+
files,
|
|
54
|
+
remove
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
18
57
|
function usePromptInputController() {
|
|
19
58
|
const ctx = React.useContext(PromptInputController);
|
|
20
59
|
if (!ctx) throw new Error("Wrap your component inside <PromptInputProvider> to use usePromptInputController().");
|
|
@@ -36,46 +75,14 @@ function usePromptInputAttachments() {
|
|
|
36
75
|
}
|
|
37
76
|
function PromptInputProvider({ initialInput = "", children }) {
|
|
38
77
|
const [textInput, setTextInput] = React.useState(initialInput);
|
|
39
|
-
const
|
|
78
|
+
const attachmentStore = useAttachmentStore();
|
|
40
79
|
const fileInputRef = React.useRef(null);
|
|
41
80
|
const openRef = React.useRef(() => {});
|
|
42
|
-
const attachmentsRef = React.useRef(attachmentFiles);
|
|
43
|
-
React.useEffect(() => {
|
|
44
|
-
attachmentsRef.current = attachmentFiles;
|
|
45
|
-
}, [attachmentFiles]);
|
|
46
|
-
React.useEffect(() => () => {
|
|
47
|
-
revokeFileUrls(attachmentsRef.current);
|
|
48
|
-
}, []);
|
|
49
|
-
const add = React.useCallback((files) => {
|
|
50
|
-
const incoming = Array.from(files);
|
|
51
|
-
setAttachmentFiles((prev) => [...prev, ...incoming.map(fileToPart)]);
|
|
52
|
-
}, []);
|
|
53
|
-
const remove = React.useCallback((id) => {
|
|
54
|
-
setAttachmentFiles((prev) => {
|
|
55
|
-
const found = prev.find((file) => file.id === id);
|
|
56
|
-
if (found?.url) URL.revokeObjectURL(found.url);
|
|
57
|
-
return prev.filter((file) => file.id !== id);
|
|
58
|
-
});
|
|
59
|
-
}, []);
|
|
60
|
-
const clear = React.useCallback(() => {
|
|
61
|
-
setAttachmentFiles((prev) => {
|
|
62
|
-
revokeFileUrls(prev);
|
|
63
|
-
return [];
|
|
64
|
-
});
|
|
65
|
-
}, []);
|
|
66
81
|
const attachments = React.useMemo(() => ({
|
|
67
|
-
|
|
68
|
-
clear,
|
|
82
|
+
...attachmentStore,
|
|
69
83
|
fileInputRef,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
remove
|
|
73
|
-
}), [
|
|
74
|
-
add,
|
|
75
|
-
attachmentFiles,
|
|
76
|
-
clear,
|
|
77
|
-
remove
|
|
78
|
-
]);
|
|
84
|
+
openFileDialog: () => openRef.current()
|
|
85
|
+
}), [attachmentStore]);
|
|
79
86
|
const controller = React.useMemo(() => ({
|
|
80
87
|
__registerFileInput: (ref, open) => {
|
|
81
88
|
fileInputRef.current = ref.current;
|
|
@@ -99,7 +106,7 @@ function PromptInputProvider({ initialInput = "", children }) {
|
|
|
99
106
|
* Adapted from Vercel AI Elements and restyled with Sigvelo CSS tokens.
|
|
100
107
|
*
|
|
101
108
|
* Use for assistant/chat submit forms. Do not use it as a generic textarea or
|
|
102
|
-
* non-chat form. Sigvelo changes: uses shared Menu,
|
|
109
|
+
* non-chat form. Sigvelo changes: uses shared Menu, Autocomplete, Tabs,
|
|
103
110
|
* Button, and Tooltip components; maps styles to CSS tokens; and adds local
|
|
104
111
|
* attachment helpers.
|
|
105
112
|
*
|
|
@@ -126,19 +133,15 @@ function PromptInputProvider({ initialInput = "", children }) {
|
|
|
126
133
|
*/
|
|
127
134
|
function PromptInput({ className, accept, multiple, globalDrop, syncHiddenInput, maxFiles, maxFileSize, onError, onSubmit, children, ref, ...props }) {
|
|
128
135
|
const controller = useOptionalPromptInputController();
|
|
129
|
-
const usingProvider = Boolean(controller);
|
|
130
136
|
const formRef = React.useRef(null);
|
|
131
137
|
const inputRef = React.useRef(null);
|
|
132
|
-
const
|
|
138
|
+
const { add: addLocalFiles, clear: clearLocalFiles, files: localFiles, remove: removeLocalFile } = useAttachmentStore();
|
|
133
139
|
const files = controller?.attachments.files ?? localFiles;
|
|
134
140
|
const filesRef = React.useRef(files);
|
|
135
141
|
React.useEffect(() => {
|
|
136
142
|
filesRef.current = files;
|
|
137
143
|
}, [files]);
|
|
138
144
|
React.useImperativeHandle(ref, () => formRef.current, []);
|
|
139
|
-
React.useEffect(() => () => {
|
|
140
|
-
if (!usingProvider) revokeFileUrls(filesRef.current);
|
|
141
|
-
}, [usingProvider]);
|
|
142
145
|
const matchesAccept = React.useCallback((file) => {
|
|
143
146
|
if (!accept?.trim()) return true;
|
|
144
147
|
return accept.split(",").map((pattern) => pattern.trim()).filter(Boolean).some((pattern) => pattern.endsWith("/*") ? file.type.startsWith(pattern.slice(0, -1)) : file.type === pattern);
|
|
@@ -169,8 +172,9 @@ function PromptInput({ className, accept, multiple, globalDrop, syncHiddenInput,
|
|
|
169
172
|
});
|
|
170
173
|
if (!capped.length) return;
|
|
171
174
|
if (controller) controller.attachments.add(capped);
|
|
172
|
-
else
|
|
175
|
+
else addLocalFiles(capped);
|
|
173
176
|
}, [
|
|
177
|
+
addLocalFiles,
|
|
174
178
|
controller,
|
|
175
179
|
matchesAccept,
|
|
176
180
|
maxFileSize,
|
|
@@ -183,22 +187,15 @@ function PromptInput({ className, accept, multiple, globalDrop, syncHiddenInput,
|
|
|
183
187
|
controller.attachments.remove(attachmentId);
|
|
184
188
|
return;
|
|
185
189
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
if (found?.url) URL.revokeObjectURL(found.url);
|
|
189
|
-
return prev.filter((file) => file.id !== attachmentId);
|
|
190
|
-
});
|
|
191
|
-
}, [controller]);
|
|
190
|
+
removeLocalFile(attachmentId);
|
|
191
|
+
}, [controller, removeLocalFile]);
|
|
192
192
|
const clearAttachments = React.useCallback(() => {
|
|
193
193
|
if (controller) {
|
|
194
194
|
controller.attachments.clear();
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
return [];
|
|
200
|
-
});
|
|
201
|
-
}, [controller]);
|
|
197
|
+
clearLocalFiles();
|
|
198
|
+
}, [clearLocalFiles, controller]);
|
|
202
199
|
const openFileDialog = React.useCallback(() => inputRef.current?.click(), []);
|
|
203
200
|
React.useEffect(() => {
|
|
204
201
|
if (!controller) return;
|
|
@@ -904,67 +901,85 @@ function PromptInputSubmit({ className, status = "ready", onStop, variant = "nor
|
|
|
904
901
|
children: children ?? (isQueueing ? /* @__PURE__ */ jsx(ArrowUpIcon, {}) : defaultSubmitIcon(status))
|
|
905
902
|
});
|
|
906
903
|
}
|
|
907
|
-
const PromptInputSelect = Select;
|
|
908
904
|
const PromptInputHoverCardContext = React.createContext(null);
|
|
909
|
-
function
|
|
905
|
+
function preservePromptInputEventCancellation(handler, cancellation) {
|
|
910
906
|
return (event) => {
|
|
911
907
|
handler?.(event);
|
|
912
|
-
|
|
908
|
+
cancellation.current = event.defaultPrevented;
|
|
909
|
+
if (event.defaultPrevented) event.preventBaseUIHandler?.();
|
|
913
910
|
};
|
|
914
911
|
}
|
|
915
912
|
function PromptInputHoverCard({ openDelay = 0, closeDelay = 0, className, children, ref, ...props }) {
|
|
916
|
-
const
|
|
917
|
-
const
|
|
918
|
-
const
|
|
919
|
-
const openNow = React.useCallback(() => {
|
|
920
|
-
clearTimer();
|
|
921
|
-
timer.current = window.setTimeout(() => setOpen(true), openDelay);
|
|
922
|
-
}, [clearTimer, openDelay]);
|
|
923
|
-
const closeLater = React.useCallback(() => {
|
|
924
|
-
clearTimer();
|
|
925
|
-
timer.current = window.setTimeout(() => setOpen(false), closeDelay);
|
|
926
|
-
}, [clearTimer, closeDelay]);
|
|
927
|
-
React.useEffect(() => clearTimer, [clearTimer]);
|
|
913
|
+
const portalContainer = React.useRef(null);
|
|
914
|
+
const cancelNextOpen = React.useRef(false);
|
|
915
|
+
const cancelNextClose = React.useRef(false);
|
|
928
916
|
const value = React.useMemo(() => ({
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
openNow
|
|
936
|
-
]);
|
|
917
|
+
cancelNextClose,
|
|
918
|
+
cancelNextOpen,
|
|
919
|
+
closeDelay,
|
|
920
|
+
openDelay,
|
|
921
|
+
portalContainer
|
|
922
|
+
}), [closeDelay, openDelay]);
|
|
937
923
|
return /* @__PURE__ */ jsx(PromptInputHoverCardContext.Provider, {
|
|
938
924
|
value,
|
|
939
925
|
children: /* @__PURE__ */ jsx("div", {
|
|
940
|
-
ref,
|
|
926
|
+
ref: mergeRefs(ref, portalContainer),
|
|
941
927
|
className: cx("prompt-input__hover-card", className),
|
|
942
928
|
...props,
|
|
943
|
-
children
|
|
929
|
+
children: /* @__PURE__ */ jsx(PreviewCard.Root, {
|
|
930
|
+
onOpenChange: (open, eventDetails) => {
|
|
931
|
+
const isTriggerInteraction = eventDetails.reason === "trigger-focus" || eventDetails.reason === "trigger-hover";
|
|
932
|
+
const cancellation = open ? cancelNextOpen : cancelNextClose;
|
|
933
|
+
if (isTriggerInteraction && cancellation.current) {
|
|
934
|
+
cancellation.current = false;
|
|
935
|
+
eventDetails.cancel();
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
children
|
|
939
|
+
})
|
|
944
940
|
})
|
|
945
941
|
});
|
|
946
942
|
}
|
|
947
943
|
function PromptInputHoverCardTrigger({ className, ref, onFocus, onBlur, onMouseEnter, onMouseLeave, ...props }) {
|
|
948
944
|
const context = React.useContext(PromptInputHoverCardContext);
|
|
949
|
-
return /* @__PURE__ */ jsx("span", {
|
|
945
|
+
if (!context) return /* @__PURE__ */ jsx("span", {
|
|
950
946
|
ref,
|
|
951
947
|
className: cx("prompt-input__hover-card-trigger", className),
|
|
952
|
-
onFocus
|
|
953
|
-
onBlur
|
|
954
|
-
onMouseEnter
|
|
955
|
-
onMouseLeave
|
|
948
|
+
onFocus,
|
|
949
|
+
onBlur,
|
|
950
|
+
onMouseEnter,
|
|
951
|
+
onMouseLeave,
|
|
952
|
+
...props
|
|
953
|
+
});
|
|
954
|
+
return /* @__PURE__ */ jsx(PreviewCard.Trigger, {
|
|
955
|
+
render: /* @__PURE__ */ jsx("span", { ref }),
|
|
956
|
+
delay: context.openDelay,
|
|
957
|
+
closeDelay: context.closeDelay,
|
|
958
|
+
className: cx("prompt-input__hover-card-trigger", className),
|
|
959
|
+
onFocus: preservePromptInputEventCancellation(onFocus, context.cancelNextOpen),
|
|
960
|
+
onBlur: preservePromptInputEventCancellation(onBlur, context.cancelNextClose),
|
|
961
|
+
onMouseEnter: preservePromptInputEventCancellation(onMouseEnter, context.cancelNextOpen),
|
|
962
|
+
onMouseLeave: preservePromptInputEventCancellation(onMouseLeave, context.cancelNextClose),
|
|
956
963
|
...props
|
|
957
964
|
});
|
|
958
965
|
}
|
|
959
966
|
function PromptInputHoverCardContent({ className, ref, onMouseEnter, onMouseLeave, ...props }) {
|
|
960
967
|
const context = React.useContext(PromptInputHoverCardContext);
|
|
961
|
-
if (!context
|
|
962
|
-
return /* @__PURE__ */ jsx(
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
+
if (!context) return null;
|
|
969
|
+
return /* @__PURE__ */ jsx(PreviewCard.Portal, {
|
|
970
|
+
container: context.portalContainer,
|
|
971
|
+
children: /* @__PURE__ */ jsx(PreviewCard.Positioner, {
|
|
972
|
+
align: "start",
|
|
973
|
+
side: "bottom",
|
|
974
|
+
sideOffset: 6,
|
|
975
|
+
children: /* @__PURE__ */ jsx(PreviewCard.Popup, {
|
|
976
|
+
ref,
|
|
977
|
+
className: cx("prompt-input__hover-card-content", className),
|
|
978
|
+
onMouseEnter: preservePromptInputEventCancellation(onMouseEnter, context.cancelNextOpen),
|
|
979
|
+
onMouseLeave: preservePromptInputEventCancellation(onMouseLeave, context.cancelNextClose),
|
|
980
|
+
...props
|
|
981
|
+
})
|
|
982
|
+
})
|
|
968
983
|
});
|
|
969
984
|
}
|
|
970
985
|
const PromptInputTabsList = Tabs.List;
|
|
@@ -984,20 +999,6 @@ function PromptInputTabItem({ className, ref, ...props }) {
|
|
|
984
999
|
...props
|
|
985
1000
|
});
|
|
986
1001
|
}
|
|
987
|
-
const PromptInputCommand = Combobox;
|
|
988
|
-
const PromptInputCommandInput = Combobox.Input;
|
|
989
|
-
function PromptInputCommandList({ className, ref, ...props }) {
|
|
990
|
-
return /* @__PURE__ */ jsx(Combobox.List, {
|
|
991
|
-
ref,
|
|
992
|
-
className: mergeBaseClassName("prompt-input__command-list", className),
|
|
993
|
-
...props
|
|
994
|
-
});
|
|
995
|
-
}
|
|
996
|
-
const PromptInputCommandEmpty = Combobox.Empty;
|
|
997
|
-
const PromptInputCommandGroup = Combobox.Group;
|
|
998
|
-
const PromptInputCommandGroupLabel = Combobox.GroupLabel;
|
|
999
|
-
const PromptInputCommandItem = Combobox.Item;
|
|
1000
|
-
const PromptInputCommandSeparator = Combobox.Separator;
|
|
1001
1002
|
/**
|
|
1002
1003
|
* Controlled PromptInput textarea with slash-command discovery. The host owns
|
|
1003
1004
|
* both the command catalog and the draft policy applied after selection.
|
|
@@ -1007,7 +1008,7 @@ function PromptInputCommandComposer({ commands, mentionCommands, value, onValueC
|
|
|
1007
1008
|
const [dismissedValue, setDismissedValue] = React.useState(null);
|
|
1008
1009
|
React.useImperativeHandle(ref, () => inputRef.current, []);
|
|
1009
1010
|
const match = /^\s*([/@])([^\n]*)$/u.exec(value);
|
|
1010
|
-
const trigger = match?.[1];
|
|
1011
|
+
const trigger = match?.[1] === "/" || match?.[1] === "@" ? match[1] : void 0;
|
|
1011
1012
|
const sourceCommands = trigger === "@" ? mentionCommands ?? [] : commands;
|
|
1012
1013
|
const normalizedQuery = (match?.[2]?.trim() ?? "").toLocaleLowerCase();
|
|
1013
1014
|
const filtered = sourceCommands.filter((command) => {
|
|
@@ -1025,50 +1026,46 @@ function PromptInputCommandComposer({ commands, mentionCommands, value, onValueC
|
|
|
1025
1026
|
label,
|
|
1026
1027
|
items: filtered.filter((command) => (command.group ?? "") === label)
|
|
1027
1028
|
}));
|
|
1028
|
-
return /* @__PURE__ */ jsxs(
|
|
1029
|
+
return /* @__PURE__ */ jsxs(Autocomplete.Root, {
|
|
1029
1030
|
items: groups,
|
|
1030
1031
|
filteredItems: groups,
|
|
1031
1032
|
filter: null,
|
|
1032
|
-
value
|
|
1033
|
-
inputValue: value,
|
|
1033
|
+
value,
|
|
1034
1034
|
open,
|
|
1035
1035
|
autoHighlight: true,
|
|
1036
|
-
itemToStringLabel: (command) => command.label,
|
|
1037
1036
|
itemToStringValue: (command) => command.value,
|
|
1038
|
-
|
|
1037
|
+
onValueChange: (next, { reason }) => {
|
|
1039
1038
|
if (reason !== "input-change") return;
|
|
1040
1039
|
setDismissedValue(null);
|
|
1041
|
-
onValueChange(
|
|
1040
|
+
onValueChange(next);
|
|
1042
1041
|
},
|
|
1043
1042
|
onOpenChange: (nextOpen) => {
|
|
1044
1043
|
if (!nextOpen) setDismissedValue(value);
|
|
1045
1044
|
},
|
|
1046
|
-
|
|
1047
|
-
if (!command || Array.isArray(command) || reason !== "item-press") return;
|
|
1048
|
-
onCommandSelect(command, trigger ?? "/");
|
|
1049
|
-
},
|
|
1050
|
-
children: [/* @__PURE__ */ jsx(PromptInputCommandInput, { render: /* @__PURE__ */ jsx(PromptInputTextarea, {
|
|
1045
|
+
children: [/* @__PURE__ */ jsx(Autocomplete.Input, { render: /* @__PURE__ */ jsx(PromptInputTextarea, {
|
|
1051
1046
|
...textareaProps,
|
|
1052
1047
|
ref: inputRef,
|
|
1053
1048
|
value,
|
|
1054
1049
|
onKeyDown
|
|
1055
|
-
}) }), /* @__PURE__ */ jsx(
|
|
1050
|
+
}) }), /* @__PURE__ */ jsx(Autocomplete.Portal, { children: /* @__PURE__ */ jsx(Autocomplete.Positioner, {
|
|
1056
1051
|
anchor: () => inputRef.current?.closest(".prompt-input__body") ?? null,
|
|
1057
1052
|
side: "top",
|
|
1058
1053
|
sideOffset: 8,
|
|
1059
1054
|
align: "start",
|
|
1060
1055
|
className: "prompt-input__command-positioner",
|
|
1061
|
-
children: /* @__PURE__ */ jsxs(
|
|
1056
|
+
children: /* @__PURE__ */ jsxs(Autocomplete.Popup, {
|
|
1062
1057
|
className: "prompt-input__command-popup",
|
|
1063
1058
|
"data-recipe": "composer-command-surface",
|
|
1064
|
-
children: [/* @__PURE__ */ jsx(
|
|
1059
|
+
children: [/* @__PURE__ */ jsx(Autocomplete.List, {
|
|
1060
|
+
className: "prompt-input__command-list",
|
|
1065
1061
|
"data-command-trigger": trigger,
|
|
1066
|
-
children: (group) => /* @__PURE__ */ jsxs(
|
|
1062
|
+
children: (group) => /* @__PURE__ */ jsxs(Autocomplete.Group, {
|
|
1067
1063
|
items: group.items,
|
|
1068
|
-
children: [group.label ? /* @__PURE__ */ jsx(
|
|
1064
|
+
children: [group.label ? /* @__PURE__ */ jsx(Autocomplete.GroupLabel, { children: group.label }) : null, /* @__PURE__ */ jsx(Autocomplete.Collection, { children: (command) => /* @__PURE__ */ jsxs(Autocomplete.Item, {
|
|
1069
1065
|
value: command,
|
|
1070
1066
|
disabled: command.disabled,
|
|
1071
1067
|
className: "prompt-input__command-item",
|
|
1068
|
+
onClick: () => onCommandSelect(command, trigger ?? "/"),
|
|
1072
1069
|
children: [command.icon ? /* @__PURE__ */ jsx("span", {
|
|
1073
1070
|
className: "prompt-input__command-icon",
|
|
1074
1071
|
children: command.icon
|
|
@@ -1091,7 +1088,7 @@ function PromptInputCommandComposer({ commands, mentionCommands, value, onValueC
|
|
|
1091
1088
|
})]
|
|
1092
1089
|
}, command.id) })]
|
|
1093
1090
|
}, group.label || "ungrouped")
|
|
1094
|
-
}), /* @__PURE__ */ jsx(
|
|
1091
|
+
}), /* @__PURE__ */ jsx(Autocomplete.Empty, { children: trigger === "@" ? mentionEmptyMessage : emptyMessage })]
|
|
1095
1092
|
})
|
|
1096
1093
|
}) })]
|
|
1097
1094
|
});
|
|
@@ -1287,4 +1284,4 @@ function createId() {
|
|
|
1287
1284
|
return globalThis.crypto?.randomUUID?.() ?? `prompt-input-${Date.now()}-${Math.random()}`;
|
|
1288
1285
|
}
|
|
1289
1286
|
//#endregion
|
|
1290
|
-
export { PromptInput, PromptInputActionAddAttachments, PromptInputActionAddScreenshot, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputActionMenuTrigger, PromptInputAttachment, PromptInputAttachments, PromptInputBody, PromptInputButton,
|
|
1287
|
+
export { PromptInput, PromptInputActionAddAttachments, PromptInputActionAddScreenshot, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputActionMenuTrigger, PromptInputAttachment, PromptInputAttachments, PromptInputBody, PromptInputButton, PromptInputCommandComposer, PromptInputContextSelector, PromptInputDictation, PromptInputFooter, PromptInputHeader, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardTrigger, PromptInputPermissionSelector, PromptInputProvider, PromptInputReferences, PromptInputSubmit, PromptInputTab, PromptInputTabBody, PromptInputTabItem, PromptInputTabLabel, PromptInputTabsList, PromptInputTextarea, PromptInputTools, PromptInputTray, usePromptInputAttachments, usePromptInputController, useProviderAttachments };
|
|
@@ -102,7 +102,7 @@ function QueueList({ className, children, ref, ...props }) {
|
|
|
102
102
|
...props,
|
|
103
103
|
children: [/* @__PURE__ */ jsx(ScrollArea.Viewport, {
|
|
104
104
|
className: "queue__list-viewport",
|
|
105
|
-
children: /* @__PURE__ */ jsx(
|
|
105
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Content, {
|
|
106
106
|
className: "queue__list-scroll",
|
|
107
107
|
children: /* @__PURE__ */ jsx("ul", {
|
|
108
108
|
className: "queue__list-inner",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
2
|
+
import { ActivityProps } from "./Activity.js";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
|
|
4
5
|
//#region src/components/ai-sdk/Reasoning.d.ts
|
|
@@ -9,10 +10,10 @@ interface ReasoningContextValue {
|
|
|
9
10
|
duration?: number;
|
|
10
11
|
}
|
|
11
12
|
declare function useReasoning(): ReasoningContextValue;
|
|
12
|
-
interface ReasoningProps extends Omit<
|
|
13
|
+
interface ReasoningProps extends Omit<ActivityProps, "isStreaming" | "stateKey"> {
|
|
13
14
|
/**
|
|
14
15
|
* Whether the model is currently generating reasoning. When true the
|
|
15
|
-
* component
|
|
16
|
+
* component requests to open; a controlled consumer remains authoritative.
|
|
16
17
|
*/
|
|
17
18
|
isStreaming?: boolean;
|
|
18
19
|
/**
|
|
@@ -20,8 +21,6 @@ interface ReasoningProps extends Omit<React.ComponentProps<typeof Collapsible.Ro
|
|
|
20
21
|
* When omitted, the component measures the duration automatically.
|
|
21
22
|
*/
|
|
22
23
|
duration?: number;
|
|
23
|
-
/** Called when the open state changes. */
|
|
24
|
-
onOpenChange?: (open: boolean) => void;
|
|
25
24
|
}
|
|
26
25
|
/**
|
|
27
26
|
* A collapsible "thinking" block for showing model reasoning (e.g. DeepSeek
|
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { J as SpinnerIcon } from "../../icons-B1Qw05te.js";
|
|
3
|
-
import {
|
|
4
|
-
import { ActivityContent, ActivityText, ActivityTrigger } from "./Activity.js";
|
|
3
|
+
import { Activity, ActivityContent, ActivityText, ActivityTrigger } from "./Activity.js";
|
|
5
4
|
import { MessageResponse } from "./Message.js";
|
|
6
5
|
import * as React from "react";
|
|
7
6
|
import { jsx } from "react/jsx-runtime";
|
|
8
7
|
//#region src/components/ai-sdk/Reasoning.tsx
|
|
9
8
|
const ReasoningContext = React.createContext(null);
|
|
10
9
|
const MS_IN_S = 1e3;
|
|
10
|
+
function createProgrammaticOpenChangeDetails() {
|
|
11
|
+
let isCanceled = false;
|
|
12
|
+
let isPropagationAllowed = false;
|
|
13
|
+
return {
|
|
14
|
+
reason: "none",
|
|
15
|
+
event: new Event("base-ui"),
|
|
16
|
+
trigger: void 0,
|
|
17
|
+
cancel: () => {
|
|
18
|
+
isCanceled = true;
|
|
19
|
+
},
|
|
20
|
+
allowPropagation: () => {
|
|
21
|
+
isPropagationAllowed = true;
|
|
22
|
+
},
|
|
23
|
+
get isCanceled() {
|
|
24
|
+
return isCanceled;
|
|
25
|
+
},
|
|
26
|
+
get isPropagationAllowed() {
|
|
27
|
+
return isPropagationAllowed;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
11
31
|
function useReasoning() {
|
|
12
32
|
const ctx = React.useContext(ReasoningContext);
|
|
13
33
|
if (!ctx) throw new Error("Reasoning subcomponents must be used inside <Reasoning>.");
|
|
@@ -38,10 +58,10 @@ function Reasoning({ className, isStreaming = false, duration, open, defaultOpen
|
|
|
38
58
|
const currentOpen = isControlled ? open : internalOpen;
|
|
39
59
|
const preventAutoOpen = defaultOpen === false;
|
|
40
60
|
const resolvedDuration = duration ?? (isStreaming || startTimeRef.current !== null ? void 0 : internalDuration);
|
|
41
|
-
const setOpenState = React.useCallback((next) => {
|
|
61
|
+
const setOpenState = React.useCallback((next, eventDetails = createProgrammaticOpenChangeDetails()) => {
|
|
42
62
|
if (next === currentOpen) return;
|
|
43
|
-
|
|
44
|
-
|
|
63
|
+
onOpenChange?.(next, eventDetails);
|
|
64
|
+
if (!eventDetails.isCanceled && !isControlled) setInternalOpen(next);
|
|
45
65
|
}, [
|
|
46
66
|
currentOpen,
|
|
47
67
|
isControlled,
|
|
@@ -65,9 +85,6 @@ function Reasoning({ className, isStreaming = false, duration, open, defaultOpen
|
|
|
65
85
|
preventAutoOpen,
|
|
66
86
|
setOpenState
|
|
67
87
|
]);
|
|
68
|
-
const handleOpenChange = React.useCallback((next) => {
|
|
69
|
-
setOpenState(next);
|
|
70
|
-
}, [setOpenState]);
|
|
71
88
|
const ctx = React.useMemo(() => ({
|
|
72
89
|
isStreaming,
|
|
73
90
|
isOpen: currentOpen,
|
|
@@ -81,15 +98,14 @@ function Reasoning({ className, isStreaming = false, duration, open, defaultOpen
|
|
|
81
98
|
]);
|
|
82
99
|
return /* @__PURE__ */ jsx(ReasoningContext.Provider, {
|
|
83
100
|
value: ctx,
|
|
84
|
-
children: /* @__PURE__ */ jsx(
|
|
101
|
+
children: /* @__PURE__ */ jsx(Activity, {
|
|
85
102
|
ref,
|
|
86
103
|
"data-slot": "reasoning",
|
|
87
|
-
className: cx("
|
|
104
|
+
className: cx("reasoning", className),
|
|
105
|
+
isStreaming,
|
|
88
106
|
open: currentOpen,
|
|
89
|
-
onOpenChange:
|
|
90
|
-
"data-streaming": isStreaming ? "" : void 0,
|
|
107
|
+
onOpenChange: setOpenState,
|
|
91
108
|
...props,
|
|
92
|
-
unstyled: true,
|
|
93
109
|
children
|
|
94
110
|
})
|
|
95
111
|
});
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyToolUIPart } from "./ToolPart.js";
|
|
2
2
|
|
|
3
3
|
//#region src/components/ai-sdk/ToolInvocation.d.ts
|
|
4
|
-
/** One whole static or dynamic AI SDK tool UI part. */
|
|
5
|
-
type ToolInvocationPart = ToolUIPart | DynamicToolUIPart;
|
|
6
4
|
interface ToolInvocationProps {
|
|
7
5
|
/** The whole upstream AI SDK tool part, kept intact across every tool state. */
|
|
8
|
-
part:
|
|
6
|
+
part: AnyToolUIPart;
|
|
9
7
|
/** Render the existing Activity disclosure expanded initially. */
|
|
10
8
|
defaultOpen?: boolean;
|
|
11
9
|
/**
|
|
@@ -30,4 +28,4 @@ declare function ToolInvocation({
|
|
|
30
28
|
isStreaming
|
|
31
29
|
}: ToolInvocationProps): import("react").JSX.Element;
|
|
32
30
|
//#endregion
|
|
33
|
-
export { ToolInvocation,
|
|
31
|
+
export { ToolInvocation, ToolInvocationProps };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Activity, ActivityContent, ActivityPanel, ActivityTrigger } from "./Activity.js";
|
|
2
|
+
import { a as formatUnknownValue } from "../../format-DB2mX9DA.js";
|
|
2
3
|
import { getToolDisplayName, isToolPartFailed, isToolPartWorking } from "./ToolPart.js";
|
|
3
4
|
import { t as summarizeToolInput } from "../../summarize-tool-input-CqTcGRYy.js";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { getToolName } from "ai";
|
|
6
7
|
//#region src/components/ai-sdk/ToolInvocation.tsx
|
|
7
8
|
function formatToolValue(value) {
|
|
8
|
-
|
|
9
|
-
return typeof value === "string" ? value : JSON.stringify(value, null, 2);
|
|
9
|
+
return value === void 0 ? void 0 : formatUnknownValue(value, 2);
|
|
10
10
|
}
|
|
11
11
|
function describeToolPart(part) {
|
|
12
12
|
const name = getToolDisplayName(part);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { J as SpinnerIcon } from "../../icons-B1Qw05te.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import {
|
|
4
|
+
import { t as ProviderLogo } from "../../provider-logos-zjZycgV6.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/extension/ChatGptSignInScreen.tsx
|
|
@@ -47,7 +47,7 @@ function ChatGptSignInScreen({ busy = false, error = false, label = "Sign in wit
|
|
|
47
47
|
onPointerMove: handleSignInButtonPointerMove,
|
|
48
48
|
children: [/* @__PURE__ */ jsx("span", {
|
|
49
49
|
className: "chatgpt-sign-in__button-icon",
|
|
50
|
-
children: busy ? /* @__PURE__ */ jsx(SpinnerIcon, { size: 16 }) : /* @__PURE__ */ jsx(
|
|
50
|
+
children: busy ? /* @__PURE__ */ jsx(SpinnerIcon, { size: 16 }) : /* @__PURE__ */ jsx(ProviderLogo, {
|
|
51
51
|
provider: "openai",
|
|
52
52
|
className: "chatgpt-sign-in__logo"
|
|
53
53
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { W as RefreshIcon, d as CheckIcon, f as ChevronDownIcon, l as BrainIcon, m as ChevronRightIcon } from "../../icons-B1Qw05te.js";
|
|
3
3
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
4
|
-
import {
|
|
4
|
+
import { o as titleCase } from "../../format-DB2mX9DA.js";
|
|
5
5
|
import { Menu } from "../foundations/Menu.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tt as WarningIcon } from "../../icons-B1Qw05te.js";
|
|
2
2
|
import { Avatar } from "../foundations/Avatar.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { i as formatErrorMessage } from "../../format-
|
|
4
|
+
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
5
5
|
import { Menu } from "../foundations/Menu.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -43,14 +43,12 @@ declare function AccordionItem({
|
|
|
43
43
|
}: AccordionItemProps & {
|
|
44
44
|
ref?: React.Ref<HTMLDivElement>;
|
|
45
45
|
}): React.JSX.Element;
|
|
46
|
+
/** The semantic heading that owns an AccordionItem's trigger. */
|
|
46
47
|
declare function AccordionHeader({
|
|
47
48
|
className,
|
|
48
49
|
ref,
|
|
49
50
|
...props
|
|
50
51
|
}: AccordionHeaderProps): React.JSX.Element;
|
|
51
|
-
/**
|
|
52
|
-
* The header/trigger that toggles an AccordionItem.
|
|
53
|
-
*/
|
|
54
52
|
/**
|
|
55
53
|
* The clickable trigger button within an AccordionItem.
|
|
56
54
|
*/
|
|
@@ -43,6 +43,7 @@ function AccordionItem({ className, ref, ...props }) {
|
|
|
43
43
|
...props
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
+
/** The semantic heading that owns an AccordionItem's trigger. */
|
|
46
47
|
function AccordionHeader({ className, ref, ...props }) {
|
|
47
48
|
const classes = mergeBaseClassName("accordion__header", className);
|
|
48
49
|
return /* @__PURE__ */ jsx(Accordion$1.Header, {
|
|
@@ -53,9 +54,6 @@ function AccordionHeader({ className, ref, ...props }) {
|
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
56
|
/**
|
|
56
|
-
* The header/trigger that toggles an AccordionItem.
|
|
57
|
-
*/
|
|
58
|
-
/**
|
|
59
57
|
* The clickable trigger button within an AccordionItem.
|
|
60
58
|
*/
|
|
61
59
|
function AccordionTrigger({ className, ref, ...props }) {
|