@mcp-b/react-components 0.21.0 → 0.23.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-Dvkn8lce.d.ts → AgentChat-Bm1qYbOo.d.ts} +2 -2
- package/dist/{AgentChatStartScreen-CvXJBr4y.d.ts → AgentChatStartScreen-DDZ25aax.d.ts} +4 -1
- package/dist/{Button-yRInko9u.d.ts → Button-SBIz6Lqi.d.ts} +2 -1
- package/dist/{CodeBlock-ygtuzqJd.js → CodeBlock-Cp67Njo3.js} +1 -1
- package/dist/{CodeBlock-Bbls1CnA.d.ts → CodeBlock-yMpGqScn.d.ts} +1 -1
- package/dist/Dialog-BD8NBKaE.d.ts +122 -0
- package/dist/{FileTree-CdgfccsM.js → FileTree-DW60q1w7.js} +1 -1
- package/dist/IconButton-CFKhu6OR.d.ts +35 -0
- package/dist/{Message-DzuteocT.js → Message-_-bEYLAO.js} +9 -16
- package/dist/{ModelSelector-CEd8M9eK.js → ModelSelector-Brvj9Cab.js} +1 -1
- package/dist/{PromptInput-Cq-8RoXD.d.ts → PromptInput-BjoPWaaG.d.ts} +15 -2
- package/dist/{ThinkChatActivity-FY1VWXgh.d.ts → ThinkChatActivity-2BobmuvR.d.ts} +1 -1
- package/dist/{Workspace-CWtust-2.d.ts → Workspace-CIycQ4xE.d.ts} +1 -1
- package/dist/{WorkspaceExplorer-DGigwsgH.d.ts → WorkspaceExplorer-BCipn7Vd.d.ts} +1 -1
- package/dist/{WorkspaceFile-D8Un_xge.d.ts → WorkspaceFile-DMtRMwVv.d.ts} +1 -1
- package/dist/{WorkspaceFileView-Bxx4wEzJ.js → WorkspaceFileView-rUEN2iox.js} +4 -4
- package/dist/assets/think-browser-host.png +0 -0
- package/dist/components/ActionGuide.d.ts +85 -0
- package/dist/components/ActionGuide.js +94 -0
- package/dist/components/Activity.js +1 -1
- package/dist/components/AgentActivity.js +3 -11
- package/dist/components/AgentActivityPreview.js +15 -14
- package/dist/components/AgentAttention.d.ts +1 -1
- package/dist/components/AgentChat.d.ts +1 -1
- package/dist/components/AgentChat.js +33 -13
- package/dist/components/AgentChatStartScreen.d.ts +1 -1
- package/dist/components/AgentChatStartScreen.js +21 -15
- package/dist/components/AgentConnection.d.ts +1 -1
- package/dist/components/AgentConnection.js +2 -2
- package/dist/components/AgentMessageParts.js +1 -1
- package/dist/components/AgentToolDetail.js +1 -1
- package/dist/components/AlertDialog.d.ts +2 -1
- package/dist/components/AlertDialog.js +8 -2
- package/dist/components/AppIcon.d.ts +58 -0
- package/dist/components/AppIcon.js +51 -0
- package/dist/components/AppTopBar.js +9 -10
- package/dist/components/Approval.js +1 -1
- package/dist/components/Artifact.d.ts +3 -7
- package/dist/components/Artifact.js +12 -18
- package/dist/components/Avatar.d.ts +7 -2
- package/dist/components/Avatar.js +4 -2
- package/dist/components/BrowserLiveView.js +1 -1
- package/dist/components/BrowserReplay.js +4 -5
- package/dist/components/BrowserRunPanel.js +1 -1
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/ChainOfThought.d.ts +1 -1
- package/dist/components/ChainOfThought.js +1 -1
- package/dist/components/ChatGptSignInScreen.js +2 -2
- package/dist/components/Checkbox.js +1 -1
- package/dist/components/Checkpoint.js +1 -1
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.js +1 -1
- package/dist/components/Commit.d.ts +1 -1
- package/dist/components/Commit.js +3 -3
- package/dist/components/ContextMenu.js +1 -1
- package/dist/components/Conversation.d.ts +2 -2
- package/dist/components/Conversation.js +4 -5
- package/dist/components/Dialog.d.ts +1 -117
- package/dist/components/Dialog.js +9 -1
- package/dist/components/EnvironmentVariables.d.ts +1 -1
- package/dist/components/EnvironmentVariables.js +2 -2
- package/dist/components/FileTree.js +1 -1
- package/dist/components/IconButton.d.ts +1 -31
- package/dist/components/IconButton.js +2 -1
- package/dist/components/McpConnectionRequest.d.ts +1 -1
- package/dist/components/McpConnectionRequest.js +1 -1
- package/dist/components/McpPluginCatalog.d.ts +86 -0
- package/dist/components/McpPluginCatalog.js +364 -0
- package/dist/components/McpServerPicker.d.ts +2 -2
- package/dist/components/McpServerPicker.js +7 -13
- package/dist/components/MediaPreviewCard.js +1 -1
- package/dist/components/Menubar.js +1 -1
- package/dist/components/Message.d.ts +4 -8
- package/dist/components/Message.js +1 -1
- package/dist/components/MessageScroller.d.ts +1 -1
- package/dist/components/MessageScroller.js +1 -1
- package/dist/components/ModelSelector.d.ts +2 -2
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/Plan.js +1 -1
- package/dist/components/PricingPlanCard.d.ts +1 -1
- package/dist/components/PricingPlanCard.js +10 -12
- package/dist/components/PromptInput.d.ts +2 -2
- package/dist/components/PromptInput.js +27 -10
- package/dist/components/Queue.d.ts +1 -1
- package/dist/components/Queue.js +2 -2
- package/dist/components/Reasoning.js +4 -9
- package/dist/components/ResponsiveSidebarShell.js +2 -1
- package/dist/components/ScrollArea.js +1 -0
- package/dist/components/SearchField.js +1 -1
- package/dist/components/Select.js +1 -1
- package/dist/components/Sources.js +1 -1
- package/dist/components/Stepper.js +1 -1
- package/dist/components/SubagentRunIndicator.js +1 -1
- package/dist/components/SubagentRunSelector.js +1 -1
- package/dist/components/Task.js +1 -1
- package/dist/components/Terminal.d.ts +3 -3
- package/dist/components/Terminal.js +7 -8
- package/dist/components/TestResults.js +1 -1
- package/dist/components/ThemeModeControl.js +1 -1
- package/dist/components/ThinkChat.d.ts +5 -5
- package/dist/components/ThinkChatActivity.d.ts +1 -1
- package/dist/components/ThinkChatActivity.js +1 -1
- package/dist/components/ThinkChatToolPanels.js +1 -1
- package/dist/components/ThinkExecutionDetail.js +1 -1
- package/dist/components/ThinkExecutionStatus.js +1 -1
- package/dist/components/ThinkExecutionWorkbench.js +14 -21
- package/dist/components/ThinkFullApp.d.ts +8 -4
- package/dist/components/ThinkFullApp.js +17 -2
- package/dist/components/ThinkRoutineBrowser.js +2 -2
- package/dist/components/ThinkRoutineForm.js +3 -3
- package/dist/components/ThinkRoutineLibrary.js +2 -2
- package/dist/components/ThinkRoutineRuns.js +1 -1
- package/dist/components/ThinkThreadPicker.js +2 -3
- package/dist/components/Toast.d.ts +12 -2
- package/dist/components/Toast.js +14 -4
- package/dist/components/Tooltip.d.ts +6 -4
- package/dist/components/Tooltip.js +11 -4
- package/dist/components/WebPreview.d.ts +13 -6
- package/dist/components/WebPreview.js +55 -50
- package/dist/components/Workspace.d.ts +1 -1
- package/dist/components/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/WorkspaceBrowser.js +1 -1
- package/dist/components/WorkspaceExplorer.d.ts +3 -3
- package/dist/components/WorkspaceExplorer.js +1 -1
- package/dist/components/WorkspaceFile.d.ts +1 -1
- package/dist/components/WorkspaceFileView.d.ts +1 -1
- package/dist/components/WorkspaceFileView.js +1 -1
- package/dist/components/WorkspaceHeader.js +1 -1
- package/dist/components/icons.d.ts +2 -2
- package/dist/components/icons.js +2 -2
- package/dist/{copy-button-BrvQ7z4W.d.ts → copy-button-EBv_B9F6.d.ts} +2 -2
- package/dist/{copy-button-vo1paUSi.js → copy-button-TWq8nZhc.js} +8 -8
- package/dist/{icons-DyOM0EJs.js → icons-ua6f_GH3.js} +3 -2
- package/dist/{icons-DkRtZmvT.d.ts → icons-wP1yFUXF.d.ts} +6 -1
- package/dist/mcp-server-catalog-DycejaJ5.d.ts +1077 -0
- package/dist/styles/action-guide.css +128 -0
- package/dist/styles/agent-activity-preview-overlay.css +13 -1
- package/dist/styles/agent-activity-preview.css +3 -34
- package/dist/styles/agent-chat.css +110 -75
- package/dist/styles/alert-dialog.css +0 -18
- package/dist/styles/app-icon.css +122 -0
- package/dist/styles/app-top-bar.css +0 -1
- package/dist/styles/avatar.css +13 -0
- package/dist/styles/base.css +0 -1
- package/dist/styles/button.css +14 -0
- package/dist/styles/description-list.css +2 -2
- package/dist/styles/dialog.css +6 -6
- package/dist/styles/index.css +3 -0
- package/dist/styles/mcp-plugin-catalog.css +296 -0
- package/dist/styles/mcp-server-picker.css +0 -26
- package/dist/styles/message-scroller.css +5 -1
- package/dist/styles/message.css +7 -0
- package/dist/styles/prompt-input.css +26 -14
- package/dist/styles/recipes.css +27 -5
- package/dist/styles/responsive-sidebar-shell.css +14 -8
- package/dist/styles/search-field.css +9 -0
- package/dist/styles/think-full-app.css +22 -2
- package/dist/styles/think-thread-picker.css +1 -11
- package/dist/styles/toast.css +0 -21
- package/dist/styles/tokens.css +6 -0
- package/dist/styles/web-preview.css +5 -0
- package/dist/utils/favicon.d.ts +10 -0
- package/dist/utils/favicon.js +18 -0
- package/dist/utils/mcp-server-catalog.d.ts +2 -1078
- package/dist/utils/mcp-server-catalog.js +3 -11
- package/dist/utils/structured-code.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-CyD2UB3V.js";
|
|
2
|
-
import { n as AgentChatStartScreenProps } from "./AgentChatStartScreen-
|
|
3
|
-
import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, X as PromptInputContextSelectorProps, gt as PromptInputReference, n as PermissionMode, ut as PromptInputMessage } from "./PromptInput-
|
|
2
|
+
import { n as AgentChatStartScreenProps } from "./AgentChatStartScreen-DDZ25aax.js";
|
|
3
|
+
import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, X as PromptInputContextSelectorProps, gt as PromptInputReference, n as PermissionMode, ut as PromptInputMessage } from "./PromptInput-BjoPWaaG.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { ChatAddToolApproveResponseFunction, ChatStatus, UIMessage } from "ai";
|
|
6
6
|
import { PendingApproval, Think } from "@cloudflare/think";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ButtonProps } from "./Button-
|
|
1
|
+
import { r as ButtonProps } from "./Button-SBIz6Lqi.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/AgentChatStartScreen.d.ts
|
|
@@ -7,6 +7,8 @@ interface AgentChatStartScreenProps extends Omit<React.ComponentPropsWithoutRef<
|
|
|
7
7
|
heading?: React.ReactNode;
|
|
8
8
|
/** The one composer owned by `AgentChat`, placed between the heading and starters. */
|
|
9
9
|
composer: React.ReactNode;
|
|
10
|
+
/** App-authored content for the utility tray beneath the first-turn composer. */
|
|
11
|
+
composerTray?: React.ReactNode;
|
|
10
12
|
/** App-authored starter actions rendered below the composer. */
|
|
11
13
|
children?: React.ReactNode;
|
|
12
14
|
}
|
|
@@ -20,6 +22,7 @@ interface AgentChatStartScreenProps extends Omit<React.ComponentPropsWithoutRef<
|
|
|
20
22
|
declare function AgentChatStartScreen({
|
|
21
23
|
heading,
|
|
22
24
|
composer,
|
|
25
|
+
composerTray,
|
|
23
26
|
children,
|
|
24
27
|
className,
|
|
25
28
|
"aria-label": ariaLabel,
|
|
@@ -7,10 +7,11 @@ import { Button } from "@base-ui/react/button";
|
|
|
7
7
|
*
|
|
8
8
|
* - `normal` - Filled background (default)
|
|
9
9
|
* - `outline` - Low-emphasis with border, transparent background
|
|
10
|
+
* - `surface` - Raised neutral surface for prominent lightweight actions
|
|
10
11
|
* - `ghost` - Minimal style, background appears on hover
|
|
11
12
|
* - `link` - Appears as a text link with underline on hover
|
|
12
13
|
*/
|
|
13
|
-
type ButtonVariant = "normal" | "outline" | "ghost" | "link";
|
|
14
|
+
type ButtonVariant = "normal" | "surface" | "outline" | "ghost" | "link";
|
|
14
15
|
/**
|
|
15
16
|
* The semantic color intent of the button.
|
|
16
17
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
2
|
import { Select } from "./components/Select.js";
|
|
3
|
-
import { t as CopyButton } from "./copy-button-
|
|
3
|
+
import { t as CopyButton } from "./copy-button-TWq8nZhc.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { createHighlighter } from "shiki";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { m as SelectProps, t as Select } from "./Select-B_13gg_J.js";
|
|
2
|
-
import { t as CopyButtonProps } from "./copy-button-
|
|
2
|
+
import { t as CopyButtonProps } from "./copy-button-EBv_B9F6.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { BundledLanguage, ThemedToken } from "shiki";
|
|
5
5
|
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Dialog.d.ts
|
|
5
|
+
interface DialogProps extends Dialog.Root.Props {}
|
|
6
|
+
interface DialogTriggerProps extends Dialog.Trigger.Props {}
|
|
7
|
+
interface DialogPortalProps extends Dialog.Portal.Props {}
|
|
8
|
+
interface DialogBackdropProps extends Dialog.Backdrop.Props {}
|
|
9
|
+
interface DialogViewportProps extends Dialog.Viewport.Props {}
|
|
10
|
+
interface DialogPopupProps extends Dialog.Popup.Props {
|
|
11
|
+
/**
|
|
12
|
+
* The size of the dialog.
|
|
13
|
+
* @default 'md'
|
|
14
|
+
*/
|
|
15
|
+
size?: "sm" | "md" | "lg" | "fullscreen";
|
|
16
|
+
}
|
|
17
|
+
interface DialogTitleProps extends Dialog.Title.Props {}
|
|
18
|
+
interface DialogDescriptionProps extends Dialog.Description.Props {}
|
|
19
|
+
interface DialogCloseProps extends Dialog.Close.Props {}
|
|
20
|
+
interface DialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
21
|
+
interface DialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
22
|
+
/**
|
|
23
|
+
* A dialog component for modal interactions.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Dialog.Root open={isOpen} onOpenChange={setIsOpen}>
|
|
28
|
+
* <Dialog.Trigger render={<Button />}>Open</Dialog.Trigger>
|
|
29
|
+
* <Dialog.Portal>
|
|
30
|
+
* <Dialog.Backdrop />
|
|
31
|
+
* <Dialog.Viewport>
|
|
32
|
+
* <Dialog.Popup>
|
|
33
|
+
* <Dialog.Title>Confirm</Dialog.Title>
|
|
34
|
+
* <Dialog.Description>Are you sure?</Dialog.Description>
|
|
35
|
+
* <Dialog.Close>Cancel</Dialog.Close>
|
|
36
|
+
* </Dialog.Popup>
|
|
37
|
+
* </Dialog.Viewport>
|
|
38
|
+
* </Dialog.Portal>
|
|
39
|
+
* </Dialog.Root>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @see {@link https://base-ui.com/react/components/dialog | Base UI Dialog}
|
|
43
|
+
*/
|
|
44
|
+
declare function DialogTrigger({
|
|
45
|
+
render,
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}: DialogTriggerProps): React.JSX.Element;
|
|
49
|
+
declare function DialogBackdrop({
|
|
50
|
+
className,
|
|
51
|
+
ref,
|
|
52
|
+
...props
|
|
53
|
+
}: DialogBackdropProps & {
|
|
54
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
55
|
+
}): React.JSX.Element;
|
|
56
|
+
declare function DialogViewport({
|
|
57
|
+
className,
|
|
58
|
+
ref,
|
|
59
|
+
...props
|
|
60
|
+
}: DialogViewportProps & {
|
|
61
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
62
|
+
}): React.JSX.Element;
|
|
63
|
+
declare function DialogPopup({
|
|
64
|
+
size,
|
|
65
|
+
className,
|
|
66
|
+
ref,
|
|
67
|
+
...props
|
|
68
|
+
}: DialogPopupProps & {
|
|
69
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
70
|
+
}): React.JSX.Element;
|
|
71
|
+
declare function DialogHeader({
|
|
72
|
+
className,
|
|
73
|
+
ref,
|
|
74
|
+
...props
|
|
75
|
+
}: DialogHeaderProps & {
|
|
76
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
77
|
+
}): React.JSX.Element;
|
|
78
|
+
declare function DialogFooter({
|
|
79
|
+
className,
|
|
80
|
+
ref,
|
|
81
|
+
...props
|
|
82
|
+
}: DialogFooterProps & {
|
|
83
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
84
|
+
}): React.JSX.Element;
|
|
85
|
+
declare function DialogTitle({
|
|
86
|
+
className,
|
|
87
|
+
ref,
|
|
88
|
+
...props
|
|
89
|
+
}: DialogTitleProps & {
|
|
90
|
+
ref?: React.Ref<HTMLHeadingElement>;
|
|
91
|
+
}): React.JSX.Element;
|
|
92
|
+
declare function DialogDescription({
|
|
93
|
+
className,
|
|
94
|
+
ref,
|
|
95
|
+
...props
|
|
96
|
+
}: DialogDescriptionProps & {
|
|
97
|
+
ref?: React.Ref<HTMLParagraphElement>;
|
|
98
|
+
}): React.JSX.Element;
|
|
99
|
+
declare function DialogClose({
|
|
100
|
+
render,
|
|
101
|
+
className,
|
|
102
|
+
ref,
|
|
103
|
+
...props
|
|
104
|
+
}: DialogCloseProps & {
|
|
105
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
106
|
+
}): React.JSX.Element;
|
|
107
|
+
declare const Dialog$1: {
|
|
108
|
+
Root: typeof Dialog.Root;
|
|
109
|
+
Trigger: typeof DialogTrigger;
|
|
110
|
+
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
111
|
+
Backdrop: typeof DialogBackdrop;
|
|
112
|
+
Viewport: typeof DialogViewport;
|
|
113
|
+
Popup: typeof DialogPopup;
|
|
114
|
+
Header: typeof DialogHeader;
|
|
115
|
+
Footer: typeof DialogFooter;
|
|
116
|
+
Title: typeof DialogTitle;
|
|
117
|
+
Description: typeof DialogDescription;
|
|
118
|
+
Close: typeof DialogClose;
|
|
119
|
+
createHandle: typeof Dialog.createHandle;
|
|
120
|
+
};
|
|
121
|
+
//#endregion
|
|
122
|
+
export { DialogFooterProps as a, DialogPortalProps as c, DialogTriggerProps as d, DialogViewportProps as f, DialogDescriptionProps as i, DialogProps as l, DialogBackdropProps as n, DialogHeaderProps as o, DialogCloseProps as r, DialogPopupProps as s, Dialog$1 as t, DialogTitleProps as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as FileIcon, T as FolderOpenIcon, m as ChevronRightIcon, w as FolderIcon } from "./icons-ua6f_GH3.js";
|
|
3
3
|
import { t as NavigationLink } from "./navigation-link-Cob7KBlM.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { i as ButtonSize, r as ButtonProps } from "./Button-SBIz6Lqi.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/IconButton.d.ts
|
|
5
|
+
interface IconButtonProps extends Omit<ButtonProps, "aria-label" | "children" | "size"> {
|
|
6
|
+
/** Decorative icon rendered inside the square button. */
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
/** Accessible name and default tooltip text for the icon-only control. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Tooltip content when it should differ from the accessible name. */
|
|
11
|
+
tooltip?: React.ReactNode;
|
|
12
|
+
/** Preferred side for the tooltip. */
|
|
13
|
+
tooltipSide?: "top" | "right" | "bottom" | "left";
|
|
14
|
+
/** Square button size. */
|
|
15
|
+
size?: ButtonSize;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A square, icon-only button with a required accessible name and matching
|
|
19
|
+
* tooltip. Use text buttons for actions whose consequence an icon cannot make
|
|
20
|
+
* clear on its own.
|
|
21
|
+
*/
|
|
22
|
+
declare function IconButton({
|
|
23
|
+
children,
|
|
24
|
+
label,
|
|
25
|
+
size,
|
|
26
|
+
tooltip,
|
|
27
|
+
tooltipSide,
|
|
28
|
+
type,
|
|
29
|
+
ref,
|
|
30
|
+
...props
|
|
31
|
+
}: IconButtonProps & {
|
|
32
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
33
|
+
}): React.JSX.Element;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { IconButtonProps as n, IconButton as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { S as FileIcon, i as ArrowRightIcon, r as ArrowLeftIcon } from "./icons-DyOM0EJs.js";
|
|
3
2
|
import { Button } from "./components/Button.js";
|
|
4
|
-
import {
|
|
3
|
+
import { C as FileIcon, i as ArrowRightIcon, r as ArrowLeftIcon } from "./icons-ua6f_GH3.js";
|
|
4
|
+
import { IconButton } from "./components/IconButton.js";
|
|
5
5
|
import { c as useWorkspaceNavigationContext, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "./WorkspaceLink-BYYeTQLf.js";
|
|
6
6
|
import { t as AttachmentPreview } from "./attachment-preview-DIs50Q0h.js";
|
|
7
7
|
import { n as clamp } from "./format-S6uWyoSb.js";
|
|
@@ -209,23 +209,18 @@ function MessageActions({ className, children, ref, ...props }) {
|
|
|
209
209
|
* name; shows a tooltip on hover/focus when {@link tooltip} is set.
|
|
210
210
|
*/
|
|
211
211
|
function MessageAction({ className, label, tooltip, variant = "ghost", color = "neutral", size = "sm", children, ref, ...props }) {
|
|
212
|
-
|
|
212
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
213
213
|
ref,
|
|
214
214
|
type: "button",
|
|
215
|
+
label,
|
|
216
|
+
tooltip,
|
|
215
217
|
variant,
|
|
216
218
|
color,
|
|
217
219
|
size,
|
|
218
|
-
iconOnly: true,
|
|
219
220
|
className: cx("message__action", className),
|
|
220
|
-
"aria-label": label ?? tooltip,
|
|
221
221
|
...props,
|
|
222
222
|
children
|
|
223
223
|
});
|
|
224
|
-
if (!tooltip) return button;
|
|
225
|
-
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: button }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
226
|
-
sideOffset: 6,
|
|
227
|
-
children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: tooltip })
|
|
228
|
-
}) })] });
|
|
229
224
|
}
|
|
230
225
|
/**
|
|
231
226
|
* Horizontal container that places children in a row with space between —
|
|
@@ -314,16 +309,15 @@ function MessageBranchSelector({ className, children, ref, ...props }) {
|
|
|
314
309
|
/** Button that selects the previous branch. Disabled at the first branch. */
|
|
315
310
|
function MessageBranchPrevious({ className, label = "Previous response", variant = "ghost", color = "neutral", size = "sm", children, onClick, ref, ...props }) {
|
|
316
311
|
const { branchIndex, branchCount, setBranchIndex } = useMessageBranch("MessageBranchPrevious");
|
|
317
|
-
return /* @__PURE__ */ jsx(
|
|
312
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
318
313
|
ref,
|
|
319
314
|
type: "button",
|
|
315
|
+
label,
|
|
320
316
|
variant,
|
|
321
317
|
color,
|
|
322
318
|
size,
|
|
323
|
-
iconOnly: true,
|
|
324
319
|
disabled: branchCount <= 1,
|
|
325
320
|
className: cx("message__branch-prev", className),
|
|
326
|
-
"aria-label": label,
|
|
327
321
|
onClick: (event) => {
|
|
328
322
|
onClick?.(event);
|
|
329
323
|
if (!event.defaultPrevented) setBranchIndex(branchIndex > 0 ? branchIndex - 1 : branchCount - 1);
|
|
@@ -335,16 +329,15 @@ function MessageBranchPrevious({ className, label = "Previous response", variant
|
|
|
335
329
|
/** Button that selects the next branch. Disabled at the last branch. */
|
|
336
330
|
function MessageBranchNext({ className, label = "Next response", variant = "ghost", color = "neutral", size = "sm", children, onClick, ref, ...props }) {
|
|
337
331
|
const { branchIndex, branchCount, setBranchIndex } = useMessageBranch("MessageBranchNext");
|
|
338
|
-
return /* @__PURE__ */ jsx(
|
|
332
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
339
333
|
ref,
|
|
340
334
|
type: "button",
|
|
335
|
+
label,
|
|
341
336
|
variant,
|
|
342
337
|
color,
|
|
343
338
|
size,
|
|
344
|
-
iconOnly: true,
|
|
345
339
|
disabled: branchCount <= 1,
|
|
346
340
|
className: cx("message__branch-next", className),
|
|
347
|
-
"aria-label": label,
|
|
348
341
|
onClick: (event) => {
|
|
349
342
|
onClick?.(event);
|
|
350
343
|
if (!event.defaultPrevented) setBranchIndex(branchIndex < branchCount - 1 ? branchIndex + 1 : 0);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { W as SearchIcon, d as ChevronDownIcon } from "./icons-DyOM0EJs.js";
|
|
3
2
|
import { Button } from "./components/Button.js";
|
|
3
|
+
import { G as SearchIcon, f as ChevronDownIcon } from "./icons-ua6f_GH3.js";
|
|
4
4
|
import { Dialog } from "./components/Dialog.js";
|
|
5
5
|
import { i as titleCase } from "./format-S6uWyoSb.js";
|
|
6
6
|
import { Separator } from "./components/Separator.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ButtonProps } from "./Button-
|
|
1
|
+
import { r as ButtonProps } from "./Button-SBIz6Lqi.js";
|
|
2
2
|
import { _ as SelectSeparatorProps, a as SelectIconProps, c as SelectItemTextProps, d as SelectPopupProps, 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-B_13gg_J.js";
|
|
3
3
|
import { a as TabsListProps, n as TabProps, r as Tabs, t as TabPanelProps } from "./Tabs-C49J5m0Q.js";
|
|
4
4
|
import { t as Combobox } from "./Combobox-xEEF6fUb.js";
|
|
@@ -179,6 +179,19 @@ declare function PromptInputFooter({
|
|
|
179
179
|
}: PromptInputFooterProps & {
|
|
180
180
|
ref?: React.Ref<HTMLDivElement>;
|
|
181
181
|
}): React.JSX.Element;
|
|
182
|
+
interface PromptInputTrayProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
183
|
+
/** Edge of the composer this supporting tray attaches to. */
|
|
184
|
+
side: "top" | "bottom";
|
|
185
|
+
}
|
|
186
|
+
/** Supporting controls or queued work tucked behind a PromptInput edge. */
|
|
187
|
+
declare function PromptInputTray({
|
|
188
|
+
side,
|
|
189
|
+
className,
|
|
190
|
+
ref,
|
|
191
|
+
...props
|
|
192
|
+
}: PromptInputTrayProps & {
|
|
193
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
194
|
+
}): React.JSX.Element;
|
|
182
195
|
interface PromptInputToolsProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
183
196
|
declare function PromptInputTools({
|
|
184
197
|
className,
|
|
@@ -850,4 +863,4 @@ declare function PromptInputContextSelector({
|
|
|
850
863
|
action
|
|
851
864
|
}: PromptInputContextSelectorProps): React.JSX.Element;
|
|
852
865
|
//#endregion
|
|
853
|
-
export { PromptInputDictationProps as $, PromptInputCommandDefinition as A, PromptInputTabProps as At, PromptInputCommandItemProps as B,
|
|
866
|
+
export { PromptInputDictationProps as $, PromptInputCommandDefinition as A, PromptInputTabProps as At, PromptInputCommandItemProps as B, TextInputContext as Bt, PromptInputBodyProps as C, PromptInputTab as Ct, PromptInputCommand as D, PromptInputTabItemProps as Dt, PromptInputButtonTooltip as E, PromptInputTabItem as Et, PromptInputCommandGroupLabelProps as F, PromptInputTools as Ft, PromptInputCommandSeparatorProps as G, usePromptInputAttachments as Gt, PromptInputCommandListProps as H, getApprovalRequestId as Ht, PromptInputCommandGroupProps as I, PromptInputToolsProps as It, PromptInputContextItem as J, PromptInputCommandTrigger as K, usePromptInputController as Kt, PromptInputCommandInput as L, PromptInputTooltipConfig as Lt, PromptInputCommandEmptyProps as M, PromptInputTabsListProps as Mt, PromptInputCommandGroup as N, PromptInputTextarea as Nt, PromptInputCommandComposer as O, PromptInputTabLabel as Ot, PromptInputCommandGroupLabel as P, PromptInputTextareaProps as Pt, PromptInputDictation as Q, PromptInputCommandInputProps as R, PromptInputTray as Rt, PromptInputBody as S, PromptInputSubmitProps as St, PromptInputButtonProps as T, PromptInputTabBodyProps as Tt, PromptInputCommandProps as U, getApprovalStateKey as Ut, PromptInputCommandList as V, TooltipSide as Vt, PromptInputCommandSeparator as W, getPendingToolApprovals as Wt, PromptInputContextSelectorProps as X, PromptInputContextSelector as Y, PromptInputControllerProps as Z, PromptInputApprovalProps as _, PromptInputReferences as _t, PromptInputActionAddAttachmentsProps as a, PromptInputHoverCardContent as at, PromptInputAttachments as b, PromptInputSelectProps as bt, PromptInputActionMenu as c, PromptInputHoverCardTrigger as ct, PromptInputActionMenuItem as d, PromptInputPermissionSelector as dt, PromptInputFooter as et, PromptInputActionMenuItemProps as f, PromptInputPermissionSelectorProps as ft, PromptInputApproval as g, PromptInputReference as gt, PromptInputActionMenuTriggerProps as h, PromptInputProviderProps as ht, PromptInputActionAddAttachments as i, PromptInputHoverCard as it, PromptInputCommandEmpty as j, PromptInputTabsList as jt, PromptInputCommandComposerProps as k, PromptInputTabLabelProps as kt, PromptInputActionMenuContent as l, PromptInputHoverCardTriggerProps as lt, PromptInputActionMenuTrigger as m, PromptInputProvider as mt, PermissionMode as n, PromptInputHeader as nt, PromptInputActionAddScreenshot as o, PromptInputHoverCardContentProps as ot, PromptInputActionMenuProps as p, PromptInputProps as pt, PromptInputContextAction as q, useProviderAttachments as qt, PromptInput as r, PromptInputHeaderProps as rt, PromptInputActionAddScreenshotProps as s, PromptInputHoverCardProps as st, AttachmentsContext as t, PromptInputFooterProps as tt, PromptInputActionMenuContentProps as u, PromptInputMessage as ut, PromptInputAttachment as v, PromptInputReferencesProps as vt, PromptInputButton as w, PromptInputTabBody as wt, PromptInputAttachmentsProps as x, PromptInputSubmit as xt, PromptInputAttachmentProps as y, PromptInputSelect as yt, PromptInputCommandItem as z, PromptInputTrayProps as zt };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-CyD2UB3V.js";
|
|
2
|
-
import { r as AgentChatProps } from "./AgentChat-
|
|
2
|
+
import { r as AgentChatProps } from "./AgentChat-Bm1qYbOo.js";
|
|
3
3
|
import { l as ThinkChatPart } from "./ThinkChatToolParts-CSzVwMXf.js";
|
|
4
4
|
import { t as ThinkChatActivityDescription } from "./ThinkChatActivitySummary-kr5fE0wg.js";
|
|
5
5
|
import * as React from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "./WorkspaceFile-
|
|
1
|
+
import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "./WorkspaceFile-DMtRMwVv.js";
|
|
2
2
|
import { WorkspaceLike } from "@cloudflare/think";
|
|
3
3
|
import { FileInfo, Workspace } from "@cloudflare/shell";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as WorkspaceNavigationAdapter } from "./WorkspaceLink-O-EBKUJ8.js";
|
|
2
|
-
import { o as WorkspaceState } from "./Workspace-
|
|
2
|
+
import { o as WorkspaceState } from "./Workspace-CIycQ4xE.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/WorkspaceExplorer.d.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Q as WarningIcon, b as EyeIcon, et as XIcon, k as MaximizeIcon, m as CodeIcon, u as CheckIcon, v as DownloadIcon } from "./icons-DyOM0EJs.js";
|
|
2
|
-
import { t as NavigationLink } from "./navigation-link-Cob7KBlM.js";
|
|
3
1
|
import { buttonVariants } from "./components/Button.js";
|
|
2
|
+
import { $ as WarningIcon, A as MaximizeIcon, d as CheckIcon, h as CodeIcon, tt as XIcon, x as EyeIcon, y as DownloadIcon } from "./icons-ua6f_GH3.js";
|
|
3
|
+
import { t as NavigationLink } from "./navigation-link-Cob7KBlM.js";
|
|
4
4
|
import { c as useWorkspaceNavigationContext, s as useWorkspaceNavigationRestoration } from "./WorkspaceLink-BYYeTQLf.js";
|
|
5
5
|
import { r as formatClock } from "./format-S6uWyoSb.js";
|
|
6
|
-
import { f as MessageResponse, m as createWorkspaceRehypePlugins } from "./Message-
|
|
7
|
-
import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "./CodeBlock-
|
|
6
|
+
import { f as MessageResponse, m as createWorkspaceRehypePlugins } from "./Message-_-bEYLAO.js";
|
|
7
|
+
import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "./CodeBlock-Cp67Njo3.js";
|
|
8
8
|
import { AppTopBar } from "./components/AppTopBar.js";
|
|
9
9
|
import { inferWorkspaceLanguage, inferWorkspaceMedia, isWorkspaceMarkdownPath, isWorkspaceSkillPath, parseWorkspaceSkill } from "./components/WorkspaceFile.js";
|
|
10
10
|
import { WorkspaceHeader } from "./components/WorkspaceHeader.js";
|
|
Binary file
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { r as ButtonProps } from "../Button-SBIz6Lqi.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ActionGuide.d.ts
|
|
5
|
+
type ActionGuideHeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
6
|
+
type ActionGuideListLayout = "compact" | "cards" | "list";
|
|
7
|
+
interface ActionGuideProps extends Omit<React.ComponentPropsWithoutRef<"article">, "title"> {
|
|
8
|
+
/** Short, task-oriented introduction to the guide. */
|
|
9
|
+
title: React.ReactNode;
|
|
10
|
+
/** Optional sentence that explains what the guide helps the user do. */
|
|
11
|
+
description?: React.ReactNode;
|
|
12
|
+
/** Semantic heading level for the guide title. */
|
|
13
|
+
headingLevel?: ActionGuideHeadingLevel;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Composable, app-agnostic guide for presenting groups of useful actions.
|
|
17
|
+
*
|
|
18
|
+
* Product code owns the copy, icons, availability, and click behavior. This
|
|
19
|
+
* component owns only the shared article rhythm and responsive layout.
|
|
20
|
+
*/
|
|
21
|
+
declare function ActionGuide({
|
|
22
|
+
title,
|
|
23
|
+
description,
|
|
24
|
+
headingLevel,
|
|
25
|
+
children,
|
|
26
|
+
className,
|
|
27
|
+
"aria-label": ariaLabel,
|
|
28
|
+
"aria-labelledby": ariaLabelledBy,
|
|
29
|
+
ref,
|
|
30
|
+
...props
|
|
31
|
+
}: ActionGuideProps & {
|
|
32
|
+
ref?: React.Ref<HTMLElement>;
|
|
33
|
+
}): React.JSX.Element;
|
|
34
|
+
interface ActionGuideSectionProps extends Omit<React.ComponentPropsWithoutRef<"section">, "title"> {
|
|
35
|
+
/** Label for this group of related actions. */
|
|
36
|
+
title: React.ReactNode;
|
|
37
|
+
/** Semantic heading level for the section title. */
|
|
38
|
+
headingLevel?: ActionGuideHeadingLevel;
|
|
39
|
+
}
|
|
40
|
+
/** A labelled group inside an {@link ActionGuide}. */
|
|
41
|
+
declare function ActionGuideSection({
|
|
42
|
+
title,
|
|
43
|
+
headingLevel,
|
|
44
|
+
children,
|
|
45
|
+
className,
|
|
46
|
+
"aria-label": ariaLabel,
|
|
47
|
+
"aria-labelledby": ariaLabelledBy,
|
|
48
|
+
ref,
|
|
49
|
+
...props
|
|
50
|
+
}: ActionGuideSectionProps & {
|
|
51
|
+
ref?: React.Ref<HTMLElement>;
|
|
52
|
+
}): React.JSX.Element;
|
|
53
|
+
interface ActionGuideListProps extends React.ComponentPropsWithoutRef<"ul"> {
|
|
54
|
+
/** Responsive arrangement for the actions in this group. */
|
|
55
|
+
layout?: ActionGuideListLayout;
|
|
56
|
+
}
|
|
57
|
+
/** Semantic action list with compact, card, and plain-row layouts. */
|
|
58
|
+
declare function ActionGuideList({
|
|
59
|
+
layout,
|
|
60
|
+
className,
|
|
61
|
+
ref,
|
|
62
|
+
...props
|
|
63
|
+
}: ActionGuideListProps & {
|
|
64
|
+
ref?: React.Ref<HTMLUListElement>;
|
|
65
|
+
}): React.JSX.Element;
|
|
66
|
+
interface ActionGuideActionProps extends Omit<ButtonProps, "color" | "iconOnly" | "nativeButton" | "render" | "size" | "variant"> {
|
|
67
|
+
/** Decorative leading glyph or app mark. */
|
|
68
|
+
icon?: React.ReactNode;
|
|
69
|
+
/** Raised actions are prominent; ghost actions form a quieter task list. */
|
|
70
|
+
variant?: "surface" | "ghost";
|
|
71
|
+
}
|
|
72
|
+
/** One native-button action inside an {@link ActionGuideList}. */
|
|
73
|
+
declare function ActionGuideAction({
|
|
74
|
+
icon,
|
|
75
|
+
variant,
|
|
76
|
+
children,
|
|
77
|
+
className,
|
|
78
|
+
type,
|
|
79
|
+
ref,
|
|
80
|
+
...props
|
|
81
|
+
}: ActionGuideActionProps & {
|
|
82
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
83
|
+
}): React.JSX.Element;
|
|
84
|
+
//#endregion
|
|
85
|
+
export { ActionGuide, ActionGuideAction, ActionGuideActionProps, ActionGuideHeadingLevel, ActionGuideList, ActionGuideListLayout, ActionGuideListProps, ActionGuideProps, ActionGuideSection, ActionGuideSectionProps };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
+
import { Button } from "./Button.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ActionGuide.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Composable, app-agnostic guide for presenting groups of useful actions.
|
|
8
|
+
*
|
|
9
|
+
* Product code owns the copy, icons, availability, and click behavior. This
|
|
10
|
+
* component owns only the shared article rhythm and responsive layout.
|
|
11
|
+
*/
|
|
12
|
+
function ActionGuide({ title, description, headingLevel = 2, children, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ref, ...props }) {
|
|
13
|
+
const titleId = React.useId();
|
|
14
|
+
const Title = `h${headingLevel}`;
|
|
15
|
+
return /* @__PURE__ */ jsxs("article", {
|
|
16
|
+
ref,
|
|
17
|
+
"data-slot": "action-guide",
|
|
18
|
+
"data-message-layout": "wide",
|
|
19
|
+
className: cx("action-guide", className),
|
|
20
|
+
"aria-label": ariaLabel,
|
|
21
|
+
"aria-labelledby": ariaLabel ? void 0 : ariaLabelledBy ?? titleId,
|
|
22
|
+
...props,
|
|
23
|
+
children: [/* @__PURE__ */ jsxs("header", {
|
|
24
|
+
"data-slot": "action-guide-header",
|
|
25
|
+
className: "action-guide__header",
|
|
26
|
+
children: [/* @__PURE__ */ jsx(Title, {
|
|
27
|
+
id: titleId,
|
|
28
|
+
"data-slot": "action-guide-title",
|
|
29
|
+
className: "action-guide__title",
|
|
30
|
+
children: title
|
|
31
|
+
}), description ? /* @__PURE__ */ jsx("p", {
|
|
32
|
+
"data-slot": "action-guide-description",
|
|
33
|
+
className: "action-guide__description",
|
|
34
|
+
children: description
|
|
35
|
+
}) : null]
|
|
36
|
+
}), children]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/** A labelled group inside an {@link ActionGuide}. */
|
|
40
|
+
function ActionGuideSection({ title, headingLevel = 3, children, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ref, ...props }) {
|
|
41
|
+
const titleId = React.useId();
|
|
42
|
+
const Title = `h${headingLevel}`;
|
|
43
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
44
|
+
ref,
|
|
45
|
+
"data-slot": "action-guide-section",
|
|
46
|
+
className: cx("action-guide__section", className),
|
|
47
|
+
"aria-label": ariaLabel,
|
|
48
|
+
"aria-labelledby": ariaLabel ? void 0 : ariaLabelledBy ?? titleId,
|
|
49
|
+
...props,
|
|
50
|
+
children: [/* @__PURE__ */ jsx(Title, {
|
|
51
|
+
id: titleId,
|
|
52
|
+
"data-slot": "action-guide-section-title",
|
|
53
|
+
className: "action-guide__section-title",
|
|
54
|
+
children: title
|
|
55
|
+
}), children]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/** Semantic action list with compact, card, and plain-row layouts. */
|
|
59
|
+
function ActionGuideList({ layout = "compact", className, ref, ...props }) {
|
|
60
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
61
|
+
ref,
|
|
62
|
+
"data-slot": "action-guide-list",
|
|
63
|
+
"data-layout": layout,
|
|
64
|
+
className: cx("action-guide__list", className),
|
|
65
|
+
...props
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/** One native-button action inside an {@link ActionGuideList}. */
|
|
69
|
+
function ActionGuideAction({ icon, variant = "surface", children, className, type = "button", ref, ...props }) {
|
|
70
|
+
return /* @__PURE__ */ jsx("li", {
|
|
71
|
+
"data-slot": "action-guide-item",
|
|
72
|
+
className: "action-guide__item",
|
|
73
|
+
children: /* @__PURE__ */ jsxs(Button, {
|
|
74
|
+
ref,
|
|
75
|
+
...props,
|
|
76
|
+
type,
|
|
77
|
+
variant,
|
|
78
|
+
color: "neutral",
|
|
79
|
+
className: cx("action-guide__action", className),
|
|
80
|
+
children: [icon ? /* @__PURE__ */ jsx("span", {
|
|
81
|
+
"data-slot": "action-guide-action-icon",
|
|
82
|
+
className: "action-guide__action-icon",
|
|
83
|
+
"aria-hidden": true,
|
|
84
|
+
children: icon
|
|
85
|
+
}) : null, /* @__PURE__ */ jsx("span", {
|
|
86
|
+
"data-slot": "action-guide-action-label",
|
|
87
|
+
className: "action-guide__action-label",
|
|
88
|
+
children
|
|
89
|
+
})]
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
export { ActionGuide, ActionGuideAction, ActionGuideList, ActionGuideSection };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Collapsible } from "./Collapsible.js";
|
|
3
|
-
import {
|
|
3
|
+
import { m as ChevronRightIcon } from "../icons-ua6f_GH3.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/Activity.tsx
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as WarningIcon, B as PencilIcon, C as FileIcon, F as MonitorIcon, G as SearchIcon, O as InfoIcon, Z as TerminalIcon, et as WrenchIcon, k as LinkIcon } from "../icons-ua6f_GH3.js";
|
|
2
|
+
import { inferFaviconUrl } from "../utils/favicon.js";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/AgentActivity.tsx
|
|
@@ -18,7 +19,7 @@ function AgentActivityIcon({ kind }) {
|
|
|
18
19
|
}
|
|
19
20
|
/** Site favicon for URL-backed activity, with the shared icon vocabulary as fallback. */
|
|
20
21
|
function AgentActivityFavicon({ fallbackKind = "web", url }) {
|
|
21
|
-
const src =
|
|
22
|
+
const src = inferFaviconUrl(url);
|
|
22
23
|
const [failedSrc, setFailedSrc] = React.useState(null);
|
|
23
24
|
if (!src || failedSrc === src) return /* @__PURE__ */ jsx(AgentActivityIcon, { kind: fallbackKind });
|
|
24
25
|
return /* @__PURE__ */ jsx("img", {
|
|
@@ -31,14 +32,5 @@ function AgentActivityFavicon({ fallbackKind = "web", url }) {
|
|
|
31
32
|
onError: () => setFailedSrc(src)
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
|
-
function faviconHref(url) {
|
|
35
|
-
try {
|
|
36
|
-
const parsed = new URL(url);
|
|
37
|
-
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return null;
|
|
38
|
-
return new URL("/favicon.ico", parsed.origin).href;
|
|
39
|
-
} catch {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
35
|
//#endregion
|
|
44
36
|
export { AgentActivityFavicon, AgentActivityIcon };
|