@midscene/core 0.1.0 → 0.1.1
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/es/ai-model.js +4207 -5
- package/dist/es/image.js +26 -12
- package/dist/es/index.js +4190 -5
- package/dist/lib/ai-model.js +4223 -41
- package/dist/lib/image.js +33 -19
- package/dist/lib/index.js +4174 -9
- package/dist/types/image.d.ts +3 -4
- package/package.json +1 -1
package/dist/types/image.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Buffer } from 'buffer';
|
|
1
|
+
import { Buffer } from 'node:buffer';
|
|
2
2
|
import { S as Size, R as Rect, g as UISection, U as UIContext, t as Color } from './types-1f7912d5.js';
|
|
3
|
-
import { Buffer as Buffer$1 } from 'node:buffer';
|
|
4
3
|
import 'openai/resources';
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -79,7 +78,7 @@ declare function calculateNewDimensions(originalWidth: number, originalHeight: n
|
|
|
79
78
|
* @param image - The image to be trimmed. This can be a file path or a Buffer object containing the image data
|
|
80
79
|
* @returns A Promise that resolves to an object containing the trimming information. If the image does not need to be trimmed, this object will be null
|
|
81
80
|
*/
|
|
82
|
-
declare function trimImage(image: string | Buffer
|
|
81
|
+
declare function trimImage(image: string | Buffer): Promise<{
|
|
83
82
|
trimOffsetLeft: number;
|
|
84
83
|
trimOffsetTop: number;
|
|
85
84
|
width: number;
|
|
@@ -101,7 +100,7 @@ declare function trimImage(image: string | Buffer$1): Promise<{
|
|
|
101
100
|
* @returns A Promise that resolves to a rectangle object representing the aligned coordinates
|
|
102
101
|
* @throws Error if there is an error during image processing
|
|
103
102
|
*/
|
|
104
|
-
declare function alignCoordByTrim(image: string | Buffer
|
|
103
|
+
declare function alignCoordByTrim(image: string | Buffer, centerRect: Rect): Promise<Rect>;
|
|
105
104
|
|
|
106
105
|
/**
|
|
107
106
|
* Composes a section diagram based on the given sections and context
|