rx-hotkeys 3.1.1 → 4.1.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.
package/README.md CHANGED
@@ -4,13 +4,15 @@ rx-hotkeys is a powerful and flexible TypeScript library for managing keyboard s
4
4
 
5
5
  ## ✨ Features
6
6
 
7
- * **Official React Hooks**: Provides an official wrapper (`HotkeysProvider`, `useHotkeys`) for seamless, idiomatic integration with React.
7
+ * **Official React Hooks**: Provides an official wrapper (`HotkeysProvider`, `useHotkeys`, `useScopedHotkeysContext`) for seamless, idiomatic integration with React.
8
8
  * **Fully Observable API**: Returns an RxJS `Observable` for each shortcut, allowing for powerful stream manipulation like chaining, filtering, debouncing, and merging with other streams.
9
9
  * **Flexible Shortcut Definitions**: Define shortcuts using simple, intuitive strings (e.g., `"ctrl+s"` or `"g -> i"`) in addition to the classic object-based configuration.
10
10
  * **Element-Scoped Listeners**: Attach shortcuts to specific DOM elements, so they are only active within a certain component or area, not just on the global `document`.
11
11
  * **`keyup` Event Support**: Trigger actions on key release (`keyup`) in addition to the default key press (`keydown`).
12
12
  * **Key Combinations & Sequences**: Supports both simultaneous key presses (`Ctrl+S`) and ordered key sequences (`g` -> `c`).
13
13
  * **Context Management**: Activate or deactivate groups of shortcuts based on the application's current state (e.g., "editor", "modal", "global").
14
+ * **Stack-Based Context Management**: Natively handles nested contexts with an `enter`/`leave` API, perfect for hierarchical UIs like pages, modals, and dropdowns.
15
+ * **Temporary Context Override**: Safely override all contexts with a high-priority temporary context, ideal for global application states like "saving" or "loading".
14
16
  * **Strict Global Shortcuts**: Option to register global shortcuts that *only* fire when no other context is active.
15
17
  * **Type-Safe Key Definitions**: Uses an exported `Keys` object based on standard `KeyboardEvent.key` values for a superior developer experience and fewer errors.
16
18
  * **Sequence Timeouts**: Optional timeout between key presses in a sequence to prevent accidental triggers.
@@ -22,40 +24,17 @@ rx-hotkeys is a powerful and flexible TypeScript library for managing keyboard s
22
24
  npm install rxjs rx-hotkeys
23
25
  ```
24
26
 
25
- ## ⚠️ Breaking Changes (v3.0+)
27
+ ## ⚠️ Breaking Changes (v4.0+)
26
28
 
27
- Starting with v3.0, the API has been significantly updated for a more powerful and idiomatic RxJS experience. This is a major breaking change.
29
+ Starting with v4.0, the context management API has been fundamentally redesigned into a more powerful and robust dual-mode system.
28
30
 
29
- * `addCombination` and `addSequence` no longer accept a `callback` property in their configuration.
30
- * They now return an **`Observable<KeyboardEvent>`**.
31
- * You **must** now call `.subscribe()` on the returned Observable to execute your action.
31
+ * The old `setContext` method (which returned a boolean) has been replaced.
32
+ * The library now offers two distinct ways to manage contexts:
33
+ 1. **Context Stack (`enterContext`/`leaveContext`)**: For hierarchical UI states.
34
+ 2. **Context Override (`setContext` returns a `restore` function)**: For temporary, global state overrides.
35
+ * `getContext` method rename to `getActiveContext`.
32
36
 
33
- **Migration Example:**
34
-
35
- **Old (v2.x):**
36
- ```typescript
37
- // The old way
38
- keyManager.addCombination({
39
- id: "save",
40
- keys: { key: Keys.S, ctrlKey: true },
41
- callback: () => console.log("File saved!"),
42
- });
43
- ```
44
-
45
- **New (v3.0+):**
46
- ```typescript
47
- // The new, observable-based way
48
- const save$ = keyManager.addCombination({
49
- id: "save",
50
- keys: { key: Keys.S, ctrlKey: true }
51
- });
52
-
53
- const subscription = save$.subscribe(() => console.log("File saved!"));
54
-
55
- // Don't forget to unsubscribe when your component is destroyed!
56
- // The stream will also complete automatically if the shortcut is removed or keyManager.destroy() is called.
57
- // subscription.unsubscribe();
58
- ```
37
+ Please review the "Context Management" section below for details.
59
38
 
60
39
  ## Basic Usage
61
40
 
@@ -143,16 +122,55 @@ const submit$ = keyManager.addCombination({
143
122
  submit$.subscribe(() => console.log("Form submitted on Enter keyup!"));
144
123
  ```
145
124
 
146
- ### 6. Manage Contexts
125
+ ### 6. Context Management
126
+
127
+ You now have two powerful tools for managing contexts.
147
128
 
148
- Control which shortcuts are active by setting the context.
129
+ #### A) Context Stack (`enterContext` / `leaveContext`)
130
+
131
+ Use this for nested UI scopes that follow a clear hierarchy.
149
132
 
150
133
  ```typescript
151
- // Assuming some shortcuts are configured with context: "editor"
152
- keyManager.setContext("editor"); // Activates "editor" shortcuts and global shortcuts
134
+ // A shortcut with context: "editor" will NOT be active here.
135
+ console.log(keyManager.getActiveContext()); // null
136
+
137
+ // Activate the "editor" context
138
+ keyManager.enterContext("editor");
139
+ // Now, pressing Ctrl+S will trigger the "saveFile" shortcut.
140
+ console.log(keyManager.getActiveContext()); // 'editor'
141
+
142
+ // Imagine opening a dropdown menu inside the editor
143
+ keyManager.enterContext("dropdown-menu");
144
+ console.log(keyManager.getActiveContext()); // 'dropdown-menu'
145
+
146
+ // When the dropdown closes, leave its context
147
+ keyManager.leaveContext();
148
+ console.log(keyManager.getActiveContext()); // 'editor' (restored automatically)
149
+ ```
150
+
151
+ #### B) Context Override (`setContext` and `restore`)
153
152
 
154
- // To activate only global shortcuts (those with no context or context: null)
155
- keyManager.setContext(null);
153
+ Use this for temporary, high-priority states that should override everything else.
154
+
155
+ ```typescript
156
+ async function performSave() {
157
+ // Set a temporary "saving" context that overrides the stack.
158
+ const restore = keyManager.setContext('saving');
159
+
160
+ // Any shortcuts with context: 'saving' are now active.
161
+ // All other shortcuts (editor, etc.) are inactive.
162
+ console.log(keyManager.getActiveContext()); // 'saving'
163
+
164
+ try {
165
+ await someAsyncSaveOperation();
166
+ } finally {
167
+ // No matter what happens, call restore() to clear the override
168
+ // and return control to the context stack.
169
+ restore();
170
+ }
171
+
172
+ console.log(keyManager.getActiveContext()); // e.g., 'editor' (restored from the stack)
173
+ }
156
174
  ```
157
175
 
158
176
  ### 7. Clean Up
@@ -245,7 +263,7 @@ export function MyModal({ onClose }) {
245
263
  useScopedHotkeysContext('modal');
246
264
 
247
265
  // This hotkey will only be active when the 'modal' context is active.
248
- useHotkeys('escape', onClose, { context: 'modal' });
266
+ useHotkeys("escape", onClose, { context: 'modal' });
249
267
 
250
268
  return (
251
269
  <div className="modal">
@@ -283,13 +301,25 @@ Registers a key sequence shortcut.
283
301
  * `config`: The `KeySequenceConfig` object.
284
302
  * Returns an `Observable<KeyboardEvent>` that emits the final `KeyboardEvent` when the sequence is completed.
285
303
 
286
- `setContext(contextName: string | null): boolean`
304
+ `enterContext(contextName: string | null): void`
305
+
306
+ Pushes a context onto the **context stack**. It becomes active if no override is set.
307
+
308
+ `leaveContext(): string | null | undefined`
309
+
310
+ Pops a context from the **context stack**, returning the context that was left.
287
311
 
288
- Sets the active context. Only shortcuts matching this context or global shortcuts will trigger.
312
+ `setContext(contextName: string | null): () => void`
289
313
 
290
- `getContext(): string | null`
314
+ Sets a temporary **override context**. Returns a `restore` function to clear the override.
291
315
 
292
- Returns the current active context name, or `null`.
316
+ `getActiveContext(): string | null`
317
+
318
+ Returns the current active context (checks for an override first, then the stack top).
319
+
320
+ `onContextChange$: Observable<string | null>`
321
+
322
+ A public `Observable` property that emits the active context whenever it changes.
293
323
 
294
324
  `remove(id: string): boolean`
295
325
 
@@ -322,34 +352,36 @@ A React component that provides the Hotkeys instance to its children.
322
352
  `useHotkeys(keys, callback, options?)`
323
353
 
324
354
  A React hook to register a key combination.
325
- * `keys: string | string[]`: The shortcut definition (e.g., `'ctrl+s'`).
355
+ * `keys: KeyCombinationConfig["keys"]`: The shortcut definition (e.g., `'ctrl+s'`).
326
356
  * `callback: (event: KeyboardEvent) => void`: The function to execute.
327
357
  * `options?: HotkeyHookOptions`: Optional config for `preventDefault`, `context`, `target`, etc.
328
358
 
329
359
  `useSequence(sequence, callback, options?)`
330
360
 
331
361
  A React hook to register a key sequence.
332
- * `sequence: string | string[]`: The sequence definition (e.g., `'g -> i'`).
362
+ * `sequence: KeySequenceConfig["sequence"]`: The sequence definition (e.g., `'g -> i'`).
333
363
  * `callback: (event: KeyboardEvent) => void`: The function to execute.
334
364
  * `options?: SequenceHookOptions`: Optional config for `preventDefault`, `context`, etc.
335
365
 
336
- `useScopedHotkeysContext(context)`
366
+ `useScopedHotkeysContext(context, enabled: boolean = true)`
337
367
 
338
368
  A React hook to apply a specific context for the lifetime of the component.
339
369
 
370
+ `useHotkeysManager(): Hotkeys`
371
+ A hook to get direct access to the `Hotkeys` manager instance.
372
+
340
373
  ### Configuration Interfaces
341
374
 
342
375
  #### `KeyCombinationConfig`
343
376
 
344
377
  * `id: string` (required): Unique identifier for the shortcut.
345
- * `keys: string | KeyCombinationTrigger | KeyCombinationTrigger[]` (required): Defines the key(s). Can be a string (`"ctrl+s"`), a shorthand `StandardKey` (`Keys.Escape`), an object (`{ key: Keys.S, ctrlKey: true }`), or an array of these.
378
+ * `keys: KeyCombinationTrigger | KeyCombinationTrigger[]` (required): Defines the key(s). Can be a string (`"ctrl+s"`), a shorthand `StandardKey` (`Keys.Escape`), an object (`{ key: Keys.S, ctrlKey: true }`), or an array of these.
346
379
  * `context?: string | null`: Specifies the context in which this shortcut is active. If `null` or `undefined`, it's a global shortcut.
347
380
  * `preventDefault?: boolean`: If `true`, `event.preventDefault()` will be called when the shortcut triggers. Defaults to `false`.
348
381
  * `description?: string`: An optional description for the shortcut (e.g., for help menus).
349
382
  * `strict?: boolean` (optional): If `true` and the shortcut has no `context`, it will only fire when no other context is active. Defaults to `false`.
350
383
  * `target?: HTMLElement` (optional): The DOM element to attach the listener to. Defaults to `document`.
351
384
  * `event?: "keydown" | "keyup"` (optional): The keyboard event to listen for. Defaults to `"keydown"`.
352
- * `callback?: (event: KeyboardEvent) => void` (**@deprecated**): This property is deprecated. Subscribe to the `Observable` returned by `addCombination` instead.
353
385
 
354
386
  #### `KeySequenceConfig`
355
387
 
@@ -362,7 +394,19 @@ A React hook to apply a specific context for the lifetime of the component.
362
394
  * `strict?: boolean` (optional): If `true` and the shortcut has no `context`, it will only fire when no other context is active.
363
395
  * `target?: HTMLElement` (optional): The DOM element to attach the listener to. Defaults to `document`.
364
396
  * `event?: "keydown" | "keyup"` (optional): The keyboard event to listen for. Defaults to `"keydown"`.
365
- * `callback?: (event: KeyboardEvent) => void` (**@deprecated**): This property is deprecated. Subscribe to the `Observable` returned by `addSequence` instead.
397
+
398
+ ```
399
+ type KeyCombinationTrigger = {
400
+ key: StandardKey;
401
+ ctrlKey?: boolean;
402
+ altKey?: boolean;
403
+ shiftKey?: boolean;
404
+ metaKey?: boolean;
405
+ } | StandardKey | string;
406
+ ```
407
+
408
+ *
409
+ *
366
410
 
367
411
  ## Key Matching & Normalization
368
412
 
@@ -6,10 +6,6 @@ export declare enum ShortcutTypes {
6
6
  }
7
7
  interface ShortcutConfigBase {
8
8
  id: string;
9
- /**
10
- * @deprecated The callback property is deprecated. `addCombination` and `addSequence` now return an Observable. Please subscribe to it instead.
11
- */
12
- callback?: (event: KeyboardEvent) => void;
13
9
  context?: string | null;
14
10
  preventDefault?: boolean;
15
11
  description?: string;
@@ -41,7 +37,7 @@ interface ShortcutConfigBase {
41
37
  * Defines a single key trigger, which can be a StandardKey (for simple presses like "Escape")
42
38
  * or an object specifying the main key and its modifiers (e.g., { key: Keys.S, ctrlKey: true }).
43
39
  */
44
- type KeyCombinationTrigger = {
40
+ export type KeyCombinationTrigger = {
45
41
  /**
46
42
  * The main key for the combination.
47
43
  * This MUST be a value from the exported `Keys` object
@@ -57,7 +53,18 @@ type KeyCombinationTrigger = {
57
53
  altKey?: boolean;
58
54
  shiftKey?: boolean;
59
55
  metaKey?: boolean;
60
- } | StandardKey;
56
+ } | StandardKey | string;
57
+ /**
58
+ * A fully parsed, canonical representation of a single key trigger.
59
+ * All modifier keys are explicitly defined as booleans.
60
+ */
61
+ interface ParsedTrigger {
62
+ key: StandardKey;
63
+ ctrlKey: boolean;
64
+ altKey: boolean;
65
+ shiftKey: boolean;
66
+ metaKey: boolean;
67
+ }
61
68
  export interface KeyCombinationConfig extends ShortcutConfigBase {
62
69
  /**
63
70
  * Defines the key or key combination(s) that trigger the shortcut.
@@ -76,7 +83,7 @@ export interface KeyCombinationConfig extends ShortcutConfigBase {
76
83
  * To define multiple triggers for the same action:
77
84
  * Example: `keys: [Keys.Enter, { key: Keys.Space, ctrlKey: true }]`
78
85
  */
79
- keys: KeyCombinationTrigger | KeyCombinationTrigger[] | string;
86
+ keys: KeyCombinationTrigger | KeyCombinationTrigger[];
80
87
  }
81
88
  export interface KeySequenceConfig extends ShortcutConfigBase {
82
89
  /**
@@ -101,6 +108,7 @@ export interface ActiveShortcut {
101
108
  id: string;
102
109
  config: ShortcutConfig;
103
110
  terminator$: Subject<void>;
111
+ parsedTriggers?: ParsedTrigger[];
104
112
  }
105
113
  /**
106
114
  * Manages keyboard shortcuts for web applications.
@@ -111,18 +119,32 @@ export declare class Hotkeys {
111
119
  private static readonly KEYDOWN_EVENT;
112
120
  private static readonly KEYUP_EVENT;
113
121
  private static readonly LOG_PREFIX;
122
+ private static readonly NO_OVERRIDE;
114
123
  private keydownStreams;
115
124
  private keyupStreams;
116
- private activeContext$;
117
125
  private activeShortcuts;
118
126
  private debugMode;
127
+ private contextStack$;
128
+ private overrideContext$;
129
+ /**
130
+ * An Observable that emits the new active context name (or null) whenever it changes.
131
+ * The active context is the override context if one is set, otherwise it's the context
132
+ * from the top of the stack.
133
+ */
134
+ private readonly activeContext$;
119
135
  /**
120
136
  * Creates an instance of Hotkeys.
121
- * @param initialContext - Optional initial context name. Shortcuts will only trigger if their context matches this, or if they have no context defined.
137
+ * @param initialContext - Optional initial context name. This forms the base of the context stack.
122
138
  * @param debugMode - Optional. If true, debug messages will be logged to the console. Defaults to false.
123
139
  * @throws Error if not in a browser environment (i.e., `document` or `performance` is undefined).
124
140
  */
125
141
  constructor(initialContext?: string | null, debugMode?: boolean);
142
+ /**
143
+ * Helper method to determine the active context based on override and stack.
144
+ */
145
+ private _resolveActiveContext;
146
+ private _normalizeAndParseTriggers;
147
+ private _normalizeSequence;
126
148
  /**
127
149
  * Gets or creates a shared event stream for a given event type and target.
128
150
  * @param eventType The type of event ("keydown" or "keyup").
@@ -131,19 +153,32 @@ export declare class Hotkeys {
131
153
  */
132
154
  private _getEventStream;
133
155
  /**
134
- * Sets the active context for shortcuts.
135
- * Only shortcuts matching this context (or shortcuts with no specific context defined)
136
- * will be active and can be triggered.
137
- * @param contextName - The name of the context (e.g., "modal", "editor", "global").
138
- * Pass `null` to activate shortcuts with no context or to deactivate context-specific shortcuts.
139
- * @returns `true` if the context was changed, `false` if the new context was the same as the current one.
156
+ * Sets a temporary, high-priority override context that takes precedence over the context stack.
157
+ * @param contextName The override context to activate (can be a string or `null`).
158
+ * @returns A `restore` function that, when called, clears the override context, reverting to the stack.
140
159
  */
141
- setContext(contextName: string | null): boolean;
160
+ setContext(contextName: string | null): () => void;
142
161
  /**
143
- * Gets the current active context.
162
+ * @deprecated Rename to `getActiveContext`
163
+ * Gets the current active context, considering any override.
144
164
  * @returns The current context name as a string, or `null` if no context is set.
145
165
  */
146
166
  getContext(): string | null;
167
+ /**
168
+ * Gets the current active context, considering any override.
169
+ * @returns The current context name as a string, or `null` if no context is set.
170
+ */
171
+ getActiveContext(): string | null;
172
+ /**
173
+ * Pushes a new context onto the context stack. It will become active if no override context is set.
174
+ * @param contextName The name of the context to enter (e.g., "modal", "editor").
175
+ */
176
+ enterContext(contextName: string | null): void;
177
+ /**
178
+ * Pops the current context from the stack.
179
+ * @returns The context that was just left from the stack, or `undefined` if at the base.
180
+ */
181
+ leaveContext(): string | null | undefined;
147
182
  /**
148
183
  * Enables or disables debug logging for the Hotkeys instance.
149
184
  * When enabled, various internal actions and shortcut triggers will be logged to the console.
@@ -158,10 +193,6 @@ export declare class Hotkeys {
158
193
  hasShortcut(id: string): boolean;
159
194
  /**
160
195
  * An Observable that emits the new context name (or null) whenever the active context changes.
161
- * This allows external parts of the application to react to context transitions.
162
- *
163
- * Note: This observable benefits from the distinct check within the `setContext` method,
164
- * meaning it will only emit when the context value actually changes.
165
196
  *
166
197
  * @example
167
198
  * ```typescript
@@ -1 +1 @@
1
- {"version":3,"file":"hotkeys.d.ts","sourceRoot":"","sources":["../../src/core/hotkeys.ts"],"names":[],"mappings":"AAAA,OAAO,EACgC,UAAU,EAC2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