@maaxyz/maa-node 5.8.0-alpha.2 → 5.8.0-beta.1

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.
@@ -76,8 +76,10 @@ declare global {
76
76
  * | PrintWindow | Medium | Medium | No | Yes | |
77
77
  * | ScreenDC | Fast | High | No | No | |
78
78
  *
79
- * Note: When a window is minimized on Windows, all screencap methods will fail.
80
- * Avoid minimizing the target window.
79
+ * Note: FramePool and PrintWindow have built-in pseudo-minimize support
80
+ * when the target window is minimized, they make it transparent and click-through,
81
+ * then restore it without activation, allowing screencap to continue.
82
+ * Other screencap methods will fail when the target window is minimized.
81
83
  */
82
84
  const Win32ScreencapMethod: Record<
83
85
  | 'GDI'
@@ -111,6 +111,10 @@ declare global {
111
111
  action: 'screencap'
112
112
  param?: never
113
113
  }
114
+ | {
115
+ action: 'inactive'
116
+ param?: never
117
+ }
114
118
  | {
115
119
  action: 'start_app' | 'stop_app'
116
120
  param: AppParam
@@ -176,6 +180,7 @@ declare global {
176
180
  * Post a scroll action. Using multiples of 120 (WHEEL_DELTA) is recommended for best compatibility.
177
181
  */
178
182
  post_scroll(dx: number, dy: number): Job<CtrlId, Controller>
183
+ post_inactive(): Job<CtrlId, Controller>
179
184
  post_screencap(): ImageJob
180
185
  override_pipeline(pipeline: Record<string, unknown> | Record<string, unknown>[]): void
181
186
  override_next(node_name: string, next_list: string[]): void
@@ -292,6 +297,7 @@ declare global {
292
297
  key_down?(keycode: number): maa.MaybePromise<boolean>
293
298
  key_up?(keycode: number): maa.MaybePromise<boolean>
294
299
  scroll?(dx: number, dy: number): maa.MaybePromise<boolean>
300
+ inactive?(): maa.MaybePromise<boolean>
295
301
  }
296
302
 
297
303
  class CustomController extends Controller {
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.2",
23
+ "version": "5.8.0-beta.1",
24
24
  "optionalDependencies": {
25
- "@maaxyz/maa-node-darwin-arm64": "5.8.0-alpha.2",
26
- "@maaxyz/maa-node-darwin-x64": "5.8.0-alpha.2",
27
- "@maaxyz/maa-node-linux-arm64": "5.8.0-alpha.2",
28
- "@maaxyz/maa-node-linux-x64": "5.8.0-alpha.2",
29
- "@maaxyz/maa-node-win32-arm64": "5.8.0-alpha.2",
30
- "@maaxyz/maa-node-win32-x64": "5.8.0-alpha.2"
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"
31
31
  }
32
32
  }