@snapbox/pkg-automation 1.0.1 → 1.0.2
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/build/SnapboxPkgAutomationModule.d.ts +1 -6
- package/build/SnapboxPkgAutomationModule.d.ts.map +1 -1
- package/build/SnapboxPkgAutomationModule.js.map +1 -1
- package/build/SnapboxPkgAutomationModule.web.d.ts +1 -4
- package/build/SnapboxPkgAutomationModule.web.d.ts.map +1 -1
- package/build/SnapboxPkgAutomationModule.web.js +0 -16
- package/build/SnapboxPkgAutomationModule.web.js.map +1 -1
- package/build/index.d.ts +21 -15
- package/build/index.d.ts.map +1 -1
- package/build/index.js +42 -42
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- package/build/SnapboxPkgAutomation.types.d.ts +0 -23
- package/build/SnapboxPkgAutomation.types.d.ts.map +0 -1
- package/build/SnapboxPkgAutomation.types.js +0 -2
- package/build/SnapboxPkgAutomation.types.js.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { NativeModule } from "expo";
|
|
2
2
|
import { PermissionResponse } from "expo-modules-core";
|
|
3
|
-
|
|
4
|
-
declare class SnapboxPkgAutomationModule extends NativeModule<SnapboxPkgAutomationModuleEvents> {
|
|
3
|
+
declare class SnapboxPkgAutomationModule extends NativeModule {
|
|
5
4
|
tap(x: number, y: number): Promise<boolean>;
|
|
6
5
|
doubleTap(x: number, y: number): Promise<boolean>;
|
|
7
6
|
swipe(x1: number, y1: number, x2: number, y2: number, duration: number): Promise<boolean>;
|
|
@@ -13,10 +12,6 @@ declare class SnapboxPkgAutomationModule extends NativeModule<SnapboxPkgAutomati
|
|
|
13
12
|
launchApp(packageName: string): Promise<boolean>;
|
|
14
13
|
getPermissionsAsync(): Promise<PermissionResponse>;
|
|
15
14
|
requestPermissionsAsync(): Promise<PermissionResponse>;
|
|
16
|
-
showEditor(options?: EditorOptions): Promise<void>;
|
|
17
|
-
hideEditor(): Promise<void>;
|
|
18
|
-
getOverlayPermissionsAsync(): Promise<PermissionResponse>;
|
|
19
|
-
requestOverlayPermissionsAsync(): Promise<PermissionResponse>;
|
|
20
15
|
}
|
|
21
16
|
declare const _default: SnapboxPkgAutomationModule;
|
|
22
17
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnapboxPkgAutomationModule.d.ts","sourceRoot":"","sources":["../src/SnapboxPkgAutomationModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,MAAM,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SnapboxPkgAutomationModule.d.ts","sourceRoot":"","sources":["../src/SnapboxPkgAutomationModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,MAAM,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,OAAO,0BAA2B,SAAQ,YAAY;IAC3D,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAC3C,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IACjD,KAAK,CACH,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,OAAO,CAAC;IACnB,SAAS,CACP,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,OAAO,CAAC;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IACxC,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IACxB,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IACxB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAChC,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAChD,mBAAmB,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAClD,uBAAuB,IAAI,OAAO,CAAC,kBAAkB,CAAC;CACvD;;AAGD,wBAEE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnapboxPkgAutomationModule.js","sourceRoot":"","sources":["../src/SnapboxPkgAutomationModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"SnapboxPkgAutomationModule.js","sourceRoot":"","sources":["../src/SnapboxPkgAutomationModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AA2BzD,yDAAyD;AACzD,eAAe,mBAAmB,CAChC,sBAAsB,CACvB,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from \"expo\";\nimport { PermissionResponse } from \"expo-modules-core\";\n\ndeclare class SnapboxPkgAutomationModule extends NativeModule {\n tap(x: number, y: number): Promise<boolean>;\n doubleTap(x: number, y: number): Promise<boolean>;\n swipe(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n duration: number,\n ): Promise<boolean>;\n longPress(\n x: number,\n y: number,\n duration: number,\n ): Promise<boolean>;\n typeText(text: string): Promise<boolean>;\n back(): Promise<boolean>;\n home(): Promise<boolean>;\n getCurrentApp(): Promise<string>;\n launchApp(packageName: string): Promise<boolean>;\n getPermissionsAsync(): Promise<PermissionResponse>;\n requestPermissionsAsync(): Promise<PermissionResponse>;\n}\n\n// This call loads the native module object from the JSI.\nexport default requireNativeModule<SnapboxPkgAutomationModule>(\n \"SnapboxPkgAutomation\",\n);\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { NativeModule } from "expo";
|
|
2
2
|
import { PermissionResponse } from "expo-modules-core";
|
|
3
|
-
|
|
4
|
-
declare class SnapboxPkgAutomationModule extends NativeModule<SnapboxPkgAutomationModuleEvents> {
|
|
3
|
+
declare class SnapboxPkgAutomationModule extends NativeModule {
|
|
5
4
|
tap(x: number, y: number): Promise<boolean>;
|
|
6
5
|
doubleTap(x: number, y: number): Promise<boolean>;
|
|
7
6
|
swipe(x1: number, y1: number, x2: number, y2: number, duration: number): Promise<boolean>;
|
|
@@ -13,8 +12,6 @@ declare class SnapboxPkgAutomationModule extends NativeModule<SnapboxPkgAutomati
|
|
|
13
12
|
launchApp(packageName: string): Promise<boolean>;
|
|
14
13
|
getPermissionsAsync(): Promise<PermissionResponse>;
|
|
15
14
|
requestPermissionsAsync(): Promise<PermissionResponse>;
|
|
16
|
-
getOverlayPermissionsAsync(): Promise<PermissionResponse>;
|
|
17
|
-
requestOverlayPermissionsAsync(): Promise<PermissionResponse>;
|
|
18
15
|
}
|
|
19
16
|
declare const _default: typeof SnapboxPkgAutomationModule;
|
|
20
17
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnapboxPkgAutomationModule.web.d.ts","sourceRoot":"","sources":["../src/SnapboxPkgAutomationModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAoB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SnapboxPkgAutomationModule.web.d.ts","sourceRoot":"","sources":["../src/SnapboxPkgAutomationModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAoB,MAAM,mBAAmB,CAAC;AAEzE,cAAM,0BAA2B,SAAQ,YAAY;IAC7C,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAG3C,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAGjD,KAAK,CACT,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,OAAO,CAAC;IAGb,SAAS,CACb,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,OAAO,CAAC;IAGb,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAGxC,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAGxB,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAGxB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAGhC,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAGhD,mBAAmB,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAQlD,uBAAuB,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAQ7D;;AAED,wBAGE"}
|
|
@@ -44,22 +44,6 @@ class SnapboxPkgAutomationModule extends NativeModule {
|
|
|
44
44
|
canAskAgain: false,
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
async getOverlayPermissionsAsync() {
|
|
48
|
-
return {
|
|
49
|
-
status: PermissionStatus.DENIED,
|
|
50
|
-
expires: "never",
|
|
51
|
-
granted: false,
|
|
52
|
-
canAskAgain: false,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
async requestOverlayPermissionsAsync() {
|
|
56
|
-
return {
|
|
57
|
-
status: PermissionStatus.DENIED,
|
|
58
|
-
expires: "never",
|
|
59
|
-
granted: false,
|
|
60
|
-
canAskAgain: false,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
47
|
}
|
|
64
48
|
export default registerWebModule(SnapboxPkgAutomationModule, "SnapboxPkgAutomationModule");
|
|
65
49
|
//# sourceMappingURL=SnapboxPkgAutomationModule.web.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnapboxPkgAutomationModule.web.js","sourceRoot":"","sources":["../src/SnapboxPkgAutomationModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAsB,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SnapboxPkgAutomationModule.web.js","sourceRoot":"","sources":["../src/SnapboxPkgAutomationModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAsB,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,MAAM,0BAA2B,SAAQ,YAAY;IACnD,KAAK,CAAC,GAAG,CAAC,CAAS,EAAE,CAAS;QAC5B,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,KAAK,CAAC,SAAS,CAAC,CAAS,EAAE,CAAS;QAClC,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,KAAK,CAAC,KAAK,CACT,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,QAAgB;QAEhB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,KAAK,CAAC,SAAS,CACb,CAAS,EACT,CAAS,EACT,QAAgB;QAEhB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,KAAK,CAAC,QAAQ,CAAC,IAAY;QACzB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,KAAK,CAAC,IAAI;QACR,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,KAAK,CAAC,IAAI;QACR,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,KAAK,CAAC,aAAa;QACjB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,KAAK,CAAC,SAAS,CAAC,WAAmB;QACjC,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,KAAK,CAAC,mBAAmB;QACvB,OAAO;YACL,MAAM,EAAE,gBAAgB,CAAC,MAAM;YAC/B,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,KAAK;SACnB,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,uBAAuB;QAC3B,OAAO;YACL,MAAM,EAAE,gBAAgB,CAAC,MAAM;YAC/B,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,KAAK;SACnB,CAAC;IACJ,CAAC;CACF;AAED,eAAe,iBAAiB,CAC9B,0BAA0B,EAC1B,4BAA4B,CAC7B,CAAC","sourcesContent":["import { NativeModule, registerWebModule } from \"expo\";\nimport { PermissionResponse, PermissionStatus } from \"expo-modules-core\";\n\nclass SnapboxPkgAutomationModule extends NativeModule {\n async tap(x: number, y: number): Promise<boolean> {\n throw new Error(\"Not supported on web\");\n }\n async doubleTap(x: number, y: number): Promise<boolean> {\n throw new Error(\"Not supported on web\");\n }\n async swipe(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n duration: number,\n ): Promise<boolean> {\n throw new Error(\"Not supported on web\");\n }\n async longPress(\n x: number,\n y: number,\n duration: number,\n ): Promise<boolean> {\n throw new Error(\"Not supported on web\");\n }\n async typeText(text: string): Promise<boolean> {\n throw new Error(\"Not supported on web\");\n }\n async back(): Promise<boolean> {\n throw new Error(\"Not supported on web\");\n }\n async home(): Promise<boolean> {\n throw new Error(\"Not supported on web\");\n }\n async getCurrentApp(): Promise<string> {\n throw new Error(\"Not supported on web\");\n }\n async launchApp(packageName: string): Promise<boolean> {\n throw new Error(\"Not supported on web\");\n }\n async getPermissionsAsync(): Promise<PermissionResponse> {\n return {\n status: PermissionStatus.DENIED,\n expires: \"never\",\n granted: true,\n canAskAgain: false,\n };\n }\n async requestPermissionsAsync(): Promise<PermissionResponse> {\n return {\n status: PermissionStatus.DENIED,\n expires: \"never\",\n granted: false,\n canAskAgain: false,\n };\n }\n}\n\nexport default registerWebModule(\n SnapboxPkgAutomationModule,\n \"SnapboxPkgAutomationModule\",\n);\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
export * from "./SnapboxPkgAutomation.types";
|
|
2
|
-
export { default } from "./SnapboxPkgAutomationModule";
|
|
3
1
|
import { PermissionResponse } from "expo-modules-core";
|
|
4
|
-
|
|
2
|
+
export declare const tap: (x: number, y: number) => Promise<boolean>;
|
|
3
|
+
export declare const doubleTap: (x: number, y: number) => Promise<boolean>;
|
|
4
|
+
export declare const swipe: (x1: number, y1: number, x2: number, y2: number, duration: number) => Promise<boolean>;
|
|
5
|
+
export declare const longPress: (x: number, y: number, duration: number) => Promise<boolean>;
|
|
6
|
+
export declare const typeText: (text: string) => Promise<boolean>;
|
|
7
|
+
export declare const back: () => Promise<boolean>;
|
|
8
|
+
export declare const home: () => Promise<boolean>;
|
|
9
|
+
export declare const getCurrentApp: () => Promise<string>;
|
|
10
|
+
export declare const launchApp: (packageName: string) => Promise<boolean>;
|
|
5
11
|
export declare const useAutomationPermissions: (options?: import("expo-modules-core").PermissionHookOptions<object> | undefined) => [PermissionResponse | null, () => Promise<PermissionResponse>, () => Promise<PermissionResponse>];
|
|
6
|
-
export declare const useOverlayPermissions: (options?: import("expo-modules-core").PermissionHookOptions<object> | undefined) => [PermissionResponse | null, () => Promise<PermissionResponse>, () => Promise<PermissionResponse>];
|
|
7
|
-
export declare function tap(x: number, y: number): Promise<boolean>;
|
|
8
|
-
export declare function doubleTap(x: number, y: number): Promise<boolean>;
|
|
9
|
-
export declare function swipe(x1: number, y1: number, x2: number, y2: number, duration: number): Promise<boolean>;
|
|
10
|
-
export declare function longPress(x: number, y: number, duration: number): Promise<boolean>;
|
|
11
|
-
export declare function typeText(text: string): Promise<boolean>;
|
|
12
|
-
export declare function back(): Promise<boolean>;
|
|
13
|
-
export declare function home(): Promise<boolean>;
|
|
14
|
-
export declare function getCurrentApp(): Promise<string>;
|
|
15
|
-
export declare function launchApp(packageName: string): Promise<boolean>;
|
|
16
|
-
export declare function showEditor(options?: EditorOptions): Promise<void>;
|
|
17
|
-
export declare function hideEditor(): Promise<void>;
|
|
18
12
|
export { PermissionResponse };
|
|
13
|
+
declare const SnapboxPkgAutomation: {
|
|
14
|
+
tap: (x: number, y: number) => Promise<boolean>;
|
|
15
|
+
doubleTap: (x: number, y: number) => Promise<boolean>;
|
|
16
|
+
swipe: (x1: number, y1: number, x2: number, y2: number, duration: number) => Promise<boolean>;
|
|
17
|
+
longPress: (x: number, y: number, duration: number) => Promise<boolean>;
|
|
18
|
+
typeText: (text: string) => Promise<boolean>;
|
|
19
|
+
back: () => Promise<boolean>;
|
|
20
|
+
home: () => Promise<boolean>;
|
|
21
|
+
getCurrentApp: () => Promise<string>;
|
|
22
|
+
launchApp: (packageName: string) => Promise<boolean>;
|
|
23
|
+
};
|
|
24
|
+
export default SnapboxPkgAutomation;
|
|
19
25
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG7E,eAAO,MAAM,GAAG,GAAU,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,OAAO,CAA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IT,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;CAqBrE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
export * from "./SnapboxPkgAutomation.types";
|
|
2
|
-
export { default } from "./SnapboxPkgAutomationModule";
|
|
3
1
|
import { createPermissionHook } from "expo-modules-core";
|
|
4
|
-
import
|
|
2
|
+
import NativeModule from "./SnapboxPkgAutomationModule";
|
|
3
|
+
export const tap = async (x, y) => {
|
|
4
|
+
return await NativeModule.tap(x, y);
|
|
5
|
+
};
|
|
6
|
+
export const doubleTap = async (x, y) => {
|
|
7
|
+
return await NativeModule.doubleTap(x, y);
|
|
8
|
+
};
|
|
9
|
+
export const swipe = async (x1, y1, x2, y2, duration) => {
|
|
10
|
+
return await NativeModule.swipe(x1, y1, x2, y2, duration);
|
|
11
|
+
};
|
|
12
|
+
export const longPress = async (x, y, duration) => {
|
|
13
|
+
return await NativeModule.longPress(x, y, duration);
|
|
14
|
+
};
|
|
15
|
+
export const typeText = async (text) => {
|
|
16
|
+
return await NativeModule.typeText(text);
|
|
17
|
+
};
|
|
18
|
+
export const back = async () => {
|
|
19
|
+
return await NativeModule.back();
|
|
20
|
+
};
|
|
21
|
+
export const home = async () => {
|
|
22
|
+
return await NativeModule.home();
|
|
23
|
+
};
|
|
24
|
+
export const getCurrentApp = async () => {
|
|
25
|
+
return await NativeModule.getCurrentApp();
|
|
26
|
+
};
|
|
27
|
+
export const launchApp = async (packageName) => {
|
|
28
|
+
return await NativeModule.launchApp(packageName);
|
|
29
|
+
};
|
|
5
30
|
export const useAutomationPermissions = createPermissionHook({
|
|
6
|
-
getMethod:
|
|
7
|
-
requestMethod:
|
|
31
|
+
getMethod: NativeModule.getPermissionsAsync,
|
|
32
|
+
requestMethod: NativeModule.requestPermissionsAsync,
|
|
8
33
|
});
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
export function longPress(x, y, duration) {
|
|
23
|
-
return SnapboxPkgAutomationModule.longPress(x, y, duration);
|
|
24
|
-
}
|
|
25
|
-
export function typeText(text) {
|
|
26
|
-
return SnapboxPkgAutomationModule.typeText(text);
|
|
27
|
-
}
|
|
28
|
-
export function back() {
|
|
29
|
-
return SnapboxPkgAutomationModule.back();
|
|
30
|
-
}
|
|
31
|
-
export function home() {
|
|
32
|
-
return SnapboxPkgAutomationModule.home();
|
|
33
|
-
}
|
|
34
|
-
export function getCurrentApp() {
|
|
35
|
-
return SnapboxPkgAutomationModule.getCurrentApp();
|
|
36
|
-
}
|
|
37
|
-
export function launchApp(packageName) {
|
|
38
|
-
return SnapboxPkgAutomationModule.launchApp(packageName);
|
|
39
|
-
}
|
|
40
|
-
export function showEditor(options) {
|
|
41
|
-
return SnapboxPkgAutomationModule.showEditor(options);
|
|
42
|
-
}
|
|
43
|
-
export function hideEditor() {
|
|
44
|
-
return SnapboxPkgAutomationModule.hideEditor();
|
|
45
|
-
}
|
|
34
|
+
const SnapboxPkgAutomation = {
|
|
35
|
+
tap,
|
|
36
|
+
doubleTap,
|
|
37
|
+
swipe,
|
|
38
|
+
longPress,
|
|
39
|
+
typeText,
|
|
40
|
+
back,
|
|
41
|
+
home,
|
|
42
|
+
getCurrentApp,
|
|
43
|
+
launchApp,
|
|
44
|
+
};
|
|
45
|
+
export default SnapboxPkgAutomation;
|
|
46
46
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAsB,MAAM,mBAAmB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MAAM,aAAa,GAAG,KAAK,IAAqB,EAAE;IACvD,OAAO,MAAM,YAAY,CAAC,aAAa,EAAE,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAAE,WAAmB,EAAoB,EAAE;IACvE,OAAO,MAAM,YAAY,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;AACnD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;IAC3D,SAAS,EAAE,YAAY,CAAC,mBAAmB;IAC3C,aAAa,EAAE,YAAY,CAAC,uBAAuB;CACpD,CAAC,CAAC;AAIH,MAAM,oBAAoB,GAAG;IAC3B,GAAG;IACH,SAAS;IACT,KAAK;IACL,SAAS;IACT,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,aAAa;IACb,SAAS;CACV,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["import { createPermissionHook, PermissionResponse } from \"expo-modules-core\";\nimport NativeModule from \"./SnapboxPkgAutomationModule\";\n\nexport const tap = async (x: number, y: number): Promise<boolean> => {\n return await NativeModule.tap(x, y);\n};\n\nexport const doubleTap = async (x: number, y: number): Promise<boolean> => {\n return await NativeModule.doubleTap(x, y);\n};\n\nexport const swipe = async (\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n duration: number,\n): Promise<boolean> => {\n return await NativeModule.swipe(x1, y1, x2, y2, duration);\n};\n\nexport const longPress = async (\n x: number,\n y: number,\n duration: number,\n): Promise<boolean> => {\n return await NativeModule.longPress(x, y, duration);\n};\n\nexport const typeText = async (text: string): Promise<boolean> => {\n return await NativeModule.typeText(text);\n};\n\nexport const back = async (): Promise<boolean> => {\n return await NativeModule.back();\n};\n\nexport const home = async (): Promise<boolean> => {\n return await NativeModule.home();\n};\n\nexport const getCurrentApp = async (): Promise<string> => {\n return await NativeModule.getCurrentApp();\n};\n\nexport const launchApp = async (packageName: string): Promise<boolean> => {\n return await NativeModule.launchApp(packageName);\n};\n\nexport const useAutomationPermissions = createPermissionHook({\n getMethod: NativeModule.getPermissionsAsync,\n requestMethod: NativeModule.requestPermissionsAsync,\n});\n\nexport { PermissionResponse };\n\nconst SnapboxPkgAutomation = {\n tap,\n doubleTap,\n swipe,\n longPress,\n typeText,\n back,\n home,\n getCurrentApp,\n launchApp,\n};\n\nexport default SnapboxPkgAutomation;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snapbox/pkg-automation",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "My new module",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"homepage": "https://github.com/expo/expo#readme",
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/react": "~19.2.2",
|
|
33
|
-
"expo": "^55.0.
|
|
33
|
+
"expo": "^55.0.19",
|
|
34
34
|
"expo-module-scripts": "^55.0.2",
|
|
35
35
|
"react-native": "0.83.6",
|
|
36
36
|
"typescript": "~5.9.2"
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface EditorAction {
|
|
2
|
-
type: "click" | "swipe";
|
|
3
|
-
x?: number;
|
|
4
|
-
y?: number;
|
|
5
|
-
x1?: number;
|
|
6
|
-
y1?: number;
|
|
7
|
-
x2?: number;
|
|
8
|
-
y2?: number;
|
|
9
|
-
duration?: number;
|
|
10
|
-
}
|
|
11
|
-
export interface EditorOptions {
|
|
12
|
-
interval?: number;
|
|
13
|
-
repetitions?: number;
|
|
14
|
-
actions?: EditorAction[];
|
|
15
|
-
}
|
|
16
|
-
export type SnapboxPkgAutomationModuleEvents = {
|
|
17
|
-
onEditorSave: (event: {
|
|
18
|
-
actions: EditorAction[];
|
|
19
|
-
interval: number;
|
|
20
|
-
repetitions: number;
|
|
21
|
-
}) => void;
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=SnapboxPkgAutomation.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SnapboxPkgAutomation.types.d.ts","sourceRoot":"","sources":["../src/SnapboxPkgAutomation.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC7C,YAAY,EAAE,CAAC,KAAK,EAAE;QACpB,OAAO,EAAE,YAAY,EAAE,CAAC;QACxB,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;KACrB,KAAK,IAAI,CAAC;CACZ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SnapboxPkgAutomation.types.js","sourceRoot":"","sources":["../src/SnapboxPkgAutomation.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface EditorAction {\n type: \"click\" | \"swipe\";\n x?: number;\n y?: number;\n x1?: number;\n y1?: number;\n x2?: number;\n y2?: number;\n duration?: number;\n}\n\nexport interface EditorOptions {\n interval?: number;\n repetitions?: number;\n actions?: EditorAction[];\n}\n\nexport type SnapboxPkgAutomationModuleEvents = {\n onEditorSave: (event: {\n actions: EditorAction[];\n interval: number;\n repetitions: number;\n }) => void;\n};\n"]}
|