@mcp-b/react-components 0.43.0 → 0.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CodeBlock-BjELA-_s.js → CodeBlock-Dl7a3Wqo.js} +1 -1
- package/dist/{FileTree-DMYRdT6R.js → FileTree-Uu3ZnW1u.js} +1 -1
- package/dist/{SetupChecklist-H1JRCIIe.js → SetupChecklist-DOp-zqjh.js} +1 -1
- package/dist/{Workspace-F3raHdYV.d.ts → Workspace-jdVZ9S0a.d.ts} +1 -1
- package/dist/{WorkspaceFile-BLaFmMrt.d.ts → WorkspaceFile-Dq-GC0_T.d.ts} +3 -1
- package/dist/{WorkspaceFileView-DWMKxX_u.js → WorkspaceFileView-BublZXky.js} +2 -2
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.js +10 -10
- package/dist/components/agents-sdk/BrowserLiveScreen.js +4 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
- package/dist/components/agents-sdk/ManagerOffice.js +4 -4
- package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +2 -2
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelSelector.js +3 -3
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +3 -3
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +3 -3
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkFullApp.js +1 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +3 -2
- package/dist/components/agents-sdk/ThinkRoutine.d.ts +1 -7
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +2 -2
- package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +34 -18
- package/dist/components/agents-sdk/ThinkRoutineForm.js +395 -110
- package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +3 -3
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
- package/dist/components/agents-sdk/ThinkSidepanel.d.ts +4 -4
- package/dist/components/agents-sdk/ThinkSidepanel.js +71 -16
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.js +13 -3
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +1 -1
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceFile.js +18 -1
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.js +2 -2
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/Approval.js +2 -2
- package/dist/components/ai-sdk/Artifact.js +1 -1
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +1 -1
- package/dist/components/ai-sdk/Checkpoint.js +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ConnectedAppCards.d.ts +106 -0
- package/dist/components/ai-sdk/ConnectedAppCards.js +416 -0
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/InlineCitation.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.js +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.js +3 -3
- package/dist/components/ai-sdk/Queue.js +2 -2
- package/dist/components/ai-sdk/Reasoning.js +2 -2
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/ai-sdk/ToolInvocation.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -3
- package/dist/components/extension/ChatGptSignInScreen.js +7 -20
- package/dist/components/extension/CodexModelSelector.js +2 -2
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/ContextMenu.js +1 -1
- package/dist/components/foundations/DescriptionList.d.ts +3 -0
- package/dist/components/foundations/DescriptionList.js +2 -1
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/icons.d.ts +2 -2
- package/dist/components/foundations/icons.js +2 -2
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.js +1 -1
- package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
- package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/Terminal.js +2 -2
- package/dist/components/general-purpose/TestResults.js +1 -1
- package/dist/components/general-purpose/ThemeModeControl.js +1 -1
- package/dist/components/general-purpose/WebPreview.js +2 -2
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.js +1 -1
- package/dist/{copy-button-lys9N_aI.js → copy-button-DHhf-J1d.js} +1 -1
- package/dist/{icons-0corjfxR.d.ts → icons-6ZnyZJiR.d.ts} +6 -1
- package/dist/{icons-CVFSeTJn.js → icons-Dw-im7lg.js} +4 -3
- package/dist/styles/browser-live-screen.css +3 -0
- package/dist/styles/button.css +1 -5
- package/dist/styles/chatgpt-sign-in-screen.css +87 -43
- package/dist/styles/connected-app-card.css +54 -0
- package/dist/styles/description-list.css +25 -0
- package/dist/styles/index.css +1 -0
- package/dist/styles/think-routine-library.css +28 -0
- package/package.json +2 -2
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { A as McpIcon, C as FolderIcon, H as QueueIcon, J as SquareIcon, K as SlackIcon, L as PaperclipIcon, Q as TerminalIcon, S as FileIcon, T as InfoIcon, b as EyeIcon, c as BoxIcon, et as WarningIcon, g as DiscordIcon, o as ArrowUpRightIcon, q as SpinnerIcon, r as ArrowLeftIcon, y as EllipsisIcon, z as PencilIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
5
|
-
import { Menu } from "../foundations/Menu.js";
|
|
6
5
|
import { Dialog } from "../foundations/Dialog.js";
|
|
7
|
-
import { ChatGptSignInScreen } from "../extension/ChatGptSignInScreen.js";
|
|
8
|
-
import { Avatar } from "../foundations/Avatar.js";
|
|
9
6
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
|
+
import { Menu } from "../foundations/Menu.js";
|
|
8
|
+
import { Avatar } from "../foundations/Avatar.js";
|
|
10
9
|
import { AppIcon } from "../foundations/AppIcon.js";
|
|
11
10
|
import "../foundations/icons.js";
|
|
12
11
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
@@ -19,8 +18,9 @@ import { ThinkFullApp } from "./ThinkFullApp.js";
|
|
|
19
18
|
import { Switch } from "../foundations/Switch.js";
|
|
20
19
|
import { ThinkRoutineLibrary } from "./ThinkRoutineLibrary.js";
|
|
21
20
|
import { ActionGuide } from "../general-purpose/ActionGuide.js";
|
|
22
|
-
import { t as SetupChecklistAction } from "../../SetupChecklist-
|
|
21
|
+
import { t as SetupChecklistAction } from "../../SetupChecklist-DOp-zqjh.js";
|
|
23
22
|
import { useTheme } from "../foundations/ThemeProvider.js";
|
|
23
|
+
import { ChatGptSignInScreen } from "../extension/ChatGptSignInScreen.js";
|
|
24
24
|
import * as React from "react";
|
|
25
25
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
26
26
|
//#region src/components/agents-sdk/ThinkSidepanel.tsx
|
|
@@ -57,7 +57,53 @@ function MenuGroupLabel({ hint, label }) {
|
|
|
57
57
|
}), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, { children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: hint }) }) })] })]
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
/** Keep in lockstep with --sigvelo-layout-break-compact / the 56rem @container. */
|
|
61
|
+
function compactBreakPx(el) {
|
|
62
|
+
const raw = getComputedStyle(el).getPropertyValue("--sigvelo-layout-break-compact").trim();
|
|
63
|
+
if (raw.endsWith("rem")) return Number.parseFloat(raw) * Number.parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
64
|
+
const px = Number.parseFloat(raw);
|
|
65
|
+
return Number.isFinite(px) ? px : 896;
|
|
66
|
+
}
|
|
67
|
+
function useCompactApp() {
|
|
68
|
+
const ref = React.useRef(null);
|
|
69
|
+
const [compact, setCompact] = React.useState(true);
|
|
70
|
+
React.useLayoutEffect(() => {
|
|
71
|
+
const el = ref.current;
|
|
72
|
+
if (!el) return;
|
|
73
|
+
const sync = () => {
|
|
74
|
+
const next = el.getBoundingClientRect().width <= compactBreakPx(el);
|
|
75
|
+
setCompact((current) => current === next ? current : next);
|
|
76
|
+
};
|
|
77
|
+
sync();
|
|
78
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
79
|
+
const observer = new ResizeObserver(sync);
|
|
80
|
+
observer.observe(el);
|
|
81
|
+
return () => observer.disconnect();
|
|
82
|
+
}, []);
|
|
83
|
+
return [ref, compact];
|
|
84
|
+
}
|
|
85
|
+
function WorkspaceLinks({ renderLink, view }) {
|
|
86
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(AppTopBar.Link, {
|
|
87
|
+
label: "Files",
|
|
88
|
+
"aria-current": view === "files" ? "page" : void 0,
|
|
89
|
+
"data-pressed": view === "files" ? "" : void 0,
|
|
90
|
+
render: renderLink({
|
|
91
|
+
kind: "view",
|
|
92
|
+
view: "files"
|
|
93
|
+
}),
|
|
94
|
+
children: /* @__PURE__ */ jsx(FileIcon, {})
|
|
95
|
+
}), /* @__PURE__ */ jsx(AppTopBar.Link, {
|
|
96
|
+
label: "Plugins",
|
|
97
|
+
"aria-current": view === "plugins" ? "page" : void 0,
|
|
98
|
+
"data-pressed": view === "plugins" ? "" : void 0,
|
|
99
|
+
render: renderLink({
|
|
100
|
+
kind: "view",
|
|
101
|
+
view: "plugins"
|
|
102
|
+
}),
|
|
103
|
+
children: /* @__PURE__ */ jsx(BoxIcon, {})
|
|
104
|
+
})] });
|
|
105
|
+
}
|
|
106
|
+
function OverflowMenu({ companion, follow, identityEmail, onIdentity, onModel, onSignOut, passkeyVault, renderLink, workbenchInMenu }) {
|
|
61
107
|
return /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
62
108
|
label: "More actions",
|
|
63
109
|
tooltip: identityEmail ? `Signed in as ${identityEmail}` : void 0,
|
|
@@ -71,20 +117,19 @@ function OverflowMenu({ companion, follow, identityEmail, onIdentity, onModel, o
|
|
|
71
117
|
align: "end",
|
|
72
118
|
sideOffset: 4,
|
|
73
119
|
children: /* @__PURE__ */ jsxs(Menu.Popup, { children: [
|
|
74
|
-
/* @__PURE__ */ jsxs(Menu.Item, {
|
|
120
|
+
workbenchInMenu ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Menu.Item, {
|
|
75
121
|
render: renderLink({
|
|
76
122
|
kind: "view",
|
|
77
123
|
view: "files"
|
|
78
124
|
}),
|
|
79
125
|
children: [/* @__PURE__ */ jsx(FileIcon, {}), "Files"]
|
|
80
|
-
}),
|
|
81
|
-
/* @__PURE__ */ jsxs(Menu.Item, {
|
|
126
|
+
}), /* @__PURE__ */ jsxs(Menu.Item, {
|
|
82
127
|
render: renderLink({
|
|
83
128
|
kind: "view",
|
|
84
129
|
view: "plugins"
|
|
85
130
|
}),
|
|
86
131
|
children: [/* @__PURE__ */ jsx(BoxIcon, {}), "Plugins"]
|
|
87
|
-
}),
|
|
132
|
+
})] }) : null,
|
|
88
133
|
/* @__PURE__ */ jsxs(Menu.Item, {
|
|
89
134
|
render: renderLink({
|
|
90
135
|
kind: "view",
|
|
@@ -497,7 +542,9 @@ function employeeMessages({ agentRun, brandName, guideOpen, hasConversation, hos
|
|
|
497
542
|
function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion, connectingLabel, conversation, follow, identity, live, messages, modelSetup, onDeleteThread, onModel, onSignOut, passkeyVault, plugins, renderLink, schedules, sourceKey, start, status = "ready", thread, threads = EMPTY_THREADS, view, workspace, ...props }) {
|
|
498
543
|
const [identityOpen, setIdentityOpen] = React.useState(false);
|
|
499
544
|
const [guideOpen, setGuideOpen] = React.useState(false);
|
|
545
|
+
const [rootRef, compact] = useCompactApp();
|
|
500
546
|
if (status !== "ready") return /* @__PURE__ */ jsx("div", {
|
|
547
|
+
ref: rootRef,
|
|
501
548
|
className: cx("think-sidepanel", className),
|
|
502
549
|
"data-status": status,
|
|
503
550
|
...props,
|
|
@@ -517,7 +564,12 @@ function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion,
|
|
|
517
564
|
onModel,
|
|
518
565
|
onSignOut,
|
|
519
566
|
passkeyVault,
|
|
520
|
-
renderLink
|
|
567
|
+
renderLink,
|
|
568
|
+
workbenchInMenu: compact
|
|
569
|
+
});
|
|
570
|
+
const workspaceLinks = compact || agentRun ? void 0 : /* @__PURE__ */ jsx(WorkspaceLinks, {
|
|
571
|
+
renderLink,
|
|
572
|
+
view
|
|
521
573
|
});
|
|
522
574
|
const identityDialog = identity ? /* @__PURE__ */ jsx(IdentityDialog, {
|
|
523
575
|
identity,
|
|
@@ -529,7 +581,7 @@ function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion,
|
|
|
529
581
|
render: renderLink({ kind: "new-thread" }),
|
|
530
582
|
children: /* @__PURE__ */ jsx(PencilIcon, {})
|
|
531
583
|
}) : void 0;
|
|
532
|
-
const
|
|
584
|
+
const workbenchLeading = view === "files" || view === "plugins" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(BackToChat, { renderLink }), appBarLeading] }) : newThread || view === "chat" && appBarLeading ? /* @__PURE__ */ jsxs(Fragment, { children: [newThread, view === "chat" ? appBarLeading : null] }) : void 0;
|
|
533
585
|
const chatMessages = employeeMessages({
|
|
534
586
|
agentRun,
|
|
535
587
|
brandName: brand.name,
|
|
@@ -542,6 +594,7 @@ function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion,
|
|
|
542
594
|
start
|
|
543
595
|
});
|
|
544
596
|
if (view === "live") return /* @__PURE__ */ jsxs("div", {
|
|
597
|
+
ref: rootRef,
|
|
545
598
|
className: cx("think-sidepanel", className),
|
|
546
599
|
"data-view": "live",
|
|
547
600
|
...props,
|
|
@@ -554,6 +607,7 @@ function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion,
|
|
|
554
607
|
}), identityDialog]
|
|
555
608
|
});
|
|
556
609
|
if (view === "schedules") return /* @__PURE__ */ jsxs("div", {
|
|
610
|
+
ref: rootRef,
|
|
557
611
|
className: cx("think-sidepanel", className),
|
|
558
612
|
"data-view": "schedules",
|
|
559
613
|
...props,
|
|
@@ -563,6 +617,7 @@ function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion,
|
|
|
563
617
|
}) : schedules ? /* @__PURE__ */ jsx(ThinkRoutineLibrary, {
|
|
564
618
|
bar: {
|
|
565
619
|
leading: /* @__PURE__ */ jsx(BackToChat, { renderLink }),
|
|
620
|
+
actions: workspaceLinks,
|
|
566
621
|
primary: overflow
|
|
567
622
|
},
|
|
568
623
|
routines: schedules.routines,
|
|
@@ -596,6 +651,7 @@ function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion,
|
|
|
596
651
|
});
|
|
597
652
|
const workbenchView = view === "plugins" ? "plugins" : view === "files" ? "files" : "chat";
|
|
598
653
|
return /* @__PURE__ */ jsxs("div", {
|
|
654
|
+
ref: rootRef,
|
|
599
655
|
className: cx("think-sidepanel", className),
|
|
600
656
|
"data-view": view,
|
|
601
657
|
...props,
|
|
@@ -623,13 +679,12 @@ function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion,
|
|
|
623
679
|
view: "chat"
|
|
624
680
|
}),
|
|
625
681
|
children: /* @__PURE__ */ jsx(ArrowLeftIcon, {})
|
|
626
|
-
}) :
|
|
627
|
-
|
|
628
|
-
actions: agentRun?.running && agentRun.onCancel ? /* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
682
|
+
}) : workbenchLeading,
|
|
683
|
+
actions: agentRun?.running && agentRun.onCancel ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
629
684
|
label: "Cancel run",
|
|
630
685
|
onClick: agentRun.onCancel,
|
|
631
686
|
children: /* @__PURE__ */ jsx(SquareIcon, {})
|
|
632
|
-
}) :
|
|
687
|
+
}), workspaceLinks] }) : workspaceLinks,
|
|
633
688
|
primary: overflow,
|
|
634
689
|
views: null
|
|
635
690
|
},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { V as PlusIcon, _ as DotIcon, et as WarningIcon, q as SpinnerIcon, t as ArchiveIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
5
|
-
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
6
|
-
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
7
5
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
6
|
+
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
7
|
+
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
8
8
|
import { LinkButton } from "../foundations/LinkButton.js";
|
|
9
9
|
import { SearchField } from "../foundations/SearchField.js";
|
|
10
10
|
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as workspaceQueryKey, C as workspaceBinaryFileQueryOptions, D as workspaceFileAssetQueryOptions, E as workspaceDirectoryQueryPrefix, O as workspaceFileStatQueryOptions, S as useWorkspace, T as workspaceDirectoryQueryOptions, _ as WorkspaceResolvedAsset, a as WorkspaceDirectoryQueryOptions, b as WorkspaceTextFileQueryKey, c as WorkspaceFileQueryKey, d as WorkspaceFileStatQueryOptions, f as WorkspaceFileVersion, g as WorkspaceQueryKey, h as WorkspaceInfoQueryOptions, i as WorkspaceDirectoryQueryKey, j as workspaceTextFileQueryOptions, k as workspaceInfoQueryOptions, l as WorkspaceFileReadTarget, m as WorkspaceInfoQueryKey, n as WorkspaceBinaryFileQueryKey, o as WorkspaceFileAssetQueryKey, p as WorkspaceInfo, r as WorkspaceBinaryFileQueryOptions, s as WorkspaceFileAssetQueryOptions, t as UseWorkspaceOptions, u as WorkspaceFileStatQueryKey, v as WorkspaceSource, w as workspaceDirectoryQueryKey, x as WorkspaceTextFileQueryOptions, y as WorkspaceState } from "../../Workspace-
|
|
1
|
+
import { A as workspaceQueryKey, C as workspaceBinaryFileQueryOptions, D as workspaceFileAssetQueryOptions, E as workspaceDirectoryQueryPrefix, O as workspaceFileStatQueryOptions, S as useWorkspace, T as workspaceDirectoryQueryOptions, _ as WorkspaceResolvedAsset, a as WorkspaceDirectoryQueryOptions, b as WorkspaceTextFileQueryKey, c as WorkspaceFileQueryKey, d as WorkspaceFileStatQueryOptions, f as WorkspaceFileVersion, g as WorkspaceQueryKey, h as WorkspaceInfoQueryOptions, i as WorkspaceDirectoryQueryKey, j as workspaceTextFileQueryOptions, k as workspaceInfoQueryOptions, l as WorkspaceFileReadTarget, m as WorkspaceInfoQueryKey, n as WorkspaceBinaryFileQueryKey, o as WorkspaceFileAssetQueryKey, p as WorkspaceInfo, r as WorkspaceBinaryFileQueryOptions, s as WorkspaceFileAssetQueryOptions, t as UseWorkspaceOptions, u as WorkspaceFileStatQueryKey, v as WorkspaceSource, w as workspaceDirectoryQueryKey, x as WorkspaceTextFileQueryOptions, y as WorkspaceState } from "../../Workspace-jdVZ9S0a.js";
|
|
2
2
|
export { UseWorkspaceOptions, WorkspaceBinaryFileQueryKey, WorkspaceBinaryFileQueryOptions, WorkspaceDirectoryQueryKey, WorkspaceDirectoryQueryOptions, WorkspaceFileAssetQueryKey, WorkspaceFileAssetQueryOptions, WorkspaceFileQueryKey, WorkspaceFileReadTarget, WorkspaceFileStatQueryKey, WorkspaceFileStatQueryOptions, WorkspaceFileVersion, WorkspaceInfo, WorkspaceInfoQueryKey, WorkspaceInfoQueryOptions, WorkspaceQueryKey, WorkspaceResolvedAsset, WorkspaceSource, WorkspaceState, WorkspaceTextFileQueryKey, WorkspaceTextFileQueryOptions, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
2
|
-
import { getWorkspaceBasename, inferWorkspaceMedia } from "./WorkspaceFile.js";
|
|
2
|
+
import { getWorkspaceBasename, inferWorkspaceMedia, isWorkspaceTextPath } from "./WorkspaceFile.js";
|
|
3
3
|
import { n as isWorkspacePathWithinRoot, t as canonicalizeAbsoluteWorkspacePath } from "../../workspace-path-L_KmjRjq.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { queryOptions, useQueries, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
@@ -245,6 +245,7 @@ async function refreshWorkspaceFile(queryClient, { source, sourceKey, root, sele
|
|
|
245
245
|
});
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
|
+
if (!isWorkspaceTextPath(target.readPath, target.info.mimeType)) return;
|
|
248
249
|
const options = workspaceTextFileQueryOptions(source, sourceKey, root, target);
|
|
249
250
|
if (queryClient.getQueryState(options.queryKey)) await queryClient.fetchQuery({
|
|
250
251
|
...options,
|
|
@@ -284,6 +285,7 @@ function useWorkspace({ source, sourceKey, root = "/", selectedPath, onSelectedP
|
|
|
284
285
|
info: INACTIVE_FILE_INFO,
|
|
285
286
|
media: null
|
|
286
287
|
};
|
|
288
|
+
const targetIsText = target ? isWorkspaceTextPath(target.readPath, target.info.mimeType) : false;
|
|
287
289
|
const assetQuery = useQuery({
|
|
288
290
|
...workspaceFileAssetQueryOptions(sourceKey, root, queryTarget, resolveFileAsset ?? INACTIVE_FILE_ASSET_RESOLVER),
|
|
289
291
|
enabled: statSettled && resolveFileAsset !== void 0
|
|
@@ -292,7 +294,7 @@ function useWorkspace({ source, sourceKey, root = "/", selectedPath, onSelectedP
|
|
|
292
294
|
const resolverSettled = !resolveFileAsset || assetQuery.isSuccess && !assetQuery.isFetching;
|
|
293
295
|
const textQuery = useQuery({
|
|
294
296
|
...workspaceTextFileQueryOptions(source, sourceKey, root, queryTarget),
|
|
295
|
-
enabled: statSettled && resolverSettled && !resolvedAsset && !target.media
|
|
297
|
+
enabled: statSettled && resolverSettled && !resolvedAsset && !target.media && targetIsText
|
|
296
298
|
});
|
|
297
299
|
const binaryQuery = useQuery({
|
|
298
300
|
...workspaceBinaryFileQueryOptions(source, sourceKey, root, queryTarget, normalizedMaxInlineAssetBytes),
|
|
@@ -349,7 +351,7 @@ function useWorkspace({ source, sourceKey, root = "/", selectedPath, onSelectedP
|
|
|
349
351
|
info: target.info,
|
|
350
352
|
error: null
|
|
351
353
|
};
|
|
352
|
-
else if (
|
|
354
|
+
else if (targetIsText && textQuery.isSuccess) selectedFile = {
|
|
353
355
|
path: selectedPath,
|
|
354
356
|
name: getWorkspaceBasename(selectedPath),
|
|
355
357
|
content: textQuery.data,
|
|
@@ -357,6 +359,14 @@ function useWorkspace({ source, sourceKey, root = "/", selectedPath, onSelectedP
|
|
|
357
359
|
info: target.info,
|
|
358
360
|
error: null
|
|
359
361
|
};
|
|
362
|
+
else if (!target.media && !targetIsText) selectedFile = {
|
|
363
|
+
path: selectedPath,
|
|
364
|
+
name: getWorkspaceBasename(selectedPath),
|
|
365
|
+
content: null,
|
|
366
|
+
asset: null,
|
|
367
|
+
info: target.info,
|
|
368
|
+
error: null
|
|
369
|
+
};
|
|
360
370
|
}
|
|
361
371
|
const loadingPaths = React.useMemo(() => {
|
|
362
372
|
const paths = /* @__PURE__ */ new Set();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SearchField } from "../foundations/SearchField.js";
|
|
2
|
-
import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-
|
|
2
|
+
import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-Uu3ZnW1u.js";
|
|
3
3
|
import { WorkspaceHeader } from "./WorkspaceHeader.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
|
|
2
|
-
import { y as WorkspaceState } from "../../Workspace-
|
|
2
|
+
import { y as WorkspaceState } from "../../Workspace-jdVZ9S0a.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/agents-sdk/WorkspaceExplorer.d.ts
|
|
@@ -2,7 +2,7 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
|
2
2
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
3
3
|
import { a as WorkspaceNavigationRestorationBoundary, n as WorkspaceNavigationProvider, o as useRequiredWorkspaceNavigationRestoration, r as resolveWorkspaceLink } from "../../WorkspaceLink-DtH66bAY.js";
|
|
4
4
|
import { WorkspaceBrowser } from "./WorkspaceBrowser.js";
|
|
5
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
5
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-BublZXky.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/agents-sdk/WorkspaceExplorer.tsx
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export { WorkspaceFileAsset, WorkspaceFileAssetRequest, WorkspaceFileAssetResolver, WorkspaceFileState, WorkspaceMediaInfo, WorkspaceMediaKind, WorkspaceMediaTrack, WorkspaceMediaTrackKind, WorkspaceSkillDocument, getWorkspaceBasename, inferWorkspaceLanguage, inferWorkspaceMedia, inferWorkspaceMimeType, isWorkspaceMarkdownPath, isWorkspaceMediaPath, isWorkspaceSkillPath, parseWorkspaceSkill };
|
|
1
|
+
import { _ as isWorkspaceTextPath, a as WorkspaceMediaInfo, c as WorkspaceMediaTrackKind, d as inferWorkspaceLanguage, f as inferWorkspaceMedia, g as isWorkspaceSkillPath, h as isWorkspaceMediaPath, i as WorkspaceFileState, l as WorkspaceSkillDocument, m as isWorkspaceMarkdownPath, n as WorkspaceFileAssetRequest, o as WorkspaceMediaKind, p as inferWorkspaceMimeType, r as WorkspaceFileAssetResolver, s as WorkspaceMediaTrack, t as WorkspaceFileAsset, u as getWorkspaceBasename, v as parseWorkspaceSkill } from "../../WorkspaceFile-Dq-GC0_T.js";
|
|
2
|
+
export { WorkspaceFileAsset, WorkspaceFileAssetRequest, WorkspaceFileAssetResolver, WorkspaceFileState, WorkspaceMediaInfo, WorkspaceMediaKind, WorkspaceMediaTrack, WorkspaceMediaTrackKind, WorkspaceSkillDocument, getWorkspaceBasename, inferWorkspaceLanguage, inferWorkspaceMedia, inferWorkspaceMimeType, isWorkspaceMarkdownPath, isWorkspaceMediaPath, isWorkspaceSkillPath, isWorkspaceTextPath, parseWorkspaceSkill };
|
|
@@ -135,6 +135,17 @@ const GENERIC_MEDIA_MIME_TYPES = /* @__PURE__ */ new Set([
|
|
|
135
135
|
"application/binary",
|
|
136
136
|
"binary/octet-stream"
|
|
137
137
|
]);
|
|
138
|
+
const TEXT_APPLICATION_MIME_TYPES = /* @__PURE__ */ new Set([
|
|
139
|
+
"application/ecmascript",
|
|
140
|
+
"application/javascript",
|
|
141
|
+
"application/json",
|
|
142
|
+
"application/sql",
|
|
143
|
+
"application/toml",
|
|
144
|
+
"application/x-sh",
|
|
145
|
+
"application/x-yaml",
|
|
146
|
+
"application/xml",
|
|
147
|
+
"application/yaml"
|
|
148
|
+
]);
|
|
138
149
|
function normalizeWorkspaceMimeType(mimeType) {
|
|
139
150
|
return mimeType?.split(";", 1)[0]?.trim().toLowerCase() || null;
|
|
140
151
|
}
|
|
@@ -209,6 +220,12 @@ function inferWorkspaceMimeType(path) {
|
|
|
209
220
|
function isWorkspaceMediaPath(path, mimeType) {
|
|
210
221
|
return inferWorkspaceMedia(path, mimeType) !== null;
|
|
211
222
|
}
|
|
223
|
+
/** Identify files that are safe to decode and render as text. */
|
|
224
|
+
function isWorkspaceTextPath(path, mimeType) {
|
|
225
|
+
const normalizedMimeType = normalizeWorkspaceMimeType(mimeType);
|
|
226
|
+
if (!normalizedMimeType || GENERIC_MEDIA_MIME_TYPES.has(normalizedMimeType)) return LANGUAGE_BY_EXTENSION[workspaceExtension(path)] !== void 0;
|
|
227
|
+
return normalizedMimeType.startsWith("text/") || TEXT_APPLICATION_MIME_TYPES.has(normalizedMimeType) || normalizedMimeType.endsWith("+json") || normalizedMimeType.endsWith("+xml");
|
|
228
|
+
}
|
|
212
229
|
/** Parse and validate a workspace skill with the canonical Agent Skills SDK. */
|
|
213
230
|
function parseWorkspaceSkill(content) {
|
|
214
231
|
const validationErrors = validateSkillContent(content);
|
|
@@ -229,4 +246,4 @@ function inferWorkspaceLanguage(path) {
|
|
|
229
246
|
return LANGUAGE_BY_EXTENSION[workspaceExtension(path)] ?? "text";
|
|
230
247
|
}
|
|
231
248
|
//#endregion
|
|
232
|
-
export { getWorkspaceBasename, inferWorkspaceLanguage, inferWorkspaceMedia, inferWorkspaceMimeType, isWorkspaceMarkdownPath, isWorkspaceMediaPath, isWorkspaceSkillPath, parseWorkspaceSkill };
|
|
249
|
+
export { getWorkspaceBasename, inferWorkspaceLanguage, inferWorkspaceMedia, inferWorkspaceMimeType, isWorkspaceMarkdownPath, isWorkspaceMediaPath, isWorkspaceSkillPath, isWorkspaceTextPath, parseWorkspaceSkill };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
1
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-BublZXky.js";
|
|
2
2
|
export { WorkspaceFileView };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as PaperclipIcon, T as InfoIcon, d as CheckIcon, et as WarningIcon, nt as XIcon } from "../../icons-Dw-im7lg.js";
|
|
2
2
|
import { Button } from "../foundations/Button.js";
|
|
3
3
|
import { Popover } from "../foundations/Popover.js";
|
|
4
|
-
import { Card, CardAction, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
5
4
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
6
5
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
6
|
+
import { Card, CardAction, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/agents-sdk/WorkspaceMountManager.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { p as ChevronRightIcon } from "../../icons-Dw-im7lg.js";
|
|
2
3
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
3
4
|
import { useExpansionState } from "./ExpansionState.js";
|
|
4
|
-
import { p as ChevronRightIcon } from "../../icons-CVFSeTJn.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/ai-sdk/Activity.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { nt as XIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { PromptInputTray } from "./PromptInput.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { z as PencilIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { Kbd } from "../foundations/Kbd.js";
|
|
5
4
|
import { a as formatUnknownValue } from "../../format-DB2mX9DA.js";
|
|
5
|
+
import { Kbd } from "../foundations/Kbd.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/ai-sdk/Approval.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { et as WarningIcon, nt as XIcon, q as SpinnerIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
2
|
-
import { E as IconProps } from "../../icons-
|
|
2
|
+
import { E as IconProps } from "../../icons-6ZnyZJiR.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ai-sdk/ChainOfThought.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { _ as DotIcon, d as CheckIcon, p as ChevronRightIcon, q as SpinnerIcon } from "../../icons-Dw-im7lg.js";
|
|
2
3
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
3
|
-
import { K as SpinnerIcon, _ as DotIcon, d as CheckIcon, p as ChevronRightIcon } from "../../icons-CVFSeTJn.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/ai-sdk/ChainOfThought.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { s as BookmarkIcon } from "../../icons-
|
|
2
|
+
import { s as BookmarkIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { Marker, MarkerIcon } from "../foundations/Marker.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as CODE_BLOCK_LANGUAGES, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../../CodeBlock-
|
|
1
|
+
import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as CODE_BLOCK_LANGUAGES, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../../CodeBlock-Dl7a3Wqo.js";
|
|
2
2
|
export { CODE_BLOCK_LANGUAGES, CodeBlock, CodeBlockActions, CodeBlockContainer, CodeBlockContent, CodeBlockCopyButton, CodeBlockFilename, CodeBlockHeader, CodeBlockLanguageSelector, CodeBlockLanguageSelectorContent, CodeBlockLanguageSelectorItem, CodeBlockLanguageSelectorTrigger, CodeBlockLanguageSelectorValue, CodeBlockTitle };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { CardProps } from "../foundations/Card.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ai-sdk/ConnectedAppCards.d.ts
|
|
5
|
+
type ConnectedAppCardState = "pending" | "sent" | "denied";
|
|
6
|
+
type ConnectedAppCardProps = Omit<CardProps, "children" | "hover" | "size" | "title" | "onChange"> & {
|
|
7
|
+
/** Lifecycle of the draft. Pending can be edited; sent and denied are settled. */state?: ConnectedAppCardState; /** Optional provider mark. The domain's generic icon is used by default. */
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
interface EmailMessageDraft {
|
|
11
|
+
from?: string;
|
|
12
|
+
to?: string;
|
|
13
|
+
subject: string;
|
|
14
|
+
body?: string;
|
|
15
|
+
}
|
|
16
|
+
interface EmailMessageCardProps extends ConnectedAppCardProps, EmailMessageDraft {
|
|
17
|
+
onChange?: (next: EmailMessageDraft) => void;
|
|
18
|
+
onDiscard?: () => void | Promise<void>;
|
|
19
|
+
onReject?: (reason: string) => void | Promise<void>;
|
|
20
|
+
onSend?: () => void | Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Email draft or result. Pending cards can be edited and released; send,
|
|
24
|
+
* discard, and reject-with-reason stay application-owned.
|
|
25
|
+
*/
|
|
26
|
+
declare function EmailMessageCard({
|
|
27
|
+
body,
|
|
28
|
+
from,
|
|
29
|
+
icon,
|
|
30
|
+
onChange,
|
|
31
|
+
onDiscard,
|
|
32
|
+
onReject,
|
|
33
|
+
onSend,
|
|
34
|
+
state,
|
|
35
|
+
subject,
|
|
36
|
+
to,
|
|
37
|
+
ref,
|
|
38
|
+
...props
|
|
39
|
+
}: EmailMessageCardProps & {
|
|
40
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
41
|
+
}): React.JSX.Element;
|
|
42
|
+
interface SlackMessageDraft {
|
|
43
|
+
workspace?: string;
|
|
44
|
+
to: string;
|
|
45
|
+
thread?: string;
|
|
46
|
+
message: string;
|
|
47
|
+
}
|
|
48
|
+
interface SlackMessageCardProps extends ConnectedAppCardProps, SlackMessageDraft {
|
|
49
|
+
onChange?: (next: SlackMessageDraft) => void;
|
|
50
|
+
onDiscard?: () => void | Promise<void>;
|
|
51
|
+
onReject?: (reason: string) => void | Promise<void>;
|
|
52
|
+
onSend?: () => void | Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
/** Slack draft or posted message with workspace, destination, and thread fields. */
|
|
55
|
+
declare function SlackMessageCard({
|
|
56
|
+
icon,
|
|
57
|
+
message,
|
|
58
|
+
onChange,
|
|
59
|
+
onDiscard,
|
|
60
|
+
onReject,
|
|
61
|
+
onSend,
|
|
62
|
+
state,
|
|
63
|
+
thread,
|
|
64
|
+
to,
|
|
65
|
+
workspace,
|
|
66
|
+
ref,
|
|
67
|
+
...props
|
|
68
|
+
}: SlackMessageCardProps & {
|
|
69
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
70
|
+
}): React.JSX.Element;
|
|
71
|
+
interface CalendarEventDraft {
|
|
72
|
+
eventTitle: string;
|
|
73
|
+
when: string;
|
|
74
|
+
whenDateTime?: string;
|
|
75
|
+
location?: string;
|
|
76
|
+
attendees?: string;
|
|
77
|
+
}
|
|
78
|
+
interface CalendarEventCardProps extends ConnectedAppCardProps, CalendarEventDraft {
|
|
79
|
+
onChange?: (next: CalendarEventDraft) => void;
|
|
80
|
+
onDiscard?: () => void | Promise<void>;
|
|
81
|
+
onReject?: (reason: string) => void | Promise<void>;
|
|
82
|
+
onSend?: () => void | Promise<void>;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Calendar draft or settled event. Pass `whenDateTime` for a semantic `time`
|
|
86
|
+
* element; the application owns locale and timezone formatting.
|
|
87
|
+
*/
|
|
88
|
+
declare function CalendarEventCard({
|
|
89
|
+
attendees,
|
|
90
|
+
eventTitle,
|
|
91
|
+
icon,
|
|
92
|
+
location,
|
|
93
|
+
onChange,
|
|
94
|
+
onDiscard,
|
|
95
|
+
onReject,
|
|
96
|
+
onSend,
|
|
97
|
+
state,
|
|
98
|
+
when,
|
|
99
|
+
whenDateTime,
|
|
100
|
+
ref,
|
|
101
|
+
...props
|
|
102
|
+
}: CalendarEventCardProps & {
|
|
103
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
104
|
+
}): React.JSX.Element;
|
|
105
|
+
//#endregion
|
|
106
|
+
export { CalendarEventCard, CalendarEventCardProps, CalendarEventDraft, ConnectedAppCardState, EmailMessageCard, EmailMessageCardProps, EmailMessageDraft, SlackMessageCard, SlackMessageCardProps, SlackMessageDraft };
|