@overlayed/app 0.14.0 → 0.14.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.
- package/dist/index.d.ts +413 -523
- package/dist/index.js +1 -37
- package/dist/preload.d.ts +1 -1
- package/dist/siege.d.ts +2398 -3031
- package/package.json +8 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
import * as arktype0 from "arktype";
|
|
2
2
|
import { Module, Type } from "arktype";
|
|
3
3
|
import EventEmitter$1 from "events";
|
|
4
|
+
import "xior";
|
|
4
5
|
import * as electron0 from "electron";
|
|
5
6
|
import { BrowserWindow } from "electron";
|
|
6
7
|
import * as arktype_internal_methods_object_ts0 from "arktype/internal/methods/object.ts";
|
|
7
8
|
import { Process } from "@overlayed-gg/native-interface";
|
|
8
|
-
import {
|
|
9
|
-
AccessLevel,
|
|
10
|
-
KeyboardKeyEvent,
|
|
11
|
-
MouseButtonEvent,
|
|
12
|
-
RenderInterface,
|
|
13
|
-
RenderInterface as RenderInterface$1,
|
|
14
|
-
RenderWindow,
|
|
15
|
-
RenderWindow as RenderWindow$1,
|
|
16
|
-
RenderWindowConstructorOptions,
|
|
17
|
-
RenderWindowConstructorOptions as RenderWindowConstructorOptions$1,
|
|
18
|
-
VirtualKey,
|
|
19
|
-
WindowEvent,
|
|
20
|
-
} from "@overlayed-gg/render-interface";
|
|
9
|
+
import { AccessLevel, KeyboardKeyEvent, MouseButtonEvent, RenderInterface, RenderInterface as RenderInterface$1, RenderWindow, RenderWindow as RenderWindow$1, RenderWindowConstructorOptions, RenderWindowConstructorOptions as RenderWindowConstructorOptions$1, VirtualKey, WindowEvent } from "@overlayed-gg/render-interface";
|
|
21
10
|
|
|
22
11
|
//#region ../utils/dist/index.d.ts
|
|
23
12
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -29,72 +18,72 @@ type Result<T, E = string> = [T, undefined] | [undefined, E];
|
|
|
29
18
|
//#endregion
|
|
30
19
|
//#region src/brand.d.ts
|
|
31
20
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
21
|
+
* A `Brand` is a type that takes at minimum two type parameters. Given a base
|
|
22
|
+
* type `Base` and some unique and arbitrary branding type `Branding`, it
|
|
23
|
+
* produces a type based on but distinct from `Base`. The resulting branded
|
|
24
|
+
* type is not directly assignable from the base type, and not mutually
|
|
25
|
+
* assignable with another branded type derived from the same base type.
|
|
26
|
+
*
|
|
27
|
+
* Take care that the branding type is unique. Two branded types that share the
|
|
28
|
+
* same base type and branding type are considered the same type! There are two
|
|
29
|
+
* ways to avoid this.
|
|
30
|
+
*
|
|
31
|
+
* The first way is to supply a third type parameter, `ReservedName`, with a
|
|
32
|
+
* string literal type that is not `__type__`, which is the default.
|
|
33
|
+
*
|
|
34
|
+
* The second way is to define a branded type in terms of its surrounding
|
|
35
|
+
* interface, thereby forming a recursive type. This is possible because there
|
|
36
|
+
* are no constraints on what the branding type must be. It does not have to
|
|
37
|
+
* be a string literal type, even though it often is.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```
|
|
41
|
+
* type Path = Brand<string, 'path'>;
|
|
42
|
+
* type UserId = Brand<number, 'user'>;
|
|
43
|
+
* type DifferentUserId = Brand<number, 'user', '__kind__'>;
|
|
44
|
+
* interface Post { id: Brand<number, Post> }
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
58
47
|
type Brand<Base, Branding, ReservedName extends string = "__type__"> = Base & { [K in ReservedName]: Branding } & {
|
|
59
|
-
|
|
48
|
+
__witness__: Base;
|
|
60
49
|
};
|
|
61
50
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
* An `AnyBrand` is a branded type based on any base type branded with any
|
|
52
|
+
* branding type. By itself it is not useful, but it can act as type constraint
|
|
53
|
+
* when manipulating branded types in general.
|
|
54
|
+
*/
|
|
66
55
|
//#endregion
|
|
67
56
|
//#region ../utils-node/dist/index.d.ts
|
|
68
57
|
//#endregion
|
|
69
58
|
//#region src/asSingleton.d.ts
|
|
70
59
|
type Singleton<T extends new (...args: any[]) => any> = T & {
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
getInstance: () => InstanceType<T>;
|
|
61
|
+
clearInstance: () => void;
|
|
73
62
|
};
|
|
74
63
|
//#endregion
|
|
75
64
|
//#region src/logger.d.ts
|
|
76
65
|
interface LoggerScope {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
66
|
+
scope: (name: string) => LoggerScope;
|
|
67
|
+
error: (...args: unknown[]) => void;
|
|
68
|
+
warn: (...args: unknown[]) => void;
|
|
69
|
+
info: (...args: unknown[]) => void;
|
|
70
|
+
log: (...args: unknown[]) => void;
|
|
82
71
|
}
|
|
83
72
|
declare class LoggerClass {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
73
|
+
private fileLogger;
|
|
74
|
+
private path;
|
|
75
|
+
private appId;
|
|
76
|
+
private messageQueue;
|
|
77
|
+
fileName: string;
|
|
78
|
+
constructor(fileName: string);
|
|
79
|
+
init(appId: string): void;
|
|
80
|
+
scope(name: string): LoggerScope;
|
|
81
|
+
error(...args: unknown[]): void;
|
|
82
|
+
warn(...args: unknown[]): void;
|
|
83
|
+
info(...args: unknown[]): void;
|
|
84
|
+
debug(...args: unknown[]): void;
|
|
85
|
+
log(...args: unknown[]): void;
|
|
86
|
+
private handle;
|
|
98
87
|
}
|
|
99
88
|
declare const Logger: Singleton<typeof LoggerClass>;
|
|
100
89
|
type CustomLoggerScope = ReturnType<typeof Logger.prototype.scope>;
|
|
@@ -104,73 +93,73 @@ type CustomLoggerScope = ReturnType<typeof Logger.prototype.scope>;
|
|
|
104
93
|
//#endregion
|
|
105
94
|
//#region src/errorManager.d.ts
|
|
106
95
|
type ErrorManagerEvent = {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
96
|
+
code: string;
|
|
97
|
+
message: string;
|
|
98
|
+
data: Record<string, any>;
|
|
99
|
+
timestamp: number;
|
|
111
100
|
};
|
|
112
101
|
interface FatalElevationMismatch extends ErrorManagerEvent {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
102
|
+
code: "ELEVATION_MISMATCH";
|
|
103
|
+
data: {
|
|
104
|
+
appElevated: boolean;
|
|
105
|
+
gameElevated: boolean;
|
|
106
|
+
};
|
|
118
107
|
}
|
|
119
108
|
interface ErrorPipeServerError extends ErrorManagerEvent {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
109
|
+
code: "PIPE_SERVER_ERROR";
|
|
110
|
+
data: {
|
|
111
|
+
error: unknown;
|
|
112
|
+
};
|
|
124
113
|
}
|
|
125
114
|
interface ErrorInvalidConfigFile extends ErrorManagerEvent {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
115
|
+
code: "INVALID_CONFIG_FILE";
|
|
116
|
+
data: {
|
|
117
|
+
issues: string[];
|
|
118
|
+
filePath: string;
|
|
119
|
+
data: unknown;
|
|
120
|
+
};
|
|
132
121
|
}
|
|
133
122
|
interface WarningInvalidEvent extends ErrorManagerEvent {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
123
|
+
code: "INVALID_EVENT";
|
|
124
|
+
data: {
|
|
125
|
+
summary: string;
|
|
126
|
+
};
|
|
138
127
|
}
|
|
139
128
|
type ErrorEvents = ErrorPipeServerError | ErrorInvalidConfigFile;
|
|
140
129
|
type WarningEvents = WarningInvalidEvent;
|
|
141
130
|
type FatalEvents = FatalElevationMismatch;
|
|
142
131
|
type ErrorManagerEvents = {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
132
|
+
fatal: FatalEvents;
|
|
133
|
+
error: ErrorEvents;
|
|
134
|
+
warning: WarningEvents;
|
|
146
135
|
};
|
|
147
136
|
interface OverlayedConfig {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
137
|
+
/**
|
|
138
|
+
* Your Overlayed application ID.
|
|
139
|
+
*/
|
|
140
|
+
applicationId: string;
|
|
141
|
+
/**
|
|
142
|
+
* The bundle config for your electron app.
|
|
143
|
+
*/
|
|
144
|
+
app: BundleAppConfig;
|
|
145
|
+
/**
|
|
146
|
+
* The optional bundle config for your site.
|
|
147
|
+
*/
|
|
148
|
+
site?: BundleSiteConfig;
|
|
160
149
|
}
|
|
161
150
|
interface BundleConfigBase {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
151
|
+
/**
|
|
152
|
+
* String or array of string [glob](https://www.npmjs.com/package/glob) patterns to bundle.
|
|
153
|
+
*
|
|
154
|
+
* `package.json` is always included.
|
|
155
|
+
*/
|
|
156
|
+
include: MaybeArray<string>;
|
|
157
|
+
/**
|
|
158
|
+
* String or array of string [glob](https://www.npmjs.com/package/glob) patterns to exclude from the bundle.
|
|
159
|
+
*
|
|
160
|
+
* `/installer` is always excluded.
|
|
161
|
+
*/
|
|
162
|
+
exclude?: string | string[];
|
|
174
163
|
}
|
|
175
164
|
interface BundleAppConfig extends BundleConfigBase {}
|
|
176
165
|
interface BundleSiteConfig extends BundleConfigBase {}
|
|
@@ -180,42 +169,34 @@ declare function defineConfig(config: OverlayedConfig): OverlayedConfig;
|
|
|
180
169
|
//#endregion
|
|
181
170
|
//#region src/utils.d.ts
|
|
182
171
|
declare const BaseEvent: Type<{
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
172
|
+
game: string;
|
|
173
|
+
type: string;
|
|
174
|
+
creation_time: number;
|
|
186
175
|
}>;
|
|
187
176
|
type BaseEvent = typeof BaseEvent.infer;
|
|
188
177
|
//#endregion
|
|
189
178
|
//#region src/types.d.ts
|
|
190
179
|
type EventType<TEvent extends BaseEvent> = TEvent["type"];
|
|
191
180
|
type GameModuleEvent<TEvents extends Record<string, BaseEvent>> = TEvents & {
|
|
192
|
-
|
|
181
|
+
event: BaseEvent;
|
|
193
182
|
};
|
|
194
183
|
type GameModuleEventInfer<TModule extends GameModule> = TModule["events"]["event"]["infer"];
|
|
195
|
-
interface GameModule<
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
> {
|
|
199
|
-
key: TKey;
|
|
200
|
-
events: Module<GameModuleEvent<TEvents>>;
|
|
184
|
+
interface GameModule<TEvents extends Record<string, BaseEvent> = Record<string, BaseEvent>, TKey extends string = string> {
|
|
185
|
+
key: TKey;
|
|
186
|
+
events: Module<GameModuleEvent<TEvents>>;
|
|
201
187
|
}
|
|
202
|
-
type EventCallback<TEvent extends BaseEvent, TEventType extends EventType<TEvent>> = (
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
{
|
|
206
|
-
type: TEventType;
|
|
207
|
-
}
|
|
208
|
-
>,
|
|
209
|
-
) => void;
|
|
188
|
+
type EventCallback<TEvent extends BaseEvent, TEventType extends EventType<TEvent>> = (event: Extract<TEvent, {
|
|
189
|
+
type: TEventType;
|
|
190
|
+
}>) => void;
|
|
210
191
|
//#endregion
|
|
211
192
|
//#region src/managers/manager.d.ts
|
|
212
193
|
/** This should be kept in sync with EventEmitterManager */
|
|
213
194
|
declare class Manager {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
195
|
+
protected logger: CustomLoggerScope;
|
|
196
|
+
initialized: boolean;
|
|
197
|
+
constructor(name: string);
|
|
198
|
+
init(): void;
|
|
199
|
+
destroy(): void;
|
|
219
200
|
}
|
|
220
201
|
/** This should be kept in sync with Manager */
|
|
221
202
|
//#endregion
|
|
@@ -224,57 +205,66 @@ type KeybindPressedCallback = () => string | void;
|
|
|
224
205
|
type KeybindDownCallback = () => string | void;
|
|
225
206
|
type KeybindUpCallback = () => void;
|
|
226
207
|
type KeybindCallbacks = {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
208
|
+
toggle?: KeybindPressedCallback;
|
|
209
|
+
down?: KeybindDownCallback;
|
|
210
|
+
up?: KeybindUpCallback;
|
|
230
211
|
};
|
|
231
|
-
declare const KeybindSchema: arktype_internal_methods_object_ts0.ObjectType<
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
},
|
|
238
|
-
{}
|
|
239
|
-
>;
|
|
212
|
+
declare const KeybindSchema: arktype_internal_methods_object_ts0.ObjectType<{
|
|
213
|
+
[x: string]: {
|
|
214
|
+
keys: string[];
|
|
215
|
+
mode: (In: "toggle" | "hold") => arktype0.Out<"toggle" | "hold">;
|
|
216
|
+
};
|
|
217
|
+
}, {}>;
|
|
240
218
|
type KeybindSchemaEntry = (typeof KeybindSchema.infer)[string];
|
|
241
219
|
//#endregion
|
|
242
220
|
//#region ../api/dist/index.d.ts
|
|
243
221
|
//#endregion
|
|
244
222
|
//#region src/endpoints/raven/games.d.ts
|
|
245
223
|
interface GameModel {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
224
|
+
name: string;
|
|
225
|
+
identifier: Brand<string, GameModel>;
|
|
226
|
+
modules: string[];
|
|
227
|
+
executables: string[];
|
|
250
228
|
}
|
|
251
229
|
//#endregion
|
|
252
230
|
//#region src/instances.d.ts
|
|
253
231
|
declare function setUpdaterTokenResolver(newTokenResolver: () => string | undefined): void;
|
|
254
232
|
//#endregion
|
|
255
|
-
//#endregion
|
|
256
233
|
//#region src/managers/gameLaunchManager.d.ts
|
|
257
234
|
type GameLaunchManagerEvents = {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
235
|
+
gameCloseInternal: (args: {
|
|
236
|
+
ravenGame: GameModel;
|
|
237
|
+
process: Process;
|
|
238
|
+
}) => MaybePromise<void>;
|
|
239
|
+
gameLaunch: (args: {
|
|
240
|
+
game: string;
|
|
241
|
+
reject: () => void;
|
|
242
|
+
}) => MaybePromise<boolean>;
|
|
243
|
+
gameClose: (args: {
|
|
244
|
+
game: string;
|
|
245
|
+
}) => MaybePromise<void>;
|
|
246
|
+
gameReady: (args: {
|
|
247
|
+
game: string;
|
|
248
|
+
}) => MaybePromise<void>;
|
|
249
|
+
gameReadyInternal: (args: {
|
|
250
|
+
ravenGame: GameModel;
|
|
251
|
+
process: Process;
|
|
252
|
+
}) => MaybePromise<void>;
|
|
263
253
|
};
|
|
264
254
|
//#endregion
|
|
265
255
|
//#region src/utilities/publicTypes.d.ts
|
|
266
256
|
type ActiveGameInfo = {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
257
|
+
isConnected: boolean;
|
|
258
|
+
resolution: {
|
|
259
|
+
width: number;
|
|
260
|
+
height: number;
|
|
261
|
+
};
|
|
272
262
|
};
|
|
273
263
|
interface OverridesManagerScope {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
264
|
+
setGlobalCursorOverride: (override: boolean) => void;
|
|
265
|
+
setGlobalMouseBlock: (block: boolean) => void;
|
|
266
|
+
setGlobalKeyboardBlock: (block: boolean) => void;
|
|
267
|
+
setKeyInputBlock: (key: number, block: boolean) => void;
|
|
278
268
|
}
|
|
279
269
|
//#endregion
|
|
280
270
|
//#region ../native-managers/dist/index.d.ts
|
|
@@ -283,390 +273,290 @@ type RenderInterfaceName = "OGG_SIEGE";
|
|
|
283
273
|
//#endregion
|
|
284
274
|
//#region src/managers/overridesManager.d.ts
|
|
285
275
|
declare class OverridesManager extends Manager {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
276
|
+
private renderInterface;
|
|
277
|
+
private globalCursorOverrideCount;
|
|
278
|
+
private globalMouseBlockCount;
|
|
279
|
+
private globalKeyboardBlockCount;
|
|
280
|
+
private keyInputBlocks;
|
|
281
|
+
constructor(interfaceName: RenderInterfaceName);
|
|
282
|
+
scope(scopeName: string): OverridesManagerScope;
|
|
283
|
+
private setGlobalCursorOverride;
|
|
284
|
+
private setGlobalMouseBlock;
|
|
285
|
+
private setGlobalKeyboardBlock;
|
|
286
|
+
private setKeyInputBlock;
|
|
297
287
|
}
|
|
298
288
|
//#endregion
|
|
299
289
|
//#region src/utilities/types.d.ts
|
|
300
|
-
type OverlayedAppGameModules<TModule extends GameModule> = {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
TModule,
|
|
315
|
-
{
|
|
316
|
-
key: TKey;
|
|
317
|
-
}
|
|
318
|
-
>["events"]["event"]["infer"],
|
|
319
|
-
TEventType extends EventType<TEvent> = EventType<TEvent>,
|
|
320
|
-
>(
|
|
321
|
-
event: TEventType,
|
|
322
|
-
cb: EventCallback<TEvent, TEventType>,
|
|
323
|
-
): void;
|
|
324
|
-
offAny<
|
|
325
|
-
TEvent extends Extract<
|
|
326
|
-
TModule,
|
|
327
|
-
{
|
|
328
|
-
key: TKey;
|
|
329
|
-
}
|
|
330
|
-
>["events"]["event"]["infer"],
|
|
331
|
-
>(
|
|
332
|
-
cb: (data: TEvent) => void,
|
|
333
|
-
): void;
|
|
334
|
-
off<
|
|
335
|
-
TEvent extends GameModuleEventInfer<
|
|
336
|
-
Extract<
|
|
337
|
-
TModule,
|
|
338
|
-
{
|
|
339
|
-
key: TKey;
|
|
340
|
-
}
|
|
341
|
-
>
|
|
342
|
-
>,
|
|
343
|
-
TEventType extends EventType<TEvent> = EventType<TEvent>,
|
|
344
|
-
>(
|
|
345
|
-
event: TEventType,
|
|
346
|
-
cb: EventCallback<TEvent, TEventType>,
|
|
347
|
-
): void;
|
|
348
|
-
};
|
|
349
|
-
};
|
|
290
|
+
type OverlayedAppGameModules<TModule extends GameModule> = { [TKey in TModule["key"]]: {
|
|
291
|
+
onAny<TEvent extends Extract<TModule, {
|
|
292
|
+
key: TKey;
|
|
293
|
+
}>["events"]["event"]["infer"]>(cb: (data: TEvent) => void): void;
|
|
294
|
+
on<TEvent extends Extract<TModule, {
|
|
295
|
+
key: TKey;
|
|
296
|
+
}>["events"]["event"]["infer"], TEventType extends EventType<TEvent> = EventType<TEvent>>(event: TEventType, cb: EventCallback<TEvent, TEventType>): void;
|
|
297
|
+
offAny<TEvent extends Extract<TModule, {
|
|
298
|
+
key: TKey;
|
|
299
|
+
}>["events"]["event"]["infer"]>(cb: (data: TEvent) => void): void;
|
|
300
|
+
off<TEvent extends GameModuleEventInfer<Extract<TModule, {
|
|
301
|
+
key: TKey;
|
|
302
|
+
}>>, TEventType extends EventType<TEvent> = EventType<TEvent>>(event: TEventType, cb: EventCallback<TEvent, TEventType>): void;
|
|
303
|
+
} };
|
|
350
304
|
type OverlayedAppHandlersMapping = {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
305
|
+
error: (data: ErrorManagerEvents["error"]) => void;
|
|
306
|
+
warning: (data: ErrorManagerEvents["warning"]) => void;
|
|
307
|
+
fatal: (data: ErrorManagerEvents["fatal"]) => void;
|
|
308
|
+
gameLaunch: GameLaunchManagerEvents["gameLaunch"];
|
|
309
|
+
gameClose: GameLaunchManagerEvents["gameClose"];
|
|
310
|
+
gameReady: GameLaunchManagerEvents["gameReady"];
|
|
357
311
|
};
|
|
358
312
|
type OverlayedAppHandlers = {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
cb: OverlayedAppHandlersMapping[TEvent],
|
|
362
|
-
) => void;
|
|
363
|
-
off: <TEvent extends keyof OverlayedAppHandlersMapping = keyof OverlayedAppHandlersMapping>(
|
|
364
|
-
event: TEvent,
|
|
365
|
-
cb: OverlayedAppHandlersMapping[TEvent],
|
|
366
|
-
) => void;
|
|
313
|
+
on: <TEvent extends keyof OverlayedAppHandlersMapping = keyof OverlayedAppHandlersMapping>(event: TEvent, cb: OverlayedAppHandlersMapping[TEvent]) => void;
|
|
314
|
+
off: <TEvent extends keyof OverlayedAppHandlersMapping = keyof OverlayedAppHandlersMapping>(event: TEvent, cb: OverlayedAppHandlersMapping[TEvent]) => void;
|
|
367
315
|
};
|
|
368
316
|
type OverlayedAppKeybindsConfigMode = "toggle" | "hold";
|
|
369
|
-
type OverlayedAppKeybindsConfigKey =
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* Update a single keybind.
|
|
414
|
-
*
|
|
415
|
-
* @param keybind The keybind to update.
|
|
416
|
-
* @param keybindConfig The new keybind config.
|
|
417
|
-
*/
|
|
418
|
-
updateKeybind: (keybind: TKeybind, keybindConfig: OverlayedAppKeybindsConfig<TKeybind>[TKeybind]) => void;
|
|
419
|
-
/**
|
|
420
|
-
* Bulk update keybinds.
|
|
421
|
-
*
|
|
422
|
-
* @param keybinds The keybinds to update. Keybind keys not provided will not be updated.
|
|
423
|
-
*/
|
|
424
|
-
updateKeybinds: (keybinds: Partial<OverlayedAppKeybindsConfig<TKeybind>>) => void;
|
|
317
|
+
type OverlayedAppKeybindsConfigKey = "ControlLeft" | "AltLeft" | "ShiftLeft" | "AltRight" | "ControlRight" | "ShiftRight" | (string & {});
|
|
318
|
+
type OverlayedAppKeybindsConfig<TKeybind extends string> = Record<TKeybind, {
|
|
319
|
+
/**
|
|
320
|
+
* - An array of [KeyboardEvent#code](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)
|
|
321
|
+
* - Whatever you configure will be the default value
|
|
322
|
+
* - [Here](https://www.toptal.com/developers/keycode) is a good tool to easily find the codes for a given hotkey
|
|
323
|
+
*/
|
|
324
|
+
keys: OverlayedAppKeybindsConfigKey[];
|
|
325
|
+
/**
|
|
326
|
+
* - `toggle` will trigger the callback when the key is toggled on and off
|
|
327
|
+
* - `hold` will trigger the callback when the key is held down
|
|
328
|
+
* - This can be updated at runtime
|
|
329
|
+
*/
|
|
330
|
+
mode: OverlayedAppKeybindsConfigMode;
|
|
331
|
+
}>;
|
|
332
|
+
type OverlayedAppKeybindModule<TKeybind extends string> = Record<TKeybind, {
|
|
333
|
+
on: <TEvent extends "down" | "up" | "toggle">(event: TEvent, cb: KeybindCallbacks[TEvent]) => void;
|
|
334
|
+
}> & {
|
|
335
|
+
/**
|
|
336
|
+
* Get the current user keybinds.
|
|
337
|
+
*/
|
|
338
|
+
getConfig: () => OverlayedAppKeybindsConfig<TKeybind>;
|
|
339
|
+
/**
|
|
340
|
+
* Pause keybind listening. Essential for pausing keybind listening when recording new keybinds.
|
|
341
|
+
*/
|
|
342
|
+
pauseKeybindListening: () => void;
|
|
343
|
+
/**
|
|
344
|
+
* Resume keybind listening. Essential for resuming keybind listening after recording new keybinds.
|
|
345
|
+
*/
|
|
346
|
+
resumeKeybindListening: () => void;
|
|
347
|
+
/**
|
|
348
|
+
* Update a single keybind.
|
|
349
|
+
*
|
|
350
|
+
* @param keybind The keybind to update.
|
|
351
|
+
* @param keybindConfig The new keybind config.
|
|
352
|
+
*/
|
|
353
|
+
updateKeybind: (keybind: TKeybind, keybindConfig: OverlayedAppKeybindsConfig<TKeybind>[TKeybind]) => void;
|
|
354
|
+
/**
|
|
355
|
+
* Bulk update keybinds.
|
|
356
|
+
*
|
|
357
|
+
* @param keybinds The keybinds to update. Keybind keys not provided will not be updated.
|
|
358
|
+
*/
|
|
359
|
+
updateKeybinds: (keybinds: Partial<OverlayedAppKeybindsConfig<TKeybind>>) => void;
|
|
425
360
|
};
|
|
426
|
-
interface OverlayedAppWindowsModule
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
| "on"
|
|
430
|
-
| "off"
|
|
431
|
-
| "once"
|
|
432
|
-
| "addListener"
|
|
433
|
-
| "prependListener"
|
|
434
|
-
| "prependOnceListener"
|
|
435
|
-
| "removeListener"
|
|
436
|
-
| "removeAllListeners"
|
|
437
|
-
> {
|
|
438
|
-
createWindow(options: RenderWindowConstructorOptions$1): RenderWindow$1;
|
|
439
|
-
getActiveGameInfo: () => ActiveGameInfo;
|
|
361
|
+
interface OverlayedAppWindowsModule extends Pick<RenderInterface$1, "on" | "off" | "once" | "addListener" | "prependListener" | "prependOnceListener" | "removeListener" | "removeAllListeners"> {
|
|
362
|
+
createWindow(options: RenderWindowConstructorOptions$1): RenderWindow$1;
|
|
363
|
+
getActiveGameInfo: () => ActiveGameInfo;
|
|
440
364
|
}
|
|
441
365
|
type OverlayedAppInputModuleRaw = {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
366
|
+
/**
|
|
367
|
+
* Block the game from receiving mouse input.
|
|
368
|
+
*
|
|
369
|
+
* @param block Whether to block mouse input.
|
|
370
|
+
*/
|
|
371
|
+
setGlobalMouseBlock(block: boolean): void;
|
|
372
|
+
/**
|
|
373
|
+
* Block the game from receiving keyboard input.
|
|
374
|
+
*
|
|
375
|
+
* @param block Whether to block keyboard input.
|
|
376
|
+
*/
|
|
377
|
+
setGlobalKeyboardBlock(block: boolean): void;
|
|
378
|
+
/**
|
|
379
|
+
* Show or hide the cursor.
|
|
380
|
+
*
|
|
381
|
+
* @param show Whether to show or hide the cursor.
|
|
382
|
+
*/
|
|
383
|
+
setGlobalCursorOverride(show: boolean): void;
|
|
384
|
+
/**
|
|
385
|
+
* Block the game from receiving input for a specific key.
|
|
386
|
+
*
|
|
387
|
+
* @param key The key to block input for.
|
|
388
|
+
* @param block Whether to block input for the key.
|
|
389
|
+
*/
|
|
390
|
+
setKeyInputBlock(key: VirtualKey, block: boolean): void;
|
|
391
|
+
/**
|
|
392
|
+
* Get the current state of the global mouse block.
|
|
393
|
+
*/
|
|
394
|
+
getGlobalMouseBlock(): boolean;
|
|
395
|
+
/**
|
|
396
|
+
* Get the current state of the global keyboard block.
|
|
397
|
+
*/
|
|
398
|
+
getGlobalKeyboardBlock(): boolean;
|
|
399
|
+
/**
|
|
400
|
+
* Get the current state of the global cursor override.
|
|
401
|
+
*/
|
|
402
|
+
getGlobalCursorOverride(): boolean;
|
|
403
|
+
/**
|
|
404
|
+
* Get the current state of the key input block for a specific key.
|
|
405
|
+
* @param key The key to block input for.
|
|
406
|
+
*/
|
|
407
|
+
getKeyInputBlock(key: VirtualKey): boolean;
|
|
484
408
|
};
|
|
485
409
|
interface OverlayedAppInputModule {
|
|
486
|
-
|
|
487
|
-
|
|
410
|
+
scope: (scopeName: string) => ReturnType<OverridesManager["scope"]>;
|
|
411
|
+
raw: OverlayedAppInputModuleRaw;
|
|
488
412
|
}
|
|
489
413
|
interface CortexEvents {}
|
|
490
414
|
interface OverlayedAppCortexModule {
|
|
491
|
-
|
|
415
|
+
track: <TEventName extends keyof CortexEvents>(name: TEventName, data: CortexEvents[TEventName]) => void;
|
|
492
416
|
}
|
|
493
417
|
interface OverlayedAppAdsModule {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
};
|
|
500
|
-
},
|
|
501
|
-
): void;
|
|
418
|
+
registerWindow(window: BrowserWindow, options?: {
|
|
419
|
+
linkHandler?: {
|
|
420
|
+
allowHosts?: string[];
|
|
421
|
+
};
|
|
422
|
+
}): void;
|
|
502
423
|
}
|
|
503
424
|
interface OverlayedAppLoggingModuleInfo extends Record<string, string | undefined> {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
425
|
+
email?: string;
|
|
426
|
+
username?: string;
|
|
427
|
+
message?: string;
|
|
428
|
+
category?: string;
|
|
429
|
+
version?: string;
|
|
509
430
|
}
|
|
510
431
|
interface OverlayedAppLoggingModuleSubmitBugReportOptions {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
432
|
+
/**
|
|
433
|
+
* A key value record of additional files to include in the bug report.
|
|
434
|
+
*
|
|
435
|
+
* The key is the name of the file, and the value is the content of the file.
|
|
436
|
+
*/
|
|
437
|
+
additionalFiles?: Record<string, string>;
|
|
517
438
|
}
|
|
518
439
|
interface OverlayedAppLoggingModule {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
Result<
|
|
548
|
-
true,
|
|
549
|
-
{
|
|
550
|
-
message: string;
|
|
551
|
-
error: unknown;
|
|
552
|
-
}
|
|
553
|
-
>
|
|
554
|
-
>;
|
|
440
|
+
/**
|
|
441
|
+
* Returns a scoped logging instance. Each message will be prefixed with the scope name.
|
|
442
|
+
*
|
|
443
|
+
* ```ts
|
|
444
|
+
* const scope = overlayed.log.scope("MyScope");
|
|
445
|
+
* scope.info("Hello, world!");
|
|
446
|
+
* // [2025-07-20 01:51:40.969] [log] [MyScope] Hello, world!
|
|
447
|
+
* ```
|
|
448
|
+
*
|
|
449
|
+
* @param scopeName - The name of the scope.
|
|
450
|
+
* @returns The logger scope.
|
|
451
|
+
*/
|
|
452
|
+
scope: (scopeName: string) => LoggerScope;
|
|
453
|
+
info: (message: string) => void;
|
|
454
|
+
warn: (message: string) => void;
|
|
455
|
+
error: (message: string) => void;
|
|
456
|
+
/**
|
|
457
|
+
* Submits info you provide, app logs, overlayed logs, and any additional files you provide to be viewed
|
|
458
|
+
* in your Overlayed dashboard.
|
|
459
|
+
*
|
|
460
|
+
* @param info - The information to include in the bug report.
|
|
461
|
+
* @param options - The options to include in the bug report.
|
|
462
|
+
* @returns The bug report id.
|
|
463
|
+
*/
|
|
464
|
+
submitBugReport: (info: OverlayedAppLoggingModuleInfo, options?: OverlayedAppLoggingModuleSubmitBugReportOptions) => Promise<Result<true, {
|
|
465
|
+
message: string;
|
|
466
|
+
error: unknown;
|
|
467
|
+
}>>;
|
|
555
468
|
}
|
|
556
|
-
type OverlayedApp<TModule extends GameModule, TKeybind extends string> = OverlayedAppGameModules<TModule> &
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
};
|
|
469
|
+
type OverlayedApp<TModule extends GameModule, TKeybind extends string> = OverlayedAppGameModules<TModule> & OverlayedAppHandlers & {
|
|
470
|
+
keybinds: OverlayedAppKeybindModule<TKeybind>;
|
|
471
|
+
windows: OverlayedAppWindowsModule;
|
|
472
|
+
input: OverlayedAppInputModule;
|
|
473
|
+
ads: OverlayedAppAdsModule;
|
|
474
|
+
cortex: OverlayedAppCortexModule;
|
|
475
|
+
log: OverlayedAppLoggingModule;
|
|
476
|
+
/**
|
|
477
|
+
* Returns true if any monitored processes are running.
|
|
478
|
+
*
|
|
479
|
+
* Useful for stopping the overlay from updating when the game is running.
|
|
480
|
+
*/
|
|
481
|
+
hasAnyActiveProcesses: () => boolean;
|
|
482
|
+
/**
|
|
483
|
+
* Initializes the overlayed app.
|
|
484
|
+
*
|
|
485
|
+
* This should only be called once, and is automatically called by default, unless `init: false` is passed:
|
|
486
|
+
* ```ts
|
|
487
|
+
* overlayed({
|
|
488
|
+
* init: false,
|
|
489
|
+
* });
|
|
490
|
+
* ```
|
|
491
|
+
*/
|
|
492
|
+
init: () => void;
|
|
493
|
+
/**
|
|
494
|
+
* Returns true if the overlayed app has been initialized.
|
|
495
|
+
*/
|
|
496
|
+
initialized: boolean;
|
|
497
|
+
};
|
|
586
498
|
interface OverlayedOptions<TModule extends GameModule, TKeybind extends string> {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
499
|
+
/**
|
|
500
|
+
* The electron instance.
|
|
501
|
+
*
|
|
502
|
+
* Must be imported globally like:
|
|
503
|
+
* ```ts
|
|
504
|
+
* import { electron } from "electron";
|
|
505
|
+
* ```
|
|
506
|
+
* or
|
|
507
|
+
* ```ts
|
|
508
|
+
* const electron = require("electron");
|
|
509
|
+
* ```
|
|
510
|
+
*/
|
|
511
|
+
electron: typeof electron0;
|
|
512
|
+
/**
|
|
513
|
+
* The application id, this can be found in the [Overlayed Dashboard](https://dashboard.overlayed.gg/settings/applications).
|
|
514
|
+
*/
|
|
515
|
+
applicationId: string;
|
|
516
|
+
/**
|
|
517
|
+
* App modules to load.
|
|
518
|
+
*/
|
|
519
|
+
modules: TModule[];
|
|
520
|
+
/**
|
|
521
|
+
* App keybinds config.
|
|
522
|
+
*/
|
|
523
|
+
keybinds: OverlayedAppKeybindsConfig<TKeybind>;
|
|
524
|
+
/**
|
|
525
|
+
* Whether to initialize the app when the module is loaded.
|
|
526
|
+
* @default true;
|
|
527
|
+
*/
|
|
528
|
+
init?: boolean;
|
|
529
|
+
/**
|
|
530
|
+
* When true, the overlay will be loaded for all supported games.
|
|
531
|
+
* When false, only games registered under the `modules` array will be loaded.
|
|
532
|
+
*
|
|
533
|
+
* @default false
|
|
534
|
+
*/
|
|
535
|
+
universal?: boolean;
|
|
536
|
+
/**
|
|
537
|
+
* @deprecated
|
|
538
|
+
*/
|
|
539
|
+
channel?: string;
|
|
540
|
+
/**
|
|
541
|
+
* The version of the app.
|
|
542
|
+
*
|
|
543
|
+
* @deprecated
|
|
544
|
+
*/
|
|
545
|
+
version?: string;
|
|
634
546
|
}
|
|
635
547
|
//#endregion
|
|
636
548
|
//#region src/utilities/overlayed.d.ts
|
|
637
|
-
declare function overlayed<TModule extends GameModule, TShortcut extends string>(
|
|
638
|
-
options: OverlayedOptions<TModule, TShortcut>,
|
|
639
|
-
): OverlayedApp<TModule, TShortcut>;
|
|
549
|
+
declare function overlayed<TModule extends GameModule, TShortcut extends string>(options: OverlayedOptions<TModule, TShortcut>): OverlayedApp<TModule, TShortcut>;
|
|
640
550
|
//#endregion
|
|
641
551
|
//#region src/managers/nativeModuleManager.d.ts
|
|
642
552
|
declare function setFetchLatestTokenCallback(newFetchLatestToken: () => Promise<unknown> | undefined): void;
|
|
643
553
|
//#endregion
|
|
644
|
-
export {
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
type OverlayedApp,
|
|
654
|
-
type OverlayedConfig,
|
|
655
|
-
OverridesManagerScope,
|
|
656
|
-
type RenderInterface,
|
|
657
|
-
type RenderWindow,
|
|
658
|
-
type RenderWindowConstructorOptions,
|
|
659
|
-
type VirtualKey,
|
|
660
|
-
type WindowEvent,
|
|
661
|
-
defineConfig,
|
|
662
|
-
overlayed,
|
|
663
|
-
setFetchLatestTokenCallback,
|
|
664
|
-
setUpdaterTokenResolver,
|
|
665
|
-
};
|
|
666
|
-
declare global {
|
|
667
|
-
namespace Electron {
|
|
668
|
-
interface BrowserWindow {
|
|
669
|
-
isShown(): boolean;
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
}
|
|
554
|
+
export { type AccessLevel, ActiveGameInfo, type BundleAppConfig, type BundleSiteConfig, type GameLaunchManagerEvents, type KeybindSchemaEntry as KeybindConfig, type KeyboardKeyEvent, type MouseButtonEvent, type OverlayedApp, type OverlayedConfig, OverridesManagerScope, type RenderInterface, type RenderWindow, type RenderWindowConstructorOptions, type VirtualKey, type WindowEvent, defineConfig, overlayed, setFetchLatestTokenCallback, setUpdaterTokenResolver };
|
|
555
|
+
declare global {
|
|
556
|
+
namespace Electron {
|
|
557
|
+
interface BrowserWindow {
|
|
558
|
+
isShown(): boolean;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|