ms-types 0.3.2 → 0.3.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/package.json +1 -1
- package/types/action.d.ts +12 -3
- package/types/node.d.ts +8 -28
- package/types/zh//345/212/250/344/275/234/346/250/241/345/235/227.d.ts +12 -3
- package/types/zh//350/212/202/347/202/271/346/250/241/345/235/227.d.ts +8 -28
- /package/types/{appleOcr.d.ts → appleocr.d.ts} +0 -0
- /package/types/{paddleOcr.d.ts → paddleocr.d.ts} +0 -0
- /package/types/{tomatoOcr.d.ts → tomatoocr.d.ts} +0 -0
- /package/types/zh/{MySQL → MySql}/346/250/241/345/235/227.d.ts" +0 -0
package/package.json
CHANGED
package/types/action.d.ts
CHANGED
|
@@ -172,12 +172,21 @@ declare namespace action {
|
|
|
172
172
|
function homeScreen(): boolean;
|
|
173
173
|
/**
|
|
174
174
|
* 按下按钮
|
|
175
|
-
* @param button 按钮 home 按下home键 volumeup 按下音量上键 volumedown 按下音量下键
|
|
175
|
+
* @param button 按钮 home 按下home键 volumeup 按下音量上键 volumedown 按下音量下键
|
|
176
176
|
* @returns 按下按钮是否成功
|
|
177
177
|
* @example action.pressButton("home")
|
|
178
178
|
*/
|
|
179
|
-
function pressButton(
|
|
180
|
-
|
|
179
|
+
function pressButton(button: "home" | "volumeup" | "volumedown"): boolean;
|
|
180
|
+
/**
|
|
181
|
+
* 模拟按下HID按钮
|
|
182
|
+
* @param button HID按钮 home 按下home键 volumeup 按下音量上键 volumedown 按下音量下键 power 按下电源键 snapshot 按下截图键
|
|
183
|
+
* @param duration 持续时间 单位毫秒 默认20ms
|
|
184
|
+
* @returns 按下HID按钮是否成功
|
|
185
|
+
* @example action.pressHidButton("home", 200)
|
|
186
|
+
*/
|
|
187
|
+
function pressHidButton(
|
|
188
|
+
button: "home" | "volumeup" | "volumedown" | "power" | "snapshot",
|
|
189
|
+
duration?: number
|
|
181
190
|
): boolean;
|
|
182
191
|
|
|
183
192
|
/**
|
package/types/node.d.ts
CHANGED
|
@@ -3,29 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
declare function createNodeSelector(params?: {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* 代表要获取节点的层级,越少速度越快,默认 50
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 1 代表不管label是否有值都获取,2 代表只获取label有值的节点
|
|
11
|
-
*/
|
|
12
|
-
labelFilter: 1 | 2;
|
|
13
|
-
/**
|
|
14
|
-
* 1 代表不过滤 2 bounds 区域属性x,y,w,h都小于0就被过滤
|
|
15
|
-
*/
|
|
16
|
-
boundsFilter: 1 | 2;
|
|
17
|
-
/**
|
|
18
|
-
* 代表要获取节点的层级,越少速度越快,建议 1 - 50
|
|
19
|
-
*/
|
|
20
|
-
maxDepth: number;
|
|
21
|
-
/**
|
|
22
|
-
* 最大获取子节点数量,0代表不限制
|
|
23
|
-
*/
|
|
24
|
-
maxChildCount: number;
|
|
25
|
-
/**
|
|
26
|
-
* 代表要过滤的属性,用英文逗号分割,可以增加抓取速度,例如 visible,enable
|
|
27
|
-
*/
|
|
28
|
-
excludedAttributes: string;
|
|
8
|
+
maxDepth?: number;
|
|
29
9
|
}): NodeSelector;
|
|
30
10
|
|
|
31
11
|
declare interface NodeBoundsInfo {
|
|
@@ -72,7 +52,7 @@ declare interface NodeInfo {
|
|
|
72
52
|
/**
|
|
73
53
|
* 节点名称
|
|
74
54
|
*/
|
|
75
|
-
|
|
55
|
+
title: string;
|
|
76
56
|
/**
|
|
77
57
|
* 节点是否可见
|
|
78
58
|
*/
|
|
@@ -195,16 +175,16 @@ declare class NodeSelector {
|
|
|
195
175
|
labelMatch(match: string): NodeSelector;
|
|
196
176
|
/**
|
|
197
177
|
* 获取节点名称
|
|
198
|
-
* @param
|
|
178
|
+
* @param title 节点名称
|
|
199
179
|
* @returns 节点选择器
|
|
200
180
|
*/
|
|
201
|
-
|
|
181
|
+
title(title: string): NodeSelector;
|
|
202
182
|
/**
|
|
203
183
|
* 获取节点名称匹配
|
|
204
184
|
* @param match 匹配字符串
|
|
205
185
|
* @returns 节点选择器
|
|
206
186
|
*/
|
|
207
|
-
|
|
187
|
+
titleMatch(match: string): NodeSelector;
|
|
208
188
|
/**
|
|
209
189
|
* 获取节点类型
|
|
210
190
|
* @param type 节点类型
|
|
@@ -231,10 +211,10 @@ declare class NodeSelector {
|
|
|
231
211
|
valueMatch(match: string): NodeSelector;
|
|
232
212
|
/**
|
|
233
213
|
* 获取节点是否启用
|
|
234
|
-
* @param
|
|
214
|
+
* @param enabled 是否启用
|
|
235
215
|
* @returns 节点选择器
|
|
236
216
|
*/
|
|
237
|
-
|
|
217
|
+
enabled(enabled: boolean): NodeSelector;
|
|
238
218
|
/**
|
|
239
219
|
* 获取节点是否可访问
|
|
240
220
|
* @param accessible 是否可访问
|
|
@@ -174,12 +174,21 @@ declare namespace $动作 {
|
|
|
174
174
|
function 回到主页(): 布尔值;
|
|
175
175
|
/**
|
|
176
176
|
* 按下按钮
|
|
177
|
-
* @param 按键 按钮 home 按下home键 volumeup 按下音量上键 volumedown 按下音量下键
|
|
177
|
+
* @param 按键 按钮 home 按下home键 volumeup 按下音量上键 volumedown 按下音量下键
|
|
178
178
|
* @returns 按下按钮是否成功
|
|
179
179
|
* @example $动作.按键("home")
|
|
180
180
|
*/
|
|
181
|
-
function 按键(
|
|
182
|
-
|
|
181
|
+
function 按键(按键: "home" | "volumeup" | "volumedown"): 布尔值;
|
|
182
|
+
/**
|
|
183
|
+
* 模拟按下HID按钮
|
|
184
|
+
* @param 按键 HID按钮 home 按下home键 volumeup 按下音量上键 volumedown 按下音量下键 power 按下电源键 snapshot 按下截图键
|
|
185
|
+
* @param 持续时间 持续时间 单位毫秒 默认20ms
|
|
186
|
+
* @returns 按下HID按钮是否成功
|
|
187
|
+
* @example $动作.按键HID("home", 200)
|
|
188
|
+
*/
|
|
189
|
+
function 按键HID(
|
|
190
|
+
按键: "home" | "volumeup" | "volumedown" | "power" | "snapshot",
|
|
191
|
+
持续时间?: 数字
|
|
183
192
|
): 布尔值;
|
|
184
193
|
|
|
185
194
|
/**
|
|
@@ -4,29 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
declare function $创建节点选择器(params?: {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* 代表要获取节点的层级,越少速度越快,默认 50
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 1 代表不管label是否有值都获取,2 代表只获取label有值的节点
|
|
12
|
-
*/
|
|
13
|
-
labelFilter: 1 | 2;
|
|
14
|
-
/**
|
|
15
|
-
* 1 代表不过滤 2 bounds 区域属性x,y,w,h都小于0就被过滤
|
|
16
|
-
*/
|
|
17
|
-
boundsFilter: 1 | 2;
|
|
18
|
-
/**
|
|
19
|
-
* 代表要获取节点的层级,越少速度越快,建议 1 - 50
|
|
20
|
-
*/
|
|
21
|
-
maxDepth: 数字;
|
|
22
|
-
/**
|
|
23
|
-
* 最大获取子节点数量,0代表不限制
|
|
24
|
-
*/
|
|
25
|
-
maxChildCount: 数字;
|
|
26
|
-
/**
|
|
27
|
-
* 代表要过滤的属性,用英文逗号分割,可以增加抓取速度,例如 visible,enable
|
|
28
|
-
*/
|
|
29
|
-
excludedAttributes: 字符串;
|
|
9
|
+
maxDepth?: number;
|
|
30
10
|
}): $节点选择器;
|
|
31
11
|
|
|
32
12
|
declare interface $节点位置信息 {
|
|
@@ -73,7 +53,7 @@ declare interface $节点信息 {
|
|
|
73
53
|
/**
|
|
74
54
|
* 节点名称
|
|
75
55
|
*/
|
|
76
|
-
|
|
56
|
+
title: 字符串;
|
|
77
57
|
/**
|
|
78
58
|
* 节点是否可见
|
|
79
59
|
*/
|
|
@@ -196,16 +176,16 @@ declare class $节点选择器 {
|
|
|
196
176
|
labelMatch(match: 字符串): $节点选择器;
|
|
197
177
|
/**
|
|
198
178
|
* 获取节点名称
|
|
199
|
-
* @param
|
|
179
|
+
* @param title 节点名称
|
|
200
180
|
* @returns 节点选择器
|
|
201
181
|
*/
|
|
202
|
-
|
|
182
|
+
title(title: 字符串): $节点选择器;
|
|
203
183
|
/**
|
|
204
184
|
* 获取节点名称匹配
|
|
205
185
|
* @param match 匹配字符串
|
|
206
186
|
* @returns 节点选择器
|
|
207
187
|
*/
|
|
208
|
-
|
|
188
|
+
titleMatch(match: 字符串): $节点选择器;
|
|
209
189
|
/**
|
|
210
190
|
* 获取节点类型
|
|
211
191
|
* @param type 节点类型
|
|
@@ -232,10 +212,10 @@ declare class $节点选择器 {
|
|
|
232
212
|
valueMatch(match: 字符串): $节点选择器;
|
|
233
213
|
/**
|
|
234
214
|
* 获取节点是否启用
|
|
235
|
-
* @param
|
|
215
|
+
* @param enabled 是否启用
|
|
236
216
|
* @returns 节点选择器
|
|
237
217
|
*/
|
|
238
|
-
|
|
218
|
+
enabled(enabled: 布尔值): $节点选择器;
|
|
239
219
|
/**
|
|
240
220
|
* 获取节点是否可访问
|
|
241
221
|
* @param accessible 是否可访问
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|