ms-types 0.9.33 → 0.9.35
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/hid.d.ts +7 -0
- package/types/lua/README.md +1 -1
- package/types/lua/action.lua +3 -3
- package/types/lua/appleocr.lua +3 -3
- package/types/lua/cloud.lua +3 -3
- package/types/lua/config.lua +3 -3
- package/types/lua/cryptoUtils.lua +3 -3
- package/types/lua/cv.lua +4 -4
- package/types/lua/device.lua +3 -3
- package/types/lua/dotocr.lua +4 -4
- package/types/lua/file.lua +3 -3
- package/types/lua/hid.lua +8 -3
- package/types/lua/hotupdate.lua +3 -3
- package/types/lua/http.lua +3 -3
- package/types/lua/image.lua +3 -3
- package/types/lua/ime.lua +3 -3
- package/types/lua/logger.lua +3 -3
- package/types/lua/media.lua +3 -3
- package/types/lua/mysql.lua +3 -3
- package/types/lua/netcard.lua +3 -3
- package/types/lua/node.lua +3 -3
- package/types/lua/paddleocr.lua +3 -3
- package/types/lua/pip.lua +3 -3
- package/types/lua/system.lua +3 -3
- package/types/lua/tomatoocr.lua +3 -3
- package/types/lua/tts.lua +3 -3
- package/types/lua/ui.lua +3 -3
- package/types/lua/utils.lua +3 -3
- package/types/lua/yolo.lua +3 -3
- package/types/lua/yolocls.lua +3 -3
- package/types/zh/HID/346/250/241/345/235/227.d.ts +7 -0
package/package.json
CHANGED
package/types/hid.d.ts
CHANGED
|
@@ -110,6 +110,13 @@ declare namespace hid {
|
|
|
110
110
|
*/
|
|
111
111
|
function setJitterValue(value: number): void;
|
|
112
112
|
|
|
113
|
+
/**
|
|
114
|
+
* 设置连续点击/滑动之间的等待毫秒。不调用时用固件默认(相对 200ms / 绝对 100ms)。
|
|
115
|
+
* @param milliseconds 0 关闭等待,大于 0 覆盖为指定毫秒,-1 恢复默认
|
|
116
|
+
* @returns 操作是否成功
|
|
117
|
+
*/
|
|
118
|
+
function setActionDelay(milliseconds: number): boolean;
|
|
119
|
+
|
|
113
120
|
/**
|
|
114
121
|
* 移动指定坐标
|
|
115
122
|
* @param x 移动坐标的X轴
|
package/types/lua/README.md
CHANGED
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
}
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
不要把本目录复制进脚本项目根目录。每个模块文件声明对应的全局表(如 `device`、`cv`、`dotocr`),不要 `require` 宿主模块。`Sleep`、`HidKey`、`logd` / `logi` / `logw` / `loge` 等裸全局会随 library 自动加载。用户自己的 `scripts/foo.lua` 仍用 `require("foo")`。
|
package/types/lua/action.lua
CHANGED
package/types/lua/appleocr.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class AppleOCR
|
|
3
3
|
local _AppleOCR = {}
|
|
4
4
|
|
|
@@ -115,5 +115,5 @@ function _AppleOCR.findTextAbs(input, targets, x, y, ex, ey, langs, exactMatch)
|
|
|
115
115
|
return ret
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
---@type AppleOCR
|
|
119
|
+
appleocr = _AppleOCR
|
package/types/lua/cloud.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class Cloud
|
|
3
3
|
local _Cloud = {}
|
|
4
4
|
|
|
@@ -28,5 +28,5 @@ function _Cloud.report(event, data) return false end
|
|
|
28
28
|
---@param callback fun(event:string, data:table)|nil
|
|
29
29
|
function _Cloud.onEvent(callback) end
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
---@type Cloud
|
|
32
|
+
cloud = _Cloud
|
package/types/lua/config.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class Config
|
|
3
3
|
local _Config = {}
|
|
4
4
|
|
|
@@ -31,5 +31,5 @@ function _Config.getKuiConfig() return {} end
|
|
|
31
31
|
---@return boolean
|
|
32
32
|
function _Config.remove(key) return true end
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
---@type Config
|
|
35
|
+
config = _Config
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class CryptoUtils
|
|
3
3
|
local _CryptoUtils = {}
|
|
4
4
|
|
|
@@ -43,5 +43,5 @@ function _CryptoUtils.sha1(data) return "" end
|
|
|
43
43
|
---@return string
|
|
44
44
|
function _CryptoUtils.sha256(data) return "" end
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
---@type CryptoUtils
|
|
47
|
+
cryptoUtils = _CryptoUtils
|
package/types/lua/cv.lua
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class OpenCV
|
|
3
3
|
local _OpenCV = {}
|
|
4
4
|
|
|
5
|
-
--- OpenCV Mat
|
|
5
|
+
--- OpenCV Mat 句柄模块;全局 `cv`。方法与常量对齐 JS `cv` 运行时导出。
|
|
6
6
|
|
|
7
7
|
--- absdiff
|
|
8
8
|
---@param ... any
|
|
@@ -724,5 +724,5 @@ function _OpenCV.warpPerspective(...) return nil end
|
|
|
724
724
|
---@return any
|
|
725
725
|
function _OpenCV.zeros(...) return nil end
|
|
726
726
|
|
|
727
|
-
|
|
728
|
-
|
|
727
|
+
---@type OpenCV
|
|
728
|
+
cv = _OpenCV
|
package/types/lua/device.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class Device
|
|
3
3
|
local _Device = {}
|
|
4
4
|
|
|
@@ -102,5 +102,5 @@ function _Device.getLanIp() return '' end
|
|
|
102
102
|
---@param intensity number 0.0-1.0
|
|
103
103
|
function _Device.vibrate(duration, intensity) end
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
---@type Device
|
|
106
|
+
device = _Device
|
package/types/lua/dotocr.lua
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class DotOCR
|
|
3
3
|
local _DotOCR = {}
|
|
4
4
|
|
|
5
|
-
--- 点阵 OCR
|
|
5
|
+
--- 点阵 OCR;全局 `dotocr`
|
|
6
6
|
|
|
7
7
|
--- loadFont
|
|
8
8
|
---@param fontPath string
|
|
@@ -41,5 +41,5 @@ function _DotOCR.recognizeAbs(fontId, input, x, y, ex, ey, confidenceThreshold)
|
|
|
41
41
|
---@return table[]
|
|
42
42
|
function _DotOCR.findTextAbs(fontId, input, targetTexts, x, y, ex, ey, confidenceThreshold, exactMatch) return {} end
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
---@type DotOCR
|
|
45
|
+
dotocr = _DotOCR
|
package/types/lua/file.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class File
|
|
3
3
|
local _File = {}
|
|
4
4
|
|
|
@@ -93,5 +93,5 @@ function _File.copy(src, dest) return true end
|
|
|
93
93
|
--- @return string|nil MD5值
|
|
94
94
|
function _File.fileMD5(path) return '' end
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
---@type File
|
|
97
|
+
file = _File
|
package/types/lua/hid.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@type table<string, integer>
|
|
3
3
|
HidKey = {
|
|
4
4
|
COMMAND = 0x83,
|
|
@@ -45,6 +45,11 @@ local _HID = {}
|
|
|
45
45
|
--- @param value integer 抖动值
|
|
46
46
|
function _HID.setJitterValue(value) end
|
|
47
47
|
|
|
48
|
+
--- 设置连续点击/滑动之间的等待毫秒。不调用时用固件默认(相对 200ms / 绝对 100ms)。
|
|
49
|
+
--- @param milliseconds integer 0 关闭等待,大于 0 覆盖毫秒,-1 恢复默认
|
|
50
|
+
--- @return boolean 成功
|
|
51
|
+
function _HID.setActionDelay(milliseconds) return true end
|
|
52
|
+
|
|
48
53
|
--- 移动
|
|
49
54
|
--- @param x integer
|
|
50
55
|
--- @param y integer
|
|
@@ -271,5 +276,5 @@ function _HID.currentAppInfo()
|
|
|
271
276
|
return ret
|
|
272
277
|
end
|
|
273
278
|
|
|
274
|
-
|
|
275
|
-
|
|
279
|
+
---@type HID
|
|
280
|
+
hid = _HID
|
package/types/lua/hotupdate.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class HotUpdate
|
|
3
3
|
local _HotUpdate = {}
|
|
4
4
|
|
|
@@ -20,5 +20,5 @@ function _HotUpdate.downloadAndInstall() return {updated = true, error = nil} en
|
|
|
20
20
|
--- @return integer 版本号
|
|
21
21
|
function _HotUpdate.getCurrentVersion() return 0 end
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
---@type HotUpdate
|
|
24
|
+
hotupdate = _HotUpdate
|
package/types/lua/http.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class Http
|
|
3
3
|
local _Http = {}
|
|
4
4
|
|
|
@@ -141,5 +141,5 @@ function _WebSocket.onBinary(fn) end
|
|
|
141
141
|
--- @param fn fun(error:string)
|
|
142
142
|
function _WebSocket.onError(fn) end
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
---@type Http
|
|
145
|
+
http = _Http
|
package/types/lua/image.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class Image
|
|
3
3
|
local _Image = {}
|
|
4
4
|
|
|
@@ -205,5 +205,5 @@ function _Image.drawRect(id, x, y, ex, ey, color, thickness) end
|
|
|
205
205
|
--- 释放所有图片
|
|
206
206
|
function _Image.releaseAll() end
|
|
207
207
|
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
---@type Image
|
|
209
|
+
image = _Image
|
package/types/lua/ime.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class Ime
|
|
3
3
|
local _Ime = {}
|
|
4
4
|
|
|
@@ -45,5 +45,5 @@ function _Ime.getClipboard() return '' end
|
|
|
45
45
|
--- @return boolean 成功
|
|
46
46
|
function _Ime.setClipboard(text) return true end
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
---@type Ime
|
|
49
|
+
ime = _Ime
|
package/types/lua/logger.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class Logger
|
|
3
3
|
local _Logger = {}
|
|
4
4
|
|
|
@@ -45,5 +45,5 @@ function _Logger.warn(...) end
|
|
|
45
45
|
--- @return nil
|
|
46
46
|
function _Logger.error(...) end
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
---@type Logger
|
|
49
|
+
logger = _Logger
|
package/types/lua/media.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class Media
|
|
3
3
|
local _Media = {}
|
|
4
4
|
|
|
@@ -43,5 +43,5 @@ function _Media.deleteAllVideos() return true end
|
|
|
43
43
|
--- @return boolean 成功
|
|
44
44
|
function _Media.deleteAllScreenshots() return true end
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
---@type Media
|
|
47
|
+
media = _Media
|
package/types/lua/mysql.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class MySQL
|
|
3
3
|
local _MySQL = {}
|
|
4
4
|
|
|
@@ -61,5 +61,5 @@ function _MySQL.commit() return true end
|
|
|
61
61
|
--- @return boolean 成功
|
|
62
62
|
function _MySQL.rollback() return true end
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
---@type MySQL
|
|
65
|
+
mysql = _MySQL
|
package/types/lua/netcard.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class NetCard
|
|
3
3
|
local _NetCard = {}
|
|
4
4
|
|
|
@@ -42,5 +42,5 @@ function _NetCard.setValue(key, value) return '' end
|
|
|
42
42
|
--- @return string 值
|
|
43
43
|
function _NetCard.getValue(key) return '' end
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
---@type NetCard
|
|
46
|
+
netcard = _NetCard
|
package/types/lua/node.lua
CHANGED
package/types/lua/paddleocr.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class PaddleOCR
|
|
3
3
|
local _PaddleOCR = {}
|
|
4
4
|
|
|
@@ -99,5 +99,5 @@ end
|
|
|
99
99
|
--- 释放资源
|
|
100
100
|
function _PaddleOCR.free() end
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
---@type PaddleOCR
|
|
103
|
+
paddleocr = _PaddleOCR
|
package/types/lua/pip.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class Pip
|
|
3
3
|
local _Pip = {}
|
|
4
4
|
|
|
@@ -53,5 +53,5 @@ function _Pip.setCustomTextSize(fontSize) return true end
|
|
|
53
53
|
---@return boolean
|
|
54
54
|
function _Pip.setCustomBackgroundColor(color) return true end
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
---@type Pip
|
|
57
|
+
pip = _Pip
|
package/types/lua/system.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class System
|
|
3
3
|
local _System = {}
|
|
4
4
|
|
|
@@ -136,5 +136,5 @@ function _System.getAgentStatus() return false end
|
|
|
136
136
|
--- @return boolean 成功
|
|
137
137
|
function _System.stopAgent() return true end
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
---@type System
|
|
140
|
+
system = _System
|
package/types/lua/tomatoocr.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class TomatoOCR
|
|
3
3
|
local _TomatoOCR = {}
|
|
4
4
|
|
|
@@ -80,5 +80,5 @@ function _TomatoOCR.findTapPoints(js) return '' end
|
|
|
80
80
|
--- 释放已加载的 OCR 模型和内部资源
|
|
81
81
|
function _TomatoOCR.release() end
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
---@type TomatoOCR
|
|
84
|
+
tomatoocr = _TomatoOCR
|
package/types/lua/tts.lua
CHANGED
package/types/lua/ui.lua
CHANGED
package/types/lua/utils.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class Utils
|
|
3
3
|
local _Utils = {}
|
|
4
4
|
|
|
@@ -46,5 +46,5 @@ function _Utils.hexStringBase64Encoded(hexString) return '' end
|
|
|
46
46
|
--- @return string hex
|
|
47
47
|
function _Utils.hexStringBase64Decoded(base64HexString) return '' end
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
---@type Utils
|
|
50
|
+
utils = _Utils
|
package/types/lua/yolo.lua
CHANGED
package/types/lua/yolocls.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---@meta
|
|
1
|
+
---@meta
|
|
2
2
|
---@class YoloCls
|
|
3
3
|
local _YoloCls = {}
|
|
4
4
|
|
|
@@ -36,5 +36,5 @@ function _YoloCls.free(modelId) end
|
|
|
36
36
|
|
|
37
37
|
function _YoloCls.freeAll() end
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
---@type YoloCls
|
|
40
|
+
yolocls = _YoloCls
|
|
@@ -112,6 +112,13 @@ declare namespace $HID {
|
|
|
112
112
|
*/
|
|
113
113
|
function 设置抖动值(抖动值: 数字): 无返回值;
|
|
114
114
|
|
|
115
|
+
/**
|
|
116
|
+
* 设置连续点击/滑动之间的等待毫秒。不调用时用固件默认(相对 200ms / 绝对 100ms)。
|
|
117
|
+
* @param 毫秒 0 关闭等待,大于 0 覆盖毫秒,-1 恢复默认
|
|
118
|
+
* @returns 操作是否成功
|
|
119
|
+
*/
|
|
120
|
+
function 设置动作延迟(毫秒: 数字): 布尔值;
|
|
121
|
+
|
|
115
122
|
/**
|
|
116
123
|
* 移动指定坐标
|
|
117
124
|
* @param 坐标x 移动坐标的X轴
|