ms-types 0.9.28 → 0.9.29

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types/lua/node.lua +12 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms-types",
3
- "version": "0.9.28",
3
+ "version": "0.9.29",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -20,16 +20,23 @@ local _Node = {}
20
20
  ---@field label string 节点标签
21
21
  ---@field type string 节点类型
22
22
  ---@field value string 节点值
23
+ ---@field placeholderValue string 输入框占位文字
23
24
  ---@field title string 节点名称
24
25
  ---@field visible boolean 是否可见
25
26
  ---@field enabled boolean 是否启用
26
- ---@field accessible boolean 是否可访问
27
- ---@field selected boolean 是否选中
28
27
  ---@field bounds NodeBounds 节点边界
29
28
  ---@field depth integer 节点深度
30
29
  ---@field index integer 节点索引
31
30
  ---@field parentId string 父节点ID
32
31
  ---@field childCount integer 子节点数量
32
+ ---@field hittable fun(self: NodeInfo): boolean 当前是否可点击
33
+ ---@field tap fun(self: NodeInfo): boolean 单击
34
+ ---@field doubleTap fun(self: NodeInfo): boolean 双击
35
+ ---@field press fun(self: NodeInfo, duration: integer|nil): boolean 长按,默认 500ms
36
+ ---@field scrollToVisible fun(self: NodeInfo): boolean 滚到可见
37
+ ---@field clearInput fun(self: NodeInfo): boolean 清空输入
38
+ ---@field input fun(self: NodeInfo, text: string): boolean 追加输入
39
+ ---@field setValue fun(self: NodeInfo, text: string): boolean 设置值
33
40
  ---@field clickCenter fun(self: NodeInfo, duration: integer|nil): boolean 点击中心
34
41
  ---@field clickRandom fun(self: NodeInfo, duration: integer|nil): boolean 点击随机位置
35
42
  ---@field parent fun(self: NodeInfo): NodeInfo|nil 父节点
@@ -52,6 +59,9 @@ local _Node = {}
52
59
  ---@field titleMatch fun(self: NodeSelector, match: string): NodeSelector 设置名称匹配
53
60
  ---@field identifier fun(self: NodeSelector, identifier: string): NodeSelector 设置标识符
54
61
  ---@field identifierMatch fun(self: NodeSelector, match: string): NodeSelector 设置标识符匹配
62
+ ---@field id fun(self: NodeSelector, id: string): NodeSelector 按节点 ID 筛选
63
+ ---@field placeholderValue fun(self: NodeSelector, placeholderValue: string): NodeSelector 按占位文字筛选
64
+ ---@field placeholderValueMatch fun(self: NodeSelector, match: string): NodeSelector 按占位文字匹配筛选
55
65
  ---@field type fun(self: NodeSelector, typetitle: string): NodeSelector 设置类型
56
66
  ---@field typeMatch fun(self: NodeSelector, match: string): NodeSelector 设置类型匹配
57
67
  ---@field value fun(self: NodeSelector, value: string): NodeSelector 设置值