@maaxyz/maa-node 5.0.0-alpha.2 → 5.0.0-alpha.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/dist/client.d.ts CHANGED
@@ -6,7 +6,6 @@ declare global {
6
6
  destroy(): void
7
7
  get identifier(): string
8
8
  bind_resource(resource: Resource): void
9
- register_sink(tasker?: Tasker, resource?: Resource, controller?: Controller): void
10
9
  connect(): Promise<void>
11
10
  disconnect(): void
12
11
  get connected(): boolean
@@ -16,7 +16,7 @@ declare global {
16
16
  | 'Controller.Action.Starting'
17
17
  | 'Controller.Action.Succeeded'
18
18
  | 'Controller.Action.Failed'
19
- ctrl_id: CtrlId
19
+ ctrl_id: number // CtrlId
20
20
  uuid: string
21
21
  } & (
22
22
  | {
@@ -5,7 +5,7 @@ declare global {
5
5
  | 'Resource.Loading.Starting'
6
6
  | 'Resource.Loading.Succeeded'
7
7
  | 'Resource.Loading.Failed'
8
- res_id: ResId
8
+ res_id: number // ResId
9
9
  path: string
10
10
  hash: string
11
11
  }
package/dist/tasker.d.ts CHANGED
@@ -22,15 +22,28 @@ declare global {
22
22
  detail?: string | Record<string, unknown> // Custom
23
23
  }
24
24
 
25
- type RecoDetail = {
25
+ type RecoDetailObject = {
26
26
  all: RecoDetailEntry[]
27
27
  filtered: RecoDetailEntry[]
28
28
  best: RecoDetailEntry | null
29
29
  }
30
30
 
31
+ type RecoDetailWithoutDraws = {
32
+ name: string
33
+ algorithm: string
34
+ hit: boolean
35
+ box: Rect
36
+ detail: RecoDetailObject
37
+ }
38
+
39
+ type RecoDetail = RecoDetailWithoutDraws & {
40
+ raw: ArrayBuffer
41
+ draws: ArrayBuffer[]
42
+ }
43
+
31
44
  type TaskerNotify = {
32
45
  msg: 'Task.Started' | 'Task.Completed' | 'Task.Failed'
33
- task_id: maa.TaskId
46
+ task_id: number // TaskId
34
47
  entry: string
35
48
  uuid: string
36
49
  hash: string
@@ -39,22 +52,22 @@ declare global {
39
52
  type TaskerContextNotify =
40
53
  | {
41
54
  msg: 'NextList.Starting' | 'NextList.Succeeded' | 'NextList.Failed'
42
- task_id: maa.TaskId
55
+ task_id: number // TaskId
43
56
  name: string
44
57
  list: string[]
45
58
  focus: unknown
46
59
  }
47
60
  | {
48
61
  msg: 'Recognition.Starting' | 'Recognition.Succeeded' | 'Recognition.Failed'
49
- task_id: maa.TaskId
50
- reco_id: maa.RecoId
62
+ task_id: number // TaskId
63
+ reco_id: number // RecoId
51
64
  name: string
52
65
  focus: unknown
53
66
  }
54
67
  | {
55
68
  msg: 'Action.Starting' | 'Action.Succeeded' | 'Action.Failed'
56
- task_id: maa.TaskId
57
- node_id: maa.NodeId
69
+ task_id: number // TaskId
70
+ node_id: number // NodeId
58
71
  name: string
59
72
  focus: unknown
60
73
  }
package/package.json CHANGED
@@ -4,8 +4,14 @@
4
4
  "main": "./dist/index-client.js",
5
5
  "types": "./dist/index-client.d.ts",
6
6
  "exports": {
7
- ".": "./dist/index-server.js",
8
- "./server": "./dist/index-server.d.ts"
7
+ ".": {
8
+ "default": "./dist/index-client.js",
9
+ "types": "./dist/index-client.d.ts"
10
+ },
11
+ "./server": {
12
+ "default": "./dist/index-server.js",
13
+ "types": "./dist/index-server.d.ts"
14
+ }
9
15
  },
10
16
  "repository": {
11
17
  "type": "git",
@@ -22,13 +28,13 @@
22
28
  "prettier": "^3.5.2",
23
29
  "typescript": "^5.8.2"
24
30
  },
25
- "version": "5.0.0-alpha.2",
31
+ "version": "5.0.0-alpha.4",
26
32
  "optionalDependencies": {
27
- "@maaxyz/maa-node-darwin-arm64": "5.0.0-alpha.2",
28
- "@maaxyz/maa-node-darwin-x64": "5.0.0-alpha.2",
29
- "@maaxyz/maa-node-linux-arm64": "5.0.0-alpha.2",
30
- "@maaxyz/maa-node-linux-x64": "5.0.0-alpha.2",
31
- "@maaxyz/maa-node-win32-arm64": "5.0.0-alpha.2",
32
- "@maaxyz/maa-node-win32-x64": "5.0.0-alpha.2"
33
+ "@maaxyz/maa-node-darwin-arm64": "5.0.0-alpha.4",
34
+ "@maaxyz/maa-node-darwin-x64": "5.0.0-alpha.4",
35
+ "@maaxyz/maa-node-linux-arm64": "5.0.0-alpha.4",
36
+ "@maaxyz/maa-node-linux-x64": "5.0.0-alpha.4",
37
+ "@maaxyz/maa-node-win32-arm64": "5.0.0-alpha.4",
38
+ "@maaxyz/maa-node-win32-x64": "5.0.0-alpha.4"
33
39
  }
34
40
  }