react-os-shell 4.2.1 → 4.2.2
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-JDPFFM43.js → Browser-TPAIWPZX.js} +5 -5
- package/dist/{Browser-JDPFFM43.js.map → Browser-TPAIWPZX.js.map} +1 -1
- package/dist/{Calculator-EIKUYW6O.js → Calculator-RCNLBRHK.js} +4 -4
- package/dist/{Calculator-EIKUYW6O.js.map → Calculator-RCNLBRHK.js.map} +1 -1
- package/dist/ConfirmDialog-QMBUHDXK.js +4 -0
- package/dist/{ConfirmDialog-C25OKJZP.js.map → ConfirmDialog-QMBUHDXK.js.map} +1 -1
- package/dist/{CurrencyConverter-PJUTWMCD.js → CurrencyConverter-CM5OTXWF.js} +4 -4
- package/dist/{CurrencyConverter-PJUTWMCD.js.map → CurrencyConverter-CM5OTXWF.js.map} +1 -1
- package/dist/{Documents-TIPUTUSS.js → Documents-3BPIAGQT.js} +5 -5
- package/dist/{Documents-TIPUTUSS.js.map → Documents-3BPIAGQT.js.map} +1 -1
- package/dist/{Files-Z6R3YGEB.js → Files-CR3L5C2L.js} +5 -5
- package/dist/{Files-Z6R3YGEB.js.map → Files-CR3L5C2L.js.map} +1 -1
- package/dist/{Notepad-NZXSKZ6I.js → Notepad-C6JHCCF2.js} +5 -5
- package/dist/{Notepad-NZXSKZ6I.js.map → Notepad-C6JHCCF2.js.map} +1 -1
- package/dist/{PomodoroTimer-K5NBAIVW.js → PomodoroTimer-EZMBYLQX.js} +5 -5
- package/dist/{PomodoroTimer-K5NBAIVW.js.map → PomodoroTimer-EZMBYLQX.js.map} +1 -1
- package/dist/{Preview-3F4LFED7.js → Preview-TFDEMTSH.js} +5 -5
- package/dist/{Preview-3F4LFED7.js.map → Preview-TFDEMTSH.js.map} +1 -1
- package/dist/{Spreadsheet-P2DB7LGI.js → Spreadsheet-FRUPALW4.js} +5 -5
- package/dist/{Spreadsheet-P2DB7LGI.js.map → Spreadsheet-FRUPALW4.js.map} +1 -1
- package/dist/{Stock-2XTWWH6K.js → Stock-HL42NPTM.js} +4 -4
- package/dist/{Stock-2XTWWH6K.js.map → Stock-HL42NPTM.js.map} +1 -1
- package/dist/{Weather-GCBITKTJ.js → Weather-N74AKS6V.js} +4 -4
- package/dist/{Weather-GCBITKTJ.js.map → Weather-N74AKS6V.js.map} +1 -1
- package/dist/{WorldClock-S52UINCL.js → WorldClock-A2EDB57H.js} +4 -4
- package/dist/{WorldClock-S52UINCL.js.map → WorldClock-A2EDB57H.js.map} +1 -1
- package/dist/apps/index.js +15 -15
- package/dist/{chunk-IGYB3NRR.js → chunk-5TU6DT3E.js} +3 -3
- package/dist/{chunk-IGYB3NRR.js.map → chunk-5TU6DT3E.js.map} +1 -1
- package/dist/chunk-D36OPVAT.js +7 -0
- package/dist/{chunk-3S5NISAL.js.map → chunk-D36OPVAT.js.map} +1 -1
- package/dist/{chunk-QAVN7ZV5.js → chunk-QJXXSMPG.js} +3 -3
- package/dist/{chunk-QAVN7ZV5.js.map → chunk-QJXXSMPG.js.map} +1 -1
- package/dist/{chunk-XIMGKR4G.js → chunk-RKNJSV2T.js} +4 -4
- package/dist/{chunk-XIMGKR4G.js.map → chunk-RKNJSV2T.js.map} +1 -1
- package/dist/{chunk-URHWXWZE.js → chunk-SI4XHEMM.js} +35 -6
- package/dist/chunk-SI4XHEMM.js.map +1 -0
- package/dist/index.js +6 -6
- package/package.json +1 -1
- package/dist/ConfirmDialog-C25OKJZP.js +0 -4
- package/dist/chunk-3S5NISAL.js +0 -7
- package/dist/chunk-URHWXWZE.js.map +0 -1
|
@@ -1205,7 +1205,7 @@ function CancelButton({ onClick, children, className }) {
|
|
|
1205
1205
|
const ctx = useContext(ModalActionsContext);
|
|
1206
1206
|
const handleClick = async () => {
|
|
1207
1207
|
if (ctx?.isDirty) {
|
|
1208
|
-
const { confirm: confirm2 } = await import('./ConfirmDialog-
|
|
1208
|
+
const { confirm: confirm2 } = await import('./ConfirmDialog-QMBUHDXK.js');
|
|
1209
1209
|
const ok = await confirm2({
|
|
1210
1210
|
title: "Discard changes?",
|
|
1211
1211
|
message: "You have unsaved changes. Are you sure you want to cancel? All changes will be lost.",
|
|
@@ -1832,6 +1832,8 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
1832
1832
|
const actionsRef = useRef(null);
|
|
1833
1833
|
const actionsLeftRef = useRef(null);
|
|
1834
1834
|
const [hasActions, setHasActions] = useState(false);
|
|
1835
|
+
const footerRef = useRef(null);
|
|
1836
|
+
const hasFooterContent = !!(footer || actions || actionsLeft) || hasActions;
|
|
1835
1837
|
const fallbackIcon = /* @__PURE__ */ jsx("svg", { className: "h-4 w-4 text-gray-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3.75 6.75A2.25 2.25 0 016 4.5h12a2.25 2.25 0 012.25 2.25v10.5A2.25 2.25 0 0118 19.5H6a2.25 2.25 0 01-2.25-2.25V6.75z M3.75 9h16.5" }) });
|
|
1836
1838
|
const effectiveIcon = icon && isValidElement(icon) ? cloneElement(icon, {
|
|
1837
1839
|
className: `h-4 w-4 ${icon.props?.className ?? ""}`.trim()
|
|
@@ -2123,12 +2125,17 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
2123
2125
|
}
|
|
2124
2126
|
} else if (changed || freezeTimer === null) {
|
|
2125
2127
|
if (freezeTimer) clearTimeout(freezeTimer);
|
|
2126
|
-
freezeTimer = setTimeout(() =>
|
|
2128
|
+
freezeTimer = setTimeout(() => {
|
|
2129
|
+
const before = lastH;
|
|
2130
|
+
measure();
|
|
2131
|
+
if (lastH === before) setAutoHeightResolved(true);
|
|
2132
|
+
}, 160);
|
|
2127
2133
|
}
|
|
2128
2134
|
}
|
|
2129
2135
|
};
|
|
2130
2136
|
const ro = new ResizeObserver(measure);
|
|
2131
2137
|
measure();
|
|
2138
|
+
if (footerRef.current) ro.observe(footerRef.current);
|
|
2132
2139
|
const mo = new MutationObserver(measure);
|
|
2133
2140
|
mo.observe(body, { childList: true, subtree: true, characterData: true });
|
|
2134
2141
|
return () => {
|
|
@@ -2136,7 +2143,28 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
2136
2143
|
mo.disconnect();
|
|
2137
2144
|
if (freezeTimer) clearTimeout(freezeTimer);
|
|
2138
2145
|
};
|
|
2139
|
-
}, [autoHeightResolved, widget, autoMinHeight]);
|
|
2146
|
+
}, [autoHeightResolved, widget, autoMinHeight, hasFooterContent]);
|
|
2147
|
+
useLayoutEffect(() => {
|
|
2148
|
+
if (!autoHeight || !autoHeightResolved || widget || !open) return;
|
|
2149
|
+
const footerEl = footerRef.current;
|
|
2150
|
+
if (!footerEl) return;
|
|
2151
|
+
let lastFooterH = footerEl.offsetHeight;
|
|
2152
|
+
const ro = new ResizeObserver(() => {
|
|
2153
|
+
if (!footerEl.isConnected) return;
|
|
2154
|
+
const h = footerEl.offsetHeight;
|
|
2155
|
+
const delta = h - lastFooterH;
|
|
2156
|
+
const flipped = h > 0 !== lastFooterH > 0;
|
|
2157
|
+
lastFooterH = h;
|
|
2158
|
+
if (!flipped || delta === 0 || maximized) return;
|
|
2159
|
+
if (document.body.classList.contains("rosh-gesturing")) return;
|
|
2160
|
+
const floor = autoMinHeight ?? 240;
|
|
2161
|
+
const taskbarH = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height")) || 0;
|
|
2162
|
+
const viewportCap = Math.max(floor, window.innerHeight - taskbarH - Math.max(0, boxRef.current.y) - 24);
|
|
2163
|
+
setBox((prev) => ({ ...prev, h: Math.min(Math.max(floor, prev.h + delta), viewportCap) }));
|
|
2164
|
+
});
|
|
2165
|
+
ro.observe(footerEl);
|
|
2166
|
+
return () => ro.disconnect();
|
|
2167
|
+
}, [autoHeight, autoHeightResolved, widget, open, maximized, autoMinHeight]);
|
|
2140
2168
|
useEffect(() => {
|
|
2141
2169
|
if (alwaysMaximized) {
|
|
2142
2170
|
setMaximized(true);
|
|
@@ -2784,7 +2812,8 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
2784
2812
|
"div",
|
|
2785
2813
|
{
|
|
2786
2814
|
onPointerDown: startDrag,
|
|
2787
|
-
|
|
2815
|
+
ref: footerRef,
|
|
2816
|
+
className: `px-4 py-2 border-t border-gray-200 shrink-0 flex items-center justify-between text-xs select-none cursor-move${isActive ? " backdrop-blur-sm" : ""}${widget || compact || appStyle || isMobile || !hasFooterContent ? " hidden" : ""}`,
|
|
2788
2817
|
style: { touchAction: "none", backgroundColor: isActive ? `rgb(var(--window-footer-rgb) / var(--active-header-opacity, 0.8))` : `rgb(var(--window-footer-rgb) / var(--inactive-header-opacity, 0.7))` },
|
|
2789
2818
|
children: [
|
|
2790
2819
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
@@ -3179,5 +3208,5 @@ function ConfirmProvider({ children }) {
|
|
|
3179
3208
|
}
|
|
3180
3209
|
|
|
3181
3210
|
export { CancelButton, ConfirmProvider, CopyButton, DocFavStar, LoadingSpinner, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, SIDEBAR_STRIP_W, ShellPrefsProvider, WINDOW_REGISTRY, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowTitle, client_default, commitExposeHighlight, confirm, confirmDestructive, exitExposeMode, forgetMaximizedWindowBoxes, getActiveModalId, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isEntityEntry, isPageEntry, isShellApiClientConfigured, prompt, registerModalEscapeInterceptor, setExposeHighlight, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toggleExposeMode, useConfirm, useIsMobile, useLocalStoragePrefs, useModalActive, useShellPrefs, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
|
|
3182
|
-
//# sourceMappingURL=chunk-
|
|
3183
|
-
//# sourceMappingURL=chunk-
|
|
3211
|
+
//# sourceMappingURL=chunk-SI4XHEMM.js.map
|
|
3212
|
+
//# sourceMappingURL=chunk-SI4XHEMM.js.map
|