@mcp-b/react-components 0.70.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 (96) 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/{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 +365 -89
  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-DuT5-rDz.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,10 +1,9 @@
1
1
  import { l as WorkspaceNavigationAdapter, n as WorkspaceDestination } from "../../WorkspaceLink-C8HH2fMT.js";
2
2
  import { a as WorkspaceFileState } from "../../WorkspaceFile-BJC6vlp_.js";
3
3
  import "../../Workspace-mZddFyvP.js";
4
- import { a as WorkspaceDrop, i as WorkspaceDragSource, u as WorkspaceTransferOperation } from "../../WorkspaceFileTransfer-D--dVla2.js";
5
- import { AgentComputerApp } from "./AgentComputer.js";
6
- import { i as WorkspaceFileCommands, s as WorkspaceVolume } from "../../WorkspaceFileCommands-CN2oVUzx.js";
7
- import { i as WorkspaceBrowserSort } from "../../WorkspaceBrowser-CNVAKXXZ.js";
4
+ import "../../WorkspaceFileTransfer-D--dVla2.js";
5
+ import "../../WorkspaceFileCommands-CN2oVUzx.js";
6
+ import { r as AgentComputerApp } from "../../AgentComputer-CpS9R2KG.js";
8
7
  import * as React from "react";
9
8
  import { ReactNode } from "react";
10
9
  import { FileInfo } from "@cloudflare/shell";
@@ -19,48 +18,6 @@ interface ComputerFilesLocation {
19
18
  /** Nothing under `path` is trashed, renamed, dropped on or created. */
20
19
  readOnly?: boolean;
21
20
  }
22
- /** One Get Info window's subject: a file or folder on a volume. */
23
- interface InfoSubject {
24
- volume: WorkspaceVolume;
25
- path: string;
26
- }
27
- /**
28
- * One computer's files: the design system's file commands over the home
29
- * volume and its locations, Get Info as computer windows, and the status line
30
- * every Finder window shows.
31
- */
32
- declare function useComputerFiles({ volume: home, locations, openFolder, openApp }: {
33
- /** The agent's own workspace, which keeps the Trash. */
34
- volume: WorkspaceVolume;
35
- /** The sidebar's locations; a `readOnly` one keeps its contents as they are. */
36
- locations: readonly ComputerFilesLocation[];
37
- openFolder: (path: string) => void;
38
- /** Opens a computer window. Without a computer, null: there is no Get Info. */
39
- openApp: ((id: string) => void) | null;
40
- }): {
41
- locations: readonly ComputerFilesLocation[];
42
- /** The Finder's status line: a transfer's progress, or what a Finder action did. */
43
- status: string | null;
44
- setStatus: React.Dispatch<React.SetStateAction<string | null>>;
45
- /** Get Info's windows: computer apps, and the subjects they read. */
46
- infoApps: AgentComputerApp[];
47
- infoPanels: Readonly<Record<string, InfoSubject>>;
48
- home: WorkspaceVolume;
49
- commands: (volume: WorkspaceVolume, surface: "desktop" | "browser") => WorkspaceFileCommands;
50
- drop: (volume: WorkspaceVolume, dropped: WorkspaceDrop, directory: string, requested: WorkspaceTransferOperation, label?: string) => Promise<string[]>;
51
- undoLabel: string | null;
52
- redoLabel: string | null;
53
- undo: () => undefined;
54
- redo: () => undefined;
55
- trashFull: boolean;
56
- emptyTrash: () => undefined;
57
- openTrash: () => undefined;
58
- trashDrop: ({ sourceKey, paths }: WorkspaceDragSource) => void;
59
- transferring: boolean;
60
- cancelTransfer: () => void;
61
- dialogs: React.JSX.Element;
62
- };
63
- type ComputerFilesCommands = ReturnType<typeof useComputerFiles>;
64
21
  //#endregion
65
22
  //#region src/components/_internal/computer-files/finder.d.ts
66
23
  /** A project the sidebar lists, by its PROJECT.md. */
@@ -71,25 +28,10 @@ interface ComputerFilesProject {
71
28
  /** The conversation the project last opened, while it still exists; null otherwise. */
72
29
  conversationId: string | null;
73
30
  }
74
- /** How a Finder window shows one folder, as macOS keeps per folder. */
75
- interface ComputerFolderView {
76
- layout: "list" | "grid";
77
- sort: WorkspaceBrowserSort;
78
- }
79
- /**
80
- * Where the host keeps each folder's view. A folder never arranged opens as
81
- * its nearest arranged ancestor does; the Finder walks the lineage, so `get`
82
- * answers for `folder` alone, returning the same object until it changes.
83
- */
84
- interface ComputerFolderViews {
85
- subscribe: (onChange: () => void) => () => void;
86
- get: (folder: string) => ComputerFolderView | null;
87
- set: (folder: string, view: ComputerFolderView) => void;
88
- }
89
31
  /** Everything the Files app reads from its host. */
90
32
  interface ComputerFilesHost {
91
- /** The computer's file commands, shared with its desktop: `ComputerFiles.useFiles`. */
92
- files: ComputerFilesCommands;
33
+ /** The sidebar's locations after Recents; a `readOnly` one keeps its contents as they are. */
34
+ locations: readonly ComputerFilesLocation[];
93
35
  /** The files last written, newest first: the Recents location. */
94
36
  recent: (limit: number) => Promise<readonly FileInfo[]>;
95
37
  /** Files matching `query`, best first: the toolbar search. */
@@ -111,41 +53,36 @@ interface ComputerFilesHost {
111
53
  */
112
54
  renderUnsupported?: (file: WorkspaceFileState) => ReactNode;
113
55
  projects: readonly ComputerFilesProject[];
114
- onOpenConversation: (id: string) => void;
115
56
  /** Starts a conversation scoped to the project's PROJECT.md. */
116
57
  onStartConversation: (projectPath: string, title: string) => void;
117
- views: ComputerFolderViews;
118
58
  }
119
59
  //#endregion
120
60
  //#region src/components/agents-sdk/ComputerFiles.d.ts
121
- /** Supplies the Files app, its Get Info windows and its previews with the host's files. */
61
+ /**
62
+ * Adds Files, its Get Info windows, the desktop, the Dock's Trash and
63
+ * Spotlight's file results to the computer below it, inside a `ComputerHost`
64
+ * whose workspace they read. One clipboard, Undo history and Trash serve the
65
+ * desktop and every Files window.
66
+ */
122
67
  declare function Host({ value, children }: {
123
68
  value: ComputerFilesHost;
124
69
  children: React.ReactNode;
125
70
  }): React.JSX.Element;
126
- /** What a desktop icon opens into, as Quick Look shows it: a folder's contents, or the file. */
127
- declare function Preview({ entry }: {
128
- entry: FileInfo;
129
- }): React.JSX.Element;
130
71
  /**
131
- * Finder for an agent's workspace, as an `AgentComputer` app. The host keeps
132
- * one `useFiles` per computer — its clipboard, Undo and Trash are the
133
- * desktop's too — and hands it, with the address and the queries the Finder
134
- * reads, to `Host` above the computer. Get Info windows are `useFiles`'s
135
- * `infoApps`, listed beside `app`.
72
+ * Finder for an agent's workspace. Its `Host`, inside a `ComputerHost` and
73
+ * above the computer, adds Files, its Get Info windows, the desktop's files,
74
+ * the Dock's Trash and Spotlight's file results; the host passes the address
75
+ * and the queries the Finder reads.
136
76
  *
137
77
  * ```tsx
138
- * const files = ComputerFiles.useFiles({ volume, locations, openFolder, openApp });
139
- * <ComputerFiles.Host value={{ files, recent, search, ...address, ... }}>
140
- * <AgentComputer apps={[ComputerFiles.app, ...files.infoApps]} … />
78
+ * <ComputerFiles.Host value={{ locations, recent, search, ...address, projects, onStartConversation }}>
79
+ * <AgentComputer … />
141
80
  * </ComputerFiles.Host>
142
81
  * ```
143
82
  */
144
83
  export declare const ComputerFiles: {
145
84
  app: AgentComputerApp;
146
85
  Host: typeof Host;
147
- useFiles: typeof useComputerFiles;
148
- Preview: typeof Preview;
149
86
  };
150
87
  //#endregion
151
- export type { ComputerFilesCommands, ComputerFilesHost, ComputerFilesLocation, ComputerFilesProject, ComputerFolderView, ComputerFolderViews };
88
+ export type { ComputerFilesHost, ComputerFilesLocation, ComputerFilesProject };