@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,646 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ import type { BrowserContext, CCallbackList } from '../../shared';
4
+ import type { EResult } from '../../steam-client/shared';
5
+ import type { ClipSummary_t } from '../gamerecordingstore';
6
+ import type { CPlayer } from './shared';
7
+
8
+ // #region TODO(protobufs): generate
9
+ export enum EMessageReactionType {
10
+ k_EMessageReactionType_Invalid,
11
+ k_EMessageReactionType_Emoticon,
12
+ k_EMessageReactionType_Sticker,
13
+ }
14
+
15
+ export enum EMsgAnimationState {
16
+ None,
17
+ Animating,
18
+ }
19
+
20
+ export enum EChatMsgDeleteState {
21
+ None,
22
+ Deleting,
23
+ Deleted,
24
+ }
25
+
26
+ export enum EChatMsgSendError {
27
+ None,
28
+ Generic,
29
+ NotFriends,
30
+ NoChatPermissionInGroup,
31
+ RateLimitExceeded,
32
+ }
33
+
34
+ export enum EChatRoomServerMessage {
35
+ k_EChatRoomServerMsg_Invalid,
36
+ k_EChatRoomServerMsg_RenameChatRoom,
37
+ k_EChatRoomServerMsg_Joined,
38
+ k_EChatRoomServerMsg_Parted,
39
+ k_EChatRoomServerMsg_Kicked,
40
+ k_EChatRoomServerMsg_Invited,
41
+ k_EChatRoomServerMsg_InviteDismissed,
42
+ k_EChatRoomServerMsg_ChatRoomTaglineChanged,
43
+ k_EChatRoomServerMsg_ChatRoomAvatarChanged,
44
+ k_EChatRoomServerMsg_AppCustom,
45
+ }
46
+
47
+ export enum EChatWindowState {
48
+ Unopened,
49
+ Hidden,
50
+ Visible,
51
+ FocusedIdle,
52
+ FocusedActive,
53
+ }
54
+
55
+ export enum EFileUploadState {
56
+ None,
57
+ FileReady,
58
+ InProgress,
59
+ Error,
60
+ Error_ImageTooLarge,
61
+ Error_FileTypeNotSupported,
62
+ Completed,
63
+ }
64
+ // #endregion
65
+
66
+ interface Reaction_t {
67
+ eReactionType: EMessageReactionType;
68
+ strReaction: string;
69
+ cReactors: number;
70
+ bUserReacted: boolean;
71
+ }
72
+
73
+ export declare class CChatMessageBlock {
74
+ m_bMessageBlockIsOnlyEmotes: boolean;
75
+ m_nextBlock: this;
76
+ m_rgMessages: ChatMsg_t[];
77
+ m_rtMidnightBeforeBlock: number;
78
+
79
+ /**
80
+ * Appends the provided message to this block.
81
+ *
82
+ * @param msg The message to append.
83
+ */
84
+ AppendMessage(msg: ChatMsg_t): void;
85
+
86
+ BCanAccumulateMessage(msg: ChatMsg_t): boolean;
87
+ BIsInvite(): boolean;
88
+ BIsLocalMsg(): boolean;
89
+ BIsServerMsg(): boolean;
90
+ CreateVirtualSplitOnTimestamp(ts: number): CChatMessageBlock[];
91
+ GetRTimeFirstMessage(): number;
92
+ GetRTimeLastMessage(): number;
93
+ GetRTimeMidnightBeforeBlock(): number;
94
+ GetRTimeMidnightBeforeNextBlock(): number;
95
+ RemoveLocalMessage(msg: ChatMsg_t): boolean;
96
+ SetNextBlock(block: CChatMessageBlock): void;
97
+ UniqueKey(): number;
98
+ }
99
+
100
+ export declare class CChatMessageBlockList {
101
+ m_iIndexLastTimePassesGap: number | undefined;
102
+ m_rgMessageBlocks: CChatMessageBlock[];
103
+
104
+ /**
105
+ * Appends the provided message to this block.
106
+ *
107
+ * @param msg The message to append.
108
+ */
109
+ AppendMessage(msg: ChatMsg_t): void;
110
+
111
+ /**
112
+ * Same as {@link AppendMessage}.
113
+ */
114
+ AppendNewMessage(msg: ChatMsg_t): void;
115
+
116
+ /**
117
+ * Reconstructs the message blocks with the provided one.
118
+ *
119
+ * @param msgs Messages to use for the new block(s).
120
+ */
121
+ BuildMessageBlocks(msgs: ChatMsg_t[]): void;
122
+
123
+ /**
124
+ * Removes every single message.
125
+ */
126
+ Clear(): void;
127
+
128
+ RemoveLocalMessage(msg: ChatMsg_t): boolean;
129
+
130
+ RemoveOldestMessages(param0: number): CChatMessageBlock[] | null;
131
+ }
132
+
133
+ type ChatRoomEffect_t =
134
+ | 'balloons'
135
+ | 'confetti'
136
+ | 'firework'
137
+ | 'goldfetti'
138
+ | 'lny2020_confetti'
139
+ | 'lny2020_firework'
140
+ | 'lny2020_lanterns'
141
+ | 'snow'
142
+ | 'snowball';
143
+
144
+ interface ChatRoomEffectSettings {
145
+ /** Button loc token */
146
+ buttonToken: string;
147
+ locToken: string;
148
+ /** React element render function */
149
+ render(...args: any[]): ReactNode;
150
+ /** React element render function */
151
+ renderButton(): ReactNode;
152
+ /** React element render function */
153
+ renderEffectIcon(): ReactNode;
154
+ timeout: number;
155
+ }
156
+
157
+ declare class ChatRoomEffectInstance {
158
+ name: string;
159
+ timestamp: number;
160
+ expires: number;
161
+ settings: ChatRoomEffectSettings;
162
+
163
+ Queue(): string;
164
+ bIsExpired(): boolean;
165
+ bIsActive(): boolean;
166
+ iTimeToExpiry(): number;
167
+ render(): ReactNode | null;
168
+ }
169
+
170
+ // unconfirmed, just typed from the js lol
171
+ export declare class CChatRoomEffectManager {
172
+ m_effectSettings: {
173
+ [effect in ChatRoomEffect_t]: ChatRoomEffectSettings;
174
+ };
175
+ m_mapRoomEffectQueue: {
176
+ [effect in ChatRoomEffect_t]: ChatRoomEffectInstance[];
177
+ };
178
+ m_rgRunningEffects: ChatRoomEffectInstance[];
179
+
180
+ ActivateRoomEffect(instance: ChatRoomEffectInstance): void;
181
+ AddRoomEffect(name: ChatRoomEffect_t): void;
182
+ BIsQueueFull(name: ChatRoomEffect_t): boolean;
183
+ QueueRoomEffect(name: ChatRoomEffect_t): void;
184
+ UpdateRunningRoomEffects(): void;
185
+ }
186
+
187
+ interface SendQueueEntry_t {
188
+ /**
189
+ * The error if the message failed to send.
190
+ */
191
+ eError?: EChatMsgSendError;
192
+
193
+ id?: string;
194
+
195
+ /**
196
+ * Message contents.
197
+ */
198
+ message: string;
199
+
200
+ /**
201
+ * UNIX timestamp when this message got sent.
202
+ */
203
+ timestamp: number;
204
+ }
205
+
206
+ export declare class CPerChatSendQueue {
207
+ m_id: string;
208
+ m_queue: SendQueueEntry_t[];
209
+
210
+ Add(msg: string): string;
211
+ GetItemID(item: SendQueueEntry_t): string;
212
+ GetItemIndex(item: SendQueueEntry_t): number;
213
+ RemoveItem(index: number): void;
214
+ SetItemFailed(item: SendQueueEntry_t, error: number): void;
215
+ UpdateStoredQueue(): void;
216
+
217
+ get queued_messages(): SendQueueEntry_t[];
218
+ }
219
+
220
+ interface FileUploadInfo_t {
221
+ bSpoiler: boolean;
222
+ }
223
+
224
+ interface FileUploadProps_t {
225
+ dataURL: string | undefined;
226
+ displayFileName: string | undefined;
227
+ eUploadState: EFileUploadState;
228
+ exportFn: ((...args: any[]) => any) | undefined;
229
+ file: File | null | undefined;
230
+ // TODO: FileUploadInfo_t ?
231
+ fileInfo: any;
232
+ hmac: string | undefined;
233
+ imageHeight: number;
234
+ imageWidth: number;
235
+ sha1: string | undefined;
236
+ strErrorDescription: string | undefined;
237
+ timestamp: number;
238
+ uploadFileName: string | undefined;
239
+ uploadInfo: FileUploadInfo_t;
240
+ uploadProgress: number;
241
+ }
242
+
243
+ interface idk {
244
+ displayFilename?: string;
245
+ info: FileUploadInfo_t;
246
+ onComplete?: (result: EResult, size: number) => void;
247
+ processor?: any;
248
+ unAssociatedAppID?: number;
249
+ }
250
+
251
+ interface CFileUploadManager {
252
+ m_Callbacks: CChat;
253
+ m_fileUploadProps: FileUploadProps_t;
254
+ m_onComplete: ((result: EResult, size: number) => void) | undefined;
255
+
256
+ BeginFileUpload(uploadInfo: FileUploadInfo_t): Promise<Response | null>;
257
+ ClearFileUploadError(): void;
258
+ CommitFileUpload(bSuccess: boolean, ugcid: string): Promise<Response | null>;
259
+ DoFileUpload(options: any): Promise<Response | null>;
260
+ LogFileUploadMessage(msg: string): void;
261
+ Reset(): void;
262
+ RetryFileUpload(): Promise<Response | null>;
263
+ SetFileToUpload(fileOrExportFn: File | ((...args: any[]) => any) | null): void;
264
+ SetImageFileToUpload(file: File | null, t: idk): Promise<void>;
265
+ SetOtherFileToUpload(file: File | null, t: idk): Promise<void>;
266
+ SetUploadFileError(state: EFileUploadState, description: string): void;
267
+ StartFileExportToUpload(file: File | null, t: idk): Promise<void>;
268
+
269
+ get file(): File | null;
270
+ get file_upload_data_url(): string | null;
271
+ get file_upload_props(): FileUploadProps_t;
272
+ }
273
+
274
+ declare class CChatTabSet {
275
+ m_activeTab: CChatView;
276
+ m_browserContext: BrowserContext;
277
+ m_id: number;
278
+ m_vecTabs: CChatView[];
279
+
280
+ /**
281
+ * Focuses the next (or first tab if current is last) tab in the list.
282
+ */
283
+ ActivateNextTab(): void;
284
+
285
+ /**
286
+ * Focuses the previous (or last tab if current is first) tab in the list.
287
+ */
288
+ ActivatePreviousTab(): void;
289
+
290
+ /**
291
+ * Focuses the provided tab.
292
+ */
293
+ ActivateTab(tab: CChatView): void;
294
+
295
+ /**
296
+ * Adds a provided tab. Won't be added if already open.
297
+ */
298
+ AddTab(tab: CChatView): void;
299
+
300
+ /**
301
+ * @returns `true` if the provided tab exists.
302
+ */
303
+ BHasTab(tab: CChatView): boolean;
304
+
305
+ /**
306
+ * Closes all tabs (the chat window remains open).
307
+ */
308
+ CloseAllTabs(): void;
309
+
310
+ /**
311
+ * Releases the provided tab from memory (not closing it).
312
+ */
313
+ DeactivateTab(tab: CChatView): void;
314
+
315
+ /**
316
+ * Focuses the chat window.
317
+ */
318
+ Focus(): void;
319
+
320
+ FocusActiveTab(): void;
321
+
322
+ GetBrowserContext(): BrowserContext;
323
+
324
+ /**
325
+ * @returns the chat tab from its ID or `null` if not found.
326
+ */
327
+ GetTabByUniqueID(id: string): CChatView | null;
328
+
329
+ GetTabForChat(chat: CChat): CChatView | null;
330
+
331
+ GetTabSetIdentifier(): string;
332
+
333
+ /**
334
+ * @returns the localized chat window title.
335
+ */
336
+ GetTitle(): string;
337
+
338
+ /**
339
+ * Moves `tabA` after `tabB`.
340
+ */
341
+ MoveTabAfter(tabA: CChatView, tabB: CChatView): void;
342
+
343
+ /**
344
+ * Moves a tab to a provided index, e.g. `0` will make it first, etc.
345
+ *
346
+ * @param tab The tab to move.
347
+ * @param index Zero-indexed place to move the tab to.
348
+ */
349
+ MoveTabToIndex(tab: CChatView, index: number): void;
350
+
351
+ OnPopupClosed(): void;
352
+
353
+ OnWindowFocus(): void;
354
+
355
+ /**
356
+ * Removes a provided tab.
357
+ *
358
+ * @returns `true` on success.
359
+ */
360
+ RemoveTab(tab: CChatView): boolean;
361
+
362
+ Serialize(): {
363
+ active_tab: string;
364
+ tabs: string[];
365
+ };
366
+
367
+ get activeTab(): CChatView;
368
+ get is_popup_active(): boolean;
369
+ get is_popup_focused(): boolean;
370
+ get is_popup_visible(): boolean;
371
+ get tabCount(): number;
372
+ get tabs(): this['m_vecTabs'];
373
+ }
374
+
375
+ export interface CChatView {
376
+ m_bScrolledToBottom: boolean;
377
+ m_chat: CChat;
378
+ m_clientHeight: number;
379
+ m_clipToUpload: ClipSummary_t | undefined;
380
+ m_fileUploadManager: CFileUploadManager;
381
+ m_msLastActive: number;
382
+ m_rgOnChatFrameChangedCallbacks: (() => void)[];
383
+ m_rgOnChatRequestScrollBottomCallbacks: (() => void)[];
384
+ m_scrollHeight: number;
385
+ m_scrollTop: number;
386
+ m_strTextEntry: string;
387
+ m_tabset: CChatTabSet;
388
+ m_textEntryChangeCallbacks: CCallbackList;
389
+ m_textEntryFocusCallbacks: CCallbackList;
390
+
391
+ AddOnChatFrameChangedCallback(callback: () => void): void;
392
+
393
+ AddOnChatRequestScrollBottomCallback(callback: () => void): void;
394
+
395
+ /**
396
+ * Appends provided text to the text field.
397
+ */
398
+ AddPendingText(text: string): void;
399
+
400
+ BIsInBrowserContext(browser: BrowserContext): boolean;
401
+
402
+ /**
403
+ * @returns `true` is voice chat is currently active.
404
+ */
405
+ BVoiceActive(): boolean;
406
+
407
+ CheckActivationAndNotifyChat(): void;
408
+
409
+ /**
410
+ * Escapes BB code.
411
+ */
412
+ ConvertMessageToBBCode(msg: string): string;
413
+
414
+ /**
415
+ * Focuses the text field.
416
+ */
417
+ FocusTextInput(): void;
418
+
419
+ GetChatView(): this;
420
+
421
+ /**
422
+ * @returns the chat's tab name.
423
+ */
424
+ GetTabName(): string;
425
+
426
+ /**
427
+ * @returns the chat's tab internal ID.
428
+ */
429
+ GetUniqueID(): string;
430
+
431
+ /**
432
+ * @returns the unread messages count.
433
+ */
434
+ GetUnreadMessageCount(): number;
435
+
436
+ /**
437
+ * @returns the chat tab's window visibility state.
438
+ */
439
+ GetVisibilityState(): EChatWindowState;
440
+
441
+ InternalOnTabActivate(): void;
442
+
443
+ /**
444
+ * @returns `true` if this tab is a group chat.
445
+ */
446
+ IsChatRoom(): boolean;
447
+
448
+ /**
449
+ * @returns `true` if this tab is friend's DMs.
450
+ */
451
+ IsFriendChat(): boolean;
452
+
453
+ IsTabForChat(chat: CChat): boolean;
454
+
455
+ // lmao valve
456
+ IsVoiceActive(): boolean;
457
+
458
+ // #region events
459
+ OnActivate(): void;
460
+ OnChatFrameChanged(): void;
461
+ OnDeactivate(): void;
462
+ OnFocus(): void;
463
+ OnScrollBottomRequest(): void;
464
+ OnTabClosed(): void;
465
+ OnTabDeactivate(): void;
466
+ OnTabFocus(): void;
467
+ OnViewClosed(): void;
468
+ // #endregion
469
+
470
+ RegisterForTextEntryFocus(callback: any): void;
471
+
472
+ RegisterForTextUpdated(callback: any): void;
473
+
474
+ RemoveOnChatFrameChangedCallback(callback: () => void): void;
475
+
476
+ RemoveOnChatRequestScrollBottomCallback(callback: () => void): void;
477
+
478
+ /**
479
+ * Sends a chat message.
480
+ *
481
+ * @param msg The message to send.
482
+ */
483
+ SendChatMessage(msg: string): Promise<void>;
484
+
485
+ SetClipToUpload(clip: ClipSummary_t): void;
486
+
487
+ SetFileToUpload(file: File | null, t?: idk): void;
488
+
489
+ StartFileExportToUpload(file: File | null, t?: idk): any;
490
+
491
+ UploadFile(spoiler: boolean): Promise<void>;
492
+ }
493
+
494
+ export declare class ChatMsg_t {
495
+ eAnimationState: EMsgAnimationState;
496
+ eDeleteState: EChatMsgDeleteState;
497
+ eServerMsgType: EChatRoomServerMessage | undefined;
498
+ m_bNoUserContent: boolean | undefined;
499
+ m_mentions: any | undefined;
500
+ m_rgReactions: Reaction_t[];
501
+ m_strSlashCommand: string | undefined;
502
+ rtTimestamp: number;
503
+ strMessageInternal: string;
504
+ strServerMsgAppCustomLocalized: string | undefined;
505
+ strServerMsgParam: string | undefined;
506
+ unAccountID: number;
507
+ unOrdinal: number;
508
+ unServerMsgParamAccountID: number | undefined;
509
+
510
+ BHasServerAcknowledged(): boolean;
511
+ BIsInvite(): boolean;
512
+ BIsLocalEcho(): boolean;
513
+ BIsNewerThan(ts: number): boolean;
514
+ BIsOlderThan(ts: number): boolean;
515
+ BIsServerMessage(): boolean;
516
+ GetSlashCommand(): string | null;
517
+ HasUserContent(): boolean;
518
+ UniqueKey(): number | string;
519
+ UpdateReaction(
520
+ eReactionType: EMessageReactionType,
521
+ strReaction: string,
522
+ cReactors: number,
523
+ bUserReacted: boolean,
524
+ ): Reaction_t;
525
+
526
+ get Mentions(): any;
527
+ }
528
+
529
+ export declare class CChat {
530
+ m_ChatMessageBlockList: CChatMessageBlockList;
531
+ m_MessageSendQueue: CPerChatSendQueue;
532
+ m_accountIDLastMessage: number | undefined;
533
+ m_bChatLogsLoaded: boolean;
534
+ m_bFriendIsTyping: boolean;
535
+ m_bHasUnreadPriorityChatMessages: boolean;
536
+ m_bMoreAvailable: boolean;
537
+ m_bNeedsNonFriendWarning: boolean;
538
+ m_bPrepended: boolean;
539
+ m_bReceivedChatLogs: boolean;
540
+ m_cUnreadChatMessages: number;
541
+ m_chatRoomEffects: CChatRoomEffectManager;
542
+ m_iClearFriendIsTypingInterval: number | undefined;
543
+ m_msTimeActivated: number;
544
+ m_nLoadingHistoryInProgressCount: number;
545
+ m_oldestMessageOrdinal: number;
546
+ m_oldestMessageTime: number;
547
+ m_rgChatMessages: ChatMsg_t[];
548
+ m_rgChatViews: CChatView[];
549
+ m_rtFirstUnread: number;
550
+ m_rtFirstUnreadChatMsg: number;
551
+ m_rtLastAckedChatMsg: number;
552
+ m_rtLastMessageReceived: number;
553
+ m_rtLastServerAckedChatMsg: number;
554
+ m_rtLastServerMessageReceived: number;
555
+ m_setInflightClientMessageID: Set<string>;
556
+ m_strLastMessage: string | undefined;
557
+ m_tsLastSentTypingNotification: number | undefined;
558
+ m_unAccountIDFriend: number;
559
+
560
+ AckChatMsgOnServer(e: any): any;
561
+
562
+ /**
563
+ * @returns `true` if the chat partner is a friend and online.
564
+ */
565
+ BIsVoiceAllowed(): boolean;
566
+
567
+ /**
568
+ * @returns `true` is voice chat is currently active.
569
+ */
570
+ BVoiceActive(): boolean;
571
+
572
+ CheckShouldNotify(e: any, t: any, r: any): any;
573
+ ClearFriendIsTypingState(): any;
574
+ GetBBCodeParser(): any;
575
+
576
+ /**
577
+ * @returns the last message's contents.
578
+ */
579
+ GetLastMessage(): string;
580
+
581
+ GetMember(steamid3: number): CPlayer;
582
+ GetMessageReactionReactors(e: any, t: any, r: any): any;
583
+ GetMessagesFromResponse(e: any): any;
584
+ GetMessagesFromTimeRange(e: any, t: any, r: any, i: any, a: any): any;
585
+ GetShowNonFriendWarning(): any;
586
+
587
+ /**
588
+ * @returns a localized message why voice is not allowed, or `null` if it is.
589
+ */
590
+ GetVoiceNotAllowedReason(): string | null;
591
+
592
+ // #region events
593
+ OnFriendTypingNotification(): any;
594
+ OnNewChatMsgAdded(e: any, t: any, r: any, n: any): any;
595
+ OnReceivedNewMessage(e: any, t: any, r: any, n: any): any;
596
+ OnTyping(): any;
597
+ // #endregion
598
+
599
+ PopulateCommitFileUploadFormData(e: FormData, t: FileUploadInfo_t, r: idk): any;
600
+
601
+ /**
602
+ * Sends a message to this chat.
603
+ *
604
+ * @param content The message contents to send.
605
+ */
606
+ SendChatMessage(content: string): Promise<void>;
607
+
608
+ SendChatMessageInternal(content: string): Promise<EChatMsgSendError>;
609
+
610
+ SetShowNonFriendWarning(value: boolean): void;
611
+
612
+ /**
613
+ * If this chat's voice chat is not active, opens voice chat for this chat,
614
+ * otherwise joins said voice chat.
615
+ *
616
+ * @returns ...true. Yeah, true.
617
+ */
618
+ ToggleVoiceChat(): true;
619
+
620
+ UpdateMessageReaction(
621
+ msg: ChatMsg_t,
622
+ eType: EMessageReactionType,
623
+ strReaction: string,
624
+ bUserAdded: boolean,
625
+ ): Promise<EResult>;
626
+
627
+ ViewerNeedsApproval(requestid: number): void;
628
+
629
+ get BIsPrepend(): boolean;
630
+ get accountid_last_message(): number | undefined;
631
+ get accountid_partner(): number;
632
+ get chat_message_blocks(): CChatMessageBlockList;
633
+ get chat_messages(): ChatMsg_t[];
634
+ get chat_partner(): CPlayer;
635
+ get first_unread_msg_time(): number;
636
+ get has_unread_priority_messages(): boolean;
637
+ get is_blocked_friend(): boolean;
638
+ get is_friend_typing(): boolean;
639
+ get last_voice_participation_time(): number;
640
+ get name(): string;
641
+ get self(): CPlayer;
642
+ get time_last_ack(): number;
643
+ get time_last_message(): number;
644
+ get unique_id(): string;
645
+ get unread_message_count(): number;
646
+ }