react-os-shell 4.55.0 → 4.63.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.
- package/README.md +6 -3
- package/dist/{Browser-WHBSYGLC.js → Browser-SPTNLEMR.js} +5 -5
- package/dist/{Browser-WHBSYGLC.js.map → Browser-SPTNLEMR.js.map} +1 -1
- package/dist/{Calculator-PHKNMRLX.js → Calculator-XMOPPCK3.js} +4 -4
- package/dist/{Calculator-PHKNMRLX.js.map → Calculator-XMOPPCK3.js.map} +1 -1
- package/dist/{CurrencyConverter-MEG7RHEK.js → CurrencyConverter-24HNX6C6.js} +4 -4
- package/dist/{CurrencyConverter-MEG7RHEK.js.map → CurrencyConverter-24HNX6C6.js.map} +1 -1
- package/dist/{Documents-Y32RNCTU.js → Documents-GMRVVCH7.js} +5 -5
- package/dist/{Documents-Y32RNCTU.js.map → Documents-GMRVVCH7.js.map} +1 -1
- package/dist/{Files-LTG2S2KU.js → Files-ITH4SVML.js} +5 -5
- package/dist/{Files-LTG2S2KU.js.map → Files-ITH4SVML.js.map} +1 -1
- package/dist/{Notepad-P7J2OAXD.js → Notepad-GE5P55TL.js} +5 -5
- package/dist/{Notepad-P7J2OAXD.js.map → Notepad-GE5P55TL.js.map} +1 -1
- package/dist/{PomodoroTimer-5B5AFXQH.js → PomodoroTimer-ER5STVKM.js} +4 -4
- package/dist/{PomodoroTimer-5B5AFXQH.js.map → PomodoroTimer-ER5STVKM.js.map} +1 -1
- package/dist/{Preview-XZQ55YGY.js → Preview-UXVDXCDJ.js} +5 -5
- package/dist/{Preview-XZQ55YGY.js.map → Preview-UXVDXCDJ.js.map} +1 -1
- package/dist/{Spreadsheet-KKSLCSIK.js → Spreadsheet-B32JQVX4.js} +5 -5
- package/dist/{Spreadsheet-KKSLCSIK.js.map → Spreadsheet-B32JQVX4.js.map} +1 -1
- package/dist/{Stock-KTWRNBI6.js → Stock-FSFPFDQT.js} +4 -4
- package/dist/{Stock-KTWRNBI6.js.map → Stock-FSFPFDQT.js.map} +1 -1
- package/dist/{Weather-B7MO7N4N.js → Weather-HXOERJJV.js} +4 -4
- package/dist/{Weather-B7MO7N4N.js.map → Weather-HXOERJJV.js.map} +1 -1
- package/dist/{WorldClock-M5MEV74F.js → WorldClock-2FUGLIUZ.js} +4 -4
- package/dist/{WorldClock-M5MEV74F.js.map → WorldClock-2FUGLIUZ.js.map} +1 -1
- package/dist/apps/index.js +15 -15
- package/dist/{chunk-CTTHBTOX.js → chunk-CWA27IGB.js} +499 -95
- package/dist/chunk-CWA27IGB.js.map +1 -0
- package/dist/{chunk-5S65ZC5W.js → chunk-JMESET3G.js} +81 -7
- package/dist/chunk-JMESET3G.js.map +1 -0
- package/dist/{chunk-FHPPPDHL.js → chunk-LYQVLRWQ.js} +3 -3
- package/dist/{chunk-FHPPPDHL.js.map → chunk-LYQVLRWQ.js.map} +1 -1
- package/dist/{chunk-S3ZIBWRY.js → chunk-TO6ZZHJK.js} +4 -4
- package/dist/{chunk-S3ZIBWRY.js.map → chunk-TO6ZZHJK.js.map} +1 -1
- package/dist/chunk-WCGHIJZR.js +7 -0
- package/dist/{chunk-LCLB7YBY.js.map → chunk-WCGHIJZR.js.map} +1 -1
- package/dist/{index-BE0z2D6y.d.ts → index-Ka32s3Ij.d.ts} +135 -2
- package/dist/index.d.ts +29 -8
- package/dist/index.js +56 -18
- package/dist/index.js.map +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-5S65ZC5W.js.map +0 -1
- package/dist/chunk-CTTHBTOX.js.map +0 -1
- package/dist/chunk-LCLB7YBY.js +0 -7
|
@@ -1338,6 +1338,8 @@ function workArea() {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
var CAPTION_H = 40;
|
|
1340
1340
|
var MIN_VISIBLE_X = 80;
|
|
1341
|
+
var MIN_W = 384;
|
|
1342
|
+
var MIN_H = 400;
|
|
1341
1343
|
function clampReachable(box, a = workArea()) {
|
|
1342
1344
|
const x = Math.min(Math.max(box.x, a.x + MIN_VISIBLE_X - box.w), a.x + a.w - MIN_VISIBLE_X);
|
|
1343
1345
|
const y = Math.min(Math.max(box.y, a.y), a.y + a.h - CAPTION_H);
|
|
@@ -2300,8 +2302,6 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
2300
2302
|
const oy = rect ? rect.top : boxRef.current.y;
|
|
2301
2303
|
const ow = rect ? rect.width : boxRef.current.w;
|
|
2302
2304
|
const oh = rect ? rect.height : boxRef.current.h;
|
|
2303
|
-
const MIN_W = 384;
|
|
2304
|
-
const MIN_H = 400;
|
|
2305
2305
|
const isWest = corner === "sw" || corner === "nw" || corner === "w";
|
|
2306
2306
|
const isNorth = corner === "ne" || corner === "nw" || corner === "n";
|
|
2307
2307
|
const isEast = corner === "se" || corner === "ne" || corner === "e";
|
|
@@ -2359,6 +2359,77 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
2359
2359
|
window.addEventListener("pointermove", move);
|
|
2360
2360
|
window.addEventListener("pointerup", up);
|
|
2361
2361
|
}, []);
|
|
2362
|
+
const KEY_STEP = 24;
|
|
2363
|
+
const onTitleBarKeyDown = useCallback((e) => {
|
|
2364
|
+
if (e.target.closest("button, input, a, kbd, select, textarea")) return;
|
|
2365
|
+
const arrows = {
|
|
2366
|
+
ArrowLeft: [-1, 0],
|
|
2367
|
+
ArrowRight: [1, 0],
|
|
2368
|
+
ArrowUp: [0, -1],
|
|
2369
|
+
ArrowDown: [0, 1]
|
|
2370
|
+
};
|
|
2371
|
+
const dir = arrows[e.key];
|
|
2372
|
+
if (!dir && e.key !== "Enter") return;
|
|
2373
|
+
e.preventDefault();
|
|
2374
|
+
e.stopPropagation();
|
|
2375
|
+
activateModal(modalId);
|
|
2376
|
+
if (e.key === "Enter") {
|
|
2377
|
+
if (maximized) {
|
|
2378
|
+
setMaximized(false);
|
|
2379
|
+
setBox(calcWindowed());
|
|
2380
|
+
} else {
|
|
2381
|
+
setMaximized(true);
|
|
2382
|
+
setBox(calcMaximized());
|
|
2383
|
+
}
|
|
2384
|
+
return;
|
|
2385
|
+
}
|
|
2386
|
+
const [dx, dy] = dir;
|
|
2387
|
+
if (e.ctrlKey || e.metaKey) {
|
|
2388
|
+
const savePreSnap = () => {
|
|
2389
|
+
if (!preSnapBoxRef.current) preSnapBoxRef.current = { ...boxRef.current };
|
|
2390
|
+
};
|
|
2391
|
+
if (dy < 0) {
|
|
2392
|
+
savePreSnap();
|
|
2393
|
+
setMaximized(true);
|
|
2394
|
+
setBox(calcMaximized());
|
|
2395
|
+
return;
|
|
2396
|
+
}
|
|
2397
|
+
if (dy > 0) {
|
|
2398
|
+
if (maximized) {
|
|
2399
|
+
setMaximized(false);
|
|
2400
|
+
setBox(calcWindowed());
|
|
2401
|
+
return;
|
|
2402
|
+
}
|
|
2403
|
+
if (preSnapBoxRef.current) {
|
|
2404
|
+
const restore = clampReachable(preSnapBoxRef.current);
|
|
2405
|
+
preSnapBoxRef.current = null;
|
|
2406
|
+
boxRef.current = restore;
|
|
2407
|
+
setBox(restore);
|
|
2408
|
+
return;
|
|
2409
|
+
}
|
|
2410
|
+
_minimizeModal(modalId);
|
|
2411
|
+
return;
|
|
2412
|
+
}
|
|
2413
|
+
savePreSnap();
|
|
2414
|
+
setMaximized(false);
|
|
2415
|
+
const snapped = calcSnapBox(dx < 0 ? "left" : "right");
|
|
2416
|
+
boxRef.current = snapped;
|
|
2417
|
+
setBox(snapped);
|
|
2418
|
+
return;
|
|
2419
|
+
}
|
|
2420
|
+
if (maximized) return;
|
|
2421
|
+
const b = boxRef.current;
|
|
2422
|
+
const next = e.shiftKey ? { ...b, w: Math.max(MIN_W, b.w + dx * KEY_STEP), h: Math.max(MIN_H, b.h + dy * KEY_STEP) } : clampReachable({ ...b, x: b.x + dx * KEY_STEP, y: Math.max(0, b.y + dy * KEY_STEP) });
|
|
2423
|
+
boxRef.current = next;
|
|
2424
|
+
setBox(next);
|
|
2425
|
+
}, [modalId, maximized, calcWindowed, calcMaximized]);
|
|
2426
|
+
const titleBarKeyProps = alwaysMaximized || exposeActive ? {} : {
|
|
2427
|
+
tabIndex: 0,
|
|
2428
|
+
role: "group",
|
|
2429
|
+
"aria-label": titleTooltip ? `${titleTooltip} \u2014 window` : "Window",
|
|
2430
|
+
"aria-keyshortcuts": "ArrowUp ArrowDown ArrowLeft ArrowRight Shift+ArrowUp Shift+ArrowDown Shift+ArrowLeft Shift+ArrowRight Control+ArrowUp Control+ArrowDown Control+ArrowLeft Control+ArrowRight Enter",
|
|
2431
|
+
onKeyDown: onTitleBarKeyDown
|
|
2432
|
+
};
|
|
2362
2433
|
const reset = () => {
|
|
2363
2434
|
setMaximized(true);
|
|
2364
2435
|
setBox(calcMaximized());
|
|
@@ -2605,7 +2676,8 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
2605
2676
|
{
|
|
2606
2677
|
onPointerDown: startDrag,
|
|
2607
2678
|
"data-window-chrome": "",
|
|
2608
|
-
|
|
2679
|
+
...titleBarKeyProps,
|
|
2680
|
+
className: `flex items-center justify-between px-3 py-1.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-2xl focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 ${isActive ? "backdrop-blur-sm" : ""}`,
|
|
2609
2681
|
style: { touchAction: "none", backgroundColor: isActive ? `rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))` : `rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))` },
|
|
2610
2682
|
children: [
|
|
2611
2683
|
/* @__PURE__ */ jsxs("div", { "data-window-title": true, title: titleTooltip, className: "text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-1.5", style: { color: isActive ? "var(--window-title-active, rgb(17 24 39))" : "var(--window-title-inactive, rgb(156 163 175))" }, children: [
|
|
@@ -2634,7 +2706,8 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
2634
2706
|
{
|
|
2635
2707
|
onPointerDown: startDrag,
|
|
2636
2708
|
"data-window-chrome": "",
|
|
2637
|
-
|
|
2709
|
+
...titleBarKeyProps,
|
|
2710
|
+
className: `flex items-center justify-between px-3 py-1.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-2xl focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 ${isActive ? "backdrop-blur-sm" : ""}`,
|
|
2638
2711
|
style: { touchAction: "none", backgroundColor: isActive ? `rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))` : `rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))` },
|
|
2639
2712
|
children: [
|
|
2640
2713
|
/* @__PURE__ */ jsxs("div", { "data-window-title": true, title: titleTooltip, className: "text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-1.5", style: { color: isActive ? "var(--window-title-active, rgb(17 24 39))" : "var(--window-title-inactive, rgb(156 163 175))" }, children: [
|
|
@@ -2670,7 +2743,8 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
2670
2743
|
{
|
|
2671
2744
|
onPointerDown: startDrag,
|
|
2672
2745
|
"data-window-chrome": "",
|
|
2673
|
-
|
|
2746
|
+
...titleBarKeyProps,
|
|
2747
|
+
className: `flex items-center justify-between px-4 py-2.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-2xl focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 ${isActive ? "backdrop-blur-sm" : ""}`,
|
|
2674
2748
|
style: { touchAction: "none", backgroundColor: isActive ? `rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))` : `rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))` },
|
|
2675
2749
|
children: [
|
|
2676
2750
|
/* @__PURE__ */ jsxs("div", { "data-window-title": true, title: titleTooltip, className: "text-base font-medium min-w-0 flex-1 truncate flex items-center gap-2", style: { color: isActive ? "var(--window-title-active, rgb(17 24 39))" : "var(--window-title-inactive, rgb(156 163 175))" }, children: [
|
|
@@ -3126,5 +3200,5 @@ function useUndoableState(initial, opts) {
|
|
|
3126
3200
|
}
|
|
3127
3201
|
|
|
3128
3202
|
export { CancelButton, CopyButton, DocFavStar, LoadingSpinner, Modal, ModalActions, SIDEBAR_STRIP_W, UndoProvider, WINDOW_REGISTRY, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowTitle, beginWindowGesture, cancelWindowFront, client_default, commitExposeHighlight, drainPerfEvents, exitExposeMode, forgetMaximizedWindowBoxes, getActiveModalId, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isEntityEntry, isPageEntry, isShellApiClientConfigured, markMenuOpen, requestWindowFront, setExposeHighlight, setPerfCollecting, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toggleExposeMode, useEnclosingModalId, useIsActiveWindow, useModalActive, useUndo, useUndoable, useUndoableState, useWidgetSettings, useWindowDirty, useWindowManager, useWindowMenuItem, useWindowTitle };
|
|
3129
|
-
//# sourceMappingURL=chunk-
|
|
3130
|
-
//# sourceMappingURL=chunk-
|
|
3203
|
+
//# sourceMappingURL=chunk-JMESET3G.js.map
|
|
3204
|
+
//# sourceMappingURL=chunk-JMESET3G.js.map
|