Repository navigation
ci: Version Packages - #215
Merged
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@tanstack/alpine-hotkeys@0.9.0
Minor Changes
#214
a179ef6- Hotkey hooks and functions in every adapter acceptundefinedandnullas the hotkey, for components with an optional shortcut. No hotkey registers nothing, and its hint isfalse. When a hotkey changes toundefinedornull, its registration is removed; when it changes back, it registers again. Before, a nullish hotkey threw: in React it unmounted the tree, in Vue, Solid, Angular, and Svelte the old hotkey kept firing, Ember failed to render, and Alpine stopped updating the page. In Angular,injectHotkey(() => this.shortcut(), …)now works with an optional input, without?? [].hotkeyis nullish.''or{ key: '' }, also registers nothing, so clearing a hotkey to''removes its registration. Before, an empty hotkey registered and fired onkeydownevents with no key, such as those some autofill tools send.HotkeyManager.registerstill requires a hotkey. It throws a clear error forundefined,null, or an empty hotkey, as it already did for an empty sequence.hasActiveRegistrationandmatchesHeldModifiersreturnfalsefor no hotkey.@hotkeydecorator still needs a hotkey, because it is set when the class is defined.Patch Changes
#214
a179ef6- An option set toundefinednow keeps its default, the same as leaving it out. Before, a wrapper component that forwarded unset props, such aspreventDefault: props.preventDefault, turned offpreventDefaultandstopPropagation, soMod+Salso opened the browser's Save dialog.eventType: undefinedmade a hotkey never fire, andscope: undefinedmoved a hotkey out of its provider's scope.register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults.setOptions,undefinedresets an option to its default, or removes it when it has no default.Behavior changes:
nulltarget registers nothing, like a ref that is still empty. Before, it listened ondocument. To listen ondocument, leave outtarget.prepareHotkeyDefinitionsin@tanstack/hotkeys/adapterdoes the same when noresolveTargetis given, which also applies to Svelte. Vue, Solid, Angular, Lit, Alpine, Ember, and Octane already skipped anulltarget.Updated dependencies [
a179ef6,a179ef6,a179ef6]:@tanstack/angular-hotkeys@0.19.0
Minor Changes
#214
a179ef6-HotkeysProvidernow applies a changedcustomHotkeysprop. Before, the provider read it only on the first render, so saved shortcuts that loaded asynchronously, or another user's shortcuts after sign-in, were ignored until the provider remounted.customHotkeyschanges, it replaces the current custom hotkeys without callingonCustomHotkeysChange. The prop is compared by value, so passing equal data again, such asJSON.parse(localStorage.getItem('hotkeys'))on every render, keeps changes the user made since.undefinedleaves the custom hotkeys unchanged, such as while saved data loads, andnullclears them, such as on sign-out.AppHotkeysStore.setOptionsacceptscustomHotkeyswith the same behavior. Lit, Alpine, and Ember apps can call it on the store thatprovideAppHotkeysreturns when saved data loads later.provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.#214
a179ef6- Hotkey hooks and functions in every adapter acceptundefinedandnullas the hotkey, for components with an optional shortcut. No hotkey registers nothing, and its hint isfalse. When a hotkey changes toundefinedornull, its registration is removed; when it changes back, it registers again. Before, a nullish hotkey threw: in React it unmounted the tree, in Vue, Solid, Angular, and Svelte the old hotkey kept firing, Ember failed to render, and Alpine stopped updating the page. In Angular,injectHotkey(() => this.shortcut(), …)now works with an optional input, without?? [].hotkeyis nullish.''or{ key: '' }, also registers nothing, so clearing a hotkey to''removes its registration. Before, an empty hotkey registered and fired onkeydownevents with no key, such as those some autofill tools send.HotkeyManager.registerstill requires a hotkey. It throws a clear error forundefined,null, or an empty hotkey, as it already did for an empty sequence.hasActiveRegistrationandmatchesHeldModifiersreturnfalsefor no hotkey.@hotkeydecorator still needs a hotkey, because it is set when the class is defined.Patch Changes
#214
a179ef6- An option set toundefinednow keeps its default, the same as leaving it out. Before, a wrapper component that forwarded unset props, such aspreventDefault: props.preventDefault, turned offpreventDefaultandstopPropagation, soMod+Salso opened the browser's Save dialog.eventType: undefinedmade a hotkey never fire, andscope: undefinedmoved a hotkey out of its provider's scope.register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults.setOptions,undefinedresets an option to its default, or removes it when it has no default.Behavior changes:
nulltarget registers nothing, like a ref that is still empty. Before, it listened ondocument. To listen ondocument, leave outtarget.prepareHotkeyDefinitionsin@tanstack/hotkeys/adapterdoes the same when noresolveTargetis given, which also applies to Svelte. Vue, Solid, Angular, Lit, Alpine, Ember, and Octane already skipped anulltarget.Updated dependencies [
a179ef6,a179ef6,a179ef6]:@tanstack/ember-hotkeys@0.8.0
Minor Changes
#214
a179ef6- Hotkey hooks and functions in every adapter acceptundefinedandnullas the hotkey, for components with an optional shortcut. No hotkey registers nothing, and its hint isfalse. When a hotkey changes toundefinedornull, its registration is removed; when it changes back, it registers again. Before, a nullish hotkey threw: in React it unmounted the tree, in Vue, Solid, Angular, and Svelte the old hotkey kept firing, Ember failed to render, and Alpine stopped updating the page. In Angular,injectHotkey(() => this.shortcut(), …)now works with an optional input, without?? [].hotkeyis nullish.''or{ key: '' }, also registers nothing, so clearing a hotkey to''removes its registration. Before, an empty hotkey registered and fired onkeydownevents with no key, such as those some autofill tools send.HotkeyManager.registerstill requires a hotkey. It throws a clear error forundefined,null, or an empty hotkey, as it already did for an empty sequence.hasActiveRegistrationandmatchesHeldModifiersreturnfalsefor no hotkey.@hotkeydecorator still needs a hotkey, because it is set when the class is defined.Patch Changes
#214
a179ef6- An option set toundefinednow keeps its default, the same as leaving it out. Before, a wrapper component that forwarded unset props, such aspreventDefault: props.preventDefault, turned offpreventDefaultandstopPropagation, soMod+Salso opened the browser's Save dialog.eventType: undefinedmade a hotkey never fire, andscope: undefinedmoved a hotkey out of its provider's scope.register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults.setOptions,undefinedresets an option to its default, or removes it when it has no default.Behavior changes:
nulltarget registers nothing, like a ref that is still empty. Before, it listened ondocument. To listen ondocument, leave outtarget.prepareHotkeyDefinitionsin@tanstack/hotkeys/adapterdoes the same when noresolveTargetis given, which also applies to Svelte. Vue, Solid, Angular, Lit, Alpine, Ember, and Octane already skipped anulltarget.Updated dependencies [
a179ef6,a179ef6,a179ef6]:@tanstack/hotkeys@0.21.0
Minor Changes
#214
a179ef6-HotkeysProvidernow applies a changedcustomHotkeysprop. Before, the provider read it only on the first render, so saved shortcuts that loaded asynchronously, or another user's shortcuts after sign-in, were ignored until the provider remounted.customHotkeyschanges, it replaces the current custom hotkeys without callingonCustomHotkeysChange. The prop is compared by value, so passing equal data again, such asJSON.parse(localStorage.getItem('hotkeys'))on every render, keeps changes the user made since.undefinedleaves the custom hotkeys unchanged, such as while saved data loads, andnullclears them, such as on sign-out.AppHotkeysStore.setOptionsacceptscustomHotkeyswith the same behavior. Lit, Alpine, and Ember apps can call it on the store thatprovideAppHotkeysreturns when saved data loads later.provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.#214
a179ef6- Hotkey hooks and functions in every adapter acceptundefinedandnullas the hotkey, for components with an optional shortcut. No hotkey registers nothing, and its hint isfalse. When a hotkey changes toundefinedornull, its registration is removed; when it changes back, it registers again. Before, a nullish hotkey threw: in React it unmounted the tree, in Vue, Solid, Angular, and Svelte the old hotkey kept firing, Ember failed to render, and Alpine stopped updating the page. In Angular,injectHotkey(() => this.shortcut(), …)now works with an optional input, without?? [].hotkeyis nullish.''or{ key: '' }, also registers nothing, so clearing a hotkey to''removes its registration. Before, an empty hotkey registered and fired onkeydownevents with no key, such as those some autofill tools send.HotkeyManager.registerstill requires a hotkey. It throws a clear error forundefined,null, or an empty hotkey, as it already did for an empty sequence.hasActiveRegistrationandmatchesHeldModifiersreturnfalsefor no hotkey.@hotkeydecorator still needs a hotkey, because it is set when the class is defined.#214
a179ef6- An option set toundefinednow keeps its default, the same as leaving it out. Before, a wrapper component that forwarded unset props, such aspreventDefault: props.preventDefault, turned offpreventDefaultandstopPropagation, soMod+Salso opened the browser's Save dialog.eventType: undefinedmade a hotkey never fire, andscope: undefinedmoved a hotkey out of its provider's scope.register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults.setOptions,undefinedresets an option to its default, or removes it when it has no default.Behavior changes:
nulltarget registers nothing, like a ref that is still empty. Before, it listened ondocument. To listen ondocument, leave outtarget.prepareHotkeyDefinitionsin@tanstack/hotkeys/adapterdoes the same when noresolveTargetis given, which also applies to Svelte. Vue, Solid, Angular, Lit, Alpine, Ember, and Octane already skipped anulltarget.@tanstack/lit-hotkeys@0.20.0
Minor Changes
#214
a179ef6- Hotkey hooks and functions in every adapter acceptundefinedandnullas the hotkey, for components with an optional shortcut. No hotkey registers nothing, and its hint isfalse. When a hotkey changes toundefinedornull, its registration is removed; when it changes back, it registers again. Before, a nullish hotkey threw: in React it unmounted the tree, in Vue, Solid, Angular, and Svelte the old hotkey kept firing, Ember failed to render, and Alpine stopped updating the page. In Angular,injectHotkey(() => this.shortcut(), …)now works with an optional input, without?? [].hotkeyis nullish.''or{ key: '' }, also registers nothing, so clearing a hotkey to''removes its registration. Before, an empty hotkey registered and fired onkeydownevents with no key, such as those some autofill tools send.HotkeyManager.registerstill requires a hotkey. It throws a clear error forundefined,null, or an empty hotkey, as it already did for an empty sequence.hasActiveRegistrationandmatchesHeldModifiersreturnfalsefor no hotkey.@hotkeydecorator still needs a hotkey, because it is set when the class is defined.Patch Changes
#214
a179ef6- An option set toundefinednow keeps its default, the same as leaving it out. Before, a wrapper component that forwarded unset props, such aspreventDefault: props.preventDefault, turned offpreventDefaultandstopPropagation, soMod+Salso opened the browser's Save dialog.eventType: undefinedmade a hotkey never fire, andscope: undefinedmoved a hotkey out of its provider's scope.register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults.setOptions,undefinedresets an option to its default, or removes it when it has no default.Behavior changes:
nulltarget registers nothing, like a ref that is still empty. Before, it listened ondocument. To listen ondocument, leave outtarget.prepareHotkeyDefinitionsin@tanstack/hotkeys/adapterdoes the same when noresolveTargetis given, which also applies to Svelte. Vue, Solid, Angular, Lit, Alpine, Ember, and Octane already skipped anulltarget.Updated dependencies [
a179ef6,a179ef6,a179ef6]:@tanstack/octane-hotkeys@0.9.0
Minor Changes
#214
a179ef6- Hotkey hooks and functions in every adapter acceptundefinedandnullas the hotkey, for components with an optional shortcut. No hotkey registers nothing, and its hint isfalse. When a hotkey changes toundefinedornull, its registration is removed; when it changes back, it registers again. Before, a nullish hotkey threw: in React it unmounted the tree, in Vue, Solid, Angular, and Svelte the old hotkey kept firing, Ember failed to render, and Alpine stopped updating the page. In Angular,injectHotkey(() => this.shortcut(), …)now works with an optional input, without?? [].hotkeyis nullish.''or{ key: '' }, also registers nothing, so clearing a hotkey to''removes its registration. Before, an empty hotkey registered and fired onkeydownevents with no key, such as those some autofill tools send.HotkeyManager.registerstill requires a hotkey. It throws a clear error forundefined,null, or an empty hotkey, as it already did for an empty sequence.hasActiveRegistrationandmatchesHeldModifiersreturnfalsefor no hotkey.@hotkeydecorator still needs a hotkey, because it is set when the class is defined.Patch Changes
#214
a179ef6-HotkeysProvidernow applies a changedcustomHotkeysprop. Before, the provider read it only on the first render, so saved shortcuts that loaded asynchronously, or another user's shortcuts after sign-in, were ignored until the provider remounted.customHotkeyschanges, it replaces the current custom hotkeys without callingonCustomHotkeysChange. The prop is compared by value, so passing equal data again, such asJSON.parse(localStorage.getItem('hotkeys'))on every render, keeps changes the user made since.undefinedleaves the custom hotkeys unchanged, such as while saved data loads, andnullclears them, such as on sign-out.AppHotkeysStore.setOptionsacceptscustomHotkeyswith the same behavior. Lit, Alpine, and Ember apps can call it on the store thatprovideAppHotkeysreturns when saved data loads later.provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.#214
a179ef6- An option set toundefinednow keeps its default, the same as leaving it out. Before, a wrapper component that forwarded unset props, such aspreventDefault: props.preventDefault, turned offpreventDefaultandstopPropagation, soMod+Salso opened the browser's Save dialog.eventType: undefinedmade a hotkey never fire, andscope: undefinedmoved a hotkey out of its provider's scope.register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults.setOptions,undefinedresets an option to its default, or removes it when it has no default.Behavior changes:
nulltarget registers nothing, like a ref that is still empty. Before, it listened ondocument. To listen ondocument, leave outtarget.prepareHotkeyDefinitionsin@tanstack/hotkeys/adapterdoes the same when noresolveTargetis given, which also applies to Svelte. Vue, Solid, Angular, Lit, Alpine, Ember, and Octane already skipped anulltarget.Updated dependencies [
a179ef6,a179ef6,a179ef6]:@tanstack/preact-hotkeys@0.19.0
Minor Changes
#214
a179ef6- Hotkey hooks and functions in every adapter acceptundefinedandnullas the hotkey, for components with an optional shortcut. No hotkey registers nothing, and its hint isfalse. When a hotkey changes toundefinedornull, its registration is removed; when it changes back, it registers again. Before, a nullish hotkey threw: in React it unmounted the tree, in Vue, Solid, Angular, and Svelte the old hotkey kept firing, Ember failed to render, and Alpine stopped updating the page. In Angular,injectHotkey(() => this.shortcut(), …)now works with an optional input, without?? [].hotkeyis nullish.''or{ key: '' }, also registers nothing, so clearing a hotkey to''removes its registration. Before, an empty hotkey registered and fired onkeydownevents with no key, such as those some autofill tools send.HotkeyManager.registerstill requires a hotkey. It throws a clear error forundefined,null, or an empty hotkey, as it already did for an empty sequence.hasActiveRegistrationandmatchesHeldModifiersreturnfalsefor no hotkey.@hotkeydecorator still needs a hotkey, because it is set when the class is defined.#214
a179ef6- An option set toundefinednow keeps its default, the same as leaving it out. Before, a wrapper component that forwarded unset props, such aspreventDefault: props.preventDefault, turned offpreventDefaultandstopPropagation, soMod+Salso opened the browser's Save dialog.eventType: undefinedmade a hotkey never fire, andscope: undefinedmoved a hotkey out of its provider's scope.register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults.setOptions,undefinedresets an option to its default, or removes it when it has no default.Behavior changes:
nulltarget registers nothing, like a ref that is still empty. Before, it listened ondocument. To listen ondocument, leave outtarget.prepareHotkeyDefinitionsin@tanstack/hotkeys/adapterdoes the same when noresolveTargetis given, which also applies to Svelte. Vue, Solid, Angular, Lit, Alpine, Ember, and Octane already skipped anulltarget.Patch Changes
#214
a179ef6-HotkeysProvidernow applies a changedcustomHotkeysprop. Before, the provider read it only on the first render, so saved shortcuts that loaded asynchronously, or another user's shortcuts after sign-in, were ignored until the provider remounted.customHotkeyschanges, it replaces the current custom hotkeys without callingonCustomHotkeysChange. The prop is compared by value, so passing equal data again, such asJSON.parse(localStorage.getItem('hotkeys'))on every render, keeps changes the user made since.undefinedleaves the custom hotkeys unchanged, such as while saved data loads, andnullclears them, such as on sign-out.AppHotkeysStore.setOptionsacceptscustomHotkeyswith the same behavior. Lit, Alpine, and Ember apps can call it on the store thatprovideAppHotkeysreturns when saved data loads later.provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.Updated dependencies [
a179ef6,a179ef6,a179ef6]:@tanstack/react-hotkeys@0.20.0
Minor Changes
#214
a179ef6- Hotkey hooks and functions in every adapter acceptundefinedandnullas the hotkey, for components with an optional shortcut. No hotkey registers nothing, and its hint isfalse. When a hotkey changes toundefinedornull, its registration is removed; when it changes back, it registers again. Before, a nullish hotkey threw: in React it unmounted the tree, in Vue, Solid, Angular, and Svelte the old hotkey kept firing, Ember failed to render, and Alpine stopped updating the page. In Angular,injectHotkey(() => this.shortcut(), …)now works with an optional input, without?? [].hotkeyis nullish.''or{ key: '' }, also registers nothing, so clearing a hotkey to''removes its registration. Before, an empty hotkey registered and fired onkeydownevents with no key, such as those some autofill tools send.HotkeyManager.registerstill requires a hotkey. It throws a clear error forundefined,null, or an empty hotkey, as it already did for an empty sequence.hasActiveRegistrationandmatchesHeldModifiersreturnfalsefor no hotkey.@hotkeydecorator still needs a hotkey, because it is set when the class is defined.#214
a179ef6- An option set toundefinednow keeps its default, the same as leaving it out. Before, a wrapper component that forwarded unset props, such aspreventDefault: props.preventDefault, turned offpreventDefaultandstopPropagation, soMod+Salso opened the browser's Save dialog.eventType: undefinedmade a hotkey never fire, andscope: undefinedmoved a hotkey out of its provider's scope.register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults.setOptions,undefinedresets an option to its default, or removes it when it has no default.Behavior changes:
nulltarget registers nothing, like a ref that is still empty. Before, it listened ondocument. To listen ondocument, leave outtarget.prepareHotkeyDefinitionsin@tanstack/hotkeys/adapterdoes the same when noresolveTargetis given, which also applies to Svelte. Vue, Solid, Angular, Lit, Alpine, Ember, and Octane already skipped anulltarget.Patch Changes
#214
a179ef6-HotkeysProvidernow applies a changedcustomHotkeysprop. Before, the provider read it only on the first render, so saved shortcuts that loaded asynchronously, or another user's shortcuts after sign-in, were ignored until the provider remounted.customHotkeyschanges, it replaces the current custom hotkeys without callingonCustomHotkeysChange. The prop is compared by value, so passing equal data again, such asJSON.parse(localStorage.getItem('hotkeys'))on every render, keeps changes the user made since.undefinedleaves the custom hotkeys unchanged, such as while saved data loads, andnullclears them, such as on sign-out.AppHotkeysStore.setOptionsacceptscustomHotkeyswith the same behavior. Lit, Alpine, and Ember apps can call it on the store thatprovideAppHotkeysreturns when saved data loads later.provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.Updated dependencies [
a179ef6,a179ef6,a179ef6]:@tanstack/solid-hotkeys@0.19.0
Minor Changes
#214
a179ef6- Hotkey hooks and functions in every adapter acceptundefinedandnullas the hotkey, for components with an optional shortcut. No hotkey registers nothing, and its hint isfalse. When a hotkey changes toundefinedornull, its registration is removed; when it changes back, it registers again. Before, a nullish hotkey threw: in React it unmounted the tree, in Vue, Solid, Angular, and Svelte the old hotkey kept firing, Ember failed to render, and Alpine stopped updating the page. In Angular,injectHotkey(() => this.shortcut(), …)now works with an optional input, without?? [].hotkeyis nullish.''or{ key: '' }, also registers nothing, so clearing a hotkey to''removes its registration. Before, an empty hotkey registered and fired onkeydownevents with no key, such as those some autofill tools send.HotkeyManager.registerstill requires a hotkey. It throws a clear error forundefined,null, or an empty hotkey, as it already did for an empty sequence.hasActiveRegistrationandmatchesHeldModifiersreturnfalsefor no hotkey.@hotkeydecorator still needs a hotkey, because it is set when the class is defined.Patch Changes
#214
a179ef6-HotkeysProvidernow applies a changedcustomHotkeysprop. Before, the provider read it only on the first render, so saved shortcuts that loaded asynchronously, or another user's shortcuts after sign-in, were ignored until the provider remounted.customHotkeyschanges, it replaces the current custom hotkeys without callingonCustomHotkeysChange. The prop is compared by value, so passing equal data again, such asJSON.parse(localStorage.getItem('hotkeys'))on every render, keeps changes the user made since.undefinedleaves the custom hotkeys unchanged, such as while saved data loads, andnullclears them, such as on sign-out.AppHotkeysStore.setOptionsacceptscustomHotkeyswith the same behavior. Lit, Alpine, and Ember apps can call it on the store thatprovideAppHotkeysreturns when saved data loads later.provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.#214
a179ef6- An option set toundefinednow keeps its default, the same as leaving it out. Before, a wrapper component that forwarded unset props, such aspreventDefault: props.preventDefault, turned offpreventDefaultandstopPropagation, soMod+Salso opened the browser's Save dialog.eventType: undefinedmade a hotkey never fire, andscope: undefinedmoved a hotkey out of its provider's scope.register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults.setOptions,undefinedresets an option to its default, or removes it when it has no default.Behavior changes:
nulltarget registers nothing, like a ref that is still empty. Before, it listened ondocument. To listen ondocument, leave outtarget.prepareHotkeyDefinitionsin@tanstack/hotkeys/adapterdoes the same when noresolveTargetis given, which also applies to Svelte. Vue, Solid, Angular, Lit, Alpine, Ember, and Octane already skipped anulltarget.Updated dependencies [
a179ef6,a179ef6,a179ef6]:@tanstack/svelte-hotkeys@0.19.0
Minor Changes
#214
a179ef6- Hotkey hooks and functions in every adapter acceptundefinedandnullas the hotkey, for components with an optional shortcut. No hotkey registers nothing, and its hint isfalse. When a hotkey changes toundefinedornull, its registration is removed; when it changes back, it registers again. Before, a nullish hotkey threw: in React it unmounted the tree, in Vue, Solid, Angular, and Svelte the old hotkey kept firing, Ember failed to render, and Alpine stopped updating the page. In Angular,injectHotkey(() => this.shortcut(), …)now works with an optional input, without?? [].hotkeyis nullish.''or{ key: '' }, also registers nothing, so clearing a hotkey to''removes its registration. Before, an empty hotkey registered and fired onkeydownevents with no key, such as those some autofill tools send.HotkeyManager.registerstill requires a hotkey. It throws a clear error forundefined,null, or an empty hotkey, as it already did for an empty sequence.hasActiveRegistrationandmatchesHeldModifiersreturnfalsefor no hotkey.@hotkeydecorator still needs a hotkey, because it is set when the class is defined.Patch Changes
#214
a179ef6-HotkeysProvidernow applies a changedcustomHotkeysprop. Before, the provider read it only on the first render, so saved shortcuts that loaded asynchronously, or another user's shortcuts after sign-in, were ignored until the provider remounted.customHotkeyschanges, it replaces the current custom hotkeys without callingonCustomHotkeysChange. The prop is compared by value, so passing equal data again, such asJSON.parse(localStorage.getItem('hotkeys'))on every render, keeps changes the user made since.undefinedleaves the custom hotkeys unchanged, such as while saved data loads, andnullclears them, such as on sign-out.AppHotkeysStore.setOptionsacceptscustomHotkeyswith the same behavior. Lit, Alpine, and Ember apps can call it on the store thatprovideAppHotkeysreturns when saved data loads later.provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.#214
a179ef6- An option set toundefinednow keeps its default, the same as leaving it out. Before, a wrapper component that forwarded unset props, such aspreventDefault: props.preventDefault, turned offpreventDefaultandstopPropagation, soMod+Salso opened the browser's Save dialog.eventType: undefinedmade a hotkey never fire, andscope: undefinedmoved a hotkey out of its provider's scope.register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults.setOptions,undefinedresets an option to its default, or removes it when it has no default.Behavior changes:
nulltarget registers nothing, like a ref that is still empty. Before, it listened ondocument. To listen ondocument, leave outtarget.prepareHotkeyDefinitionsin@tanstack/hotkeys/adapterdoes the same when noresolveTargetis given, which also applies to Svelte. Vue, Solid, Angular, Lit, Alpine, Ember, and Octane already skipped anulltarget.Updated dependencies [
a179ef6,a179ef6,a179ef6]:@tanstack/vue-hotkeys@0.19.0
Minor Changes
#214
a179ef6-HotkeysProvidernow applies a changedcustomHotkeysprop. Before, the provider read it only on the first render, so saved shortcuts that loaded asynchronously, or another user's shortcuts after sign-in, were ignored until the provider remounted.customHotkeyschanges, it replaces the current custom hotkeys without callingonCustomHotkeysChange. The prop is compared by value, so passing equal data again, such asJSON.parse(localStorage.getItem('hotkeys'))on every render, keeps changes the user made since.undefinedleaves the custom hotkeys unchanged, such as while saved data loads, andnullclears them, such as on sign-out.AppHotkeysStore.setOptionsacceptscustomHotkeyswith the same behavior. Lit, Alpine, and Ember apps can call it on the store thatprovideAppHotkeysreturns when saved data loads later.provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.#214
a179ef6- Hotkey hooks and functions in every adapter acceptundefinedandnullas the hotkey, for components with an optional shortcut. No hotkey registers nothing, and its hint isfalse. When a hotkey changes toundefinedornull, its registration is removed; when it changes back, it registers again. Before, a nullish hotkey threw: in React it unmounted the tree, in Vue, Solid, Angular, and Svelte the old hotkey kept firing, Ember failed to render, and Alpine stopped updating the page. In Angular,injectHotkey(() => this.shortcut(), …)now works with an optional input, without?? [].hotkeyis nullish.''or{ key: '' }, also registers nothing, so clearing a hotkey to''removes its registration. Before, an empty hotkey registered and fired onkeydownevents with no key, such as those some autofill tools send.HotkeyManager.registerstill requires a hotkey. It throws a clear error forundefined,null, or an empty hotkey, as it already did for an empty sequence.hasActiveRegistrationandmatchesHeldModifiersreturnfalsefor no hotkey.@hotkeydecorator still needs a hotkey, because it is set when the class is defined.Patch Changes
#214
a179ef6- An option set toundefinednow keeps its default, the same as leaving it out. Before, a wrapper component that forwarded unset props, such aspreventDefault: props.preventDefault, turned offpreventDefaultandstopPropagation, soMod+Salso opened the browser's Save dialog.eventType: undefinedmade a hotkey never fire, andscope: undefinedmoved a hotkey out of its provider's scope.register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults.setOptions,undefinedresets an option to its default, or removes it when it has no default.Behavior changes:
nulltarget registers nothing, like a ref that is still empty. Before, it listened ondocument. To listen ondocument, leave outtarget.prepareHotkeyDefinitionsin@tanstack/hotkeys/adapterdoes the same when noresolveTargetis given, which also applies to Svelte. Vue, Solid, Angular, Lit, Alpine, Ember, and Octane already skipped anulltarget.Updated dependencies [
a179ef6,a179ef6,a179ef6]:@tanstack/angular-hotkeys-devtools@0.4.1
Patch Changes
@tanstack/hotkeys-devtools@1.7.1
Patch Changes
a179ef6,a179ef6,a179ef6]:@tanstack/preact-hotkeys-devtools@0.12.1
Patch Changes
@tanstack/react-hotkeys-devtools@0.13.1
Patch Changes
@tanstack/solid-hotkeys-devtools@0.12.1
Patch Changes
@tanstack/svelte-hotkeys-devtools@0.4.1
Patch Changes
@tanstack/vue-hotkeys-devtools@0.12.1
Patch Changes