Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 10 additions & 3 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
"$schema": "https://unpkg.com/@changesets/config@4.0.1/schema.json",
"changelog": [
"@svitejs/changesets-changelog-github-compact",
{ "repo": "TanStack/hotkeys" }
"@changesets/changelog-github",
{
"repo": "TanStack/hotkeys",
"disableThanks": true
}
],
"commit": false,
"access": "public",
Expand All @@ -13,5 +16,9 @@
"ignore": [],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
},
"privatePackages": {
"version": false,
"tag": false
}
}
21 changes: 21 additions & 0 deletions .changeset/modern-hotkeys-builds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
'@tanstack/angular-hotkeys': minor
'@tanstack/hotkeys': minor
'@tanstack/hotkeys-devtools': major
'@tanstack/lit-hotkeys': minor
'@tanstack/preact-hotkeys': minor
'@tanstack/preact-hotkeys-devtools': minor
'@tanstack/react-hotkeys': minor
'@tanstack/react-hotkeys-devtools': minor
'@tanstack/solid-hotkeys': minor
'@tanstack/solid-hotkeys-devtools': minor
'@tanstack/svelte-hotkeys': minor
'@tanstack/vue-hotkeys': minor
'@tanstack/vue-hotkeys-devtools': minor
---

Publish ES2022 ESM-only packages with a Node.js 20 minimum, matching TanStack Table v9. CommonJS builds, package `src` directories, and source maps are no longer published. Use ESM imports and inspect the declarations in `dist` for installed API types.

Expose the existing Solid devtools production entry with TypeScript declarations.

Update framework, store, devtools, and build dependencies while retaining TypeScript 6.0.3. Adapt devtools styling to the new `createTheme` API. Upgrade `@tanstack/preact-store` to 0.13.3, which fixes stale hint updates when shortcut bindings change.
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ jobs:
run: pnpm run test:ci
- name: Run Changesets (version or publish)
id: changesets
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
uses: changesets/action@8488615a623b1b9c987934bb89eae8af6a946ac1 # v2.1.1
with:
version: pnpm run changeset:version
publish: pnpm run changeset:publish
commit: 'ci: Version Packages'
title: 'ci: Version Packages'
version-script: pnpm run changeset:version
publish-script: pnpm run changeset:publish
commit-message: 'ci: Version Packages'
pr-title: 'ci: Version Packages'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Comment on PRs about release
if: steps.changesets.outputs.published == 'true'
uses: TanStack/config/.github/comment-on-release@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main
with:
published-packages: ${{ steps.changesets.outputs.publishedPackages }}
published-packages: ${{ steps.changesets.outputs.published-packages }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.8.0
24.15.0
8 changes: 8 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@ human-authored work.
Keep every change focused on one topic. Understand and verify all generated
code, run the required checks, and provide a concise pull request description
that follows the repository template.

## Dependency compatibility pins

- Keep TypeScript at `6.0.3` during routine dependency updates.
- Keep `@tanstack/preact-store` at `0.13.3` or newer. Versions `0.13.1` and
`0.13.2` leave `useHotkeyHint` stale when its binding changes without a store
update; `0.13.3` fixes this in TanStack/store#367. Verify
`packages/preact-hotkeys/tests/useHotkeyHint.test.tsx` before upgrading.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Before proceeding with development, ensure you match one of the following criter

- Fork this repository, we prefer the `feat-*` branch name style
- Ensure you have `pnpm` installed
- Use the Node.js version in `.nvmrc` (`nvm install && nvm use`), also pinned in `package.json` for Volta. The Angular example build tools require a newer Node.js version than the published packages' Node.js 20 minimum.
- Install projects dependencies and linkages by running `pnpm install`
- Auto-build and auto-test files as you edit by running `pnpm dev`
- Implement your changes and tests
Expand Down
13 changes: 7 additions & 6 deletions docs/framework/angular/reference/functions/injectHotkey.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: injectHotkey
function injectHotkey(
hotkey,
callback,
options): void;
options?): void;
```

Defined in: [injectHotkey.ts:85](https://github.com/TanStack/hotkeys/blob/main/packages/angular-hotkeys/src/injectHotkey.ts#L85)
Expand All @@ -28,21 +28,22 @@ handle is updated instead of unregistering and re-registering when identity is u

### hotkey

The hotkey string (e.g. 'Mod+S', 'Escape') or getter function
`RegisterableHotkey` \| (() => `RegisterableHotkey`)

`RegisterableHotkey` | () => `RegisterableHotkey`
The hotkey string (e.g. 'Mod+S', 'Escape') or getter function

### callback

`HotkeyCallback`

The function to call when the hotkey is pressed

### options
### options?

Options for the hotkey behavior, or getter for reactive options
\| [`InjectHotkeyOptions`](../interfaces/InjectHotkeyOptions.md)
\| (() => [`InjectHotkeyOptions`](../interfaces/InjectHotkeyOptions.md))

[`InjectHotkeyOptions`](../interfaces/InjectHotkeyOptions.md) | () => [`InjectHotkeyOptions`](../interfaces/InjectHotkeyOptions.md)
Options for the hotkey behavior, or getter for reactive options

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: injectHotkeyHint
---

```ts
function injectHotkeyHint(hotkey, options): Signal<boolean>;
function injectHotkeyHint(hotkey, options?): Signal<boolean>;
```

Defined in: [injectHotkeyHint.ts:14](https://github.com/TanStack/hotkeys/blob/main/packages/angular-hotkeys/src/injectHotkeyHint.ts#L14)
Expand All @@ -19,11 +19,11 @@ This helper does not register a shortcut or check whether its target is focused.

### hotkey

`RegisterableHotkey` | () => `RegisterableHotkey`
`RegisterableHotkey` \| (() => `RegisterableHotkey`)

### options
### options?

`HeldModifierOptions` | () => `HeldModifierOptions`
`HeldModifierOptions` \| (() => `HeldModifierOptions`)

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ cancel or Backspace/Delete to clear.

### options

Configuration options for the recorder (or getter)
`HotkeyRecorderOptions` \| (() => `HotkeyRecorderOptions`)

`HotkeyRecorderOptions` | () => `HotkeyRecorderOptions`
Configuration options for the recorder (or getter)

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: injectHotkeySequence
function injectHotkeySequence(
sequence,
callback,
options): void;
options?): void;
```

Defined in: [injectHotkeySequence.ts:58](https://github.com/TanStack/hotkeys/blob/main/packages/angular-hotkeys/src/injectHotkeySequence.ts#L58)
Expand All @@ -26,23 +26,24 @@ advance the sequence or reset progress.

### sequence

Array of hotkey strings that form the sequence (or getter function)
`HotkeySequence` \| (() => `HotkeySequence`)

`HotkeySequence` | () => `HotkeySequence`
Array of hotkey strings that form the sequence (or getter function)

### callback

`HotkeyCallback`

Function to call when the sequence is completed

### options
### options?

\| [`InjectHotkeySequenceOptions`](../interfaces/InjectHotkeySequenceOptions.md)
\| (() => [`InjectHotkeySequenceOptions`](../interfaces/InjectHotkeySequenceOptions.md))

Options for the sequence behavior (or getter function). `enabled: false` still registers
the sequence (visible in devtools); only execution is suppressed.

[`InjectHotkeySequenceOptions`](../interfaces/InjectHotkeySequenceOptions.md) | () => [`InjectHotkeySequenceOptions`](../interfaces/InjectHotkeySequenceOptions.md)

## Returns

`void`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Angular inject-based API for recording multi-chord sequences.

### options

`HotkeySequenceRecorderOptions` | () => `HotkeySequenceRecorderOptions`
`HotkeySequenceRecorderOptions` \| (() => `HotkeySequenceRecorderOptions`)

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: injectHotkeySequences
---

```ts
function injectHotkeySequences(sequences, commonOptions): void;
function injectHotkeySequences(sequences, commonOptions?): void;
```

Defined in: [injectHotkeySequences.ts:51](https://github.com/TanStack/hotkeys/blob/main/packages/angular-hotkeys/src/injectHotkeySequences.ts#L51)
Expand All @@ -24,16 +24,18 @@ remain registered so they stay visible in devtools; the core manager suppresses

### sequences

\| [`InjectHotkeySequenceDefinition`](../interfaces/InjectHotkeySequenceDefinition.md)[]
\| (() => [`InjectHotkeySequenceDefinition`](../interfaces/InjectHotkeySequenceDefinition.md)[])

Array of sequence definitions, or getter returning them

[`InjectHotkeySequenceDefinition`](../interfaces/InjectHotkeySequenceDefinition.md)[] | () => [`InjectHotkeySequenceDefinition`](../interfaces/InjectHotkeySequenceDefinition.md)[]
### commonOptions?

### commonOptions
\| [`InjectHotkeySequenceOptions`](../interfaces/InjectHotkeySequenceOptions.md)
\| (() => [`InjectHotkeySequenceOptions`](../interfaces/InjectHotkeySequenceOptions.md))

Shared options for all sequences, or getter

[`InjectHotkeySequenceOptions`](../interfaces/InjectHotkeySequenceOptions.md) | () => [`InjectHotkeySequenceOptions`](../interfaces/InjectHotkeySequenceOptions.md)

## Returns

`void`
Expand Down
12 changes: 7 additions & 5 deletions docs/framework/angular/reference/functions/injectHotkeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: injectHotkeys
---

```ts
function injectHotkeys(hotkeys, commonOptions): void;
function injectHotkeys(hotkeys, commonOptions?): void;
```

Defined in: [injectHotkeys.ts:75](https://github.com/TanStack/hotkeys/blob/main/packages/angular-hotkeys/src/injectHotkeys.ts#L75)
Expand All @@ -25,16 +25,18 @@ provideHotkeys defaults < commonOptions < per-definition options

### hotkeys

\| [`InjectHotkeyDefinition`](../interfaces/InjectHotkeyDefinition.md)[]
\| (() => [`InjectHotkeyDefinition`](../interfaces/InjectHotkeyDefinition.md)[])

Array of hotkey definitions, or getter returning them

[`InjectHotkeyDefinition`](../interfaces/InjectHotkeyDefinition.md)[] | () => [`InjectHotkeyDefinition`](../interfaces/InjectHotkeyDefinition.md)[]
### commonOptions?

### commonOptions
\| [`InjectHotkeyOptions`](../interfaces/InjectHotkeyOptions.md)
\| (() => [`InjectHotkeyOptions`](../interfaces/InjectHotkeyOptions.md))

Shared options for all hotkeys, or getter

[`InjectHotkeyOptions`](../interfaces/InjectHotkeyOptions.md) | () => [`InjectHotkeyOptions`](../interfaces/InjectHotkeyOptions.md)

## Returns

`void`
Expand Down
4 changes: 2 additions & 2 deletions docs/framework/angular/reference/functions/injectKeyHold.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ if the specified key is held.

### key

The key to check (e.g. 'Shift', 'Control', 'Space') - can be a getter function
`IndividualKey` \| (() => `IndividualKey`)

`IndividualKey` | () => `IndividualKey`
The key to check (e.g. 'Shift', 'Control', 'Space') - can be a getter function

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Defined in: [injectHotkeyRecorder.ts:15](https://github.com/TanStack/hotkeys/blo

## Properties

### cancelRecording()
### cancelRecording

```ts
readonly cancelRecording: () => void;
Expand All @@ -23,7 +23,7 @@ Cancel recording without saving

***

### isRecording()
### isRecording

```ts
readonly isRecording: () => boolean;
Expand All @@ -39,7 +39,7 @@ Whether recording is currently active

***

### recordedHotkey()
### recordedHotkey

```ts
readonly recordedHotkey: () => Hotkey | null;
Expand All @@ -55,7 +55,7 @@ The currently recorded hotkey (for live preview)

***

### startRecording()
### startRecording

```ts
readonly startRecording: () => void;
Expand All @@ -71,7 +71,7 @@ Start recording a new hotkey

***

### stopRecording()
### stopRecording

```ts
readonly stopRecording: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Defined in: [injectHotkeySequenceRecorder.ts:18](https://github.com/TanStack/hot

## Properties

### cancelRecording()
### cancelRecording

```ts
readonly cancelRecording: () => void;
Expand All @@ -21,7 +21,7 @@ Defined in: [injectHotkeySequenceRecorder.ts:24](https://github.com/TanStack/hot

***

### commitRecording()
### commitRecording

```ts
readonly commitRecording: () => void;
Expand All @@ -35,7 +35,7 @@ Defined in: [injectHotkeySequenceRecorder.ts:25](https://github.com/TanStack/hot

***

### isRecording()
### isRecording

```ts
readonly isRecording: () => boolean;
Expand All @@ -49,7 +49,7 @@ Defined in: [injectHotkeySequenceRecorder.ts:19](https://github.com/TanStack/hot

***

### recordedSequence()
### recordedSequence

```ts
readonly recordedSequence: () => HotkeySequence | null;
Expand All @@ -63,7 +63,7 @@ Defined in: [injectHotkeySequenceRecorder.ts:21](https://github.com/TanStack/hot

***

### startRecording()
### startRecording

```ts
readonly startRecording: () => void;
Expand All @@ -77,7 +77,7 @@ Defined in: [injectHotkeySequenceRecorder.ts:22](https://github.com/TanStack/hot

***

### steps()
### steps

```ts
readonly steps: () => HotkeySequence;
Expand All @@ -91,7 +91,7 @@ Defined in: [injectHotkeySequenceRecorder.ts:20](https://github.com/TanStack/hot

***

### stopRecording()
### stopRecording

```ts
readonly stopRecording: () => void;
Expand Down
Loading
Loading