@mcp-b/react-components 0.70.0 → 0.71.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.
Files changed (96) hide show
  1. package/dist/AgentComputer-CpS9R2KG.d.ts +305 -0
  2. package/dist/{AgentComputer-CFJxjMFE.js → AgentComputer-CsWDnHwj.js} +1859 -478
  3. package/dist/CommandPalette-DDctKdpC.d.ts +53 -0
  4. package/dist/ComputerCalendar-Z6k_DVJF.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/{ExecutionResult-C7SzVquo.js → ExecutionResult-CXnGcmM4.js} +1 -1
  10. package/dist/{WorkspaceBrowser-ojoZy0uO.js → WorkspaceBrowser-mRScUczT.js} +5 -5
  11. package/dist/WorkspaceFileTransfer-D2cOoVyO.js +1625 -0
  12. package/dist/{WorkspaceMessageResponse-BoeeltJM.js → WorkspaceMessageResponse-CXGOQgpo.js} +1 -1
  13. package/dist/components/agents-sdk/AgentComputer.d.ts +2 -276
  14. package/dist/components/agents-sdk/AgentComputer.js +1 -1
  15. package/dist/components/agents-sdk/BrowserReplay.js +1 -1
  16. package/dist/components/agents-sdk/ComputerAutomations.d.ts +5 -15
  17. package/dist/components/agents-sdk/ComputerAutomations.js +164 -145
  18. package/dist/components/agents-sdk/ComputerCalendar.d.ts +1 -1
  19. package/dist/components/agents-sdk/ComputerCalendar.js +1 -1344
  20. package/dist/components/agents-sdk/ComputerCustomWallpaper.d.ts +2 -39
  21. package/dist/components/agents-sdk/ComputerCustomWallpaper.js +2 -522
  22. package/dist/components/agents-sdk/ComputerFiles.d.ts +18 -81
  23. package/dist/components/agents-sdk/ComputerFiles.js +386 -98
  24. package/dist/components/agents-sdk/ComputerHome.d.ts +6 -11
  25. package/dist/components/agents-sdk/ComputerHome.js +1 -89
  26. package/dist/components/agents-sdk/ComputerHost.d.ts +43 -0
  27. package/dist/components/agents-sdk/ComputerHost.js +97 -0
  28. package/dist/components/agents-sdk/ComputerLayout.d.ts +1 -1
  29. package/dist/components/agents-sdk/ComputerNotifications.d.ts +2 -54
  30. package/dist/components/agents-sdk/ComputerNotifications.js +1 -668
  31. package/dist/components/agents-sdk/ComputerPresentation.d.ts +2 -0
  32. package/dist/components/agents-sdk/ComputerPresentation.js +2 -0
  33. package/dist/components/agents-sdk/ComputerScreen.d.ts +14 -14
  34. package/dist/components/agents-sdk/ComputerScreen.js +109 -50
  35. package/dist/components/agents-sdk/ComputerSettings.d.ts +12 -40
  36. package/dist/components/agents-sdk/ComputerSettings.js +249 -1038
  37. package/dist/components/agents-sdk/ComputerSpotlight.d.ts +13 -15
  38. package/dist/components/agents-sdk/ComputerSpotlight.js +1 -231
  39. package/dist/components/agents-sdk/ComputerViewer.d.ts +13 -17
  40. package/dist/components/agents-sdk/ComputerViewer.js +176 -187
  41. package/dist/components/agents-sdk/ComputerWallpapers.d.ts +1 -1
  42. package/dist/components/agents-sdk/EmployeeChat.js +2 -2
  43. package/dist/components/agents-sdk/EmployeeChrome.js +3 -3
  44. package/dist/components/agents-sdk/EmployeeSchedules.js +2 -2
  45. package/dist/components/agents-sdk/ExecutionBoard.js +1 -1
  46. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  47. package/dist/components/agents-sdk/ManagerOfficeScreens.js +2 -2
  48. package/dist/components/agents-sdk/McpPluginCatalog.js +1 -1
  49. package/dist/components/agents-sdk/ThinkChat.js +1 -1
  50. package/dist/components/agents-sdk/ThinkChatToolPanels.js +3 -3
  51. package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
  52. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +2 -2
  53. package/dist/components/agents-sdk/ThinkScheduleActions.js +1 -1
  54. package/dist/components/agents-sdk/ThinkScheduleBrowser.js +1 -1
  55. package/dist/components/agents-sdk/ThinkScheduleDetail.js +4 -4
  56. package/dist/components/agents-sdk/ThinkScheduleForm.js +3 -3
  57. package/dist/components/agents-sdk/WorkspaceAutomation.js +3 -3
  58. package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1 -1
  59. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  60. package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +1 -5
  61. package/dist/components/agents-sdk/WorkspaceDesktop.js +53 -41
  62. package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -3
  63. package/dist/components/agents-sdk/WorkspaceFileCommands.js +1 -924
  64. package/dist/components/agents-sdk/WorkspaceFileDetails.js +1 -1
  65. package/dist/components/agents-sdk/WorkspaceFileTransfer.js +1 -504
  66. package/dist/components/agents-sdk/WorkspaceFileView.js +6 -6
  67. package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
  68. package/dist/components/agents-sdk/WorkspaceLive.d.ts +9 -0
  69. package/dist/components/agents-sdk/WorkspaceLive.js +2 -177
  70. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  71. package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
  72. package/dist/components/ai-sdk/Context.js +1 -1
  73. package/dist/components/ai-sdk/PromptInput.js +1 -1
  74. package/dist/components/extension/FirstRunSetup.js +2 -2
  75. package/dist/components/foundations/ThemeProvider.d.ts +2 -0
  76. package/dist/components/foundations/ThemeProvider.js +2 -1
  77. package/dist/components/general-purpose/CommandPalette.d.ts +2 -52
  78. package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
  79. package/dist/components/general-purpose/WallpaperPicker.d.ts +33 -2
  80. package/dist/components/nanites/AgentConnection.js +1 -1
  81. package/dist/components/nanites/AgentToolDetail.js +1 -1
  82. package/dist/context-BWJpR084.js +94 -0
  83. package/dist/{parts-CPVz9l31.js → parts-BFK5iocu.js} +1 -1
  84. package/dist/styles/agent-computer.css +16 -0
  85. package/dist/styles/computer-files.css +5 -0
  86. package/dist/styles/computer-notifications.css +1 -0
  87. package/dist/{workspace-drag-B6hMXUNt.js → workspace-drag-BNhZIN8F.js} +1 -1
  88. package/dist/{workspace-quick-look-DODjsfhH.js → workspace-quick-look-8cbGu1Xf.js} +2 -2
  89. package/package.json +2 -2
  90. package/dist/WallpaperPicker-C-FItmDS.d.ts +0 -34
  91. package/dist/automations-host-DPORjdc7.js +0 -17
  92. package/dist/context-Ddsp8HgD.js +0 -43
  93. package/dist/minute-clock-CXpRGCMF.js +0 -35
  94. package/dist/{Context-DQDumCV8.js → Context-CYUxZrwW.js} +1 -1
  95. package/dist/{ManagerOffice-kSK7vTBl.js → ManagerOffice-BJ2vs-Lr.js} +2 -2
  96. package/dist/{WorkspaceLink-DK9kdMUH.js → WorkspaceLink-DDkj-Tq5.js} +1 -1
@@ -1,90 +1,2 @@
1
- import { tt as SearchIcon } from "../../icons-nLTnB9kd.js";
2
- import { Button } from "../foundations/Button.js";
3
- import { AppIcon } from "../foundations/AppIcon.js";
4
- import { n as useAgentComputerActions } from "../../AgentComputer-CFJxjMFE.js";
5
- import { c } from "react/compiler-runtime";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- //#region src/components/agents-sdk/ComputerHome.tsx
8
- /**
9
- * Home: the launchpad and the workspace search, for `AgentComputer`'s `home`.
10
- * A launcher opens its app from its own icon. On a phone the Dock's favorites
11
- * are not repeated, as iOS never repeats a Dock app on the Home page.
12
- */
13
- function ComputerHome(t0) {
14
- const $ = c(13);
15
- const { apps, onSearch } = t0;
16
- const { openApp } = useAgentComputerActions();
17
- let t1;
18
- if ($[0] !== apps || $[1] !== openApp) {
19
- let t2;
20
- if ($[3] !== openApp) {
21
- t2 = (app_0) => /* @__PURE__ */ jsxs(Button, {
22
- className: "computer-home__launcher",
23
- "data-favorite": app_0.launcher === "favorite" ? "" : void 0,
24
- variant: "ghost",
25
- color: "neutral",
26
- onClick: (event) => void openApp(app_0.id, { from: event.currentTarget.querySelector("[data-app-id]") ?? void 0 }),
27
- children: [/* @__PURE__ */ jsx(AppIcon.Root, {
28
- className: "computer-home__icon",
29
- "data-app-id": app_0.id,
30
- size: "2xl",
31
- "aria-hidden": "true",
32
- children: app_0.icon
33
- }), /* @__PURE__ */ jsx("span", {
34
- className: "computer-home__label",
35
- children: app_0.label
36
- })]
37
- }, app_0.id);
38
- $[3] = openApp;
39
- $[4] = t2;
40
- } else t2 = $[4];
41
- t1 = apps.filter(_temp).map(t2);
42
- $[0] = apps;
43
- $[1] = openApp;
44
- $[2] = t1;
45
- } else t1 = $[2];
46
- let t2;
47
- if ($[5] !== t1) {
48
- t2 = /* @__PURE__ */ jsx("nav", {
49
- className: "computer-home__launchpad",
50
- "aria-label": "Applications",
51
- children: t1
52
- });
53
- $[5] = t1;
54
- $[6] = t2;
55
- } else t2 = $[6];
56
- let t3;
57
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
58
- t3 = /* @__PURE__ */ jsx(SearchIcon, {});
59
- $[7] = t3;
60
- } else t3 = $[7];
61
- let t4;
62
- if ($[8] !== onSearch) {
63
- t4 = /* @__PURE__ */ jsxs(Button, {
64
- className: "computer-home__search",
65
- variant: "surface",
66
- color: "neutral",
67
- "aria-keyshortcuts": "Meta+K Control+K Alt+Space",
68
- onClick: onSearch,
69
- children: [t3, " Search workspace"]
70
- });
71
- $[8] = onSearch;
72
- $[9] = t4;
73
- } else t4 = $[9];
74
- let t5;
75
- if ($[10] !== t2 || $[11] !== t4) {
76
- t5 = /* @__PURE__ */ jsxs("div", {
77
- className: "computer-home",
78
- children: [t2, t4]
79
- });
80
- $[10] = t2;
81
- $[11] = t4;
82
- $[12] = t5;
83
- } else t5 = $[12];
84
- return t5;
85
- }
86
- function _temp(app) {
87
- return !app.owner && app.launcher !== "hidden";
88
- }
89
- //#endregion
1
+ import { s as ComputerHome } from "../../AgentComputer-CsWDnHwj.js";
90
2
  export { ComputerHome };
@@ -0,0 +1,43 @@
1
+ import { s as WorkspaceVolume } from "../../WorkspaceFileCommands-CN2oVUzx.js";
2
+ import * as React from "react";
3
+ //#region src/components/agents-sdk/ComputerHost.d.ts
4
+ /** What every part of one employee's computer shares, through {@link ComputerHost}. */
5
+ export interface ComputerHostValue {
6
+ /** The employee: the menu bar, the conversation and the in-page handoff name it. */
7
+ employee: {
8
+ name: string;
9
+ };
10
+ /** The employee's own workspace: the desktop, Files, Settings and Automations read it. */
11
+ workspace: {
12
+ volume: WorkspaceVolume;
13
+ };
14
+ /** Shows this conversation: from Spotlight, Files, Chrome or a run. */
15
+ onOpenConversation: (id: string) => void;
16
+ /**
17
+ * The employee's clock: the menu bar, notifications, Automations and
18
+ * Calendar read it. `now` defaults to `Date.now`, `timeZone` to the reader's own.
19
+ */
20
+ clock?: {
21
+ now?: () => number;
22
+ timeZone?: string;
23
+ };
24
+ }
25
+ /**
26
+ * One employee's computer: wraps the app Hosts, the `AgentComputer` and the
27
+ * `ComputerViewer` around it, which all read it.
28
+ *
29
+ * ```tsx
30
+ * <ComputerHost value={{ employee, workspace: { volume }, onOpenConversation, clock }}>
31
+ * <ComputerFiles.Host value={files}>
32
+ * <ComputerSettings.Host value={settings}>
33
+ * <ComputerViewer computer={<AgentComputer … />} conversation={conversation} />
34
+ * </ComputerSettings.Host>
35
+ * </ComputerFiles.Host>
36
+ * </ComputerHost>
37
+ * ```
38
+ */
39
+ export declare function ComputerHost({ value, children }: {
40
+ value: ComputerHostValue;
41
+ children: React.ReactNode;
42
+ }): React.JSX.Element;
43
+ //#endregion
@@ -0,0 +1,97 @@
1
+ import { o as HostContext, s as MountedComputer } from "../../context-BWJpR084.js";
2
+ import { c } from "react/compiler-runtime";
3
+ import * as React from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/components/agents-sdk/ComputerHost.tsx
6
+ /**
7
+ * One employee's computer: wraps the app Hosts, the `AgentComputer` and the
8
+ * `ComputerViewer` around it, which all read it.
9
+ *
10
+ * ```tsx
11
+ * <ComputerHost value={{ employee, workspace: { volume }, onOpenConversation, clock }}>
12
+ * <ComputerFiles.Host value={files}>
13
+ * <ComputerSettings.Host value={settings}>
14
+ * <ComputerViewer computer={<AgentComputer … />} conversation={conversation} />
15
+ * </ComputerSettings.Host>
16
+ * </ComputerFiles.Host>
17
+ * </ComputerHost>
18
+ * ```
19
+ */
20
+ function ComputerHost(t0) {
21
+ const $ = c(18);
22
+ const { value, children } = t0;
23
+ const [computer] = React.useState(_temp);
24
+ const name = value.employee.name;
25
+ const volume = value.workspace.volume;
26
+ const now = value.clock?.now;
27
+ const timeZone = value.clock?.timeZone;
28
+ const onOpenConversation = React.useRef(value.onOpenConversation);
29
+ let t1;
30
+ if ($[0] !== value.onOpenConversation) {
31
+ t1 = () => {
32
+ onOpenConversation.current = value.onOpenConversation;
33
+ };
34
+ $[0] = value.onOpenConversation;
35
+ $[1] = t1;
36
+ } else t1 = $[1];
37
+ React.useLayoutEffect(t1);
38
+ let t2;
39
+ if ($[2] !== name) {
40
+ t2 = { name };
41
+ $[2] = name;
42
+ $[3] = t2;
43
+ } else t2 = $[3];
44
+ let t3;
45
+ if ($[4] !== volume) {
46
+ t3 = { volume };
47
+ $[4] = volume;
48
+ $[5] = t3;
49
+ } else t3 = $[5];
50
+ let t4;
51
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
52
+ t4 = (id) => onOpenConversation.current(id);
53
+ $[6] = t4;
54
+ } else t4 = $[6];
55
+ let t5;
56
+ if ($[7] !== now || $[8] !== timeZone) {
57
+ t5 = {
58
+ now,
59
+ timeZone
60
+ };
61
+ $[7] = now;
62
+ $[8] = timeZone;
63
+ $[9] = t5;
64
+ } else t5 = $[9];
65
+ let t6;
66
+ if ($[10] !== computer || $[11] !== t2 || $[12] !== t3 || $[13] !== t5) {
67
+ t6 = {
68
+ employee: t2,
69
+ workspace: t3,
70
+ onOpenConversation: t4,
71
+ clock: t5,
72
+ computer
73
+ };
74
+ $[10] = computer;
75
+ $[11] = t2;
76
+ $[12] = t3;
77
+ $[13] = t5;
78
+ $[14] = t6;
79
+ } else t6 = $[14];
80
+ const state = t6;
81
+ let t7;
82
+ if ($[15] !== children || $[16] !== state) {
83
+ t7 = /* @__PURE__ */ jsx(HostContext, {
84
+ value: state,
85
+ children
86
+ });
87
+ $[15] = children;
88
+ $[16] = state;
89
+ $[17] = t7;
90
+ } else t7 = $[17];
91
+ return t7;
92
+ }
93
+ function _temp() {
94
+ return new MountedComputer();
95
+ }
96
+ //#endregion
97
+ export { ComputerHost };
@@ -1,4 +1,4 @@
1
- import { AgentComputerLayout } from "./AgentComputer.js";
1
+ import { a as AgentComputerLayout } from "../../AgentComputer-CpS9R2KG.js";
2
2
  //#region src/components/agents-sdk/ComputerLayout.d.ts
3
3
  /**
4
4
  * A saved `AgentComputer` layout, as `onLayoutChange` reported it, or null when
@@ -1,54 +1,2 @@
1
- import { t as WallpaperOption } from "../../WallpaperPicker-C-FItmDS.js";
2
- import { ReactNode } from "react";
3
- //#region src/components/agents-sdk/ComputerNotifications.d.ts
4
- /** A source-owned notification. Opening or dismissing its banner never resolves the work. */
5
- export interface ComputerNotification {
6
- id: string;
7
- /** The app it comes from, leading its card. */
8
- source: string;
9
- title: string;
10
- body: string;
11
- /** When it arrived, in epoch milliseconds; shown as a local time of day. */
12
- at: number;
13
- /** The source app's artwork. */
14
- icon: ReactNode;
15
- /** What opening it does, as the banner's keyboard action: "Open waiting tab". */
16
- action: string;
17
- /** Opens what it is about; its window grows out of the banner or card. */
18
- onOpen: (from: Element) => void;
19
- }
20
- export interface ComputerClockProps {
21
- /** The current instant in epoch milliseconds; a host on its own clock passes it. */
22
- now?: () => number;
23
- /** IANA zone the clock reads in; the reader's own zone by default. */
24
- timeZone?: string;
25
- }
26
- /**
27
- * The menu bar's date and time, as macOS ends its status items: "Mon Sep 7
28
- * 9:41 AM", in a `<time>` with the instant shown, ticking on the minute. The
29
- * child of `ComputerNotifications`.
30
- */
31
- export declare function ComputerClock({ now, timeZone }: ComputerClockProps): import("react").JSX.Element;
32
- export interface ComputerNotificationsProps {
33
- /** Newest first. A new id raises a banner once; an id that leaves takes its banner with it. */
34
- items: readonly ComputerNotification[];
35
- /** The menu-bar clock, `ComputerClock`, which opens Notification Center as macOS's does. */
36
- children: ReactNode;
37
- }
38
- /**
39
- * Notification Center behind the menu-bar clock, and the banners that
40
- * announce each new notification, portalled into the computer. For
41
- * `AgentComputer`'s `status`.
42
- */
43
- export declare function ComputerNotifications({ items, children }: ComputerNotificationsProps): import("react").JSX.Element;
44
- export interface ComputerAppearanceMenuProps {
45
- /** The wallpaper the computer shows. */
46
- wallpaper: WallpaperOption;
47
- /** Open the app that chooses wallpapers. */
48
- onOpenWallpapers: () => void;
49
- /** Quick appearance controls above the wallpaper row, such as a theme switch. */
50
- children: ReactNode;
51
- }
52
- /** The menu bar's Appearance extra: quick controls and the way to the wallpaper app. */
53
- export declare function ComputerAppearanceMenu({ wallpaper, onOpenWallpapers, children }: ComputerAppearanceMenuProps): import("react").JSX.Element;
54
- //#endregion
1
+ import { a as ComputerNotificationsProps, i as ComputerNotifications, n as ComputerClock, r as ComputerNotification, t as ComputerAppearanceMenu } from "../../ComputerNotifications-q7eeELZ8.js";
2
+ export { ComputerAppearanceMenu, ComputerClock, ComputerNotification, ComputerNotifications, ComputerNotificationsProps };