@maaxyz/maa-node 5.8.0-beta.1 → 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'
@@ -193,6 +194,7 @@ declare global {
193
194
  get cached_image(): ImageData | null
194
195
  get uuid(): string | null
195
196
  get resolution(): [width: number, height: number] | null
197
+ get info(): string | null
196
198
  }
197
199
 
198
200
  type AdbDevice = [
@@ -263,6 +265,14 @@ declare global {
263
265
  )
264
266
  }
265
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
+
266
276
  interface CustomControllerActor {
267
277
  connect?(): maa.MaybePromise<boolean>
268
278
  // connected?(): maa.MaybePromise<boolean>
@@ -298,6 +308,7 @@ declare global {
298
308
  key_up?(keycode: number): maa.MaybePromise<boolean>
299
309
  scroll?(dx: number, dy: number): maa.MaybePromise<boolean>
300
310
  inactive?(): maa.MaybePromise<boolean>
311
+ get_info?(): maa.MaybePromise<string | null>
301
312
  }
302
313
 
303
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-beta.1",
23
+ "version": "5.8.0-beta.2",
24
24
  "optionalDependencies": {
25
- "@maaxyz/maa-node-darwin-arm64": "5.8.0-beta.1",
26
- "@maaxyz/maa-node-darwin-x64": "5.8.0-beta.1",
27
- "@maaxyz/maa-node-linux-arm64": "5.8.0-beta.1",
28
- "@maaxyz/maa-node-linux-x64": "5.8.0-beta.1",
29
- "@maaxyz/maa-node-win32-arm64": "5.8.0-beta.1",
30
- "@maaxyz/maa-node-win32-x64": "5.8.0-beta.1"
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
  }