@swipt/api 0.1.0-nightly.41 → 0.1.0-nightly.43
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/device.d.ts +1 -0
- package/file-system.d.ts +7 -1
- package/file-system.mjs +1 -0
- package/package.json +3 -3
- package/repl.d.ts +3 -1
- package/screen.d.ts +5 -1
- package/swiplet.d.ts +2 -0
package/device.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export declare function unlock(options?: CallOptions): Promise<void>;
|
|
|
39
39
|
|
|
40
40
|
export declare function applicationEvents(options?: CallOptions): AsyncIterable<ApplicationStateEvent>;
|
|
41
41
|
export declare function installedApplications(options?: CallOptions): Promise<InstalledApplication[]>;
|
|
42
|
+
/** Answers a PNG file in cacheDirectory. */
|
|
42
43
|
export declare function applicationIcon(bundleId: string, options?: CallOptions): Promise<FileHandle>;
|
|
43
44
|
export declare function launchApplication(bundleId: string, options?: CallOptions & { url?: string; restart?: boolean }): Promise<void>;
|
|
44
45
|
|
package/file-system.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export declare const dataDirectory: DirectoryHandle;
|
|
2
|
+
/**
|
|
3
|
+
* Holds the files Swipt keeps for the Swiplet by default: screen recordings and their exports, and application icons.
|
|
4
|
+
* The system may delete its contents when storage runs low; clearing the Swiplet's data or deleting the Swiplet removes it.
|
|
5
|
+
*/
|
|
6
|
+
export declare const cacheDirectory: DirectoryHandle;
|
|
2
7
|
export declare const assets: DirectoryHandle;
|
|
3
8
|
|
|
4
9
|
export interface FileStat {
|
|
@@ -23,7 +28,8 @@ export interface FileHandle {
|
|
|
23
28
|
stat(): Promise<FileStat | null>;
|
|
24
29
|
text(): Promise<string>;
|
|
25
30
|
bytes(): Promise<Uint8Array>;
|
|
26
|
-
|
|
31
|
+
stream(): ReadableStream<Uint8Array>;
|
|
32
|
+
write(data: string | ArrayBuffer | ArrayBufferView | Blob | ReadableStream<ArrayBuffer | ArrayBufferView>): Promise<void>;
|
|
27
33
|
copy(to: FileHandle): Promise<void>;
|
|
28
34
|
move(to: FileHandle): Promise<void>;
|
|
29
35
|
delete(): Promise<void>;
|
package/file-system.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swipt/api",
|
|
3
|
-
"version": "0.1.0-nightly.
|
|
3
|
+
"version": "0.1.0-nightly.43",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@standard-schema/spec": "^1.1.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@expo/ui": "~58.0.
|
|
57
|
+
"@expo/ui": "~58.0.26",
|
|
58
58
|
"@types/react": "~19.3.0",
|
|
59
|
-
"expo": "~58.0.
|
|
59
|
+
"expo": "~58.0.22",
|
|
60
60
|
"expo-localization": "~58.0.5",
|
|
61
61
|
"expo-sqlite": "~58.0.15",
|
|
62
62
|
"react": "19.3.0",
|
package/repl.d.ts
CHANGED
|
@@ -2,8 +2,10 @@ declare global {
|
|
|
2
2
|
const accessibility: typeof import("@swipt/api/accessibility");
|
|
3
3
|
const input: typeof import("@swipt/api/input");
|
|
4
4
|
const device: typeof import("@swipt/api/device");
|
|
5
|
-
|
|
5
|
+
var screen: Screen;
|
|
6
|
+
interface Screen extends Readonly<typeof import("@swipt/api/screen")> {}
|
|
6
7
|
const image: typeof import("@swipt/api/image");
|
|
8
|
+
const dataDirectory: import("@swipt/api/file-system").DirectoryHandle;
|
|
7
9
|
const dialog: import("@swipt/api/swiplet").IntentDialog;
|
|
8
10
|
const args: readonly string[];
|
|
9
11
|
|
package/screen.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export interface ScreenRecording {
|
|
|
40
40
|
diff(from: number, to: number, options?: CallOptions & { readonly threshold?: number }): Promise<ImageDifference>;
|
|
41
41
|
find(target: ScreenTarget | readonly ScreenTarget[], options?: Omit<ScreenFindOptions, "timeoutMs"> & { readonly from?: number; readonly to?: number }): Promise<(ScreenMatch & { readonly time: number }) | null>;
|
|
42
42
|
export(options?: CallOptions & {
|
|
43
|
+
/** Omitted, the export goes to a new file in cacheDirectory. */
|
|
43
44
|
readonly file?: FileHandle | string;
|
|
44
45
|
readonly from?: number;
|
|
45
46
|
readonly to?: number;
|
|
@@ -85,5 +86,8 @@ export declare const frames: ObservableState<RasterImage>;
|
|
|
85
86
|
export declare function waitFor(predicate: (frame: RasterImage) => boolean | Promise<boolean>, options?: CallOptions & { readonly timeoutMs?: number }): Promise<RasterImage>;
|
|
86
87
|
export declare function waitForChange(options?: WaitOptions & { readonly from?: RasterImage }): Promise<RasterImage>;
|
|
87
88
|
export declare function waitForStable(options?: WaitOptions & { readonly durationMs?: number }): Promise<RasterImage>;
|
|
88
|
-
export declare function record(options?: CallOptions & {
|
|
89
|
+
export declare function record(options?: CallOptions & {
|
|
90
|
+
/** Omitted, the recording goes to a new file in cacheDirectory. */
|
|
91
|
+
readonly file?: FileHandle | string;
|
|
92
|
+
}): Promise<RecordingSession>;
|
|
89
93
|
export declare function openRecording(file: FileHandle | string, options?: CallOptions): Promise<ScreenRecording>;
|
package/swiplet.d.ts
CHANGED