@snapbox/pkg-automation 1.0.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/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # @snapbox/pkg-automation
2
+
3
+ My new module
4
+
5
+ # API documentation
6
+
7
+ - [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/@snapbox/pkg-automation/)
8
+ - [Documentation for the main branch](https://docs.expo.dev/versions/unversioned/sdk/@snapbox/pkg-automation/)
9
+
10
+ # Installation in managed Expo projects
11
+
12
+ For [managed](https://docs.expo.dev/archive/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](#api-documentation). If you follow the link and there is no documentation available then this library is not yet usable within managed projects — it is likely to be included in an upcoming Expo SDK release.
13
+
14
+ # Installation in bare React Native projects
15
+
16
+ For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
17
+
18
+ ### Add the package to your npm dependencies
19
+
20
+ ```
21
+ npm install @snapbox/pkg-automation
22
+ ```
23
+
24
+ ### Configure for Android
25
+
26
+
27
+
28
+
29
+ ### Configure for iOS
30
+
31
+ Run `npx pod-install` after installing the npm package.
32
+
33
+ # Contributing
34
+
35
+ Contributions are very welcome! Please refer to guidelines described in the [contributing guide]( https://github.com/expo/expo#contributing).
@@ -0,0 +1,23 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SnapboxPkgAutomation.types.js.map
@@ -0,0 +1 @@
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"]}
@@ -0,0 +1,23 @@
1
+ import { NativeModule } from "expo";
2
+ import { PermissionResponse } from "expo-modules-core";
3
+ import { EditorOptions, SnapboxPkgAutomationModuleEvents } from "./SnapboxPkgAutomation.types";
4
+ declare class SnapboxPkgAutomationModule extends NativeModule<SnapboxPkgAutomationModuleEvents> {
5
+ tap(x: number, y: number): Promise<boolean>;
6
+ doubleTap(x: number, y: number): Promise<boolean>;
7
+ swipe(x1: number, y1: number, x2: number, y2: number, duration: number): Promise<boolean>;
8
+ longPress(x: number, y: number, duration: number): Promise<boolean>;
9
+ typeText(text: string): Promise<boolean>;
10
+ back(): Promise<boolean>;
11
+ home(): Promise<boolean>;
12
+ getCurrentApp(): Promise<string>;
13
+ launchApp(packageName: string): Promise<boolean>;
14
+ getPermissionsAsync(): Promise<PermissionResponse>;
15
+ requestPermissionsAsync(): Promise<PermissionResponse>;
16
+ showEditor(options?: EditorOptions): Promise<void>;
17
+ hideEditor(): Promise<void>;
18
+ getOverlayPermissionsAsync(): Promise<PermissionResponse>;
19
+ requestOverlayPermissionsAsync(): Promise<PermissionResponse>;
20
+ }
21
+ declare const _default: SnapboxPkgAutomationModule;
22
+ export default _default;
23
+ //# sourceMappingURL=SnapboxPkgAutomationModule.d.ts.map
@@ -0,0 +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;AACvD,OAAO,EACL,aAAa,EACb,gCAAgC,EACjC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,OAAO,0BAA2B,SAAQ,YAAY,CAAC,gCAAgC,CAAC;IAC7F,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;IAEtD,UAAU,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAClD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAC3B,0BAA0B,IAAI,OAAO,CAAC,kBAAkB,CAAC;IACzD,8BAA8B,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAC9D;;AAGD,wBAEE"}
@@ -0,0 +1,4 @@
1
+ import { requireNativeModule } from "expo";
2
+ // This call loads the native module object from the JSI.
3
+ export default requireNativeModule("SnapboxPkgAutomation");
4
+ //# sourceMappingURL=SnapboxPkgAutomationModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SnapboxPkgAutomationModule.js","sourceRoot":"","sources":["../src/SnapboxPkgAutomationModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAoCzD,yDAAyD;AACzD,eAAe,mBAAmB,CAChC,sBAAsB,CACvB,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from \"expo\";\nimport { PermissionResponse } from \"expo-modules-core\";\nimport {\n EditorOptions,\n SnapboxPkgAutomationModuleEvents,\n} from \"./SnapboxPkgAutomation.types\";\n\ndeclare class SnapboxPkgAutomationModule extends NativeModule<SnapboxPkgAutomationModuleEvents> {\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 showEditor(options?: EditorOptions): Promise<void>;\n hideEditor(): Promise<void>;\n getOverlayPermissionsAsync(): Promise<PermissionResponse>;\n requestOverlayPermissionsAsync(): Promise<PermissionResponse>;\n}\n\n// This call loads the native module object from the JSI.\nexport default requireNativeModule<SnapboxPkgAutomationModule>(\n \"SnapboxPkgAutomation\",\n);\n"]}
@@ -0,0 +1,21 @@
1
+ import { NativeModule } from "expo";
2
+ import { PermissionResponse } from "expo-modules-core";
3
+ import { SnapboxPkgAutomationModuleEvents } from "./SnapboxPkgAutomation.types";
4
+ declare class SnapboxPkgAutomationModule extends NativeModule<SnapboxPkgAutomationModuleEvents> {
5
+ tap(x: number, y: number): Promise<boolean>;
6
+ doubleTap(x: number, y: number): Promise<boolean>;
7
+ swipe(x1: number, y1: number, x2: number, y2: number, duration: number): Promise<boolean>;
8
+ longPress(x: number, y: number, duration: number): Promise<boolean>;
9
+ typeText(text: string): Promise<boolean>;
10
+ back(): Promise<boolean>;
11
+ home(): Promise<boolean>;
12
+ getCurrentApp(): Promise<string>;
13
+ launchApp(packageName: string): Promise<boolean>;
14
+ getPermissionsAsync(): Promise<PermissionResponse>;
15
+ requestPermissionsAsync(): Promise<PermissionResponse>;
16
+ getOverlayPermissionsAsync(): Promise<PermissionResponse>;
17
+ requestOverlayPermissionsAsync(): Promise<PermissionResponse>;
18
+ }
19
+ declare const _default: typeof SnapboxPkgAutomationModule;
20
+ export default _default;
21
+ //# sourceMappingURL=SnapboxPkgAutomationModule.web.d.ts.map
@@ -0,0 +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;AACzE,OAAO,EAAE,gCAAgC,EAAE,MAAM,8BAA8B,CAAC;AAEhF,cAAM,0BAA2B,SAAQ,YAAY,CAAC,gCAAgC,CAAC;IAC/E,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;IAQtD,0BAA0B,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAQzD,8BAA8B,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAQpE;;AAED,wBAGE"}
@@ -0,0 +1,65 @@
1
+ import { NativeModule, registerWebModule } from "expo";
2
+ import { PermissionStatus } from "expo-modules-core";
3
+ class SnapboxPkgAutomationModule extends NativeModule {
4
+ async tap(x, y) {
5
+ throw new Error("Not supported on web");
6
+ }
7
+ async doubleTap(x, y) {
8
+ throw new Error("Not supported on web");
9
+ }
10
+ async swipe(x1, y1, x2, y2, duration) {
11
+ throw new Error("Not supported on web");
12
+ }
13
+ async longPress(x, y, duration) {
14
+ throw new Error("Not supported on web");
15
+ }
16
+ async typeText(text) {
17
+ throw new Error("Not supported on web");
18
+ }
19
+ async back() {
20
+ throw new Error("Not supported on web");
21
+ }
22
+ async home() {
23
+ throw new Error("Not supported on web");
24
+ }
25
+ async getCurrentApp() {
26
+ throw new Error("Not supported on web");
27
+ }
28
+ async launchApp(packageName) {
29
+ throw new Error("Not supported on web");
30
+ }
31
+ async getPermissionsAsync() {
32
+ return {
33
+ status: PermissionStatus.DENIED,
34
+ expires: "never",
35
+ granted: true,
36
+ canAskAgain: false,
37
+ };
38
+ }
39
+ async requestPermissionsAsync() {
40
+ return {
41
+ status: PermissionStatus.DENIED,
42
+ expires: "never",
43
+ granted: false,
44
+ canAskAgain: false,
45
+ };
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
+ }
64
+ export default registerWebModule(SnapboxPkgAutomationModule, "SnapboxPkgAutomationModule");
65
+ //# sourceMappingURL=SnapboxPkgAutomationModule.web.js.map
@@ -0,0 +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;AAGzE,MAAM,0BAA2B,SAAQ,YAA8C;IACrF,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;IACD,KAAK,CAAC,0BAA0B;QAC9B,OAAO;YACL,MAAM,EAAE,gBAAgB,CAAC,MAAM;YAC/B,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,KAAK;SACnB,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,8BAA8B;QAClC,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\";\nimport { SnapboxPkgAutomationModuleEvents } from \"./SnapboxPkgAutomation.types\";\n\nclass SnapboxPkgAutomationModule extends NativeModule<SnapboxPkgAutomationModuleEvents> {\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 async getOverlayPermissionsAsync(): Promise<PermissionResponse> {\n return {\n status: PermissionStatus.DENIED,\n expires: \"never\",\n granted: false,\n canAskAgain: false,\n };\n }\n async requestOverlayPermissionsAsync(): 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"]}
@@ -0,0 +1,19 @@
1
+ export * from "./SnapboxPkgAutomation.types";
2
+ export { default } from "./SnapboxPkgAutomationModule";
3
+ import { PermissionResponse } from "expo-modules-core";
4
+ import { EditorOptions } from "./SnapboxPkgAutomation.types";
5
+ 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
+ export { PermissionResponse };
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEvD,OAAO,EAAwB,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,eAAO,MAAM,wBAAwB,wLAGnC,CAAC;AAEH,eAAO,MAAM,qBAAqB,wLAGhC,CAAC;AAEH,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE1D;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEhE;AAED,wBAAgB,KAAK,CACnB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,OAAO,CAAC,CAElB;AAED,wBAAgB,SAAS,CACvB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,OAAO,CAAC,CAElB;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEvD;AAED,wBAAgB,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAEvC;AAED,wBAAgB,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAEvC;AAED,wBAAgB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAE/C;AAED,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/D;AAED,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjE;AAED,wBAAgB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAE1C;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
package/build/index.js ADDED
@@ -0,0 +1,46 @@
1
+ export * from "./SnapboxPkgAutomation.types";
2
+ export { default } from "./SnapboxPkgAutomationModule";
3
+ import { createPermissionHook } from "expo-modules-core";
4
+ import SnapboxPkgAutomationModule from "./SnapboxPkgAutomationModule";
5
+ export const useAutomationPermissions = createPermissionHook({
6
+ getMethod: SnapboxPkgAutomationModule.getPermissionsAsync,
7
+ requestMethod: SnapboxPkgAutomationModule.requestPermissionsAsync,
8
+ });
9
+ export const useOverlayPermissions = createPermissionHook({
10
+ getMethod: SnapboxPkgAutomationModule.getOverlayPermissionsAsync,
11
+ requestMethod: SnapboxPkgAutomationModule.requestOverlayPermissionsAsync,
12
+ });
13
+ export function tap(x, y) {
14
+ return SnapboxPkgAutomationModule.tap(x, y);
15
+ }
16
+ export function doubleTap(x, y) {
17
+ return SnapboxPkgAutomationModule.doubleTap(x, y);
18
+ }
19
+ export function swipe(x1, y1, x2, y2, duration) {
20
+ return SnapboxPkgAutomationModule.swipe(x1, y1, x2, y2, duration);
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
+ }
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAsB,MAAM,mBAAmB,CAAC;AAE7E,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AAEtE,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;IAC3D,SAAS,EAAE,0BAA0B,CAAC,mBAAmB;IACzD,aAAa,EAAE,0BAA0B,CAAC,uBAAuB;CAClE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,oBAAoB,CAAC;IACxD,SAAS,EAAE,0BAA0B,CAAC,0BAA0B;IAChE,aAAa,EAAE,0BAA0B,CAAC,8BAA8B;CACzE,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,CAAC,CAAS,EAAE,CAAS;IACtC,OAAO,0BAA0B,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,CAAS,EAAE,CAAS;IAC5C,OAAO,0BAA0B,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,KAAK,CACnB,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,QAAgB;IAEhB,OAAO,0BAA0B,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,SAAS,CACvB,CAAS,EACT,CAAS,EACT,QAAgB;IAEhB,OAAO,0BAA0B,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,OAAO,0BAA0B,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,IAAI;IAClB,OAAO,0BAA0B,CAAC,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,IAAI;IAClB,OAAO,0BAA0B,CAAC,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,0BAA0B,CAAC,aAAa,EAAE,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,WAAmB;IAC3C,OAAO,0BAA0B,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAuB;IAChD,OAAO,0BAA0B,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,OAAO,0BAA0B,CAAC,UAAU,EAAE,CAAC;AACjD,CAAC","sourcesContent":["export * from \"./SnapboxPkgAutomation.types\";\nexport { default } from \"./SnapboxPkgAutomationModule\";\n\nimport { createPermissionHook, PermissionResponse } from \"expo-modules-core\";\nimport { EditorOptions } from \"./SnapboxPkgAutomation.types\";\nimport SnapboxPkgAutomationModule from \"./SnapboxPkgAutomationModule\";\n\nexport const useAutomationPermissions = createPermissionHook({\n getMethod: SnapboxPkgAutomationModule.getPermissionsAsync,\n requestMethod: SnapboxPkgAutomationModule.requestPermissionsAsync,\n});\n\nexport const useOverlayPermissions = createPermissionHook({\n getMethod: SnapboxPkgAutomationModule.getOverlayPermissionsAsync,\n requestMethod: SnapboxPkgAutomationModule.requestOverlayPermissionsAsync,\n});\n\nexport function tap(x: number, y: number): Promise<boolean> {\n return SnapboxPkgAutomationModule.tap(x, y);\n}\n\nexport function doubleTap(x: number, y: number): Promise<boolean> {\n return SnapboxPkgAutomationModule.doubleTap(x, y);\n}\n\nexport function swipe(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n duration: number,\n): Promise<boolean> {\n return SnapboxPkgAutomationModule.swipe(x1, y1, x2, y2, duration);\n}\n\nexport function longPress(\n x: number,\n y: number,\n duration: number,\n): Promise<boolean> {\n return SnapboxPkgAutomationModule.longPress(x, y, duration);\n}\n\nexport function typeText(text: string): Promise<boolean> {\n return SnapboxPkgAutomationModule.typeText(text);\n}\n\nexport function back(): Promise<boolean> {\n return SnapboxPkgAutomationModule.back();\n}\n\nexport function home(): Promise<boolean> {\n return SnapboxPkgAutomationModule.home();\n}\n\nexport function getCurrentApp(): Promise<string> {\n return SnapboxPkgAutomationModule.getCurrentApp();\n}\n\nexport function launchApp(packageName: string): Promise<boolean> {\n return SnapboxPkgAutomationModule.launchApp(packageName);\n}\n\nexport function showEditor(options?: EditorOptions): Promise<void> {\n return SnapboxPkgAutomationModule.showEditor(options);\n}\n\nexport function hideEditor(): Promise<void> {\n return SnapboxPkgAutomationModule.hideEditor();\n}\n\nexport { PermissionResponse };\n"]}
@@ -0,0 +1,11 @@
1
+ {
2
+ "platforms": ["apple", "android", "web"],
3
+ "apple": {
4
+ "modules": ["SnapboxPkgAutomationModule"]
5
+ },
6
+ "android": {
7
+ "modules": [
8
+ "expo.modules.snapbox.pkg.automation.SnapboxPkgAutomationModule"
9
+ ]
10
+ }
11
+ }
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@snapbox/pkg-automation",
3
+ "version": "1.0.1",
4
+ "description": "My new module",
5
+ "main": "build/index.js",
6
+ "types": "build/index.d.ts",
7
+ "scripts": {
8
+ "build": "expo-module build",
9
+ "clean": "expo-module clean",
10
+ "lint": "expo-module lint",
11
+ "test": "expo-module test",
12
+ "prepare": "expo-module prepare",
13
+ "prepublishOnly": "expo-module prepublishOnly",
14
+ "expo-module": "expo-module",
15
+ "open:ios": "xed example/ios",
16
+ "open:android": "open -a \"Android Studio\" example/android"
17
+ },
18
+ "keywords": [
19
+ "react-native",
20
+ "expo",
21
+ "@snapbox/pkg-automation",
22
+ "SnapboxPkgAutomation"
23
+ ],
24
+ "repository": "https://github.com/expo/expo",
25
+ "bugs": {
26
+ "url": "https://github.com/expo/expo/issues"
27
+ },
28
+ "author": "Liu Yunlong <gavin6liu@gmail.com> (gavinliu)",
29
+ "license": "MIT",
30
+ "homepage": "https://github.com/expo/expo#readme",
31
+ "devDependencies": {
32
+ "@types/react": "~19.2.2",
33
+ "expo": "^55.0.17",
34
+ "expo-module-scripts": "^55.0.2",
35
+ "react-native": "0.83.6",
36
+ "typescript": "~5.9.2"
37
+ },
38
+ "peerDependencies": {
39
+ "expo": "*",
40
+ "react": "*",
41
+ "react-native": "*"
42
+ }
43
+ }