@decky/ui 4.15.1 → 4.16.1

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.
Files changed (173) hide show
  1. package/dist/components/Dropdown.d.ts +2 -2
  2. package/dist/components/FooterLegend.d.ts +8 -2
  3. package/dist/components/FooterLegend.js +7 -0
  4. package/dist/components/Menu.d.ts +5 -9
  5. package/dist/components/Modal.d.ts +3 -2
  6. package/dist/globals/index.d.ts +47 -2
  7. package/dist/globals/index.js +3 -2
  8. package/dist/globals/shared/cm.d.ts +112 -0
  9. package/dist/globals/shared/enums.d.ts +80 -0
  10. package/dist/globals/shared/enums.js +85 -0
  11. package/dist/globals/shared/history.d.ts +12 -0
  12. package/dist/globals/shared/history.js +1 -0
  13. package/dist/globals/shared/index.d.ts +5 -0
  14. package/dist/globals/shared/index.js +5 -0
  15. package/dist/globals/shared/interfaces.d.ts +54 -0
  16. package/dist/globals/shared/interfaces.js +1 -0
  17. package/dist/globals/shared/navigation.d.ts +14 -0
  18. package/dist/globals/shared/navigation.js +10 -0
  19. package/dist/globals/shared/steamid.d.ts +36 -0
  20. package/dist/globals/shared/steamid.js +15 -0
  21. package/dist/globals/shared/storage.d.ts +27 -0
  22. package/dist/globals/shared/storage.js +11 -0
  23. package/dist/globals/steam-client/App.d.ts +1 -1
  24. package/dist/globals/steam-client/Auth.d.ts +1 -1
  25. package/dist/globals/steam-client/ClientNotifications.d.ts +1 -1
  26. package/dist/globals/steam-client/Overlay.d.ts +3 -2
  27. package/dist/globals/steam-client/Settings.d.ts +1 -1
  28. package/dist/globals/steam-client/SharedConnection.d.ts +2 -1
  29. package/dist/globals/steam-client/UI.d.ts +17 -6
  30. package/dist/globals/steam-client/UI.js +11 -0
  31. package/dist/globals/steam-client/User.d.ts +13 -0
  32. package/dist/globals/steam-client/User.js +7 -0
  33. package/dist/globals/steam-client/WebChat.d.ts +5 -4
  34. package/dist/globals/steam-client/shared.d.ts +0 -29
  35. package/dist/globals/steam-client/shared.js +0 -24
  36. package/dist/globals/stores/app.d.ts +35 -0
  37. package/dist/globals/stores/app.js +1 -0
  38. package/dist/globals/stores/appdetailsstore.d.ts +86 -0
  39. package/dist/globals/stores/appdetailsstore.js +1 -0
  40. package/dist/globals/stores/appinfostore.d.ts +56 -0
  41. package/dist/globals/stores/appinfostore.js +1 -0
  42. package/dist/globals/stores/appstore.d.ts +77 -0
  43. package/dist/globals/stores/appstore.js +1 -0
  44. package/dist/globals/stores/badgestore.d.ts +52 -0
  45. package/dist/globals/stores/badgestore.js +1 -0
  46. package/dist/globals/stores/collectionstore.d.ts +313 -0
  47. package/dist/globals/stores/collectionstore.js +143 -0
  48. package/dist/globals/stores/consolestore.d.ts +20 -0
  49. package/dist/globals/stores/consolestore.js +1 -0
  50. package/dist/globals/stores/focusnavcontroller.d.ts +383 -0
  51. package/dist/globals/stores/focusnavcontroller.js +29 -0
  52. package/dist/globals/stores/friendstore/clanstore.d.ts +75 -0
  53. package/dist/globals/stores/friendstore/clanstore.js +19 -0
  54. package/dist/globals/stores/friendstore/friendchat.d.ts +374 -0
  55. package/dist/globals/stores/friendstore/friendchat.js +56 -0
  56. package/dist/globals/stores/friendstore/friendgroupstore.d.ts +98 -0
  57. package/dist/globals/stores/friendstore/friendgroupstore.js +8 -0
  58. package/dist/globals/stores/friendstore/friendingamenotificationstore.d.ts +2 -0
  59. package/dist/globals/stores/friendstore/friendingamenotificationstore.js +1 -0
  60. package/dist/globals/stores/friendstore/friendslistfavoritesstore.d.ts +22 -0
  61. package/dist/globals/stores/friendstore/friendslistfavoritesstore.js +1 -0
  62. package/dist/globals/stores/friendstore/friendsuifriendstore.d.ts +125 -0
  63. package/dist/globals/stores/friendstore/friendsuifriendstore.js +1 -0
  64. package/dist/globals/stores/friendstore/index.d.ts +25 -0
  65. package/dist/globals/stores/friendstore/index.js +1 -0
  66. package/dist/globals/stores/friendstore/shared.d.ts +207 -0
  67. package/dist/globals/stores/friendstore/shared.js +41 -0
  68. package/dist/globals/stores/gamerecordingstore.d.ts +263 -0
  69. package/dist/globals/stores/gamerecordingstore.js +1 -0
  70. package/dist/globals/stores/index.d.ts +18 -0
  71. package/dist/globals/stores/index.js +18 -0
  72. package/dist/globals/stores/libraryuistore.d.ts +179 -0
  73. package/dist/globals/stores/libraryuistore.js +56 -0
  74. package/dist/globals/stores/localizationmanager.d.ts +18 -0
  75. package/dist/globals/stores/localizationmanager.js +1 -0
  76. package/dist/globals/stores/mainwindowbrowsermanager.d.ts +62 -0
  77. package/dist/globals/stores/mainwindowbrowsermanager.js +1 -0
  78. package/dist/globals/stores/notificationstore.d.ts +242 -0
  79. package/dist/globals/stores/notificationstore.js +20 -0
  80. package/dist/globals/stores/popupmanager.d.ts +128 -0
  81. package/dist/globals/stores/popupmanager.js +1 -0
  82. package/dist/globals/stores/securitystore.d.ts +35 -0
  83. package/dist/globals/stores/securitystore.js +1 -0
  84. package/dist/globals/stores/settingsstore.d.ts +86 -0
  85. package/dist/globals/stores/settingsstore.js +19 -0
  86. package/dist/globals/stores/steamuistore/gamepadbrowserview.d.ts +143 -0
  87. package/dist/globals/stores/steamuistore/gamepadbrowserview.js +9 -0
  88. package/dist/globals/stores/steamuistore/gamepaduiaudio.d.ts +36 -0
  89. package/dist/globals/stores/steamuistore/gamepaduiaudio.js +1 -0
  90. package/dist/globals/stores/steamuistore/index.d.ts +132 -0
  91. package/dist/globals/stores/steamuistore/index.js +14 -0
  92. package/dist/globals/stores/steamuistore/menu.d.ts +39 -0
  93. package/dist/globals/stores/steamuistore/menu.js +19 -0
  94. package/dist/globals/stores/steamuistore/window.d.ts +206 -0
  95. package/dist/globals/stores/steamuistore/window.js +6 -0
  96. package/dist/globals/stores/storeitemcache.d.ts +319 -0
  97. package/dist/globals/stores/storeitemcache.js +17 -0
  98. package/dist/globals/stores/urlstore.d.ts +57 -0
  99. package/dist/globals/stores/urlstore.js +1 -0
  100. package/dist/modules/Router.d.ts +3 -56
  101. package/dist/modules/Router.js +2 -20
  102. package/dist/tsconfig.tsbuildinfo +1 -1
  103. package/dist/utils/index.d.ts +0 -1
  104. package/dist/utils/react/fc.js +4 -2
  105. package/dist/utils/react/react.js +2 -2
  106. package/dist/utils/react/treepatcher.js +1 -1
  107. package/package.json +1 -1
  108. package/src/components/Dropdown.tsx +2 -2
  109. package/src/components/FooterLegend.ts +10 -2
  110. package/src/components/Menu.ts +11 -21
  111. package/src/components/Modal.ts +40 -8
  112. package/src/globals/index.ts +68 -2
  113. package/src/globals/shared/cm.ts +158 -0
  114. package/src/globals/shared/enums.ts +97 -0
  115. package/src/globals/shared/history.ts +15 -0
  116. package/src/globals/shared/index.ts +5 -0
  117. package/src/globals/shared/interfaces.ts +147 -0
  118. package/src/globals/shared/navigation.ts +15 -0
  119. package/src/globals/shared/steamid.ts +49 -0
  120. package/src/globals/shared/storage.ts +62 -0
  121. package/src/globals/steam-client/App.ts +2 -2
  122. package/src/globals/steam-client/Auth.ts +2 -2
  123. package/src/globals/steam-client/ClientNotifications.ts +1 -1
  124. package/src/globals/steam-client/Overlay.ts +3 -2
  125. package/src/globals/steam-client/Settings.ts +1 -1
  126. package/src/globals/steam-client/SharedConnection.ts +2 -1
  127. package/src/globals/steam-client/UI.ts +18 -9
  128. package/src/globals/steam-client/User.ts +20 -0
  129. package/src/globals/steam-client/WebChat.ts +5 -4
  130. package/src/globals/steam-client/shared.ts +0 -69
  131. package/src/globals/stores/app.ts +102 -0
  132. package/src/globals/stores/appdetailsstore.ts +235 -0
  133. package/src/globals/stores/appinfostore.ts +65 -0
  134. package/src/globals/stores/appstore.ts +166 -0
  135. package/src/globals/stores/badgestore.ts +87 -0
  136. package/src/globals/stores/collectionstore.ts +544 -0
  137. package/src/globals/stores/consolestore.ts +54 -0
  138. package/src/globals/stores/focusnavcontroller.ts +522 -0
  139. package/src/globals/stores/friendstore/clanstore.ts +89 -0
  140. package/src/globals/stores/friendstore/friendchat.ts +646 -0
  141. package/src/globals/stores/friendstore/friendgroupstore.ts +187 -0
  142. package/src/globals/stores/friendstore/friendingamenotificationstore.ts +1 -0
  143. package/src/globals/stores/friendstore/friendslistfavoritesstore.ts +37 -0
  144. package/src/globals/stores/friendstore/friendsuifriendstore.ts +274 -0
  145. package/src/globals/stores/friendstore/index.ts +58 -0
  146. package/src/globals/stores/friendstore/shared.ts +318 -0
  147. package/src/globals/stores/gamerecordingstore.ts +367 -0
  148. package/src/globals/stores/index.ts +18 -0
  149. package/src/globals/stores/libraryuistore.ts +395 -0
  150. package/src/globals/stores/localizationmanager.ts +56 -0
  151. package/src/globals/stores/mainwindowbrowsermanager.ts +135 -0
  152. package/src/globals/stores/notificationstore.ts +298 -0
  153. package/src/globals/stores/popupmanager.ts +352 -0
  154. package/src/globals/stores/securitystore.ts +36 -0
  155. package/src/globals/stores/settingsstore.ts +134 -0
  156. package/src/globals/stores/steamuistore/gamepadbrowserview.ts +172 -0
  157. package/src/globals/stores/steamuistore/gamepaduiaudio.ts +117 -0
  158. package/src/globals/stores/steamuistore/index.ts +217 -0
  159. package/src/globals/stores/steamuistore/menu.ts +89 -0
  160. package/src/globals/stores/steamuistore/window.ts +466 -0
  161. package/src/globals/stores/storeitemcache.ts +347 -0
  162. package/src/globals/stores/urlstore.ts +150 -0
  163. package/src/modules/Router.ts +9 -75
  164. package/src/utils/index.ts +0 -1
  165. package/src/utils/react/fc.ts +4 -2
  166. package/src/utils/react/react.ts +2 -2
  167. package/src/utils/react/treepatcher.ts +1 -1
  168. package/dist/globals/SteamClient.d.ts +0 -5
  169. package/dist/globals/SteamClient.js +0 -1
  170. package/dist/globals/stores.d.ts +0 -70
  171. package/src/globals/SteamClient.ts +0 -6
  172. package/src/globals/stores.ts +0 -74
  173. /package/dist/globals/{stores.js → shared/cm.js} +0 -0
@@ -0,0 +1,134 @@
1
+ import type { CMInterface } from '../shared/cm';
2
+ import type { SubscribableValue } from '../shared/interfaces';
3
+ import type { CUserLocalStorage } from '../shared/storage';
4
+ import type { FriendSettingsChange } from '../steam-client/FriendSettings';
5
+ import type { EClientNotificationType } from '../steam-client/Notifications';
6
+ import type { MsgClientSettings, MsgMonitorInfo, SteamSettings } from '../steam-client/Settings';
7
+
8
+ export enum ETextFilterSetting {
9
+ SteamLabOptedOut,
10
+ Enabled,
11
+ EnabledAllowProfanity,
12
+ Disabled,
13
+ }
14
+
15
+ export enum EUserReviewScorePreference {
16
+ Unset,
17
+ IncludeAll,
18
+ ExcludeBombs,
19
+ }
20
+
21
+ export enum EProvideDeckFeedbackPreference {
22
+ Unset,
23
+ Yes,
24
+ No,
25
+ }
26
+
27
+ /**
28
+ * @see https://github.com/SteamDatabase/SteamTracking/blob/master/Protobufs/steammessages_notifications.steamclient.proto#L58
29
+ */
30
+ interface SteamNotificationPreference {
31
+ notification_targets: number;
32
+ notification_type: EClientNotificationType;
33
+ }
34
+
35
+ /**
36
+ * @see https://github.com/SteamDatabase/SteamTracking/blob/master/Protobufs/steammessages_base.proto#L342
37
+ */
38
+ interface ContentDescriptor {
39
+ content_descriptorid: number;
40
+ timestamp_added: number;
41
+ }
42
+
43
+ /**
44
+ * @see https://github.com/SteamDatabase/SteamTracking/blob/master/Protobufs/steammessages_base.proto#L341
45
+ */
46
+ interface UserContentDescriptorPreferences {
47
+ content_descriptors_to_exclude: ContentDescriptor[];
48
+ }
49
+
50
+ export interface BatteryPreferences {
51
+ bShowBatteryPercentage: boolean;
52
+ }
53
+
54
+ export interface CommunityPreferences {
55
+ bParenthesizeNicknames: boolean;
56
+ bTextFilterIgnoreFriends: boolean;
57
+ content_descriptor_preferences: UserContentDescriptorPreferences & {
58
+ eTextFilterSetting: ETextFilterSetting;
59
+ };
60
+ }
61
+
62
+ export interface StorePreferences {
63
+ content_descriptor_preferences: UserContentDescriptorPreferences;
64
+ eReviewScorePreference: EUserReviewScorePreference;
65
+ provide_deck_feedback: EProvideDeckFeedbackPreference;
66
+ }
67
+
68
+ export interface CSettingsStore {
69
+ m_BatteryPreferences: SubscribableValue<BatteryPreferences>;
70
+ m_CMInterface: CMInterface;
71
+ m_ClientSettings: MsgClientSettings;
72
+ m_CommunityPreferences: CommunityPreferences;
73
+ m_FriendSettings: FriendSettingsChange;
74
+ m_MonitorInfo: MsgMonitorInfo | undefined;
75
+ m_NotificationSettings: SteamNotificationPreference[];
76
+ m_Settings: SteamSettings;
77
+ m_StorePreferences: StorePreferences;
78
+ m_bSteamIsInTournamentMode: boolean;
79
+ m_bWindowed: boolean;
80
+ m_localStorage: CUserLocalStorage;
81
+ m_setDeferredSettings: Set<string>;
82
+ m_strTimeZoneID: SubscribableValue<string>;
83
+
84
+ /**
85
+ * @returns `true` if connected to Steam.
86
+ */
87
+ BIsConnectedToSteam(): boolean;
88
+
89
+ /**
90
+ * @returns a ProtoBuf message.
91
+ */
92
+ CommunityPreferencesToMessage(value: CommunityPreferences): any;
93
+
94
+ GetBatteryPreferences(): BatteryPreferences;
95
+
96
+ /**
97
+ * Gets a Steam client option as a `[value, setValue]` tuple.
98
+ */
99
+ // TODO(protobufs): ReturnType can go maybe
100
+ GetClientSetting<K extends keyof MsgClientSettings, V = ReturnType<MsgClientSettings[K]>>(
101
+ setting: K,
102
+ ): [V, (value: V) => void];
103
+
104
+ IsDeferred(value: string): boolean;
105
+ IsSteamInTournamentMode(): boolean;
106
+ // proto msgs
107
+ MergeCommunityPreferences(e: any, t: any): void;
108
+ // proto msgs
109
+ MergeNotificationPreferences(e: any): void;
110
+ // proto msgs
111
+ MergeStorePreferences(e: any, t: any): void;
112
+
113
+ /**
114
+ * Updates monitor info with the current data.
115
+ */
116
+ RefreshMonitorInfo(): void;
117
+
118
+ SetBatteryPreferences(value: BatteryPreferences): void;
119
+ SetCommunityPreferences(value: CommunityPreferences): void;
120
+ SetDeferred(value: string): void;
121
+ SetStorePreferences(value: StorePreferences): void;
122
+
123
+ /**
124
+ * Sets windowed mode for BPM.
125
+ */
126
+ SetWindowedMode(value: boolean): void;
127
+
128
+ ToggleNotificationPreference(e: any, t: any): void;
129
+ UpdateCommunityPreference(e: any, t: any): any;
130
+ UpdateCommunityPreferences(e: any): any;
131
+ UpdateFriendSetting(e: any, t: any): any;
132
+ UpdateFriendSettings(e: any): any;
133
+ UpdateUserConfigObject(): void;
134
+ }
@@ -0,0 +1,172 @@
1
+ import type { CCallbackList, SubscribableValue } from '../../shared';
2
+ import type { BrowserViewHistory, BrowserViewPopup } from '../../steam-client/browser-view/BrowserViewPopup';
3
+ import type { CFocusNavController } from '../focusnavcontroller';
4
+
5
+ enum EGameInputSupportLevel {
6
+ PageUnloading,
7
+ Unknown,
8
+ None,
9
+ Basic,
10
+ Full,
11
+ }
12
+
13
+ interface ActionDescription {
14
+ /** @todo GamepadButton ? */
15
+ button: any;
16
+ descriptions: any;
17
+ /** @todo EFocusSource ? */
18
+ source: any;
19
+ support: EGameInputSupportLevel;
20
+ }
21
+
22
+ interface GamepadBrowserViewMessageDetails_t {
23
+ type: string;
24
+ data: {
25
+ /**
26
+ * {@link Event.type} property
27
+ */
28
+ event: string;
29
+ details: GamepadEvent;
30
+ };
31
+ }
32
+
33
+ declare class CGamepadBrowserViewBridge {
34
+ m_CallbackOnUnhandledInput: CCallbackList<[GamepadButton]>;
35
+ m_CallbackUpdateActionDescriptions: CCallbackList<[ActionDescription]>;
36
+ m_NavigationController: CFocusNavController;
37
+ m_eGameInputSupportLevel: SubscribableValue<EGameInputSupportLevel>;
38
+ m_lastActionDescriptions: any;
39
+ m_postMessage: CGamepadBrowserViewMessageHandler;
40
+
41
+ BClientManagesVirtualKeyboard(): boolean;
42
+ ForwardGamepadEventDetail(eventType: string, ev: GamepadEventInit): void;
43
+ GetGameInputSupportLevel(): SubscribableValue<EGameInputSupportLevel>;
44
+ OnUnhandledInputCallbacks(): CCallbackList<[GamepadButton]>;
45
+ RegisterOnActionDescriptionsChangedCallback(value: (descriptions: any) => void): () => void;
46
+ SetGameInputSupportLevel(value: EGameInputSupportLevel, param1: string): void;
47
+ TakeFocus(): void;
48
+ }
49
+
50
+ interface VirtualKeyboardRef_t {
51
+ ShowVirtualKeyboard(): void;
52
+ ShowModalKeyboard(): void;
53
+ SetAsCurrentVirtualKeyboardTarget(): void;
54
+ HideVirtualKeyboard(msDelay: number): void;
55
+ DelayHideVirtualKeyboard(msDelay: number): void;
56
+ BIsActive(): boolean;
57
+ BIsElementValidForInput(): boolean;
58
+ }
59
+
60
+ interface VirtualKeyboardClientMsg_t {
61
+ message: string;
62
+ msDelay: number;
63
+ }
64
+
65
+ declare class CVirtualKeyboardClient {
66
+ m_ownerWindow: Window;
67
+
68
+ /**
69
+ * @returns an uninit function.
70
+ */
71
+ Init(wnd: Window): () => void;
72
+ CreateVirtualKeyboardRef(): VirtualKeyboardRef_t;
73
+ ShowVirtualKeyboard(): void;
74
+ ShowModalKeyboard(): void;
75
+ HideVirtualKeyboard(msDelay: number): void;
76
+ OnBrowserViewMessage(message: string, args: string): void;
77
+ OnMessage(msg: any): void;
78
+ InternalDispatchMessage(msg: any): void;
79
+ SendMessage(msg: VirtualKeyboardClientMsg_t): void;
80
+ }
81
+
82
+ declare class CVirtualKeyboardHost {
83
+ m_showKeyboard: () => void;
84
+ m_showModalKeyboard: () => void;
85
+ m_hideKeyboard: () => void;
86
+
87
+ OnMessage(message: string, args: string, _currentURL: string): void;
88
+ }
89
+
90
+ declare class CGamepadBrowserViewMessageHandler {
91
+ m_browser: BrowserViewPopup;
92
+ m_fnCallback: (parsedArgs: any) => void;
93
+
94
+ OnMessage(message: string, args: string): void;
95
+ PostMessage(detail: GamepadBrowserViewMessageDetails_t): void;
96
+ RegisterForMessage(callback: (parsedArgs: any) => void): void;
97
+ }
98
+
99
+ export declare class CGamepadBrowserView {
100
+ m_URL: string;
101
+ m_URLRequested: string | undefined;
102
+ m_bCanGoBackward: boolean;
103
+ m_bCanGoForward: boolean;
104
+ m_bExternalRequest: boolean;
105
+ m_bIsDestroying: boolean;
106
+ m_bLoading: boolean;
107
+ m_bSeenLoadStartForExternalRequest: boolean;
108
+ m_bUseVRKeyboard: boolean;
109
+ m_browserView: BrowserViewPopup;
110
+ m_fnBeforeCloseHandler: ((bIsDestroying: boolean) => void) | null;
111
+ m_fnGoBackOverride: (() => void) | undefined;
112
+ m_gamepadBridge: CGamepadBrowserViewBridge;
113
+ m_history: BrowserViewHistory;
114
+ m_loadErrorCode: number | null;
115
+ m_loadErrorDesc: string | null;
116
+ m_loadErrorURL: string | null;
117
+ m_mapMessageCallbacks: Map<string, CCallbackList>;
118
+ m_onFinishedRequestCallbacks: CCallbackList;
119
+ m_onStartLoadingCallbacks: CCallbackList;
120
+ m_onStartRequestCallbacks: CCallbackList;
121
+ m_refKeyboard: VirtualKeyboardRef_t;
122
+ m_strInitialURL: string | undefined;
123
+ m_strName: string;
124
+ m_strTitle: string;
125
+ m_strUserAgentIdentifier: string;
126
+ m_strUserAgentOverride: string;
127
+ m_strVROverlayKey: string | undefined;
128
+ m_virtualKeyboardHost: CVirtualKeyboardHost;
129
+
130
+ AddHardwareHeaders(): void;
131
+ BExternalTriggeredLoad(): boolean;
132
+ BIsLoadingURL(): boolean;
133
+ BrowserViewOnMessage(message: string, args: string, currentURL: string): void;
134
+ Destroy(): void;
135
+ ForwardGamepadEventDetail(eventType: string, ev: GamepadEventInit): void;
136
+ GetBrowser(): BrowserViewPopup;
137
+ GetGameInputSupportLevel(): EGameInputSupportLevel;
138
+ GetOnMessageCallbacks(msg: string): CCallbackList;
139
+ GoBack(): void;
140
+ GoForward(): void;
141
+ Init(controller: CFocusNavController, keyboard: CVirtualKeyboardClient, parent: EventTarget): void;
142
+ LoadURL(url: string): void;
143
+ OnBeforeClose(): void;
144
+ OnHistoryChanged(): void;
145
+ OnNodeHasFocus(
146
+ elementIdOrTagName: string,
147
+ elementTag: string,
148
+ inputType: string,
149
+ token: string,
150
+ param4: boolean,
151
+ ): void;
152
+ OnUnhandledInputCallbacks(): CCallbackList<[GamepadButton]>;
153
+ OnVirtualKeyboardPress(keyName: string): void;
154
+ RegisterOnActionDescriptionsChangedCallback(param0: any): () => void;
155
+ Reload(): void;
156
+ SetBeforeCloseHandler(value: (bIsDestroying: boolean) => void): void;
157
+ SetGoBackOverride(value: () => void): void;
158
+
159
+ get CanGoBackward(): boolean;
160
+ get CanGoForward(): boolean;
161
+ get DisplayURL(): boolean;
162
+ get FinishedRequestCallbacks(): CCallbackList;
163
+ get History(): BrowserViewHistory;
164
+ get LoadErrorCode(): number | null;
165
+ get LoadErrorDescription(): string | null;
166
+ get LoadErrorURL(): string | null;
167
+ get StartLoadingCallbacks(): CCallbackList;
168
+ get StartRequestCallbacks(): CCallbackList;
169
+ get Title(): string;
170
+ get URL(): string;
171
+ get name(): string;
172
+ }
@@ -0,0 +1,117 @@
1
+ import type { ESteamUISound, UIMode, SubscribableValue, Unsubscribable } from '../../shared';
2
+ import type { FocusChangeEvent } from '../../steam-client/system/UI';
3
+ import type { CFocusNavigationContext } from '../../stores';
4
+
5
+ /**
6
+ * Steam UI sound file names relative to `https://steamloopback.host/sounds`.
7
+ *
8
+ * Generated with:
9
+ * ```js
10
+ * fs.readdirSync(`${os.homedir()}/.steam/steamui/sounds`).map((e) => `'${e}'`).join('|');
11
+ * ```
12
+ */
13
+ type NavAudioFile_t =
14
+ | 'bumper_end.wav'
15
+ | 'camera1.wav'
16
+ | 'confirmation_negative.wav'
17
+ | 'confirmation_positive.wav'
18
+ | 'deck_ui_achievement_toast.wav'
19
+ | 'deck_ui_bumper_end_02.wav'
20
+ | 'deck_ui_default_activation.wav'
21
+ | 'deck_ui_hide_modal.wav'
22
+ | 'deck_ui_into_game_detail.wav'
23
+ | 'deck_ui_launch_game.wav'
24
+ | 'deck_ui_message_toast.wav'
25
+ | 'deck_ui_misc_01.wav'
26
+ | 'deck_ui_misc_08.wav'
27
+ | 'deck_ui_misc_10.wav'
28
+ | 'deck_ui_navigation.wav'
29
+ | 'deck_ui_out_of_game_detail.wav'
30
+ | 'deck_ui_show_modal.wav'
31
+ | 'deck_ui_side_menu_fly_in.wav'
32
+ | 'deck_ui_side_menu_fly_out.wav'
33
+ | 'deck_ui_slider_down.wav'
34
+ | 'deck_ui_slider_up.wav'
35
+ | 'deck_ui_switch_toggle_off.wav'
36
+ | 'deck_ui_switch_toggle_on.wav'
37
+ | 'deck_ui_tab_transition_01.wav'
38
+ | 'deck_ui_tile_scroll.wav'
39
+ | 'deck_ui_toast.wav'
40
+ | 'deck_ui_typing.wav'
41
+ | 'deck_ui_volume.wav'
42
+ | 'desktop_toast_default.wav'
43
+ | 'desktop_toast_short.wav'
44
+ | 'pop_sound.wav'
45
+ | 'recording_highlight.wav'
46
+ | 'recording_start.wav'
47
+ | 'recording_stop.wav'
48
+ | 'steam_at_mention.m4a'
49
+ | 'steam_chatroom_notification.m4a'
50
+ | 'timer_expired_alarm.wav'
51
+ | 'ui_steam_message_old_smooth.m4a'
52
+ | 'ui_steam_smoother_friend_join.m4a'
53
+ | 'ui_steam_smoother_friend_online.m4a';
54
+
55
+ declare class CGamepadUIAudioPlaybackManager {
56
+ m_Cancelled: boolean;
57
+ m_Manager: any;
58
+ m_RepeatCount: number;
59
+ m_Source: BaseAudioContext | undefined;
60
+ m_TimesPlayed: number;
61
+ m_URL: string;
62
+ m_cbPlaybackFinished: (() => void) | null;
63
+
64
+ NotifyPlaybackFinished(): void;
65
+ OnFailure(): void;
66
+ OnPlaybackEnded(): void;
67
+
68
+ /**
69
+ * Registers a function to be called when the audio file finishes playback.
70
+ *
71
+ * @param callback The function to be called on finish.
72
+ */
73
+ RegisterOnPlaybackFinished(callback: () => void): void;
74
+
75
+ /**
76
+ * Stops the audio file playback.
77
+ */
78
+ StopPlayback(): void;
79
+
80
+ get url(): string;
81
+ }
82
+
83
+ export declare class CGamepadUIAudioStore {
84
+ m_AudioPlaybackManager: CGamepadUIAudioPlaybackManager;
85
+ m_bCanPlaySound: boolean;
86
+ m_currentlyFocusedAppid: SubscribableValue<number>;
87
+ m_fnGetUIMode: () => UIMode;
88
+ /** {@link setTimeout} handle */
89
+ m_pendingSoundHandle: number | null;
90
+ m_pendingSoundType: ESteamUISound;
91
+
92
+ OnFocusChangeEvent(ev: FocusChangeEvent): void;
93
+
94
+ OnGamepadFocusChanged(e: number, t: any, r: any | undefined): void;
95
+
96
+ OnUnhandledButtonDownEvent(ev: GamepadEvent): void;
97
+
98
+ /**
99
+ * Like {@link PlayNavSound}, but using a URL path instead.
100
+ *
101
+ * @param url The URL path to play.
102
+ */
103
+ PlayAudioURL(sound: `/sounds/${NavAudioFile_t}`): CGamepadUIAudioPlaybackManager;
104
+
105
+ /**
106
+ * Plays a Steam UI sound.
107
+ *
108
+ * @param type The sound to play.
109
+ */
110
+ PlayNavSound(type: ESteamUISound): void;
111
+
112
+ PlayNavSoundInternal(type: ESteamUISound): void;
113
+
114
+ RegisterFocusNavContext(context: CFocusNavigationContext): Unsubscribable;
115
+
116
+ get AudioPlaybackManager(): CGamepadUIAudioPlaybackManager;
117
+ }
@@ -0,0 +1,217 @@
1
+ import type { UIMode } from '../../shared';
2
+ import type { ENavigationSourceType, NavigationSource } from '../../shared/navigation';
3
+ import type { SteamAppOverview } from '../../steam-client/App';
4
+ import type { ControllerInfo } from '../../steam-client/Input';
5
+ import type { EResult } from '../../steam-client/shared';
6
+ import type { ERefreshLoginReason } from '../../steam-client/UI';
7
+ import type { EShutdownStep } from '../../steam-client/User';
8
+ import type { CFocusNavController } from '../focusnavcontroller';
9
+ import type { CGamepadUIAudioStore } from './gamepaduiaudio';
10
+ import type { CWindowStore, SteamUIWindowInstance } from './window';
11
+
12
+ enum EAppDetailsDisplayMode {
13
+ SteamUI,
14
+ BasicUI,
15
+ }
16
+
17
+ enum ENavigationMode {
18
+ Digital,
19
+ Cursor,
20
+ }
21
+
22
+ export interface CSteamUIStore {
23
+ m_ConfiguratorWidth: number;
24
+ m_GamepadNavigationManager: CFocusNavController;
25
+ m_GamepadUIAudioStore: CGamepadUIAudioStore;
26
+ //m_LastLibraryTab: any;
27
+ m_WindowStore: CWindowStore;
28
+ m_appDetailsDisplayMode: EAppDetailsDisplayMode;
29
+ m_bConsoleEnabledByUser: boolean;
30
+ m_bHomeAndQuickAccessButtonsEnabled: boolean;
31
+ m_bIsDeckFactoryImage: boolean;
32
+ m_bPreviouslyNavigatedToRunningApp: boolean;
33
+ m_bShowingLockScreen: boolean;
34
+ m_bStreamingRemotePlayTogether: boolean;
35
+ m_eErrorCondition: ERefreshLoginReason;
36
+ m_eErrorConditionResult: EResult;
37
+ m_mainInstancUIMode: UIMode;
38
+ m_nResumeStreamingInputTimeoutHandle: number;
39
+ m_navigationSource: NavigationSource;
40
+ m_runningAppIDs: number[];
41
+ m_shutdownState: {
42
+ appid: number;
43
+ bAllowForceQuit: boolean;
44
+ bFailed: boolean;
45
+ eShutdownState: EShutdownStep;
46
+ };
47
+ m_strStandaloneConfiguratorURL: string | null;
48
+ m_streamingAppID: number;
49
+ m_textFilterStore: any;
50
+
51
+ BCanNavigateToRunningApp(): boolean;
52
+ BControllerIndexValid(index: number): boolean;
53
+ BHomeAndQuickAccessButtonsEnabled(): boolean;
54
+
55
+ /**
56
+ * @returns `true` if any of the windows is focused.
57
+ */
58
+ BIsAnyWindowFocused(): boolean;
59
+
60
+ BIsOverlayPath(path: string): boolean;
61
+
62
+ /**
63
+ * @returns `true` if Steam is shutting down.
64
+ */
65
+ BIsShuttingDown(): boolean;
66
+
67
+ /**
68
+ * @returns `true` if provided app ID is the game you're currently streaming.
69
+ */
70
+ BIsStreamingGame(appid: number): boolean;
71
+
72
+ BIsStreamingRemotePlayTogether(): boolean;
73
+ BIsStreamingRemotePlayTogetherGame(appid: number): boolean;
74
+ BIsTransparentBackgroundPath(path: string): boolean;
75
+ BIsVROverlayApp(overview: SteamAppOverview): boolean;
76
+
77
+ /**
78
+ * @returns `true` if provided app is available only for VR.
79
+ */
80
+ BIsVrOnlyGame(overview: SteamAppOverview): boolean;
81
+
82
+ BRemotePlaySessionLocalClient(steam64Id: string): boolean;
83
+ CancelRefreshLogin(): void;
84
+ ClearSaleCache(): Promise<void>;
85
+ ClearShutdownFailure(): void;
86
+
87
+ /**
88
+ * If calling this to perform navigation, call it after {@link Navigate} to
89
+ * prevent a race condition in desktop BPM that hides the overlay
90
+ * unintentionally.
91
+ */
92
+ CloseSideMenus(): void;
93
+
94
+ DisableHomeAndQuickAccessButtons(): void;
95
+ EnableHomeAndQuickAccessButtons(): void;
96
+ ExcludedTitlesForPlatform(): number[];
97
+
98
+ /**
99
+ * @returns the currently focused window instance (for {@link Window} see {@link SteamUIWindowInstance.BrowserWindow}).
100
+ */
101
+ GetFocusedWindowInstance(): SteamUIWindowInstance;
102
+
103
+ GetLastLibraryTab(): {
104
+ collectionid?: string;
105
+ strActiveTab: string;
106
+ };
107
+ GetShowingLockScreen(): boolean;
108
+ GetShutdownState(): {
109
+ appid: number;
110
+ bAllowForceQuit: boolean;
111
+ bFailed: boolean;
112
+ eShutdownState: EShutdownStep;
113
+ };
114
+ GetWindowForRunningAppNavigation(): SteamUIWindowInstance;
115
+
116
+ /**
117
+ * Gets the overlay window instance for a provided PID.
118
+ *
119
+ * @param pid The "gameoverlayui" process PID.
120
+ */
121
+ GetWindowInstanceForPID(pid: number): SteamUIWindowInstance | undefined;
122
+
123
+ /**
124
+ * @returns `true` if there is at least 1 Steam app running.
125
+ */
126
+ IsAnyAppRunning(): boolean;
127
+
128
+ /**
129
+ * @returns `true` if the Steam console is enabled.
130
+ */
131
+ IsConsoleEnabled(): boolean;
132
+
133
+ IsDeckFactoryImage(): boolean;
134
+
135
+ /**
136
+ * @returns `true` if there is a desktop mode window open.
137
+ */
138
+ IsDesktopUIWindowActive(): boolean;
139
+
140
+ /**
141
+ * @returns `true` if there is a BPM window open.
142
+ */
143
+ IsGamepadUIWindowActive(): boolean;
144
+
145
+ /**
146
+ * Navigates to a provided React route.
147
+ *
148
+ * @param route React route to navigate to, e.g. `/library/app/440`.
149
+ * @param matchRoute If `true`, router won't navigate to said route if it
150
+ * doesn't look like one.
151
+ * @param replaceHistoryEntry
152
+ */
153
+ Navigate(route: string, matchRoute?: boolean, replaceHistoryEntry?: boolean): void;
154
+
155
+ /**
156
+ * Shows the controller layout preview.
157
+ */
158
+ NavigateToLayoutPreview(appid: number, instance?: SteamUIWindowInstance): void;
159
+
160
+ NavigateToRunningApp(e: boolean): void;
161
+
162
+ /**
163
+ * Opens the "Power" menu.
164
+ *
165
+ * @param parent Menu parent element.
166
+ * @param onCancel Function to call on pressing "Cancel".
167
+ */
168
+ OpenPowerMenu(parent: HTMLElement, onCancel: () => void): void;
169
+
170
+ PreserveNavigation(): void;
171
+ // empty lol
172
+ ReopenPreModalSideMenu(): void;
173
+ ResetErrorCondition(): void;
174
+ RestoreNavigation(): void;
175
+ ScopeRunningApps(): void;
176
+
177
+ SetConfiguratorWidth(value: number): void;
178
+ SetConsoleEnabled(): void;
179
+ SetLastLibraryTab(activeTab: string, collectionId: string): Promise<void>;
180
+ SetRefreshLogin(): void;
181
+ SetRunningApp(appid: number): void;
182
+ SetShowingLockScreen(value: boolean): void;
183
+ SetStandaloneConfiguratorURL(value: string): void;
184
+
185
+ get ActiveControllerIndex(): number;
186
+ get ActiveNavigationInfo(): {
187
+ eMode: ENavigationMode;
188
+ eSourceType: ENavigationSourceType;
189
+ nControllerIndex: number;
190
+ };
191
+ get ActiveNavigationMode(): ENavigationMode;
192
+ get ActiveNavigationSourceType(): ENavigationSourceType;
193
+ get ActiveWindowInstance(): SteamUIWindowInstance;
194
+ get BIsInOOBE(): boolean;
195
+ get ConfiguratorWidth(): number;
196
+ get ErrorCondition(): number;
197
+ get ErrorConditionResult(): EResult;
198
+ get ForceBetaSectionVisible(): boolean;
199
+ get GamepadUIAudio(): CGamepadUIAudioStore;
200
+ get MainInstancUIMode(): UIMode;
201
+ get MainRunningApp(): SteamAppOverview | undefined;
202
+ get MainRunningAppID(): number | undefined;
203
+ get MostRecentlyActiveController(): ControllerInfo;
204
+ get MostRecentlyActiveControllerIndex(): number;
205
+ get NavigationManager(): CFocusNavController;
206
+ get RemainInBigPictureModeOnClose(): boolean;
207
+ get RunningApps(): SteamAppOverview[];
208
+ get ShouldZoomStandaloneConfigurator(): boolean;
209
+ get StandaloneConfiguratorURL(): string | null;
210
+ get TextFilterStore(): any;
211
+ get WindowStore(): CWindowStore;
212
+ }
213
+
214
+ export * from "./gamepadbrowserview";
215
+ export * from "./gamepaduiaudio";
216
+ export * from "./menu";
217
+ export * from "./window";