stelo 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.
Files changed (141) hide show
  1. package/LICENSE +184 -0
  2. package/README.md +853 -0
  3. package/dist/accessibility.d.ts +227 -0
  4. package/dist/accessibility.d.ts.map +1 -0
  5. package/dist/accessibility.js +602 -0
  6. package/dist/accessibility.js.map +1 -0
  7. package/dist/agent.d.ts +870 -0
  8. package/dist/agent.d.ts.map +1 -0
  9. package/dist/agent.js +1107 -0
  10. package/dist/agent.js.map +1 -0
  11. package/dist/audio-stream.d.ts +114 -0
  12. package/dist/audio-stream.d.ts.map +1 -0
  13. package/dist/audio-stream.js +167 -0
  14. package/dist/audio-stream.js.map +1 -0
  15. package/dist/clipboard.d.ts +99 -0
  16. package/dist/clipboard.d.ts.map +1 -0
  17. package/dist/clipboard.js +352 -0
  18. package/dist/clipboard.js.map +1 -0
  19. package/dist/config.d.ts +183 -0
  20. package/dist/config.d.ts.map +1 -0
  21. package/dist/config.js +477 -0
  22. package/dist/config.js.map +1 -0
  23. package/dist/context.d.ts +213 -0
  24. package/dist/context.d.ts.map +1 -0
  25. package/dist/context.js +387 -0
  26. package/dist/context.js.map +1 -0
  27. package/dist/cortex.d.ts +548 -0
  28. package/dist/cortex.d.ts.map +1 -0
  29. package/dist/cortex.js +1479 -0
  30. package/dist/cortex.js.map +1 -0
  31. package/dist/errors.d.ts +133 -0
  32. package/dist/errors.d.ts.map +1 -0
  33. package/dist/errors.js +278 -0
  34. package/dist/errors.js.map +1 -0
  35. package/dist/events.d.ts +227 -0
  36. package/dist/events.d.ts.map +1 -0
  37. package/dist/events.js +429 -0
  38. package/dist/events.js.map +1 -0
  39. package/dist/executor.d.ts +212 -0
  40. package/dist/executor.d.ts.map +1 -0
  41. package/dist/executor.js +545 -0
  42. package/dist/executor.js.map +1 -0
  43. package/dist/index.d.ts +69 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +167 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/integration.d.ts +159 -0
  48. package/dist/integration.d.ts.map +1 -0
  49. package/dist/integration.js +533 -0
  50. package/dist/integration.js.map +1 -0
  51. package/dist/keyboard.d.ts +276 -0
  52. package/dist/keyboard.d.ts.map +1 -0
  53. package/dist/keyboard.js +404 -0
  54. package/dist/keyboard.js.map +1 -0
  55. package/dist/logger.d.ts +198 -0
  56. package/dist/logger.d.ts.map +1 -0
  57. package/dist/logger.js +516 -0
  58. package/dist/logger.js.map +1 -0
  59. package/dist/middleware.d.ts +183 -0
  60. package/dist/middleware.d.ts.map +1 -0
  61. package/dist/middleware.js +493 -0
  62. package/dist/middleware.js.map +1 -0
  63. package/dist/monitor.d.ts +136 -0
  64. package/dist/monitor.d.ts.map +1 -0
  65. package/dist/monitor.js +341 -0
  66. package/dist/monitor.js.map +1 -0
  67. package/dist/mouse.d.ts +290 -0
  68. package/dist/mouse.d.ts.map +1 -0
  69. package/dist/mouse.js +466 -0
  70. package/dist/mouse.js.map +1 -0
  71. package/dist/plugin.d.ts +157 -0
  72. package/dist/plugin.d.ts.map +1 -0
  73. package/dist/plugin.js +409 -0
  74. package/dist/plugin.js.map +1 -0
  75. package/dist/process.d.ts +106 -0
  76. package/dist/process.d.ts.map +1 -0
  77. package/dist/process.js +326 -0
  78. package/dist/process.js.map +1 -0
  79. package/dist/recorder.d.ts +100 -0
  80. package/dist/recorder.d.ts.map +1 -0
  81. package/dist/recorder.js +258 -0
  82. package/dist/recorder.js.map +1 -0
  83. package/dist/safety.d.ts +59 -0
  84. package/dist/safety.d.ts.map +1 -0
  85. package/dist/safety.js +98 -0
  86. package/dist/safety.js.map +1 -0
  87. package/dist/scheduler.d.ts +152 -0
  88. package/dist/scheduler.d.ts.map +1 -0
  89. package/dist/scheduler.js +615 -0
  90. package/dist/scheduler.js.map +1 -0
  91. package/dist/screen.d.ts +96 -0
  92. package/dist/screen.d.ts.map +1 -0
  93. package/dist/screen.js +154 -0
  94. package/dist/screen.js.map +1 -0
  95. package/dist/session.d.ts +209 -0
  96. package/dist/session.d.ts.map +1 -0
  97. package/dist/session.js +479 -0
  98. package/dist/session.js.map +1 -0
  99. package/dist/stream.d.ts +168 -0
  100. package/dist/stream.d.ts.map +1 -0
  101. package/dist/stream.js +298 -0
  102. package/dist/stream.js.map +1 -0
  103. package/dist/telemetry.d.ts +223 -0
  104. package/dist/telemetry.d.ts.map +1 -0
  105. package/dist/telemetry.js +433 -0
  106. package/dist/telemetry.js.map +1 -0
  107. package/dist/types.d.ts +165 -0
  108. package/dist/types.d.ts.map +1 -0
  109. package/dist/types.js +8 -0
  110. package/dist/types.js.map +1 -0
  111. package/dist/utils/bezier.d.ts +51 -0
  112. package/dist/utils/bezier.d.ts.map +1 -0
  113. package/dist/utils/bezier.js +117 -0
  114. package/dist/utils/bezier.js.map +1 -0
  115. package/dist/utils/helpers.d.ts +90 -0
  116. package/dist/utils/helpers.d.ts.map +1 -0
  117. package/dist/utils/helpers.js +143 -0
  118. package/dist/utils/helpers.js.map +1 -0
  119. package/dist/utils/index.d.ts +4 -0
  120. package/dist/utils/index.d.ts.map +1 -0
  121. package/dist/utils/index.js +18 -0
  122. package/dist/utils/index.js.map +1 -0
  123. package/dist/validation.d.ts +254 -0
  124. package/dist/validation.d.ts.map +1 -0
  125. package/dist/validation.js +478 -0
  126. package/dist/validation.js.map +1 -0
  127. package/dist/vision.d.ts +719 -0
  128. package/dist/vision.d.ts.map +1 -0
  129. package/dist/vision.js +1197 -0
  130. package/dist/vision.js.map +1 -0
  131. package/dist/window.d.ts +80 -0
  132. package/dist/window.d.ts.map +1 -0
  133. package/dist/window.js +170 -0
  134. package/dist/window.js.map +1 -0
  135. package/dist/workflow.d.ts +224 -0
  136. package/dist/workflow.d.ts.map +1 -0
  137. package/dist/workflow.js +578 -0
  138. package/dist/workflow.js.map +1 -0
  139. package/index.d.ts +840 -0
  140. package/index.js +495 -0
  141. package/package.json +91 -0
@@ -0,0 +1,276 @@
1
+ import type { TypeOptions, HumanizedTypeOptions } from './types';
2
+ /** Options for key sequence execution */
3
+ export interface KeySequenceOptions {
4
+ /** Delay between actions in ms (default: 100) */
5
+ delay?: number;
6
+ }
7
+ /** Options for waiting for a key */
8
+ export interface WaitForKeyOptions {
9
+ /** Timeout in ms (default: 30000) */
10
+ timeout?: number;
11
+ }
12
+ /**
13
+ * Keyboard control interface — the most advanced keyboard automation API.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * import { keyboard } from 'stelo';
18
+ *
19
+ * // Type text (character by character)
20
+ * keyboard.type('Hello World!');
21
+ *
22
+ * // Batch type (10-100x faster, single OS call)
23
+ * keyboard.typeBatch('Entire string typed instantly');
24
+ *
25
+ * // Keyboard shortcut (individual arguments)
26
+ * keyboard.hotkey('ctrl', 'c');
27
+ *
28
+ * // Hotkey from string
29
+ * keyboard.hotkeyString('ctrl+shift+s');
30
+ *
31
+ * // Key sequence macro
32
+ * keyboard.sequence('ctrl+a | ctrl+c | alt+tab | ctrl+v');
33
+ *
34
+ * // Type with modifiers held
35
+ * keyboard.typeWithModifiers('hello', 'shift'); // Types "HELLO"
36
+ *
37
+ * // Wait for a key press
38
+ * const pressed = keyboard.waitForKey('escape', { timeout: 5000 });
39
+ *
40
+ * // Check toggle state
41
+ * const capsOn = keyboard.isToggled('capslock');
42
+ * ```
43
+ */
44
+ export declare const keyboard: {
45
+ /**
46
+ * Type a text string, character by character.
47
+ * Supports full Unicode including emoji and international characters.
48
+ */
49
+ type(text: string, options?: TypeOptions): void;
50
+ /**
51
+ * Type text with randomized human-like delays between characters.
52
+ */
53
+ typeHumanized(text: string, options?: HumanizedTypeOptions): void;
54
+ /**
55
+ * Type an entire string in a single atomic OS call.
56
+ * 10-100x faster than character-by-character typing.
57
+ * All characters are batched in one SendInput call — no inter-character delay.
58
+ *
59
+ * Best for: filling forms, pasting large text, programmatic input.
60
+ * For human-like typing, use `type()` or `typeHumanized()` instead.
61
+ *
62
+ * @example
63
+ * ```typescript
64
+ * keyboard.typeBatch('This entire sentence is typed in one OS call');
65
+ * ```
66
+ */
67
+ typeBatch(text: string): void;
68
+ /**
69
+ * Type text while holding modifier keys down.
70
+ *
71
+ * @example
72
+ * ```typescript
73
+ * keyboard.typeWithModifiers('hello', 'shift'); // Types "HELLO"
74
+ * keyboard.typeWithModifiers('abc', 'ctrl', 'shift'); // Ctrl+Shift held
75
+ * ```
76
+ */
77
+ typeWithModifiers(text: string, ...modifiers: string[]): void;
78
+ /**
79
+ * Press and release a single key.
80
+ *
81
+ * Supported key names include:
82
+ * - Letters: 'a'–'z'
83
+ * - Digits: '0'–'9'
84
+ * - Modifiers: 'shift', 'ctrl'/'control', 'alt', 'meta'/'win'/'cmd'
85
+ * - Navigation: 'up', 'down', 'left', 'right', 'home', 'end', 'pageup', 'pagedown'
86
+ * - Editing: 'enter', 'tab', 'space', 'backspace', 'delete', 'escape'
87
+ * - Function: 'f1'–'f24'
88
+ * - And many more — see `keyboard.allKeys()` for the full list.
89
+ */
90
+ press(key: string): void;
91
+ /**
92
+ * Hold a key down (without releasing).
93
+ */
94
+ down(key: string): void;
95
+ /**
96
+ * Release a held key.
97
+ */
98
+ up(key: string): void;
99
+ /**
100
+ * Press a key multiple times.
101
+ * @param key - Key to press
102
+ * @param count - Number of times (default: 1)
103
+ * @param delay - Delay between presses in ms (default: 50)
104
+ */
105
+ tap(key: string, count?: number, delay?: number): void;
106
+ /**
107
+ * Execute a keyboard shortcut.
108
+ * Keys are pressed in order and released in reverse order.
109
+ *
110
+ * @example
111
+ * ```typescript
112
+ * keyboard.hotkey('ctrl', 'c'); // Copy
113
+ * keyboard.hotkey('ctrl', 'shift', 's'); // Save As
114
+ * keyboard.hotkey('alt', 'f4'); // Close window
115
+ * ```
116
+ */
117
+ hotkey(...keys: string[]): void;
118
+ /**
119
+ * Execute a hotkey from a single string like "ctrl+shift+s".
120
+ * More convenient for dynamic/programmatic use.
121
+ *
122
+ * @example
123
+ * ```typescript
124
+ * keyboard.hotkeyString('ctrl+c');
125
+ * keyboard.hotkeyString('ctrl+shift+s');
126
+ * keyboard.hotkeyString('alt+f4');
127
+ * ```
128
+ */
129
+ hotkeyString(combo: string): void;
130
+ /**
131
+ * Execute a sequence of keyboard actions separated by '|'.
132
+ *
133
+ * Each action can be:
134
+ * - A hotkey combo: `"ctrl+c"`
135
+ * - A single key press: `"enter"`
136
+ * - Literal text to type: `"type:Hello World"`
137
+ *
138
+ * @example
139
+ * ```typescript
140
+ * // Select all → Copy → Switch window → Paste
141
+ * keyboard.sequence('ctrl+a | ctrl+c | alt+tab | ctrl+v');
142
+ *
143
+ * // Open file dialog, type filename, press enter
144
+ * keyboard.sequence('ctrl+o | type:document.txt | enter');
145
+ *
146
+ * // With custom delay between actions
147
+ * keyboard.sequence('tab | tab | enter', { delay: 50 });
148
+ * ```
149
+ */
150
+ sequence(sequence: string, options?: KeySequenceOptions): void;
151
+ /**
152
+ * Check if a key is currently held down.
153
+ */
154
+ isPressed(key: string): boolean;
155
+ /**
156
+ * Check multiple keys at once.
157
+ * Returns an array of booleans matching the input keys.
158
+ *
159
+ * @example
160
+ * ```typescript
161
+ * const [ctrl, shift, alt] = keyboard.arePressed('ctrl', 'shift', 'alt');
162
+ * if (ctrl && !shift) { ... }
163
+ * ```
164
+ */
165
+ arePressed(...keys: string[]): boolean[];
166
+ /**
167
+ * Check if a toggle key (CapsLock, NumLock, ScrollLock) is ON.
168
+ *
169
+ * @example
170
+ * ```typescript
171
+ * if (keyboard.isToggled('capslock')) {
172
+ * console.log('CapsLock is ON');
173
+ * }
174
+ * ```
175
+ */
176
+ isToggled(key: string): boolean;
177
+ /**
178
+ * Toggle a lock key (CapsLock, NumLock, ScrollLock).
179
+ * Sends a press+release to flip the toggle state.
180
+ */
181
+ toggleKey(key: string): void;
182
+ /**
183
+ * Wait until a specific key is pressed (blocking).
184
+ * Returns true if pressed, false if timed out.
185
+ *
186
+ * @example
187
+ * ```typescript
188
+ * console.log('Press Escape to continue...');
189
+ * keyboard.waitForKey('escape', { timeout: 10000 });
190
+ * ```
191
+ */
192
+ waitForKey(key: string, options?: WaitForKeyOptions): boolean;
193
+ /**
194
+ * Wait until a specific key is released (blocking).
195
+ * Useful after `waitForKey` to detect key-up.
196
+ */
197
+ waitForKeyRelease(key: string, options?: WaitForKeyOptions): boolean;
198
+ /**
199
+ * Get a list of all recognized key names.
200
+ */
201
+ allKeys(): string[];
202
+ /** Press Enter */
203
+ enter(): void;
204
+ /** Press Tab */
205
+ tab(): void;
206
+ /** Press Escape */
207
+ escape(): void;
208
+ /** Press Backspace */
209
+ backspace(count?: number): void;
210
+ /** Press Delete */
211
+ delete(count?: number): void;
212
+ /** Select all (Ctrl+A / Cmd+A) */
213
+ selectAll(): void;
214
+ /** Copy (Ctrl+C / Cmd+C) */
215
+ copy(): void;
216
+ /** Paste (Ctrl+V / Cmd+V) */
217
+ paste(): void;
218
+ /** Cut (Ctrl+X / Cmd+X) */
219
+ cut(): void;
220
+ /** Undo (Ctrl+Z / Cmd+Z) */
221
+ undo(): void;
222
+ /** Redo (Ctrl+Shift+Z / Cmd+Shift+Z) */
223
+ redo(): void;
224
+ /** Save (Ctrl+S / Cmd+S) */
225
+ save(): void;
226
+ /** Find (Ctrl+F / Cmd+F) */
227
+ find(): void;
228
+ /** New (Ctrl+N / Cmd+N) */
229
+ "new"(): void;
230
+ /** Close tab/window (Ctrl+W / Cmd+W) */
231
+ close(): void;
232
+ /** Print (Ctrl+P / Cmd+P) */
233
+ print(): void;
234
+ /** Switch application (Alt+Tab / Cmd+Tab) */
235
+ switchApp(): void;
236
+ /**
237
+ * Type text character-by-character — **non-blocking**.
238
+ *
239
+ * Unlike `type()` which blocks the thread, this yields to the event loop
240
+ * between each character. Other code (screen monitoring, mouse movement)
241
+ * can run in parallel while text is being typed.
242
+ *
243
+ * Returns a cancellable handle.
244
+ *
245
+ * @example
246
+ * ```typescript
247
+ * // Await completion
248
+ * await keyboard.typeAsync('Hello World!', { delay: 30 });
249
+ *
250
+ * // Cancel mid-type
251
+ * const handle = keyboard.typeAsync('Long text...');
252
+ * setTimeout(() => handle.cancel(), 500);
253
+ * await handle.promise;
254
+ * ```
255
+ */
256
+ typeAsync(text: string, options?: {
257
+ delay?: number;
258
+ }): {
259
+ promise: Promise<void>;
260
+ cancel: () => void;
261
+ };
262
+ /**
263
+ * Type text with human-like random delays — **non-blocking**.
264
+ *
265
+ * Each character is typed with a random delay between minDelay and maxDelay.
266
+ * Non-blocking: the event loop is free between characters.
267
+ */
268
+ typeHumanizedAsync(text: string, options?: {
269
+ minDelay?: number;
270
+ maxDelay?: number;
271
+ }): {
272
+ promise: Promise<void>;
273
+ cancel: () => void;
274
+ };
275
+ };
276
+ //# sourceMappingURL=keyboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../ts/keyboard.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAIjE,yCAAyC;AACzC,MAAM,WAAW,kBAAkB;IACjC,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,oCAAoC;AACpC,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,QAAQ;IAGnB;;;OAGG;eACQ,MAAM,YAAY,WAAW,GAAG,IAAI;IAI/C;;OAEG;wBACiB,MAAM,YAAY,oBAAoB,GAAG,IAAI;IAQjE;;;;;;;;;;;;OAYG;oBACa,MAAM,GAAG,IAAI;IAI7B;;;;;;;;OAQG;4BACqB,MAAM,gBAAgB,MAAM,EAAE,GAAG,IAAI;IAM7D;;;;;;;;;;;OAWG;eACQ,MAAM,GAAG,IAAI;IAIxB;;OAEG;cACO,MAAM,GAAG,IAAI;IAIvB;;OAEG;YACK,MAAM,GAAG,IAAI;IAIrB;;;;;OAKG;aACM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A6BjD;;;;;OAKG;6BAEK,MAAM,YACF;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GACjD;QAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QAAC,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE;CA6BlD,CAAC"}
@@ -0,0 +1,404 @@
1
+ "use strict";
2
+ // ============================================================================
3
+ // Stelo — Keyboard Control API
4
+ // ============================================================================
5
+ // Full keyboard automation: typing, hotkeys, batch operations, key sequences,
6
+ // toggle detection, modifier-aware typing, and key wait primitives.
7
+ // ============================================================================
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.keyboard = void 0;
10
+ const native = require('../index.js');
11
+ /**
12
+ * Keyboard control interface — the most advanced keyboard automation API.
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * import { keyboard } from 'stelo';
17
+ *
18
+ * // Type text (character by character)
19
+ * keyboard.type('Hello World!');
20
+ *
21
+ * // Batch type (10-100x faster, single OS call)
22
+ * keyboard.typeBatch('Entire string typed instantly');
23
+ *
24
+ * // Keyboard shortcut (individual arguments)
25
+ * keyboard.hotkey('ctrl', 'c');
26
+ *
27
+ * // Hotkey from string
28
+ * keyboard.hotkeyString('ctrl+shift+s');
29
+ *
30
+ * // Key sequence macro
31
+ * keyboard.sequence('ctrl+a | ctrl+c | alt+tab | ctrl+v');
32
+ *
33
+ * // Type with modifiers held
34
+ * keyboard.typeWithModifiers('hello', 'shift'); // Types "HELLO"
35
+ *
36
+ * // Wait for a key press
37
+ * const pressed = keyboard.waitForKey('escape', { timeout: 5000 });
38
+ *
39
+ * // Check toggle state
40
+ * const capsOn = keyboard.isToggled('capslock');
41
+ * ```
42
+ */
43
+ exports.keyboard = {
44
+ // ── Core Typing ─────────────────────────────────────────────────────────
45
+ /**
46
+ * Type a text string, character by character.
47
+ * Supports full Unicode including emoji and international characters.
48
+ */
49
+ type(text, options) {
50
+ native.keyboardType(text, options?.delay ?? undefined);
51
+ },
52
+ /**
53
+ * Type text with randomized human-like delays between characters.
54
+ */
55
+ typeHumanized(text, options) {
56
+ native.keyboardTypeHumanized(text, options?.minDelay ?? undefined, options?.maxDelay ?? undefined);
57
+ },
58
+ /**
59
+ * Type an entire string in a single atomic OS call.
60
+ * 10-100x faster than character-by-character typing.
61
+ * All characters are batched in one SendInput call — no inter-character delay.
62
+ *
63
+ * Best for: filling forms, pasting large text, programmatic input.
64
+ * For human-like typing, use `type()` or `typeHumanized()` instead.
65
+ *
66
+ * @example
67
+ * ```typescript
68
+ * keyboard.typeBatch('This entire sentence is typed in one OS call');
69
+ * ```
70
+ */
71
+ typeBatch(text) {
72
+ native.keyboardTypeBatch(text);
73
+ },
74
+ /**
75
+ * Type text while holding modifier keys down.
76
+ *
77
+ * @example
78
+ * ```typescript
79
+ * keyboard.typeWithModifiers('hello', 'shift'); // Types "HELLO"
80
+ * keyboard.typeWithModifiers('abc', 'ctrl', 'shift'); // Ctrl+Shift held
81
+ * ```
82
+ */
83
+ typeWithModifiers(text, ...modifiers) {
84
+ native.keyboardTypeWithModifiers(text, modifiers);
85
+ },
86
+ // ── Key Press/Release ───────────────────────────────────────────────────
87
+ /**
88
+ * Press and release a single key.
89
+ *
90
+ * Supported key names include:
91
+ * - Letters: 'a'–'z'
92
+ * - Digits: '0'–'9'
93
+ * - Modifiers: 'shift', 'ctrl'/'control', 'alt', 'meta'/'win'/'cmd'
94
+ * - Navigation: 'up', 'down', 'left', 'right', 'home', 'end', 'pageup', 'pagedown'
95
+ * - Editing: 'enter', 'tab', 'space', 'backspace', 'delete', 'escape'
96
+ * - Function: 'f1'–'f24'
97
+ * - And many more — see `keyboard.allKeys()` for the full list.
98
+ */
99
+ press(key) {
100
+ native.keyboardPress(key);
101
+ },
102
+ /**
103
+ * Hold a key down (without releasing).
104
+ */
105
+ down(key) {
106
+ native.keyboardDown(key);
107
+ },
108
+ /**
109
+ * Release a held key.
110
+ */
111
+ up(key) {
112
+ native.keyboardUp(key);
113
+ },
114
+ /**
115
+ * Press a key multiple times.
116
+ * @param key - Key to press
117
+ * @param count - Number of times (default: 1)
118
+ * @param delay - Delay between presses in ms (default: 50)
119
+ */
120
+ tap(key, count, delay) {
121
+ native.keyboardTap(key, count, delay);
122
+ },
123
+ // ── Hotkeys & Combos ────────────────────────────────────────────────────
124
+ /**
125
+ * Execute a keyboard shortcut.
126
+ * Keys are pressed in order and released in reverse order.
127
+ *
128
+ * @example
129
+ * ```typescript
130
+ * keyboard.hotkey('ctrl', 'c'); // Copy
131
+ * keyboard.hotkey('ctrl', 'shift', 's'); // Save As
132
+ * keyboard.hotkey('alt', 'f4'); // Close window
133
+ * ```
134
+ */
135
+ hotkey(...keys) {
136
+ native.keyboardHotkey(keys);
137
+ },
138
+ /**
139
+ * Execute a hotkey from a single string like "ctrl+shift+s".
140
+ * More convenient for dynamic/programmatic use.
141
+ *
142
+ * @example
143
+ * ```typescript
144
+ * keyboard.hotkeyString('ctrl+c');
145
+ * keyboard.hotkeyString('ctrl+shift+s');
146
+ * keyboard.hotkeyString('alt+f4');
147
+ * ```
148
+ */
149
+ hotkeyString(combo) {
150
+ native.keyboardHotkeyString(combo);
151
+ },
152
+ // ── Key Sequences (Macros) ──────────────────────────────────────────────
153
+ /**
154
+ * Execute a sequence of keyboard actions separated by '|'.
155
+ *
156
+ * Each action can be:
157
+ * - A hotkey combo: `"ctrl+c"`
158
+ * - A single key press: `"enter"`
159
+ * - Literal text to type: `"type:Hello World"`
160
+ *
161
+ * @example
162
+ * ```typescript
163
+ * // Select all → Copy → Switch window → Paste
164
+ * keyboard.sequence('ctrl+a | ctrl+c | alt+tab | ctrl+v');
165
+ *
166
+ * // Open file dialog, type filename, press enter
167
+ * keyboard.sequence('ctrl+o | type:document.txt | enter');
168
+ *
169
+ * // With custom delay between actions
170
+ * keyboard.sequence('tab | tab | enter', { delay: 50 });
171
+ * ```
172
+ */
173
+ sequence(sequence, options) {
174
+ native.keyboardSequence(sequence, options?.delay ?? undefined);
175
+ },
176
+ // ── Key State Detection ─────────────────────────────────────────────────
177
+ /**
178
+ * Check if a key is currently held down.
179
+ */
180
+ isPressed(key) {
181
+ return native.keyboardIsPressed(key);
182
+ },
183
+ /**
184
+ * Check multiple keys at once.
185
+ * Returns an array of booleans matching the input keys.
186
+ *
187
+ * @example
188
+ * ```typescript
189
+ * const [ctrl, shift, alt] = keyboard.arePressed('ctrl', 'shift', 'alt');
190
+ * if (ctrl && !shift) { ... }
191
+ * ```
192
+ */
193
+ arePressed(...keys) {
194
+ return native.keyboardArePressed(keys);
195
+ },
196
+ /**
197
+ * Check if a toggle key (CapsLock, NumLock, ScrollLock) is ON.
198
+ *
199
+ * @example
200
+ * ```typescript
201
+ * if (keyboard.isToggled('capslock')) {
202
+ * console.log('CapsLock is ON');
203
+ * }
204
+ * ```
205
+ */
206
+ isToggled(key) {
207
+ return native.keyboardIsToggled(key);
208
+ },
209
+ /**
210
+ * Toggle a lock key (CapsLock, NumLock, ScrollLock).
211
+ * Sends a press+release to flip the toggle state.
212
+ */
213
+ toggleKey(key) {
214
+ native.keyboardToggleKey(key);
215
+ },
216
+ // ── Key Wait Primitives ─────────────────────────────────────────────────
217
+ /**
218
+ * Wait until a specific key is pressed (blocking).
219
+ * Returns true if pressed, false if timed out.
220
+ *
221
+ * @example
222
+ * ```typescript
223
+ * console.log('Press Escape to continue...');
224
+ * keyboard.waitForKey('escape', { timeout: 10000 });
225
+ * ```
226
+ */
227
+ waitForKey(key, options) {
228
+ return native.keyboardWaitForKey(key, options?.timeout ?? undefined);
229
+ },
230
+ /**
231
+ * Wait until a specific key is released (blocking).
232
+ * Useful after `waitForKey` to detect key-up.
233
+ */
234
+ waitForKeyRelease(key, options) {
235
+ return native.keyboardWaitForKeyRelease(key, options?.timeout ?? undefined);
236
+ },
237
+ // ── Utilities ───────────────────────────────────────────────────────────
238
+ /**
239
+ * Get a list of all recognized key names.
240
+ */
241
+ allKeys() {
242
+ return native.keyboardAllKeys();
243
+ },
244
+ // ── Convenience Methods ─────────────────────────────────────────────────
245
+ /** Press Enter */
246
+ enter() {
247
+ native.keyboardPress('enter');
248
+ },
249
+ /** Press Tab */
250
+ tab() {
251
+ native.keyboardPress('tab');
252
+ },
253
+ /** Press Escape */
254
+ escape() {
255
+ native.keyboardPress('escape');
256
+ },
257
+ /** Press Backspace */
258
+ backspace(count = 1) {
259
+ native.keyboardTap('backspace', count, 30);
260
+ },
261
+ /** Press Delete */
262
+ delete(count = 1) {
263
+ native.keyboardTap('delete', count, 30);
264
+ },
265
+ /** Select all (Ctrl+A / Cmd+A) */
266
+ selectAll() {
267
+ native.keyboardHotkey([getModifier(), 'a']);
268
+ },
269
+ /** Copy (Ctrl+C / Cmd+C) */
270
+ copy() {
271
+ native.keyboardHotkey([getModifier(), 'c']);
272
+ },
273
+ /** Paste (Ctrl+V / Cmd+V) */
274
+ paste() {
275
+ native.keyboardHotkey([getModifier(), 'v']);
276
+ },
277
+ /** Cut (Ctrl+X / Cmd+X) */
278
+ cut() {
279
+ native.keyboardHotkey([getModifier(), 'x']);
280
+ },
281
+ /** Undo (Ctrl+Z / Cmd+Z) */
282
+ undo() {
283
+ native.keyboardHotkey([getModifier(), 'z']);
284
+ },
285
+ /** Redo (Ctrl+Shift+Z / Cmd+Shift+Z) */
286
+ redo() {
287
+ native.keyboardHotkey([getModifier(), 'shift', 'z']);
288
+ },
289
+ /** Save (Ctrl+S / Cmd+S) */
290
+ save() {
291
+ native.keyboardHotkey([getModifier(), 's']);
292
+ },
293
+ /** Find (Ctrl+F / Cmd+F) */
294
+ find() {
295
+ native.keyboardHotkey([getModifier(), 'f']);
296
+ },
297
+ /** New (Ctrl+N / Cmd+N) */
298
+ new() {
299
+ native.keyboardHotkey([getModifier(), 'n']);
300
+ },
301
+ /** Close tab/window (Ctrl+W / Cmd+W) */
302
+ close() {
303
+ native.keyboardHotkey([getModifier(), 'w']);
304
+ },
305
+ /** Print (Ctrl+P / Cmd+P) */
306
+ print() {
307
+ native.keyboardHotkey([getModifier(), 'p']);
308
+ },
309
+ /** Switch application (Alt+Tab / Cmd+Tab) */
310
+ switchApp() {
311
+ const mod = process.platform === 'darwin' ? 'cmd' : 'alt';
312
+ native.keyboardHotkey([mod, 'tab']);
313
+ },
314
+ // ── Async (Non-Blocking) Typing ───────────────────────────────────────
315
+ // Same character-by-character typing but yields to the event loop
316
+ // between each character so other operations can run in parallel.
317
+ // ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ──
318
+ /**
319
+ * Type text character-by-character — **non-blocking**.
320
+ *
321
+ * Unlike `type()` which blocks the thread, this yields to the event loop
322
+ * between each character. Other code (screen monitoring, mouse movement)
323
+ * can run in parallel while text is being typed.
324
+ *
325
+ * Returns a cancellable handle.
326
+ *
327
+ * @example
328
+ * ```typescript
329
+ * // Await completion
330
+ * await keyboard.typeAsync('Hello World!', { delay: 30 });
331
+ *
332
+ * // Cancel mid-type
333
+ * const handle = keyboard.typeAsync('Long text...');
334
+ * setTimeout(() => handle.cancel(), 500);
335
+ * await handle.promise;
336
+ * ```
337
+ */
338
+ typeAsync(text, options) {
339
+ let cancelled = false;
340
+ let timer = null;
341
+ const delay = options?.delay ?? 20;
342
+ const promise = new Promise((resolve) => {
343
+ let i = 0;
344
+ function nextChar() {
345
+ if (cancelled || i >= text.length) {
346
+ resolve();
347
+ return;
348
+ }
349
+ // Type one character using batch (handles Unicode properly)
350
+ native.keyboardTypeBatch(text[i]);
351
+ i++;
352
+ timer = setTimeout(nextChar, delay);
353
+ }
354
+ nextChar();
355
+ });
356
+ return {
357
+ promise,
358
+ cancel() {
359
+ cancelled = true;
360
+ if (timer !== null)
361
+ clearTimeout(timer);
362
+ },
363
+ };
364
+ },
365
+ /**
366
+ * Type text with human-like random delays — **non-blocking**.
367
+ *
368
+ * Each character is typed with a random delay between minDelay and maxDelay.
369
+ * Non-blocking: the event loop is free between characters.
370
+ */
371
+ typeHumanizedAsync(text, options) {
372
+ let cancelled = false;
373
+ let timer = null;
374
+ const minDelay = options?.minDelay ?? 30;
375
+ const maxDelay = options?.maxDelay ?? 120;
376
+ const promise = new Promise((resolve) => {
377
+ let i = 0;
378
+ function nextChar() {
379
+ if (cancelled || i >= text.length) {
380
+ resolve();
381
+ return;
382
+ }
383
+ native.keyboardTypeBatch(text[i]);
384
+ i++;
385
+ const delay = minDelay + Math.random() * (maxDelay - minDelay);
386
+ timer = setTimeout(nextChar, delay);
387
+ }
388
+ nextChar();
389
+ });
390
+ return {
391
+ promise,
392
+ cancel() {
393
+ cancelled = true;
394
+ if (timer !== null)
395
+ clearTimeout(timer);
396
+ },
397
+ };
398
+ },
399
+ };
400
+ // ── Helpers ─────────────────────────────────────────────────────────────────
401
+ function getModifier() {
402
+ return process.platform === 'darwin' ? 'cmd' : 'ctrl';
403
+ }
404
+ //# sourceMappingURL=keyboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard.js","sourceRoot":"","sources":["../ts/keyboard.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,+BAA+B;AAC/B,+EAA+E;AAC/E,8EAA8E;AAC9E,oEAAoE;AACpE,+EAA+E;;;AAI/E,MAAM,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AActC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACU,QAAA,QAAQ,GAAG;IACtB,2EAA2E;IAE3E;;;OAGG;IACH,IAAI,CAAC,IAAY,EAAE,OAAqB;QACtC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,SAAS,CAAC,CAAC;IACzD,CAAC;IAED;;OAEG;IACH,aAAa,CAAC,IAAY,EAAE,OAA8B;QACxD,MAAM,CAAC,qBAAqB,CAC1B,IAAI,EACJ,OAAO,EAAE,QAAQ,IAAI,SAAS,EAC9B,OAAO,EAAE,QAAQ,IAAI,SAAS,CAC/B,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,SAAS,CA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