@pyreon/hotkeys 0.24.6 → 0.25.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/lib/analysis/index.js.html +1 -1
- package/lib/index.js +27 -1
- package/lib/index.js.map +1 -0
- package/lib/types/index.d.ts.map +1 -0
- package/package.json +5 -6
|
@@ -5386,7 +5386,7 @@ var drawChart = (function (exports) {
|
|
|
5386
5386
|
</script>
|
|
5387
5387
|
<script>
|
|
5388
5388
|
/*<!--*/
|
|
5389
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"uid":"
|
|
5389
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"uid":"bbd8b690-1","name":"parse.ts"},{"uid":"bbd8b690-3","name":"registry.ts"},{"uid":"bbd8b690-5","name":"use-hotkey.ts"},{"uid":"bbd8b690-7","name":"use-hotkey-scope.ts"},{"uid":"bbd8b690-9","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"bbd8b690-1":{"renderedLength":1941,"gzipLength":838,"brotliLength":0,"metaUid":"bbd8b690-0"},"bbd8b690-3":{"renderedLength":3276,"gzipLength":1146,"brotliLength":0,"metaUid":"bbd8b690-2"},"bbd8b690-5":{"renderedLength":496,"gzipLength":295,"brotliLength":0,"metaUid":"bbd8b690-4"},"bbd8b690-7":{"renderedLength":421,"gzipLength":264,"brotliLength":0,"metaUid":"bbd8b690-6"},"bbd8b690-9":{"renderedLength":774,"gzipLength":462,"brotliLength":0,"metaUid":"bbd8b690-8"}},"nodeMetas":{"bbd8b690-0":{"id":"/src/parse.ts","moduleParts":{"index.js":"bbd8b690-1"},"imported":[],"importedBy":[{"uid":"bbd8b690-8"},{"uid":"bbd8b690-2"}]},"bbd8b690-2":{"id":"/src/registry.ts","moduleParts":{"index.js":"bbd8b690-3"},"imported":[{"uid":"bbd8b690-10"},{"uid":"bbd8b690-0"}],"importedBy":[{"uid":"bbd8b690-8"},{"uid":"bbd8b690-4"},{"uid":"bbd8b690-6"}]},"bbd8b690-4":{"id":"/src/use-hotkey.ts","moduleParts":{"index.js":"bbd8b690-5"},"imported":[{"uid":"bbd8b690-11"},{"uid":"bbd8b690-2"}],"importedBy":[{"uid":"bbd8b690-8"}]},"bbd8b690-6":{"id":"/src/use-hotkey-scope.ts","moduleParts":{"index.js":"bbd8b690-7"},"imported":[{"uid":"bbd8b690-11"},{"uid":"bbd8b690-2"}],"importedBy":[{"uid":"bbd8b690-8"}]},"bbd8b690-8":{"id":"/src/index.ts","moduleParts":{"index.js":"bbd8b690-9"},"imported":[{"uid":"bbd8b690-10"},{"uid":"bbd8b690-4"},{"uid":"bbd8b690-6"},{"uid":"bbd8b690-2"},{"uid":"bbd8b690-0"}],"importedBy":[],"isEntry":true},"bbd8b690-10":{"id":"@pyreon/reactivity","moduleParts":{},"imported":[],"importedBy":[{"uid":"bbd8b690-8"},{"uid":"bbd8b690-2"}]},"bbd8b690-11":{"id":"@pyreon/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"bbd8b690-4"},{"uid":"bbd8b690-6"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
5390
5390
|
|
|
5391
5391
|
const run = () => {
|
|
5392
5392
|
const width = window.innerWidth;
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { registerSingleton, signal } from "@pyreon/reactivity";
|
|
1
2
|
import { onUnmount } from "@pyreon/core";
|
|
2
|
-
import { signal } from "@pyreon/reactivity";
|
|
3
3
|
|
|
4
4
|
//#region src/parse.ts
|
|
5
5
|
const KEY_ALIASES = {
|
|
@@ -227,6 +227,32 @@ function useHotkeyScope(scope) {
|
|
|
227
227
|
onUnmount(() => disableScope(scope));
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region src/index.ts
|
|
232
|
+
/**
|
|
233
|
+
* @pyreon/hotkeys — Reactive keyboard shortcut management for Pyreon.
|
|
234
|
+
*
|
|
235
|
+
* Register global or scoped keyboard shortcuts with automatic lifecycle
|
|
236
|
+
* management. Supports modifier keys, aliases, input filtering, and
|
|
237
|
+
* scope-based activation.
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```ts
|
|
241
|
+
* import { useHotkey, useHotkeyScope } from '@pyreon/hotkeys'
|
|
242
|
+
*
|
|
243
|
+
* // Global shortcut
|
|
244
|
+
* useHotkey('ctrl+s', () => save(), { description: 'Save' })
|
|
245
|
+
*
|
|
246
|
+
* // Scoped shortcut — only active when scope is enabled
|
|
247
|
+
* useHotkeyScope('editor')
|
|
248
|
+
* useHotkey('ctrl+z', () => undo(), { scope: 'editor' })
|
|
249
|
+
*
|
|
250
|
+
* // Platform-aware — mod = ⌘ on Mac, Ctrl elsewhere
|
|
251
|
+
* useHotkey('mod+k', () => openCommandPalette())
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
254
|
+
registerSingleton("@pyreon/hotkeys", "0.24.6", import.meta.url);
|
|
255
|
+
|
|
230
256
|
//#endregion
|
|
231
257
|
export { _resetHotkeys, disableScope, enableScope, formatCombo, getActiveScopes, getRegisteredHotkeys, matchesCombo, parseShortcut, registerHotkey, useHotkey, useHotkeyScope };
|
|
232
258
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/parse.ts","../src/registry.ts","../src/use-hotkey.ts","../src/use-hotkey-scope.ts","../src/index.ts"],"sourcesContent":["import type { KeyCombo } from './types'\n\n// ─── Key aliases ─────────────────────────────────────────────────────────────\n\nconst KEY_ALIASES: Record<string, string> = {\n esc: 'escape',\n return: 'enter',\n del: 'delete',\n ins: 'insert',\n space: ' ',\n spacebar: ' ',\n up: 'arrowup',\n down: 'arrowdown',\n left: 'arrowleft',\n right: 'arrowright',\n plus: '+',\n}\n\n/**\n * Parse a shortcut string like 'ctrl+shift+s' into a KeyCombo.\n * Supports aliases (esc, del, space, etc.) and mod (ctrl on Windows/Linux, meta on Mac).\n */\nexport function parseShortcut(shortcut: string): KeyCombo {\n const parts = shortcut.toLowerCase().trim().split('+')\n const combo: KeyCombo = {\n ctrl: false,\n shift: false,\n alt: false,\n meta: false,\n key: '',\n }\n\n for (const part of parts) {\n const p = part.trim()\n if (p === 'ctrl' || p === 'control') {\n combo.ctrl = true\n } else if (p === 'shift') {\n combo.shift = true\n } else if (p === 'alt') {\n combo.alt = true\n } else if (p === 'meta' || p === 'cmd' || p === 'command') {\n combo.meta = true\n } else if (p === 'mod') {\n // mod = meta on Mac, ctrl elsewhere\n if (isMac()) {\n combo.meta = true\n } else {\n combo.ctrl = true\n }\n } else {\n combo.key = KEY_ALIASES[p] ?? p\n }\n }\n\n return combo\n}\n\n/**\n * Check if a KeyboardEvent matches a KeyCombo.\n */\nexport function matchesCombo(event: KeyboardEvent, combo: KeyCombo): boolean {\n if (event.ctrlKey !== combo.ctrl) return false\n if (event.shiftKey !== combo.shift) return false\n if (event.altKey !== combo.alt) return false\n if (event.metaKey !== combo.meta) return false\n\n const eventKey = event.key.toLowerCase()\n return eventKey === combo.key\n}\n\n/**\n * Format a KeyCombo back to a human-readable string.\n */\nexport function formatCombo(combo: KeyCombo): string {\n const parts: string[] = []\n if (combo.ctrl) parts.push('Ctrl')\n if (combo.shift) parts.push('Shift')\n if (combo.alt) parts.push('Alt')\n if (combo.meta) parts.push(isMac() ? '⌘' : 'Meta')\n parts.push(combo.key.length === 1 ? combo.key.toUpperCase() : capitalize(combo.key))\n return parts.join('+')\n}\n\nfunction capitalize(s: string): string {\n return s.charAt(0).toUpperCase() + s.slice(1)\n}\n\nfunction isMac(): boolean {\n if (typeof navigator === 'undefined') return false\n return /mac|iphone|ipad|ipod/i.test(navigator.userAgent)\n}\n","import type { Signal } from '@pyreon/reactivity'\nimport { signal } from '@pyreon/reactivity'\nimport { matchesCombo, parseShortcut } from './parse'\nimport type { HotkeyEntry, HotkeyOptions } from './types'\n\n// ─── State ───────────────────────────────────────────────────────────────────\n\n// Linear array on purpose. Per-keystroke dispatch (line 35) iterates entries\n// in registration order — O(n) where n = registered hotkeys. For real apps\n// (single-digit to low-tens) the cost is sub-microsecond and well under the\n// 16ms frame budget. Switching to a Map<comboKey, entries[]> would help only\n// past ~5,000 hotkeys, which is unrealistic. The array also preserves\n// registration order for the rare case where two hotkeys match the same\n// combo on different scopes — first-registered wins. Don't replace with a\n// Map without confirming a real app actually hits the perf wall.\nconst entries: HotkeyEntry[] = []\nconst activeScopes = signal<Set<string>>(new Set(['global']))\nlet listenerAttached = false\nlet keydownHandler: ((event: KeyboardEvent) => void) | null = null\n\n// ─── Input detection ─────────────────────────────────────────────────────────\n\nconst INPUT_TAGS = new Set(['INPUT', 'TEXTAREA', 'SELECT'])\n\nfunction isInputFocused(event: KeyboardEvent): boolean {\n const target = event.target as HTMLElement | null\n if (!target) return false\n if (INPUT_TAGS.has(target.tagName)) return true\n if (target.isContentEditable) return true\n return false\n}\n\n// ─── Global listener ─────────────────────────────────────────────────────────\n\nfunction attachListener(): void {\n if (listenerAttached) return\n if (typeof window === 'undefined') return\n listenerAttached = true\n\n keydownHandler = (event) => {\n const scopes = activeScopes.peek()\n\n for (const entry of entries) {\n // Check scope\n if (!scopes.has(entry.options.scope)) continue\n\n // Check enabled\n const enabled =\n typeof entry.options.enabled === 'function'\n ? entry.options.enabled()\n : entry.options.enabled\n if (!enabled) continue\n\n // Check input focus\n if (!entry.options.enableOnInputs && isInputFocused(event)) continue\n\n // Check key match\n if (!matchesCombo(event, entry.combo)) continue\n\n // Match found\n if (entry.options.preventDefault) event.preventDefault()\n if (entry.options.stopPropagation) event.stopPropagation()\n entry.handler(event)\n }\n }\n\n window.addEventListener('keydown', keydownHandler)\n}\n\nfunction detachListener(): void {\n if (typeof window === 'undefined') return\n if (!listenerAttached || !keydownHandler) return\n window.removeEventListener('keydown', keydownHandler)\n listenerAttached = false\n keydownHandler = null\n}\n\n// ─── Registration ────────────────────────────────────────────────────────────\n\n/**\n * Register a keyboard shortcut. Returns an unregister function.\n *\n * @example\n * ```ts\n * const unregister = registerHotkey('ctrl+s', (e) => save(), { description: 'Save' })\n * // later: unregister()\n * ```\n */\nexport function registerHotkey(\n shortcut: string,\n handler: (event: KeyboardEvent) => void,\n options?: HotkeyOptions,\n): () => void {\n attachListener()\n\n const entry: HotkeyEntry = {\n shortcut,\n combo: parseShortcut(shortcut),\n handler,\n options: {\n scope: options?.scope ?? 'global',\n preventDefault: options?.preventDefault !== false,\n stopPropagation: options?.stopPropagation === true,\n enableOnInputs: options?.enableOnInputs === true,\n enabled: options?.enabled ?? true,\n ...(options?.description != null ? { description: options.description } : {}),\n },\n }\n\n entries.push(entry)\n\n return () => {\n const idx = entries.indexOf(entry)\n if (idx !== -1) entries.splice(idx, 1)\n\n // Detach listener if no more entries\n if (entries.length === 0) {\n detachListener()\n }\n }\n}\n\n// ─── Scope management ────────────────────────────────────────────────────────\n\n/**\n * Activate a hotkey scope. 'global' is always active.\n */\nexport function enableScope(scope: string): void {\n const current = activeScopes.peek()\n if (current.has(scope)) return\n const next = new Set(current)\n next.add(scope)\n activeScopes.set(next)\n}\n\n/**\n * Deactivate a hotkey scope. Cannot deactivate 'global'.\n */\nexport function disableScope(scope: string): void {\n if (scope === 'global') return\n const current = activeScopes.peek()\n if (!current.has(scope)) return\n const next = new Set(current)\n next.delete(scope)\n activeScopes.set(next)\n}\n\n/**\n * Get the currently active scopes as a reactive signal.\n */\nexport function getActiveScopes(): Signal<Set<string>> {\n return activeScopes\n}\n\n/**\n * Get all registered hotkeys (for building help dialogs).\n */\nexport function getRegisteredHotkeys(): ReadonlyArray<{\n shortcut: string\n scope: string\n description?: string\n}> {\n return entries.map((e) => ({\n shortcut: e.shortcut,\n scope: e.options.scope,\n ...(e.options.description != null ? { description: e.options.description } : {}),\n }))\n}\n\n// ─── Reset (for testing) ────────────────────────────────────────────────\n\nexport function _resetHotkeys(): void {\n entries.length = 0\n activeScopes.set(new Set(['global']))\n detachListener()\n}\n","import { onUnmount } from '@pyreon/core'\nimport { registerHotkey } from './registry'\nimport type { HotkeyOptions } from './types'\n\n/**\n * Register a keyboard shortcut scoped to a component's lifecycle.\n * Automatically unregisters when the component unmounts.\n *\n * @example\n * ```ts\n * function Editor() {\n * useHotkey('ctrl+s', () => save(), { description: 'Save document' })\n * useHotkey('ctrl+z', () => undo())\n * useHotkey('ctrl+shift+z', () => redo())\n * // ...\n * }\n * ```\n */\nexport function useHotkey(\n shortcut: string,\n handler: (event: KeyboardEvent) => void,\n options?: HotkeyOptions,\n): void {\n const unregister = registerHotkey(shortcut, handler, options)\n onUnmount(unregister)\n}\n","import { onUnmount } from '@pyreon/core'\nimport { disableScope, enableScope } from './registry'\n\n/**\n * Activate a hotkey scope for the lifetime of a component.\n * When the component unmounts, the scope is deactivated.\n *\n * @example\n * ```tsx\n * function Modal() {\n * useHotkeyScope('modal')\n * useHotkey('escape', () => closeModal(), { scope: 'modal' })\n * // ...\n * }\n * ```\n */\nexport function useHotkeyScope(scope: string): void {\n enableScope(scope)\n onUnmount(() => disableScope(scope))\n}\n","/**\n * @pyreon/hotkeys — Reactive keyboard shortcut management for Pyreon.\n *\n * Register global or scoped keyboard shortcuts with automatic lifecycle\n * management. Supports modifier keys, aliases, input filtering, and\n * scope-based activation.\n *\n * @example\n * ```ts\n * import { useHotkey, useHotkeyScope } from '@pyreon/hotkeys'\n *\n * // Global shortcut\n * useHotkey('ctrl+s', () => save(), { description: 'Save' })\n *\n * // Scoped shortcut — only active when scope is enabled\n * useHotkeyScope('editor')\n * useHotkey('ctrl+z', () => undo(), { scope: 'editor' })\n *\n * // Platform-aware — mod = ⌘ on Mac, Ctrl elsewhere\n * useHotkey('mod+k', () => openCommandPalette())\n * ```\n */\n\nimport { registerSingleton } from '@pyreon/reactivity'\n\n// Singleton sentinel — fail-loud detection of duplicate @pyreon/hotkeys\n// instances in the same heap. See @pyreon/reactivity/singleton-sentinel for\n// full rationale. Hardcoded version is acceptable here — it's a diagnostic\n// aid, not a load-bearing identity check.\nregisterSingleton('@pyreon/hotkeys', '0.24.6', import.meta.url)\n\n// ─── Hooks ───────────────────────────────────────────────────────────────────\n\nexport { useHotkey } from './use-hotkey'\nexport { useHotkeyScope } from './use-hotkey-scope'\n\n// ─── Imperative API ──────────────────────────────────────────────────────────\n\nexport {\n disableScope,\n enableScope,\n getActiveScopes,\n getRegisteredHotkeys,\n registerHotkey,\n} from './registry'\n\n// ─── Utilities ───────────────────────────────────────────────────────────────\n\nexport { formatCombo, matchesCombo, parseShortcut } from './parse'\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\nexport type { HotkeyEntry, HotkeyOptions, KeyCombo } from './types'\n\n// ─── Testing ─────────────────────────────────────────────────────────────────\n\nexport { _resetHotkeys } from './registry'\n"],"mappings":";;;;AAIA,MAAM,cAAsC;CAC1C,KAAK;CACL,QAAQ;CACR,KAAK;CACL,KAAK;CACL,OAAO;CACP,UAAU;CACV,IAAI;CACJ,MAAM;CACN,MAAM;CACN,OAAO;CACP,MAAM;AACR;;;;;AAMA,SAAgB,cAAc,UAA4B;CACxD,MAAM,QAAQ,SAAS,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG;CACrD,MAAM,QAAkB;EACtB,MAAM;EACN,OAAO;EACP,KAAK;EACL,MAAM;EACN,KAAK;CACP;CAEA,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,IAAI,KAAK,KAAK;EACpB,IAAI,MAAM,UAAU,MAAM,WACxB,MAAM,OAAO;OACR,IAAI,MAAM,SACf,MAAM,QAAQ;OACT,IAAI,MAAM,OACf,MAAM,MAAM;OACP,IAAI,MAAM,UAAU,MAAM,SAAS,MAAM,WAC9C,MAAM,OAAO;OACR,IAAI,MAAM,OAEf,IAAI,MAAM,GACR,MAAM,OAAO;OAEb,MAAM,OAAO;OAGf,MAAM,MAAM,YAAY,MAAM;CAElC;CAEA,OAAO;AACT;;;;AAKA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EnB;AACF;;;;AAOA,SAAgB,YAAY,OAAqB;CAC/C,MAAM,UAAU,aAAa,KAAK;CAClC,IAAI,QAAQ,IAAI,KAAK,GAAG;CACxB,MAAM,OAAO,IAAI,IAAI,OAAO;CAC5B,KAAK,IAAI,KAAK;CACd,aAAa,IAAI,IAAI;AACvB;;;;AAKA,SAAgB,aAAa,OAAqB;CAChD,IAAI,UAAU,UAAU;CACxB,MAAM,UAAU,aAAa,KAAK;CAClC,IAAI,CAAC,QAAQ,IAAI,KAAK,GAAG;CACzB,MAAM,OAAO,IAAI,IAAI,OAAO;CAC5B,KAAK,OAAO,KAAK;CACjB,aAAa,IAAI,IAAI;AACvB;;;;AAKA,SAAgB,kBAAuC;CACrD,OAAO;AACT;;;;AAKA,SAAgB,uBAIb;CACD,OAAO,QAAQ,KAAK,OAAO;EACzB,UAAU,EAAE;EACZ,OAAO,EAAE,QAAQ;EACjB,GAAI,EAAE,QAAQ,eAAe,OAAO,EAAE,aAAa,EAAE,QAAQ,YAAY,IAAI,CAAC;CAChF,EAAE;AACJ;AAIA,SAAgB,gBAAsB;CACpC,QAAQ,SAAS;CACjB,aAAa,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;CACpC,eAAe;AACjB;;;;;;;;;;;;;;;;;;AC7JA,SAAgB,UACd,UACA,SACA,SACM;CAEN,UADmB,eAAe,UAAU,SAAS,OAClC,CAAC;AACtB;;;;;;;;;;;;;;;;;ACTA,SAAgB,eAAe,OAAqB;CAClD,YAAY,KAAK;CACjB,gBAAgB,aAAa,KAAK,CAAC;AACrC;;;;;;;;;;;;;;;;;;;;;;;;;;ACUA,kBAAkB,mBAAmB,UAAU,OAAO,KAAK,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index2.d.ts","names":[],"sources":["../../../src/types.ts","../../../src/use-hotkey.ts","../../../src/use-hotkey-scope.ts","../../../src/registry.ts","../../../src/parse.ts"],"mappings":";;;;;;AAMA;UAAiB,QAA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Pyreon — scope-aware, conflict detection",
|
|
5
5
|
"homepage": "https://github.com/pyreon/pyreon/tree/main/packages/hotkeys#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"lib",
|
|
17
|
-
"!lib/**/*.map",
|
|
18
17
|
"README.md",
|
|
19
18
|
"LICENSE"
|
|
20
19
|
],
|
|
@@ -41,13 +40,13 @@
|
|
|
41
40
|
},
|
|
42
41
|
"devDependencies": {
|
|
43
42
|
"@happy-dom/global-registrator": "^20.8.9",
|
|
44
|
-
"@pyreon/core": "^0.
|
|
43
|
+
"@pyreon/core": "^0.25.1",
|
|
45
44
|
"@pyreon/manifest": "0.13.1",
|
|
46
|
-
"@pyreon/reactivity": "^0.
|
|
45
|
+
"@pyreon/reactivity": "^0.25.1",
|
|
47
46
|
"@vitus-labs/tools-lint": "^2.4.0"
|
|
48
47
|
},
|
|
49
48
|
"dependencies": {
|
|
50
|
-
"@pyreon/core": "^0.
|
|
51
|
-
"@pyreon/reactivity": "^0.
|
|
49
|
+
"@pyreon/core": "^0.25.1",
|
|
50
|
+
"@pyreon/reactivity": "^0.25.1"
|
|
52
51
|
}
|
|
53
52
|
}
|