ms-types 0.7.8 → 0.8.0
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ms-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"vitepress": "^1.6.4",
|
|
20
|
-
"vitepress-theme-teek": "^1.
|
|
20
|
+
"vitepress-theme-teek": "^1.6.0",
|
|
21
21
|
"wrangler": "^4.92.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
package/types/action.d.ts
CHANGED
|
@@ -186,6 +186,21 @@ declare namespace action {
|
|
|
186
186
|
*/
|
|
187
187
|
function pressButton(button: "home" | "volumeup" | "volumedown"): boolean;
|
|
188
188
|
|
|
189
|
+
/**
|
|
190
|
+
* 发送键盘组合键。
|
|
191
|
+
*
|
|
192
|
+
* Action 模块最终发送标准 USB HID Keyboard/Keypad usage。
|
|
193
|
+
* 参数可以直接传标准 usage 数字,也可以传单个 ASCII 字符、按键名称字符串,
|
|
194
|
+
* 或现有 hidKey 常量;hidKey 常量会按兼容规则转换为标准 usage。
|
|
195
|
+
*
|
|
196
|
+
* @param key 要发送的按键数组
|
|
197
|
+
* @returns 发送是否成功
|
|
198
|
+
* @example action.sendKey(["COMMAND", "c"])
|
|
199
|
+
* @example action.sendKey([0xe3, 0x06])
|
|
200
|
+
* @example action.sendKey([hidKey.COMMAND, "v"])
|
|
201
|
+
*/
|
|
202
|
+
function sendKey(key: Array<number | string>): boolean;
|
|
203
|
+
|
|
189
204
|
/**
|
|
190
205
|
* 执行 W3C Actions JSON
|
|
191
206
|
* @param json W3C Actions 请求体,例如 { actions: [...] }
|
package/types/global.d.ts
CHANGED
|
@@ -147,15 +147,6 @@ declare function time(): number;
|
|
|
147
147
|
*/
|
|
148
148
|
declare function takeMeToFront(): boolean;
|
|
149
149
|
|
|
150
|
-
/**
|
|
151
|
-
* 设置是否预加载节点(仅支持内置Agent)
|
|
152
|
-
* @param enable 是否预加载节点
|
|
153
|
-
* @description 设置是否预加载节点,默认 false
|
|
154
|
-
* @example
|
|
155
|
-
* setPreloadNode(true);
|
|
156
|
-
*/
|
|
157
|
-
declare function setPreloadNode(enable: boolean): void;
|
|
158
|
-
|
|
159
150
|
/**
|
|
160
151
|
* 打印调试日志 - 输出调试级别的日志
|
|
161
152
|
* 用于详细的程序执行信息、变量值和状态信息、函数调用跟踪
|
|
@@ -143,15 +143,6 @@ declare function $获取当前时间戳(): 数字;
|
|
|
143
143
|
*/
|
|
144
144
|
declare function $APP切入前台(): 无返回值;
|
|
145
145
|
|
|
146
|
-
/**
|
|
147
|
-
* 设置是否预加载节点(仅支持内置Agent)
|
|
148
|
-
* @param enable 是否预加载节点
|
|
149
|
-
* @description 设置是否预加载节点,默认 false
|
|
150
|
-
* @example
|
|
151
|
-
* $设置预加载节点(true);
|
|
152
|
-
*/
|
|
153
|
-
declare function $设置预加载节点(enable: 布尔值): 无返回值;
|
|
154
|
-
|
|
155
146
|
/**
|
|
156
147
|
* 打印调试日志 - 输出调试级别的日志
|
|
157
148
|
* 用于详细的程序执行信息、变量值和状态信息、函数调用跟踪
|
|
@@ -188,6 +188,20 @@ declare namespace $动作 {
|
|
|
188
188
|
*/
|
|
189
189
|
function 按键(按键: "home" | "volumeup" | "volumedown"): 布尔值;
|
|
190
190
|
|
|
191
|
+
/**
|
|
192
|
+
* 发送键盘组合键。
|
|
193
|
+
*
|
|
194
|
+
* 动作模块最终发送标准 USB HID Keyboard/Keypad usage。
|
|
195
|
+
* 参数可以直接传标准 usage 数字,也可以传单个 ASCII 字符、按键名称字符串,
|
|
196
|
+
* 或现有 hidKey 常量;hidKey 常量会按兼容规则转换为标准 usage。
|
|
197
|
+
*
|
|
198
|
+
* @param 按键 要发送的按键数组
|
|
199
|
+
* @returns 发送是否成功
|
|
200
|
+
* @example $动作.发送按键(["COMMAND", "c"])
|
|
201
|
+
* @example $动作.发送按键([0xe3, 0x06])
|
|
202
|
+
*/
|
|
203
|
+
function 发送按键(按键: 数组<数字 | 字符串>): 布尔值;
|
|
204
|
+
|
|
191
205
|
/**
|
|
192
206
|
* 执行 W3C Actions JSON
|
|
193
207
|
* @param json W3C Actions 请求体,例如 { actions: [...] }
|