@tanstack/svelte-hotkeys 0.17.1 → 0.18.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.
@@ -1,5 +1,4 @@
1
- import { AppHotkeysStore } from '@tanstack/hotkeys';
2
- import type { AppHotkeys, CustomHotkeys, HotkeyChordRecorderOptions, HotkeySequenceRecorderOptions } from '@tanstack/hotkeys';
1
+ import type { AppHotkeys, AppHotkeysStore, CustomHotkeys, HotkeyChordRecorderOptions, HotkeySequenceRecorderOptions } from '@tanstack/hotkeys';
3
2
  import type { HotkeysProviderScopeProps } from '@tanstack/hotkeys/adapter';
4
3
  import type { CreateHotkeyCommonOptions } from './createHotkey.svelte.js';
5
4
  import type { Snippet } from 'svelte';
@@ -1,6 +1,6 @@
1
1
  import { createContext, onMount } from 'svelte';
2
- import { AppHotkeysStore, publishAppHotkeysStore } from '@tanstack/hotkeys';
3
- import { getHotkeysProviderScopeKey, mergeHotkeysProviderDefaults, } from '@tanstack/hotkeys/adapter';
2
+ import { publishAppHotkeysStore } from '@tanstack/hotkeys';
3
+ import { createAppHotkeysStore, getHotkeysProviderScopeKey, mergeHotkeysProviderDefaults, } from '@tanstack/hotkeys/adapter';
4
4
  import { activateScopeWhileMounted } from './internal.svelte.js';
5
5
  export const DEFAULT_OPTIONS = {};
6
6
  const [useHotkeysContext, setHotkeysContextValue] = createContext();
@@ -33,7 +33,7 @@ export function setHotkeysContextSource(source) {
33
33
  const parent = getHotkeysContext();
34
34
  const { appHotkeys, customHotkeys } = source();
35
35
  const store = appHotkeys
36
- ? new AppHotkeysStore(appHotkeys, {
36
+ ? createAppHotkeysStore(appHotkeys, {
37
37
  customHotkeys,
38
38
  onCustomHotkeysChange: (custom) => source().onCustomHotkeysChange?.(custom),
39
39
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/svelte-hotkeys",
3
- "version": "0.17.1",
3
+ "version": "0.18.0",
4
4
  "description": "Svelte adapter for TanStack Hotkeys",
5
5
  "author": "Kunal Rao",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "skills"
42
42
  ],
43
43
  "dependencies": {
44
- "@tanstack/hotkeys": "0.19.0"
44
+ "@tanstack/hotkeys": "0.20.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@sveltejs/package": "^3.0.0",