react-os-shell 0.1.8 → 0.1.10
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/index.d.ts +5 -1
- package/dist/index.js +16 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -539,6 +539,10 @@ declare function StartMenu({ open, onClose, openPage, profile, user, onLogout, t
|
|
|
539
539
|
|
|
540
540
|
declare function Customization(): react_jsx_runtime.JSX.Element;
|
|
541
541
|
|
|
542
|
+
/** Package version, injected by tsup at build time. Stays as an empty
|
|
543
|
+
* string when the source is consumed without a build (e.g. tests). */
|
|
544
|
+
declare const VERSION: string;
|
|
545
|
+
|
|
542
546
|
interface ShellAuth {
|
|
543
547
|
/** Returns true if the current user has any of the listed permission codes. */
|
|
544
548
|
hasAnyPerm: (perms: string[]) => boolean;
|
|
@@ -639,4 +643,4 @@ declare function useNewHotkey(callback: () => void): void;
|
|
|
639
643
|
*/
|
|
640
644
|
declare function useEditHotkey(callback: (() => void) | null): void;
|
|
641
645
|
|
|
642
|
-
export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, type BugReport, type BugReportConfig, BugReportConfigProvider, BugReportDetail, BugReportProvider, type BugReportSubmission, type BugReportSubmitPayload, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, ConfirmProvider, CopyButton, Customization, Desktop, type DesktopHostConfig, DesktopHostProvider, DocFavStar, ENTER, type EntityFetcher, GLASS_DIVIDER, GLASS_INPUT_BG, GlobalSearch, Layout, type LayoutProps, MOD, Modal, ModalActions, NotificationBell, type NotificationsConfig, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, SHIFT, type SearchConfig, type SearchProvider, type SearchResult, type SemanticGroup, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, StartMenu, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, WindowManagerProvider, WindowRegistry, WindowTitle, confirm, confirmDestructive, createWindowRegistry, formatDate, glassStyle, isMac, openBugReportDialog, reportBug, setShellApiClient, setShellAuthBridge, setShellNavIcons, toast, useBugReport, useClickOutside, useDesktopHost, useEditHotkey, useLocalStoragePrefs, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
|
|
646
|
+
export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, type BugReport, type BugReportConfig, BugReportConfigProvider, BugReportDetail, BugReportProvider, type BugReportSubmission, type BugReportSubmitPayload, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, ConfirmProvider, CopyButton, Customization, Desktop, type DesktopHostConfig, DesktopHostProvider, DocFavStar, ENTER, type EntityFetcher, GLASS_DIVIDER, GLASS_INPUT_BG, GlobalSearch, Layout, type LayoutProps, MOD, Modal, ModalActions, NotificationBell, type NotificationsConfig, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, SHIFT, type SearchConfig, type SearchProvider, type SearchResult, type SemanticGroup, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, StartMenu, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, VERSION, WindowManagerProvider, WindowRegistry, WindowTitle, confirm, confirmDestructive, createWindowRegistry, formatDate, glassStyle, isMac, openBugReportDialog, reportBug, setShellApiClient, setShellAuthBridge, setShellNavIcons, toast, useBugReport, useClickOutside, useDesktopHost, useEditHotkey, useLocalStoragePrefs, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
|
package/dist/index.js
CHANGED
|
@@ -643,7 +643,8 @@ function StatusBadge({ status }) {
|
|
|
643
643
|
}
|
|
644
644
|
|
|
645
645
|
// src/version.ts
|
|
646
|
-
var
|
|
646
|
+
var VERSION = "0.1.10" ;
|
|
647
|
+
var APP_VERSION = VERSION;
|
|
647
648
|
|
|
648
649
|
// src/changelog.ts
|
|
649
650
|
var changelog = [];
|
|
@@ -752,7 +753,7 @@ function Desktop({ profile }) {
|
|
|
752
753
|
const { openEntity, openPage } = useWindowManager();
|
|
753
754
|
const bugReport = useBugReport();
|
|
754
755
|
const containerRef = useRef(null);
|
|
755
|
-
const { prefs: shellPrefs } = useShellPrefs();
|
|
756
|
+
const { prefs: shellPrefs, save: saveShellPrefs } = useShellPrefs();
|
|
756
757
|
const prefs = { ...profile?.preferences || {}, ...shellPrefs };
|
|
757
758
|
const favDocs = prefs.favorite_documents || [];
|
|
758
759
|
const folders = prefs.desktop_folders || [];
|
|
@@ -857,14 +858,17 @@ function Desktop({ profile }) {
|
|
|
857
858
|
const [stickyDrag, setStickyDrag] = useState(null);
|
|
858
859
|
const [stickyResize, setStickyResize] = useState(null);
|
|
859
860
|
const saveDocs = useCallback((docs) => {
|
|
860
|
-
host.saveShortcuts
|
|
861
|
-
|
|
861
|
+
if (host.saveShortcuts) host.saveShortcuts(docs);
|
|
862
|
+
else saveShellPrefs({ favorite_documents: docs });
|
|
863
|
+
}, [host, saveShellPrefs]);
|
|
862
864
|
const saveFolders = useCallback((f) => {
|
|
863
|
-
host.saveFolders
|
|
864
|
-
|
|
865
|
+
if (host.saveFolders) host.saveFolders(f);
|
|
866
|
+
else saveShellPrefs({ desktop_folders: f });
|
|
867
|
+
}, [host, saveShellPrefs]);
|
|
865
868
|
useCallback((v) => {
|
|
866
|
-
host.saveSnap
|
|
867
|
-
|
|
869
|
+
if (host.saveSnap) host.saveSnap(v);
|
|
870
|
+
else saveShellPrefs({ desktop_snap: v });
|
|
871
|
+
}, [host, saveShellPrefs]);
|
|
868
872
|
const getDefaultPos = (idx) => {
|
|
869
873
|
const col = Math.floor(idx / 8);
|
|
870
874
|
const row = idx % 8;
|
|
@@ -1079,8 +1083,9 @@ function Desktop({ profile }) {
|
|
|
1079
1083
|
setRenamingFolder(null);
|
|
1080
1084
|
};
|
|
1081
1085
|
const saveNotes = useCallback((updated) => {
|
|
1082
|
-
host.saveNotes
|
|
1083
|
-
|
|
1086
|
+
if (host.saveNotes) host.saveNotes(updated);
|
|
1087
|
+
else saveShellPrefs({ notepad_notes: updated });
|
|
1088
|
+
}, [host, saveShellPrefs]);
|
|
1084
1089
|
const createStickyNote = () => {
|
|
1085
1090
|
const rect = containerRef.current?.getBoundingClientRect();
|
|
1086
1091
|
const x = contextMenu ? contextMenu.x - (rect?.left || 0) : 100;
|
|
@@ -3441,6 +3446,6 @@ function useEditHotkey(callback) {
|
|
|
3441
3446
|
}, [callback, isActive]);
|
|
3442
3447
|
}
|
|
3443
3448
|
|
|
3444
|
-
export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BugReportConfigProvider, BugReportDetail, BugReportProvider, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, Customization, Desktop, DesktopHostProvider, ENTER, GlobalSearch, Layout, MOD, NotificationBell, SHIFT, ShellAuthProvider, ShellEntityFetcherProvider, ShortcutHelp, StartMenu, StatusBadge, StatusBadgeProvider, createWindowRegistry, isMac, openBugReportDialog, reportBug, setShellAuthBridge, useBugReport, useClickOutside, useDesktopHost, useEditHotkey, useNewHotkey, useShellAuth, useShellEntityFetcher };
|
|
3449
|
+
export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BugReportConfigProvider, BugReportDetail, BugReportProvider, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, Customization, Desktop, DesktopHostProvider, ENTER, GlobalSearch, Layout, MOD, NotificationBell, SHIFT, ShellAuthProvider, ShellEntityFetcherProvider, ShortcutHelp, StartMenu, StatusBadge, StatusBadgeProvider, VERSION, createWindowRegistry, isMac, openBugReportDialog, reportBug, setShellAuthBridge, useBugReport, useClickOutside, useDesktopHost, useEditHotkey, useNewHotkey, useShellAuth, useShellEntityFetcher };
|
|
3445
3450
|
//# sourceMappingURL=index.js.map
|
|
3446
3451
|
//# sourceMappingURL=index.js.map
|