@overlayed/app 1.8.0 → 2.0.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.
- package/dist/index.d.mts +63 -9
- package/dist/index.mjs +10 -10
- package/dist/native-interface/build/overlayed_injector_x64.exe +0 -0
- package/dist/native-interface/build/overlayed_injector_x86.exe +0 -0
- package/dist/native-interface/build/overlayed_native_interface_x64.node +0 -0
- package/dist/native-interface/dist/types.d.mts +2 -0
- package/dist/native-interface/dist/types.d.mts.map +1 -1
- package/dist/siege.d.ts +52 -52
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -322,7 +322,9 @@ interface FeatureFlagModel {
|
|
|
322
322
|
interface GameModel {
|
|
323
323
|
name: string;
|
|
324
324
|
identifier: Brand<string, GameModel>;
|
|
325
|
+
/** @deprecated Use `game_module`. Holds the same value as a 0-or-1 element list */
|
|
325
326
|
modules: string[];
|
|
327
|
+
game_module?: string;
|
|
326
328
|
executables: string[];
|
|
327
329
|
allow_dll_injections: boolean;
|
|
328
330
|
has_render_support: boolean;
|
|
@@ -400,6 +402,14 @@ declare function module(): {
|
|
|
400
402
|
readonly key: "universal";
|
|
401
403
|
readonly events: import("arktype").Module<{
|
|
402
404
|
event: {
|
|
405
|
+
game: "sand" | "siege" | "tft";
|
|
406
|
+
type: "module_loaded";
|
|
407
|
+
creationTime: number;
|
|
408
|
+
content: {
|
|
409
|
+
gameVersion: string;
|
|
410
|
+
processHash: string;
|
|
411
|
+
};
|
|
412
|
+
} | {
|
|
403
413
|
game: "sand";
|
|
404
414
|
type: "logged_in";
|
|
405
415
|
creationTime: number;
|
|
@@ -416,14 +426,6 @@ declare function module(): {
|
|
|
416
426
|
content: {
|
|
417
427
|
accountId: string;
|
|
418
428
|
};
|
|
419
|
-
} | {
|
|
420
|
-
game: "sand" | "siege" | "tft";
|
|
421
|
-
type: "module_loaded";
|
|
422
|
-
creationTime: number;
|
|
423
|
-
content: {
|
|
424
|
-
gameVersion: string;
|
|
425
|
-
processHash: string;
|
|
426
|
-
};
|
|
427
429
|
} | {
|
|
428
430
|
game: "sand" | "siege" | "tft";
|
|
429
431
|
type: "module_unloaded";
|
|
@@ -1106,6 +1108,53 @@ type OverlayedApp<TModule extends GameModule, TKeybind extends string, TFeatureF
|
|
|
1106
1108
|
*/
|
|
1107
1109
|
initialized: boolean;
|
|
1108
1110
|
};
|
|
1111
|
+
/**
|
|
1112
|
+
* What the navigation guard should do with a `window.open` / `target="_blank"`
|
|
1113
|
+
* request:
|
|
1114
|
+
*
|
|
1115
|
+
* - `"allow"` — open the window in-app, like a regular Electron child window.
|
|
1116
|
+
* - `"external"` — deny the in-app window and open the URL in the system
|
|
1117
|
+
* browser instead, without requiring user activation. Only honored for
|
|
1118
|
+
* `http`/`https` URLs.
|
|
1119
|
+
* - `"deny"` — deny the window without opening anything.
|
|
1120
|
+
*/
|
|
1121
|
+
type WindowOpenAction = "allow" | "external" | "deny";
|
|
1122
|
+
interface OverlayedNavigationGuardOptions {
|
|
1123
|
+
/**
|
|
1124
|
+
* Hosts the main frame is allowed to navigate to, in addition to the
|
|
1125
|
+
* application's own origin and the origin currently loaded in the window.
|
|
1126
|
+
* Useful for legitimate top-frame cross-origin flows such as OAuth
|
|
1127
|
+
* redirects.
|
|
1128
|
+
*
|
|
1129
|
+
* Matched against `URL.host` (hostname + port), e.g. `"auth.ubisoft.com"`.
|
|
1130
|
+
*
|
|
1131
|
+
* @default []
|
|
1132
|
+
*/
|
|
1133
|
+
allowedHosts?: string[];
|
|
1134
|
+
/**
|
|
1135
|
+
* Overrides the default `window.open` policy for a specific URL. Return a
|
|
1136
|
+
* {@link WindowOpenAction} to decide what happens, or `undefined` to fall
|
|
1137
|
+
* back to the default policy (allowed origins open in-app, other web URLs
|
|
1138
|
+
* open in the system browser if the user just clicked or pressed a key,
|
|
1139
|
+
* everything else is denied).
|
|
1140
|
+
*
|
|
1141
|
+
* ```ts
|
|
1142
|
+
* overlayed({
|
|
1143
|
+
* navigationGuard: {
|
|
1144
|
+
* windowOpenHandler: ({ url }) => {
|
|
1145
|
+
* if (new URL(url).host === "checkout.stripe.com") {
|
|
1146
|
+
* return "allow";
|
|
1147
|
+
* }
|
|
1148
|
+
* return undefined;
|
|
1149
|
+
* },
|
|
1150
|
+
* },
|
|
1151
|
+
* });
|
|
1152
|
+
* ```
|
|
1153
|
+
*/
|
|
1154
|
+
windowOpenHandler?: (details: {
|
|
1155
|
+
url: string;
|
|
1156
|
+
}) => WindowOpenAction | undefined;
|
|
1157
|
+
}
|
|
1109
1158
|
interface OverlayedOptions<TModule extends GameModule, TKeybind extends string, TFeatureFlag extends string = string> {
|
|
1110
1159
|
/**
|
|
1111
1160
|
* The electron instance.
|
|
@@ -1170,6 +1219,11 @@ interface OverlayedOptions<TModule extends GameModule, TKeybind extends string,
|
|
|
1170
1219
|
* ```
|
|
1171
1220
|
*/
|
|
1172
1221
|
featureFlags?: Record<TFeatureFlag, boolean>;
|
|
1222
|
+
/**
|
|
1223
|
+
* Configuration for the navigation guard applied to every window created via
|
|
1224
|
+
* `overlay.windows`. See {@link OverlayedNavigationGuardOptions}.
|
|
1225
|
+
*/
|
|
1226
|
+
navigationGuard?: OverlayedNavigationGuardOptions;
|
|
1173
1227
|
/**
|
|
1174
1228
|
* Site module configuration.
|
|
1175
1229
|
*/
|
|
@@ -1189,4 +1243,4 @@ interface OverlayedOptions<TModule extends GameModule, TKeybind extends string,
|
|
|
1189
1243
|
//#region src/utilities/overlayed.d.ts
|
|
1190
1244
|
declare function overlayed<TModule extends GameModule, TShortcut extends string, TFeatureFlag extends string = string>(optionsRaw: OverlayedOptions<TModule, TShortcut, TFeatureFlag>): OverlayedApp<TModule, TShortcut, TFeatureFlag>;
|
|
1191
1245
|
//#endregion
|
|
1192
|
-
export { type ActiveGameInfo, type BundleAppConfig, type BundleSiteConfig, type ErrorEvents, type FatalEvents, type FeatureFlagLayers, type FeatureFlagModel, type FeedbackId, type FeedbackType, type GameCloseEvent, type GameLaunchEvent, type GameReadyEvent, type KeybindSchemaEntry as KeybindConfig, type KeyboardKeyEvent, type LoggerScope, type MouseButtonEvent, type NoticeId, type NoticeModel, type NoticeType, type OverlayedApp, type OverlayedConfig, type OverridesManagerScope, type ProgressInfo, RenderInterface, type RenderWindow, type RenderWindowConstructorOptions, type UpdateCheckResult, VirtualKey, type WarningEvents, type WindowEvent, defineConfig, overlayed };
|
|
1246
|
+
export { type ActiveGameInfo, type BundleAppConfig, type BundleSiteConfig, type ErrorEvents, type FatalEvents, type FeatureFlagLayers, type FeatureFlagModel, type FeedbackId, type FeedbackType, type GameCloseEvent, type GameLaunchEvent, type GameReadyEvent, type KeybindSchemaEntry as KeybindConfig, type KeyboardKeyEvent, type LoggerScope, type MouseButtonEvent, type NoticeId, type NoticeModel, type NoticeType, type OverlayedApp, type OverlayedConfig, type OverlayedNavigationGuardOptions, type OverridesManagerScope, type ProgressInfo, RenderInterface, type RenderWindow, type RenderWindowConstructorOptions, type UpdateCheckResult, VirtualKey, type WarningEvents, type WindowEvent, type WindowOpenAction, defineConfig, overlayed };
|