@mcp-b/react-components 0.64.1 → 0.66.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 (116) hide show
  1. package/dist/AgentComputer-2uYB8kmu.js +8084 -0
  2. package/dist/{ExecutionResult-CXnGcmM4.js → ExecutionResult-C7SzVquo.js} +1 -1
  3. package/dist/WallpaperPicker-C-FItmDS.d.ts +34 -0
  4. package/dist/WorkspaceBrowser-Dz48H-7X.d.ts +89 -0
  5. package/dist/{WorkspaceFileCommands-SNIjRgtU.d.ts → WorkspaceFileCommands-1s9Ol8CG.d.ts} +11 -3
  6. package/dist/{WorkspaceMessageResponse-CXGOQgpo.js → WorkspaceMessageResponse-BoeeltJM.js} +1 -1
  7. package/dist/assets/wallpapers/README.md +31 -0
  8. package/dist/assets/wallpapers/alpine.webp +0 -0
  9. package/dist/assets/wallpapers/dusk.webp +0 -0
  10. package/dist/assets/wallpapers/ember.webp +0 -0
  11. package/dist/assets/wallpapers/graphite.webp +0 -0
  12. package/dist/assets/wallpapers/sigvelo.webp +0 -0
  13. package/dist/assets/wallpapers/tide.webp +0 -0
  14. package/dist/automations-host-DPORjdc7.js +17 -0
  15. package/dist/components/agents-sdk/AgentComputer.d.ts +7 -1
  16. package/dist/components/agents-sdk/AgentComputer.js +1 -8044
  17. package/dist/components/agents-sdk/AgentScreenSwitcher.js +1 -0
  18. package/dist/components/agents-sdk/BrowserLiveScreen.d.ts +7 -1
  19. package/dist/components/agents-sdk/BrowserLiveScreen.js +259 -257
  20. package/dist/components/agents-sdk/BrowserRunPanel.d.ts +2 -0
  21. package/dist/components/agents-sdk/BrowserRunPanel.js +1 -0
  22. package/dist/components/agents-sdk/ComputerAutomations.d.ts +70 -0
  23. package/dist/components/agents-sdk/ComputerAutomations.js +1410 -0
  24. package/dist/components/agents-sdk/ComputerCalendar.d.ts +7 -0
  25. package/dist/components/agents-sdk/ComputerCalendar.js +1344 -0
  26. package/dist/components/agents-sdk/ComputerFiles.d.ts +153 -0
  27. package/dist/components/agents-sdk/ComputerFiles.js +2401 -0
  28. package/dist/components/agents-sdk/ComputerHome.d.ts +15 -0
  29. package/dist/components/agents-sdk/ComputerHome.js +90 -0
  30. package/dist/components/agents-sdk/ComputerNotifications.d.ts +54 -0
  31. package/dist/components/agents-sdk/ComputerNotifications.js +692 -0
  32. package/dist/components/agents-sdk/ComputerScreen.d.ts +78 -0
  33. package/dist/components/agents-sdk/ComputerScreen.js +750 -0
  34. package/dist/components/agents-sdk/ComputerSettings.d.ts +69 -0
  35. package/dist/components/agents-sdk/ComputerSettings.js +1371 -0
  36. package/dist/components/agents-sdk/ComputerSpotlight.d.ts +29 -0
  37. package/dist/components/agents-sdk/ComputerSpotlight.js +232 -0
  38. package/dist/components/agents-sdk/ComputerViewer.d.ts +51 -0
  39. package/dist/components/agents-sdk/ComputerViewer.js +339 -0
  40. package/dist/components/agents-sdk/ComputerWallpapers.d.ts +11 -0
  41. package/dist/components/agents-sdk/ComputerWallpapers.js +43 -0
  42. package/dist/components/agents-sdk/EmployeeApp.js +1 -1
  43. package/dist/components/agents-sdk/EmployeeChat.js +1 -1
  44. package/dist/components/agents-sdk/EmployeeChrome.js +4 -4
  45. package/dist/components/agents-sdk/EmployeeSchedules.js +3 -3
  46. package/dist/components/agents-sdk/EmployeeStartScreen.js +1 -1
  47. package/dist/components/agents-sdk/ExecutionBoard.js +1 -1
  48. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  49. package/dist/components/agents-sdk/ManagerOfficeScreens.js +1 -1
  50. package/dist/components/agents-sdk/McpPluginCatalog.js +1 -1
  51. package/dist/components/agents-sdk/ModelSelector.js +1 -1
  52. package/dist/components/agents-sdk/ThinkChat.js +1 -1
  53. package/dist/components/agents-sdk/ThinkChatActivitySummary.js +1 -1
  54. package/dist/components/agents-sdk/ThinkChatToolPanels.js +5 -5
  55. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +3 -3
  56. package/dist/components/agents-sdk/ThinkFullApp.d.ts +13 -0
  57. package/dist/components/agents-sdk/ThinkFullApp.js +13 -0
  58. package/dist/components/agents-sdk/ThinkScheduleActions.js +1 -1
  59. package/dist/components/agents-sdk/ThinkScheduleDetail.js +3 -3
  60. package/dist/components/agents-sdk/ThinkScheduleForm.js +4 -4
  61. package/dist/components/agents-sdk/WorkspaceAutomation.js +4 -4
  62. package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1 -1
  63. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +2 -88
  64. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +1 -1
  65. package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +1 -1
  66. package/dist/components/agents-sdk/WorkspaceDocumentFrame.d.ts +17 -0
  67. package/dist/components/agents-sdk/WorkspaceDocumentFrame.js +90 -0
  68. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +4 -1
  69. package/dist/components/agents-sdk/WorkspaceExplorer.js +70 -66
  70. package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +2 -2
  71. package/dist/components/agents-sdk/WorkspaceFileCommands.js +346 -316
  72. package/dist/components/agents-sdk/WorkspaceFileView.d.ts +7 -1
  73. package/dist/components/agents-sdk/WorkspaceFileView.js +83 -71
  74. package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
  75. package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -4
  76. package/dist/components/agents-sdk/WorkspaceLive.js +18 -11
  77. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  78. package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -1
  79. package/dist/components/agents-sdk/WorkspaceProject.js +7 -4
  80. package/dist/components/ai-sdk/ConnectedAppCards.js +1 -1
  81. package/dist/components/ai-sdk/Goal.d.ts +1 -2
  82. package/dist/components/ai-sdk/Goal.js +1 -2
  83. package/dist/components/extension/FirstRunSetup.d.ts +132 -37
  84. package/dist/components/extension/FirstRunSetup.js +1920 -1567
  85. package/dist/components/general-purpose/CommandPalette.d.ts +6 -1
  86. package/dist/components/general-purpose/CommandPalette.js +90 -82
  87. package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
  88. package/dist/components/general-purpose/StatusScreen.d.ts +6 -1
  89. package/dist/components/general-purpose/StatusScreen.js +44 -36
  90. package/dist/components/general-purpose/ThemeModeControl.js +1 -1
  91. package/dist/components/general-purpose/WallpaperPicker.d.ts +2 -33
  92. package/dist/components/nanites/AgentConnection.js +1 -1
  93. package/dist/parts-BxJC0QVb.js +112 -0
  94. package/dist/styles/agent-computer.css +28 -0
  95. package/dist/styles/base.css +6 -0
  96. package/dist/styles/chatgpt-sign-in-screen.css +2 -0
  97. package/dist/styles/computer-app-tile.css +20 -0
  98. package/dist/styles/computer-automations.css +454 -0
  99. package/dist/styles/computer-calendar.css +648 -0
  100. package/dist/styles/computer-files.css +566 -0
  101. package/dist/styles/computer-home.css +90 -0
  102. package/dist/styles/computer-notifications.css +242 -0
  103. package/dist/styles/computer-screen.css +89 -0
  104. package/dist/styles/computer-settings.css +550 -0
  105. package/dist/styles/computer-spotlight.css +7 -0
  106. package/dist/styles/computer-viewer.css +130 -0
  107. package/dist/styles/first-run-setup.css +107 -96
  108. package/dist/styles/index.css +11 -0
  109. package/dist/styles/recipes.css +42 -0
  110. package/dist/styles/select.css +2 -1
  111. package/dist/styles/switch.css +20 -5
  112. package/dist/styles/workspace-document-frame.css +31 -0
  113. package/package.json +2 -2
  114. package/dist/{ManagerOffice-T79utm-P.js → ManagerOffice-kSK7vTBl.js} +1 -1
  115. package/dist/{WorkspaceLink-DDkj-Tq5.js → WorkspaceLink-DK9kdMUH.js} +1 -1
  116. package/dist/{connected-app-drafts-Bocdg3Z-.js → connected-app-drafts-C49343p9.js} +1 -1
@@ -0,0 +1,692 @@
1
+ import { W as MonitorIcon, c as BellIcon, g as ChevronRightIcon, p as CheckIcon } 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 } from "../../AgentComputer-2uYB8kmu.js";
6
+ import { Popover } from "../foundations/Popover.js";
7
+ import { Toast } from "../foundations/Toast.js";
8
+ import { c } from "react/compiler-runtime";
9
+ import { useEffect, useRef, useState } from "react";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ //#region src/components/agents-sdk/ComputerNotifications.tsx
12
+ const timeOfDay = new Intl.DateTimeFormat(void 0, {
13
+ hour: "numeric",
14
+ minute: "2-digit"
15
+ });
16
+ /** The source line every notification leads with: its app and when it arrived. */
17
+ function NotificationSource(t0) {
18
+ const $ = c(10);
19
+ const { item } = t0;
20
+ const t1 = item.source;
21
+ let t2;
22
+ if ($[0] !== item.at) {
23
+ t2 = new Date(item.at).toISOString();
24
+ $[0] = item.at;
25
+ $[1] = t2;
26
+ } else t2 = $[1];
27
+ let t3;
28
+ if ($[2] !== item.at) {
29
+ t3 = timeOfDay.format(item.at);
30
+ $[2] = item.at;
31
+ $[3] = t3;
32
+ } else t3 = $[3];
33
+ let t4;
34
+ if ($[4] !== t2 || $[5] !== t3) {
35
+ t4 = /* @__PURE__ */ jsx("time", {
36
+ dateTime: t2,
37
+ children: t3
38
+ });
39
+ $[4] = t2;
40
+ $[5] = t3;
41
+ $[6] = t4;
42
+ } else t4 = $[6];
43
+ let t5;
44
+ if ($[7] !== item.source || $[8] !== t4) {
45
+ t5 = /* @__PURE__ */ jsxs("span", {
46
+ className: "computer-notifications__source",
47
+ children: [t1, t4]
48
+ });
49
+ $[7] = item.source;
50
+ $[8] = t4;
51
+ $[9] = t5;
52
+ } else t5 = $[9];
53
+ return t5;
54
+ }
55
+ /**
56
+ * Banners keep clear of keyboard focus: one that would cover the focused
57
+ * control steps down below it until focus moves on, so a toolbar or a first
58
+ * row under the top-right corner stays visible while it is being used.
59
+ */
60
+ function useBannersYieldToFocus(element) {
61
+ const $ = c(3);
62
+ let t0;
63
+ let t1;
64
+ if ($[0] !== element) {
65
+ t0 = () => {
66
+ if (!element) return;
67
+ const viewport = element;
68
+ const doc = viewport.ownerDocument;
69
+ let shift = 0;
70
+ const place = function place(event) {
71
+ const target = event.target;
72
+ if (!(target instanceof Element) || viewport.contains(target)) return;
73
+ const banners = [...viewport.querySelectorAll("[data-slot=\"toast\"]")].map(_temp);
74
+ let next = 0;
75
+ if (banners.length && target.matches(":focus-visible")) {
76
+ const top = Math.min(...banners.map(_temp2)) - shift;
77
+ const bottom = Math.max(...banners.map(_temp3)) - shift;
78
+ const left = Math.min(...banners.map(_temp4));
79
+ const right = Math.max(...banners.map(_temp5));
80
+ const focus = target.getBoundingClientRect();
81
+ if (focus.height < bottom - top && focus.bottom > top && focus.top < bottom && focus.right > left && focus.left < right) next = Math.ceil(focus.bottom - top) + 8;
82
+ }
83
+ if (next === shift) return;
84
+ shift = next;
85
+ viewport.style.setProperty("--notifications-banner-yield", `${shift}px`);
86
+ };
87
+ doc.addEventListener("focusin", place);
88
+ return () => doc.removeEventListener("focusin", place);
89
+ };
90
+ t1 = [element];
91
+ $[0] = element;
92
+ $[1] = t0;
93
+ $[2] = t1;
94
+ } else {
95
+ t0 = $[1];
96
+ t1 = $[2];
97
+ }
98
+ useEffect(t0, t1);
99
+ }
100
+ function _temp5(box_2) {
101
+ return box_2.right;
102
+ }
103
+ function _temp4(box_1) {
104
+ return box_1.left;
105
+ }
106
+ function _temp3(box_0) {
107
+ return box_0.bottom;
108
+ }
109
+ function _temp2(box) {
110
+ return box.top;
111
+ }
112
+ function _temp(banner) {
113
+ return banner.getBoundingClientRect();
114
+ }
115
+ function NotificationBanners(t0) {
116
+ const $ = c(22);
117
+ const { items, centerOpen } = t0;
118
+ const manager = Toast.useToastManager();
119
+ const container = useAgentComputerPortalContainer();
120
+ let t1;
121
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
122
+ t1 = /* @__PURE__ */ new Set();
123
+ $[0] = t1;
124
+ } else t1 = $[0];
125
+ const announced = useRef(t1);
126
+ const [viewport, setViewport] = useState(null);
127
+ useBannersYieldToFocus(viewport);
128
+ let t2;
129
+ let t3;
130
+ if ($[1] !== items || $[2] !== manager) {
131
+ t2 = () => {
132
+ for (const item of items) {
133
+ if (announced.current.has(item.id)) continue;
134
+ announced.current.add(item.id);
135
+ manager.add({
136
+ id: item.id,
137
+ title: item.title,
138
+ description: item.body,
139
+ timeout: 8e3
140
+ });
141
+ }
142
+ for (const toast of manager.toasts) {
143
+ const item_0 = items.find((candidate) => candidate.id === toast.id);
144
+ if (!item_0 && !toast.transitionStatus) manager.close(toast.id);
145
+ else if (item_0 && toast.transitionStatus !== "ending" && (toast.title !== item_0.title || toast.description !== item_0.body)) manager.update(toast.id, {
146
+ title: item_0.title,
147
+ description: item_0.body
148
+ });
149
+ }
150
+ };
151
+ t3 = [items, manager];
152
+ $[1] = items;
153
+ $[2] = manager;
154
+ $[3] = t2;
155
+ $[4] = t3;
156
+ } else {
157
+ t2 = $[3];
158
+ t3 = $[4];
159
+ }
160
+ useEffect(t2, t3);
161
+ let t4;
162
+ let t5;
163
+ if ($[5] !== container || $[6] !== manager) {
164
+ t4 = () => {
165
+ const computer = container?.closest("[data-slot=\"agent-computer\"]");
166
+ if (!computer) return;
167
+ const retract = (event) => {
168
+ if (!computer.matches("[data-phone]")) return;
169
+ if (event.target.closest(".computer-notifications__banners")) return;
170
+ manager.close();
171
+ };
172
+ computer.addEventListener("pointerdown", retract, true);
173
+ return () => computer.removeEventListener("pointerdown", retract, true);
174
+ };
175
+ t5 = [container, manager];
176
+ $[5] = container;
177
+ $[6] = manager;
178
+ $[7] = t4;
179
+ $[8] = t5;
180
+ } else {
181
+ t4 = $[7];
182
+ t5 = $[8];
183
+ }
184
+ useEffect(t4, t5);
185
+ let t6;
186
+ let t7;
187
+ if ($[9] !== centerOpen || $[10] !== manager) {
188
+ t6 = () => {
189
+ if (!centerOpen) return;
190
+ for (const toast_0 of manager.toasts) if (toast_0.transitionStatus !== "ending") manager.close(toast_0.id);
191
+ };
192
+ t7 = [centerOpen, manager];
193
+ $[9] = centerOpen;
194
+ $[10] = manager;
195
+ $[11] = t6;
196
+ $[12] = t7;
197
+ } else {
198
+ t6 = $[11];
199
+ t7 = $[12];
200
+ }
201
+ useEffect(t6, t7);
202
+ let t8;
203
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
204
+ t8 = {
205
+ x: 0,
206
+ y: 0
207
+ };
208
+ $[13] = t8;
209
+ } else t8 = $[13];
210
+ const press = useRef(t8);
211
+ let t9;
212
+ if ($[14] !== items || $[15] !== manager) {
213
+ t9 = manager.toasts.map((toast_1) => {
214
+ const item_1 = items.find((candidate_0) => candidate_0.id === toast_1.id);
215
+ if (!item_1) return null;
216
+ return /* @__PURE__ */ jsxs(Toast.Root, {
217
+ toast: toast_1,
218
+ swipeDirection: ["up", "right"],
219
+ children: [/* @__PURE__ */ jsxs(Toast.Content, {
220
+ className: "computer-notifications__card",
221
+ onPointerDown: (event_0) => {
222
+ press.current = {
223
+ x: event_0.clientX,
224
+ y: event_0.clientY
225
+ };
226
+ },
227
+ onClick: (event_1) => {
228
+ if (event_1.target.closest("button")) return;
229
+ const moved = Math.hypot(event_1.clientX - press.current.x, event_1.clientY - press.current.y);
230
+ if (event_1.detail !== 0 && moved > 8) return;
231
+ event_1.currentTarget.querySelector("[data-slot=\"toast-action\"]")?.click();
232
+ },
233
+ children: [/* @__PURE__ */ jsx(AppIcon.Root, {
234
+ size: "md",
235
+ "aria-hidden": "true",
236
+ children: item_1.icon
237
+ }), /* @__PURE__ */ jsxs("span", {
238
+ className: "computer-notifications__copy",
239
+ children: [
240
+ /* @__PURE__ */ jsx(NotificationSource, { item: item_1 }),
241
+ /* @__PURE__ */ jsx(Toast.Title, {
242
+ className: "computer-notifications__title",
243
+ children: item_1.title
244
+ }),
245
+ /* @__PURE__ */ jsx(Toast.Description, {
246
+ className: "computer-notifications__body",
247
+ children: item_1.body
248
+ }),
249
+ /* @__PURE__ */ jsx(Toast.Action, {
250
+ render: /* @__PURE__ */ jsx("button", { type: "button" }),
251
+ className: "computer-notifications__action",
252
+ onClick: (event_2) => {
253
+ const banner = event_2.currentTarget.closest("[data-slot=\"toast\"]");
254
+ manager.close(toast_1.id);
255
+ item_1.onOpen(banner);
256
+ },
257
+ children: item_1.action
258
+ })
259
+ ]
260
+ })]
261
+ }), /* @__PURE__ */ jsx(Toast.Close, { label: `Dismiss ${item_1.title} banner` })]
262
+ }, toast_1.id);
263
+ });
264
+ $[14] = items;
265
+ $[15] = manager;
266
+ $[16] = t9;
267
+ } else t9 = $[16];
268
+ let t10;
269
+ if ($[17] !== t9) {
270
+ t10 = /* @__PURE__ */ jsx(Toast.Viewport, {
271
+ ref: setViewport,
272
+ position: "top-end",
273
+ className: "computer-notifications__banners",
274
+ children: t9
275
+ });
276
+ $[17] = t9;
277
+ $[18] = t10;
278
+ } else t10 = $[18];
279
+ let t11;
280
+ if ($[19] !== container || $[20] !== t10) {
281
+ t11 = /* @__PURE__ */ jsx(Toast.Portal, {
282
+ container,
283
+ children: t10
284
+ });
285
+ $[19] = container;
286
+ $[20] = t10;
287
+ $[21] = t11;
288
+ } else t11 = $[21];
289
+ return t11;
290
+ }
291
+ /**
292
+ * The menu bar's date and time, as macOS ends its status items: "Mon Sep 7
293
+ * 9:41 AM", in a `<time>` with the instant shown, ticking on the minute. The
294
+ * child of `ComputerNotifications`.
295
+ */
296
+ function ComputerClock(t0) {
297
+ const $ = c(26);
298
+ const { now: t1, timeZone } = t0;
299
+ const now = t1 === void 0 ? Date.now : t1;
300
+ const [instant, setInstant] = useState(now);
301
+ let t2;
302
+ let t3;
303
+ if ($[0] !== now) {
304
+ t2 = () => {
305
+ let timer;
306
+ const schedule = (current) => {
307
+ timer = setTimeout(() => {
308
+ const next = now();
309
+ setInstant(next);
310
+ schedule(next);
311
+ }, 6e4 - current % 6e4);
312
+ };
313
+ schedule(now());
314
+ return () => clearTimeout(timer);
315
+ };
316
+ t3 = [now];
317
+ $[0] = now;
318
+ $[1] = t2;
319
+ $[2] = t3;
320
+ } else {
321
+ t2 = $[1];
322
+ t3 = $[2];
323
+ }
324
+ useEffect(t2, t3);
325
+ let t4;
326
+ if ($[3] !== timeZone) {
327
+ t4 = new Intl.DateTimeFormat(void 0, {
328
+ weekday: "short",
329
+ month: "short",
330
+ day: "numeric",
331
+ timeZone
332
+ });
333
+ $[3] = timeZone;
334
+ $[4] = t4;
335
+ } else t4 = $[4];
336
+ let t5;
337
+ if ($[5] !== timeZone) {
338
+ t5 = new Intl.DateTimeFormat(void 0, {
339
+ hour: "numeric",
340
+ minute: "2-digit",
341
+ timeZone
342
+ });
343
+ $[5] = timeZone;
344
+ $[6] = t5;
345
+ } else t5 = $[6];
346
+ let t6;
347
+ if ($[7] !== t4 || $[8] !== t5) {
348
+ t6 = [t4, t5];
349
+ $[7] = t4;
350
+ $[8] = t5;
351
+ $[9] = t6;
352
+ } else t6 = $[9];
353
+ const [date, time] = t6;
354
+ let t7;
355
+ if ($[10] !== instant) {
356
+ t7 = new Date(instant).toISOString();
357
+ $[10] = instant;
358
+ $[11] = t7;
359
+ } else t7 = $[11];
360
+ let t8;
361
+ if ($[12] !== date || $[13] !== instant) {
362
+ t8 = date.format(instant).replace(",", "");
363
+ $[12] = date;
364
+ $[13] = instant;
365
+ $[14] = t8;
366
+ } else t8 = $[14];
367
+ let t9;
368
+ if ($[15] !== t8) {
369
+ t9 = /* @__PURE__ */ jsx("span", { children: t8 });
370
+ $[15] = t8;
371
+ $[16] = t9;
372
+ } else t9 = $[16];
373
+ let t10;
374
+ if ($[17] !== instant || $[18] !== time) {
375
+ t10 = time.format(instant);
376
+ $[17] = instant;
377
+ $[18] = time;
378
+ $[19] = t10;
379
+ } else t10 = $[19];
380
+ let t11;
381
+ if ($[20] !== t10) {
382
+ t11 = /* @__PURE__ */ jsx("span", { children: t10 });
383
+ $[20] = t10;
384
+ $[21] = t11;
385
+ } else t11 = $[21];
386
+ let t12;
387
+ if ($[22] !== t11 || $[23] !== t7 || $[24] !== t9) {
388
+ t12 = /* @__PURE__ */ jsxs("time", {
389
+ className: "computer-clock",
390
+ dateTime: t7,
391
+ children: [t9, t11]
392
+ });
393
+ $[22] = t11;
394
+ $[23] = t7;
395
+ $[24] = t9;
396
+ $[25] = t12;
397
+ } else t12 = $[25];
398
+ return t12;
399
+ }
400
+ /**
401
+ * Notification Center behind the menu-bar clock, and the banners that
402
+ * announce each new notification, portalled into the computer. For
403
+ * `AgentComputer`'s `status`.
404
+ */
405
+ function ComputerNotifications(t0) {
406
+ const $ = c(25);
407
+ const { items, children } = t0;
408
+ const [open, setOpen] = useState(false);
409
+ const container = useAgentComputerPortalContainer();
410
+ let t1;
411
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
412
+ t1 = /* @__PURE__ */ jsx(Button, {
413
+ variant: "ghost",
414
+ size: "xs"
415
+ });
416
+ $[0] = t1;
417
+ } else t1 = $[0];
418
+ const t2 = `Notifications, ${items.length} ${items.length === 1 ? "notification" : "notifications"}`;
419
+ let t3;
420
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
421
+ t3 = /* @__PURE__ */ jsx(BellIcon, {});
422
+ $[1] = t3;
423
+ } else t3 = $[1];
424
+ let t4;
425
+ if ($[2] !== items.length) {
426
+ t4 = items.length > 0 ? /* @__PURE__ */ jsx("span", {
427
+ className: "computer-notifications__count",
428
+ children: items.length
429
+ }) : null;
430
+ $[2] = items.length;
431
+ $[3] = t4;
432
+ } else t4 = $[3];
433
+ let t5;
434
+ if ($[4] !== children || $[5] !== t2 || $[6] !== t4) {
435
+ t5 = /* @__PURE__ */ jsxs(Popover.Trigger, {
436
+ className: "computer-notifications__trigger",
437
+ render: t1,
438
+ "aria-label": t2,
439
+ children: [
440
+ t3,
441
+ t4,
442
+ children
443
+ ]
444
+ });
445
+ $[4] = children;
446
+ $[5] = t2;
447
+ $[6] = t4;
448
+ $[7] = t5;
449
+ } else t5 = $[7];
450
+ let t6;
451
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
452
+ t6 = /* @__PURE__ */ jsx(Popover.Backdrop, { className: "computer-notifications__scrim" });
453
+ $[8] = t6;
454
+ } else t6 = $[8];
455
+ let t7;
456
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
457
+ t7 = /* @__PURE__ */ jsx(Popover.Title, {
458
+ className: "sigvelo-visually-hidden",
459
+ children: "Notifications"
460
+ });
461
+ $[9] = t7;
462
+ } else t7 = $[9];
463
+ let t8;
464
+ if ($[10] !== items) {
465
+ t8 = /* @__PURE__ */ jsx(Popover.Positioner, {
466
+ align: "end",
467
+ sideOffset: 12,
468
+ children: /* @__PURE__ */ jsxs(Popover.Popup, {
469
+ className: "computer-notifications__center",
470
+ children: [t7, items.length ? /* @__PURE__ */ jsx("ol", {
471
+ className: "computer-notifications__list",
472
+ children: items.map(_temp6)
473
+ }) : /* @__PURE__ */ jsxs("p", {
474
+ className: "computer-notifications__empty",
475
+ children: [/* @__PURE__ */ jsx(CheckIcon, {}), " No notifications"]
476
+ })]
477
+ })
478
+ });
479
+ $[10] = items;
480
+ $[11] = t8;
481
+ } else t8 = $[11];
482
+ let t9;
483
+ if ($[12] !== container || $[13] !== t8) {
484
+ t9 = /* @__PURE__ */ jsxs(Popover.Portal, {
485
+ container,
486
+ children: [t6, t8]
487
+ });
488
+ $[12] = container;
489
+ $[13] = t8;
490
+ $[14] = t9;
491
+ } else t9 = $[14];
492
+ let t10;
493
+ if ($[15] !== open || $[16] !== t5 || $[17] !== t9) {
494
+ t10 = /* @__PURE__ */ jsxs(Popover.Root, {
495
+ open,
496
+ onOpenChange: setOpen,
497
+ children: [t5, t9]
498
+ });
499
+ $[15] = open;
500
+ $[16] = t5;
501
+ $[17] = t9;
502
+ $[18] = t10;
503
+ } else t10 = $[18];
504
+ let t11;
505
+ if ($[19] !== items || $[20] !== open) {
506
+ t11 = /* @__PURE__ */ jsx(NotificationBanners, {
507
+ items,
508
+ centerOpen: open
509
+ });
510
+ $[19] = items;
511
+ $[20] = open;
512
+ $[21] = t11;
513
+ } else t11 = $[21];
514
+ let t12;
515
+ if ($[22] !== t10 || $[23] !== t11) {
516
+ t12 = /* @__PURE__ */ jsxs(Toast.Provider, { children: [t10, t11] });
517
+ $[22] = t10;
518
+ $[23] = t11;
519
+ $[24] = t12;
520
+ } else t12 = $[24];
521
+ return t12;
522
+ }
523
+ function _temp6(item) {
524
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(Popover.Close, {
525
+ className: "computer-notifications__card",
526
+ render: /* @__PURE__ */ jsx("button", { type: "button" }),
527
+ onClick: (event) => item.onOpen(event.currentTarget),
528
+ children: [/* @__PURE__ */ jsx(AppIcon.Root, {
529
+ size: "md",
530
+ "aria-hidden": "true",
531
+ children: item.icon
532
+ }), /* @__PURE__ */ jsxs("span", {
533
+ className: "computer-notifications__copy",
534
+ children: [
535
+ /* @__PURE__ */ jsx(NotificationSource, { item }),
536
+ /* @__PURE__ */ jsx("strong", {
537
+ className: "computer-notifications__title",
538
+ children: item.title
539
+ }),
540
+ /* @__PURE__ */ jsx("span", {
541
+ className: "computer-notifications__body",
542
+ children: item.body
543
+ }),
544
+ /* @__PURE__ */ jsx("span", {
545
+ className: "computer-notifications__action",
546
+ children: item.action
547
+ })
548
+ ]
549
+ })]
550
+ }) }, item.id);
551
+ }
552
+ /** The menu bar's Appearance extra: quick controls and the way to the wallpaper app. */
553
+ function ComputerAppearanceMenu(t0) {
554
+ const $ = c(21);
555
+ const { wallpaper, onOpenWallpapers, children } = t0;
556
+ const openingApp = useRef(false);
557
+ let t1;
558
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
559
+ t1 = (open) => {
560
+ if (open) openingApp.current = false;
561
+ };
562
+ $[0] = t1;
563
+ } else t1 = $[0];
564
+ let t2;
565
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
566
+ t2 = /* @__PURE__ */ jsx(Popover.Trigger, {
567
+ unstyled: true,
568
+ className: "computer-appearance__trigger",
569
+ render: /* @__PURE__ */ jsx(IconButton, {
570
+ label: "Appearance",
571
+ size: "xs",
572
+ variant: "ghost",
573
+ color: "neutral",
574
+ children: /* @__PURE__ */ jsx(MonitorIcon, {})
575
+ })
576
+ });
577
+ $[1] = t2;
578
+ } else t2 = $[1];
579
+ let t3;
580
+ let t4;
581
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
582
+ t3 = () => openingApp.current ? false : true;
583
+ t4 = /* @__PURE__ */ jsx(Popover.Title, { children: "Appearance" });
584
+ $[2] = t3;
585
+ $[3] = t4;
586
+ } else {
587
+ t3 = $[2];
588
+ t4 = $[3];
589
+ }
590
+ let t5;
591
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
592
+ t5 = /* @__PURE__ */ jsx(Button, {
593
+ variant: "ghost",
594
+ color: "neutral",
595
+ className: "computer-appearance__wallpaper"
596
+ });
597
+ $[4] = t5;
598
+ } else t5 = $[4];
599
+ let t6;
600
+ if ($[5] !== onOpenWallpapers) {
601
+ t6 = () => {
602
+ openingApp.current = true;
603
+ onOpenWallpapers();
604
+ };
605
+ $[5] = onOpenWallpapers;
606
+ $[6] = t6;
607
+ } else t6 = $[6];
608
+ let t7;
609
+ if ($[7] !== wallpaper.background) {
610
+ t7 = /* @__PURE__ */ jsx("span", {
611
+ className: "computer-appearance__thumbnail",
612
+ style: { background: wallpaper.background },
613
+ "aria-hidden": "true"
614
+ });
615
+ $[7] = wallpaper.background;
616
+ $[8] = t7;
617
+ } else t7 = $[8];
618
+ let t8;
619
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
620
+ t8 = /* @__PURE__ */ jsx("span", {
621
+ className: "computer-appearance__label",
622
+ children: "Background"
623
+ });
624
+ $[9] = t8;
625
+ } else t8 = $[9];
626
+ let t9;
627
+ if ($[10] !== wallpaper.label) {
628
+ t9 = /* @__PURE__ */ jsxs("span", { children: [t8, /* @__PURE__ */ jsx("span", {
629
+ className: "computer-appearance__name",
630
+ children: wallpaper.label
631
+ })] });
632
+ $[10] = wallpaper.label;
633
+ $[11] = t9;
634
+ } else t9 = $[11];
635
+ let t10;
636
+ let t11;
637
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
638
+ t10 = /* @__PURE__ */ jsx(ChevronRightIcon, {});
639
+ t11 = /* @__PURE__ */ jsx("span", {
640
+ className: "sigvelo-visually-hidden",
641
+ children: "Change background"
642
+ });
643
+ $[12] = t10;
644
+ $[13] = t11;
645
+ } else {
646
+ t10 = $[12];
647
+ t11 = $[13];
648
+ }
649
+ let t12;
650
+ if ($[14] !== t6 || $[15] !== t7 || $[16] !== t9) {
651
+ t12 = /* @__PURE__ */ jsxs(Popover.Close, {
652
+ render: t5,
653
+ onClick: t6,
654
+ children: [
655
+ t7,
656
+ t9,
657
+ t10,
658
+ t11
659
+ ]
660
+ });
661
+ $[14] = t6;
662
+ $[15] = t7;
663
+ $[16] = t9;
664
+ $[17] = t12;
665
+ } else t12 = $[17];
666
+ let t13;
667
+ if ($[18] !== children || $[19] !== t12) {
668
+ t13 = /* @__PURE__ */ jsxs(Popover.Root, {
669
+ onOpenChange: t1,
670
+ children: [t2, /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
671
+ side: "bottom",
672
+ align: "end",
673
+ sideOffset: 8,
674
+ children: /* @__PURE__ */ jsxs(Popover.Popup, {
675
+ className: "computer-appearance",
676
+ finalFocus: t3,
677
+ children: [
678
+ t4,
679
+ children,
680
+ t12
681
+ ]
682
+ })
683
+ }) })]
684
+ });
685
+ $[18] = children;
686
+ $[19] = t12;
687
+ $[20] = t13;
688
+ } else t13 = $[20];
689
+ return t13;
690
+ }
691
+ //#endregion
692
+ export { ComputerAppearanceMenu, ComputerClock, ComputerNotifications };