@maaxyz/maa-node 5.8.0-alpha.3 → 5.8.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.
@@ -70,6 +70,7 @@ declare global {
70
70
  msg: NotifyMessage<'Action'>
71
71
  ctrl_id: number // CtrlId
72
72
  uuid: string
73
+ info: Record<string, unknown>
73
74
  } & (
74
75
  | {
75
76
  action: 'connect'
@@ -111,6 +112,10 @@ declare global {
111
112
  action: 'screencap'
112
113
  param?: never
113
114
  }
115
+ | {
116
+ action: 'inactive'
117
+ param?: never
118
+ }
114
119
  | {
115
120
  action: 'start_app' | 'stop_app'
116
121
  param: AppParam
@@ -176,6 +181,7 @@ declare global {
176
181
  * Post a scroll action. Using multiples of 120 (WHEEL_DELTA) is recommended for best compatibility.
177
182
  */
178
183
  post_scroll(dx: number, dy: number): Job<CtrlId, Controller>
184
+ post_inactive(): Job<CtrlId, Controller>
179
185
  post_screencap(): ImageJob
180
186
  override_pipeline(pipeline: Record<string, unknown> | Record<string, unknown>[]): void
181
187
  override_next(node_name: string, next_list: string[]): void
@@ -188,6 +194,7 @@ declare global {
188
194
  get cached_image(): ImageData | null
189
195
  get uuid(): string | null
190
196
  get resolution(): [width: number, height: number] | null
197
+ get info(): string | null
191
198
  }
192
199
 
193
200
  type AdbDevice = [
@@ -258,6 +265,14 @@ declare global {
258
265
  )
259
266
  }
260
267
 
268
+ type WlRootsCompositor = [handle: DesktopHandle, class_name: string, window_name: string]
269
+
270
+ class WlRootsController extends Controller {
271
+ constructor(wlr_socket_path: string)
272
+
273
+ static find(): Promise<WlRootsCompositor[] | null>
274
+ }
275
+
261
276
  interface CustomControllerActor {
262
277
  connect?(): maa.MaybePromise<boolean>
263
278
  // connected?(): maa.MaybePromise<boolean>
@@ -292,6 +307,8 @@ declare global {
292
307
  key_down?(keycode: number): maa.MaybePromise<boolean>
293
308
  key_up?(keycode: number): maa.MaybePromise<boolean>
294
309
  scroll?(dx: number, dy: number): maa.MaybePromise<boolean>
310
+ inactive?(): maa.MaybePromise<boolean>
311
+ get_info?(): maa.MaybePromise<string | null>
295
312
  }
296
313
 
297
314
  class CustomController extends Controller {
@@ -349,6 +349,12 @@ declare global {
349
349
  Mode
350
350
  >
351
351
 
352
+ type ActionScreencap = {
353
+ filename?: string
354
+ format?: 'png' | 'jpg' | 'jpeg'
355
+ quality?: number
356
+ }
357
+
352
358
  type ActionCustom<Mode> = RequiredIfStrict<
353
359
  {
354
360
  target?: true | NodeName | Rect
@@ -395,6 +401,7 @@ declare global {
395
401
  | 'StopTask'
396
402
  | 'Command'
397
403
  | 'Shell'
404
+ | 'Screencap'
398
405
  | 'Custom'
399
406
 
400
407
  type Action<Mode> =
@@ -427,6 +434,7 @@ declare global {
427
434
  | MixAct<'StopTask', ActionStopTask, Mode>
428
435
  | MixAct<'Command', ActionCommand<Mode>, Mode>
429
436
  | MixAct<'Shell', ActionShell<Mode>, Mode>
437
+ | MixAct<'Screencap', ActionScreencap, Mode>
430
438
  | MixAct<'Custom', ActionCustom<Mode>, Mode>
431
439
 
432
440
  type NodeAttr<Mode> = RequiredIfStrict<
package/package.json CHANGED
@@ -20,13 +20,13 @@
20
20
  "engines": {
21
21
  "node": ">= 20.0.0"
22
22
  },
23
- "version": "5.8.0-alpha.3",
23
+ "version": "5.8.0-beta.2",
24
24
  "optionalDependencies": {
25
- "@maaxyz/maa-node-darwin-arm64": "5.8.0-alpha.3",
26
- "@maaxyz/maa-node-darwin-x64": "5.8.0-alpha.3",
27
- "@maaxyz/maa-node-linux-arm64": "5.8.0-alpha.3",
28
- "@maaxyz/maa-node-linux-x64": "5.8.0-alpha.3",
29
- "@maaxyz/maa-node-win32-arm64": "5.8.0-alpha.3",
30
- "@maaxyz/maa-node-win32-x64": "5.8.0-alpha.3"
25
+ "@maaxyz/maa-node-darwin-arm64": "5.8.0-beta.2",
26
+ "@maaxyz/maa-node-darwin-x64": "5.8.0-beta.2",
27
+ "@maaxyz/maa-node-linux-arm64": "5.8.0-beta.2",
28
+ "@maaxyz/maa-node-linux-x64": "5.8.0-beta.2",
29
+ "@maaxyz/maa-node-win32-arm64": "5.8.0-beta.2",
30
+ "@maaxyz/maa-node-win32-x64": "5.8.0-beta.2"
31
31
  }
32
32
  }