@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,147 @@
1
+ import type { EResult } from '../steam-client/shared';
2
+ import type { EMsg_t } from './cm';
3
+ import type { EBrowserType, UIMode } from './enums';
4
+
5
+ export interface BrowserContext {
6
+ /**
7
+ * Window type.
8
+ */
9
+ m_eBrowserType?: EBrowserType;
10
+
11
+ /**
12
+ * The UI mode in use.
13
+ */
14
+ m_UIMode: UIMode;
15
+
16
+ /**
17
+ * If overlay, game's app ID, otherwise doesn't appear.
18
+ */
19
+ m_gameID?: string;
20
+
21
+ /**
22
+ * If not overlay, -1.
23
+ * @todo Not the same as `SteamClient.Browser.GetBrowserID()`
24
+ */
25
+ m_nBrowserID: number;
26
+
27
+ /**
28
+ * If overlay, game's app ID, otherwise 0.
29
+ */
30
+ m_unAppID?: number;
31
+
32
+ /**
33
+ * If overlay, gameoverlayui's PID, otherwise 0.
34
+ */
35
+ m_unPID: number;
36
+ }
37
+
38
+ export interface Unsubscribable {
39
+ /**
40
+ * Unregisters the callback.
41
+ */
42
+ Unregister(): void;
43
+ }
44
+
45
+ // biome-ignore lint/suspicious/noExplicitAny: intentional, not used yet
46
+ export interface CBaseProtoBufMsg<T = any> {
47
+ BIsValid(): boolean;
48
+ Body(): T;
49
+ BSuccess(): boolean;
50
+ GetEMsg(): EMsg_t;
51
+ GetEResult(): EResult;
52
+ GetErrorMessage(): string;
53
+ }
54
+
55
+ /**
56
+ * Interface to register and unregister callbacks from, with ability to
57
+ * dispatch.
58
+ */
59
+ // biome-ignore lint/suspicious/noExplicitAny: intentional
60
+ export interface CCallbackList<T extends any[] = never> {
61
+ m_vecCallbacks: ((...args: [...T]) => void)[];
62
+
63
+ /**
64
+ * Removes all callbacks.
65
+ */
66
+ ClearAllCallbacks(): void;
67
+
68
+ /**
69
+ * @returns the registered callbacks count.
70
+ */
71
+ CountRegistered(): number;
72
+
73
+ /**
74
+ * Dispatches all callbacks at once.
75
+ *
76
+ * @param args Callback arguments.
77
+ */
78
+ Dispatch(...args: [...T]): void;
79
+
80
+ /**
81
+ * Registers a callback to dispatch.
82
+ *
83
+ * @param callback The callback to register.
84
+ * @returns an object that can be used to unregister the callback.
85
+ */
86
+ Register(callback: (...args: [...T]) => void): Unsubscribable;
87
+ }
88
+
89
+ /**
90
+ * This is kind of like an `@observable` field but without using mobx.
91
+ */
92
+ export interface SubscribableValue<T> {
93
+ m_callbacks: CCallbackList<[T]>;
94
+ m_currentValue: T;
95
+ m_fnEquals?: (currentValue: T, newValue: T) => boolean;
96
+
97
+ /**
98
+ * Sets a new value and notifies Subscribers of the new value.
99
+ */
100
+ Set(value: T): void;
101
+
102
+ /**
103
+ * Adds a subscription to the backing {@link CCallbackList}.
104
+ */
105
+ Subscribe(subscriber: (value: T) => void): Unsubscribable;
106
+
107
+ /**
108
+ * Subscription count of the backing {@link CCallbackList}.
109
+ */
110
+ get SubscriberCount(): number;
111
+
112
+ /**
113
+ * A snapshot of the current value which can change at any time.
114
+ */
115
+ get Value(): T;
116
+ }
117
+
118
+ export interface MappedSubscribableValue<T> {
119
+ m_bMappedValueStale: boolean;
120
+ m_fnMap: (value: T) => T;
121
+ m_originalSubscribableValue: SubscribableValue<T>;
122
+ m_mappedSubscribableValue: SubscribableValue<T>;
123
+
124
+ /**
125
+ * Adds a subscription to the backing {@link CCallbackList}.
126
+ */
127
+ Subscribe(subscriber: (value: T) => void): Unsubscribable;
128
+
129
+ /**
130
+ * Updates the value from the backing {@link SubscribableValue}.
131
+ */
132
+ UpdateMappedValue(): void;
133
+
134
+ /**
135
+ * A snapshot of the current value which can change at any time.
136
+ */
137
+ get Value(): T;
138
+ }
139
+
140
+ export interface CScheduledFunc {
141
+ m_fnCallback: () => void;
142
+ m_schTimer: number;
143
+
144
+ Cancel(): void;
145
+ IsScheduled(): boolean;
146
+ Schedule(timeout: number, fn: () => void): void;
147
+ }
@@ -0,0 +1,15 @@
1
+ export enum ENavigationSourceType {
2
+ UNKNOWN,
3
+ GAMEPAD,
4
+ KEYBOARD_SIMULATOR,
5
+ MOUSE,
6
+ TOUCH,
7
+ LPAD,
8
+ RPAD,
9
+ }
10
+
11
+ export interface NavigationSource {
12
+ eActivationSourceType: ENavigationSourceType;
13
+ nActiveGamepadIndex: number;
14
+ nLastActiveGamepadIndex: number;
15
+ }
@@ -0,0 +1,49 @@
1
+ import type { ESteamRealm } from './enums';
2
+
3
+ export enum EAccountType {
4
+ Invalid,
5
+ Individual,
6
+ Multiseat,
7
+ GameServer,
8
+ AnonGameServer,
9
+ Pending,
10
+ ContentServer,
11
+ Clan,
12
+ Chat,
13
+ ConsoleUser,
14
+ AnonUser,
15
+ Max,
16
+ }
17
+
18
+ export interface CSteamID {
19
+ m_ulSteamID: {
20
+ high: number;
21
+ low: number;
22
+ unsigned: boolean;
23
+ };
24
+
25
+ BIsClanAccount(): boolean;
26
+ BIsIndividualAccount(): boolean;
27
+ BIsValid(): boolean;
28
+
29
+ /**
30
+ * @returns SteamID 64
31
+ */
32
+ ConvertTo64BitString(): string;
33
+
34
+ GetAccountID(): number;
35
+ GetAccountType(): EAccountType;
36
+ GetInstance(): number;
37
+ GetUniverse(): ESteamRealm;
38
+
39
+ /**
40
+ * @returns SteamID 3
41
+ */
42
+ Render(): string;
43
+
44
+ SetAccountID(value: number): void;
45
+ SetAccountType(value: number): void;
46
+ SetFromComponents(accountId: number, instance: number, accountType: EAccountType, universe: ESteamRealm): void;
47
+ SetInstance(value: number): void;
48
+ SetUniverse(value: ESteamRealm): void;
49
+ }
@@ -0,0 +1,62 @@
1
+ export enum EUserConfigStoreNamespace {
2
+ Invalid,
3
+ Library,
4
+ }
5
+
6
+ export enum EConflictResolutionMethod {
7
+ LastWriteWins = 'last-write',
8
+ CustomMethod = 'custom',
9
+ InitializationOnly = 'initial',
10
+ }
11
+
12
+ export declare class CUserLocalStorage {
13
+ GetObject<T extends object>(key: string): Promise<T | null>;
14
+ GetString(key: string): Promise<string | null>;
15
+
16
+ /**
17
+ * @param resolutionMethodId Must include if selecting
18
+ * {@link EConflictResolutionMethod.CustomMethod}.
19
+ */
20
+ RemoveObject(key: string, resolutionMethod: EConflictResolutionMethod, resolutionMethodId?: string): Promise<void>;
21
+
22
+ /**
23
+ * @param resolutionMethodId Must include if selecting
24
+ * {@link EConflictResolutionMethod.CustomMethod}.
25
+ */
26
+ StoreObject<T extends object>(
27
+ key: string,
28
+ value: T,
29
+ resolutionMethod?: EConflictResolutionMethod,
30
+ resolutionMethodId?: string,
31
+ ): Promise<void>;
32
+ }
33
+
34
+ export declare class CCloudStorage extends CUserLocalStorage {
35
+ m_eNamespace: EUserConfigStoreNamespace;
36
+
37
+ Get(key: string): string | null;
38
+ GetByPrefix(prefix: string): Map<string, string>;
39
+ GetMapForPrefix(prefix: string): CCloudStorageMap;
40
+
41
+ /**
42
+ * @param resolutionMethodId Must include if selecting
43
+ * {@link EConflictResolutionMethod.CustomMethod}.
44
+ */
45
+ StoreString(
46
+ key: string,
47
+ value: string,
48
+ resolutionMethod?: EConflictResolutionMethod,
49
+ resolutionMethodId?: string,
50
+ ): Promise<void>;
51
+ }
52
+
53
+ export interface CCloudStorageMap
54
+ extends Map<string, string>, Pick<CCloudStorage, 'GetObject' | 'StoreObject' | 'StoreString'> {
55
+ m_cloudStorage: CCloudStorage;
56
+ m_strKeyPrefix: string;
57
+
58
+ /**
59
+ * The backing Map for all the inherited methods.
60
+ */
61
+ get mapInternal(): Map<string, string>;
62
+ }
@@ -1,6 +1,6 @@
1
1
  import type { EResult, JsPbMessage, OperationResponse, Unregisterable, VDFBoolean_t } from "./shared";
2
2
  import type { EControllerRumbleSetting, EThirdPartyControllerConfiguration } from "./Input";
3
- import {EUCMFilePrivacyState, Screenshot} from "./Screenshots";
3
+ import { EUCMFilePrivacyState, Screenshot } from "./Screenshots";
4
4
 
5
5
  /**
6
6
  * Represents various functions related to Steam applications.
@@ -1282,7 +1282,7 @@ export interface Badge {
1282
1282
  strNextLevelName: string;
1283
1283
  }
1284
1284
 
1285
- interface AppDescription {
1285
+ export interface AppDescription {
1286
1286
  /**
1287
1287
  * Full app description. Note that it uses BB code and so must be rendered.
1288
1288
  */
@@ -39,7 +39,7 @@ export interface Auth {
39
39
  }
40
40
 
41
41
  export interface AuthRefreshInfo {
42
- reason: number;
42
+ reason: EResult;
43
43
  account_name: string;
44
44
  login_id_token: string;
45
45
  }
@@ -102,4 +102,4 @@ export enum EGamingDeviceType {
102
102
  Handheld = 512,
103
103
  Phone = 528,
104
104
  SteamDeck = 544,
105
- }
105
+ }
@@ -1,4 +1,4 @@
1
- import { BrowserContext } from "./shared";
1
+ import { BrowserContext } from '../shared/interfaces';
2
2
 
3
3
  export interface ClientNotifications {
4
4
  /**
@@ -1,4 +1,5 @@
1
- import type { EBrowserType, ESteamRealm, EUIComposition, EUIMode, Unregisterable } from "./shared";
1
+ import type { EBrowserType, ESteamRealm, UIMode } from '../shared/enums';
2
+ import type { EUIComposition, Unregisterable } from './shared';
2
3
 
3
4
  export interface Overlay {
4
5
  /**
@@ -142,7 +143,7 @@ export interface ActivateOverlayRequest {
142
143
  export interface OverlayBrowserInfo {
143
144
  appID: number;
144
145
  eBrowserType: EBrowserType;
145
- eUIMode: EUIMode;
146
+ UIMode: UIMode;
146
147
  flDisplayScale?: number;
147
148
  gameID: string;
148
149
  nBrowserID: number;
@@ -207,7 +207,7 @@ interface AvailableClientBeta {
207
207
  strName: string;
208
208
  }
209
209
 
210
- interface SteamSettings {
210
+ export interface SteamSettings {
211
211
  bIsInClientBeta: boolean;
212
212
  bIsSteamSideload: boolean;
213
213
  eClientBetaState: EClientBetaState;
@@ -1,4 +1,5 @@
1
- import { ESteamRealm, Unregisterable } from "./shared";
1
+ import type { ESteamRealm } from '../shared/enums';
2
+ import type { Unregisterable } from './shared';
2
3
 
3
4
  /**
4
5
  * `hSharedConnection` is the number from {@link AllocateSharedConnection}.
@@ -1,5 +1,6 @@
1
- import { EUIMode, Unregisterable } from "./shared";
2
- import {EOSType} from "./system";
1
+ import type { UIMode } from '../shared/enums';
2
+ import type { EResult, Unregisterable } from './shared';
3
+ import type { EOSType } from './system';
3
4
 
4
5
  export interface UI {
5
6
  EnsureMainWindowCreated(): void;
@@ -17,7 +18,7 @@ export interface UI {
17
18
  * Retrieves the current UI mode.
18
19
  * @returns the current UI mode.
19
20
  */
20
- GetUIMode(): Promise<EUIMode>;
21
+ GetUIMode(): Promise<UIMode>;
21
22
 
22
23
  NotifyAppInitialized(): void;
23
24
 
@@ -33,10 +34,7 @@ export interface UI {
33
34
  */
34
35
  RegisterForClientConVar(convar: string, callback: (value: string) => void): Unregisterable;
35
36
 
36
- /**
37
- * @todo param{0,1} are enums
38
- */
39
- RegisterForErrorCondition(callback: (param0: number, param1: number) => void): Unregisterable;
37
+ RegisterForErrorCondition(callback: (param0: ERefreshLoginReason, param1: EResult) => void): Unregisterable;
40
38
 
41
39
  RegisterForKioskModeResetSignal(callback: () => void): Unregisterable;
42
40
 
@@ -45,7 +43,7 @@ export interface UI {
45
43
  */
46
44
  RegisterForStartupFinished(callback: () => void): Unregisterable;
47
45
 
48
- RegisterForUIModeChanged(callback: (mode: EUIMode) => void): Unregisterable;
46
+ RegisterForUIModeChanged(callback: (mode: UIMode) => void): Unregisterable;
49
47
 
50
48
  ResetErrorCondition(): void;
51
49
 
@@ -53,7 +51,18 @@ export interface UI {
53
51
  * Sets the UI mode to the specified value.
54
52
  * @param mode The UI mode to set.
55
53
  */
56
- SetUIMode(mode: EUIMode): void;
54
+ SetUIMode(mode: UIMode): void;
55
+ }
56
+
57
+ export enum ERefreshLoginReason {
58
+ Success = 1,
59
+ LoggedInElsewhere,
60
+ SteamGuard,
61
+ AccountDisabled,
62
+ Offline,
63
+ UnhandledMailTo,
64
+ Success2,
65
+ InfoTicketExpired,
57
66
  }
58
67
 
59
68
  export enum EWindowType {
@@ -176,6 +176,10 @@ export interface ConnectionAttempt {
176
176
  rtCooldownExpiration: number;
177
177
  }
178
178
 
179
+ interface FamilyGroupMember {
180
+ accountid: number;
181
+ }
182
+
179
183
  export interface CurrentUser {
180
184
  NotificationCounts: {
181
185
  async_game_updates: number;
@@ -196,11 +200,27 @@ export interface CurrentUser {
196
200
  bSupportAlertActive: boolean;
197
201
  bSupportPopupMessage: boolean;
198
202
  clientinstanceid: string;
203
+ eFamilyGroupRole: EFamilyGroupRole;
199
204
  strAccountBalance: string;
200
205
  strAccountBalancePending: string;
201
206
  strAccountName: string;
202
207
  strFamilyGroupID: string;
208
+ /**
209
+ * @todo unused ?
210
+ */
211
+ strFamilyGroupName: string;
203
212
  strSteamID: string;
213
+ /**
214
+ * @todo unused ?
215
+ */
216
+ rgFamilyGroupMembers: FamilyGroupMember[];
217
+ }
218
+
219
+ export enum EFamilyGroupRole {
220
+ None,
221
+ Adult,
222
+ Child,
223
+ MAX,
204
224
  }
205
225
 
206
226
  export enum ELoginState {
@@ -1,5 +1,6 @@
1
- import {OverlayBrowserInfo} from "./Overlay";
2
- import { EResult, EUIMode, Unregisterable } from "./shared";
1
+ import type { UIMode } from '../shared/enums';
2
+ import type { OverlayBrowserInfo } from './Overlay';
3
+ import type { EResult, Unregisterable } from './shared';
3
4
 
4
5
  export interface WebChat {
5
6
  BSuppressPopupsInRestore(): Promise<boolean>;
@@ -43,7 +44,7 @@ export interface WebChat {
43
44
  * Retrieves the current UI mode.
44
45
  * @returns the current UI mode.
45
46
  */
46
- GetUIMode(): Promise<EUIMode>;
47
+ GetUIMode(): Promise<UIMode>;
47
48
 
48
49
  OnGroupChatUserStateChange(chatGroupId: number, accountId: number, action: number): void;
49
50
 
@@ -96,7 +97,7 @@ export interface WebChat {
96
97
  * @param callback The callback function to be called.
97
98
  * @returns an object that can be used to unregister the callback.
98
99
  */
99
- RegisterForUIModeChange(callback: (mode: EUIMode) => void): Unregisterable;
100
+ RegisterForUIModeChange(callback: (mode: UIMode) => void): Unregisterable;
100
101
 
101
102
  RegisterOverlayChatBrowserInfoChanged(callback: () => void): Unregisterable;
102
103
 
@@ -112,37 +112,6 @@ export enum EResult {
112
112
  LimitedUserAccount,
113
113
  }
114
114
 
115
- export enum EBrowserType {
116
- /**
117
- * No window is created (like SharedJSContext).
118
- */
119
- OffScreen,
120
- OpenVROverlay,
121
- OpenVROverlay_Dashboard,
122
- /**
123
- * A normal window.
124
- */
125
- DirectHWND,
126
- /**
127
- * A borderless window.
128
- */
129
- DirectHWND_Borderless,
130
- /**
131
- * An initially hidden window.
132
- * May be shown with {@link SteamClient.Window.ShowWindow}.
133
- */
134
- DirectHWND_Hidden,
135
- ChildHWNDNative,
136
- Offscreen_SteamUI = 12,
137
- OpenVROverlay_Subview,
138
- }
139
-
140
- export enum ESteamRealm {
141
- Unknown,
142
- Global,
143
- China,
144
- }
145
-
146
115
  /**
147
116
  * Controls how Gamescope renders the GamepadUI window when a game is running.
148
117
  */
@@ -172,47 +141,9 @@ export enum EUIComposition {
172
141
  OverlayKeyboard,
173
142
  }
174
143
 
175
- export enum EUIMode {
176
- Unknown = -1,
177
- GamePad = 4,
178
- Desktop = 7,
179
- }
180
-
181
144
  /** 0 - false, 1 - true */
182
145
  export type VDFBoolean_t = 0 | 1;
183
146
 
184
- export interface BrowserContext {
185
- /**
186
- * Window type.
187
- */
188
- m_eBrowserType?: EBrowserType;
189
-
190
- /**
191
- * The UI mode in use.
192
- */
193
- m_eUIMode?: EUIMode;
194
-
195
- /**
196
- * @todo Appears when {@link m_eBrowserType} == 0 ?
197
- */
198
- m_gameID?: string;
199
-
200
- /**
201
- * @todo Same as `SteamClient.Browser.GetBrowserID()` ?
202
- */
203
- m_nBrowserID: number;
204
-
205
- /**
206
- * Game's app ID.
207
- */
208
- m_unAppID?: number;
209
-
210
- /**
211
- * If overlay, game's PID.
212
- */
213
- m_unPID: number;
214
- }
215
-
216
147
  /**
217
148
  * Represents the response of an operation. It appears to be not necessary to await for this operation response. It is only used to indicate the result of an operation.
218
149
  */
@@ -0,0 +1,102 @@
1
+ import type { CMInterface } from '../shared/cm';
2
+ import type { CCloudStorage, EUserConfigStoreNamespace } from '../shared/storage';
3
+ import type { CurrentUser, ELoginState } from '../steam-client/User';
4
+
5
+ export interface CApp {
6
+ m_CurrentUser: CurrentUser;
7
+ m_bFinishedStage1: boolean;
8
+ m_bHaveShownSupportAlertModal: boolean;
9
+ m_bServicesInitialized: boolean;
10
+ m_bStartedStage2: boolean;
11
+ m_bWasEverLoggedIn: boolean;
12
+ m_cm: CMInterface;
13
+ m_eLoginState: ELoginState;
14
+ m_mapCloudStorage: Map<EUserConfigStoreNamespace, CCloudStorage>;
15
+
16
+ BFinishedInitStageOne(): boolean;
17
+
18
+ /**
19
+ * @returns `true` if there is a hardware survey pending.
20
+ */
21
+ BHardwareSurveyPending(): boolean;
22
+
23
+ BHasAckOnlyActiveSupportAlerts(): boolean;
24
+
25
+ BHasActiveSupportAlerts(): boolean;
26
+
27
+ /**
28
+ * @returns `true` if there is a currently logged in user.
29
+ */
30
+ BHasCurrentUser(): boolean;
31
+
32
+ /**
33
+ * @returns `true` if provided SteamID3 is in the current user's family group.
34
+ */
35
+ BIsFamilyGroupMember(steamid3: number): boolean;
36
+
37
+ /**
38
+ * @returns `true` if the current user is in a family group.
39
+ */
40
+ BIsInFamilyGroup(): boolean;
41
+
42
+ /**
43
+ * @returns `true` if Steam is in out of the box experience.
44
+ */
45
+ BIsInOOBE(): boolean;
46
+
47
+ /**
48
+ * @returns `true` if Steam is in offline mode.
49
+ */
50
+ BIsOfflineMode(): boolean;
51
+
52
+ BMustShowSupportAlertDialog(): boolean;
53
+
54
+ /**
55
+ * @todo Does not seem to be used.
56
+ */
57
+ BWasEverLoggedIn(): boolean;
58
+
59
+ /**
60
+ * @returns the cloud storage for the provided namespace.
61
+ */
62
+ GetCloudStorage(namespace: EUserConfigStoreNamespace): CCloudStorage | undefined;
63
+
64
+ /**
65
+ * Like {@link GetCloudStorage}, but for
66
+ * {@link EUserConfigStoreNamespace.Library}.
67
+ */
68
+ GetCloudStorageForLibrary(): CCloudStorage;
69
+
70
+ /**
71
+ * @returns the currently logged in user.
72
+ */
73
+ GetCurrentUser(): CurrentUser;
74
+
75
+ /**
76
+ * @returns the currently logged in user's family group ID.
77
+ */
78
+ GetFamilyGroupID(): CurrentUser['strFamilyGroupID'];
79
+
80
+ /**
81
+ * @returns the currently logged in user's family group name.
82
+ */
83
+ GetFamilyGroupName(): CurrentUser['strFamilyGroupName'];
84
+
85
+ /**
86
+ * @returns `true` if all services have been initialized.
87
+ */
88
+ GetServicesInitialized(): boolean;
89
+
90
+ OptOutOfSurvey(): void;
91
+
92
+ SendSurvey(): void;
93
+
94
+ ShowSupportAlertsModal(): void;
95
+
96
+ /**
97
+ * Wait until all stores (e.g. AppStore & SettingsStore globals) load.
98
+ *
99
+ * Full list of stores can be found in the `App.InitStage2` function def.
100
+ */
101
+ WaitForServicesInitialized(): Promise<boolean>;
102
+ }