@decky/ui 4.15.1 → 4.16.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/dist/components/Dropdown.d.ts +2 -2
- package/dist/components/FooterLegend.d.ts +8 -2
- package/dist/components/FooterLegend.js +7 -0
- package/dist/components/Menu.d.ts +5 -9
- package/dist/components/Modal.d.ts +3 -2
- package/dist/globals/index.d.ts +25 -2
- package/dist/globals/index.js +1 -2
- package/dist/globals/shared/cm.d.ts +112 -0
- package/dist/globals/shared/enums.d.ts +80 -0
- package/dist/globals/shared/enums.js +85 -0
- package/dist/globals/shared/history.d.ts +12 -0
- package/dist/globals/shared/history.js +1 -0
- package/dist/globals/shared/index.d.ts +5 -0
- package/dist/globals/shared/index.js +5 -0
- package/dist/globals/shared/interfaces.d.ts +54 -0
- package/dist/globals/shared/interfaces.js +1 -0
- package/dist/globals/shared/navigation.d.ts +14 -0
- package/dist/globals/shared/navigation.js +10 -0
- package/dist/globals/shared/steamid.d.ts +36 -0
- package/dist/globals/shared/steamid.js +15 -0
- package/dist/globals/shared/storage.d.ts +27 -0
- package/dist/globals/shared/storage.js +11 -0
- package/dist/globals/steam-client/App.d.ts +1 -1
- package/dist/globals/steam-client/Auth.d.ts +1 -1
- package/dist/globals/steam-client/ClientNotifications.d.ts +1 -1
- package/dist/globals/steam-client/Overlay.d.ts +2 -1
- package/dist/globals/steam-client/Settings.d.ts +1 -1
- package/dist/globals/steam-client/SharedConnection.d.ts +2 -1
- package/dist/globals/steam-client/UI.d.ts +14 -3
- package/dist/globals/steam-client/UI.js +11 -0
- package/dist/globals/steam-client/User.d.ts +13 -0
- package/dist/globals/steam-client/User.js +7 -0
- package/dist/globals/steam-client/WebChat.d.ts +3 -2
- package/dist/globals/steam-client/shared.d.ts +0 -29
- package/dist/globals/steam-client/shared.js +0 -24
- package/dist/globals/stores/app.d.ts +35 -0
- package/dist/globals/stores/app.js +1 -0
- package/dist/globals/stores/appdetailsstore.d.ts +86 -0
- package/dist/globals/stores/appdetailsstore.js +1 -0
- package/dist/globals/stores/appinfostore.d.ts +56 -0
- package/dist/globals/stores/appinfostore.js +1 -0
- package/dist/globals/stores/appstore.d.ts +77 -0
- package/dist/globals/stores/appstore.js +1 -0
- package/dist/globals/stores/badgestore.d.ts +52 -0
- package/dist/globals/stores/badgestore.js +1 -0
- package/dist/globals/stores/collectionstore.d.ts +313 -0
- package/dist/globals/stores/collectionstore.js +143 -0
- package/dist/globals/stores/consolestore.d.ts +20 -0
- package/dist/globals/stores/consolestore.js +1 -0
- package/dist/globals/stores/focusnavcontroller.d.ts +383 -0
- package/dist/globals/stores/focusnavcontroller.js +29 -0
- package/dist/globals/stores/friendstore/clanstore.d.ts +75 -0
- package/dist/globals/stores/friendstore/clanstore.js +19 -0
- package/dist/globals/stores/friendstore/friendchat.d.ts +374 -0
- package/dist/globals/stores/friendstore/friendchat.js +56 -0
- package/dist/globals/stores/friendstore/friendgroupstore.d.ts +98 -0
- package/dist/globals/stores/friendstore/friendgroupstore.js +8 -0
- package/dist/globals/stores/friendstore/friendingamenotificationstore.d.ts +2 -0
- package/dist/globals/stores/friendstore/friendingamenotificationstore.js +1 -0
- package/dist/globals/stores/friendstore/friendslistfavoritesstore.d.ts +22 -0
- package/dist/globals/stores/friendstore/friendslistfavoritesstore.js +1 -0
- package/dist/globals/stores/friendstore/friendsuifriendstore.d.ts +125 -0
- package/dist/globals/stores/friendstore/friendsuifriendstore.js +1 -0
- package/dist/globals/stores/friendstore/index.d.ts +25 -0
- package/dist/globals/stores/friendstore/index.js +1 -0
- package/dist/globals/stores/friendstore/shared.d.ts +207 -0
- package/dist/globals/stores/friendstore/shared.js +41 -0
- package/dist/globals/stores/gamerecordingstore.d.ts +263 -0
- package/dist/globals/stores/gamerecordingstore.js +1 -0
- package/dist/globals/stores/index.d.ts +18 -0
- package/dist/globals/stores/index.js +18 -0
- package/dist/globals/stores/libraryuistore.d.ts +179 -0
- package/dist/globals/stores/libraryuistore.js +56 -0
- package/dist/globals/stores/localizationmanager.d.ts +18 -0
- package/dist/globals/stores/localizationmanager.js +1 -0
- package/dist/globals/stores/mainwindowbrowsermanager.d.ts +62 -0
- package/dist/globals/stores/mainwindowbrowsermanager.js +1 -0
- package/dist/globals/stores/notificationstore.d.ts +242 -0
- package/dist/globals/stores/notificationstore.js +20 -0
- package/dist/globals/stores/popupmanager.d.ts +128 -0
- package/dist/globals/stores/popupmanager.js +1 -0
- package/dist/globals/stores/securitystore.d.ts +35 -0
- package/dist/globals/stores/securitystore.js +1 -0
- package/dist/globals/stores/settingsstore.d.ts +86 -0
- package/dist/globals/stores/settingsstore.js +19 -0
- package/dist/globals/stores/steamuistore/gamepadbrowserview.d.ts +143 -0
- package/dist/globals/stores/steamuistore/gamepadbrowserview.js +9 -0
- package/dist/globals/stores/steamuistore/gamepaduiaudio.d.ts +36 -0
- package/dist/globals/stores/steamuistore/gamepaduiaudio.js +1 -0
- package/dist/globals/stores/steamuistore/index.d.ts +129 -0
- package/dist/globals/stores/steamuistore/index.js +11 -0
- package/dist/globals/stores/steamuistore/menu.d.ts +39 -0
- package/dist/globals/stores/steamuistore/menu.js +19 -0
- package/dist/globals/stores/steamuistore/window.d.ts +206 -0
- package/dist/globals/stores/steamuistore/window.js +6 -0
- package/dist/globals/stores/storeitemcache.d.ts +319 -0
- package/dist/globals/stores/storeitemcache.js +17 -0
- package/dist/globals/stores/urlstore.d.ts +57 -0
- package/dist/globals/stores/urlstore.js +1 -0
- package/dist/modules/Router.d.ts +5 -58
- package/dist/modules/Router.js +2 -20
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/package.json +1 -1
- package/src/components/Dropdown.tsx +2 -2
- package/src/components/FooterLegend.ts +10 -2
- package/src/components/Menu.ts +11 -21
- package/src/components/Modal.ts +40 -8
- package/src/globals/index.ts +45 -2
- package/src/globals/shared/cm.ts +158 -0
- package/src/globals/shared/enums.ts +97 -0
- package/src/globals/shared/history.ts +15 -0
- package/src/globals/shared/index.ts +5 -0
- package/src/globals/shared/interfaces.ts +147 -0
- package/src/globals/shared/navigation.ts +15 -0
- package/src/globals/shared/steamid.ts +49 -0
- package/src/globals/shared/storage.ts +62 -0
- package/src/globals/steam-client/App.ts +2 -2
- package/src/globals/steam-client/Auth.ts +2 -2
- package/src/globals/steam-client/ClientNotifications.ts +1 -1
- package/src/globals/steam-client/Overlay.ts +2 -1
- package/src/globals/steam-client/Settings.ts +1 -1
- package/src/globals/steam-client/SharedConnection.ts +2 -1
- package/src/globals/steam-client/UI.ts +15 -6
- package/src/globals/steam-client/User.ts +20 -0
- package/src/globals/steam-client/WebChat.ts +3 -2
- package/src/globals/steam-client/shared.ts +0 -69
- package/src/globals/stores/app.ts +102 -0
- package/src/globals/stores/appdetailsstore.ts +235 -0
- package/src/globals/stores/appinfostore.ts +65 -0
- package/src/globals/stores/appstore.ts +166 -0
- package/src/globals/stores/badgestore.ts +87 -0
- package/src/globals/stores/collectionstore.ts +544 -0
- package/src/globals/stores/consolestore.ts +54 -0
- package/src/globals/stores/focusnavcontroller.ts +522 -0
- package/src/globals/stores/friendstore/clanstore.ts +89 -0
- package/src/globals/stores/friendstore/friendchat.ts +646 -0
- package/src/globals/stores/friendstore/friendgroupstore.ts +187 -0
- package/src/globals/stores/friendstore/friendingamenotificationstore.ts +1 -0
- package/src/globals/stores/friendstore/friendslistfavoritesstore.ts +37 -0
- package/src/globals/stores/friendstore/friendsuifriendstore.ts +274 -0
- package/src/globals/stores/friendstore/index.ts +58 -0
- package/src/globals/stores/friendstore/shared.ts +318 -0
- package/src/globals/stores/gamerecordingstore.ts +367 -0
- package/src/globals/stores/index.ts +18 -0
- package/src/globals/stores/libraryuistore.ts +395 -0
- package/src/globals/stores/localizationmanager.ts +56 -0
- package/src/globals/stores/mainwindowbrowsermanager.ts +135 -0
- package/src/globals/stores/notificationstore.ts +298 -0
- package/src/globals/stores/popupmanager.ts +352 -0
- package/src/globals/stores/securitystore.ts +36 -0
- package/src/globals/stores/settingsstore.ts +134 -0
- package/src/globals/stores/steamuistore/gamepadbrowserview.ts +172 -0
- package/src/globals/stores/steamuistore/gamepaduiaudio.ts +117 -0
- package/src/globals/stores/steamuistore/index.ts +212 -0
- package/src/globals/stores/steamuistore/menu.ts +89 -0
- package/src/globals/stores/steamuistore/window.ts +466 -0
- package/src/globals/stores/storeitemcache.ts +347 -0
- package/src/globals/stores/urlstore.ts +150 -0
- package/src/modules/Router.ts +11 -77
- package/src/utils/index.ts +0 -1
- package/dist/globals/SteamClient.d.ts +0 -5
- package/dist/globals/SteamClient.js +0 -1
- package/dist/globals/stores.d.ts +0 -70
- package/src/globals/SteamClient.ts +0 -6
- package/src/globals/stores.ts +0 -74
- /package/dist/globals/{stores.js → shared/cm.js} +0 -0
package/dist/modules/Router.js
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
import Logger from
|
|
2
|
-
import { findModuleExport } from
|
|
3
|
-
export var SideMenu;
|
|
4
|
-
(function (SideMenu) {
|
|
5
|
-
SideMenu[SideMenu["None"] = 0] = "None";
|
|
6
|
-
SideMenu[SideMenu["Main"] = 1] = "Main";
|
|
7
|
-
SideMenu[SideMenu["QuickAccess"] = 2] = "QuickAccess";
|
|
8
|
-
})(SideMenu || (SideMenu = {}));
|
|
9
|
-
export var QuickAccessTab;
|
|
10
|
-
(function (QuickAccessTab) {
|
|
11
|
-
QuickAccessTab[QuickAccessTab["Notifications"] = 0] = "Notifications";
|
|
12
|
-
QuickAccessTab[QuickAccessTab["RemotePlayTogetherControls"] = 1] = "RemotePlayTogetherControls";
|
|
13
|
-
QuickAccessTab[QuickAccessTab["VoiceChat"] = 2] = "VoiceChat";
|
|
14
|
-
QuickAccessTab[QuickAccessTab["Friends"] = 3] = "Friends";
|
|
15
|
-
QuickAccessTab[QuickAccessTab["Settings"] = 4] = "Settings";
|
|
16
|
-
QuickAccessTab[QuickAccessTab["Perf"] = 5] = "Perf";
|
|
17
|
-
QuickAccessTab[QuickAccessTab["Help"] = 6] = "Help";
|
|
18
|
-
QuickAccessTab[QuickAccessTab["Music"] = 7] = "Music";
|
|
19
|
-
QuickAccessTab[QuickAccessTab["Decky"] = 999] = "Decky";
|
|
20
|
-
})(QuickAccessTab || (QuickAccessTab = {}));
|
|
1
|
+
import Logger from "../logger";
|
|
2
|
+
import { findModuleExport } from "../webpack";
|
|
21
3
|
export const Router = findModuleExport((e) => e.Navigate && e.NavigationManager);
|
|
22
4
|
export let Navigation = {};
|
|
23
5
|
const logger = new Logger("Navigation");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/class-mapper.ts","../src/index.ts","../src/logger.ts","../src/webpack.ts","../src/components/Button.ts","../src/components/ButtonItem.ts","../src/components/Carousel.ts","../src/components/ControlsList.ts","../src/components/Dialog.ts","../src/components/DialogCheckbox.ts","../src/components/Dropdown.tsx","../src/components/ErrorBoundary.ts","../src/components/Field.ts","../src/components/FocusRing.ts","../src/components/Focusable.ts","../src/components/FooterLegend.ts","../src/components/Item.ts","../src/components/Marquee.ts","../src/components/Menu.ts","../src/components/Modal.ts","../src/components/Panel.ts","../src/components/ProgressBar.ts","../src/components/Scroll.ts","../src/components/SidebarNavigation.ts","../src/components/SliderField.ts","../src/components/Spinner.ts","../src/components/SteamSpinner.ts","../src/components/Tabs.ts","../src/components/TextField.ts","../src/components/Toggle.ts","../src/components/ToggleField.ts","../src/components/index.ts","../src/custom-components/ColorPickerModal.tsx","../src/custom-components/ReorderableList.tsx","../src/custom-components/SuspensefulImage.tsx","../src/custom-components/index.ts","../src/custom-hooks/index.ts","../src/custom-hooks/useQuickAccessVisible.ts","../src/deck-hooks/index.ts","../src/deck-hooks/useParams.ts","../src/globals/
|
|
1
|
+
{"root":["../src/class-mapper.ts","../src/index.ts","../src/logger.ts","../src/webpack.ts","../src/components/Button.ts","../src/components/ButtonItem.ts","../src/components/Carousel.ts","../src/components/ControlsList.ts","../src/components/Dialog.ts","../src/components/DialogCheckbox.ts","../src/components/Dropdown.tsx","../src/components/ErrorBoundary.ts","../src/components/Field.ts","../src/components/FocusRing.ts","../src/components/Focusable.ts","../src/components/FooterLegend.ts","../src/components/Item.ts","../src/components/Marquee.ts","../src/components/Menu.ts","../src/components/Modal.ts","../src/components/Panel.ts","../src/components/ProgressBar.ts","../src/components/Scroll.ts","../src/components/SidebarNavigation.ts","../src/components/SliderField.ts","../src/components/Spinner.ts","../src/components/SteamSpinner.ts","../src/components/Tabs.ts","../src/components/TextField.ts","../src/components/Toggle.ts","../src/components/ToggleField.ts","../src/components/index.ts","../src/custom-components/ColorPickerModal.tsx","../src/custom-components/ReorderableList.tsx","../src/custom-components/SuspensefulImage.tsx","../src/custom-components/index.ts","../src/custom-hooks/index.ts","../src/custom-hooks/useQuickAccessVisible.ts","../src/deck-hooks/index.ts","../src/deck-hooks/useParams.ts","../src/globals/index.ts","../src/globals/shared/cm.ts","../src/globals/shared/enums.ts","../src/globals/shared/history.ts","../src/globals/shared/index.ts","../src/globals/shared/interfaces.ts","../src/globals/shared/navigation.ts","../src/globals/shared/steamid.ts","../src/globals/shared/storage.ts","../src/globals/steam-client/App.ts","../src/globals/steam-client/Auth.ts","../src/globals/steam-client/Broadcast.ts","../src/globals/steam-client/Browser.ts","../src/globals/steam-client/ClientNotifications.ts","../src/globals/steam-client/Cloud.ts","../src/globals/steam-client/CommunityItems.ts","../src/globals/steam-client/Console.ts","../src/globals/steam-client/Customization.ts","../src/globals/steam-client/Downloads.ts","../src/globals/steam-client/FamilySharing.ts","../src/globals/steam-client/FriendSettings.ts","../src/globals/steam-client/Friends.ts","../src/globals/steam-client/GameNotes.ts","../src/globals/steam-client/GameRecording.ts","../src/globals/steam-client/GameSessions.ts","../src/globals/steam-client/Input.ts","../src/globals/steam-client/InstallFolder.ts","../src/globals/steam-client/Installs.ts","../src/globals/steam-client/Messaging.ts","../src/globals/steam-client/Music.ts","../src/globals/steam-client/Notifications.ts","../src/globals/steam-client/OpenVR.ts","../src/globals/steam-client/Overlay.ts","../src/globals/steam-client/Parental.ts","../src/globals/steam-client/RemotePlay.ts","../src/globals/steam-client/Screenshots.ts","../src/globals/steam-client/ServerBrowser.ts","../src/globals/steam-client/Settings.ts","../src/globals/steam-client/SharedConnection.ts","../src/globals/steam-client/Stats.ts","../src/globals/steam-client/SteamChina.ts","../src/globals/steam-client/Storage.ts","../src/globals/steam-client/Streaming.ts","../src/globals/steam-client/UI.ts","../src/globals/steam-client/URL.ts","../src/globals/steam-client/Updates.ts","../src/globals/steam-client/User.ts","../src/globals/steam-client/WebChat.ts","../src/globals/steam-client/WebUITransport.ts","../src/globals/steam-client/Window.ts","../src/globals/steam-client/index.ts","../src/globals/steam-client/shared.ts","../src/globals/steam-client/browser-view/BrowserViewPopup.ts","../src/globals/steam-client/browser-view/index.ts","../src/globals/steam-client/system/Audio.ts","../src/globals/steam-client/system/AudioDevice.ts","../src/globals/steam-client/system/Bluetooth.ts","../src/globals/steam-client/system/Devkit.ts","../src/globals/steam-client/system/Display.ts","../src/globals/steam-client/system/DisplayManager.ts","../src/globals/steam-client/system/Dock.ts","../src/globals/steam-client/system/Perf.ts","../src/globals/steam-client/system/Report.ts","../src/globals/steam-client/system/UI.ts","../src/globals/steam-client/system/index.ts","../src/globals/steam-client/system/network/Device.ts","../src/globals/steam-client/system/network/index.ts","../src/globals/stores/app.ts","../src/globals/stores/appdetailsstore.ts","../src/globals/stores/appinfostore.ts","../src/globals/stores/appstore.ts","../src/globals/stores/badgestore.ts","../src/globals/stores/collectionstore.ts","../src/globals/stores/consolestore.ts","../src/globals/stores/focusnavcontroller.ts","../src/globals/stores/gamerecordingstore.ts","../src/globals/stores/index.ts","../src/globals/stores/libraryuistore.ts","../src/globals/stores/localizationmanager.ts","../src/globals/stores/mainwindowbrowsermanager.ts","../src/globals/stores/notificationstore.ts","../src/globals/stores/popupmanager.ts","../src/globals/stores/securitystore.ts","../src/globals/stores/settingsstore.ts","../src/globals/stores/storeitemcache.ts","../src/globals/stores/urlstore.ts","../src/globals/stores/friendstore/clanstore.ts","../src/globals/stores/friendstore/friendchat.ts","../src/globals/stores/friendstore/friendgroupstore.ts","../src/globals/stores/friendstore/friendingamenotificationstore.ts","../src/globals/stores/friendstore/friendslistfavoritesstore.ts","../src/globals/stores/friendstore/friendsuifriendstore.ts","../src/globals/stores/friendstore/index.ts","../src/globals/stores/friendstore/shared.ts","../src/globals/stores/steamuistore/gamepadbrowserview.ts","../src/globals/stores/steamuistore/gamepaduiaudio.ts","../src/globals/stores/steamuistore/index.ts","../src/globals/stores/steamuistore/menu.ts","../src/globals/stores/steamuistore/window.ts","../src/modules/Router.ts","../src/modules/index.ts","../src/utils/index.ts","../src/utils/patcher.ts","../src/utils/static-classes.ts","../src/utils/react/fc.ts","../src/utils/react/react.ts","../src/utils/react/treepatcher.ts"],"version":"5.9.2"}
|
package/dist/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import { ReactNode, FC } from 'react';
|
|
|
3
3
|
import { CommonUIModule } from '../webpack';
|
|
4
4
|
import { ItemProps } from './Item';
|
|
5
5
|
import { createPropListRegex } from '../utils';
|
|
6
|
-
import type {
|
|
6
|
+
import type { ContextMenuCreationOptions } from './Menu';
|
|
7
7
|
|
|
8
8
|
export interface SingleDropdownOption {
|
|
9
9
|
data: any;
|
|
@@ -28,7 +28,7 @@ export interface DropdownProps {
|
|
|
28
28
|
onMenuWillOpen?(showMenu: () => void): void;
|
|
29
29
|
onMenuOpened?(): void;
|
|
30
30
|
onChange?(data: SingleDropdownOption): void;
|
|
31
|
-
contextMenuPositionOptions?:
|
|
31
|
+
contextMenuPositionOptions?: ContextMenuCreationOptions;
|
|
32
32
|
menuLabel?: string;
|
|
33
33
|
strDefaultLabel?: string;
|
|
34
34
|
renderButtonValue?(element: ReactNode): ReactNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
+
// TODO(globals): should this really stay here ?
|
|
3
4
|
export enum GamepadButton {
|
|
4
5
|
INVALID,
|
|
5
6
|
OK,
|
|
@@ -31,6 +32,13 @@ export enum GamepadButton {
|
|
|
31
32
|
STEAM_GUIDE,
|
|
32
33
|
STEAM_QUICK_MENU,
|
|
33
34
|
}
|
|
35
|
+
// TODO(globals): should this really stay here ?
|
|
36
|
+
export enum EFocusSource {
|
|
37
|
+
GAMEPAD,
|
|
38
|
+
KEYBOARD,
|
|
39
|
+
APPLICATION,
|
|
40
|
+
BROWSER
|
|
41
|
+
}
|
|
34
42
|
export enum NavEntryPositionPreferences {
|
|
35
43
|
/**
|
|
36
44
|
* Always give focus to the first child element.
|
|
@@ -70,9 +78,9 @@ export enum NavEntryPositionPreferences {
|
|
|
70
78
|
PREFERRED_CHILD,
|
|
71
79
|
}
|
|
72
80
|
export interface GamepadEventDetail {
|
|
73
|
-
button:
|
|
81
|
+
button: GamepadButton;
|
|
74
82
|
is_repeat?: boolean;
|
|
75
|
-
source:
|
|
83
|
+
source: EFocusSource;
|
|
76
84
|
}
|
|
77
85
|
export declare type ActionDescriptionMap = {
|
|
78
86
|
[key in GamepadButton]?: ReactNode;
|
package/src/components/Menu.ts
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
import { Export, findModuleByExport, findModuleDetailsByExport, findModuleExport } from '../webpack';
|
|
4
|
-
import { FooterLegendProps } from './FooterLegend';
|
|
5
|
-
|
|
6
|
-
interface PopupCreationOptions {
|
|
7
|
-
/**
|
|
8
|
-
* Initially hidden, make it appear with {@link ContextMenuInstance.Show}.
|
|
9
|
-
*/
|
|
10
|
-
bCreateHidden?: boolean;
|
|
11
|
-
|
|
12
|
-
bModal?: boolean;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Document title.
|
|
16
|
-
*/
|
|
17
|
-
title?: string;
|
|
18
|
-
}
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
import type { PopupCreationOptions } from '../globals/stores/popupmanager';
|
|
3
|
+
import { type Export, findModuleByExport, findModuleDetailsByExport, findModuleExport } from '../webpack';
|
|
4
|
+
import type { FooterLegendProps } from './FooterLegend';
|
|
19
5
|
|
|
20
6
|
// Separate interface, since one of webpack module exports uses this exact object,
|
|
21
7
|
// so maybe it could be reused elsewhere.
|
|
@@ -30,7 +16,7 @@ interface MonitorOptions {
|
|
|
30
16
|
flGamepadScale: number;
|
|
31
17
|
}
|
|
32
18
|
|
|
33
|
-
export interface
|
|
19
|
+
export interface ContextMenuCreationOptions extends PopupCreationOptions, Partial<MonitorOptions> {
|
|
34
20
|
/**
|
|
35
21
|
* When {@link bForcePopup} is true, makes the window appear above everything else.
|
|
36
22
|
*/
|
|
@@ -69,6 +55,9 @@ export interface ContextMenuPositionOptions extends PopupCreationOptions, Partia
|
|
|
69
55
|
*/
|
|
70
56
|
bMatchWidth?: boolean;
|
|
71
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Set to `true` to not focus the menu when shown.
|
|
60
|
+
*/
|
|
72
61
|
bNoFocusWhenShown?: boolean;
|
|
73
62
|
|
|
74
63
|
/**
|
|
@@ -101,7 +90,8 @@ export interface ContextMenuPositionOptions extends PopupCreationOptions, Partia
|
|
|
101
90
|
|
|
102
91
|
bShiftToFitWindow?: boolean;
|
|
103
92
|
|
|
104
|
-
// different window creation flags (StandaloneContextMenu vs PopupContextMenu
|
|
93
|
+
// different window creation flags (StandaloneContextMenu vs PopupContextMenu,
|
|
94
|
+
// so OverrideRedirect vs PopUpMenuHint in EPopupCreationFlags)
|
|
105
95
|
bStandalone?: boolean;
|
|
106
96
|
|
|
107
97
|
/**
|
|
@@ -119,7 +109,7 @@ interface ContextMenuInstance {
|
|
|
119
109
|
export const showContextMenu: (
|
|
120
110
|
children: ReactNode,
|
|
121
111
|
parent?: EventTarget,
|
|
122
|
-
options?:
|
|
112
|
+
options?: ContextMenuCreationOptions,
|
|
123
113
|
) => ContextMenuInstance = findModuleExport(
|
|
124
114
|
(e: Export) =>
|
|
125
115
|
typeof e === 'function' &&
|
package/src/components/Modal.ts
CHANGED
|
@@ -1,19 +1,51 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
import type { BrowserContext } from '../globals/shared';
|
|
3
3
|
import { findSP } from '../utils';
|
|
4
|
-
import { Export, findModule, findModuleDetailsByExport, findModuleExport } from '../webpack';
|
|
4
|
+
import { type Export, findModule, findModuleDetailsByExport, findModuleExport } from '../webpack';
|
|
5
5
|
|
|
6
|
-
// All of the popout options + strTitle are related. Proper usage is not yet known...
|
|
7
6
|
export interface ShowModalProps {
|
|
8
|
-
browserContext?:
|
|
7
|
+
browserContext?: BrowserContext;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @todo Opposite of {@link bNeverPopOut}.
|
|
11
|
+
*/
|
|
9
12
|
bForcePopOut?: boolean;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @todo seems unused ?
|
|
16
|
+
*/
|
|
10
17
|
bHideActionIcons?: boolean;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Desktop behavior - dim (not hide) the main window when showing this modal.
|
|
21
|
+
*/
|
|
11
22
|
bHideMainWindowForPopouts?: boolean;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @todo Opposite of {@link bForcePopOut}.
|
|
26
|
+
*/
|
|
12
27
|
bNeverPopOut?: boolean;
|
|
13
|
-
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Seems to be the same as "closeModal" callback, but only when the modal is a
|
|
31
|
+
* popout.
|
|
32
|
+
* @note Will no longer work after "Update" invocation!
|
|
33
|
+
*/
|
|
34
|
+
fnOnClose?: () => void;
|
|
35
|
+
|
|
14
36
|
popupHeight?: number;
|
|
15
37
|
popupWidth?: number;
|
|
16
|
-
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Invoked once the render is complete. Currently, it seems to be used as
|
|
41
|
+
* image loading success/error callback...
|
|
42
|
+
*/
|
|
43
|
+
promiseRenderComplete?: Promise<void>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Document title. For modal title use the component's title, i.e. for
|
|
47
|
+
* {@link ConfirmModal} pass `strTitle`.
|
|
48
|
+
*/
|
|
17
49
|
strTitle?: string;
|
|
18
50
|
}
|
|
19
51
|
|
|
@@ -37,7 +69,7 @@ const showModalRaw: (
|
|
|
37
69
|
parent?: EventTarget,
|
|
38
70
|
title?: string,
|
|
39
71
|
props?: ShowModalProps,
|
|
40
|
-
|
|
72
|
+
browserContext?: BrowserContext,
|
|
41
73
|
hideActions?: { bHideActions?: boolean },
|
|
42
74
|
modalManager?: unknown,
|
|
43
75
|
) => ShowModalResult = findModuleExport(
|
package/src/globals/index.ts
CHANGED
|
@@ -1,2 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { SteamClient } from './steam-client';
|
|
2
|
+
import type {
|
|
3
|
+
CApp,
|
|
4
|
+
CAppDetailsStore,
|
|
5
|
+
CAppStore,
|
|
6
|
+
CBadgeStore,
|
|
7
|
+
CCollectionStore,
|
|
8
|
+
CConsoleStore,
|
|
9
|
+
CFocusNavController,
|
|
10
|
+
CFriendStore,
|
|
11
|
+
CGameRecordingStore,
|
|
12
|
+
CLibraryUIStore,
|
|
13
|
+
CLocalizationManager,
|
|
14
|
+
CMainWindowBrowserManager,
|
|
15
|
+
CNotificationStore,
|
|
16
|
+
CPopupManager,
|
|
17
|
+
CSecurityStore,
|
|
18
|
+
CSettingsStore,
|
|
19
|
+
CSteamUIStore,
|
|
20
|
+
CURLStore,
|
|
21
|
+
} from './stores';
|
|
22
|
+
|
|
23
|
+
declare global {
|
|
24
|
+
interface Window {
|
|
25
|
+
App: CApp;
|
|
26
|
+
appStore: CAppStore;
|
|
27
|
+
appDetailsStore: CAppDetailsStore;
|
|
28
|
+
badgeStore: CBadgeStore;
|
|
29
|
+
collectionStore: CCollectionStore;
|
|
30
|
+
ConsoleStore: CConsoleStore;
|
|
31
|
+
FocusNavController: CFocusNavController;
|
|
32
|
+
friendStore: CFriendStore;
|
|
33
|
+
g_GRS: CGameRecordingStore;
|
|
34
|
+
g_PopupManager: CPopupManager;
|
|
35
|
+
LocalizationManager: CLocalizationManager;
|
|
36
|
+
MainWindowBrowserManager: CMainWindowBrowserManager;
|
|
37
|
+
NotificationStore: CNotificationStore;
|
|
38
|
+
securitystore: CSecurityStore;
|
|
39
|
+
settingsStore: CSettingsStore;
|
|
40
|
+
SteamClient: SteamClient;
|
|
41
|
+
SteamUIStore: CSteamUIStore;
|
|
42
|
+
uiStore: CLibraryUIStore;
|
|
43
|
+
urlStore: CURLStore;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { JsPbMessageClass, OperationResponse } from '../steam-client/shared';
|
|
2
|
+
import type { CBaseProtoBufMsg, CCallbackList, Unsubscribable } from './interfaces';
|
|
3
|
+
import type { CSteamID } from './steamid';
|
|
4
|
+
|
|
5
|
+
type Callback_t = (msg: CBaseProtoBufMsg) => void;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @see https://github.com/SteamDatabase/SteamTracking/blob/master/Protobufs/enums_clientserver.proto#L4
|
|
9
|
+
*/
|
|
10
|
+
export type EMsg_t = number;
|
|
11
|
+
|
|
12
|
+
interface ReportErrorOptions {
|
|
13
|
+
cCallsitesToIgnore: number;
|
|
14
|
+
bIncludeMessageInIdentifier: boolean;
|
|
15
|
+
error: Error;
|
|
16
|
+
strComponentStack: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface ReportErrorResult {
|
|
20
|
+
identifier: string;
|
|
21
|
+
identifierHash: string;
|
|
22
|
+
message: string[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface ErrorReportingStore {
|
|
26
|
+
m_bEnabled: boolean;
|
|
27
|
+
m_bInitialized: boolean;
|
|
28
|
+
m_bReportingPaused: boolean;
|
|
29
|
+
m_fnGetReportingInterval: () => number;
|
|
30
|
+
m_rgErrorQueue: Error[];
|
|
31
|
+
m_sendTimer: number | null;
|
|
32
|
+
m_strProduct: string;
|
|
33
|
+
m_strVersion: string;
|
|
34
|
+
m_transport: ServiceTransport;
|
|
35
|
+
|
|
36
|
+
BIsBlacklisted(error: Error): boolean;
|
|
37
|
+
QueueSend(error: Error): void;
|
|
38
|
+
ReportError(error: Error, options?: Partial<ReportErrorOptions>): Promise<ReportErrorResult | null>;
|
|
39
|
+
SendErrorReport(error: Error): void;
|
|
40
|
+
SendErrorReports(errors: Error[]): void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ServiceTransport {
|
|
44
|
+
MakeReady(): Promise<OperationResponse>;
|
|
45
|
+
SendMsg(target_job_name: string, msg: CBaseProtoBufMsg, protoMsg: any): CBaseProtoBufMsg;
|
|
46
|
+
SendNotification(target_job_name: string, msg: CBaseProtoBufMsg): boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface ServiceHandler<T extends Callback_t> {
|
|
50
|
+
/**
|
|
51
|
+
* Invokes the callback.
|
|
52
|
+
*/
|
|
53
|
+
invoke: T;
|
|
54
|
+
|
|
55
|
+
msgClass: JsPbMessageClass;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface ServiceMethod {
|
|
59
|
+
/**
|
|
60
|
+
* e.g. `"PlayerClient.NotifyCommunityPreferencesChanged#1"`.
|
|
61
|
+
*/
|
|
62
|
+
name: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Protobuf message class.
|
|
66
|
+
*/
|
|
67
|
+
request: any;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface ServiceRegistrar<T extends Callback_t> {
|
|
71
|
+
/**
|
|
72
|
+
* Invokes the callback.
|
|
73
|
+
*/
|
|
74
|
+
invoke: T;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Unregisters the callback.
|
|
78
|
+
*/
|
|
79
|
+
unregister(): void;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface MessageHandlers {
|
|
83
|
+
m_mapCallbacks: Map<EMsg_t, ServiceHandler<any>[]>;
|
|
84
|
+
m_mapServiceMethodHandlers: Map<string, ServiceHandler<any>[]>;
|
|
85
|
+
m_rgRegisteredEMsgs: EMsg_t[];
|
|
86
|
+
m_rgRegisteredServiceMethodHandlers: string[];
|
|
87
|
+
|
|
88
|
+
AddCallback<T extends Callback_t>(msg: EMsg_t, msgClass: any | undefined, callback: T): ServiceRegistrar<T>;
|
|
89
|
+
AddServiceMethodHandler<T extends Callback_t>(method: ServiceMethod, callback: T): ServiceRegistrar<T>;
|
|
90
|
+
AddServiceNotificationHandler<T extends Callback_t>(msg: EMsg_t, callback: T): ServiceRegistrar<T>;
|
|
91
|
+
DispatchMsgToHandlers(msg: CBaseProtoBufMsg, callback: (msg: CBaseProtoBufMsg) => void): boolean;
|
|
92
|
+
InstallErrorReportingStore(store: ErrorReportingStore): void;
|
|
93
|
+
RegisterBaseEMessageHandler<T extends Callback_t>(msg: EMsg_t, callback: T): ServiceRegistrar<T>;
|
|
94
|
+
RegisterEMessageAction<T extends Callback_t>(
|
|
95
|
+
msg: EMsg_t,
|
|
96
|
+
msgClass: any | undefined,
|
|
97
|
+
callback: T,
|
|
98
|
+
): ServiceRegistrar<T>;
|
|
99
|
+
RegisterEMessageHandler<T extends Callback_t>(
|
|
100
|
+
msg: EMsg_t,
|
|
101
|
+
msgClass: any | undefined,
|
|
102
|
+
callback: T,
|
|
103
|
+
): ServiceRegistrar<T>;
|
|
104
|
+
RegisterServiceMethodHandler<T extends Callback_t>(msg: EMsg_t, callback: T): ServiceRegistrar<T>;
|
|
105
|
+
RegisterServiceMethodHandlerAction<T extends Callback_t>(msg: EMsg_t, callback: T): ServiceRegistrar<T>;
|
|
106
|
+
RegisterServiceNotificationHandler<T extends Callback_t>(msg: EMsg_t, callback: T): ServiceRegistrar<T>;
|
|
107
|
+
RegisterServiceNotificationHandlerAction<T extends Callback_t>(msg: EMsg_t, callback: T): ServiceRegistrar<T>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface CMInterfaceCallbacks {
|
|
111
|
+
m_ClientConnectionCallbacks: CCallbackList;
|
|
112
|
+
m_bRunOnce: boolean;
|
|
113
|
+
m_mapServerTypeCallbacks: Map<number, CCallbackList>;
|
|
114
|
+
|
|
115
|
+
AddCallback(callback: () => void, t?: number): Unsubscribable;
|
|
116
|
+
RunAllCallbacks(e: number[], ...args: any[]): void;
|
|
117
|
+
RunCallbacks(e: number | undefined, ...args: any[]): void;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// CMInterfaceSharedClientConnection
|
|
121
|
+
export interface CMInterface {
|
|
122
|
+
ClientServersAvailableHandler: ServiceRegistrar<any>;
|
|
123
|
+
m_ServiceTransport: ServiceTransport;
|
|
124
|
+
m_bCompletedInitialConnect: boolean;
|
|
125
|
+
m_bConnected: boolean;
|
|
126
|
+
m_bConnectionFailed: boolean;
|
|
127
|
+
m_bForceDisconnect: boolean;
|
|
128
|
+
m_bLoggedOn: boolean;
|
|
129
|
+
m_bPerformedInitialClockAdjustment: boolean;
|
|
130
|
+
m_bShouldChangePersonaStatusOnDisconnect: boolean;
|
|
131
|
+
m_callbacksOnConnect: CMInterfaceCallbacks;
|
|
132
|
+
m_callbacksOnConnectOneTime: CMInterfaceCallbacks;
|
|
133
|
+
m_callbacksOnDisconnect: CMInterfaceCallbacks;
|
|
134
|
+
m_hEMsgRegistrationObserver: () => void;
|
|
135
|
+
m_hSharedConnection: number;
|
|
136
|
+
m_messageHandlers: MessageHandlers;
|
|
137
|
+
m_nPerfClockServerMSOffset: number;
|
|
138
|
+
m_nWallClockDriftMS: number;
|
|
139
|
+
// actually valve, not a callback
|
|
140
|
+
m_onConnect: Promise<void> | undefined;
|
|
141
|
+
m_rtReconnectThrottleExpiration: number;
|
|
142
|
+
m_rtReconnectThrottleStart: number;
|
|
143
|
+
m_setConnectedServers: Set<number>;
|
|
144
|
+
m_setEMsgHandlers: Set<EMsg_t>;
|
|
145
|
+
m_setServiceMethodHandlers: Set<string>;
|
|
146
|
+
m_steamid: CSteamID;
|
|
147
|
+
m_strIPCountry: string;
|
|
148
|
+
m_strPersonaName: string;
|
|
149
|
+
m_unAccountFlags: number;
|
|
150
|
+
|
|
151
|
+
ClearHeartbeatInterval(): void;
|
|
152
|
+
Connect(): Promise<void>;
|
|
153
|
+
Disconnect(): void;
|
|
154
|
+
ResetHeartbeatInterval(): void;
|
|
155
|
+
SendHeartbeat(): void;
|
|
156
|
+
SendInternal(msg: CBaseProtoBufMsg): boolean;
|
|
157
|
+
SendMsgAndAwaitResponse(param0: CBaseProtoBufMsg, param1: EMsg_t): CBaseProtoBufMsg;
|
|
158
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export enum EBrowserType {
|
|
2
|
+
/**
|
|
3
|
+
* No window is created (like SharedJSContext).
|
|
4
|
+
*/
|
|
5
|
+
OffScreen,
|
|
6
|
+
OpenVROverlay,
|
|
7
|
+
OpenVROverlay_Dashboard,
|
|
8
|
+
/**
|
|
9
|
+
* A normal window.
|
|
10
|
+
*/
|
|
11
|
+
DirectHWND,
|
|
12
|
+
/**
|
|
13
|
+
* A borderless window.
|
|
14
|
+
*/
|
|
15
|
+
DirectHWND_Borderless,
|
|
16
|
+
/**
|
|
17
|
+
* An initially hidden window.
|
|
18
|
+
* May be shown with {@link SteamClient.Window.ShowWindow}.
|
|
19
|
+
*/
|
|
20
|
+
DirectHWND_Hidden,
|
|
21
|
+
ChildHWNDNative,
|
|
22
|
+
Offscreen_SteamUI = 12,
|
|
23
|
+
OpenVROverlay_Subview,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export enum EPopupCreationFlags {
|
|
27
|
+
None,
|
|
28
|
+
Minimized = 1 << 0,
|
|
29
|
+
Hidden = 1 << 1,
|
|
30
|
+
TooltipHint = 1 << 2,
|
|
31
|
+
NoTaskbarIcon = 1 << 3,
|
|
32
|
+
Resizable = 1 << 4,
|
|
33
|
+
ScalePosition = 1 << 5,
|
|
34
|
+
ScaleSize = 1 << 6,
|
|
35
|
+
Maximized = 1 << 7,
|
|
36
|
+
Composited = 1 << 8,
|
|
37
|
+
NotFocusable = 1 << 9,
|
|
38
|
+
FullScreen = 1 << 10,
|
|
39
|
+
Fullscreen_Exclusive = 1 << 11,
|
|
40
|
+
ApplyBrowserScaleToDimensions = 1 << 12,
|
|
41
|
+
AlwaysOnTop = 1 << 13,
|
|
42
|
+
NoWindowShadow = 1 << 14,
|
|
43
|
+
NoMinimize = 1 << 15,
|
|
44
|
+
PopUpMenuHint = 1 << 16,
|
|
45
|
+
IgnoreSavedSize = 1 << 17,
|
|
46
|
+
NoRoundedCorners = 1 << 18,
|
|
47
|
+
ForceRoundedCorners = 1 << 19,
|
|
48
|
+
OverrideRedirect = 1 << 20,
|
|
49
|
+
IgnoreSteamDisplayScale = 1 << 21,
|
|
50
|
+
TransparentParentWindow = 1 << 22,
|
|
51
|
+
DisableDPIScale = 1 << 23,
|
|
52
|
+
ForceBrowserVisible = 1 << 24,
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export enum ESteamRealm {
|
|
56
|
+
Unknown,
|
|
57
|
+
Global,
|
|
58
|
+
China,
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export enum ESteamUISound {
|
|
62
|
+
LaunchGame,
|
|
63
|
+
FriendMessage,
|
|
64
|
+
ChatMention,
|
|
65
|
+
ChatMessage,
|
|
66
|
+
ToastMessage,
|
|
67
|
+
ToastAchievement,
|
|
68
|
+
ToastMisc,
|
|
69
|
+
ToastMiscShort,
|
|
70
|
+
FriendOnline,
|
|
71
|
+
FriendInGame,
|
|
72
|
+
VolSound,
|
|
73
|
+
ShowModal,
|
|
74
|
+
HideModal,
|
|
75
|
+
IntoGameDetail,
|
|
76
|
+
OutOfGameDetail,
|
|
77
|
+
PagedNavigation,
|
|
78
|
+
ToggleOn,
|
|
79
|
+
ToggleOff,
|
|
80
|
+
SliderUp,
|
|
81
|
+
SliderDown,
|
|
82
|
+
ChangeTabs,
|
|
83
|
+
DefaultOk,
|
|
84
|
+
OpenSideMenu,
|
|
85
|
+
CloseSideMenu,
|
|
86
|
+
BasicNav,
|
|
87
|
+
FailedNav,
|
|
88
|
+
Typing,
|
|
89
|
+
TimerExpired,
|
|
90
|
+
Screenshot,
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export enum EUIMode {
|
|
94
|
+
Unknown = -1,
|
|
95
|
+
GamePad = 4,
|
|
96
|
+
Desktop = 7,
|
|
97
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Minimal types from https://www.npmjs.com/package/history/v/5.0.0
|
|
2
|
+
|
|
3
|
+
export declare enum Action {
|
|
4
|
+
Pop = 'POP',
|
|
5
|
+
Push = 'PUSH',
|
|
6
|
+
Replace = 'REPLACE',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface Location<S extends object> {
|
|
10
|
+
key: string;
|
|
11
|
+
pathname: string;
|
|
12
|
+
search: string;
|
|
13
|
+
state: S;
|
|
14
|
+
hash: string;
|
|
15
|
+
}
|