@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,383 @@
1
+ import type ReactDOM from 'react-dom';
2
+ import type { ActionDescriptionMap, EFocusSource, FooterLegendProps, GamepadButton, GamepadEvent, GamepadEventDetail } from '../../components/FooterLegend';
3
+ import type { CCallbackList, CScheduledFunc, MappedSubscribableValue, SubscribableValue, Unsubscribable } from '../shared';
4
+ import type { ENavigationSourceType, NavigationSource } from '../shared/navigation';
5
+ import type { CGamepadBrowserView } from './steamuistore/gamepadbrowserview';
6
+ export type FlowChildrenLayout_t = 'column' | 'column-reverse' | 'geometric' | 'grid' | 'row' | 'row-reverse';
7
+ type FocusRing_t = any;
8
+ declare enum EFlowChildrenLayout {
9
+ NONE = 0,
10
+ COLUMN = 1,
11
+ ROW = 2,
12
+ COLUMN_REVERSE = 3,
13
+ ROW_REVERSE = 4,
14
+ GRID = 5,
15
+ GEOMETRIC = 6
16
+ }
17
+ declare enum EFocusDirection {
18
+ INVALID = 0,
19
+ FORWARD = 1,
20
+ BACKWARD = 2
21
+ }
22
+ declare enum EGamepadInputRepeatOnAxis {
23
+ None = 0,
24
+ Horizontal = 1,
25
+ Vertical = 2
26
+ }
27
+ declare enum EScrollIntoViewType {
28
+ Standard = 0,
29
+ NoTransform = 1,
30
+ NoTransformSparseContent = 2
31
+ }
32
+ interface GamepadInputRepeatConfig_t {
33
+ inputsThatRepeat: Set<GamepadButton>;
34
+ firstRepeatInterval_ms: number;
35
+ repeatInterval_ms: number;
36
+ }
37
+ declare class CGamepadInputRepeatGenerator {
38
+ m_ActiveInputId: GamepadButton | undefined;
39
+ m_ActiveInputTimeout: number | undefined;
40
+ m_config: GamepadInputRepeatConfig_t;
41
+ Reset(): void;
42
+ HandleInputButtonDown(button: GamepadButton, param1: () => void): void;
43
+ }
44
+ declare class CGamepadInputRepeatHandler {
45
+ m_config: GamepadInputRepeatConfig_t;
46
+ m_fnRepeatAllowed: () => boolean;
47
+ m_inputRepeatGenerator: CGamepadInputRepeatGenerator;
48
+ m_repeatOnAxis: EGamepadInputRepeatOnAxis;
49
+ Reset(): void;
50
+ SetRepeatAllowed(value: boolean): void;
51
+ HandleInputButtonDown(button: GamepadButton, param1: () => void, param2: () => void): void;
52
+ HandleInputButtonUp(button: GamepadButton): void;
53
+ }
54
+ declare class CGamepadInputSource {
55
+ m_OnGamepadDetectedCallbacks: CCallbackList;
56
+ m_ButtonDownCallbacks: CCallbackList<[GamepadButton, ENavigationSourceType, number, boolean]>;
57
+ m_ButtonRepeatHandler: CGamepadInputRepeatHandler;
58
+ m_ButtonUpCallbacks: CCallbackList<[GamepadButton, ENavigationSourceType, number]>;
59
+ m_AnalogCallbacks: CCallbackList<[button: GamepadButton, param1: number, param2: number, index: number | undefined]>;
60
+ m_NavigationTypeChangeCallbacks: CCallbackList<[ENavigationSourceType]>;
61
+ m_eNavigationSourceType: ENavigationSourceType;
62
+ m_fLastActiveTime: number;
63
+ m_nLastActiveControllerIndex: number;
64
+ DispatchButtonDown(button: GamepadButton, param1: boolean): void;
65
+ GetActiveControllerIndex(): number;
66
+ GetActiveControllerTime(): number;
67
+ GetSourceType(): ENavigationSourceType;
68
+ OnAnalogPad(button: GamepadButton, param1: number, param2: number, index: number): void;
69
+ OnButtonDown(button: GamepadButton, param1: number | undefined): void;
70
+ OnButtonUp(button: GamepadButton, param1: number | undefined): void;
71
+ OnGamepadDetected(): void;
72
+ OnNavigationTypeChanged(navType: ENavigationSourceType): void;
73
+ RegisterForGamepadDetected(callback: () => void): void;
74
+ RegisterForGamepadButtonDown(callback: (button: GamepadButton, navType: ENavigationSourceType, param2: number, param3: boolean) => void): void;
75
+ RegisterForGamepadButtonUp(callback: (button: GamepadButton, navType: ENavigationSourceType, index: number) => void): void;
76
+ RegisterForAnalog(callback: (button: GamepadButton, param1: number, param2: number, index: number | undefined) => void): void;
77
+ RegisterForNavigationTypeChange(callback: (navType: ENavigationSourceType) => void): void;
78
+ SetControllerActive(nLastActiveControllerIndex: number): void;
79
+ SetRepeatAllowed(value: boolean): void;
80
+ SetSourceType(value: ENavigationSourceType): void;
81
+ }
82
+ interface DeferredFocusTarget {
83
+ bFocusDescendant: boolean;
84
+ node: CNavigationTreeNode;
85
+ }
86
+ declare class CNavigationTreeDeferredFocus {
87
+ m_bSuppressed: boolean;
88
+ m_interval: any | undefined;
89
+ m_schExecuteQueuedFocus: CScheduledFunc;
90
+ m_target: DeferredFocusTarget | undefined;
91
+ m_tree: CNavigationTree;
92
+ BHasQueuedFocusNode(): boolean;
93
+ BIsQueuedFocusNode(node: CNavigationTreeNode): boolean;
94
+ ClearInterval(): void;
95
+ ExecuteQueuedFocus(): void;
96
+ RequestFocus(node: CNavigationTreeNode, target: DeferredFocusTarget): void;
97
+ Reset(): void;
98
+ SuppressFocus(): void;
99
+ }
100
+ declare class CTreeNodeMovementRect {
101
+ m_element: Element | undefined;
102
+ m_rect: DOMRect | undefined;
103
+ GetRect(): DOMRect;
104
+ Reset(): void;
105
+ SetNode(value: Element | undefined): void;
106
+ }
107
+ interface TreeNodeNavigationProps extends FooterLegendProps {
108
+ autoFocus: boolean;
109
+ childFocusDisabled: boolean;
110
+ disableNavSounds: boolean;
111
+ fnCanTakeFocus(node: CNavigationTreeNode): boolean;
112
+ fnScrollIntoViewHandler: () => boolean;
113
+ focusable: boolean;
114
+ focusableIfEmpty: boolean;
115
+ layout: EFlowChildrenLayout;
116
+ navKey: string;
117
+ navRef: any;
118
+ noFocusRing: boolean;
119
+ onFocusWithin(param0: boolean): void;
120
+ onMoveDown(eventDetails: GamepadEventDetail, node: CNavigationTreeNode): boolean;
121
+ onMoveLeft(eventDetails: GamepadEventDetail, node: CNavigationTreeNode): boolean;
122
+ onMoveRight(eventDetails: GamepadEventDetail, node: CNavigationTreeNode): boolean;
123
+ onMoveUp(eventDetails: GamepadEventDetail, node: CNavigationTreeNode): boolean;
124
+ resetNavOnEntry: boolean;
125
+ scrollIntoViewType: EScrollIntoViewType;
126
+ scrollIntoViewWhenChildFocused: boolean;
127
+ }
128
+ declare class CNavigationTreeNode {
129
+ m_Tree: CNavigationTree;
130
+ m_Parent: CNavigationTreeNode;
131
+ m_ActiveChild: CNavigationTreeNode | undefined;
132
+ m_iLastActiveChildIndex: boolean;
133
+ m_Properties: Partial<TreeNodeNavigationProps>;
134
+ m_element: Element | undefined;
135
+ m_FocusRing: FocusRing_t;
136
+ m_bChildrenSorted: boolean;
137
+ m_bAutoFocusChild: boolean;
138
+ m_bMounted: boolean;
139
+ m_nDepth: number;
140
+ m_Focused: SubscribableValue<boolean>;
141
+ m_FocusWithin: SubscribableValue<boolean>;
142
+ m_ActionDescriptionsChangedCallbackList: CCallbackList;
143
+ m_FocusableIfEmptyAncestor: CNavigationTreeNode | null;
144
+ m_rgChildren: CNavigationTreeNode[];
145
+ m_rgNavigationHandlers: (() => void)[];
146
+ m_rgFocusHandlers: (() => void)[];
147
+ AdvanceIndex(idx: number, dir: EFocusDirection): number;
148
+ AddChild(node: CNavigationTreeNode): void;
149
+ AdjustRectForLastMovementOnTangentAxis(rect: DOMRect, axis: 'x' | 'y'): DOMRect;
150
+ BChildTakeFocus(focusSource: EFocusSource, button: GamepadButton): boolean;
151
+ BHasFocus(): boolean;
152
+ BFocusWithin(): boolean;
153
+ BFocusFirstChild(focusSource: EFocusSource): boolean;
154
+ BFocusLastChild(focusSource: EFocusSource): boolean;
155
+ BTakeFocus(focusSource: EFocusSource, button: GamepadButton): void;
156
+ BTryInternalNavigation(button: GamepadButton, t: boolean): boolean;
157
+ BuildConsolidatedActionDescriptionMap(value: ActionDescriptionMap): ActionDescriptionMap;
158
+ BVisibleChildTakeFocus(focusSource: EFocusSource): boolean;
159
+ BWantsAutoFocus(): boolean;
160
+ BWantsPreferredFocus(): boolean;
161
+ BWantsFocusRing(): boolean;
162
+ ComputeRelativeDirection(button: GamepadButton, layout: EFlowChildrenLayout): EFocusDirection;
163
+ CreateHandle(): FocusRing_t;
164
+ EnsureChildrenSorted(e?: boolean): void;
165
+ FindClosetChildInDirection(axis: 'x' | 'y', rect: DOMRect, dir: EFocusDirection, button: GamepadButton): CNavigationTreeNode | null;
166
+ FindClosestChildInNextAxiallyAlignedSet(axis: 'x' | 'y', dir: EFocusDirection, button: GamepadButton, rect: DOMRect, i?: number, rect2?: DOMRect): CNavigationTreeNode | null;
167
+ FindClosestFocusableNodeToRect(button: GamepadButton, rect: DOMRect): CNavigationTreeNode;
168
+ FindFocusableDescendant(button: GamepadButton, param1: boolean): CNavigationTreeNode | null;
169
+ FindFocusableNode(button: GamepadButton, rect?: DOMRect): CNavigationTreeNode | null;
170
+ FindNextFocusableChildGeometric(dir: EFocusDirection, button: GamepadButton): CNavigationTreeNode | null;
171
+ FindNextFocusableChildInDirection(idx: number, dir: EFocusDirection, button: GamepadButton): CNavigationTreeNode | null;
172
+ FindNextFocusableChildInGrid(idx: number, dir: EFocusDirection, button: GamepadButton): CNavigationTreeNode | null;
173
+ ForceMeasureFocusRing(): void;
174
+ GetActiveActionDescriptions(): ActionDescriptionMap;
175
+ GetActiveChild(): CNavigationTreeNode | null;
176
+ GetActiveChildIndex(): number;
177
+ GetActiveDescendant(): CNavigationTreeNode;
178
+ GetBoundingRect(): DOMRect | undefined;
179
+ GetChildren(): [CNavigationTreeNode[], number];
180
+ GetDepth(): number;
181
+ GetFocusable(): 'children' | 'none' | 'self';
182
+ GetLastFocusElement(): Element;
183
+ GetLayout(): EFlowChildrenLayout;
184
+ GetRelativeDirection(button: GamepadButton): EFocusDirection;
185
+ GetScrollIntoViewType(): EScrollIntoViewType;
186
+ InternalFocusDescendant(node: CNavigationTreeNode | null, focusSource: EFocusSource, button: GamepadButton): void;
187
+ IsValidChildIndex(idx: number): CNavigationTreeNode;
188
+ OnDOMBlur(e: any): void;
189
+ OnDOMFocus(e: any): void;
190
+ OnFocusedDecendantRemoved(e: any): void;
191
+ OnMount(el: Element): void;
192
+ OnNavigationEvent(ev: GamepadEvent): void;
193
+ OnUnmount(): void;
194
+ PropagateFocusableIfEmptyAncestorToDescendants(node: CNavigationTreeNode): void;
195
+ RegisterDOMEvents(): void;
196
+ RemoveChild(node: CNavigationTreeNode): void;
197
+ ScanChildren(e: number, dir: EFocusDirection, callback: (child: CNavigationTreeNode) => void): void;
198
+ SetActiveChild(nodeOrIndex: CNavigationTreeNode | number): void;
199
+ SetDOMFocusAndScroll(focusSource: EFocusSource, param1: any): void;
200
+ SetFocusableIfEmptyAncestor(node: CNavigationTreeNode): void;
201
+ SetFocusWithin(value: boolean): void;
202
+ SetHasFocus(value: boolean): void;
203
+ SetProperties(props: TreeNodeNavigationProps): void;
204
+ UnregisterDOMEvents(): void;
205
+ UpdateParentActiveChild(): void;
206
+ get ActionDescriptionChangedCallbackList(): CCallbackList;
207
+ get Tree(): CNavigationTree;
208
+ get NavKey(): string | undefined;
209
+ get Element(): Element | undefined;
210
+ get Parent(): CNavigationTreeNode;
211
+ get SubscribableFocusWithin(): SubscribableValue<boolean>;
212
+ get SubscribableHasFocus(): SubscribableValue<boolean>;
213
+ }
214
+ declare class CNavigationTree {
215
+ m_Controller: CFocusNavController;
216
+ m_DeferredFocus: CNavigationTreeDeferredFocus;
217
+ m_ID: string;
218
+ m_ParentNavTree: CNavigationTree | undefined;
219
+ m_Root: CNavigationTreeNode;
220
+ m_bIsEmbeddedInLegacyTree: boolean;
221
+ m_bIsEnabled: boolean;
222
+ m_bIsMounted: boolean;
223
+ m_bModal: boolean;
224
+ m_bVirtualFocus: boolean;
225
+ m_bWasActiveForLastFocusChange: boolean;
226
+ m_context: CFocusNavigationContext;
227
+ m_lastFocusNode: CNavigationTreeNode;
228
+ m_lastFocusNodeXMovement: CTreeNodeMovementRect;
229
+ m_lastFocusNodeYMovement: CTreeNodeMovementRect;
230
+ m_onActivateCallbacks: CCallbackList<[CNavigationTree]>;
231
+ m_onActiveFocusStateChangedCallbacks: CCallbackList<[boolean, CNavigationTree]>;
232
+ m_onChildTreesChanged: CCallbackList<['add' | 'remove', CNavigationTree]>;
233
+ m_onDeactivateCallbacks: CCallbackList<[CNavigationTree, CNavigationTree]>;
234
+ m_onGlobalButtonDown: ((ev: GamepadEvent) => void) | undefined;
235
+ m_onUnhandledButton: ((ev: GamepadEvent) => void) | undefined;
236
+ m_rgChildNavTrees: CNavigationTree[];
237
+ m_tsLastActivated: number;
238
+ m_window: Window;
239
+ Activate(param0?: boolean): void;
240
+ AddChildNavTree(tree: CNavigationTree): () => void;
241
+ BIsActive(): boolean;
242
+ BIsActiveFocus(): boolean;
243
+ BIsActiveWithinContext(): boolean;
244
+ BIsContextActive(): boolean;
245
+ BIsEnabled(): boolean;
246
+ BIsModal(): boolean;
247
+ BUseVirtualFocus(): boolean;
248
+ CreateNode(parent: CNavigationTreeNode, focusRing: FocusRing_t): CNavigationTreeNode;
249
+ Deactivate(): void;
250
+ FindModalDescendant(): CNavigationTree;
251
+ GetParentEmbeddedNavTree(): CNavigationTree | undefined;
252
+ GetTimeLastActivated(): number;
253
+ GetLastFocusedNode(): CNavigationTreeNode;
254
+ GetLastFocusedMovementRect(e: string): DOMRect | undefined;
255
+ HandleButtonDownEventAsLogicalEvent(ev: Event): boolean;
256
+ IsActiveFocusNavTree(): boolean;
257
+ OnActivate(tree: CNavigationTree): void;
258
+ OnChildActivated(source: EFocusSource): void;
259
+ OnContextActiveStateChanged(e: boolean): void;
260
+ OnDeactivate(tree: CNavigationTree): void;
261
+ OnRootButtonDown(ev: Event): boolean;
262
+ MountNavTree(wnd: Window): () => void;
263
+ RegisterNavigationItem(ctx: CFocusNavigationContext, wnd: Window): () => void;
264
+ SetIsEnabled(value: boolean): void;
265
+ SetIsEmbeddedInLegacyTree(value: boolean): void;
266
+ SetModal(value: boolean): void;
267
+ SetOnUnhandledButtonCallback(value: (ev: GamepadEvent) => void): void;
268
+ SetOnGlobalButtonDown(value: (ev: GamepadEvent) => void): void;
269
+ SetUseVirtualFocus(value: boolean): void;
270
+ TakeFocus(focusSource: EFocusSource, t?: boolean): void;
271
+ TransferFocus(focusSource: EFocusSource, focusedNode: CNavigationTreeNode | null, blurredNode: CNavigationTreeNode): void;
272
+ TransferFocusInternal(focusSource: EFocusSource, focusedNode: CNavigationTreeNode | null, blurredNode: CNavigationTreeNode): void;
273
+ get ChildTrees(): CNavigationTree[];
274
+ get Controller(): CFocusNavController;
275
+ get DeferredFocus(): CNavigationTreeDeferredFocus;
276
+ get OnActivateCallbacks(): CCallbackList;
277
+ get OnActiveStateChangedCallbacks(): CCallbackList;
278
+ get OnChildTreesChangedCallbacks(): CCallbackList;
279
+ get OnDeactivateCallbacks(): CCallbackList;
280
+ get Parent(): CNavigationTree | undefined;
281
+ get Root(): CNavigationTreeNode;
282
+ get Window(): Window;
283
+ get WindowContext(): CFocusNavigationContext;
284
+ get id(): string;
285
+ }
286
+ interface ActiveFocusChange {
287
+ source: EFocusSource;
288
+ from: CNavigationTreeNode | undefined;
289
+ to: CNavigationTree;
290
+ }
291
+ export declare class CFocusNavigationContext {
292
+ m_ActiveFocusChange: ActiveFocusChange | undefined;
293
+ m_FocusChangedCallbacks: CCallbackList<[EFocusSource, CNavigationTreeNode | undefined, CNavigationTree]>;
294
+ m_LastActiveFocusNavTree: CNavigationTree | undefined;
295
+ m_LastActiveNavTree: CNavigationTree | undefined;
296
+ m_activeBrowserView: CGamepadBrowserView | undefined;
297
+ m_activeWindow: Window;
298
+ m_bIsGamepadInputSuppressed: false;
299
+ m_bMounted: boolean;
300
+ m_controller: CFocusNavController;
301
+ m_iFocusChangeStack: number;
302
+ m_rgGamepadNavigationTrees: CNavigationTree[];
303
+ m_rootWindow: Window;
304
+ m_schDeferredActivate: CScheduledFunc;
305
+ m_valueIsActive: SubscribableValue<boolean>;
306
+ AddNavTree(tree: CNavigationTree): void;
307
+ BIsActive(): boolean;
308
+ BIsGamepadInputSuppressed(): boolean;
309
+ BlurNavTree(tree: CNavigationTree): void;
310
+ Destroy(wnd: Window): void;
311
+ FindNavTreeInFocusedWindow(): CNavigationTree | undefined;
312
+ FindNavTreeToActivate(): CNavigationTree | undefined;
313
+ LogName(info?: {
314
+ name: string;
315
+ }): string;
316
+ OnActivate(activeWindow: Window): void;
317
+ OnActivateBrowserView(activeWindow: Window, activeBrowserView?: CGamepadBrowserView): void;
318
+ OnDeactivate(activeWindow: Window): void;
319
+ OnDeactivateBrowserView(activeWindow: Window, activeBrowserView?: CGamepadBrowserView): void;
320
+ OnFocusChangeComplete(e: number): void;
321
+ OnFocusChangeStart(source: EFocusSource, tree: CNavigationTree, from: CNavigationTreeNode | undefined, to: CNavigationTree): void;
322
+ OnMount(wnd: Window): void;
323
+ SetActive(isActive: boolean, activeWindow: Window, activeBrowserView?: CGamepadBrowserView): void;
324
+ SetActiveNavTree(tree: CNavigationTree | undefined, t: boolean): void;
325
+ UnregisterGamepadNavigationTree(tree: CNavigationTree): void;
326
+ get ActiveWindow(): Window;
327
+ get FocusChangedCallbacks(): CCallbackList<[EFocusSource, CNavigationTreeNode | undefined, CNavigationTree]>;
328
+ get IsActive(): SubscribableValue<boolean>;
329
+ get RootWindow(): Window;
330
+ }
331
+ export declare class CFocusNavController {
332
+ m_ActiveContext: CFocusNavigationContext | undefined;
333
+ m_DefaultContext: CFocusNavigationContext | undefined;
334
+ m_LastActiveContext: CFocusNavigationContext;
335
+ m_UnhandledButtonEventsCallbacks: CCallbackList<[GamepadButton]>;
336
+ m_bRestoringHistory: boolean;
337
+ m_bShowDebugFocusRing: SubscribableValue<boolean>;
338
+ m_fnCatchAllGamepadInput: ((button?: GamepadButton) => boolean) | null;
339
+ m_fnGamepadEventUpdateBatcher: typeof ReactDOM.unstable_batchedUpdates;
340
+ m_navigationSource: SubscribableValue<NavigationSource>;
341
+ m_navigationSourceSupportsFocus: MappedSubscribableValue<boolean>;
342
+ m_rgAllContexts: CFocusNavigationContext[];
343
+ m_rgGamepadInputSources: CGamepadInputSource[];
344
+ BGlobalGamepadButton(button: GamepadButton): boolean;
345
+ BIsInActiveContext(context: CFocusNavigationContext | undefined): boolean;
346
+ BIsRestoringHistory(): boolean;
347
+ BatchedUpdate(callback: typeof ReactDOM.unstable_batchedUpdates): void;
348
+ BlurNavTree(tree: CNavigationTree): void;
349
+ ChangeNavigationSource(eActivationSourceType: ENavigationSourceType, nActiveGamepadIndex: number): boolean;
350
+ CreateContext(wnd: Window, bIsGamepadInputSuppressed: boolean): CFocusNavigationContext;
351
+ DestroyContext(ctx: CFocusNavigationContext): void;
352
+ DispatchVirtualButtonClick(focusSource: EFocusSource, element: Element | null): void;
353
+ DispatchVirtualGamepad(param0: 'vgp_onbuttondown' | 'vgp_onbuttonup', param1: boolean): void;
354
+ FindAnActiveContext(): CFocusNavigationContext;
355
+ FireUnhandledGamepadEventCallbacks(ev: GamepadEvent): boolean;
356
+ GetActiveContext(): CFocusNavigationContext | undefined;
357
+ GetDefaultContext(): CFocusNavigationContext;
358
+ GetEventTarget(focusSource: EFocusSource, sourceType: ENavigationSourceType, takeFocus?: boolean): [Element | null, CFocusNavigationContext];
359
+ GetShowDebugFocusRing(): SubscribableValue<boolean>;
360
+ IsActiveFocusNavTree(tree: CNavigationTree | undefined): boolean;
361
+ IsActiveNavTree(tree: CNavigationTree | undefined): boolean;
362
+ NewGamepadNavigationTree(controller: CFocusNavController, context: CFocusNavigationContext, id: string): CNavigationTree;
363
+ OnButtonActionInternal(bTakeFocus: boolean, eButton: GamepadButton, eFocusSource: EFocusSource, nActiveGamepadIndex: number, bIsRepeat: boolean, element: Element | null, ctx: CFocusNavigationContext | null, bSuppressGamepadInput: boolean): void;
364
+ OnButtonDown(eButton: GamepadButton, eFocusSource: EFocusSource, nActiveGamepadIndex: number, bIsRepeat: boolean, element: Element | null, ctx: CFocusNavigationContext | null, bSuppressGamepadInput: boolean): void;
365
+ OnButtonUp(eButton: GamepadButton, eFocusSource: EFocusSource, nActiveGamepadIndex: number, bIsRepeat: boolean, element: Element | null, ctx: CFocusNavigationContext | null, bSuppressGamepadInput: boolean): void;
366
+ OnContextActivated(ctx: CFocusNavigationContext): void;
367
+ OnContextDeactivated(ctx: CFocusNavigationContext, param1: boolean): void;
368
+ OnGamepadNavigationTreeActivated(tree: CNavigationTree, param1: boolean): void;
369
+ OnGamepadNavigationTreeFocused(tree: CNavigationTree, focusSource: EFocusSource, param2?: boolean): void;
370
+ RegisterForUnhandledButtonDownEvents(callback: (ev: GamepadEvent) => void): Unsubscribable;
371
+ RegisterGamepadNavigationTree(tree: CNavigationTree, wnd: Window): () => void;
372
+ RegisterInputSource(value: CGamepadInputSource): () => void;
373
+ RestoreHistoryTransaction(callback: () => Promise<void>): Promise<void>;
374
+ SetCatchAllGamepadInput(callback: (button?: GamepadButton) => boolean): void;
375
+ SetGamepadEventUpdateBatcher(value: typeof ReactDOM.unstable_batchedUpdates): void;
376
+ SetShowDebugFocusRing(value: boolean): void;
377
+ SetSuppressGamepadInput(value: boolean): void;
378
+ TakeFocusChangingIFrame(): void;
379
+ UpdateSourceToGamepad(param0?: boolean): void;
380
+ get NavigationSource(): SubscribableValue<NavigationSource>;
381
+ get NavigationSourceSupportsFocus(): MappedSubscribableValue<boolean>;
382
+ }
383
+ export {};
@@ -0,0 +1,29 @@
1
+ var EFlowChildrenLayout;
2
+ (function (EFlowChildrenLayout) {
3
+ EFlowChildrenLayout[EFlowChildrenLayout["NONE"] = 0] = "NONE";
4
+ EFlowChildrenLayout[EFlowChildrenLayout["COLUMN"] = 1] = "COLUMN";
5
+ EFlowChildrenLayout[EFlowChildrenLayout["ROW"] = 2] = "ROW";
6
+ EFlowChildrenLayout[EFlowChildrenLayout["COLUMN_REVERSE"] = 3] = "COLUMN_REVERSE";
7
+ EFlowChildrenLayout[EFlowChildrenLayout["ROW_REVERSE"] = 4] = "ROW_REVERSE";
8
+ EFlowChildrenLayout[EFlowChildrenLayout["GRID"] = 5] = "GRID";
9
+ EFlowChildrenLayout[EFlowChildrenLayout["GEOMETRIC"] = 6] = "GEOMETRIC";
10
+ })(EFlowChildrenLayout || (EFlowChildrenLayout = {}));
11
+ var EFocusDirection;
12
+ (function (EFocusDirection) {
13
+ EFocusDirection[EFocusDirection["INVALID"] = 0] = "INVALID";
14
+ EFocusDirection[EFocusDirection["FORWARD"] = 1] = "FORWARD";
15
+ EFocusDirection[EFocusDirection["BACKWARD"] = 2] = "BACKWARD";
16
+ })(EFocusDirection || (EFocusDirection = {}));
17
+ var EGamepadInputRepeatOnAxis;
18
+ (function (EGamepadInputRepeatOnAxis) {
19
+ EGamepadInputRepeatOnAxis[EGamepadInputRepeatOnAxis["None"] = 0] = "None";
20
+ EGamepadInputRepeatOnAxis[EGamepadInputRepeatOnAxis["Horizontal"] = 1] = "Horizontal";
21
+ EGamepadInputRepeatOnAxis[EGamepadInputRepeatOnAxis["Vertical"] = 2] = "Vertical";
22
+ })(EGamepadInputRepeatOnAxis || (EGamepadInputRepeatOnAxis = {}));
23
+ var EScrollIntoViewType;
24
+ (function (EScrollIntoViewType) {
25
+ EScrollIntoViewType[EScrollIntoViewType["Standard"] = 0] = "Standard";
26
+ EScrollIntoViewType[EScrollIntoViewType["NoTransform"] = 1] = "NoTransform";
27
+ EScrollIntoViewType[EScrollIntoViewType["NoTransformSparseContent"] = 2] = "NoTransformSparseContent";
28
+ })(EScrollIntoViewType || (EScrollIntoViewType = {}));
29
+ export {};
@@ -0,0 +1,75 @@
1
+ import type { BrowserContext, CSteamID } from '../../shared';
2
+ import type { CFriendStore } from '.';
3
+ export declare enum EClanAccountFlags {
4
+ None = 0,
5
+ TrustedPress = 1,
6
+ AllowClanImages = 2,
7
+ AllowRSSFeed = 4,
8
+ AllowPartnerEventEditor = 8
9
+ }
10
+ export declare enum EClanRelationship {
11
+ None = 0,
12
+ Blocked = 1,
13
+ Invited = 2,
14
+ Member = 3,
15
+ Kicked = 4,
16
+ KickAcknowledged = 5,
17
+ PendingApproval = 6,
18
+ RequestDenied = 7
19
+ }
20
+ export interface CClan {
21
+ m_bChatRoomPrivate: boolean | undefined;
22
+ m_bGotInitialState: boolean;
23
+ m_bInitialized: boolean;
24
+ m_bPersonaStateDesired: boolean;
25
+ m_bPersonaStateLoadRequested: boolean;
26
+ m_cChatRoomMembers: number;
27
+ m_cMemberCount: number;
28
+ m_cUsersInGame: number;
29
+ m_cUsersOnline: number;
30
+ m_eClanAccountFlags: number;
31
+ m_eClanRelationship: EClanRelationship;
32
+ m_steamid: CSteamID;
33
+ m_strAvatarHash: string;
34
+ m_strClanName: string;
35
+ m_strClanTag: string;
36
+ m_ulChatRoomGroupID: string | undefined;
37
+ m_unOGGAppID: number | undefined;
38
+ BIsInvite(): boolean;
39
+ BIsMember(): boolean;
40
+ BIsOGG(): boolean;
41
+ BMatchesSearchString(s: string): boolean;
42
+ BNeedsToLoadPersonaStateData(): boolean;
43
+ BPersonaStateDesired(): boolean;
44
+ GetChatGroupIDIfLoaded(): CClan['m_ulChatRoomGroupID'];
45
+ GetChatRoomGroupID(): Promise<CClan['m_ulChatRoomGroupID'] | null>;
46
+ GetOGGAppID(): CClan['m_unOGGAppID'];
47
+ OpenChatDialog(browser?: BrowserContext, param1?: boolean): Promise<string | null>;
48
+ get avatar_url(): string;
49
+ get avatar_url_medium(): string;
50
+ get avatar_url_full(): string;
51
+ get chat_room_private(): boolean;
52
+ get clanid(): number;
53
+ get count_chat_room_members(): number;
54
+ get member_count(): number;
55
+ get name(): string;
56
+ get steamid(): CSteamID;
57
+ get users_ingame(): number;
58
+ get users_online(): number;
59
+ }
60
+ export declare class CClanStore {
61
+ m_FriendStore: CFriendStore;
62
+ m_iIntervalLoadClanData: number | undefined;
63
+ m_mapClans: Map<number, CClan>;
64
+ EnsureInitialStateForClanInvites(): void;
65
+ GetClan(id: number): CClan;
66
+ GetOrCreateClan(steamid: number | CSteamID, eClanRelationship: EClanRelationship): CClan;
67
+ JoinClanChatRoom(browser: BrowserContext, relationship: EClanRelationship): Promise<void>;
68
+ LoadClanPersonaIfNeeded(persona: CClan): void;
69
+ LoadMissingClanPersonas(): void;
70
+ RespondToClanInvite(steamid: CSteamID, accept: boolean): Promise<boolean>;
71
+ ScheduleLoadMissingClanPersonas(): void;
72
+ SetClanChatGroupID(clanID: number, groupID: string): string;
73
+ get clan_invite_count(): number;
74
+ get clan_invites(): CClan[];
75
+ }
@@ -0,0 +1,19 @@
1
+ export var EClanAccountFlags;
2
+ (function (EClanAccountFlags) {
3
+ EClanAccountFlags[EClanAccountFlags["None"] = 0] = "None";
4
+ EClanAccountFlags[EClanAccountFlags["TrustedPress"] = 1] = "TrustedPress";
5
+ EClanAccountFlags[EClanAccountFlags["AllowClanImages"] = 2] = "AllowClanImages";
6
+ EClanAccountFlags[EClanAccountFlags["AllowRSSFeed"] = 4] = "AllowRSSFeed";
7
+ EClanAccountFlags[EClanAccountFlags["AllowPartnerEventEditor"] = 8] = "AllowPartnerEventEditor";
8
+ })(EClanAccountFlags || (EClanAccountFlags = {}));
9
+ export var EClanRelationship;
10
+ (function (EClanRelationship) {
11
+ EClanRelationship[EClanRelationship["None"] = 0] = "None";
12
+ EClanRelationship[EClanRelationship["Blocked"] = 1] = "Blocked";
13
+ EClanRelationship[EClanRelationship["Invited"] = 2] = "Invited";
14
+ EClanRelationship[EClanRelationship["Member"] = 3] = "Member";
15
+ EClanRelationship[EClanRelationship["Kicked"] = 4] = "Kicked";
16
+ EClanRelationship[EClanRelationship["KickAcknowledged"] = 5] = "KickAcknowledged";
17
+ EClanRelationship[EClanRelationship["PendingApproval"] = 6] = "PendingApproval";
18
+ EClanRelationship[EClanRelationship["RequestDenied"] = 7] = "RequestDenied";
19
+ })(EClanRelationship || (EClanRelationship = {}));