@midscene/shared 0.30.1 → 0.30.2-beta-20250930144216.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.
@@ -1,10 +1,6 @@
1
1
  import { Buffer } from 'node:buffer';
2
2
  import type Jimp from 'jimp';
3
- export interface Size {
4
- width: number;
5
- height: number;
6
- dpr?: number;
7
- }
3
+ import type { Size } from '../types';
8
4
  export interface ImageInfo extends Size {
9
5
  jimpImage: Jimp;
10
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/shared",
3
- "version": "0.30.1",
3
+ "version": "0.30.2-beta-20250930144216.0",
4
4
  "repository": "https://github.com/web-infra-dev/midscene",
5
5
  "homepage": "https://midscenejs.com/",
6
6
  "types": "./dist/types/index.d.ts",
package/src/img/info.ts CHANGED
@@ -1,14 +1,9 @@
1
1
  import assert from 'node:assert';
2
2
  import { Buffer } from 'node:buffer';
3
3
  import type Jimp from 'jimp';
4
+ import type { Size } from '../types';
4
5
  import getJimp from './get-jimp';
5
6
 
6
- export interface Size {
7
- width: number;
8
- height: number;
9
- dpr?: number;
10
- }
11
-
12
7
  export interface ImageInfo extends Size {
13
8
  jimpImage: Jimp;
14
9
  }
@@ -7,9 +7,9 @@ export interface Point {
7
7
  }
8
8
 
9
9
  export interface Size {
10
- width: number; // device independent window size
11
- height: number;
12
- dpr?: number; // the scale factor of the screenshots
10
+ width: number; // The image sent to AI model will be resized to this width, also the coordinates in the action space will be scaled to the range [0, width]. Usually you should set it to the logical pixel size
11
+ height: number; // The image sent to AI model will be resized to this height, also the coordinates in the action space will be scaled to the range [0, height]. Usually you should set it to the logical pixel size
12
+ dpr?: number; // this is deprecated, do NOT use it
13
13
  }
14
14
 
15
15
  export type Rect = Point & Size & { zoom?: number };