react-os-shell 3.18.0 → 3.19.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/{Browser-IOBONCZC.js → Browser-CHCL2XCI.js} +5 -5
- package/dist/{Browser-IOBONCZC.js.map → Browser-CHCL2XCI.js.map} +1 -1
- package/dist/{Calculator-B3KGTYLY.js → Calculator-IYQBRKNC.js} +4 -4
- package/dist/{Calculator-B3KGTYLY.js.map → Calculator-IYQBRKNC.js.map} +1 -1
- package/dist/{CurrencyConverter-WZIIGN4U.js → CurrencyConverter-JC2U6AD5.js} +4 -4
- package/dist/{CurrencyConverter-WZIIGN4U.js.map → CurrencyConverter-JC2U6AD5.js.map} +1 -1
- package/dist/{Documents-ANDEPGKO.js → Documents-ZKNFPZSQ.js} +5 -5
- package/dist/{Documents-ANDEPGKO.js.map → Documents-ZKNFPZSQ.js.map} +1 -1
- package/dist/{Files-XT4MLFCU.js → Files-D3DLAWPB.js} +5 -5
- package/dist/{Files-XT4MLFCU.js.map → Files-D3DLAWPB.js.map} +1 -1
- package/dist/{Notepad-NPOWW7MO.js → Notepad-ROCYE66F.js} +5 -5
- package/dist/{Notepad-NPOWW7MO.js.map → Notepad-ROCYE66F.js.map} +1 -1
- package/dist/{PomodoroTimer-2LV36KKW.js → PomodoroTimer-5HUENCFB.js} +5 -5
- package/dist/{PomodoroTimer-2LV36KKW.js.map → PomodoroTimer-5HUENCFB.js.map} +1 -1
- package/dist/{Preview-QSLIBJN2.js → Preview-YBEAIJWC.js} +5 -5
- package/dist/{Preview-QSLIBJN2.js.map → Preview-YBEAIJWC.js.map} +1 -1
- package/dist/{Spreadsheet-HMUD3DQT.js → Spreadsheet-ZPZ3ZSQW.js} +5 -5
- package/dist/{Spreadsheet-HMUD3DQT.js.map → Spreadsheet-ZPZ3ZSQW.js.map} +1 -1
- package/dist/{Stock-7XUOKZXY.js → Stock-OX7CDMRJ.js} +4 -4
- package/dist/{Stock-7XUOKZXY.js.map → Stock-OX7CDMRJ.js.map} +1 -1
- package/dist/{Weather-TEQ5QYND.js → Weather-5MCEUYIK.js} +4 -4
- package/dist/{Weather-TEQ5QYND.js.map → Weather-5MCEUYIK.js.map} +1 -1
- package/dist/{WorldClock-BKEAN2VD.js → WorldClock-I4E7BXFK.js} +4 -4
- package/dist/{WorldClock-BKEAN2VD.js.map → WorldClock-I4E7BXFK.js.map} +1 -1
- package/dist/apps/index.js +15 -15
- package/dist/{chunk-XTIQ4WTK.js → chunk-3ZRS7MY7.js} +3 -3
- package/dist/{chunk-XTIQ4WTK.js.map → chunk-3ZRS7MY7.js.map} +1 -1
- package/dist/{chunk-777B3U2Q.js → chunk-73IUVYII.js} +3 -3
- package/dist/{chunk-777B3U2Q.js.map → chunk-73IUVYII.js.map} +1 -1
- package/dist/{chunk-PAAX2MHL.js → chunk-RPSFO2H2.js} +85 -24
- package/dist/chunk-RPSFO2H2.js.map +1 -0
- package/dist/chunk-TMV4ZMIJ.js +7 -0
- package/dist/{chunk-5GBXXTFJ.js.map → chunk-TMV4ZMIJ.js.map} +1 -1
- package/dist/{chunk-2ZA5WWBZ.js → chunk-VF2OX22J.js} +4 -4
- package/dist/{chunk-2ZA5WWBZ.js.map → chunk-VF2OX22J.js.map} +1 -1
- package/dist/index.js +6 -6
- package/package.json +1 -1
- package/dist/chunk-5GBXXTFJ.js +0 -7
- package/dist/chunk-PAAX2MHL.js.map +0 -1
|
@@ -1618,9 +1618,10 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
1618
1618
|
}, [open, onNext, onPrev, hasNav, showBoundaryToast, modalId]);
|
|
1619
1619
|
if (!open || interceptedRef.current) return null;
|
|
1620
1620
|
const exposeTile = exposeActive ? computeExposeTile(modalId) : null;
|
|
1621
|
+
const exposeScale = exposeActive && exposeTile ? Math.min(exposeTile.w / box.w, exposeTile.h / box.h) : 1;
|
|
1621
1622
|
const exposeStyle = (() => {
|
|
1622
1623
|
if (exposeActive && exposeTile) {
|
|
1623
|
-
const scale =
|
|
1624
|
+
const scale = exposeScale;
|
|
1624
1625
|
const scaledW = box.w * scale;
|
|
1625
1626
|
const scaledH = box.h * scale;
|
|
1626
1627
|
const tx = exposeTile.x + (exposeTile.w - scaledW) / 2 - box.x;
|
|
@@ -1659,6 +1660,7 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
1659
1660
|
className: `fixed rounded-2xl flex flex-col overflow-hidden ${widget ? isActive ? "shadow-2xl" : "shadow-lg" : `border ${isActive ? "shadow-2xl border-gray-200" : "shadow-lg border-gray-300"}`}`,
|
|
1660
1661
|
onMouseDownCapture: (e) => {
|
|
1661
1662
|
if (exposeActive) {
|
|
1663
|
+
if (e.target.closest("[data-expose-close]")) return;
|
|
1662
1664
|
e.preventDefault();
|
|
1663
1665
|
e.stopPropagation();
|
|
1664
1666
|
setExposeExitFocus(modalId);
|
|
@@ -1911,7 +1913,36 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
1911
1913
|
onClick: (e) => {
|
|
1912
1914
|
e.stopPropagation();
|
|
1913
1915
|
e.preventDefault();
|
|
1914
|
-
}
|
|
1916
|
+
},
|
|
1917
|
+
children: exposeHovered && /* @__PURE__ */ jsx(
|
|
1918
|
+
"button",
|
|
1919
|
+
{
|
|
1920
|
+
type: "button",
|
|
1921
|
+
"data-expose-close": true,
|
|
1922
|
+
"aria-label": "Close window",
|
|
1923
|
+
title: "Close",
|
|
1924
|
+
className: "absolute flex items-center justify-center rounded-full bg-black/55 text-white shadow-lg ring-1 ring-white/40 transition-colors hover:bg-red-500",
|
|
1925
|
+
style: {
|
|
1926
|
+
top: 8,
|
|
1927
|
+
right: 8,
|
|
1928
|
+
width: 30,
|
|
1929
|
+
height: 30,
|
|
1930
|
+
transform: `scale(${1 / exposeScale})`,
|
|
1931
|
+
transformOrigin: "top right",
|
|
1932
|
+
zIndex: 1e4
|
|
1933
|
+
},
|
|
1934
|
+
onMouseDown: (e) => {
|
|
1935
|
+
e.stopPropagation();
|
|
1936
|
+
e.preventDefault();
|
|
1937
|
+
},
|
|
1938
|
+
onClick: (e) => {
|
|
1939
|
+
e.stopPropagation();
|
|
1940
|
+
e.preventDefault();
|
|
1941
|
+
guardedClose();
|
|
1942
|
+
},
|
|
1943
|
+
children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.2, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) })
|
|
1944
|
+
}
|
|
1945
|
+
)
|
|
1915
1946
|
}
|
|
1916
1947
|
)
|
|
1917
1948
|
]
|
|
@@ -2148,6 +2179,26 @@ function findPanelByLabel(label) {
|
|
|
2148
2179
|
}
|
|
2149
2180
|
return null;
|
|
2150
2181
|
}
|
|
2182
|
+
var PEEK_STYLE_ID = "rosh-peek-style";
|
|
2183
|
+
function ensurePeekStyle() {
|
|
2184
|
+
if (typeof document === "undefined" || document.getElementById(PEEK_STYLE_ID)) return;
|
|
2185
|
+
const style = document.createElement("style");
|
|
2186
|
+
style.id = PEEK_STYLE_ID;
|
|
2187
|
+
style.textContent = "body.rosh-peeking [data-modal-panel]{transition:opacity .18s ease;opacity:.4}body.rosh-peeking [data-modal-panel][data-peek-focus]{opacity:1}";
|
|
2188
|
+
document.head.appendChild(style);
|
|
2189
|
+
}
|
|
2190
|
+
function setPeekFocus(panel) {
|
|
2191
|
+
if (typeof document === "undefined") return;
|
|
2192
|
+
ensurePeekStyle();
|
|
2193
|
+
document.querySelectorAll("[data-modal-panel][data-peek-focus]").forEach((el) => el.removeAttribute("data-peek-focus"));
|
|
2194
|
+
if (panel) panel.setAttribute("data-peek-focus", "");
|
|
2195
|
+
document.body.classList.toggle("rosh-peeking", !!panel);
|
|
2196
|
+
}
|
|
2197
|
+
function clearPeekFocus() {
|
|
2198
|
+
if (typeof document === "undefined") return;
|
|
2199
|
+
document.body.classList.remove("rosh-peeking");
|
|
2200
|
+
document.querySelectorAll("[data-modal-panel][data-peek-focus]").forEach((el) => el.removeAttribute("data-peek-focus"));
|
|
2201
|
+
}
|
|
2151
2202
|
function ThumbCard({ id, label, maxW, maxH, titleAbove = false, onClick, onClose }) {
|
|
2152
2203
|
const previewRef = useRef(null);
|
|
2153
2204
|
const [size, setSize] = useState({ w: maxW, h: Math.round(maxH * 0.75) });
|
|
@@ -2262,6 +2313,7 @@ function TaskbarTabPreview({ items, anchorEl, onActivate, onClose, onMouseEnter,
|
|
|
2262
2313
|
ro.observe(el);
|
|
2263
2314
|
return () => ro.disconnect();
|
|
2264
2315
|
}, [anchorEl, items.length]);
|
|
2316
|
+
useEffect(() => clearPeekFocus, []);
|
|
2265
2317
|
const titleBelow = taskbarPos === "top";
|
|
2266
2318
|
const titleClass = `${titleBelow ? "mt-1" : "mb-1"} max-w-[240px] truncate text-[11px] font-medium text-gray-900 bg-white/80 px-2 py-0.5 rounded shadow-sm ring-2 ring-transparent transition group-hover:ring-blue-400`;
|
|
2267
2319
|
return createPortal(
|
|
@@ -2279,23 +2331,34 @@ function TaskbarTabPreview({ items, anchorEl, onActivate, onClose, onMouseEnter,
|
|
|
2279
2331
|
},
|
|
2280
2332
|
className: isGroup ? "flex gap-2 flex-wrap" : "",
|
|
2281
2333
|
onMouseEnter,
|
|
2282
|
-
onMouseLeave
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2334
|
+
onMouseLeave: () => {
|
|
2335
|
+
clearPeekFocus();
|
|
2336
|
+
onMouseLeave();
|
|
2337
|
+
},
|
|
2338
|
+
children: items.map((it) => /* @__PURE__ */ jsxs(
|
|
2339
|
+
"div",
|
|
2340
|
+
{
|
|
2341
|
+
className: "group flex flex-col items-center",
|
|
2342
|
+
onMouseEnter: () => setPeekFocus(findPanelByWindowKey(it.id) ?? findPanelByLabel(it.label)),
|
|
2343
|
+
children: [
|
|
2344
|
+
!titleBelow && /* @__PURE__ */ jsx("span", { className: titleClass, children: it.label }),
|
|
2345
|
+
/* @__PURE__ */ jsx(
|
|
2346
|
+
ThumbCard,
|
|
2347
|
+
{
|
|
2348
|
+
id: it.id,
|
|
2349
|
+
label: it.label,
|
|
2350
|
+
maxW: MAX_W,
|
|
2351
|
+
maxH: MAX_H,
|
|
2352
|
+
titleAbove: true,
|
|
2353
|
+
onClick: () => onActivate(it.id),
|
|
2354
|
+
onClose: () => onClose(it.id)
|
|
2355
|
+
}
|
|
2356
|
+
),
|
|
2357
|
+
titleBelow && /* @__PURE__ */ jsx("span", { className: titleClass, children: it.label })
|
|
2358
|
+
]
|
|
2359
|
+
},
|
|
2360
|
+
it.id
|
|
2361
|
+
))
|
|
2299
2362
|
}
|
|
2300
2363
|
),
|
|
2301
2364
|
document.body
|
|
@@ -2583,14 +2646,12 @@ function WindowManagerProvider({ children }) {
|
|
|
2583
2646
|
const openedFrom = currentlyActiveWindowKey();
|
|
2584
2647
|
setOpenWindows((prev) => {
|
|
2585
2648
|
if (entry.multiInstance) {
|
|
2586
|
-
const instanceCount = prev.filter((m) => m.type === "page" && m.route === path).length;
|
|
2587
|
-
const nextNum = instanceCount + 1;
|
|
2588
2649
|
const id2 = `page:${path}:${Math.random().toString(36).slice(2, 8)}`;
|
|
2589
2650
|
activateAfterMount(id2);
|
|
2590
2651
|
return [...prev, {
|
|
2591
2652
|
id: id2,
|
|
2592
2653
|
type: "page",
|
|
2593
|
-
label:
|
|
2654
|
+
label: entry.label,
|
|
2594
2655
|
route: path,
|
|
2595
2656
|
openedFrom
|
|
2596
2657
|
}];
|
|
@@ -2667,5 +2728,5 @@ function WindowManagerProvider({ children }) {
|
|
|
2667
2728
|
}
|
|
2668
2729
|
|
|
2669
2730
|
export { CancelButton, CopyButton, DocFavStar, LoadingSpinner, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, ShellPrefsProvider, ThumbCard, WINDOW_REGISTRY, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowTitle, activateModal, client_default, commitExposeHighlight, exitExposeMode, getActiveModalId, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isEntityEntry, isPageEntry, isShellApiClientConfigured, registerModalEscapeInterceptor, setExposeHighlight, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toggleExposeMode, useIsMobile, useLocalStoragePrefs, useModalActive, useShellPrefs, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
|
|
2670
|
-
//# sourceMappingURL=chunk-
|
|
2671
|
-
//# sourceMappingURL=chunk-
|
|
2731
|
+
//# sourceMappingURL=chunk-RPSFO2H2.js.map
|
|
2732
|
+
//# sourceMappingURL=chunk-RPSFO2H2.js.map
|