react-os-shell 0.1.6 → 0.1.8
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/{Calculator-LIRYXAO6.js → Calculator-PTET7HM2.js} +4 -4
- package/dist/{Calculator-LIRYXAO6.js.map → Calculator-PTET7HM2.js.map} +1 -1
- package/dist/{Calendar-EPLEHSOJ.js → Calendar-H6WA57K2.js} +3 -3
- package/dist/{Calendar-EPLEHSOJ.js.map → Calendar-H6WA57K2.js.map} +1 -1
- package/dist/{CurrencyConverter-DZWLRMAA.js → CurrencyConverter-ZLZIO4TW.js} +4 -4
- package/dist/{CurrencyConverter-DZWLRMAA.js.map → CurrencyConverter-ZLZIO4TW.js.map} +1 -1
- package/dist/{Email-4PYD3QBK.js → Email-E3ZZUUON.js} +3 -3
- package/dist/{Email-4PYD3QBK.js.map → Email-E3ZZUUON.js.map} +1 -1
- package/dist/{Minesweeper-WD6O5YOD.js → Minesweeper-OBQCXZKI.js} +3 -3
- package/dist/{Minesweeper-WD6O5YOD.js.map → Minesweeper-OBQCXZKI.js.map} +1 -1
- package/dist/{Notepad-F3QYVJ36.js → Notepad-6L6BWIBG.js} +3 -3
- package/dist/{Notepad-F3QYVJ36.js.map → Notepad-6L6BWIBG.js.map} +1 -1
- package/dist/{PomodoroTimer-TADWMJCU.js → PomodoroTimer-SDRN2GZD.js} +4 -4
- package/dist/{PomodoroTimer-TADWMJCU.js.map → PomodoroTimer-SDRN2GZD.js.map} +1 -1
- package/dist/{Spreadsheet-PZGPOSWV.js → Spreadsheet-N6CTEPJM.js} +3 -3
- package/dist/{Spreadsheet-PZGPOSWV.js.map → Spreadsheet-N6CTEPJM.js.map} +1 -1
- package/dist/{Weather-TOIFJCST.js → Weather-QZJWPPUP.js} +4 -4
- package/dist/{Weather-TOIFJCST.js.map → Weather-QZJWPPUP.js.map} +1 -1
- package/dist/apps/index.js +10 -10
- package/dist/apps/index.js.map +1 -1
- package/dist/{chunk-7JGV4RFC.js → chunk-4POBPSEW.js} +3 -3
- package/dist/{chunk-7JGV4RFC.js.map → chunk-4POBPSEW.js.map} +1 -1
- package/dist/{chunk-2EBFERVD.js → chunk-ZR2DVGZI.js} +37 -25
- package/dist/chunk-ZR2DVGZI.js.map +1 -0
- package/dist/index.js +22 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2EBFERVD.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -7,8 +7,8 @@ export { toast_default as toast } from './chunk-WIJ45SYD.js';
|
|
|
7
7
|
import { playStartup, soundsEnabled, getSoundConfig, SOUND_PACK_KEYS, SOUND_PACKS, SOUND_TYPES, SOUND_TYPE_LABELS, playLogout, setSoundForType, previewSound, setAllSounds } from './chunk-D7PYW2QS.js';
|
|
8
8
|
import { useShellPrefs } from './chunk-TFGOLXGD.js';
|
|
9
9
|
export { ShellPrefsProvider, useLocalStoragePrefs, useShellPrefs } from './chunk-TFGOLXGD.js';
|
|
10
|
-
import { useWindowManager, glassStyle, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, Modal, startMenuCategories, navSections, isSection, GLASS_INPUT_BG, navIcons, sectionIcons, ModalActions, useModalActive } from './chunk-
|
|
11
|
-
export { CancelButton, CopyButton, DocFavStar, GLASS_DIVIDER, GLASS_INPUT_BG, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, WindowManagerProvider, WindowTitle, glassStyle, isEntityEntry, isPageEntry, setShellApiClient, setShellNavIcons, setShellWindowRegistry, useModalActive, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-
|
|
10
|
+
import { useWindowManager, glassStyle, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, Modal, startMenuCategories, navSections, isSection, GLASS_INPUT_BG, navIcons, sectionIcons, ModalActions, useModalActive } from './chunk-ZR2DVGZI.js';
|
|
11
|
+
export { CancelButton, CopyButton, DocFavStar, GLASS_DIVIDER, GLASS_INPUT_BG, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, WindowManagerProvider, WindowTitle, glassStyle, isEntityEntry, isPageEntry, setShellApiClient, setShellNavIcons, setShellWindowRegistry, useModalActive, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-ZR2DVGZI.js';
|
|
12
12
|
export { ConfirmProvider, confirm, confirmDestructive } from './chunk-RFTLYCSF.js';
|
|
13
13
|
import { createContext, useState, useRef, useEffect, useCallback, useLayoutEffect, useContext, isValidElement, cloneElement, useSyncExternalStore } from 'react';
|
|
14
14
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -752,10 +752,12 @@ function Desktop({ profile }) {
|
|
|
752
752
|
const { openEntity, openPage } = useWindowManager();
|
|
753
753
|
const bugReport = useBugReport();
|
|
754
754
|
const containerRef = useRef(null);
|
|
755
|
-
const
|
|
756
|
-
const
|
|
757
|
-
const
|
|
758
|
-
const
|
|
755
|
+
const { prefs: shellPrefs } = useShellPrefs();
|
|
756
|
+
const prefs = { ...profile?.preferences || {}, ...shellPrefs };
|
|
757
|
+
const favDocs = prefs.favorite_documents || [];
|
|
758
|
+
const folders = prefs.desktop_folders || [];
|
|
759
|
+
const snapEnabled = prefs.desktop_snap ?? false;
|
|
760
|
+
const allNotes = prefs.notepad_notes || [];
|
|
759
761
|
const stickyNotes = allNotes.filter((n) => n.sticky);
|
|
760
762
|
const host = useDesktopHost();
|
|
761
763
|
const openStickyRef = async (prefix, number) => {
|
|
@@ -951,12 +953,14 @@ function Desktop({ profile }) {
|
|
|
951
953
|
useEffect(() => {
|
|
952
954
|
setLocalPositions({});
|
|
953
955
|
}, [favDocsKey, foldersKey]);
|
|
956
|
+
const didRubberBandDragRef = useRef(false);
|
|
954
957
|
const startRubberBand = (e) => {
|
|
955
958
|
if (e.button !== 0 || e.target !== containerRef.current) return;
|
|
956
959
|
const rect = containerRef.current.getBoundingClientRect();
|
|
957
960
|
const x = e.clientX - rect.left;
|
|
958
961
|
const y = e.clientY - rect.top;
|
|
959
962
|
setRubberBand({ startX: x, startY: y, endX: x, endY: y });
|
|
963
|
+
didRubberBandDragRef.current = false;
|
|
960
964
|
setSelected(/* @__PURE__ */ new Set());
|
|
961
965
|
};
|
|
962
966
|
useEffect(() => {
|
|
@@ -964,7 +968,12 @@ function Desktop({ profile }) {
|
|
|
964
968
|
const move = (e) => {
|
|
965
969
|
const rect = containerRef.current?.getBoundingClientRect();
|
|
966
970
|
if (!rect) return;
|
|
967
|
-
|
|
971
|
+
const x = e.clientX - rect.left;
|
|
972
|
+
const y = e.clientY - rect.top;
|
|
973
|
+
const dx = x - rubberBand.startX;
|
|
974
|
+
const dy = y - rubberBand.startY;
|
|
975
|
+
if (dx * dx + dy * dy > 16) didRubberBandDragRef.current = true;
|
|
976
|
+
setRubberBand((prev) => prev ? { ...prev, endX: x, endY: y } : null);
|
|
968
977
|
};
|
|
969
978
|
const up = () => {
|
|
970
979
|
if (rubberBand) {
|
|
@@ -1204,6 +1213,10 @@ function Desktop({ profile }) {
|
|
|
1204
1213
|
onPointerDown: startRubberBand,
|
|
1205
1214
|
onContextMenu: handleDesktopContextMenu,
|
|
1206
1215
|
onClick: () => {
|
|
1216
|
+
if (didRubberBandDragRef.current) {
|
|
1217
|
+
didRubberBandDragRef.current = false;
|
|
1218
|
+
return;
|
|
1219
|
+
}
|
|
1207
1220
|
setSelected(/* @__PURE__ */ new Set());
|
|
1208
1221
|
setContextMenu(null);
|
|
1209
1222
|
},
|
|
@@ -1526,7 +1539,6 @@ function Desktop({ profile }) {
|
|
|
1526
1539
|
})(),
|
|
1527
1540
|
aboutOpen && (() => {
|
|
1528
1541
|
const version = APP_VERSION;
|
|
1529
|
-
(profile?.preferences || {}).show_desktop_version ?? true;
|
|
1530
1542
|
return /* @__PURE__ */ jsx(Modal, { open: true, onClose: () => setAboutOpen(false), title: `About ${host.productName ?? "this app"}`, size: "sm", bodyScroll: false, compact: true, dimensions: [340, 420], children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
1531
1543
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2 pt-4 pb-3 w-full", children: [
|
|
1532
1544
|
/* @__PURE__ */ jsx("img", { src: host.productIcon ?? "/favicon.svg", alt: "", className: "h-16 w-16" }),
|
|
@@ -1575,14 +1587,14 @@ function Desktop({ profile }) {
|
|
|
1575
1587
|
] })
|
|
1576
1588
|
] }) });
|
|
1577
1589
|
})(),
|
|
1578
|
-
(
|
|
1590
|
+
(prefs.show_desktop_version ?? true) && /* @__PURE__ */ jsx(
|
|
1579
1591
|
"button",
|
|
1580
1592
|
{
|
|
1581
1593
|
onClick: (e) => {
|
|
1582
1594
|
e.stopPropagation();
|
|
1583
1595
|
setWhatsNewOpen(true);
|
|
1584
1596
|
},
|
|
1585
|
-
className: `absolute bottom-3 text-[10px] text-white/50 font-mono select-none drop-shadow-[0_1px_1px_rgba(0,0,0,0.5)] hover:text-white/80 transition-colors cursor-pointer ${
|
|
1597
|
+
className: `absolute bottom-3 text-[10px] text-white/50 font-mono select-none drop-shadow-[0_1px_1px_rgba(0,0,0,0.5)] hover:text-white/80 transition-colors cursor-pointer ${prefs.taskbar_position === "top" ? "right-3" : prefs.taskbar_position === "left" ? "right-3" : prefs.taskbar_position === "right" ? "left-3" : "right-3 !bottom-16"}`,
|
|
1586
1598
|
children: APP_VERSION
|
|
1587
1599
|
}
|
|
1588
1600
|
),
|