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: 13 additions & 0 deletions .changeset/raise-dependency-floors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@tanstack/angular-table': patch
'@tanstack/angular-table-devtools': patch
'@tanstack/ember-table': patch
'@tanstack/preact-table-devtools': patch
'@tanstack/react-table-devtools': patch
'@tanstack/solid-table-devtools': patch
'@tanstack/svelte-table': patch
'@tanstack/table-devtools': patch
'@tanstack/vue-table-devtools': patch
---

Raise minimum versions of runtime dependencies: `@tanstack/devtools-utils` ^0.7.2, `@tanstack/devtools-ui` ^0.7.2, `@tanstack/svelte-store` ^0.12.3, `@embroider/addon-shim` ^1.11.0, `solid-js` ^1.9.19, and `tslib` ^2.9.1
52 changes: 24 additions & 28 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,32 @@ that follows the repository template.

## Packages that cannot be upgraded yet

Leave these pins alone during routine dependency bumps. They currently break
Ember, the Svelte kitchen-sink types, or are intentionally deferred.
Leave these pins alone during routine dependency bumps. They are either
intentionally deferred or need a manual version choice that `ncu` gets wrong.

- **TypeScript** — keep `6.0.3`. Do not bump it as part of a general upgrade.
- **Babel 7** — Ember is not compatible with Babel 8. In `packages/ember-table`
and every `examples/ember/*` app, keep `@babel/core`,
`@babel/plugin-transform-runtime`, `@babel/plugin-transform-typescript`, and
`@babel/runtime` at `7.29.7`. `@rollup/plugin-babel` `7.1.0` is the Rollup
plugin version, not Babel itself.
- **`@dnd-kit/abstract` and `@dnd-kit/helpers`** — keep `^0.2.3` in
`examples/svelte/kitchen-sink-shadcn`. `@dnd-kit-svelte/svelte@0.1.6` still
depends on the 0.2.x line. Bumping to 0.5.x installs a second copy, and
TypeScript treats those private-field types as incompatible.
- **Vitest and `@vitest/coverage-v8`** — keep the 4.x line (currently
`^4.1.11` and `4.1.11`). `@analogjs/vitest-angular@2.7.2` and Angular build
tooling do not support Vitest 5, which also removes the `vitest` `bench` export
used by the repository benchmarks. Upgrade these together in a separate migration.
- **Octane** — keep `0.1.36`. The 0.2.x line fails the adapter conformance
test for synchronous owner and isolated controlled updates during a discrete event.
- **Pacer devtools** — keep `@tanstack/react-pacer-devtools` at `0.8.0` and
`@tanstack/solid-pacer-devtools` at `0.7.0`. The 0.14.x packages do not export
`pacerDevtoolsPlugin`, which the Form and Router examples use.
- **`@tanstack/preact-form`** — keep `1.30.5` in the Preact Form example.
The 1.33.x line removes `createFormHookContexts` and `withForm`, requiring
a separate example migration.
- **Preact** — keep `^10.29.8`. Preact 11 fails the adapter's hook and SSR
tests and the devtools type check. The Store and Query adapters still require
Preact 10. Upgrade these together in a separate migration.
- **Highest semver is not the real latest.** `ncu` can pick a version that
outranks the package's `latest` dist-tag. Check `npm view <name> dist-tags`
and take the newest release on the `latest` line that meets
`minimumReleaseAge`:
- `octane`: `1.0.3` is an unrelated 2015 release. Use the 0.x line. Octane
peers on an exact `@tsrx/oxc` version, so set `@tsrx/oxc` to that exact
version even when `ncu` offers a newer one.
- `@tanstack/react-pacer-devtools` and `@tanstack/solid-pacer-devtools`:
`0.14.0` is an old release that lacks the `pacerDevtoolsPlugin` export the
Form and Router examples use.
- `@tanstack/preact-form`: `1.33.x` sits above `latest` and removes
`createFormHookContexts` and `withForm`, which the Preact Form example uses.
- **Babel 8 peer warnings** — `@rollup/plugin-babel` and some transitive Babel 7
plugins still declare `@babel/core@^7` peers. The Ember toolchain
(`@nullvoxpopuli/ember-vite`) supports Babel 8, and Ember builds and tests
pass on it, so these `pnpm peers check` warnings are expected. Do not pin
Babel back to 7 because of them.
- **`@tanstack/intent`** — keep `0.4.0`. The 0.5 checker compiles TS and JS
fences without framework TypeScript configuration or surrounding context. It
rejects valid Preact and Lit examples, class-member excerpts, and deliberately
wrong examples. Keep the repository's content and annotated-snippet checks
enabled while this migration is deferred.
wrong examples. 0.5.6 still reports 64 such errors. 0.5 can skip a fence
with a `no-check` fence property or expect one with `expect-error`, but the
repository's snippet checker only accepts bare `ts`/`tsx` fences after a
`skill-snippet:check` marker. Keep the repository's content and
annotated-snippet checks enabled while this migration is deferred.
44 changes: 34 additions & 10 deletions docs/framework/alpine/guide/cell-selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,19 +274,43 @@ Cell selection ships no keyboard handling of its own. Instead it exposes imperat
`direction` is `'up'`, `'down'`, `'left'`, or `'right'`.

```ts
import { createMultiHotkeyHandler } from '@tanstack/hotkeys'
import Alpine from 'alpinejs'
import { createHotkeysScope, hotkeysPlugin } from '@tanstack/alpine-hotkeys'

Alpine.plugin(hotkeysPlugin)

// Alpine has no hotkeys adapter, so the framework-agnostic core handler is used
onGridKeyDown: createMultiHotkeyHandler({
ArrowUp: () => table.moveCellSelection('up'),
ArrowDown: () => table.moveCellSelection('down'),
'Shift+ArrowDown': () => table.extendCellSelection('down'),
'Mod+A': () => table.selectAllCells(),
Escape: () => table.resetCellSelection(true),
}),
Alpine.data('table', () => {
// ...create the table
const hotkeys = createHotkeysScope()

return {
init() {
hotkeys.createHotkeys(
[
{ hotkey: 'ArrowUp', callback: () => table.moveCellSelection('up') },
{
hotkey: 'ArrowDown',
callback: () => table.moveCellSelection('down'),
},
{
hotkey: 'Shift+ArrowDown',
callback: () => table.extendCellSelection('down'),
},
{ hotkey: 'Mod+A', callback: () => table.selectAllCells() },
{ hotkey: 'Escape', callback: () => table.resetCellSelection(true) },
],
// scope every binding to the grid element
() => ({ target: this.$refs.grid }),
)
},
destroy() {
hotkeys.destroy()
},
}
})

// then, in the markup:
// <div tabindex="0" @keydown="onGridKeyDown($event)"> ... </div>
// <div x-ref="grid" tabindex="0"> ... </div>
```

Scope the hotkeys to the grid element rather than the document, or arrow keys and Escape will hijack inputs elsewhere on the page.
Expand Down
26 changes: 15 additions & 11 deletions docs/framework/ember/guide/cell-selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,19 +254,23 @@ Cell selection ships no keyboard handling of its own. Instead it exposes imperat
`direction` is `'up'`, `'down'`, `'left'`, or `'right'`.

```ts
import { createMultiHotkeyHandler } from '@tanstack/hotkeys'

// Ember has no hotkeys adapter, so the framework-agnostic core handler is used
onGridKeyDown = createMultiHotkeyHandler({
ArrowUp: () => this.table.moveCellSelection('up'),
ArrowDown: () => this.table.moveCellSelection('down'),
'Shift+ArrowDown': () => this.table.extendCellSelection('down'),
'Mod+A': () => this.table.selectAllCells(),
Escape: () => this.table.resetCellSelection(true),
})
import { onHotkeys } from '@tanstack/ember-hotkeys'
import type { EmberHotkeyDefinition } from '@tanstack/ember-hotkeys'

// the onHotkeys modifier scopes every binding to the element it is on
gridHotkeys: Array<EmberHotkeyDefinition> = [
{ hotkey: 'ArrowUp', callback: () => this.table.moveCellSelection('up') },
{ hotkey: 'ArrowDown', callback: () => this.table.moveCellSelection('down') },
{
hotkey: 'Shift+ArrowDown',
callback: () => this.table.extendCellSelection('down'),
},
{ hotkey: 'Mod+A', callback: () => this.table.selectAllCells() },
{ hotkey: 'Escape', callback: () => this.table.resetCellSelection(true) },
]

// then, in the template:
// <div tabindex='0' {{on 'keydown' this.onGridKeyDown}}> ... </div>
// <div tabindex='0' {{onHotkeys this.gridHotkeys}}> ... </div>
```

Scope the hotkeys to the grid element rather than the document, or arrow keys and Escape will hijack inputs elsewhere on the page.
Expand Down
38 changes: 25 additions & 13 deletions docs/framework/lit/guide/cell-selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,19 +254,31 @@ Cell selection ships no keyboard handling of its own. Instead it exposes imperat
`direction` is `'up'`, `'down'`, `'left'`, or `'right'`.

```ts
import { createMultiHotkeyHandler } from '@tanstack/lit-hotkeys'

// one stateless handler is simpler here than a HotkeyController per binding
const onGridKeyDown = createMultiHotkeyHandler({
ArrowUp: () => table.moveCellSelection('up'),
ArrowDown: () => table.moveCellSelection('down'),
'Shift+ArrowDown': () => table.extendCellSelection('down'),
'Mod+A': () => table.selectAllCells(),
Escape: () => table.resetCellSelection(true),
})

// then, in the template:
// html`<div tabindex="0" @keydown=${onGridKeyDown}> ... </div>`
import { createRef, ref } from 'lit/directives/ref.js'
import { HotkeyController } from '@tanstack/lit-hotkeys'
import type { HotkeyChord } from '@tanstack/lit-hotkeys'

// inside the element class: one HotkeyController per binding, each scoped to
// the grid element
private _grid = createRef<HTMLDivElement>()

private _gridHotkeys = (
[
['ArrowUp', () => this._table?.moveCellSelection('up')],
['ArrowDown', () => this._table?.moveCellSelection('down')],
['Shift+ArrowDown', () => this._table?.extendCellSelection('down')],
['Mod+A', () => this._table?.selectAllCells()],
['Escape', () => this._table?.resetCellSelection(true)],
] satisfies Array<[HotkeyChord, () => void]>
).map(
([hotkey, callback]) =>
new HotkeyController(this, hotkey, callback, () => ({
target: this._grid.value,
})),
)

// then, in render():
// html`<div tabindex="0" ${ref(this._grid)}> ... </div>`
```

Scope the hotkeys to the grid element rather than the document, or arrow keys and Escape will hijack inputs elsewhere on the page.
Expand Down
6 changes: 3 additions & 3 deletions examples/alpine/aggregation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/alpine-table": "^9.3.1",
"alpinejs": "^3.17.4"
"alpinejs": "^3.17.5"
},
"devDependencies": {
"@rolldown/binding-wasm32-wasi": "~1.2.12",
"@rolldown/binding-wasm32-wasi": "~1.3.2",
"@rollup/plugin-replace": "^6.0.3",
"@types/alpinejs": "^3.17.0",
"typescript": "6.0.3",
"vite": "^8.3.2"
"vite": "^8.3.8"
}
}
6 changes: 3 additions & 3 deletions examples/alpine/basic-app-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
},
"dependencies": {
"@tanstack/alpine-table": "^9.3.1",
"alpinejs": "^3.17.4"
"alpinejs": "^3.17.5"
},
"devDependencies": {
"@rolldown/binding-wasm32-wasi": "~1.2.12",
"@rolldown/binding-wasm32-wasi": "~1.3.2",
"@rollup/plugin-replace": "^6.0.3",
"@types/alpinejs": "^3.17.0",
"typescript": "6.0.3",
"vite": "^8.3.2"
"vite": "^8.3.8"
}
}
6 changes: 3 additions & 3 deletions examples/alpine/basic-create-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/alpine-table": "^9.3.1",
"alpinejs": "^3.17.4"
"alpinejs": "^3.17.5"
},
"devDependencies": {
"@rolldown/binding-wasm32-wasi": "~1.2.12",
"@rolldown/binding-wasm32-wasi": "~1.3.2",
"@rollup/plugin-replace": "^6.0.3",
"@types/alpinejs": "^3.17.0",
"typescript": "6.0.3",
"vite": "^8.3.2"
"vite": "^8.3.8"
}
}
6 changes: 3 additions & 3 deletions examples/alpine/basic-dynamic-columns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/alpine-table": "^9.3.1",
"alpinejs": "^3.17.4"
"alpinejs": "^3.17.5"
},
"devDependencies": {
"@rolldown/binding-wasm32-wasi": "~1.2.12",
"@rolldown/binding-wasm32-wasi": "~1.3.2",
"@rollup/plugin-replace": "^6.0.3",
"@types/alpinejs": "^3.17.0",
"typescript": "6.0.3",
"vite": "^8.3.2"
"vite": "^8.3.8"
}
}
6 changes: 3 additions & 3 deletions examples/alpine/basic-external-atoms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
"@faker-js/faker": "^10.6.0",
"@tanstack/alpine-table": "^9.3.1",
"@tanstack/store": "^0.11.2",
"alpinejs": "^3.17.4"
"alpinejs": "^3.17.5"
},
"devDependencies": {
"@rolldown/binding-wasm32-wasi": "~1.2.12",
"@rolldown/binding-wasm32-wasi": "~1.3.2",
"@rollup/plugin-replace": "^6.0.3",
"@types/alpinejs": "^3.17.0",
"typescript": "6.0.3",
"vite": "^8.3.2"
"vite": "^8.3.8"
}
}
6 changes: 3 additions & 3 deletions examples/alpine/basic-external-state/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/alpine-table": "^9.3.1",
"alpinejs": "^3.17.4"
"alpinejs": "^3.17.5"
},
"devDependencies": {
"@rolldown/binding-wasm32-wasi": "~1.2.12",
"@rolldown/binding-wasm32-wasi": "~1.3.2",
"@rollup/plugin-replace": "^6.0.3",
"@types/alpinejs": "^3.17.0",
"typescript": "6.0.3",
"vite": "^8.3.2"
"vite": "^8.3.8"
}
}
2 changes: 1 addition & 1 deletion examples/alpine/cell-selection/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
-->
<div x-text="selectionSummary()"></div>
<div class="spacer-sm"></div>
<div tabindex="0" @keydown="onGridKeyDown($event)">
<div x-ref="grid" tabindex="0">
<table>
<thead>
<template
Expand Down
8 changes: 4 additions & 4 deletions examples/alpine/cell-selection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
},
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/alpine-hotkeys": "^0.14.0",
"@tanstack/alpine-table": "^9.3.1",
"@tanstack/hotkeys": "^0.10.1",
"alpinejs": "^3.17.4"
"alpinejs": "^3.17.5"
},
"devDependencies": {
"@rolldown/binding-wasm32-wasi": "~1.2.12",
"@rolldown/binding-wasm32-wasi": "~1.3.2",
"@rollup/plugin-replace": "^6.0.3",
"@types/alpinejs": "^3.17.0",
"typescript": "6.0.3",
"vite": "^8.3.2"
"vite": "^8.3.8"
}
}
Loading
Loading