@maaxyz/maa-node 5.2.6 → 5.3.0-beta.2
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/constant.d.ts +88 -0
- package/dist/global.d.ts +2 -0
- package/dist/pipeline.d.ts +15 -8
- package/package.json +7 -7
package/dist/constant.d.ts
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
namespace maa {
|
|
3
3
|
const Status: Record<'Invalid' | 'Pending' | 'Running' | 'Succeeded' | 'Failed', Status>
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Adb screencap method flags.
|
|
7
|
+
*
|
|
8
|
+
* Use bitwise OR to set the methods you need.
|
|
9
|
+
* MaaFramework will test all provided methods and use the fastest available one.
|
|
10
|
+
*
|
|
11
|
+
* Default: All methods except RawByNetcat, MinicapDirect, MinicapStream
|
|
12
|
+
*
|
|
13
|
+
* Note: MinicapDirect and MinicapStream use lossy JPEG encoding, which may
|
|
14
|
+
* significantly reduce template matching accuracy. Not recommended.
|
|
15
|
+
*
|
|
16
|
+
* | Method | Speed | Compatibility | Encoding | Notes |
|
|
17
|
+
* |-----------------------|------------|---------------|----------|-----------------------------------|
|
|
18
|
+
* | EncodeToFileAndPull | Slow | High | Lossless | |
|
|
19
|
+
* | Encode | Slow | High | Lossless | |
|
|
20
|
+
* | RawWithGzip | Medium | High | Lossless | |
|
|
21
|
+
* | RawByNetcat | Fast | Low | Lossless | |
|
|
22
|
+
* | MinicapDirect | Fast | Low | Lossy | |
|
|
23
|
+
* | MinicapStream | Very Fast | Low | Lossy | |
|
|
24
|
+
* | EmulatorExtras | Very Fast | Low | Lossless | Emulators only: MuMu 12, LDPlayer 9 |
|
|
25
|
+
*/
|
|
4
26
|
const AdbScreencapMethod: Record<
|
|
5
27
|
| 'EncodeToFileAndPull'
|
|
6
28
|
| 'Encode'
|
|
@@ -13,10 +35,50 @@ declare global {
|
|
|
13
35
|
| 'Default',
|
|
14
36
|
ScreencapOrInputMethods
|
|
15
37
|
>
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Adb input method flags.
|
|
41
|
+
*
|
|
42
|
+
* Use bitwise OR to set the methods you need.
|
|
43
|
+
* MaaFramework will select the first available method according to priority.
|
|
44
|
+
*
|
|
45
|
+
* Priority (high to low): EmulatorExtras > Maatouch > MinitouchAndAdbKey > AdbShell
|
|
46
|
+
*
|
|
47
|
+
* Default: All methods except EmulatorExtras
|
|
48
|
+
*
|
|
49
|
+
* | Method | Speed | Compatibility | Notes |
|
|
50
|
+
* |----------------------|-------|---------------|---------------------------------------|
|
|
51
|
+
* | AdbShell | Slow | High | |
|
|
52
|
+
* | MinitouchAndAdbKey | Fast | Medium | Key press still uses AdbShell |
|
|
53
|
+
* | Maatouch | Fast | Medium | |
|
|
54
|
+
* | EmulatorExtras | Fast | Low | Emulators only: MuMu 12 |
|
|
55
|
+
*/
|
|
16
56
|
const AdbInputMethod: Record<
|
|
17
57
|
'AdbShell' | 'MinitouchAndAdbKey' | 'Maatouch' | 'EmulatorExtras' | 'All' | 'Default',
|
|
18
58
|
ScreencapOrInputMethods
|
|
19
59
|
>
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Win32 screencap method.
|
|
63
|
+
*
|
|
64
|
+
* No bitwise OR, select ONE method only.
|
|
65
|
+
*
|
|
66
|
+
* No default value. Client should choose one as default.
|
|
67
|
+
*
|
|
68
|
+
* Different applications use different rendering methods, there is no universal solution.
|
|
69
|
+
*
|
|
70
|
+
* | Method | Speed | Compatibility | Require Admin | Background Support | Notes |
|
|
71
|
+
* |-------------------------|-----------|---------------|---------------|--------------------|----------------------------------|
|
|
72
|
+
* | GDI | Fast | Medium | No | No | |
|
|
73
|
+
* | FramePool | Very Fast | Medium | No | Yes | Requires Windows 10 1903+ |
|
|
74
|
+
* | DXGI_DesktopDup | Very Fast | Low | No | No | Desktop duplication (full screen)|
|
|
75
|
+
* | DXGI_DesktopDup_Window | Very Fast | Low | No | No | Desktop duplication then crop |
|
|
76
|
+
* | PrintWindow | Medium | Medium | No | Yes | |
|
|
77
|
+
* | ScreenDC | Fast | High | No | No | |
|
|
78
|
+
*
|
|
79
|
+
* Note: When a window is minimized on Windows, all screencap methods will fail.
|
|
80
|
+
* Avoid minimizing the target window.
|
|
81
|
+
*/
|
|
20
82
|
const Win32ScreencapMethod: Record<
|
|
21
83
|
| 'GDI'
|
|
22
84
|
| 'FramePool'
|
|
@@ -26,6 +88,32 @@ declare global {
|
|
|
26
88
|
| 'ScreenDC',
|
|
27
89
|
ScreencapOrInputMethods
|
|
28
90
|
>
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Win32 input method.
|
|
94
|
+
*
|
|
95
|
+
* No bitwise OR, select ONE method only.
|
|
96
|
+
*
|
|
97
|
+
* No default value. Client should choose one as default.
|
|
98
|
+
*
|
|
99
|
+
* Different applications process input differently, there is no universal solution.
|
|
100
|
+
*
|
|
101
|
+
* | Method | Compatibility | Require Admin | Seize Mouse | Background Support | Notes |
|
|
102
|
+
* |------------------------------|---------------|---------------|--------------|--------------------|-------------------------------------------------------------|
|
|
103
|
+
* | Seize | High | No | Yes | No | |
|
|
104
|
+
* | SendMessage | Medium | Maybe | No | Yes | |
|
|
105
|
+
* | PostMessage | Medium | Maybe | No | Yes | |
|
|
106
|
+
* | LegacyEvent | Low | No | Yes | No | |
|
|
107
|
+
* | PostThreadMessage | Low | Maybe | No | Yes | |
|
|
108
|
+
* | SendMessageWithCursorPos | Medium | Maybe | Briefly | Yes | Designed for apps that check real cursor position |
|
|
109
|
+
* | PostMessageWithCursorPos | Medium | Maybe | Briefly | Yes | Designed for apps that check real cursor position |
|
|
110
|
+
*
|
|
111
|
+
* Note:
|
|
112
|
+
* - Admin rights mainly depend on the target application's privilege level.
|
|
113
|
+
* If the target runs as admin, MaaFramework should also run as admin for compatibility.
|
|
114
|
+
* - "WithCursorPos" methods briefly move the cursor to target position, send message,
|
|
115
|
+
* then restore cursor position. This "briefly" seizes the mouse but won't block user operations.
|
|
116
|
+
*/
|
|
29
117
|
const Win32InputMethod: Record<
|
|
30
118
|
| 'Seize'
|
|
31
119
|
| 'SendMessage'
|
package/dist/global.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ declare global {
|
|
|
10
10
|
value: 'Off' | 'Fatal' | 'Error' | 'Warn' | 'Info' | 'Debug' | 'Trace' | 'All',
|
|
11
11
|
)
|
|
12
12
|
set debug_mode(value: boolean)
|
|
13
|
+
set draw_quality(value: number)
|
|
14
|
+
set reco_image_cache_limit(value: number)
|
|
13
15
|
config_init_option(user_path: string, default_json?: string): void
|
|
14
16
|
}
|
|
15
17
|
}
|
package/dist/pipeline.d.ts
CHANGED
|
@@ -190,9 +190,11 @@ declare global {
|
|
|
190
190
|
type ActionSwipe = {
|
|
191
191
|
begin?: true | NodeName | Rect
|
|
192
192
|
begin_offset?: Rect
|
|
193
|
-
end?: true | NodeName | Rect
|
|
194
|
-
end_offset?: Rect
|
|
195
|
-
duration?: number
|
|
193
|
+
end?: true | NodeName | Rect | (true | NodeName | Rect)[]
|
|
194
|
+
end_offset?: Rect | Rect[]
|
|
195
|
+
duration?: number | number[]
|
|
196
|
+
end_hold?: number | number[]
|
|
197
|
+
only_hover?: boolean
|
|
196
198
|
contact?: number
|
|
197
199
|
}
|
|
198
200
|
|
|
@@ -202,9 +204,11 @@ declare global {
|
|
|
202
204
|
starting?: number
|
|
203
205
|
begin?: true | NodeName | Rect
|
|
204
206
|
begin_offset?: Rect
|
|
205
|
-
end?: true | NodeName | Rect
|
|
206
|
-
end_offset?: Rect
|
|
207
|
-
duration?: number
|
|
207
|
+
end?: true | NodeName | Rect | (true | NodeName | Rect)[]
|
|
208
|
+
end_offset?: Rect | Rect[]
|
|
209
|
+
duration?: number | number[]
|
|
210
|
+
end_hold?: number | number[]
|
|
211
|
+
only_hover?: boolean
|
|
208
212
|
contact?: number
|
|
209
213
|
}[]
|
|
210
214
|
},
|
|
@@ -387,10 +391,13 @@ declare global {
|
|
|
387
391
|
inverse?: boolean
|
|
388
392
|
enabled?: boolean
|
|
389
393
|
max_hit?: number
|
|
390
|
-
pre_delay?:
|
|
391
|
-
post_delay?:
|
|
394
|
+
pre_delay?: number
|
|
395
|
+
post_delay?: number
|
|
392
396
|
pre_wait_freezes?: RemoveIfDump<number, Mode> | WaitFreeze
|
|
393
397
|
post_wait_freezes?: RemoveIfDump<number, Mode> | WaitFreeze
|
|
398
|
+
repeat?: number
|
|
399
|
+
repeat_delay?: number
|
|
400
|
+
repeat_wait_freezes?: RemoveIfDump<number, Mode> | WaitFreeze
|
|
394
401
|
focus?: unknown
|
|
395
402
|
attach?: Record<string, unknown>
|
|
396
403
|
}
|
package/package.json
CHANGED
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"prettier": "^3.5.2",
|
|
29
29
|
"typescript": "^5.8.2"
|
|
30
30
|
},
|
|
31
|
-
"version": "5.2
|
|
31
|
+
"version": "5.3.0-beta.2",
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@maaxyz/maa-node-darwin-arm64": "5.2
|
|
34
|
-
"@maaxyz/maa-node-darwin-x64": "5.2
|
|
35
|
-
"@maaxyz/maa-node-linux-arm64": "5.2
|
|
36
|
-
"@maaxyz/maa-node-linux-x64": "5.2
|
|
37
|
-
"@maaxyz/maa-node-win32-arm64": "5.2
|
|
38
|
-
"@maaxyz/maa-node-win32-x64": "5.2
|
|
33
|
+
"@maaxyz/maa-node-darwin-arm64": "5.3.0-beta.2",
|
|
34
|
+
"@maaxyz/maa-node-darwin-x64": "5.3.0-beta.2",
|
|
35
|
+
"@maaxyz/maa-node-linux-arm64": "5.3.0-beta.2",
|
|
36
|
+
"@maaxyz/maa-node-linux-x64": "5.3.0-beta.2",
|
|
37
|
+
"@maaxyz/maa-node-win32-arm64": "5.3.0-beta.2",
|
|
38
|
+
"@maaxyz/maa-node-win32-x64": "5.3.0-beta.2"
|
|
39
39
|
}
|
|
40
40
|
}
|