@swipt/api 0.1.0-nightly.39 → 0.1.0-nightly.40
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/accessibility.mjs +1 -1
- package/device.mjs +1 -1
- package/image.d.ts +1 -1
- package/image.mjs +1 -1
- package/index.d.ts +4 -0
- package/input.mjs +1 -1
- package/package.json +1 -1
- package/repl.d.ts +1 -0
- package/screen.mjs +1 -1
- package/swiplet.mjs +1 -1
package/accessibility.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const outside = () => {
|
|
2
|
-
throw new Error("@swipt/api/accessibility runs inside Swipt; build the swiplet with `swipt build`");
|
|
2
|
+
throw new Error("@swipt/api/accessibility runs inside Swipt; build the swiplet with `swipt project build`");
|
|
3
3
|
};
|
|
4
4
|
|
|
5
5
|
export const snapshot = outside;
|
package/device.mjs
CHANGED
package/image.d.ts
CHANGED
|
@@ -81,6 +81,7 @@ export interface RasterImage {
|
|
|
81
81
|
readonly scale: number;
|
|
82
82
|
readonly frame: Rect;
|
|
83
83
|
readonly time: number | null;
|
|
84
|
+
readonly timestamp: number | null;
|
|
84
85
|
|
|
85
86
|
crop(rect: Rect): RasterImage;
|
|
86
87
|
resize(scale: number): RasterImage;
|
|
@@ -98,7 +99,6 @@ export interface RasterImage {
|
|
|
98
99
|
save(file: FileHandle | string, options?: CallOptions & { readonly format?: ImageFormat; readonly quality?: number }): Promise<FileHandle>;
|
|
99
100
|
pixel(point: Point, options?: CallOptions): Promise<[red: number, green: number, blue: number, alpha: number]>;
|
|
100
101
|
stats(options?: CallOptions & { readonly region?: Rect }): Promise<ImageStats>;
|
|
101
|
-
release(): void;
|
|
102
102
|
|
|
103
103
|
find(template: RasterImage, options?: TemplateMatchOptions): Promise<TemplateMatch | null>;
|
|
104
104
|
findAll(template: RasterImage, options?: TemplateMatchOptions & { readonly limit?: number; readonly overlap?: number }): Promise<TemplateMatch[]>;
|
package/image.mjs
CHANGED
package/index.d.ts
CHANGED
|
@@ -21,3 +21,7 @@ export type Jsonify<T> = T extends string | number | boolean | null ? T
|
|
|
21
21
|
: T extends readonly (infer U)[] ? Jsonify<U>[]
|
|
22
22
|
: T extends object ? { [K in keyof T]: Jsonify<Exclude<T[K], undefined>> }
|
|
23
23
|
: never;
|
|
24
|
+
|
|
25
|
+
declare global {
|
|
26
|
+
function sleep(ms: number, options?: CallOptions): Promise<void>;
|
|
27
|
+
}
|
package/input.mjs
CHANGED
package/package.json
CHANGED
package/repl.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ declare global {
|
|
|
5
5
|
const screen: typeof import("@swipt/api/screen");
|
|
6
6
|
const image: typeof import("@swipt/api/image");
|
|
7
7
|
const dialog: import("@swipt/api/swiplet").IntentDialog;
|
|
8
|
+
const args: readonly string[];
|
|
8
9
|
|
|
9
10
|
function show(image: import("@swipt/api/image").RasterImage): void;
|
|
10
11
|
}
|
package/screen.mjs
CHANGED
package/swiplet.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const outside = () => {
|
|
2
|
-
throw new Error("@swipt/api/swiplet runs inside Swipt; build the swiplet with `swipt build`");
|
|
2
|
+
throw new Error("@swipt/api/swiplet runs inside Swipt; build the swiplet with `swipt project build`");
|
|
3
3
|
};
|
|
4
4
|
|
|
5
5
|
export const defineExtension = outside;
|