@mcp-b/react-components 0.69.0 → 0.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/AgentComputer-CpS9R2KG.d.ts +305 -0
  2. package/dist/{AgentComputer-CFJxjMFE.js → AgentComputer-DZCyQkcE.js} +1850 -478
  3. package/dist/CommandPalette-DDctKdpC.d.ts +53 -0
  4. package/dist/ComputerCalendar-Ci7tLASe.js +1360 -0
  5. package/dist/ComputerCustomWallpaper-CnGQYHp0.js +518 -0
  6. package/dist/ComputerCustomWallpaper-D4lgwj2k.d.ts +18 -0
  7. package/dist/ComputerNotifications-q7eeELZ8.d.ts +41 -0
  8. package/dist/ComputerPresentation-BEQKYAjc.js +888 -0
  9. package/dist/Context-CYUxZrwW.js +918 -0
  10. package/dist/{ExecutionResult-C7SzVquo.js → ExecutionResult-CXnGcmM4.js} +1 -1
  11. package/dist/{WorkspaceBrowser-ojoZy0uO.js → WorkspaceBrowser-mRScUczT.js} +5 -5
  12. package/dist/WorkspaceFileTransfer-D2cOoVyO.js +1625 -0
  13. package/dist/{WorkspaceMessageResponse-BoeeltJM.js → WorkspaceMessageResponse-CXGOQgpo.js} +1 -1
  14. package/dist/components/agents-sdk/AgentComputer.d.ts +2 -276
  15. package/dist/components/agents-sdk/AgentComputer.js +1 -1
  16. package/dist/components/agents-sdk/BrowserReplay.js +1 -1
  17. package/dist/components/agents-sdk/ComputerAutomations.d.ts +5 -15
  18. package/dist/components/agents-sdk/ComputerAutomations.js +164 -145
  19. package/dist/components/agents-sdk/ComputerCalendar.d.ts +1 -1
  20. package/dist/components/agents-sdk/ComputerCalendar.js +1 -1344
  21. package/dist/components/agents-sdk/ComputerCustomWallpaper.d.ts +2 -39
  22. package/dist/components/agents-sdk/ComputerCustomWallpaper.js +2 -522
  23. package/dist/components/agents-sdk/ComputerFiles.d.ts +18 -81
  24. package/dist/components/agents-sdk/ComputerFiles.js +365 -89
  25. package/dist/components/agents-sdk/ComputerHome.d.ts +6 -11
  26. package/dist/components/agents-sdk/ComputerHome.js +1 -89
  27. package/dist/components/agents-sdk/ComputerHost.d.ts +43 -0
  28. package/dist/components/agents-sdk/ComputerHost.js +97 -0
  29. package/dist/components/agents-sdk/ComputerLayout.d.ts +1 -1
  30. package/dist/components/agents-sdk/ComputerNotifications.d.ts +2 -54
  31. package/dist/components/agents-sdk/ComputerNotifications.js +1 -668
  32. package/dist/components/agents-sdk/ComputerPresentation.d.ts +2 -0
  33. package/dist/components/agents-sdk/ComputerPresentation.js +2 -0
  34. package/dist/components/agents-sdk/ComputerScreen.d.ts +14 -14
  35. package/dist/components/agents-sdk/ComputerScreen.js +109 -50
  36. package/dist/components/agents-sdk/ComputerSettings.d.ts +12 -40
  37. package/dist/components/agents-sdk/ComputerSettings.js +249 -1038
  38. package/dist/components/agents-sdk/ComputerSpotlight.d.ts +13 -15
  39. package/dist/components/agents-sdk/ComputerSpotlight.js +1 -231
  40. package/dist/components/agents-sdk/ComputerViewer.d.ts +13 -17
  41. package/dist/components/agents-sdk/ComputerViewer.js +176 -187
  42. package/dist/components/agents-sdk/ComputerWallpapers.d.ts +1 -1
  43. package/dist/components/agents-sdk/EmployeeChat.js +2 -2
  44. package/dist/components/agents-sdk/EmployeeChrome.js +3 -3
  45. package/dist/components/agents-sdk/EmployeeSchedules.js +2 -2
  46. package/dist/components/agents-sdk/ExecutionBoard.js +1 -1
  47. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  48. package/dist/components/agents-sdk/ManagerOfficeScreens.js +2 -2
  49. package/dist/components/agents-sdk/McpPluginCatalog.js +1 -1
  50. package/dist/components/agents-sdk/ThinkChat.js +1 -1
  51. package/dist/components/agents-sdk/ThinkChatToolPanels.js +3 -3
  52. package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
  53. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +2 -2
  54. package/dist/components/agents-sdk/ThinkScheduleActions.js +1 -1
  55. package/dist/components/agents-sdk/ThinkScheduleBrowser.js +1 -1
  56. package/dist/components/agents-sdk/ThinkScheduleDetail.js +4 -4
  57. package/dist/components/agents-sdk/ThinkScheduleForm.js +3 -3
  58. package/dist/components/agents-sdk/WorkspaceAutomation.js +3 -3
  59. package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1 -1
  60. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  61. package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +1 -5
  62. package/dist/components/agents-sdk/WorkspaceDesktop.js +53 -41
  63. package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -3
  64. package/dist/components/agents-sdk/WorkspaceFileCommands.js +1 -924
  65. package/dist/components/agents-sdk/WorkspaceFileDetails.js +1 -1
  66. package/dist/components/agents-sdk/WorkspaceFileTransfer.js +1 -504
  67. package/dist/components/agents-sdk/WorkspaceFileView.js +6 -6
  68. package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
  69. package/dist/components/agents-sdk/WorkspaceLive.d.ts +9 -0
  70. package/dist/components/agents-sdk/WorkspaceLive.js +2 -177
  71. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  72. package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
  73. package/dist/components/ai-sdk/Context.js +1 -842
  74. package/dist/components/ai-sdk/Plan.d.ts +33 -9
  75. package/dist/components/ai-sdk/Plan.js +336 -107
  76. package/dist/components/ai-sdk/PromptInput.js +1 -1
  77. package/dist/components/extension/FirstRunSetup.js +2 -2
  78. package/dist/components/foundations/ThemeProvider.d.ts +2 -0
  79. package/dist/components/foundations/ThemeProvider.js +2 -1
  80. package/dist/components/general-purpose/CommandPalette.d.ts +2 -52
  81. package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
  82. package/dist/components/general-purpose/WallpaperPicker.d.ts +33 -2
  83. package/dist/components/nanites/AgentConnection.js +1 -1
  84. package/dist/components/nanites/AgentToolDetail.js +1 -1
  85. package/dist/context-BWJpR084.js +94 -0
  86. package/dist/{parts-CPVz9l31.js → parts-DuT5-rDz.js} +1 -1
  87. package/dist/styles/agent-computer.css +16 -0
  88. package/dist/styles/computer-files.css +5 -0
  89. package/dist/styles/computer-notifications.css +1 -0
  90. package/dist/styles/plan.css +160 -23
  91. package/dist/{workspace-drag-B6hMXUNt.js → workspace-drag-BNhZIN8F.js} +1 -1
  92. package/dist/{workspace-quick-look-DODjsfhH.js → workspace-quick-look-8cbGu1Xf.js} +2 -2
  93. package/package.json +2 -2
  94. package/dist/WallpaperPicker-C-FItmDS.d.ts +0 -34
  95. package/dist/automations-host-DPORjdc7.js +0 -17
  96. package/dist/context-Ddsp8HgD.js +0 -43
  97. package/dist/minute-clock-CXpRGCMF.js +0 -35
  98. package/dist/progress-ring-BO649JA9.js +0 -79
  99. package/dist/{ManagerOffice-kSK7vTBl.js → ManagerOffice-BJ2vs-Lr.js} +2 -2
  100. package/dist/{WorkspaceLink-DK9kdMUH.js → WorkspaceLink-DDkj-Tq5.js} +1 -1
@@ -1,5 +1,4 @@
1
- import { AgentComputerApp } from "./AgentComputer.js";
2
- import { CommandPaletteCommand } from "../general-purpose/CommandPalette.js";
1
+ import { n as CommandPaletteCommand } from "../../CommandPalette-DDctKdpC.js";
3
2
  import * as React from "react";
4
3
  //#region src/components/agents-sdk/ComputerSpotlight.d.ts
5
4
  /** ⌘K, and ⌥Space standing in for Spotlight's ⌘Space, which macOS keeps. */
@@ -8,22 +7,21 @@ export declare const COMPUTER_SPOTLIGHT_SHORTCUT: {
8
7
  aria: string;
9
8
  };
10
9
  export interface ComputerSpotlightProps {
11
- /** The computer's apps, listed first. Windows owned by another app and hidden apps are left out. */
12
- apps: readonly AgentComputerApp[];
13
10
  /**
14
- * The host's results for this query: files, conversations, actions. Called
15
- * when search opens and as the query changes; the latest call wins, and a
16
- * rejection offers a retry. Results still pass the palette's own match, so
17
- * each names what matched in its label, description or keywords.
11
+ * The host's results beside the computer's own, such as conversations,
12
+ * listed after Recent. Called when search opens and as the query changes;
13
+ * the latest call wins, and a rejection offers a retry. Results still pass
14
+ * the palette's own match, so each names what matched in its label,
15
+ * description or keywords.
18
16
  */
19
- search: (query: string) => Promise<readonly CommandPaletteCommand[]>;
20
- open: boolean;
21
- onOpenChange: (open: boolean) => void;
17
+ extraResults?: (query: string) => Promise<readonly CommandPaletteCommand[]>;
22
18
  }
23
19
  /**
24
- * Spotlight for `AgentComputer`'s `status`: a menu-bar trigger, the ⌘K, ⌃K and
25
- * ⌥Space shortcuts within this computer, and `CommandPalette` over the apps
26
- * and the host's results. It centres on this screen and blocks only it.
20
+ * Spotlight, which `AgentComputer` draws in its menu bar: a trigger, the ⌘K,
21
+ * ⌃K and ⌥Space shortcuts within this computer, and `CommandPalette` over the
22
+ * apps, the files last written, the host's results, Settings' actions, and
23
+ * the workspace's other files and folders. It centres on this screen and
24
+ * blocks only it.
27
25
  */
28
- export declare function ComputerSpotlight({ apps, search, open, onOpenChange }: ComputerSpotlightProps): React.JSX.Element;
26
+ export declare function ComputerSpotlight({ extraResults }: ComputerSpotlightProps): React.JSX.Element;
29
27
  //#endregion
@@ -1,232 +1,2 @@
1
- import { tt as SearchIcon } from "../../icons-nLTnB9kd.js";
2
- import { Button } from "../foundations/Button.js";
3
- import { IconButton } from "../foundations/IconButton.js";
4
- import { AppIcon } from "../foundations/AppIcon.js";
5
- import { i as useAgentComputerPortalContainer, n as useAgentComputerActions } from "../../AgentComputer-CFJxjMFE.js";
6
- import { CommandPalette } from "../general-purpose/CommandPalette.js";
7
- import { c } from "react/compiler-runtime";
8
- import * as React from "react";
9
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
- //#region src/components/agents-sdk/ComputerSpotlight.tsx
11
- /** ⌘K, and ⌥Space standing in for Spotlight's ⌘Space, which macOS keeps. */
12
- const COMPUTER_SPOTLIGHT_SHORTCUT = {
13
- glyph: "⌘K or ⌥Space",
14
- aria: "Meta+K Control+K Alt+Space"
15
- };
16
- /**
17
- * Spotlight for `AgentComputer`'s `status`: a menu-bar trigger, the ⌘K, ⌃K and
18
- * ⌥Space shortcuts within this computer, and `CommandPalette` over the apps
19
- * and the host's results. It centres on this screen and blocks only it.
20
- */
21
- function ComputerSpotlight(t0) {
22
- const $ = c(42);
23
- const { apps, search, open, onOpenChange } = t0;
24
- const { openApp } = useAgentComputerActions();
25
- const container = useAgentComputerPortalContainer();
26
- const trigger = React.useRef(null);
27
- const [query, setQuery] = React.useState("");
28
- const [attempt, setAttempt] = React.useState(0);
29
- let t1;
30
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
31
- t1 = {
32
- request: null,
33
- status: "done",
34
- commands: []
35
- };
36
- $[0] = t1;
37
- } else t1 = $[0];
38
- const [results, setResults] = React.useState(t1);
39
- const request = `${attempt}:${query}`;
40
- const status = results.request === request ? results.status : "loading";
41
- let t2;
42
- if ($[1] !== query || $[2] !== request || $[3] !== search) {
43
- t2 = (signal) => {
44
- search(query).then((commands) => !signal.stale && setResults({
45
- request,
46
- status: "done",
47
- commands
48
- }), () => !signal.stale && setResults((current) => ({
49
- request,
50
- status: "error",
51
- commands: current.commands
52
- })));
53
- };
54
- $[1] = query;
55
- $[2] = request;
56
- $[3] = search;
57
- $[4] = t2;
58
- } else t2 = $[4];
59
- const run = React.useEffectEvent(t2);
60
- let t3;
61
- if ($[5] !== open || $[6] !== run) {
62
- t3 = () => {
63
- if (!open) return;
64
- const signal_0 = { stale: false };
65
- run(signal_0);
66
- return () => {
67
- signal_0.stale = true;
68
- };
69
- };
70
- $[5] = open;
71
- $[6] = run;
72
- $[7] = t3;
73
- } else t3 = $[7];
74
- let t4;
75
- if ($[8] !== open || $[9] !== request) {
76
- t4 = [open, request];
77
- $[8] = open;
78
- $[9] = request;
79
- $[10] = t4;
80
- } else t4 = $[10];
81
- React.useEffect(t3, t4);
82
- let t5;
83
- if ($[11] !== open) {
84
- t5 = () => open;
85
- $[11] = open;
86
- $[12] = t5;
87
- } else t5 = $[12];
88
- const isOpen = React.useEffectEvent(t5);
89
- let t6;
90
- if ($[13] !== onOpenChange || $[14] !== open) {
91
- t6 = () => onOpenChange(!open);
92
- $[13] = onOpenChange;
93
- $[14] = open;
94
- $[15] = t6;
95
- } else t6 = $[15];
96
- const toggle = React.useEffectEvent(t6);
97
- let t7;
98
- if ($[16] !== isOpen || $[17] !== toggle) {
99
- t7 = () => {
100
- const computer = trigger.current?.closest("[data-slot=\"agent-computer\"]");
101
- if (!computer) return;
102
- const doc = computer.ownerDocument;
103
- const shortcut = function shortcut(event) {
104
- const commandK = !event.altKey && (event.ctrlKey || event.metaKey) && event.key.toLowerCase() === "k";
105
- const spotlight = event.altKey && !event.ctrlKey && !event.metaKey && event.code === "Space";
106
- if (event.defaultPrevented || event.isComposing || event.shiftKey || !(commandK || spotlight)) return;
107
- const target = event.target;
108
- if (!(target instanceof HTMLElement)) return;
109
- const inPalette = isOpen() && target.closest("[data-command-palette]");
110
- if (!computer.contains(target) && target !== doc.body && !inPalette) return;
111
- if (target.closest("[role=\"dialog\"], [role=\"menu\"]") && !inPalette) return;
112
- event.preventDefault();
113
- toggle();
114
- };
115
- doc.addEventListener("keydown", shortcut);
116
- return () => doc.removeEventListener("keydown", shortcut);
117
- };
118
- $[16] = isOpen;
119
- $[17] = toggle;
120
- $[18] = t7;
121
- } else t7 = $[18];
122
- let t8;
123
- if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
124
- t8 = [];
125
- $[19] = t8;
126
- } else t8 = $[19];
127
- React.useEffect(t7, t8);
128
- let t9;
129
- if ($[20] !== apps || $[21] !== openApp || $[22] !== results.commands) {
130
- let t10;
131
- if ($[24] !== openApp) {
132
- t10 = (app_0) => ({
133
- id: `app:${app_0.id}`,
134
- label: app_0.label,
135
- group: "Applications",
136
- icon: /* @__PURE__ */ jsx(AppIcon.Root, {
137
- size: "sm",
138
- "aria-hidden": "true",
139
- children: app_0.icon
140
- }),
141
- onSelect: () => void openApp(app_0.id),
142
- preload: app_0.preload
143
- });
144
- $[24] = openApp;
145
- $[25] = t10;
146
- } else t10 = $[25];
147
- t9 = [...apps.filter(_temp).map(t10), ...results.commands];
148
- $[20] = apps;
149
- $[21] = openApp;
150
- $[22] = results.commands;
151
- $[23] = t9;
152
- } else t9 = $[23];
153
- const commands_0 = t9;
154
- let t10;
155
- if ($[26] !== onOpenChange) {
156
- t10 = () => onOpenChange(true);
157
- $[26] = onOpenChange;
158
- $[27] = t10;
159
- } else t10 = $[27];
160
- let t11;
161
- if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
162
- t11 = /* @__PURE__ */ jsx(SearchIcon, {});
163
- $[28] = t11;
164
- } else t11 = $[28];
165
- let t12;
166
- if ($[29] !== t10) {
167
- t12 = /* @__PURE__ */ jsx(IconButton, {
168
- ref: trigger,
169
- label: "Search workspace",
170
- tooltip: `Search workspace (${COMPUTER_SPOTLIGHT_SHORTCUT.glyph})`,
171
- "aria-keyshortcuts": COMPUTER_SPOTLIGHT_SHORTCUT.aria,
172
- variant: "ghost",
173
- color: "neutral",
174
- className: "computer-spotlight__trigger",
175
- onClick: t10,
176
- children: t11
177
- });
178
- $[29] = t10;
179
- $[30] = t12;
180
- } else t12 = $[30];
181
- let t13;
182
- if ($[31] !== status) {
183
- t13 = status === "error" ? /* @__PURE__ */ jsxs("p", {
184
- role: "status",
185
- children: [
186
- "The workspace couldn’t be searched.",
187
- " ",
188
- /* @__PURE__ */ jsx(Button, {
189
- size: "sm",
190
- variant: "ghost",
191
- onClick: () => setAttempt(_temp2),
192
- children: "Retry search"
193
- })
194
- ]
195
- }) : status === "loading" ? /* @__PURE__ */ jsx("p", { children: "Searching the workspace…" }) : null;
196
- $[31] = status;
197
- $[32] = t13;
198
- } else t13 = $[32];
199
- let t14;
200
- if ($[33] !== commands_0 || $[34] !== container || $[35] !== onOpenChange || $[36] !== open || $[37] !== t13) {
201
- t14 = /* @__PURE__ */ jsx(CommandPalette, {
202
- commands: commands_0,
203
- open,
204
- onOpenChange,
205
- onQueryChange: setQuery,
206
- container,
207
- children: t13
208
- });
209
- $[33] = commands_0;
210
- $[34] = container;
211
- $[35] = onOpenChange;
212
- $[36] = open;
213
- $[37] = t13;
214
- $[38] = t14;
215
- } else t14 = $[38];
216
- let t15;
217
- if ($[39] !== t12 || $[40] !== t14) {
218
- t15 = /* @__PURE__ */ jsxs(Fragment, { children: [t12, t14] });
219
- $[39] = t12;
220
- $[40] = t14;
221
- $[41] = t15;
222
- } else t15 = $[41];
223
- return t15;
224
- }
225
- function _temp2(count) {
226
- return count + 1;
227
- }
228
- function _temp(app) {
229
- return !app.owner && app.launcher !== "hidden";
230
- }
231
- //#endregion
1
+ import { c as COMPUTER_SPOTLIGHT_SHORTCUT, l as ComputerSpotlight } from "../../AgentComputer-DZCyQkcE.js";
232
2
  export { COMPUTER_SPOTLIGHT_SHORTCUT, ComputerSpotlight };
@@ -1,4 +1,3 @@
1
- import { t as Button } from "../../Button-DIn-0P-0.js";
2
1
  import * as React from "react";
3
2
  //#region src/components/agents-sdk/ComputerViewer.d.ts
4
3
  export interface ComputerViewerActions {
@@ -12,37 +11,34 @@ export interface ComputerViewerActions {
12
11
  showConversation: () => void;
13
12
  }
14
13
  export interface ComputerViewerProps {
15
- /** The conversation region's name: the employee's. */
16
- label: string;
17
14
  /** The `AgentComputer`. */
18
15
  computer: React.ReactNode;
19
16
  /** The conversation, whose composer is its one `role="textbox"`. */
20
17
  conversation: React.ReactNode;
21
- /** Whether the conversation is wanted: beside a wide computer, over a narrow one. */
22
- open: boolean;
23
- /** Hide (Escape, the hide button, the home indicator) or show the conversation. */
24
- onOpenChange: (open: boolean) => void;
25
- /** The phone's home indicator under a full-screen conversation was used: go Home. */
26
- onHome: () => void;
27
- /** `showComputer()`, for host controls outside the viewer. */
18
+ /**
19
+ * Whether the conversation starts wanted: beside a wide computer, and one
20
+ * request away over a narrow one, which starts with the computer in front.
21
+ */
22
+ defaultOpen?: boolean;
23
+ /** `showComputer()` and `showConversation()`, for host controls outside the viewer. */
28
24
  actionsRef?: React.Ref<ComputerViewerActions>;
29
25
  }
30
26
  /**
31
- * The computer and its conversation, side by side above 74.75rem of viewer
27
+ * The computer and its conversation, inside a `ComputerHost`, side by side above 74.75rem of viewer
32
28
  * (a 48rem computer, a `--sigvelo-layout-conversation` column and their
33
29
  * insets), one over the other below it. CSS owns that breakpoint; the viewer
34
30
  * observes the same decision for inert, ARIA and focus. The viewer owns focus
35
31
  * across the conversation's edge: showing it focuses its composer, hiding it
36
32
  * returns focus to what opened it.
37
33
  */
38
- export declare function ComputerViewer({ label, computer, conversation, open, onOpenChange, onHome, actionsRef }: ComputerViewerProps): React.JSX.Element;
34
+ export declare function ComputerViewer({ computer, conversation, defaultOpen, actionsRef }: ComputerViewerProps): React.JSX.Element;
39
35
  /**
40
- * The computer's control for the conversation, typically a menu-bar extra. It
41
- * shows the conversation, over a narrow computer or beside a wide one; the
42
- * conversation's own top bar hides it. The viewer fills in what it controls and
43
- * whether that is showing, and returns focus here when the conversation hides.
36
+ * The menu bar's control for the conversation, which the computer draws
37
+ * inside a viewer. It shows the conversation, over a narrow computer or
38
+ * beside a wide one; the conversation's own top bar hides it. Focus returns
39
+ * here when the conversation hides.
44
40
  */
45
- export declare function ComputerViewerToggle({ onClick, ...props }: Omit<React.ComponentProps<typeof Button>, "ref" | "aria-expanded" | "aria-controls">): React.JSX.Element;
41
+ export declare function ComputerViewerToggle(): React.JSX.Element | null;
46
42
  /**
47
43
  * The conversation's own way out, for its top bar: "Hide conversation" beside
48
44
  * the computer, "Show desktop" over it.