stratum-rs-overlay 1.0.2 → 1.0.4
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 +30 -2
- package/dist/index.js +5 -3
- package/dist/index.win32-x64-msvc.node +0 -0
- package/package.json +2 -3
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,34 @@
|
|
|
3
3
|
|
|
4
4
|
/* auto-generated by NAPI-RS */
|
|
5
5
|
|
|
6
|
-
export
|
|
6
|
+
export const enum Mode {
|
|
7
|
+
Exact = 'exact',
|
|
8
|
+
Contains = 'contains'
|
|
9
|
+
}
|
|
10
|
+
export interface TargetConfig {
|
|
11
|
+
name: string
|
|
12
|
+
mode: Mode
|
|
13
|
+
}
|
|
14
|
+
export interface OverlayEvent {
|
|
15
|
+
eventType: string
|
|
16
|
+
targetName: string
|
|
17
|
+
x: number
|
|
18
|
+
y: number
|
|
19
|
+
width: number
|
|
20
|
+
height: number
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* License Key Verification
|
|
24
|
+
* @param License Key
|
|
25
|
+
* @return Verification Result (bool)
|
|
26
|
+
*/
|
|
7
27
|
export declare function init(licenseKeyHex: string): boolean
|
|
8
|
-
export declare function
|
|
28
|
+
export declare function setOverlayPid(pid: number): void
|
|
29
|
+
export declare function focusLastTarget(): boolean
|
|
30
|
+
/**
|
|
31
|
+
* Start Tracking
|
|
32
|
+
* @param targets: Vec<TargetConfig>
|
|
33
|
+
* @param callback: ThreadsafeFunction<OverlayEvent, ErrorStrategy::Fatal>
|
|
34
|
+
* @return Result<()>
|
|
35
|
+
*/
|
|
36
|
+
export declare function startTracking(targets: Array<TargetConfig>, callback: (event: OverlayEvent) => void): void
|
package/dist/index.js
CHANGED
|
@@ -310,8 +310,10 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const {
|
|
313
|
+
const { Mode, init, setOverlayPid, focusLastTarget, startTracking } = nativeBinding
|
|
314
314
|
|
|
315
|
-
module.exports.
|
|
315
|
+
module.exports.Mode = Mode
|
|
316
316
|
module.exports.init = init
|
|
317
|
-
module.exports.
|
|
317
|
+
module.exports.setOverlayPid = setOverlayPid
|
|
318
|
+
module.exports.focusLastTarget = focusLastTarget
|
|
319
|
+
module.exports.startTracking = startTracking
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stratum-rs-overlay",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "A high-performance, non-intrusive game overlay library for Electron powered by Rust.",
|
|
5
5
|
"os": [
|
|
6
6
|
"win32"
|
|
@@ -30,8 +30,7 @@
|
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "shx rm -rf dist && shx mkdir -p dist && napi build --platform --release --js index.js --dts index.d.ts && shx mv index.js index.d.ts *.node dist/",
|
|
33
|
-
"build:debug": "shx rm -rf dist && shx mkdir -p dist && napi build --platform --js index.js --dts index.d.ts && shx mv index.js index.d.ts *.node dist/"
|
|
34
|
-
"start": "npm run build:debug && electron examples/main.js"
|
|
33
|
+
"build:debug": "shx rm -rf dist && shx mkdir -p dist && napi build --platform --js index.js --dts index.d.ts && shx mv index.js index.d.ts *.node dist/"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
36
|
"@napi-rs/cli": "^2.18.4",
|