illuma-rpa 1.0.0

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.
Files changed (44) hide show
  1. package/.github/workflows/publish.yml +129 -0
  2. package/LICENSE +107 -0
  3. package/README.md +202 -0
  4. package/dist/index.d.ts +10 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +23 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/keyboard.d.ts +82 -0
  9. package/dist/keyboard.d.ts.map +1 -0
  10. package/dist/keyboard.js +116 -0
  11. package/dist/keyboard.js.map +1 -0
  12. package/dist/mouse.d.ts +61 -0
  13. package/dist/mouse.d.ts.map +1 -0
  14. package/dist/mouse.js +107 -0
  15. package/dist/mouse.js.map +1 -0
  16. package/dist/native.d.ts +63 -0
  17. package/dist/native.d.ts.map +1 -0
  18. package/dist/native.js +91 -0
  19. package/dist/native.js.map +1 -0
  20. package/dist/screen.d.ts +39 -0
  21. package/dist/screen.d.ts.map +1 -0
  22. package/dist/screen.js +43 -0
  23. package/dist/screen.js.map +1 -0
  24. package/dist/window.d.ts +61 -0
  25. package/dist/window.d.ts.map +1 -0
  26. package/dist/window.js +66 -0
  27. package/dist/window.js.map +1 -0
  28. package/libnut-core/CHANGELOG.md +122 -0
  29. package/libnut-core/LICENSE.md +201 -0
  30. package/libnut-core/README.md +26 -0
  31. package/libnut-core/index.d.ts +82 -0
  32. package/libnut-core/index.js +51 -0
  33. package/libnut-core/package-lock.json +1430 -0
  34. package/libnut-core/package.json +59 -0
  35. package/libnut-core/patch-packagename.js +18 -0
  36. package/libnut-core/permissionCheck.js +82 -0
  37. package/package.json +61 -0
  38. package/src/index.ts +10 -0
  39. package/src/keyboard.ts +125 -0
  40. package/src/mouse.ts +114 -0
  41. package/src/native.ts +103 -0
  42. package/src/screen.ts +59 -0
  43. package/src/window.ts +89 -0
  44. package/tsconfig.json +20 -0
package/src/window.ts ADDED
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Window management module
3
+ */
4
+
5
+ import { getNative } from './native';
6
+
7
+ export interface WindowInfo {
8
+ handle: number;
9
+ title: string;
10
+ bounds: {
11
+ x: number;
12
+ y: number;
13
+ width: number;
14
+ height: number;
15
+ };
16
+ }
17
+
18
+ export interface WindowBounds {
19
+ x: number;
20
+ y: number;
21
+ width: number;
22
+ height: number;
23
+ }
24
+
25
+ export class Window {
26
+ /**
27
+ * Get the active (foreground) window
28
+ */
29
+ async getActive(): Promise<WindowInfo> {
30
+ const handle = getNative().getActiveWindow();
31
+ const title = getNative().getWindowTitle(handle);
32
+ const bounds = getNative().getWindowRect(handle);
33
+ return { handle, title, bounds };
34
+ }
35
+
36
+ /**
37
+ * Get all window handles
38
+ */
39
+ async getAll(): Promise<number[]> {
40
+ return getNative().getWindows();
41
+ }
42
+
43
+ /**
44
+ * Get window info by handle
45
+ */
46
+ async getInfo(handle: number): Promise<WindowInfo> {
47
+ const title = getNative().getWindowTitle(handle);
48
+ const bounds = getNative().getWindowRect(handle);
49
+ return { handle, title, bounds };
50
+ }
51
+
52
+ /**
53
+ * Get window title
54
+ */
55
+ async getTitle(handle: number): Promise<string> {
56
+ return getNative().getWindowTitle(handle);
57
+ }
58
+
59
+ /**
60
+ * Get window bounds
61
+ */
62
+ async getBounds(handle: number): Promise<WindowBounds> {
63
+ return getNative().getWindowRect(handle);
64
+ }
65
+
66
+ /**
67
+ * Focus a window
68
+ */
69
+ async focus(handle: number): Promise<void> {
70
+ getNative().focusWindow(handle);
71
+ }
72
+
73
+ /**
74
+ * Resize a window
75
+ */
76
+ async resize(handle: number, size: { width: number; height: number }): Promise<void> {
77
+ getNative().resizeWindow(handle, size);
78
+ }
79
+
80
+ /**
81
+ * Move a window
82
+ */
83
+ async move(handle: number, position: { x: number; y: number }): Promise<void> {
84
+ getNative().moveWindow(handle, position);
85
+ }
86
+ }
87
+
88
+ // Export singleton instance
89
+ export const window = new Window();
package/tsconfig.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "commonjs",
5
+ "lib": ["ES2020"],
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "sourceMap": true,
9
+ "outDir": "./dist",
10
+ "rootDir": "./src",
11
+ "strict": true,
12
+ "esModuleInterop": true,
13
+ "skipLibCheck": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "resolveJsonModule": true,
16
+ "moduleResolution": "node"
17
+ },
18
+ "include": ["src/**/*"],
19
+ "exclude": ["node_modules", "dist", "libnut-core", "nut.js"]
20
+ }