@tanstack/solid-hotkeys 0.21.3 → 0.22.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/dist/createKeyHold.js
CHANGED
|
@@ -46,8 +46,8 @@ function createKeyHold(key) {
|
|
|
46
46
|
const tracker = getKeyStateTracker();
|
|
47
47
|
const heldKeysSelector = useSelector(tracker.store, (state) => state.heldKeys);
|
|
48
48
|
return createMemo(() => {
|
|
49
|
-
|
|
50
|
-
return
|
|
49
|
+
heldKeysSelector();
|
|
50
|
+
return tracker.isKeyHeld(typeof key === "function" ? key() : key);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-hotkeys",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "SolidJS adapter for TanStack Hotkeys",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,10 +38,11 @@
|
|
|
38
38
|
"skills"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@tanstack/hotkeys": "0.
|
|
41
|
+
"@tanstack/hotkeys": "0.27.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@solidjs/testing-library": "^0.8.10",
|
|
45
|
+
"@tanstack/hotkeys-test-utils": "0.0.0",
|
|
45
46
|
"@testing-library/jest-dom": "^7.0.1",
|
|
46
47
|
"solid-js": "^1.9.18",
|
|
47
48
|
"vite-plugin-solid": "^2.11.15"
|
|
@@ -54,8 +55,9 @@
|
|
|
54
55
|
"lint": "oxlint ./src",
|
|
55
56
|
"lint:fix": "oxlint ./src --fix",
|
|
56
57
|
"test:oxlint": "oxlint ./src",
|
|
57
|
-
"test:lib": "vitest
|
|
58
|
+
"test:lib": "vitest",
|
|
58
59
|
"test:lib:dev": "pnpm test:lib --watch",
|
|
60
|
+
"test:coverage": "vitest --coverage",
|
|
59
61
|
"test:types": "tsc",
|
|
60
62
|
"build": "tsdown",
|
|
61
63
|
"test:build": "publint --strict && node ../../scripts/verify-package.ts"
|
|
@@ -69,7 +69,7 @@ export function Editor() {
|
|
|
69
69
|
| `createHotkeyRegistrations()` | Get an accessor listing every registered hotkey with its options, `meta`, and `status` (whether it's enabled and in an active scope). |
|
|
70
70
|
| `createHotkeyScopesState()` | Get an accessor of the active scopes and the exclusive scope that owns the keyboard. |
|
|
71
71
|
| `createHotkeyHint(hotkey, options?)` | Get an accessor of whether held modifiers should reveal a shortcut's hint. False unless a registration of the hotkey can fire: enabled, in an active scope, and with focus inside its element target. |
|
|
72
|
-
| `createKeyHold(key)` | Get an accessor of whether one key is held.
|
|
72
|
+
| `createKeyHold(key)` | Get an accessor of whether one key is held. Letters match in any case; other names, such as `Shift`, are case-sensitive. |
|
|
73
73
|
| `createHeldKeys()` | Get an accessor of every key that's held right now. |
|
|
74
74
|
| `createHeldKeyCodes()` | Get an accessor mapping each held key to its physical `event.code`. |
|
|
75
75
|
|