ci: Version Packages #215
main fromrefs/pull/215/head·merged by KevinVandy 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?? [].- The plural forms skip a definition whose
hotkeyis nullish. - An empty hotkey, such as
''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.- The Lit
@hotkeydecorator still needs a hotkey, because it is set when the class is defined.
- The plural forms skip a definition whose
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.- This applies to
register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults. - In
setOptions,undefinedresets an option to its default, or removes it when it has no default.
Behavior changes:
- In React and Preact, a
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.
- This applies to
Updated dependencies [
a179ef6,a179ef6,a179ef6]:- @tanstack/hotkeys@0.21.0
@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.- When the value of
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.- In Angular,
provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.
- When the value of
#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?? [].- The plural forms skip a definition whose
hotkeyis nullish. - An empty hotkey, such as
''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.- The Lit
@hotkeydecorator still needs a hotkey, because it is set when the class is defined.
- The plural forms skip a definition whose
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.- This applies to
register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults. - In
setOptions,undefinedresets an option to its default, or removes it when it has no default.
Behavior changes:
- In React and Preact, a
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.
- This applies to
Updated dependencies [
a179ef6,a179ef6,a179ef6]:- @tanstack/hotkeys@0.21.0
@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?? [].- The plural forms skip a definition whose
hotkeyis nullish. - An empty hotkey, such as
''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.- The Lit
@hotkeydecorator still needs a hotkey, because it is set when the class is defined.
- The plural forms skip a definition whose
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.- This applies to
register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults. - In
setOptions,undefinedresets an option to its default, or removes it when it has no default.
Behavior changes:
- In React and Preact, a
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.
- This applies to
Updated dependencies [
a179ef6,a179ef6,a179ef6]:- @tanstack/hotkeys@0.21.0
@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.- When the value of
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.- In Angular,
provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.
- When the value of
#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?? [].- The plural forms skip a definition whose
hotkeyis nullish. - An empty hotkey, such as
''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.- The Lit
@hotkeydecorator still needs a hotkey, because it is set when the class is defined.
- The plural forms skip a definition whose
#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.- This applies to
register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults. - In
setOptions,undefinedresets an option to its default, or removes it when it has no default.
Behavior changes:
- In React and Preact, a
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.
- This applies to
@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?? [].- The plural forms skip a definition whose
hotkeyis nullish. - An empty hotkey, such as
''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.- The Lit
@hotkeydecorator still needs a hotkey, because it is set when the class is defined.
- The plural forms skip a definition whose
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.- This applies to
register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults. - In
setOptions,undefinedresets an option to its default, or removes it when it has no default.
Behavior changes:
- In React and Preact, a
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.
- This applies to
Updated dependencies [
a179ef6,a179ef6,a179ef6]:- @tanstack/hotkeys@0.21.0
@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?? [].- The plural forms skip a definition whose
hotkeyis nullish. - An empty hotkey, such as
''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.- The Lit
@hotkeydecorator still needs a hotkey, because it is set when the class is defined.
- The plural forms skip a definition whose
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.- When the value of
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.- In Angular,
provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.
- When the value of
#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.- This applies to
register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults. - In
setOptions,undefinedresets an option to its default, or removes it when it has no default.
Behavior changes:
- In React and Preact, a
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.
- This applies to
Updated dependencies [
a179ef6,a179ef6,a179ef6]:- @tanstack/hotkeys@0.21.0
@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?? [].- The plural forms skip a definition whose
hotkeyis nullish. - An empty hotkey, such as
''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.- The Lit
@hotkeydecorator still needs a hotkey, because it is set when the class is defined.
- The plural forms skip a definition whose
#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.- This applies to
register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults. - In
setOptions,undefinedresets an option to its default, or removes it when it has no default.
Behavior changes:
- In React and Preact, a
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.
- This applies to
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.- When the value of
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.- In Angular,
provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.
- When the value of
Updated dependencies [
a179ef6,a179ef6,a179ef6]:- @tanstack/hotkeys@0.21.0
@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?? [].- The plural forms skip a definition whose
hotkeyis nullish. - An empty hotkey, such as
''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.- The Lit
@hotkeydecorator still needs a hotkey, because it is set when the class is defined.
- The plural forms skip a definition whose
#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.- This applies to
register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults. - In
setOptions,undefinedresets an option to its default, or removes it when it has no default.
Behavior changes:
- In React and Preact, a
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.
- This applies to
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.- When the value of
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.- In Angular,
provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.
- When the value of
Updated dependencies [
a179ef6,a179ef6,a179ef6]:- @tanstack/hotkeys@0.21.0
@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?? [].- The plural forms skip a definition whose
hotkeyis nullish. - An empty hotkey, such as
''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.- The Lit
@hotkeydecorator still needs a hotkey, because it is set when the class is defined.
- The plural forms skip a definition whose
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.- When the value of
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.- In Angular,
provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.
- When the value of
#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.- This applies to
register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults. - In
setOptions,undefinedresets an option to its default, or removes it when it has no default.
Behavior changes:
- In React and Preact, a
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.
- This applies to
Updated dependencies [
a179ef6,a179ef6,a179ef6]:- @tanstack/hotkeys@0.21.0
@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?? [].- The plural forms skip a definition whose
hotkeyis nullish. - An empty hotkey, such as
''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.- The Lit
@hotkeydecorator still needs a hotkey, because it is set when the class is defined.
- The plural forms skip a definition whose
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.- When the value of
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.- In Angular,
provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.
- When the value of
#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.- This applies to
register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults. - In
setOptions,undefinedresets an option to its default, or removes it when it has no default.
Behavior changes:
- In React and Preact, a
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.
- This applies to
Updated dependencies [
a179ef6,a179ef6,a179ef6]:- @tanstack/hotkeys@0.21.0
@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.- When the value of
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.- In Angular,
provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.
- When the value of
#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?? [].- The plural forms skip a definition whose
hotkeyis nullish. - An empty hotkey, such as
''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.- The Lit
@hotkeydecorator still needs a hotkey, because it is set when the class is defined.
- The plural forms skip a definition whose
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.- This applies to
register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults. - In
setOptions,undefinedresets an option to its default, or removes it when it has no default.
Behavior changes:
- In React and Preact, a
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.
- This applies to
Updated dependencies [
a179ef6,a179ef6,a179ef6]:- @tanstack/hotkeys@0.21.0
@tanstack/angular-hotkeys-devtools@0.4.1#
Patch Changes#
- Updated dependencies []:
- @tanstack/hotkeys-devtools@1.7.1
@tanstack/hotkeys-devtools@1.7.1#
Patch Changes#
@tanstack/preact-hotkeys-devtools@0.12.1#
Patch Changes#
- Updated dependencies []:
- @tanstack/hotkeys-devtools@1.7.1
@tanstack/react-hotkeys-devtools@0.13.1#
Patch Changes#
- Updated dependencies []:
- @tanstack/hotkeys-devtools@1.7.1
@tanstack/solid-hotkeys-devtools@0.12.1#
Patch Changes#
- Updated dependencies []:
- @tanstack/hotkeys-devtools@1.7.1
@tanstack/svelte-hotkeys-devtools@0.4.1#
Patch Changes#
- Updated dependencies []:
- @tanstack/hotkeys-devtools@1.7.1
@tanstack/vue-hotkeys-devtools@0.12.1#
Patch Changes#
- Updated dependencies []:
- @tanstack/hotkeys-devtools@1.7.1
- 1
KevinVandy merged this40451a5
KevinVandy closed this
Sign in to join this conversation.
Important
Review skipped#
Bot user detected.
To trigger a single review, invoke the
@coderabbitai reviewcommand.a7efa382-5b16-4337-9b68-f6f9e57bf28fYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share