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