@mcp-b/react-components 0.68.0 → 0.69.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 (64) hide show
  1. package/dist/{AgentComputer-BP9ixGGE.js → AgentComputer-CFJxjMFE.js} +32 -3
  2. package/dist/ComputerFileThumbnail-CXHy127c.js +393 -0
  3. package/dist/{ThinkSchedule-D4Ulsa0-.d.ts → ThinkSchedule-9nzxIoX1.d.ts} +1 -1
  4. package/dist/{Workspace-B9nuTfIi.d.ts → Workspace-mZddFyvP.d.ts} +7 -3
  5. package/dist/{WorkspaceAutomation-C0fghGLi.d.ts → WorkspaceAutomation-hwl6C1aX.d.ts} +2 -2
  6. package/dist/{WorkspaceBrowser-Dz48H-7X.d.ts → WorkspaceBrowser-CNVAKXXZ.d.ts} +4 -11
  7. package/dist/{WorkspaceBrowser-oBJv-Dac.js → WorkspaceBrowser-ojoZy0uO.js} +202 -210
  8. package/dist/{WorkspaceConcept-D46cYerS.d.ts → WorkspaceConcept-DqzfZWws.d.ts} +1 -1
  9. package/dist/{WorkspaceFileCommands-1s9Ol8CG.d.ts → WorkspaceFileCommands-CN2oVUzx.d.ts} +5 -2
  10. package/dist/{WorkspaceFileTransfer-BRD22nW-.d.ts → WorkspaceFileTransfer-D--dVla2.d.ts} +1 -1
  11. package/dist/components/agents-sdk/AgentComputer.d.ts +1 -1
  12. package/dist/components/agents-sdk/AgentComputer.js +1 -1
  13. package/dist/components/agents-sdk/ComputerAppIds.d.ts +15 -0
  14. package/dist/components/agents-sdk/ComputerAppIds.js +14 -0
  15. package/dist/components/agents-sdk/ComputerAutomations.d.ts +23 -14
  16. package/dist/components/agents-sdk/ComputerAutomations.js +437 -354
  17. package/dist/components/agents-sdk/ComputerCalendar.js +16 -15
  18. package/dist/components/agents-sdk/ComputerCustomWallpaper.js +186 -171
  19. package/dist/components/agents-sdk/ComputerFileThumbnail.d.ts +5 -3
  20. package/dist/components/agents-sdk/ComputerFileThumbnail.js +1 -132
  21. package/dist/components/agents-sdk/ComputerFiles.d.ts +4 -6
  22. package/dist/components/agents-sdk/ComputerFiles.js +337 -316
  23. package/dist/components/agents-sdk/ComputerHome.js +1 -1
  24. package/dist/components/agents-sdk/ComputerLayout.d.ts +9 -0
  25. package/dist/components/agents-sdk/ComputerLayout.js +66 -0
  26. package/dist/components/agents-sdk/ComputerNotifications.js +60 -83
  27. package/dist/components/agents-sdk/ComputerScreen.d.ts +12 -6
  28. package/dist/components/agents-sdk/ComputerScreen.js +49 -36
  29. package/dist/components/agents-sdk/ComputerSettings.d.ts +10 -4
  30. package/dist/components/agents-sdk/ComputerSettings.js +92 -72
  31. package/dist/components/agents-sdk/ComputerSpotlight.js +1 -1
  32. package/dist/components/agents-sdk/EmployeeSchedules.d.ts +2 -2
  33. package/dist/components/agents-sdk/ManagerOffice.d.ts +1 -1
  34. package/dist/components/agents-sdk/ThinkSchedule.d.ts +1 -1
  35. package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +1 -1
  36. package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
  37. package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
  38. package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +1 -1
  39. package/dist/components/agents-sdk/Workspace.d.ts +1 -1
  40. package/dist/components/agents-sdk/Workspace.js +197 -190
  41. package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
  42. package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
  43. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  44. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  45. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
  46. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
  47. package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +6 -6
  48. package/dist/components/agents-sdk/WorkspaceDesktop.js +126 -101
  49. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +2 -10
  50. package/dist/components/agents-sdk/WorkspaceExplorer.js +67 -71
  51. package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +1 -1
  52. package/dist/components/agents-sdk/WorkspaceFileCommands.js +11 -6
  53. package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +1 -1
  54. package/dist/components/agents-sdk/WorkspaceLive.d.ts +1 -1
  55. package/dist/components/agents-sdk/WorkspaceLive.js +7 -5
  56. package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +1 -1
  57. package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
  58. package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
  59. package/dist/components/extension/FirstRunSetup.d.ts +2 -2
  60. package/dist/minute-clock-CXpRGCMF.js +35 -0
  61. package/dist/{parts-RXV6GGdB.js → parts-CPVz9l31.js} +1 -1
  62. package/dist/{workspace-concept-panel-BDTBISNO.d.ts → workspace-concept-panel-D1czupvi.d.ts} +1 -1
  63. package/dist/{workspace-quick-look-9V-UFpjj.js → workspace-quick-look-DODjsfhH.js} +79 -251
  64. package/package.json +2 -2
@@ -1,133 +1,2 @@
1
- import { workspaceFileQueryKey } from "./Workspace.js";
2
- import { c } from "react/compiler-runtime";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { useQuery } from "@tanstack/react-query";
5
- //#region src/components/agents-sdk/ComputerFileThumbnail.tsx
6
- /** Files small enough to read for a decoration: an SVG as the image, a text file as its page. */
7
- const MAX_SVG_BYTES = 1048576;
8
- const MAX_TEXT_BYTES = 65536;
9
- const PAGE_CHARACTERS = 2048;
10
- function thumbnailKind(entry) {
11
- if (entry.type !== "file") return null;
12
- if (entry.mimeType === "image/svg+xml") return entry.size <= MAX_SVG_BYTES ? "svg" : null;
13
- return (entry.mimeType.startsWith("text/") || entry.mimeType === "application/json" || entry.mimeType === "application/javascript") && entry.size <= MAX_TEXT_BYTES ? "text" : null;
14
- }
15
- /**
16
- * A desktop or Finder thumbnail drawn from the file itself, the way Finder
17
- * draws one: an SVG shows as the image, a text file as a page of its text.
18
- * Other files draw nothing and keep their type's icon.
19
- */
20
- function ComputerFileThumbnail(t0) {
21
- const $ = c(29);
22
- const { entry, source, sourceKey } = t0;
23
- let t1;
24
- if ($[0] !== entry) {
25
- t1 = thumbnailKind(entry);
26
- $[0] = entry;
27
- $[1] = t1;
28
- } else t1 = $[1];
29
- const kind = t1;
30
- let t2;
31
- if ($[2] !== entry.path || $[3] !== entry.size || $[4] !== entry.updatedAt || $[5] !== sourceKey) {
32
- t2 = [
33
- ...workspaceFileQueryKey(sourceKey, "/", entry.path),
34
- "thumbnail",
35
- entry.updatedAt,
36
- entry.size
37
- ];
38
- $[2] = entry.path;
39
- $[3] = entry.size;
40
- $[4] = entry.updatedAt;
41
- $[5] = sourceKey;
42
- $[6] = t2;
43
- } else t2 = $[6];
44
- let t3;
45
- if ($[7] !== entry.path || $[8] !== source) {
46
- t3 = () => source.readFile(entry.path);
47
- $[7] = entry.path;
48
- $[8] = source;
49
- $[9] = t3;
50
- } else t3 = $[9];
51
- const t4 = kind !== null;
52
- let t5;
53
- if ($[10] !== t2 || $[11] !== t3 || $[12] !== t4) {
54
- t5 = {
55
- queryKey: t2,
56
- queryFn: t3,
57
- enabled: t4,
58
- staleTime: Infinity,
59
- retry: false
60
- };
61
- $[10] = t2;
62
- $[11] = t3;
63
- $[12] = t4;
64
- $[13] = t5;
65
- } else t5 = $[13];
66
- const content = useQuery(t5).data;
67
- if (!kind || !content) return null;
68
- if (kind === "svg") {
69
- const t6 = `data:image/svg+xml,${encodeURIComponent(content)}`;
70
- let t7;
71
- if ($[14] !== t6) {
72
- t7 = /* @__PURE__ */ jsx("img", {
73
- src: t6,
74
- alt: "",
75
- width: "64",
76
- height: "64"
77
- });
78
- $[14] = t6;
79
- $[15] = t7;
80
- } else t7 = $[15];
81
- return t7;
82
- }
83
- let lines;
84
- let t6;
85
- let t7;
86
- if ($[16] !== content) {
87
- const [t8, ...t9] = content.slice(0, PAGE_CHARACTERS).split("\n");
88
- lines = t9;
89
- const title = t8 === void 0 ? "" : t8;
90
- t7 = "computer-file-thumbnail";
91
- let t10;
92
- if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
93
- t10 = /^# /;
94
- $[20] = t10;
95
- } else t10 = $[20];
96
- t6 = title.replace(t10, "");
97
- $[16] = content;
98
- $[17] = lines;
99
- $[18] = t6;
100
- $[19] = t7;
101
- } else {
102
- lines = $[17];
103
- t6 = $[18];
104
- t7 = $[19];
105
- }
106
- let t8;
107
- if ($[21] !== t6) {
108
- t8 = /* @__PURE__ */ jsx("strong", { children: t6 });
109
- $[21] = t6;
110
- $[22] = t8;
111
- } else t8 = $[22];
112
- const t9 = lines.join("\n");
113
- let t10;
114
- if ($[23] !== t9) {
115
- t10 = /* @__PURE__ */ jsx("span", { children: t9 });
116
- $[23] = t9;
117
- $[24] = t10;
118
- } else t10 = $[24];
119
- let t11;
120
- if ($[25] !== t10 || $[26] !== t7 || $[27] !== t8) {
121
- t11 = /* @__PURE__ */ jsxs("span", {
122
- className: t7,
123
- children: [t8, t10]
124
- });
125
- $[25] = t10;
126
- $[26] = t7;
127
- $[27] = t8;
128
- $[28] = t11;
129
- } else t11 = $[28];
130
- return t11;
131
- }
132
- //#endregion
1
+ import { t as ComputerFileThumbnail } from "../../ComputerFileThumbnail-CXHy127c.js";
133
2
  export { ComputerFileThumbnail };
@@ -1,10 +1,10 @@
1
1
  import { l as WorkspaceNavigationAdapter, n as WorkspaceDestination } from "../../WorkspaceLink-C8HH2fMT.js";
2
2
  import { a as WorkspaceFileState } from "../../WorkspaceFile-BJC6vlp_.js";
3
- import "../../Workspace-B9nuTfIi.js";
4
- import { a as WorkspaceDrop, i as WorkspaceDragSource, u as WorkspaceTransferOperation } from "../../WorkspaceFileTransfer-BRD22nW-.js";
3
+ import "../../Workspace-mZddFyvP.js";
4
+ import { a as WorkspaceDrop, i as WorkspaceDragSource, u as WorkspaceTransferOperation } from "../../WorkspaceFileTransfer-D--dVla2.js";
5
5
  import { AgentComputerApp } from "./AgentComputer.js";
6
- import { i as WorkspaceFileCommands, s as WorkspaceVolume } from "../../WorkspaceFileCommands-1s9Ol8CG.js";
7
- import { i as WorkspaceBrowserSort } from "../../WorkspaceBrowser-Dz48H-7X.js";
6
+ import { i as WorkspaceFileCommands, s as WorkspaceVolume } from "../../WorkspaceFileCommands-CN2oVUzx.js";
7
+ import { i as WorkspaceBrowserSort } from "../../WorkspaceBrowser-CNVAKXXZ.js";
8
8
  import * as React from "react";
9
9
  import { ReactNode } from "react";
10
10
  import { FileInfo } from "@cloudflare/shell";
@@ -104,8 +104,6 @@ interface ComputerFilesHost {
104
104
  /** Folder history; null where there is nowhere to go. */
105
105
  onBack: (() => void) | null;
106
106
  onForward: (() => void) | null;
107
- /** A file's own artwork for its row, or null for the kind's icon. */
108
- renderThumbnail: (entry: FileInfo) => ReactNode;
109
107
  /**
110
108
  * What Quick Look and the file window show for a file they cannot preview,
111
109
  * such as a `WorkspaceDocumentFrame`; omit it, or return null, for the