@maaxyz/maa-node 5.9.0-alpha.2 → 5.9.0-alpha.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/controller.d.ts +18 -3
- package/package.json +7 -7
package/dist/controller.d.ts
CHANGED
|
@@ -53,6 +53,11 @@ declare global {
|
|
|
53
53
|
dy: number
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
type RelativeMoveParam = {
|
|
57
|
+
dx: number
|
|
58
|
+
dy: number
|
|
59
|
+
}
|
|
60
|
+
|
|
56
61
|
type ActionParam =
|
|
57
62
|
| {}
|
|
58
63
|
| ClickParam
|
|
@@ -65,6 +70,7 @@ declare global {
|
|
|
65
70
|
| InputTextParam
|
|
66
71
|
| AppParam
|
|
67
72
|
| ScrollParam
|
|
73
|
+
| RelativeMoveParam
|
|
68
74
|
|
|
69
75
|
type ControllerNotify = {
|
|
70
76
|
msg: NotifyMessage<'Action'>
|
|
@@ -96,6 +102,10 @@ declare global {
|
|
|
96
102
|
action: 'touch_down' | 'touch_move' | 'touch_up'
|
|
97
103
|
param: TouchParam
|
|
98
104
|
}
|
|
105
|
+
| {
|
|
106
|
+
action: 'relative_move'
|
|
107
|
+
param: RelativeMoveParam
|
|
108
|
+
}
|
|
99
109
|
| {
|
|
100
110
|
action: 'click_key' | 'key_down' | 'key_up'
|
|
101
111
|
param: ClickKeyParam
|
|
@@ -175,10 +185,15 @@ declare global {
|
|
|
175
185
|
pressure: number,
|
|
176
186
|
): Job<CtrlId, Controller>
|
|
177
187
|
post_touch_up(contact: number): Job<CtrlId, Controller>
|
|
188
|
+
/**
|
|
189
|
+
* Post a relative move action. Currently only supported by Win32 controller.
|
|
190
|
+
*/
|
|
191
|
+
post_relative_move(dx: number, dy: number): Job<CtrlId, Controller>
|
|
178
192
|
post_key_down(keycode: number): Job<CtrlId, Controller>
|
|
179
193
|
post_key_up(keycode: number): Job<CtrlId, Controller>
|
|
180
194
|
/**
|
|
181
|
-
* Post a scroll action.
|
|
195
|
+
* Post a scroll action. Supported by Win32 controller and custom controllers that implement scroll.
|
|
196
|
+
* Using multiples of 120 (WHEEL_DELTA) is recommended for best compatibility.
|
|
182
197
|
*/
|
|
183
198
|
post_scroll(dx: number, dy: number): Job<CtrlId, Controller>
|
|
184
199
|
post_inactive(): Job<CtrlId, Controller>
|
|
@@ -225,9 +240,9 @@ declare global {
|
|
|
225
240
|
class Win32Controller extends Controller {
|
|
226
241
|
constructor(
|
|
227
242
|
hwnd: DesktopHandle,
|
|
228
|
-
|
|
243
|
+
screencap_method: ScreencapOrInputMethods,
|
|
229
244
|
mouse_method: ScreencapOrInputMethods,
|
|
230
|
-
|
|
245
|
+
keyboard_method: ScreencapOrInputMethods,
|
|
231
246
|
)
|
|
232
247
|
|
|
233
248
|
static find(): Promise<DesktopDevice[] | null>
|
package/package.json
CHANGED
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">= 20.0.0"
|
|
22
22
|
},
|
|
23
|
-
"version": "5.9.0-alpha.
|
|
23
|
+
"version": "5.9.0-alpha.4",
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@maaxyz/maa-node-darwin-arm64": "5.9.0-alpha.
|
|
26
|
-
"@maaxyz/maa-node-darwin-x64": "5.9.0-alpha.
|
|
27
|
-
"@maaxyz/maa-node-linux-arm64": "5.9.0-alpha.
|
|
28
|
-
"@maaxyz/maa-node-linux-x64": "5.9.0-alpha.
|
|
29
|
-
"@maaxyz/maa-node-win32-arm64": "5.9.0-alpha.
|
|
30
|
-
"@maaxyz/maa-node-win32-x64": "5.9.0-alpha.
|
|
25
|
+
"@maaxyz/maa-node-darwin-arm64": "5.9.0-alpha.4",
|
|
26
|
+
"@maaxyz/maa-node-darwin-x64": "5.9.0-alpha.4",
|
|
27
|
+
"@maaxyz/maa-node-linux-arm64": "5.9.0-alpha.4",
|
|
28
|
+
"@maaxyz/maa-node-linux-x64": "5.9.0-alpha.4",
|
|
29
|
+
"@maaxyz/maa-node-win32-arm64": "5.9.0-alpha.4",
|
|
30
|
+
"@maaxyz/maa-node-win32-x64": "5.9.0-alpha.4"
|
|
31
31
|
}
|
|
32
32
|
}
|