@tanstack/vue-hotkeys 0.25.4 → 0.25.6
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.
|
@@ -3,7 +3,7 @@ import { useDefaultHotkeysOptionsSource } from "./defaultOptions.js";
|
|
|
3
3
|
import { useStoreSelector } from "./useStoreSelector.js";
|
|
4
4
|
import { HotkeyRecorder } from "@tanstack/hotkeys";
|
|
5
5
|
import { getCurrentInstance, onScopeDispose, toValue, watch } from "vue";
|
|
6
|
-
import { withDefaults } from "@tanstack/hotkeys/adapter";
|
|
6
|
+
import { syncRecorderOptions, withDefaults } from "@tanstack/hotkeys/adapter";
|
|
7
7
|
|
|
8
8
|
// src/useHotkeyRecorder.ts
|
|
9
9
|
function useHotkeyRecorder(options) {
|
|
@@ -13,7 +13,7 @@ function useHotkeyRecorder(options) {
|
|
|
13
13
|
const isRecording = useStoreSelector(recorder.store, (state) => state.isRecording);
|
|
14
14
|
const steps = useStoreSelector(recorder.store, (state) => state.steps);
|
|
15
15
|
const recordedHotkey = useStoreSelector(recorder.store, (state) => state.recordedHotkey);
|
|
16
|
-
const stopWatcher = watch(resolve, (resolved) => recorder
|
|
16
|
+
const stopWatcher = watch(resolve, (resolved) => syncRecorderOptions(recorder, resolved), { immediate: true });
|
|
17
17
|
const instance = getCurrentInstance();
|
|
18
18
|
const hidden = () => {
|
|
19
19
|
for (let i = instance; i; i = i.parent) if (i.isDeactivated) return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/vue-hotkeys",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.6",
|
|
4
4
|
"description": "Vue adapter for TanStack Hotkeys",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"skills"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@tanstack/hotkeys": "0.
|
|
41
|
+
"@tanstack/hotkeys": "0.36.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@tanstack/hotkeys-test-utils": "0.0.0",
|