ms-types 0.9.26 → 0.9.28

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.9.26",
3
+ "version": "0.9.28",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -1,8 +1,8 @@
1
- ---@meta opencv
1
+ ---@meta cv
2
2
  ---@class OpenCV
3
3
  local _OpenCV = {}
4
4
 
5
- --- OpenCV Mat 句柄模块;require("cv") 或 require("opencv")。方法与常量对齐 JS `cv` 运行时导出。
5
+ --- OpenCV Mat 句柄模块;require("cv")。方法与常量对齐 JS `cv` 运行时导出。
6
6
 
7
7
  --- absdiff
8
8
  ---@param ... any
@@ -724,6 +724,5 @@ function _OpenCV.warpPerspective(...) return nil end
724
724
  ---@return any
725
725
  function _OpenCV.zeros(...) return nil end
726
726
 
727
- package.loaded['opencv'] = _OpenCV
728
727
  package.loaded['cv'] = _OpenCV
729
728
  return _OpenCV
@@ -2,7 +2,7 @@
2
2
  ---@class DotOCR
3
3
  local _DotOCR = {}
4
4
 
5
- --- 点阵 OCR;require("dotocr") 或 require("dotOcr")
5
+ --- 点阵 OCR;require("dotocr")
6
6
 
7
7
  --- loadFont
8
8
  ---@param fontPath string
@@ -42,5 +42,4 @@ function _DotOCR.recognizeAbs(fontId, input, x, y, ex, ey, confidenceThreshold)
42
42
  function _DotOCR.findTextAbs(fontId, input, targetTexts, x, y, ex, ey, confidenceThreshold, exactMatch) return {} end
43
43
 
44
44
  package.loaded['dotocr'] = _DotOCR
45
- package.loaded['dotOcr'] = _DotOCR
46
45
  return _DotOCR
@@ -39,6 +39,7 @@ local _Node = {}
39
39
  ---@field previousSiblings fun(self: NodeInfo): NodeInfo[] 前兄弟节点
40
40
  ---@field nextSiblings fun(self: NodeInfo): NodeInfo[] 后兄弟节点
41
41
  ---@class NodeSelector 节点选择器
42
+ ---@field releaseNode fun(self: NodeSelector) 立刻释放选择器;也可 `local selector <close> = ...` 离开作用域自动释放
42
43
  ---@field clearSelector fun(self: NodeSelector): NodeSelector 清除选择器
43
44
  ---@field loadNode fun(self: NodeSelector, timeout: integer|nil): NodeSelector 加载节点
44
45
  ---@field xml fun(self: NodeSelector, timeout: integer|nil): string|nil 获取XML字符串
@@ -62,7 +63,7 @@ local _Node = {}
62
63
  ---@field childCount fun(self: NodeSelector, childCount: integer|string): NodeSelector 设置子节点数量
63
64
  ---@field bounds fun(self: NodeSelector, x: integer, y: integer, width: integer, height: integer): NodeSelector 设置边界
64
65
 
65
- --- 创建选择器(可自动释放)
66
+ --- 创建选择器。可用 `local selector <close> = ...` 自动释放,或用完后 `selector:releaseNode()` 手动释放。
66
67
  --- @param params SelectorParams|nil
67
68
  --- @return NodeSelector 选择器
68
69
  function _Node.createNodeSelector(params)
@@ -37,5 +37,4 @@ function _YoloCls.free(modelId) end
37
37
  function _YoloCls.freeAll() end
38
38
 
39
39
  package.loaded['yolocls'] = _YoloCls
40
- package.loaded['yoloCls'] = _YoloCls
41
40
  return _YoloCls
@@ -1,2 +0,0 @@
1
- ---@meta cv
2
- return require("opencv")
@@ -1,2 +0,0 @@
1
- ---@meta dotOcr
2
- return require("dotocr")
@@ -1,2 +0,0 @@
1
- ---@meta yoloCls
2
- return require("yolocls")