@decky/ui 4.15.0 → 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.
Files changed (173) hide show
  1. package/dist/components/Dialog.js +1 -1
  2. package/dist/components/Dropdown.d.ts +2 -2
  3. package/dist/components/FooterLegend.d.ts +8 -2
  4. package/dist/components/FooterLegend.js +7 -0
  5. package/dist/components/Menu.d.ts +5 -9
  6. package/dist/components/Modal.d.ts +3 -2
  7. package/dist/globals/index.d.ts +25 -2
  8. package/dist/globals/index.js +1 -2
  9. package/dist/globals/shared/cm.d.ts +112 -0
  10. package/dist/globals/shared/enums.d.ts +80 -0
  11. package/dist/globals/shared/enums.js +85 -0
  12. package/dist/globals/shared/history.d.ts +12 -0
  13. package/dist/globals/shared/history.js +1 -0
  14. package/dist/globals/shared/index.d.ts +5 -0
  15. package/dist/globals/shared/index.js +5 -0
  16. package/dist/globals/shared/interfaces.d.ts +54 -0
  17. package/dist/globals/shared/interfaces.js +1 -0
  18. package/dist/globals/shared/navigation.d.ts +14 -0
  19. package/dist/globals/shared/navigation.js +10 -0
  20. package/dist/globals/shared/steamid.d.ts +36 -0
  21. package/dist/globals/shared/steamid.js +15 -0
  22. package/dist/globals/shared/storage.d.ts +27 -0
  23. package/dist/globals/shared/storage.js +11 -0
  24. package/dist/globals/steam-client/App.d.ts +1 -1
  25. package/dist/globals/steam-client/Auth.d.ts +1 -1
  26. package/dist/globals/steam-client/ClientNotifications.d.ts +1 -1
  27. package/dist/globals/steam-client/Overlay.d.ts +2 -1
  28. package/dist/globals/steam-client/Screenshots.d.ts +1 -1
  29. package/dist/globals/steam-client/Settings.d.ts +1 -1
  30. package/dist/globals/steam-client/SharedConnection.d.ts +2 -1
  31. package/dist/globals/steam-client/UI.d.ts +14 -3
  32. package/dist/globals/steam-client/UI.js +11 -0
  33. package/dist/globals/steam-client/User.d.ts +13 -0
  34. package/dist/globals/steam-client/User.js +7 -0
  35. package/dist/globals/steam-client/WebChat.d.ts +3 -2
  36. package/dist/globals/steam-client/shared.d.ts +0 -29
  37. package/dist/globals/steam-client/shared.js +0 -24
  38. package/dist/globals/stores/app.d.ts +35 -0
  39. package/dist/globals/stores/app.js +1 -0
  40. package/dist/globals/stores/appdetailsstore.d.ts +86 -0
  41. package/dist/globals/stores/appdetailsstore.js +1 -0
  42. package/dist/globals/stores/appinfostore.d.ts +56 -0
  43. package/dist/globals/stores/appinfostore.js +1 -0
  44. package/dist/globals/stores/appstore.d.ts +77 -0
  45. package/dist/globals/stores/appstore.js +1 -0
  46. package/dist/globals/stores/badgestore.d.ts +52 -0
  47. package/dist/globals/stores/badgestore.js +1 -0
  48. package/dist/globals/stores/collectionstore.d.ts +313 -0
  49. package/dist/globals/stores/collectionstore.js +143 -0
  50. package/dist/globals/stores/consolestore.d.ts +20 -0
  51. package/dist/globals/stores/consolestore.js +1 -0
  52. package/dist/globals/stores/focusnavcontroller.d.ts +383 -0
  53. package/dist/globals/stores/focusnavcontroller.js +29 -0
  54. package/dist/globals/stores/friendstore/clanstore.d.ts +75 -0
  55. package/dist/globals/stores/friendstore/clanstore.js +19 -0
  56. package/dist/globals/stores/friendstore/friendchat.d.ts +374 -0
  57. package/dist/globals/stores/friendstore/friendchat.js +56 -0
  58. package/dist/globals/stores/friendstore/friendgroupstore.d.ts +98 -0
  59. package/dist/globals/stores/friendstore/friendgroupstore.js +8 -0
  60. package/dist/globals/stores/friendstore/friendingamenotificationstore.d.ts +2 -0
  61. package/dist/globals/stores/friendstore/friendingamenotificationstore.js +1 -0
  62. package/dist/globals/stores/friendstore/friendslistfavoritesstore.d.ts +22 -0
  63. package/dist/globals/stores/friendstore/friendslistfavoritesstore.js +1 -0
  64. package/dist/globals/stores/friendstore/friendsuifriendstore.d.ts +125 -0
  65. package/dist/globals/stores/friendstore/friendsuifriendstore.js +1 -0
  66. package/dist/globals/stores/friendstore/index.d.ts +25 -0
  67. package/dist/globals/stores/friendstore/index.js +1 -0
  68. package/dist/globals/stores/friendstore/shared.d.ts +207 -0
  69. package/dist/globals/stores/friendstore/shared.js +41 -0
  70. package/dist/globals/stores/gamerecordingstore.d.ts +263 -0
  71. package/dist/globals/stores/gamerecordingstore.js +1 -0
  72. package/dist/globals/stores/index.d.ts +18 -0
  73. package/dist/globals/stores/index.js +18 -0
  74. package/dist/globals/stores/libraryuistore.d.ts +179 -0
  75. package/dist/globals/stores/libraryuistore.js +56 -0
  76. package/dist/globals/stores/localizationmanager.d.ts +18 -0
  77. package/dist/globals/stores/localizationmanager.js +1 -0
  78. package/dist/globals/stores/mainwindowbrowsermanager.d.ts +62 -0
  79. package/dist/globals/stores/mainwindowbrowsermanager.js +1 -0
  80. package/dist/globals/stores/notificationstore.d.ts +242 -0
  81. package/dist/globals/stores/notificationstore.js +20 -0
  82. package/dist/globals/stores/popupmanager.d.ts +128 -0
  83. package/dist/globals/stores/popupmanager.js +1 -0
  84. package/dist/globals/stores/securitystore.d.ts +35 -0
  85. package/dist/globals/stores/securitystore.js +1 -0
  86. package/dist/globals/stores/settingsstore.d.ts +86 -0
  87. package/dist/globals/stores/settingsstore.js +19 -0
  88. package/dist/globals/stores/steamuistore/gamepadbrowserview.d.ts +143 -0
  89. package/dist/globals/stores/steamuistore/gamepadbrowserview.js +9 -0
  90. package/dist/globals/stores/steamuistore/gamepaduiaudio.d.ts +36 -0
  91. package/dist/globals/stores/steamuistore/gamepaduiaudio.js +1 -0
  92. package/dist/globals/stores/steamuistore/index.d.ts +129 -0
  93. package/dist/globals/stores/steamuistore/index.js +11 -0
  94. package/dist/globals/stores/steamuistore/menu.d.ts +39 -0
  95. package/dist/globals/stores/steamuistore/menu.js +19 -0
  96. package/dist/globals/stores/steamuistore/window.d.ts +206 -0
  97. package/dist/globals/stores/steamuistore/window.js +6 -0
  98. package/dist/globals/stores/storeitemcache.d.ts +319 -0
  99. package/dist/globals/stores/storeitemcache.js +17 -0
  100. package/dist/globals/stores/urlstore.d.ts +57 -0
  101. package/dist/globals/stores/urlstore.js +1 -0
  102. package/dist/modules/Router.d.ts +5 -58
  103. package/dist/modules/Router.js +2 -20
  104. package/dist/tsconfig.tsbuildinfo +1 -1
  105. package/dist/utils/index.d.ts +0 -1
  106. package/dist/utils/react/treepatcher.js +7 -7
  107. package/package.json +1 -1
  108. package/src/components/Dialog.ts +1 -1
  109. package/src/components/Dropdown.tsx +2 -2
  110. package/src/components/FooterLegend.ts +10 -2
  111. package/src/components/Menu.ts +11 -21
  112. package/src/components/Modal.ts +40 -8
  113. package/src/globals/index.ts +45 -2
  114. package/src/globals/shared/cm.ts +158 -0
  115. package/src/globals/shared/enums.ts +97 -0
  116. package/src/globals/shared/history.ts +15 -0
  117. package/src/globals/shared/index.ts +5 -0
  118. package/src/globals/shared/interfaces.ts +147 -0
  119. package/src/globals/shared/navigation.ts +15 -0
  120. package/src/globals/shared/steamid.ts +49 -0
  121. package/src/globals/shared/storage.ts +62 -0
  122. package/src/globals/steam-client/App.ts +2 -2
  123. package/src/globals/steam-client/Auth.ts +2 -2
  124. package/src/globals/steam-client/ClientNotifications.ts +1 -1
  125. package/src/globals/steam-client/Overlay.ts +2 -1
  126. package/src/globals/steam-client/Screenshots.ts +1 -1
  127. package/src/globals/steam-client/Settings.ts +1 -1
  128. package/src/globals/steam-client/SharedConnection.ts +2 -1
  129. package/src/globals/steam-client/UI.ts +15 -6
  130. package/src/globals/steam-client/User.ts +20 -0
  131. package/src/globals/steam-client/WebChat.ts +3 -2
  132. package/src/globals/steam-client/shared.ts +0 -69
  133. package/src/globals/stores/app.ts +102 -0
  134. package/src/globals/stores/appdetailsstore.ts +235 -0
  135. package/src/globals/stores/appinfostore.ts +65 -0
  136. package/src/globals/stores/appstore.ts +166 -0
  137. package/src/globals/stores/badgestore.ts +87 -0
  138. package/src/globals/stores/collectionstore.ts +544 -0
  139. package/src/globals/stores/consolestore.ts +54 -0
  140. package/src/globals/stores/focusnavcontroller.ts +522 -0
  141. package/src/globals/stores/friendstore/clanstore.ts +89 -0
  142. package/src/globals/stores/friendstore/friendchat.ts +646 -0
  143. package/src/globals/stores/friendstore/friendgroupstore.ts +187 -0
  144. package/src/globals/stores/friendstore/friendingamenotificationstore.ts +1 -0
  145. package/src/globals/stores/friendstore/friendslistfavoritesstore.ts +37 -0
  146. package/src/globals/stores/friendstore/friendsuifriendstore.ts +274 -0
  147. package/src/globals/stores/friendstore/index.ts +58 -0
  148. package/src/globals/stores/friendstore/shared.ts +318 -0
  149. package/src/globals/stores/gamerecordingstore.ts +367 -0
  150. package/src/globals/stores/index.ts +18 -0
  151. package/src/globals/stores/libraryuistore.ts +395 -0
  152. package/src/globals/stores/localizationmanager.ts +56 -0
  153. package/src/globals/stores/mainwindowbrowsermanager.ts +135 -0
  154. package/src/globals/stores/notificationstore.ts +298 -0
  155. package/src/globals/stores/popupmanager.ts +352 -0
  156. package/src/globals/stores/securitystore.ts +36 -0
  157. package/src/globals/stores/settingsstore.ts +134 -0
  158. package/src/globals/stores/steamuistore/gamepadbrowserview.ts +172 -0
  159. package/src/globals/stores/steamuistore/gamepaduiaudio.ts +117 -0
  160. package/src/globals/stores/steamuistore/index.ts +212 -0
  161. package/src/globals/stores/steamuistore/menu.ts +89 -0
  162. package/src/globals/stores/steamuistore/window.ts +466 -0
  163. package/src/globals/stores/storeitemcache.ts +347 -0
  164. package/src/globals/stores/urlstore.ts +150 -0
  165. package/src/modules/Router.ts +11 -77
  166. package/src/utils/index.ts +0 -1
  167. package/src/utils/react/treepatcher.ts +9 -9
  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,395 @@
1
+ import type { CSteamID } from '../shared';
2
+ import type { CMInterface } from '../shared/cm';
3
+ import type { CUserLocalStorage } from '../shared/storage';
4
+ import type { EAppType } from '../steam-client/App';
5
+ import type {
6
+ CCollection,
7
+ CCollectionBase,
8
+ CCollectionFilterBase,
9
+ CDynamicCollectionFilter,
10
+ FilterOptionByIndex_t,
11
+ FilterSpec_t,
12
+ } from './collectionstore';
13
+ import type { SteamUIWindowInstance } from './steamuistore/window';
14
+ import type { CStoreItem } from './storeitemcache';
15
+
16
+ enum EGameListView {
17
+ /** Usually this */
18
+ kNormal = 1,
19
+ /** Single collection */
20
+ kSingleCollection = 10,
21
+ /** Searching */
22
+ kSearchResults = 11,
23
+ }
24
+
25
+ export enum EAppPropertiesSection {
26
+ General = 'general',
27
+ Compatibility = 'compatibility',
28
+ Updates = 'updates',
29
+ LocalFiles = 'localfiles',
30
+ Language = 'language',
31
+ Betas = 'betas',
32
+ Controller = 'controller',
33
+ Shortcut = 'shortcut',
34
+ Dlc = 'dlc',
35
+ Workshop = 'workshop',
36
+ Feedback = 'feedback',
37
+ }
38
+
39
+ export enum EControllerConfiguratorSection {
40
+ Main = 'Main',
41
+ Summary = 'Summary',
42
+ Preview = 'Preview',
43
+ ActionSets = 'ActionSets',
44
+ Buttons = 'Buttons',
45
+ Triggers = 'Triggers',
46
+ Sticks = 'Sticks',
47
+ Touchpads = 'Touchpads',
48
+ Gyroscopes = 'Gyroscopes',
49
+ VirtualMenus = 'VirtualMenus',
50
+ ChooseBinding = 'ChooseBinding',
51
+ }
52
+
53
+ export enum ESettingsZooSection {
54
+ Dropdowns = 'Dropdowns',
55
+ Modals = 'Modals',
56
+ Buttons = 'Buttons',
57
+ Sliders = 'Sliders',
58
+ Toggles = 'Toggles',
59
+ OtherControls = 'Misc',
60
+ Glyphs = 'Glyphs',
61
+ SVG = 'SVG',
62
+ Input = 'Input',
63
+ Type = 'Type',
64
+ }
65
+
66
+ export enum ESettingsZooDevSection {
67
+ DeveloperOptions = 'DeveloperOptions',
68
+ VRDeveloperOptions = 'VRDeveloperOptions',
69
+ AppSpotlight = 'AppSpotlight',
70
+ PlayNext = 'PlayNext',
71
+ Notifications = 'Notifications',
72
+ Share = 'Share',
73
+ }
74
+
75
+ interface GameListSelection_t {
76
+ nAppId: number;
77
+ strCollectionId: string;
78
+ }
79
+
80
+ /**
81
+ * You can get this by getting the "UIStoreLocalState" key from
82
+ * {@link CLibraryUIStore.m_localStorage}.
83
+ */
84
+ interface LibraryState_t {
85
+ bGroupedByCollection: boolean;
86
+ bGroupBySharedLibraries: boolean;
87
+ bSortedByRecent: boolean;
88
+ collectionFilter: FilterSpec_t;
89
+ collectionFilterGamepad: FilterSpec_t;
90
+ currentSelection: GameListSelection_t;
91
+ eGameListView: EGameListView;
92
+ mapCollapsedState: Record<string, boolean>;
93
+ nVersion: number;
94
+ }
95
+
96
+ interface NavigateLibraryArgsMap_t {
97
+ /** appid */
98
+ collection: number;
99
+ /** Value is in the format of `{appid}` or `{appid}|{collection id}` */
100
+ details: string;
101
+ downloads: undefined;
102
+ // NavigateToCollectionSaveDialog arg
103
+ 'dynamic-collection': any;
104
+ /** Value is in the format of `{appid}` or `{appid}|{partner event id}` */
105
+ event: string;
106
+ games: undefined;
107
+ library: undefined;
108
+ media: undefined;
109
+ recent: undefined;
110
+ // NavigateToSharedAppsDesktopUI arg
111
+ 'shared-apps': any;
112
+ view:
113
+ | 'all'
114
+ | 'all-collections'
115
+ | 'games'
116
+ | 'installed'
117
+ | 'login'
118
+ | 'recent'
119
+ | 'software'
120
+ | 'soundtracks'
121
+ | 'tools'
122
+ | 'videos';
123
+
124
+ // #region BPM only
125
+ /**
126
+ * Value is in the format of `{appid}|{section}`
127
+ *
128
+ * For section names see {@link EAppPropertiesSection}
129
+ */
130
+ appproperties: string;
131
+ apprunning: undefined;
132
+ /**
133
+ * Value is in the format of `{appid}|{section}|{browser history state json ?}`
134
+ *
135
+ * For section names see {@link EControllerConfiguratorSection}
136
+ */
137
+ controllerconfigurator: string;
138
+ /** TODO: what is this */
139
+ gamepadapiosk: undefined;
140
+ search: undefined;
141
+ settings:
142
+ | 'general'
143
+ | 'display'
144
+ | 'internet'
145
+ | 'bluetooth'
146
+ | 'audio'
147
+ | 'storage'
148
+ | 'system'
149
+ | 'internal'
150
+ | 'developer'
151
+ | 'controller'
152
+ | 'downloads'
153
+ | 'remoteplay'
154
+ | 'library'
155
+ | 'family';
156
+ settingszoo: ESettingsZooSection | ESettingsZooDevSection;
157
+ // #endregion
158
+ }
159
+
160
+ export interface CLibraryUIStore {
161
+ m_RecentGamesFirstApp: number;
162
+ m_bGameListGroupedByCollection: boolean;
163
+ m_bGameListGroupedBySharedLibraries: boolean;
164
+ m_bGameListSortedByRecent: boolean;
165
+ m_bIsCollectionEditorOpen: boolean;
166
+ m_bIsCollectionRenameOpen: boolean;
167
+ m_bIsSearchByTypePaneOpen: boolean;
168
+ m_cm: CMInterface;
169
+ m_collectionsAppFilter: CCollectionFilterBase;
170
+ m_collectionsAppFilterGamepad: CCollectionFilterBase;
171
+ m_currentAppFilter: CCollectionFilterBase;
172
+ m_eSelectedGameListView: EGameListView;
173
+ m_gameListSelection: GameListSelection_t;
174
+ m_latchedMostRecentApp: number;
175
+ m_localStorage: CUserLocalStorage;
176
+ m_mapLibrarySectionCollapseState: Map<string, boolean>;
177
+ m_setClientSuggestionIds: Set<number>;
178
+ m_setStoreSuggestionIds: Set<number>;
179
+ // not a mistake, actually valve
180
+ m_setStoreSuggestions: CStoreItem[];
181
+
182
+ /**
183
+ * @returns `true` if searching by app type.
184
+ */
185
+ BIsSearchByTypeActive(): boolean;
186
+
187
+ /**
188
+ * @returns `true` if the advanced search pane is open.
189
+ */
190
+ BIsSearchByTypePaneOpen(): boolean;
191
+
192
+ BIsSuggestionVisible(appid: number): boolean;
193
+
194
+ /**
195
+ * @returns `true` if searching by app name.
196
+ */
197
+ BIsTextSearchActive(): boolean;
198
+
199
+ CleanupCollapseStateMap(): void;
200
+
201
+ /**
202
+ * Collapses all visible collections.
203
+ */
204
+ CollapseAll(): void;
205
+
206
+ /**
207
+ * Switches to large mode if not already.
208
+ */
209
+ EnsureLargeMode(): void;
210
+
211
+ /**
212
+ * Resets the search and closes the advanced search pane.
213
+ */
214
+ ExitSearch(): void;
215
+
216
+ /**
217
+ * Collapses all visible collections.
218
+ */
219
+ ExpandAll(): void;
220
+
221
+ /**
222
+ * Expands or collapses all collections from the provided argument.
223
+ */
224
+ ExpandOrCollapseAll(collapse: boolean): void;
225
+
226
+ // SendMsgSearchAppDataCacheByStoreKeywords
227
+ FetchSearchSuggestions(query: string): Promise<void>;
228
+
229
+ /**
230
+ * @returns the active window instance.
231
+ */
232
+ GetActiveWindowInstance(): SteamUIWindowInstance;
233
+
234
+ /**
235
+ * @returns all collections, including system ones.
236
+ */
237
+ GetCollectionList(): Array<CCollectionBase | CCollection>;
238
+
239
+ /**
240
+ * @returns the last game played from recent games.
241
+ */
242
+ GetRecentGamesFirstApp(): number;
243
+
244
+ /**
245
+ * @returns all visible collections.
246
+ */
247
+ GetVisibleCollections(): Array<CCollectionBase | CCollection>;
248
+
249
+ InitializeAppFilter(state: LibraryState_t, param1?: boolean): CCollectionFilterBase;
250
+
251
+ /**
252
+ * @returns `true` if provided collection is collapsed.
253
+ */
254
+ IsCollapsed(collectionId: string): boolean;
255
+
256
+ /**
257
+ * @returns `true` if there is a BPM window open.
258
+ */
259
+ IsGamepadUIWindowActive(wnd?: SteamUIWindowInstance): boolean;
260
+
261
+ NavigateForward(): void;
262
+
263
+ // TODO: "value" isn't optional for some keys, but idk how to do that
264
+ NavigateLibrary<K extends keyof NavigateLibraryArgsMap_t>(
265
+ wnd: SteamUIWindowInstance | null,
266
+ key: K,
267
+ value?: NavigateLibraryArgsMap_t[K],
268
+ ): void;
269
+
270
+ NavigateToCollectionSaveDialog(param0: string): void;
271
+
272
+ NavigateToSharedAppsDesktopUI(json: string): void;
273
+
274
+ PreserveNavigation(): void;
275
+
276
+ /**
277
+ * Resets the search.
278
+ */
279
+ ResetSearch(): void;
280
+
281
+ RestoreNavigation(): void;
282
+
283
+ /**
284
+ * Saves current library settings to storage.
285
+ */
286
+ SaveLocalState(): Promise<void>;
287
+
288
+ /**
289
+ * @todo Is there a better way to extract args from SelectOption *but* retain
290
+ * the template ? Parameters<T> will just get me "EFilterGroup.Partner" for
291
+ * "group" and "EPartnerCollection | number" for "option". For now, see
292
+ * {@link CCollectionFilterBase.SelectOption}
293
+ */
294
+ SelectCollectionsAppFilterOption<K extends keyof FilterOptionByIndex_t>(
295
+ group: K,
296
+ option: FilterOptionByIndex_t[K],
297
+ value: boolean,
298
+ ): Promise<void>;
299
+
300
+ SelectGameListView(param0: EGameListView, collectionId: string): void;
301
+
302
+ /**
303
+ * @todo Is there a better way to extract args from SelectOption *but* retain
304
+ * the template ? Parameters<T> will just get me "EFilterGroup.Partner" for
305
+ * "group" and "EPartnerCollection | number" for "option". For now, see
306
+ * {@link CCollectionFilterBase.SelectOption}
307
+ */
308
+ SelectGamepadCollectionsAppFilterOption<K extends keyof FilterOptionByIndex_t>(
309
+ group: K,
310
+ option: FilterOptionByIndex_t[K],
311
+ value: boolean,
312
+ ): Promise<void>;
313
+
314
+ /**
315
+ * Shows/hides the dynamic collection's advanced search pane.
316
+ */
317
+ SetCollectionEditorOpen(value: boolean): void;
318
+
319
+ /**
320
+ * Shows/hides the rename collection text field.
321
+ */
322
+ SetCollectionRenameOpen(value: boolean): void;
323
+
324
+ /**
325
+ * Sets the game list to (not) be grouped by collections.
326
+ */
327
+ SetGameListGroupedByCollection(value: boolean): void;
328
+
329
+ SetGameListGroupedBySharedLibrary(value: boolean): void;
330
+
331
+ // look at the function name... it should do *that* but it doesn't? i swear it
332
+ // used to
333
+ SetGameListSelection(strCollectionId: string, nAppId: number): Promise<void>;
334
+
335
+ /**
336
+ * Sets the game list to (not) be sorted by recently played.
337
+ */
338
+ SetGameListSortedByRecent(value: boolean): void;
339
+
340
+ /**
341
+ * Sets the provided collection's collapsed state.
342
+ */
343
+ SetIsCollapsed(collectionId: string, value: boolean): void;
344
+
345
+ SetMultiSelectHooksForGameListSelection(): void;
346
+
347
+ SetRecentGamesFirstApp(appid: number): void;
348
+
349
+ /**
350
+ * Shows/hides the advanced search pane.
351
+ */
352
+ SetSearchByTypePaneOpen(value: boolean): void;
353
+
354
+ /**
355
+ * Starts searching for `query`.
356
+ */
357
+ SetSearchText(query: string): Promise<void>;
358
+
359
+ ShowCollectionViewWithAppTypes(...appTypes: EAppType[]): void;
360
+
361
+ // lol wtf is this
362
+ ShowDurationControlDialog(callbacks: { ConfirmContinue: () => void; Cancel: () => void } | null): void;
363
+
364
+ /**
365
+ *
366
+ * @param filter
367
+ * @param steamIds Steam3 IDs
368
+ */
369
+ ShowSharedAppsInLibrary(filter: CDynamicCollectionFilter, steamIds: number[]): void;
370
+
371
+ StartSearchByType(filter: CCollectionFilterBase): void;
372
+
373
+ /**
374
+ * Toggles the provided collection's collapsed state.
375
+ */
376
+ toggleCollapsed(collectionId: string): void;
377
+
378
+ UpdateGameListSelection(): void;
379
+
380
+ get bIsGameListGroupedByCollection(): boolean;
381
+ get bIsGameListGroupedBySharedLibraries(): boolean;
382
+ get bIsGameListSortedByRecent(): boolean;
383
+ get clientSearchSuggestionIds(): Set<number>;
384
+ get collectionsAppFilter(): CCollectionFilterBase;
385
+ get collectionsAppFilterGamepad(): CCollectionFilterBase;
386
+ get currentAppFilter(): CCollectionFilterBase;
387
+ get currentCollectionID(): string;
388
+ get currentGameListSelection(): GameListSelection_t;
389
+ get currentUserSteamID(): CSteamID;
390
+ get isCollectionEditorOpen(): boolean;
391
+ get isCollectionRenameOpen(): boolean;
392
+ get searchSuggestionIds(): Set<number>;
393
+ get searchSuggestions(): CStoreItem[];
394
+ get selectedGameListView(): EGameListView;
395
+ }
@@ -0,0 +1,56 @@
1
+ import type { ESteamRealm } from '../shared/enums';
2
+ import type { CCallbackList } from '../shared/interfaces';
3
+ import type { ELanguage } from '../steam-client/Settings';
4
+
5
+ export interface CLocalizationManager {
6
+ m_cbkTokensChanged: CCallbackList;
7
+ m_mapFallbackTokens: Map<string, string>;
8
+ m_mapTokens: Map<string, string>;
9
+ m_rgLocalesToUse: string[];
10
+
11
+ /**
12
+ * Adds the provided list of tokens to the token map.
13
+ */
14
+ AddTokens(dict: Record<string, string>, fallback?: Record<string, string>): void;
15
+
16
+ /**
17
+ * @returns `true` if the string looks like a token (starts with a "#").
18
+ */
19
+ BLooksLikeToken(value: string): boolean;
20
+
21
+ GetELanguageFallbackOrder(realm?: ESteamRealm): ELanguage[];
22
+
23
+ /**
24
+ * @returns user's preferred locales.
25
+ */
26
+ GetPreferredLocales(): string[];
27
+
28
+ GetTokensChangedCallbackList(): CCallbackList;
29
+
30
+ /**
31
+ * Localizes a token.
32
+ *
33
+ * @returns a localized string.
34
+ */
35
+ LocalizeString(token: string, failSilently?: boolean): string;
36
+
37
+ /**
38
+ * Like {@link LocalizeString}, but falls back to the given string
39
+ * if not found.
40
+ *
41
+ * @returns a localized or the given string.
42
+ */
43
+ LocalizeIfToken(token: string, failSilently?: boolean): string;
44
+
45
+ /**
46
+ * Like {@link LocalizeString}, but uses fallback tokens instead.
47
+ *
48
+ * @returns a localized string.
49
+ */
50
+ LocalizeStringFromFallback(token: string): string;
51
+
52
+ /**
53
+ * Sets user's preferred locales.
54
+ */
55
+ SetPreferredLocales(locales: string[]): void;
56
+ }
@@ -0,0 +1,135 @@
1
+ import type { Action, Location } from '../shared/history';
2
+ import type { CCallbackList } from '../shared/interfaces';
3
+ import type {
4
+ BrowserViewHistory,
5
+ BrowserViewPageSecurity,
6
+ BrowserViewPopup,
7
+ } from '../steam-client/browser-view/BrowserViewPopup';
8
+
9
+ type SteamBrowserTab_t = 'community' | 'store' | 'me';
10
+
11
+ type SteamBrowserTabs_t = {
12
+ [key in SteamBrowserTab_t]: string;
13
+ };
14
+
15
+ export interface SteamBrowserHistoryState {
16
+ /**
17
+ * @todo actually im not sure what this is
18
+ */
19
+ bExternal?: boolean;
20
+
21
+ /**
22
+ * Entry URL.
23
+ */
24
+ strURL?: string;
25
+ }
26
+
27
+ interface TabbedBrowserWebPageRequest {
28
+ requestid: number;
29
+ strLastURL: string;
30
+ strTitle: string;
31
+ strURL: string;
32
+ }
33
+
34
+ interface CTabbedBrowserStore {
35
+ m_cbWebPageRequestsChanged: CCallbackList;
36
+ m_nActiveWebpageRequestID: number;
37
+ m_nWebPageRequestID: number;
38
+ m_rgWebPageRequests: TabbedBrowserWebPageRequest[];
39
+
40
+ /**
41
+ * @param url Web page's URL. `data:text/html,<body></body>` by default.
42
+ */
43
+ AddWebPageRequest(url?: string, param1?: boolean): void;
44
+
45
+ GetWebPageRequestsChangedCallbackList(): CCallbackList;
46
+
47
+ /**
48
+ * Removes all requests and closes the browser.
49
+ */
50
+ RemoveAllRequests(): void;
51
+
52
+ RemoveWebPageRequest(requestId: number): boolean;
53
+
54
+ ReorderWebPageRequest(param0: number, param1: number): void;
55
+
56
+ /**
57
+ * @todo Probably used to init this.
58
+ */
59
+ Set(activeWebpageRequestId: number, webPageRequestId: number, webPageRequests: TabbedBrowserWebPageRequest[]): void;
60
+
61
+ /**
62
+ * @param requestId Web page request ID, like in
63
+ * {@link TabbedBrowserWebPageRequest.requestid}.
64
+ * @param url Web page's URL.
65
+ * @param title Web page's `<title>`.
66
+ *
67
+ * @returns `true` if request ID exists.
68
+ */
69
+ UpdateWebPageRequest(requestId?: number, url?: string, title?: string): boolean;
70
+ }
71
+
72
+ export interface CMainWindowBrowserManager {
73
+ m_URL: string;
74
+ m_URLRequested: string;
75
+ m_bExpectImportantReplace: boolean;
76
+ m_bLoading: boolean;
77
+ m_bRouterChangeTroggeredBySync: boolean;
78
+ m_browser: BrowserViewPopup;
79
+ m_browserHistory: BrowserViewHistory;
80
+ /**
81
+ * `History` in `index.d.ts` of https://www.npmjs.com/package/history/v/5.0.0
82
+ */
83
+ m_history: any;
84
+ m_lastActiveTab: SteamBrowserTab_t;
85
+ m_lastActiveTabURLs: SteamBrowserTabs_t;
86
+ m_lastLocation: Location<SteamBrowserHistoryState>;
87
+ m_loadErrorCode: number | null;
88
+ m_loadErrorDesc: string | null;
89
+ m_loadErrorURL: string | null;
90
+ m_pageSecurity: BrowserViewPageSecurity | null;
91
+ m_rootTabURLs: SteamBrowserTabs_t;
92
+ m_strTitle: string;
93
+ m_tabbedBrowserStore: CTabbedBrowserStore;
94
+ m_tsWaitingForBrowserChange: number | undefined;
95
+
96
+ /**
97
+ * Opens the provided tab in the browser.
98
+ */
99
+ ActivateTab(tab: SteamBrowserTab_t): void;
100
+
101
+ BIsWaitingForHistoryCallback(): boolean;
102
+
103
+ /**
104
+ * @returns the last active/opened tab in the browser.
105
+ */
106
+ GetLastActiveTab(): SteamBrowserTab_t;
107
+
108
+ /**
109
+ * @param url A Steam store/community URL.
110
+ * @returns a browser tab responsible for provided URL or `ignore` or
111
+ * `maintain`.
112
+ */
113
+ GetTabForURL(url: string): SteamBrowserTab_t | 'ignore' | 'maintain';
114
+
115
+ /**
116
+ * @todo Loads a URL, but `bExternal` is `false`.
117
+ */
118
+ LoadURL(url: string): void;
119
+
120
+ /**
121
+ * Reloads the current page.
122
+ */
123
+ Reload(): void;
124
+
125
+ /**
126
+ * @todo Loads a URL, but `bExternal` is `true`.
127
+ */
128
+ ShowURL(url: string, state: SteamBrowserHistoryState): void;
129
+
130
+ SyncWithNewBrowserHistory(entry: BrowserViewHistory): void;
131
+
132
+ SyncWithNewRouterEvent(location: Location<SteamBrowserHistoryState>, action: Action): void;
133
+
134
+ UpdateActiveTab(url: string): void;
135
+ }