@mcp-b/react-components 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AgentChat-CRmsKg9B.d.ts → AgentChat-Cgb1xuT7.d.ts} +36 -5
- package/dist/{Button-Ct5I6aTu.d.ts → Button-FX_hpqxm.d.ts} +8 -11
- package/dist/{CodeBlock-XNQOupQ3.js → CodeBlock-BUFXG8HW.js} +22 -12
- package/dist/{CodeBlock-CxQXv3C4.d.ts → CodeBlock-DUh9WOGo.d.ts} +13 -7
- package/dist/{Combobox-D9anamNr.d.ts → Combobox-B9Fcd6q-.d.ts} +4 -14
- package/dist/{FileTree-wMyZhhHO.js → FileTree-mpEIcfzA.js} +1 -1
- package/dist/{Menu-BLhnNnRK.d.ts → Menu-Bgu-ufb5.d.ts} +26 -65
- package/dist/{ModelSelector-BB-xB-Es.js → ModelSelector-DVgVBdvw.js} +7 -7
- package/dist/{PromptInput-IyM6ZETj.d.ts → PromptInput-ClNqBiIw.d.ts} +313 -46
- package/dist/Select-Dl_vF_Bt.d.ts +213 -0
- package/dist/{Tabs-D9EAq09D.d.ts → Tabs-3Zc4tb9D.d.ts} +9 -6
- package/dist/{ThinkChat-B3wYahor.js → ThinkChat-7DQ2CogF.js} +34 -2
- package/dist/{ThinkChatActivity-F4KFPcJA.d.ts → ThinkChatActivity-m9orbdeI.d.ts} +1 -1
- package/dist/{attachment-preview-ChtC3HiU.js → attachment-preview-DIs50Q0h.js} +3 -3
- package/dist/components/Accordion.d.ts +17 -6
- package/dist/components/Accordion.js +23 -36
- package/dist/components/Activity.d.ts +5 -5
- package/dist/components/Activity.js +9 -9
- package/dist/components/AgentChat.d.ts +1 -1
- package/dist/components/AgentChat.js +309 -116
- package/dist/components/AgentConnection.js +2 -2
- package/dist/components/AlertDialog.d.ts +40 -32
- package/dist/components/AlertDialog.js +46 -39
- package/dist/components/Artifact.d.ts +1 -1
- package/dist/components/Artifact.js +5 -5
- package/dist/components/Autocomplete.js +10 -2
- package/dist/components/Avatar.d.ts +2 -2
- package/dist/components/Avatar.js +3 -3
- package/dist/components/Badge.d.ts +11 -14
- package/dist/components/Badge.js +10 -18
- package/dist/components/BrowserLiveView.js +26 -36
- package/dist/components/BrowserReplay.js +4 -4
- package/dist/components/BrowserRunPanel.js +1 -1
- package/dist/components/Button.d.ts +2 -2
- package/dist/components/Button.js +7 -30
- package/dist/components/ChainOfThought.d.ts +5 -5
- package/dist/components/ChainOfThought.js +8 -5
- package/dist/components/ChatGptSignInScreen.js +3 -3
- package/dist/components/Checkbox.d.ts +10 -2
- package/dist/components/Checkbox.js +13 -6
- package/dist/components/CheckboxGroup.d.ts +6 -6
- package/dist/components/CheckboxGroup.js +6 -6
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.d.ts +23 -28
- package/dist/components/CodexModelSelector.js +116 -94
- package/dist/components/Collapsible.d.ts +2 -4
- package/dist/components/Collapsible.js +9 -7
- package/dist/components/Combobox.d.ts +2 -2
- package/dist/components/Combobox.js +20 -22
- package/dist/components/Commit.d.ts +5 -5
- package/dist/components/Commit.js +6 -6
- package/dist/components/Context.js +5 -1
- package/dist/components/ContextMenu.d.ts +20 -72
- package/dist/components/ContextMenu.js +46 -56
- package/dist/components/Conversation.d.ts +1 -1
- package/dist/components/Conversation.js +1 -1
- package/dist/components/Dialog.d.ts +38 -30
- package/dist/components/Dialog.js +46 -34
- package/dist/components/EnvironmentVariables.d.ts +1 -1
- package/dist/components/EnvironmentVariables.js +5 -5
- package/dist/components/Field.d.ts +3 -3
- package/dist/components/Field.js +7 -8
- package/dist/components/Fieldset.d.ts +2 -2
- package/dist/components/Fieldset.js +2 -2
- package/dist/components/FileTree.js +1 -1
- package/dist/components/Label.d.ts +1 -1
- package/dist/components/Label.js +1 -1
- package/dist/components/McpServerPicker.js +21 -19
- package/dist/components/Menu.d.ts +2 -2
- package/dist/components/Menu.js +39 -49
- package/dist/components/Menubar.d.ts +16 -52
- package/dist/components/Menubar.js +44 -56
- package/dist/components/Message.d.ts +1 -1
- package/dist/components/Message.js +6 -6
- package/dist/components/MessageScroller.d.ts +1 -1
- package/dist/components/MessageScroller.js +1 -1
- package/dist/components/Meter.js +5 -0
- package/dist/components/ModelSelector.d.ts +1 -1
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/NavigationMenu.d.ts +3 -14
- package/dist/components/NavigationMenu.js +22 -38
- package/dist/components/NumberField.js +6 -0
- package/dist/components/Popover.d.ts +21 -44
- package/dist/components/Popover.js +33 -23
- package/dist/components/PreviewCard.d.ts +20 -18
- package/dist/components/PreviewCard.js +30 -20
- package/dist/components/PricingPage.js +30 -29
- package/dist/components/Progress.d.ts +7 -3
- package/dist/components/Progress.js +9 -4
- package/dist/components/PromptInput.d.ts +2 -2
- package/dist/components/PromptInput.js +306 -54
- package/dist/components/Queue.d.ts +7 -7
- package/dist/components/Queue.js +6 -6
- package/dist/components/RadioGroup.d.ts +10 -9
- package/dist/components/RadioGroup.js +8 -9
- package/dist/components/Reasoning.d.ts +4 -4
- package/dist/components/Reasoning.js +10 -6
- package/dist/components/ScrollArea.d.ts +2 -9
- package/dist/components/ScrollArea.js +5 -23
- package/dist/components/Select.d.ts +2 -2
- package/dist/components/Select.js +100 -134
- package/dist/components/Slider.d.ts +10 -7
- package/dist/components/Slider.js +12 -11
- package/dist/components/Sources.d.ts +4 -4
- package/dist/components/Sources.js +8 -5
- package/dist/components/Stepper.js +1 -1
- package/dist/components/Switch.d.ts +6 -3
- package/dist/components/Switch.js +7 -4
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tabs.js +9 -4
- package/dist/components/Task.d.ts +4 -4
- package/dist/components/Task.js +10 -6
- package/dist/components/Terminal.d.ts +2 -2
- package/dist/components/Terminal.js +5 -5
- package/dist/components/TestResults.d.ts +4 -4
- package/dist/components/TestResults.js +5 -5
- package/dist/components/ThinkChat.d.ts +14 -2
- package/dist/components/ThinkChat.js +1 -1
- package/dist/components/ThinkChatActivity.d.ts +1 -1
- package/dist/components/ThinkChatActivity.js +1 -1
- package/dist/components/ThinkChatToolPanels.js +8 -8
- package/dist/components/ThinkExecutionWorkbench.js +28 -28
- package/dist/components/ThinkFullApp.js +8 -8
- package/dist/components/ThinkThreadPicker.js +1 -1
- package/dist/components/ThinkThreadShell.js +5 -5
- package/dist/components/Toast.js +7 -0
- package/dist/components/ToggleGroup.d.ts +6 -2
- package/dist/components/ToggleGroup.js +6 -2
- package/dist/components/Toolbar.js +6 -0
- package/dist/components/Tooltip.d.ts +36 -27
- package/dist/components/Tooltip.js +45 -29
- package/dist/components/WebPreview.d.ts +1 -1
- package/dist/components/WebPreview.js +3 -3
- package/dist/components/WorkspaceExplorer.d.ts +6 -8
- package/dist/components/WorkspaceExplorer.js +6 -6
- package/dist/components/icons.d.ts +2 -2
- package/dist/components/icons.js +2 -2
- package/dist/{copy-button-C6JSKtFE.js → copy-button-DUMLYdsk.js} +7 -6
- package/dist/{copy-button-BKXqGiNm.d.ts → copy-button-DtPMgN7e.d.ts} +3 -2
- package/dist/icons-Ba9THQKz.js +64 -0
- package/dist/icons-CUCz_Sft.d.ts +210 -0
- package/dist/styles/accessibility.css +14 -0
- package/dist/styles/accordion.css +21 -61
- package/dist/styles/activity.css +23 -58
- package/dist/styles/agent-chat.css +45 -4
- package/dist/styles/agent-connection.css +8 -10
- package/dist/styles/alert-dialog.css +20 -26
- package/dist/styles/artifact.css +6 -6
- package/dist/styles/attachment-preview.css +1 -1
- package/dist/styles/autocomplete.css +5 -170
- package/dist/styles/avatar.css +8 -8
- package/dist/styles/badge.css +8 -10
- package/dist/styles/base-ui-motion.css +176 -0
- package/dist/styles/base.css +19 -25
- package/dist/styles/browser-live-view.css +7 -7
- package/dist/styles/browser-replay.css +5 -5
- package/dist/styles/browser-run-panel.css +5 -5
- package/dist/styles/button.css +48 -43
- package/dist/styles/card.css +3 -5
- package/dist/styles/chain-of-thought.css +14 -70
- package/dist/styles/chatgpt-sign-in-screen.css +3 -3
- package/dist/styles/checkbox-group.css +1 -1
- package/dist/styles/checkbox.css +3 -7
- package/dist/styles/code-block.css +10 -10
- package/dist/styles/codex-model-selector.css +33 -44
- package/dist/styles/collapsible.css +11 -27
- package/dist/styles/combobox.css +3 -149
- package/dist/styles/commit.css +19 -35
- package/dist/styles/context-menu.css +1 -77
- package/dist/styles/context.css +12 -12
- package/dist/styles/conversation.css +7 -7
- package/dist/styles/dialog.css +34 -55
- package/dist/styles/environment-variables.css +10 -10
- package/dist/styles/field.css +16 -58
- package/dist/styles/fieldset.css +2 -2
- package/dist/styles/file-tree.css +7 -9
- package/dist/styles/index.css +8 -1
- package/dist/styles/input.css +1 -51
- package/dist/styles/label.css +2 -2
- package/dist/styles/marker.css +2 -4
- package/dist/styles/mcp-server-picker.css +5 -5
- package/dist/styles/menu.css +6 -153
- package/dist/styles/menubar.css +6 -105
- package/dist/styles/message-scroller.css +1 -1
- package/dist/styles/message.css +86 -8
- package/dist/styles/meter.css +4 -20
- package/dist/styles/model-selector.css +13 -13
- package/dist/styles/navigation-menu.css +14 -54
- package/dist/styles/number-field.css +8 -23
- package/dist/styles/popover.css +13 -68
- package/dist/styles/preview-card.css +5 -46
- package/dist/styles/pricing-page.css +43 -43
- package/dist/styles/progress.css +7 -16
- package/dist/styles/prompt-input.css +185 -44
- package/dist/styles/queue.css +12 -28
- package/dist/styles/radio.css +4 -8
- package/dist/styles/reasoning.css +3 -62
- package/dist/styles/recipes.css +475 -0
- package/dist/styles/select.css +7 -103
- package/dist/styles/shell.css +3 -3
- package/dist/styles/slider.css +5 -7
- package/dist/styles/sources.css +9 -66
- package/dist/styles/stepper.css +16 -14
- package/dist/styles/streamdown.css +9 -9
- package/dist/styles/switch.css +4 -7
- package/dist/styles/tabs.css +7 -8
- package/dist/styles/task.css +13 -42
- package/dist/styles/terminal.css +7 -7
- package/dist/styles/test-results.css +21 -37
- package/dist/styles/think-execution-workbench.css +23 -23
- package/dist/styles/think-full-app.css +12 -20
- package/dist/styles/think-resize-handle.css +2 -2
- package/dist/styles/think-thread-picker.css +19 -10
- package/dist/styles/think-thread-shell.css +7 -7
- package/dist/styles/toast.css +14 -25
- package/dist/styles/toggle-group.css +16 -14
- package/dist/styles/toggle.css +14 -15
- package/dist/styles/toolbar.css +13 -25
- package/dist/styles/tooltip.css +6 -16
- package/dist/styles/web-preview.css +15 -15
- package/dist/styles/workspace-explorer.css +14 -13
- package/dist/utils/codex-model-catalog.d.ts +142 -0
- package/dist/utils/codex-model-catalog.js +112 -0
- package/dist/utils/structured-code.d.ts +1 -1
- package/package.json +8 -2
- package/dist/Select-CRsKCJ9x.d.ts +0 -200
- package/dist/icons-CbjtbIJK.d.ts +0 -51
- package/dist/icons-D2Q5n5C1.js +0 -291
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Button } from "./components/Button.js";
|
|
1
2
|
import { AgentChat } from "./components/AgentChat.js";
|
|
2
3
|
import { ThinkChatContext, useThinkChatContext } from "./components/ThinkChatContext.js";
|
|
3
4
|
import { ThinkChatActivity, createThinkChatActivityRenderer, renderThinkChatActivityPart } from "./components/ThinkChatActivity.js";
|
|
@@ -139,9 +140,40 @@ function ThinkChatMessages({ renderPart, excludeTools, toolRenderers, thinkStub,
|
|
|
139
140
|
excludeTools,
|
|
140
141
|
toolRenderers
|
|
141
142
|
}), [excludeTools, toolRenderers]);
|
|
142
|
-
const
|
|
143
|
+
const retryMessageId = chat.error ? chat.messages.findLast((message) => message.role !== "system")?.id : void 0;
|
|
144
|
+
const defaultNotice = chat.isRecovering ? /* @__PURE__ */ jsx(Fragment, { children: "Reconnecting to the agent…" }) : chat.connectionError ? /* @__PURE__ */ jsxs("span", {
|
|
143
145
|
"data-tone": "danger",
|
|
144
146
|
children: ["Connection lost", chat.connectionError.reason ? ` — ${chat.connectionError.reason}` : ""]
|
|
147
|
+
}) : chat.error ? /* @__PURE__ */ jsxs("div", {
|
|
148
|
+
className: "agent-chat__turn-error",
|
|
149
|
+
"data-tone": "danger",
|
|
150
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
151
|
+
className: "agent-chat__turn-error-message",
|
|
152
|
+
children: [
|
|
153
|
+
/* @__PURE__ */ jsx("strong", { children: "Response failed." }),
|
|
154
|
+
" ",
|
|
155
|
+
chat.error.message.trim() || "The response could not be completed."
|
|
156
|
+
]
|
|
157
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
158
|
+
className: "agent-chat__turn-error-actions",
|
|
159
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
160
|
+
type: "button",
|
|
161
|
+
variant: "ghost",
|
|
162
|
+
color: "neutral",
|
|
163
|
+
size: "lg",
|
|
164
|
+
onClick: chat.clearError,
|
|
165
|
+
children: "Dismiss"
|
|
166
|
+
}), retryMessageId ? /* @__PURE__ */ jsx(Button, {
|
|
167
|
+
type: "button",
|
|
168
|
+
color: "primary",
|
|
169
|
+
size: "lg",
|
|
170
|
+
onClick: () => {
|
|
171
|
+
chat.clearError();
|
|
172
|
+
chat.regenerate({ messageId: retryMessageId });
|
|
173
|
+
},
|
|
174
|
+
children: "Try again"
|
|
175
|
+
}) : null]
|
|
176
|
+
})]
|
|
145
177
|
}) : void 0;
|
|
146
178
|
return /* @__PURE__ */ jsx(AgentChat, {
|
|
147
179
|
...props,
|
|
@@ -153,7 +185,7 @@ function ThinkChatMessages({ renderPart, excludeTools, toolRenderers, thinkStub,
|
|
|
153
185
|
thinkStub: resolvedApprovals.thinkStub,
|
|
154
186
|
onExecutionSettled: resolvedApprovals.onExecutionSettled,
|
|
155
187
|
pendingApprovals: resolvedApprovals.pendingApprovals,
|
|
156
|
-
notice: notice ??
|
|
188
|
+
notice: notice ?? defaultNotice,
|
|
157
189
|
onRegenerate: (messageId) => void chat.regenerate({ messageId }),
|
|
158
190
|
onSubmit: ({ text, files }) => {
|
|
159
191
|
const trimmed = text.trim();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AgentChatRenderPartContext, r as AgentChatProps } from "./AgentChat-
|
|
1
|
+
import { a as AgentChatRenderPartContext, r as AgentChatProps } from "./AgentChat-Cgb1xuT7.js";
|
|
2
2
|
import { s as ThinkChatPart } from "./ThinkChatToolParts-Cv4o7j6F.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { DynamicToolUIPart, ToolUIPart, UIMessage } from "ai";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dialog
|
|
1
|
+
import { Dialog } from "./components/Dialog.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/_internal/attachment-preview.tsx
|
|
@@ -8,7 +8,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
* the composer chips and message-side attachments.
|
|
9
9
|
*/
|
|
10
10
|
function AttachmentPreview({ url, filename, children }) {
|
|
11
|
-
return /* @__PURE__ */ jsxs(Dialog, { children: [/* @__PURE__ */ jsx(
|
|
11
|
+
return /* @__PURE__ */ jsxs(Dialog.Root, { children: [/* @__PURE__ */ jsx(Dialog.Trigger, { render: children }), /* @__PURE__ */ jsxs(Dialog.Portal, { children: [/* @__PURE__ */ jsx(Dialog.Backdrop, {}), /* @__PURE__ */ jsx(Dialog.Viewport, { children: /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
12
12
|
className: "attachment-preview",
|
|
13
13
|
"aria-label": filename ?? "Attachment preview",
|
|
14
14
|
children: [/* @__PURE__ */ jsx("img", {
|
|
@@ -19,7 +19,7 @@ function AttachmentPreview({ url, filename, children }) {
|
|
|
19
19
|
className: "attachment-preview__name",
|
|
20
20
|
children: filename
|
|
21
21
|
}) : null]
|
|
22
|
-
})] });
|
|
22
|
+
}) })] })] });
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
25
|
export { AttachmentPreview as t };
|
|
@@ -11,10 +11,12 @@ interface AccordionItemProps extends Omit<React.ComponentPropsWithRef<typeof Acc
|
|
|
11
11
|
interface AccordionTriggerProps extends Omit<React.ComponentPropsWithRef<typeof Accordion$1.Trigger>, "className"> {
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
+
interface AccordionHeaderProps extends Omit<Accordion$1.Header.Props, "className"> {
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
14
17
|
interface AccordionPanelProps extends Omit<React.ComponentPropsWithRef<typeof Accordion$1.Panel>, "className"> {
|
|
15
18
|
className?: string;
|
|
16
19
|
}
|
|
17
|
-
type AccordionContentProps = AccordionPanelProps;
|
|
18
20
|
/**
|
|
19
21
|
* An accordion component for showing collapsible content sections.
|
|
20
22
|
*
|
|
@@ -34,7 +36,7 @@ type AccordionContentProps = AccordionPanelProps;
|
|
|
34
36
|
*
|
|
35
37
|
* @see {@link https://base-ui.com/react/components/accordion | Base UI Accordion}
|
|
36
38
|
*/
|
|
37
|
-
declare function
|
|
39
|
+
declare function AccordionRoot({
|
|
38
40
|
className,
|
|
39
41
|
ref,
|
|
40
42
|
...props
|
|
@@ -51,16 +53,19 @@ declare function AccordionItem({
|
|
|
51
53
|
}: AccordionItemProps & {
|
|
52
54
|
ref?: React.Ref<HTMLDivElement>;
|
|
53
55
|
}): React.JSX.Element;
|
|
56
|
+
declare function AccordionHeader({
|
|
57
|
+
className,
|
|
58
|
+
ref,
|
|
59
|
+
...props
|
|
60
|
+
}: AccordionHeaderProps): React.JSX.Element;
|
|
54
61
|
/**
|
|
55
62
|
* The header/trigger that toggles an AccordionItem.
|
|
56
63
|
*/
|
|
57
|
-
declare const AccordionHeader: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AccordionHeaderProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
58
64
|
/**
|
|
59
65
|
* The clickable trigger button within an AccordionItem.
|
|
60
66
|
*/
|
|
61
67
|
declare function AccordionTrigger({
|
|
62
68
|
className,
|
|
63
|
-
children,
|
|
64
69
|
ref,
|
|
65
70
|
...props
|
|
66
71
|
}: AccordionTriggerProps & {
|
|
@@ -76,6 +81,12 @@ declare function AccordionPanel({
|
|
|
76
81
|
}: AccordionPanelProps & {
|
|
77
82
|
ref?: React.Ref<HTMLDivElement>;
|
|
78
83
|
}): React.JSX.Element;
|
|
79
|
-
declare const
|
|
84
|
+
declare const Accordion: {
|
|
85
|
+
Root: typeof AccordionRoot;
|
|
86
|
+
Item: typeof AccordionItem;
|
|
87
|
+
Header: typeof AccordionHeader;
|
|
88
|
+
Trigger: typeof AccordionTrigger;
|
|
89
|
+
Panel: typeof AccordionPanel;
|
|
90
|
+
};
|
|
80
91
|
//#endregion
|
|
81
|
-
export { Accordion,
|
|
92
|
+
export { Accordion, AccordionHeaderProps, AccordionItemProps, AccordionPanelProps, AccordionProps, AccordionTriggerProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
3
|
-
import { jsx
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Accordion.tsx
|
|
5
5
|
/**
|
|
6
6
|
* An accordion component for showing collapsible content sections.
|
|
@@ -21,7 +21,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
21
21
|
*
|
|
22
22
|
* @see {@link https://base-ui.com/react/components/accordion | Base UI Accordion}
|
|
23
23
|
*/
|
|
24
|
-
function
|
|
24
|
+
function AccordionRoot({ className = "", ref, ...props }) {
|
|
25
25
|
const classes = ["accordion", className].filter(Boolean).join(" ");
|
|
26
26
|
return /* @__PURE__ */ jsx(Accordion$1.Root, {
|
|
27
27
|
ref,
|
|
@@ -40,45 +40,26 @@ function AccordionItem({ className = "", ref, ...props }) {
|
|
|
40
40
|
...props
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
+
function AccordionHeader({ className = "", ref, ...props }) {
|
|
44
|
+
const classes = ["accordion__header", className].filter(Boolean).join(" ");
|
|
45
|
+
return /* @__PURE__ */ jsx(Accordion$1.Header, {
|
|
46
|
+
ref,
|
|
47
|
+
className: classes,
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
43
51
|
/**
|
|
44
52
|
* The header/trigger that toggles an AccordionItem.
|
|
45
53
|
*/
|
|
46
|
-
const AccordionHeader = Accordion$1.Header;
|
|
47
54
|
/**
|
|
48
55
|
* The clickable trigger button within an AccordionItem.
|
|
49
56
|
*/
|
|
50
|
-
function AccordionTrigger({ className = "",
|
|
57
|
+
function AccordionTrigger({ className = "", ref, ...props }) {
|
|
51
58
|
const classes = ["accordion__trigger", className].filter(Boolean).join(" ");
|
|
52
|
-
return /* @__PURE__ */ jsx(Accordion$1.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
className: classes,
|
|
57
|
-
...props,
|
|
58
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
59
|
-
className: "accordion__trigger-text",
|
|
60
|
-
children
|
|
61
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
62
|
-
className: "accordion__icon",
|
|
63
|
-
"aria-hidden": "true",
|
|
64
|
-
children: /* @__PURE__ */ jsx("svg", {
|
|
65
|
-
width: "12",
|
|
66
|
-
height: "12",
|
|
67
|
-
viewBox: "0 0 12 12",
|
|
68
|
-
fill: "none",
|
|
69
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
70
|
-
"aria-hidden": "true",
|
|
71
|
-
focusable: "false",
|
|
72
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
73
|
-
d: "M2.5 4.5L6 8L9.5 4.5",
|
|
74
|
-
stroke: "currentColor",
|
|
75
|
-
strokeWidth: "1.5",
|
|
76
|
-
strokeLinecap: "round",
|
|
77
|
-
strokeLinejoin: "round"
|
|
78
|
-
})
|
|
79
|
-
})
|
|
80
|
-
})]
|
|
81
|
-
})
|
|
59
|
+
return /* @__PURE__ */ jsx(Accordion$1.Trigger, {
|
|
60
|
+
ref,
|
|
61
|
+
className: classes,
|
|
62
|
+
...props
|
|
82
63
|
});
|
|
83
64
|
}
|
|
84
65
|
/**
|
|
@@ -92,6 +73,12 @@ function AccordionPanel({ className = "", ref, ...props }) {
|
|
|
92
73
|
...props
|
|
93
74
|
});
|
|
94
75
|
}
|
|
95
|
-
const
|
|
76
|
+
const Accordion = {
|
|
77
|
+
Root: AccordionRoot,
|
|
78
|
+
Item: AccordionItem,
|
|
79
|
+
Header: AccordionHeader,
|
|
80
|
+
Trigger: AccordionTrigger,
|
|
81
|
+
Panel: AccordionPanel
|
|
82
|
+
};
|
|
96
83
|
//#endregion
|
|
97
|
-
export { Accordion
|
|
84
|
+
export { Accordion };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collapsible } from "./Collapsible.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Activity.d.ts
|
|
5
|
-
interface ActivityProps extends Omit<
|
|
5
|
+
interface ActivityProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
|
|
6
6
|
className?: string;
|
|
7
7
|
/** While true, the trigger label shimmers. */
|
|
8
8
|
isStreaming?: boolean;
|
|
@@ -36,7 +36,7 @@ declare function Activity({
|
|
|
36
36
|
}: ActivityProps & {
|
|
37
37
|
ref?: React.Ref<HTMLDivElement>;
|
|
38
38
|
}): React.JSX.Element;
|
|
39
|
-
interface ActivityTriggerProps extends Omit<
|
|
39
|
+
interface ActivityTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
|
|
40
40
|
className?: string;
|
|
41
41
|
/** Header text. Defaults to "Working…". */
|
|
42
42
|
label?: React.ReactNode;
|
|
@@ -57,7 +57,7 @@ declare function ActivityTrigger({
|
|
|
57
57
|
}: ActivityTriggerProps & {
|
|
58
58
|
ref?: React.Ref<HTMLButtonElement>;
|
|
59
59
|
}): React.JSX.Element;
|
|
60
|
-
interface ActivityContentProps extends Omit<
|
|
60
|
+
interface ActivityContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
|
|
61
61
|
className?: string;
|
|
62
62
|
}
|
|
63
63
|
/** The collapsible log of ActivityItem children. */
|
|
@@ -69,7 +69,7 @@ declare function ActivityContent({
|
|
|
69
69
|
}: ActivityContentProps & {
|
|
70
70
|
ref?: React.Ref<HTMLDivElement>;
|
|
71
71
|
}): React.JSX.Element;
|
|
72
|
-
interface ActivityItemGroupProps extends Omit<
|
|
72
|
+
interface ActivityItemGroupProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
|
|
73
73
|
className?: string;
|
|
74
74
|
/** The row text, e.g. "Ran bash · vp test". */
|
|
75
75
|
label: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collapsible } from "./Collapsible.js";
|
|
2
2
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
3
|
-
import { c as ChevronRightIcon } from "../icons-
|
|
3
|
+
import { c as ChevronRightIcon } from "../icons-Ba9THQKz.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/Activity.tsx
|
|
@@ -25,7 +25,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
function Activity({ className, isStreaming = false, defaultOpen = false, ref, ...props }) {
|
|
28
|
-
return /* @__PURE__ */ jsx(
|
|
28
|
+
return /* @__PURE__ */ jsx(Collapsible.Root, {
|
|
29
29
|
ref,
|
|
30
30
|
className: cx("activity", className),
|
|
31
31
|
defaultOpen,
|
|
@@ -39,14 +39,14 @@ function Activity({ className, isStreaming = false, defaultOpen = false, ref, ..
|
|
|
39
39
|
* while the parent Activity is streaming.
|
|
40
40
|
*/
|
|
41
41
|
function ActivityTrigger({ className, label = "Working…", icon, children, ref, ...props }) {
|
|
42
|
-
if (children !== void 0 && children !== null) return /* @__PURE__ */ jsx(
|
|
42
|
+
if (children !== void 0 && children !== null) return /* @__PURE__ */ jsx(Collapsible.Trigger, {
|
|
43
43
|
ref,
|
|
44
44
|
className: cx("activity__trigger", className),
|
|
45
45
|
...props,
|
|
46
46
|
unstyled: true,
|
|
47
47
|
children
|
|
48
48
|
});
|
|
49
|
-
return /* @__PURE__ */ jsxs(
|
|
49
|
+
return /* @__PURE__ */ jsxs(Collapsible.Trigger, {
|
|
50
50
|
ref,
|
|
51
51
|
className: cx("activity__trigger", className),
|
|
52
52
|
...props,
|
|
@@ -71,7 +71,7 @@ function ActivityTrigger({ className, label = "Working…", icon, children, ref,
|
|
|
71
71
|
}
|
|
72
72
|
/** The collapsible log of ActivityItem children. */
|
|
73
73
|
function ActivityContent({ className, children, ref, ...props }) {
|
|
74
|
-
return /* @__PURE__ */ jsx(
|
|
74
|
+
return /* @__PURE__ */ jsx(Collapsible.Panel, {
|
|
75
75
|
ref,
|
|
76
76
|
className: cx("activity__content", className),
|
|
77
77
|
...props,
|
|
@@ -88,12 +88,12 @@ function ActivityContent({ className, children, ref, ...props }) {
|
|
|
88
88
|
* a thought trace) flush inside the outer Activity log.
|
|
89
89
|
*/
|
|
90
90
|
function ActivityItemGroup({ className, label, icon, children, ref, ...props }) {
|
|
91
|
-
return /* @__PURE__ */ jsxs(
|
|
91
|
+
return /* @__PURE__ */ jsxs(Collapsible.Root, {
|
|
92
92
|
ref,
|
|
93
93
|
className: cx("activity__group", className),
|
|
94
94
|
...props,
|
|
95
95
|
unstyled: true,
|
|
96
|
-
children: [/* @__PURE__ */ jsxs(
|
|
96
|
+
children: [/* @__PURE__ */ jsxs(Collapsible.Trigger, {
|
|
97
97
|
className: "activity__group-trigger",
|
|
98
98
|
unstyled: true,
|
|
99
99
|
children: [
|
|
@@ -112,7 +112,7 @@ function ActivityItemGroup({ className, label, icon, children, ref, ...props })
|
|
|
112
112
|
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
113
113
|
})
|
|
114
114
|
]
|
|
115
|
-
}), /* @__PURE__ */ jsx(
|
|
115
|
+
}), /* @__PURE__ */ jsx(Collapsible.Panel, {
|
|
116
116
|
className: "activity__group-panel",
|
|
117
117
|
unstyled: true,
|
|
118
118
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as AgentChatRenderPartContext, i as AgentChatRenderMessageContext, n as AgentChatPart, r as AgentChatProps, t as AgentChat } from "../AgentChat-
|
|
1
|
+
import { a as AgentChatRenderPartContext, i as AgentChatRenderMessageContext, n as AgentChatPart, r as AgentChatProps, t as AgentChat } from "../AgentChat-Cgb1xuT7.js";
|
|
2
2
|
export { AgentChat, AgentChatPart, AgentChatProps, AgentChatRenderMessageContext, AgentChatRenderPartContext };
|