Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: TanStack/virtual
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.13.2
Choose a base ref
...
head repository: TanStack/virtual
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @tanstack/react-virtual@3.13.3
Choose a head ref

Commits on Mar 1, 2025

  1. chore(deps): lock file maintenance (#938)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 1, 2025
    Copy the full SHA
    8175949 View commit details

Commits on Mar 3, 2025

  1. chore(deps): update all non-major dependencies (#939)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 3, 2025
    Copy the full SHA
    7a3d541 View commit details

Commits on Mar 4, 2025

  1. chore(deps): update autofix-ci/action digest to 551dded (#914)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 4, 2025
    Copy the full SHA
    f77c927 View commit details
  2. chore(deps): update pnpm to v10 (#941)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 4, 2025
    Copy the full SHA
    f988322 View commit details
  3. chore(deps): replace rimraf with premove (#942)

    * chore(deps): update dependency rimraf to v6
    
    * Replace rimraf with premove
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
    renovate[bot] and lachlancollins authored Mar 4, 2025
    Copy the full SHA
    a4bf65b View commit details

Commits on Mar 6, 2025

  1. chore(deps): update dependency @react-hookz/web to v25 (#943)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 6, 2025
    Copy the full SHA
    ee61507 View commit details
  2. chore(deps): update dependency @vueuse/core to v12 (#944)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 6, 2025
    Copy the full SHA
    2f1d250 View commit details

Commits on Mar 7, 2025

  1. chore: Updates faker method (#888)

    * Updates faker method
    
    `.name` is no longer supported
    
    * Replace other usages
    
    ---------
    
    Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
    schalkventer and lachlancollins authored Mar 7, 2025
    Copy the full SHA
    30c0636 View commit details
  2. examples: "application is build" -> "application is built" (#909)

    * fix: typo in virtual examples
    
    * Fix other usages
    
    ---------
    
    Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
    michaelfromyeg and lachlancollins authored Mar 7, 2025
    Copy the full SHA
    f28cd83 View commit details
  3. examples(react): remove missing link in react dynamic example

    Spice-Z authored Mar 7, 2025
    Copy the full SHA
    0d85560 View commit details
  4. chore: Introduce changesets (#946)

    * chore: Introduce changesets
    
    See also: TanStack/config#218
    
    * Remove ts-expect-error
    
    * Remove publish.js
    
    * Fix changesets config
    lachlancollins authored Mar 7, 2025
    Copy the full SHA
    089ffe9 View commit details
  5. examples(angular): remove versions (#947)

    lachlancollins authored Mar 7, 2025
    Copy the full SHA
    2b90686 View commit details
  6. docs: update installation commands (#723)

    As "Copy" button copies the whole content, `$ npm install ...` would copy the dollar sign too, but it's redundant and not a valid command to run. I removed it to keep consistent and provide the best UX for tanstack users.
    davletovalmir authored Mar 7, 2025
    Copy the full SHA
    25df3c0 View commit details
  7. examples: fix typos (#765)

    * Update main.tsx
    
    * fix minor typos
    
    * fix prettier problem
    
    * ci: apply automated fixes
    
    ---------
    
    Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
    3 people authored Mar 7, 2025
    Copy the full SHA
    4a7d259 View commit details

Commits on Mar 8, 2025

  1. docs: add missing parameter to onChange API (#940)

    taylous authored Mar 8, 2025
    Copy the full SHA
    e2c09fb View commit details
  2. examples(vue): fix table example (#887)

    * fix: vue table example
    
    * ci: apply automated fixes
    
    ---------
    
    Co-authored-by: Tuan T <tuantranminh@Tuans-Mac-mini.local>
    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
    Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
    4 people authored Mar 8, 2025
    Copy the full SHA
    721bf53 View commit details

Commits on Mar 10, 2025

  1. chore(deps): update all non-major dependencies (#949)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 10, 2025
    Copy the full SHA
    a0dc872 View commit details

Commits on Mar 12, 2025

  1. docs: add documentation for sync parameter of the onChange function. (#…

    taylous authored Mar 12, 2025
    Copy the full SHA
    c879df4 View commit details
  2. fix(virtual-core): expand range in masonry layouts to catch items fro…

    …m all lanes (#937)
    soren121 authored Mar 12, 2025
    Copy the full SHA
    02ef309 View commit details
  3. chore: regenerate pnpm lockfile (#952)

    piecyk authored Mar 12, 2025
    Copy the full SHA
    cbb821e View commit details
  4. ci: fix changeset version script (#953)

    * ci: fix changeset version script
    
    * Undo change to pnpm version
    lachlancollins authored Mar 12, 2025
    Copy the full SHA
    6ab3ebc View commit details
  5. ci: Version Packages (#954)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Mar 12, 2025
    Copy the full SHA
    96f7202 View commit details
Showing with 2,398 additions and 1,899 deletions.
  1. +14 −0 .changeset/config.json
  2. +1 −1 .github/workflows/autofix.yml
  3. +2 −2 .github/workflows/pr.yml
  4. +12 −16 .github/workflows/{ci.yml → release.yml}
  5. +1 −1 .nvmrc
  6. +168 −0 CONTRIBUTING.md
  7. +4 −2 docs/api/virtualizer.md
  8. +5 −5 docs/installation.md
  9. +0 −1 eslint.config.js
  10. +3 −3 examples/angular/dynamic/package.json
  11. +3 −3 examples/angular/fixed/package.json
  12. +4 −4 examples/angular/infinite-scroll/package.json
  13. +3 −3 examples/angular/padding/package.json
  14. +3 −3 examples/angular/smooth-scroll/package.json
  15. +3 −3 examples/angular/sticky/package.json
  16. +1 −1 examples/angular/sticky/src/app/app.component.ts
  17. +3 −3 examples/angular/table/package.json
  18. +2 −2 examples/angular/table/src/app/make-data.ts
  19. +3 −3 examples/angular/variable/package.json
  20. +3 −3 examples/angular/window/package.json
  21. +3 −3 examples/lit/dynamic/package.json
  22. +1 −1 examples/lit/dynamic/src/main.ts
  23. +3 −3 examples/lit/fixed/package.json
  24. +2 −2 examples/react/dynamic/package.json
  25. +2 −5 examples/react/dynamic/src/main.tsx
  26. +2 −2 examples/react/fixed/package.json
  27. +1 −1 examples/react/fixed/src/main.tsx
  28. +2 −2 examples/react/infinite-scroll/package.json
  29. +1 −1 examples/react/infinite-scroll/src/main.tsx
  30. +1 −1 examples/react/padding/package.json
  31. +2 −2 examples/react/padding/src/main.tsx
  32. +2 −2 examples/react/scroll-padding/package.json
  33. +1 −1 examples/react/scroll-padding/src/main.tsx
  34. +1 −1 examples/react/smooth-scroll/package.json
  35. +1 −1 examples/react/smooth-scroll/src/main.tsx
  36. +2 −2 examples/react/sticky/package.json
  37. +2 −2 examples/react/sticky/src/main.tsx
  38. +1 −1 examples/react/table/package.json
  39. +2 −2 examples/react/table/src/main.tsx
  40. +2 −2 examples/react/table/src/makeData.ts
  41. +1 −1 examples/react/variable/package.json
  42. +1 −1 examples/react/variable/src/main.tsx
  43. +2 −2 examples/react/window/package.json
  44. +1 −1 examples/react/window/src/main.tsx
  45. +2 −2 examples/svelte/dynamic/package.json
  46. +2 −2 examples/svelte/dynamic/src/App.svelte
  47. +2 −2 examples/svelte/fixed/package.json
  48. +3 −3 examples/svelte/infinite-scroll/package.json
  49. +2 −2 examples/svelte/smooth-scroll/package.json
  50. +2 −2 examples/svelte/sticky/package.json
  51. +1 −1 examples/svelte/sticky/src/App.svelte
  52. +2 −2 examples/svelte/table/package.json
  53. +1 −1 examples/svelte/table/src/App.svelte
  54. +2 −2 examples/svelte/table/src/makeData.ts
  55. +2 −2 examples/vue/dynamic/package.json
  56. +2 −2 examples/vue/dynamic/src/App.vue
  57. +2 −2 examples/vue/fixed/package.json
  58. +3 −3 examples/vue/infinite-scroll/package.json
  59. +2 −2 examples/vue/padding/package.json
  60. +3 −3 examples/vue/scroll-padding/package.json
  61. +2 −2 examples/vue/smooth-scroll/package.json
  62. +3 −3 examples/vue/sticky/package.json
  63. +1 −1 examples/vue/sticky/src/App.vue
  64. +2 −2 examples/vue/table/package.json
  65. +5 −3 examples/vue/table/src/App.vue
  66. +2 −2 examples/vue/table/src/makeData.ts
  67. +2 −2 examples/vue/variable/package.json
  68. +15 −12 package.json
  69. +8 −0 packages/angular-virtual/CHANGELOG.md
  70. +2 −2 packages/angular-virtual/package.json
  71. +8 −0 packages/lit-virtual/CHANGELOG.md
  72. +2 −2 packages/lit-virtual/package.json
  73. +8 −0 packages/react-virtual/CHANGELOG.md
  74. +2 −2 packages/react-virtual/package.json
  75. +8 −0 packages/solid-virtual/CHANGELOG.md
  76. +3 −3 packages/solid-virtual/package.json
  77. +8 −0 packages/svelte-virtual/CHANGELOG.md
  78. +2 −2 packages/svelte-virtual/package.json
  79. +7 −0 packages/virtual-core/CHANGELOG.md
  80. +2 −2 packages/virtual-core/package.json
  81. +44 −14 packages/virtual-core/src/index.ts
  82. +8 −0 packages/vue-virtual/CHANGELOG.md
  83. +2 −2 packages/vue-virtual/package.json
  84. +1,942 −1,652 pnpm-lock.yaml
  85. +0 −57 scripts/publish.js
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": [
"@svitejs/changesets-changelog-github-compact",
{ "repo": "TanStack/virtual" }
],
"commit": false,
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"fixed": [],
"linked": [],
"ignore": []
}
2 changes: 1 addition & 1 deletion .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -24,6 +24,6 @@ jobs:
- name: Fix formatting
run: pnpm prettier:write
- name: Apply fixes
uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef
with:
commit-message: 'ci: apply automated fixes'
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: pr
name: PR

on:
pull_request:
@@ -25,7 +25,7 @@ jobs:
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Get base and head commits for `nx affected`
uses: nrwl/nx-set-shas@v4.1.2
uses: nrwl/nx-set-shas@v4.3.0
with:
main-branch-name: main
- name: Run Checks
28 changes: 12 additions & 16 deletions .github/workflows/ci.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: ci
name: Release

on:
workflow_dispatch:
inputs:
tag:
description: override release tag
required: false
push:
branches: [main, alpha, beta]

@@ -19,10 +14,11 @@ env:
permissions:
contents: write
id-token: write
pull-requests: write

jobs:
test-and-publish:
name: Test & Publish
release:
name: Release
if: github.repository_owner == 'TanStack'
runs-on: ubuntu-latest
steps:
@@ -34,13 +30,13 @@ jobs:
uses: tanstack/config/.github/setup@main
- name: Run Tests
run: pnpm run test:ci
- name: Publish
run: |
git config --global user.name 'Tanner Linsley'
git config --global user.email 'tannerlinsley@users.noreply.github.com'
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
pnpm run cipublish
- name: Run Changesets (version or publish)
uses: changesets/action@v1.4.9
with:
version: pnpm run changeset:version
publish: pnpm run changeset:publish
commit: 'ci: Version Packages'
title: 'ci: Version Packages'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
TAG: ${{ inputs.tag }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.12.0
22.13.1
168 changes: 168 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# Contributing

## Questions

If you have questions about implementation details, help or support, then please use our dedicated community forum at [GitHub Discussions](https://github.com/TanStack/virtual/discussions) **PLEASE NOTE:** If you choose to instead open an issue for your question, your issue will be immediately closed and redirected to the forum.

## Reporting Issues

If you have found what you think is a bug, please [file an issue](https://github.com/TanStack/virtual/issues/new/choose). **PLEASE NOTE:** Issues that are identified as implementation questions or non-issues will be immediately closed and redirected to [GitHub Discussions](https://github.com/TanStack/virtual/discussions)

## Suggesting new features

If you are here to suggest a feature, first create an issue if it does not already exist. From there, we will discuss use-cases for the feature and then finally discuss how it could be implemented.

## Development

If you have been assigned to fix an issue or develop a new feature, please follow these steps to get started:

- Fork this repository.
- Install dependencies

```bash
pnpm install
```

- We use [pnpm](https://pnpm.io/) v9 for package management (run in case of pnpm-related issues).

```bash
corepack enable && corepack prepare
```

- We use [nvm](https://github.com/nvm-sh/nvm) to manage node versions - please make sure to use the version mentioned in `.nvmrc`

```bash
nvm use
```

- Build all packages.

```bash
pnpm build:all
```

- Run development server.

```bash
pnpm run watch
```

- Implement your changes and tests to files in the `src/` directory and corresponding test files.
- Document your changes in the appropriate doc page.
- Git stage your required changes and commit (see below commit guidelines).
- Submit PR for review.

### Editing the docs locally and previewing the changes

The documentations for all the TanStack projects are hosted on [tanstack.com](https://tanstack.com), which is a TanStack Start application (https://github.com/TanStack/tanstack.com). You need to run this app locally to preview your changes in the `TanStack/virtual` docs.

> [!NOTE]
> The website fetches the doc pages from GitHub in production, and searches for them at `../config/docs` in development. Your local clone of `TanStack/virtual` needs to be in the same directory as the local clone of `TansStack/tanstack.com`.

You can follow these steps to set up the docs for local development:

1. Make a new directory called `tanstack`.

```sh
mkdir tanstack
```

2. Enter that directory and clone the [`TanStack/virtual`](https://github.com/TanStack/virtual) and [`TanStack/tanstack.com`](https://github.com/TanStack/tanstack.com) repos.

```sh
cd tanstack
git clone git@github.com:TanStack/virtual.git
# We probably don't need all the branches and commit history
# from the `tanstack.com` repo, so let's just create a shallow
# clone of the latest version of the `main` branch.
# Read more about shallow clones here:
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/#user-content-shallow-clones
git clone git@github.com:TanStack/tanstack.com.git --depth=1 --single-branch --branch=main
```

> [!NOTE]
> Your `tanstack` directory should look like this:
>
> ```
> tanstack/
> |
> +-- virtual/ (<-- this directory cannot be called anything else!)
> |
> +-- tanstack.com/
> ```

3. Enter the `tanstack/tanstack.com` directory, install the dependencies and run the app in dev mode:

```sh
cd tanstack.com
pnpm i
# The app will run on https://localhost:3000 by default
pnpm dev
```

4. Now you can visit http://localhost:3000/virtual/latest/docs/overview in the browser and see the changes you make in `TanStack/virtual/docs` there.

> [!WARNING]
> You will need to update the `docs/config.json` file (in `TanStack/config`) if you add a new documentation page!

You can see the whole process in the screen capture below:

https://github.com/fulopkovacs/form/assets/43729152/9d35a3c3-8153-4e74-9cb2-af275f7a269b

### Running examples

- Make sure you've installed the dependencies in the repo's root directory.

```bash
pnpm install
```

- If you want to run the example against your local changes, run below in the repo's root directory. Otherwise, it will be run against the latest TanStack Virtual release.
```bash
pnpm run watch
```
- Run below in the selected examples' directory.

```bash
pnpm run dev
```

#### Note on standalone execution

If you want to run an example without installing dependencies for the whole repo, just follow instructions from the example's README.md file. It will be then run against the latest TanStack Virtual release.
## Online one-click setup
You can use Gitpod (An Online Open Source VS Code like IDE which is free for Open Source) for developing online. With a single click it will start a workspace and automatically:
- clone the `TanStack/virtual` repo.
- install all the dependencies in `/` and `/docs`.
- run below in the root(`/`) to Auto-build files.
```bash
npm start
```
- run below in `/docs`.
```bash
npm run dev
```
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/TanStack/virtual)
## Changesets
This repo uses [Changesets](https://github.com/changesets/changesets) to automate releases. If your PR should release a new package version (patch, minor, or major), please run run `pnpm changeset` and commit the file. If needed, changeset descriptions can be more descriptive, and will be included in the changelog. If your PR affects docs, examples, styles, etc., you probably don't need to generate a changeset.

## Pull requests

Maintainers merge pull requests by squashing all commits and editing the commit message if necessary using the GitHub user interface.

Use an appropriate commit type. Be especially careful with breaking changes.

## Releases

For each new commit added to `main`, a GitHub Workflow is triggered which runs the [Changesets Action](https://github.com/changesets/action). This generates a preview PR showing the impact of all changesets. When this PR is merged, the package will be published to NPM.
6 changes: 4 additions & 2 deletions docs/api/virtualizer.md
Original file line number Diff line number Diff line change
@@ -67,10 +67,12 @@ The initial `Rect` of the scrollElement. This is mostly useful if you need to ru
### `onChange`

```tsx
onChange?: (instance: Virtualizer<TScrollElement, TItemElement>) => void
onChange?: (instance: Virtualizer<TScrollElement, TItemElement>, sync: boolean) => void
```

A callback function that fires when the virtualizer's internal state changes. It's passed the virtualizer instance.
A callback function that fires when the virtualizer's internal state changes. It's passed the virtualizer instance and the sync parameter.

The sync parameter indicates whether scrolling is currently in progress. It is `true` when scrolling is ongoing, and `false` when scrolling has stopped or other actions (such as resizing) are being performed.

### `overscan`

10 changes: 5 additions & 5 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -9,25 +9,25 @@ Install your TanStack Virtual adapter as a dependency using your favorite npm pa
## React Virtual

```bash
$ npm install @tanstack/react-virtual
npm install @tanstack/react-virtual
```

## Solid Virtual

```bash
$ npm install @tanstack/solid-virtual
npm install @tanstack/solid-virtual
```

## Svelte Virtual

```bash
$ npm install @tanstack/svelte-virtual
npm install @tanstack/svelte-virtual
```

## Vue Virtual

```bash
$ npm install @tanstack/vue-virtual
npm install @tanstack/vue-virtual
```

## Lit Virtual
@@ -45,5 +45,5 @@ $ npm install @tanstack/angular-virtual
## Virtual Core (no framework)

```bash
$ npm install @tanstack/virtual-core
npm install @tanstack/virtual-core
```
1 change: 0 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @ts-check

// @ts-expect-error
import { tanstackConfig } from '@tanstack/config/eslint'

export default [
6 changes: 3 additions & 3 deletions examples/angular/dynamic/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@tanstack/virtual-example-angular-dynamic",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.12",
"@angular/common": "^17.3.12",
@@ -18,7 +18,7 @@
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"@faker-js/faker": "^8.4.1",
"@tanstack/angular-virtual": "^3.13.2",
"@tanstack/angular-virtual": "^3.13.3",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"zone.js": "0.15.0"
6 changes: 3 additions & 3 deletions examples/angular/fixed/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@tanstack/virtual-example-angular-fixed",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.12",
"@angular/common": "^17.3.12",
@@ -17,7 +17,7 @@
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"@tanstack/angular-virtual": "^3.13.2",
"@tanstack/angular-virtual": "^3.13.3",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"zone.js": "0.15.0"
8 changes: 4 additions & 4 deletions examples/angular/infinite-scroll/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@tanstack/virtual-example-angular-infinite-scroll",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.12",
"@angular/common": "^17.3.12",
@@ -17,8 +17,8 @@
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"@tanstack/angular-query-experimental": "5.66.9",
"@tanstack/angular-virtual": "^3.13.2",
"@tanstack/angular-query-experimental": "5.67.2",
"@tanstack/angular-virtual": "^3.13.3",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"zone.js": "0.15.0"
6 changes: 3 additions & 3 deletions examples/angular/padding/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@tanstack/virtual-example-angular-padding",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.12",
"@angular/common": "^17.3.12",
@@ -17,7 +17,7 @@
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"@tanstack/angular-virtual": "^3.13.2",
"@tanstack/angular-virtual": "^3.13.3",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"zone.js": "0.15.0"
6 changes: 3 additions & 3 deletions examples/angular/smooth-scroll/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@tanstack/virtual-example-angular-smooth-scroll",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.12",
"@angular/common": "^17.3.12",
@@ -17,7 +17,7 @@
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"@tanstack/angular-virtual": "^3.13.2",
"@tanstack/angular-virtual": "^3.13.3",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"zone.js": "0.15.0"
6 changes: 3 additions & 3 deletions examples/angular/sticky/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@tanstack/virtual-example-angular-sticky",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.12",
"@angular/common": "^17.3.12",
@@ -18,7 +18,7 @@
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"@faker-js/faker": "^8.4.1",
"@tanstack/angular-virtual": "^3.13.2",
"@tanstack/angular-virtual": "^3.13.3",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"zone.js": "0.15.0"
2 changes: 1 addition & 1 deletion examples/angular/sticky/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ import {
const groupedNames: Record<string, string[]> = {}

Array.from({ length: 1000 })
.map(() => faker.name.firstName())
.map(() => faker.person.firstName())
.sort()
.forEach((name) => {
const char = name[0]
6 changes: 3 additions & 3 deletions examples/angular/table/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@tanstack/virtual-example-angular-table",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.12",
"@angular/common": "^17.3.12",
@@ -19,7 +19,7 @@
"@angular/router": "^17.3.12",
"@faker-js/faker": "^8.4.1",
"@tanstack/angular-table": "8.21.2",
"@tanstack/angular-virtual": "^3.13.2",
"@tanstack/angular-virtual": "^3.13.3",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"zone.js": "0.15.0"
4 changes: 2 additions & 2 deletions examples/angular/table/src/app/make-data.ts
Original file line number Diff line number Diff line change
@@ -22,8 +22,8 @@ const range = (len: number) => {
const newPerson = (index: number): Person => {
return {
id: index + 1,
firstName: faker.name.firstName(),
lastName: faker.name.lastName(),
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
age: faker.number.int(40),
visits: faker.number.int(1000),
progress: faker.number.int(100),
6 changes: 3 additions & 3 deletions examples/angular/variable/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@tanstack/virtual-example-angular-variable",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.12",
"@angular/common": "^17.3.12",
@@ -17,7 +17,7 @@
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"@tanstack/angular-virtual": "^3.13.2",
"@tanstack/angular-virtual": "^3.13.3",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"zone.js": "0.15.0"
6 changes: 3 additions & 3 deletions examples/angular/window/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@tanstack/virtual-example-angular-window",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.12",
"@angular/common": "^17.3.12",
@@ -17,7 +17,7 @@
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"@tanstack/angular-virtual": "^3.13.2",
"@tanstack/angular-virtual": "^3.13.3",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"zone.js": "0.15.0"
6 changes: 3 additions & 3 deletions examples/lit/dynamic/package.json
Original file line number Diff line number Diff line change
@@ -9,12 +9,12 @@
},
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@tanstack/lit-virtual": "^3.13.2",
"@tanstack/virtual-core": "^3.13.2",
"@tanstack/lit-virtual": "^3.13.3",
"@tanstack/virtual-core": "^3.13.3",
"lit": "^3.2.1"
},
"devDependencies": {
"@types/node": "^22.10.1",
"@types/node": "^22.13.6",
"typescript": "5.2.2",
"vite": "^5.4.14"
}
2 changes: 1 addition & 1 deletion examples/lit/dynamic/src/main.ts
Original file line number Diff line number Diff line change
@@ -313,7 +313,7 @@ export class MyApp extends LitElement {
<p>
These components are using <strong>dynamic</strong> sizes. This means
that each element's exact dimensions are unknown when rendered. An
estimated dimension is used to get an a initial measurement, then this
estimated dimension is used as the initial measurement, then this
measurement is readjusted on the fly as each element is rendered.
</p>
<nav>
6 changes: 3 additions & 3 deletions examples/lit/fixed/package.json
Original file line number Diff line number Diff line change
@@ -9,12 +9,12 @@
},
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@tanstack/lit-virtual": "^3.13.2",
"@tanstack/virtual-core": "^3.13.2",
"@tanstack/lit-virtual": "^3.13.3",
"@tanstack/virtual-core": "^3.13.3",
"lit": "^3.2.1"
},
"devDependencies": {
"@types/node": "^22.10.1",
"@types/node": "^22.13.6",
"typescript": "5.2.2",
"vite": "^5.4.14"
}
4 changes: 2 additions & 2 deletions examples/react/dynamic/package.json
Original file line number Diff line number Diff line change
@@ -9,12 +9,12 @@
},
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@tanstack/react-virtual": "^3.13.2",
"@tanstack/react-virtual": "^3.13.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/node": "^22.10.1",
"@types/node": "^22.13.6",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4",
7 changes: 2 additions & 5 deletions examples/react/dynamic/src/main.tsx
Original file line number Diff line number Diff line change
@@ -401,17 +401,14 @@ function App() {
<p>
These components are using <strong>dynamic</strong> sizes. This means
that each element's exact dimensions are unknown when rendered. An
estimated dimension is used to get an a initial measurement, then this
estimated dimension is used as the initial measurement, then this
measurement is readjusted on the fly as each element is rendered.
</p>
<nav>
<ul>
<li>
<a href="/">List</a>
</li>
<li>
<a href="/window-list">List - window as scroller</a>
</li>
<li>
<a href="/columns">Column</a>
</li>
@@ -446,7 +443,7 @@ function App() {
<p>
<strong>Notice:</strong> You are currently running React in
development mode. Rendering performance will be slightly degraded
until this application is build for production.
until this application is built for production.
</p>
) : null}
</div>
4 changes: 2 additions & 2 deletions examples/react/fixed/package.json
Original file line number Diff line number Diff line change
@@ -8,12 +8,12 @@
"serve": "vite preview"
},
"dependencies": {
"@tanstack/react-virtual": "^3.13.2",
"@tanstack/react-virtual": "^3.13.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/node": "^22.10.1",
"@types/node": "^22.13.6",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4",
2 changes: 1 addition & 1 deletion examples/react/fixed/src/main.tsx
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ function App() {
<p>
<strong>Notice:</strong> You are currently running React in
development mode. Rendering performance will be slightly degraded
until this application is build for production.
until this application is built for production.
</p>
) : null}
</div>
4 changes: 2 additions & 2 deletions examples/react/infinite-scroll/package.json
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@
"start": "vite"
},
"dependencies": {
"@tanstack/react-query": "^5.66.9",
"@tanstack/react-virtual": "^3.13.2",
"@tanstack/react-query": "^5.67.2",
"@tanstack/react-virtual": "^3.13.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
2 changes: 1 addition & 1 deletion examples/react/infinite-scroll/src/main.tsx
Original file line number Diff line number Diff line change
@@ -146,7 +146,7 @@ function App() {
<p>
<strong>Notice:</strong> You are currently running React in
development mode. Rendering performance will be slightly degraded
until this application is build for production.
until this application is built for production.
</p>
) : null}
</div>
2 changes: 1 addition & 1 deletion examples/react/padding/package.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"start": "vite"
},
"dependencies": {
"@tanstack/react-virtual": "^3.13.2",
"@tanstack/react-virtual": "^3.13.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
4 changes: 2 additions & 2 deletions examples/react/padding/src/main.tsx
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ function App() {
<p>
These components are using <strong>dynamic</strong> sizes. This means
that each element's exact dimensions are unknown when rendered. An
estimated dimension is used to get an a initial measurement, then this
estimated dimension is used as the initial measurement, then this
measurement is readjusted on the fly as each element is rendered.
</p>
<br />
@@ -249,7 +249,7 @@ function GridVirtualizerDynamic({
<p>
<strong>Notice:</strong> You are currently running React in
development mode. Rendering performance will be slightly degraded
until this application is build for production.
until this application is built for production.
</p>
) : null}
</>
4 changes: 2 additions & 2 deletions examples/react/scroll-padding/package.json
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@
"start": "vite"
},
"dependencies": {
"@react-hookz/web": "^24.0.4",
"@tanstack/react-virtual": "^3.13.2",
"@react-hookz/web": "^25.1.0",
"@tanstack/react-virtual": "^3.13.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
2 changes: 1 addition & 1 deletion examples/react/scroll-padding/src/main.tsx
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ function App() {
<p>
<strong>Notice:</strong> You are currently running React in
development mode. Rendering performance will be slightly degraded
until this application is build for production.
until this application is built for production.
</p>
) : null}
</>
2 changes: 1 addition & 1 deletion examples/react/smooth-scroll/package.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"start": "vite"
},
"dependencies": {
"@tanstack/react-virtual": "^3.13.2",
"@tanstack/react-virtual": "^3.13.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
2 changes: 1 addition & 1 deletion examples/react/smooth-scroll/src/main.tsx
Original file line number Diff line number Diff line change
@@ -108,7 +108,7 @@ function App() {
<p>
<strong>Notice:</strong> You are currently running React in
development mode. Rendering performance will be slightly degraded
until this application is build for production.
until this application is built for production.
</p>
) : null}
</div>
4 changes: 2 additions & 2 deletions examples/react/sticky/package.json
Original file line number Diff line number Diff line change
@@ -10,13 +10,13 @@
},
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@tanstack/react-virtual": "^3.13.2",
"@tanstack/react-virtual": "^3.13.3",
"lodash": "^4.17.21",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/lodash": "^4.17.15",
"@types/lodash": "^4.17.16",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4",
4 changes: 2 additions & 2 deletions examples/react/sticky/src/main.tsx
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import type { Range } from '@tanstack/react-virtual'

const groupedNames = groupBy(
Array.from({ length: 1000 })
.map(() => faker.name.firstName())
.map(() => faker.person.firstName())
.sort(),
(name) => name[0],
)
@@ -108,7 +108,7 @@ const App = () => {
<p>
<strong>Notice:</strong> You are currently running React in
development mode. Rendering performance will be slightly degraded
until this application is build for production.
until this application is built for production.
</p>
) : null}
</div>
2 changes: 1 addition & 1 deletion examples/react/table/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@tanstack/react-table": "^8.21.2",
"@tanstack/react-virtual": "^3.13.2",
"@tanstack/react-virtual": "^3.13.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
4 changes: 2 additions & 2 deletions examples/react/table/src/main.tsx
Original file line number Diff line number Diff line change
@@ -164,7 +164,7 @@ function App() {
<p>
For tables, the basis for the offset of the translate css function is
from the row's initial position itself. Because of this, we need to
calculate the translateY pixel count different and base it off the the
calculate the translateY pixel count differently and base it off the
index.
</p>
<ReactTableVirtualized />
@@ -174,7 +174,7 @@ function App() {
<p>
<strong>Notice:</strong> You are currently running React in
development mode. Rendering performance will be slightly degraded
until this application is build for production.
until this application is built for production.
</p>
) : null}
</div>
4 changes: 2 additions & 2 deletions examples/react/table/src/makeData.ts
Original file line number Diff line number Diff line change
@@ -22,8 +22,8 @@ const range = (len: number) => {
const newPerson = (index: number): Person => {
return {
id: index + 1,
firstName: faker.name.firstName(),
lastName: faker.name.lastName(),
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
age: faker.number.int(40),
visits: faker.number.int(1000),
progress: faker.number.int(100),
2 changes: 1 addition & 1 deletion examples/react/variable/package.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"start": "vite"
},
"dependencies": {
"@tanstack/react-virtual": "^3.13.2",
"@tanstack/react-virtual": "^3.13.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
2 changes: 1 addition & 1 deletion examples/react/variable/src/main.tsx
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ function App() {
<p>
<strong>Notice:</strong> You are currently running React in
development mode. Rendering performance will be slightly degraded
until this application is build for production.
until this application is built for production.
</p>
) : null}
</div>
4 changes: 2 additions & 2 deletions examples/react/window/package.json
Original file line number Diff line number Diff line change
@@ -8,12 +8,12 @@
"serve": "vite preview"
},
"dependencies": {
"@tanstack/react-virtual": "^3.13.2",
"@tanstack/react-virtual": "^3.13.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/node": "^22.10.1",
"@types/node": "^22.13.6",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4",
2 changes: 1 addition & 1 deletion examples/react/window/src/main.tsx
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ function App() {
<p>
<strong>Notice:</strong> You are currently running React in
development mode. Rendering performance will be slightly degraded
until this application is build for production.
until this application is built for production.
</p>
) : null}
</div>
4 changes: 2 additions & 2 deletions examples/svelte/dynamic/package.json
Original file line number Diff line number Diff line change
@@ -10,13 +10,13 @@
},
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@tanstack/svelte-virtual": "^3.13.2"
"@tanstack/svelte-virtual": "^3.13.3"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tsconfig/svelte": "^5.0.4",
"svelte": "^4.2.19",
"svelte-check": "^4.1.4",
"svelte-check": "^4.1.5",
"tslib": "^2.8.1",
"typescript": "5.2.2",
"vite": "^5.4.14"
4 changes: 2 additions & 2 deletions examples/svelte/dynamic/src/App.svelte
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@
<p>
These components are using <strong>dynamic</strong> sizes. This means that each
element's exact dimensions are unknown when rendered. An estimated dimension
is used to get an a initial measurement, then this measurement is readjusted
on the fly as each element is rendered.
is used as the initial measurement, then this measurement is readjusted on the
fly as each element is rendered.
</p>
<nav>
<ul>
4 changes: 2 additions & 2 deletions examples/svelte/fixed/package.json
Original file line number Diff line number Diff line change
@@ -9,13 +9,13 @@
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"dependencies": {
"@tanstack/svelte-virtual": "^3.13.2"
"@tanstack/svelte-virtual": "^3.13.3"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tsconfig/svelte": "^5.0.4",
"svelte": "^4.2.19",
"svelte-check": "^4.1.4",
"svelte-check": "^4.1.5",
"tslib": "^2.8.1",
"typescript": "5.2.2",
"vite": "^5.4.14"
6 changes: 3 additions & 3 deletions examples/svelte/infinite-scroll/package.json
Original file line number Diff line number Diff line change
@@ -9,14 +9,14 @@
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"dependencies": {
"@tanstack/svelte-query": "^5.66.9",
"@tanstack/svelte-virtual": "^3.13.2"
"@tanstack/svelte-query": "^5.67.2",
"@tanstack/svelte-virtual": "^3.13.3"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tsconfig/svelte": "^5.0.4",
"svelte": "^4.2.19",
"svelte-check": "^4.1.4",
"svelte-check": "^4.1.5",
"tslib": "^2.8.1",
"typescript": "5.2.2",
"vite": "^5.4.14"
4 changes: 2 additions & 2 deletions examples/svelte/smooth-scroll/package.json
Original file line number Diff line number Diff line change
@@ -10,13 +10,13 @@
},
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@tanstack/svelte-virtual": "^3.13.2"
"@tanstack/svelte-virtual": "^3.13.3"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tsconfig/svelte": "^5.0.4",
"svelte": "^4.2.19",
"svelte-check": "^4.1.4",
"svelte-check": "^4.1.5",
"tslib": "^2.8.1",
"typescript": "5.2.2",
"vite": "^5.4.14"
4 changes: 2 additions & 2 deletions examples/svelte/sticky/package.json
Original file line number Diff line number Diff line change
@@ -10,14 +10,14 @@
},
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@tanstack/svelte-virtual": "^3.13.2",
"@tanstack/svelte-virtual": "^3.13.3",
"lodash": "^4.17.21"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tsconfig/svelte": "^5.0.4",
"svelte": "^4.2.19",
"svelte-check": "^4.1.4",
"svelte-check": "^4.1.5",
"tslib": "^2.8.1",
"typescript": "5.2.2",
"vite": "^5.4.14"
2 changes: 1 addition & 1 deletion examples/svelte/sticky/src/App.svelte
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
const groupedNames = groupBy(
Array.from({ length: 1000 })
.map(() => faker.name.firstName())
.map(() => faker.person.firstName())
.sort(),
(name: any) => name[0],
)
4 changes: 2 additions & 2 deletions examples/svelte/table/package.json
Original file line number Diff line number Diff line change
@@ -11,13 +11,13 @@
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@tanstack/svelte-table": "^8.21.2",
"@tanstack/svelte-virtual": "^3.13.2"
"@tanstack/svelte-virtual": "^3.13.3"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tsconfig/svelte": "^5.0.4",
"svelte": "^4.2.19",
"svelte-check": "^4.1.4",
"svelte-check": "^4.1.5",
"tslib": "^2.8.1",
"typescript": "5.2.2",
"vite": "^5.4.14"
2 changes: 1 addition & 1 deletion examples/svelte/table/src/App.svelte
Original file line number Diff line number Diff line change
@@ -100,7 +100,7 @@
<p>
For tables, the basis for the offset of the translate css function is from
the row's initial position itself. Because of this, we need to calculate the
translateY pixel count different and base it off the the index.
translateY pixel count differently and base it off the index.
</p>

<div class="list scroll-container" bind:this={virtualListEl}>
4 changes: 2 additions & 2 deletions examples/svelte/table/src/makeData.ts
Original file line number Diff line number Diff line change
@@ -22,8 +22,8 @@ const range = (len: number) => {
const newPerson = (index: number): Person => {
return {
id: index + 1,
firstName: faker.name.firstName(),
lastName: faker.name.lastName(),
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
age: faker.number.int(40),
visits: faker.number.int(1000),
progress: faker.number.int(100),
4 changes: 2 additions & 2 deletions examples/vue/dynamic/package.json
Original file line number Diff line number Diff line change
@@ -9,14 +9,14 @@
},
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@tanstack/vue-virtual": "^3.13.2",
"@tanstack/vue-virtual": "^3.13.3",
"vue": "^3.5.13"
},
"devDependencies": {
"@codesandbox/vue-preview": "^0.1.1-alpha.16",
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "5.2.2",
"vite": "^5.4.14",
"vue-tsc": "^2.2.4"
"vue-tsc": "^2.2.8"
}
}
4 changes: 2 additions & 2 deletions examples/vue/dynamic/src/App.vue
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@
<p>
These components are using <strong>dynamic</strong> sizes. This means that
each element's exact dimensions are unknown when rendered. An estimated
dimension is used to get an a initial measurement, then this measurement
is readjusted on the fly as each element is rendered.
dimension is used as the initial measurement, then this measurement is
readjusted on the fly as each element is rendered.
</p>
<nav>
<ul>
4 changes: 2 additions & 2 deletions examples/vue/fixed/package.json
Original file line number Diff line number Diff line change
@@ -8,14 +8,14 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/vue-virtual": "^3.13.2",
"@tanstack/vue-virtual": "^3.13.3",
"vue": "^3.5.13"
},
"devDependencies": {
"@codesandbox/vue-preview": "^0.1.1-alpha.16",
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "5.2.2",
"vite": "^5.4.14",
"vue-tsc": "^2.2.4"
"vue-tsc": "^2.2.8"
}
}
6 changes: 3 additions & 3 deletions examples/vue/infinite-scroll/package.json
Original file line number Diff line number Diff line change
@@ -8,15 +8,15 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/vue-query": "^5.66.9",
"@tanstack/vue-virtual": "^3.13.2",
"@tanstack/vue-query": "^5.67.2",
"@tanstack/vue-virtual": "^3.13.3",
"vue": "^3.5.13"
},
"devDependencies": {
"@codesandbox/vue-preview": "^0.1.1-alpha.16",
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "5.2.2",
"vite": "^5.4.14",
"vue-tsc": "^2.2.4"
"vue-tsc": "^2.2.8"
}
}
4 changes: 2 additions & 2 deletions examples/vue/padding/package.json
Original file line number Diff line number Diff line change
@@ -8,14 +8,14 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/vue-virtual": "^3.13.2",
"@tanstack/vue-virtual": "^3.13.3",
"vue": "^3.5.13"
},
"devDependencies": {
"@codesandbox/vue-preview": "^0.1.1-alpha.16",
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "5.2.2",
"vite": "^5.4.14",
"vue-tsc": "^2.2.4"
"vue-tsc": "^2.2.8"
}
}
6 changes: 3 additions & 3 deletions examples/vue/scroll-padding/package.json
Original file line number Diff line number Diff line change
@@ -8,15 +8,15 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/vue-virtual": "^3.13.2",
"@vueuse/core": "^11.3.0",
"@tanstack/vue-virtual": "^3.13.3",
"@vueuse/core": "^12.8.2",
"vue": "^3.5.13"
},
"devDependencies": {
"@codesandbox/vue-preview": "^0.1.1-alpha.16",
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "5.2.2",
"vite": "^5.4.14",
"vue-tsc": "^2.2.4"
"vue-tsc": "^2.2.8"
}
}
4 changes: 2 additions & 2 deletions examples/vue/smooth-scroll/package.json
Original file line number Diff line number Diff line change
@@ -8,14 +8,14 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/vue-virtual": "^3.13.2",
"@tanstack/vue-virtual": "^3.13.3",
"vue": "^3.5.13"
},
"devDependencies": {
"@codesandbox/vue-preview": "^0.1.1-alpha.16",
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "5.2.2",
"vite": "^5.4.14",
"vue-tsc": "^2.2.4"
"vue-tsc": "^2.2.8"
}
}
6 changes: 3 additions & 3 deletions examples/vue/sticky/package.json
Original file line number Diff line number Diff line change
@@ -9,16 +9,16 @@
},
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@tanstack/vue-virtual": "^3.13.2",
"@tanstack/vue-virtual": "^3.13.3",
"lodash": "^4.17.21",
"vue": "^3.5.13"
},
"devDependencies": {
"@codesandbox/vue-preview": "^0.1.1-alpha.16",
"@types/lodash": "^4.17.15",
"@types/lodash": "^4.17.16",
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "5.2.2",
"vite": "^5.4.14",
"vue-tsc": "^2.2.4"
"vue-tsc": "^2.2.8"
}
}
2 changes: 1 addition & 1 deletion examples/vue/sticky/src/App.vue
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ import { useVirtualizer, defaultRangeExtractor } from '@tanstack/vue-virtual'
const groupedNames = groupBy(
Array.from({ length: 1000 })
.map(() => faker.name.firstName())
.map(() => faker.person.firstName())
.sort(),
(name: string[]) => name[0],
)
4 changes: 2 additions & 2 deletions examples/vue/table/package.json
Original file line number Diff line number Diff line change
@@ -10,14 +10,14 @@
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@tanstack/vue-table": "^8.21.2",
"@tanstack/vue-virtual": "^3.13.2",
"@tanstack/vue-virtual": "^3.13.3",
"vue": "^3.5.13"
},
"devDependencies": {
"@codesandbox/vue-preview": "^0.1.1-alpha.16",
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "5.2.2",
"vite": "^5.4.14",
"vue-tsc": "^2.2.4"
"vue-tsc": "^2.2.8"
}
}
8 changes: 5 additions & 3 deletions examples/vue/table/src/App.vue
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<p>
For tables, the basis for the offset of the translate css function is from
the row's initial position itself. Because of this, we need to calculate
the translateY pixel count different and base it off the the index.
the translateY pixel count differently and base it off the index.
</p>

<div ref="parentRef" class="container">
@@ -47,9 +47,11 @@
</thead>
<tbody>
<tr
v-for="virtualRow in virtualRows"
v-for="(virtualRow, index) in virtualRows"
:key="virtualRow.key"
:style="{ transform: `translateY(${virtualRow.start}px)` }"
:style="{
transform: `translateY(${virtualRow.start - index * virtualRow.size}px)`,
}"
>
<td
v-for="cell in rows[virtualRow.index].getVisibleCells()"
4 changes: 2 additions & 2 deletions examples/vue/table/src/makeData.ts
Original file line number Diff line number Diff line change
@@ -22,8 +22,8 @@ const range = (len: number) => {
const newPerson = (index: number): Person => {
return {
id: index + 1,
firstName: faker.name.firstName(),
lastName: faker.name.lastName(),
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
age: faker.number.int(40),
visits: faker.number.int(1000),
progress: faker.number.int(100),
4 changes: 2 additions & 2 deletions examples/vue/variable/package.json
Original file line number Diff line number Diff line change
@@ -8,14 +8,14 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/vue-virtual": "^3.13.2",
"@tanstack/vue-virtual": "^3.13.3",
"vue": "^3.5.13"
},
"devDependencies": {
"@codesandbox/vue-preview": "^0.1.1-alpha.16",
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "5.2.2",
"vite": "^5.4.14",
"vue-tsc": "^2.2.4"
"vue-tsc": "^2.2.8"
}
}
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
"type": "git",
"url": "https://github.com/TanStack/virtual.git"
},
"packageManager": "pnpm@9.15.5",
"packageManager": "pnpm@10.6.2",
"type": "module",
"scripts": {
"clean": "pnpm --filter \"./packages/**\" run clean",
@@ -27,8 +27,9 @@
"dev": "pnpm run watch",
"prettier": "prettier --ignore-unknown '**/*'",
"prettier:write": "pnpm run prettier --write",
"cipublish": "node scripts/publish.js",
"cipublishforce": "CI=true pnpm cipublish"
"changeset": "changeset",
"changeset:version": "changeset version && pnpm install --no-frozen-lockfile && pnpm prettier:write",
"changeset:publish": "changeset publish"
},
"nx": {
"includedScripts": [
@@ -37,18 +38,20 @@
]
},
"devDependencies": {
"@tanstack/config": "^0.16.3",
"@changesets/cli": "^2.28.1",
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
"@tanstack/config": "^0.17.1",
"@testing-library/jest-dom": "^6.6.3",
"@types/node": "^22.10.1",
"eslint": "^9.21.0",
"@types/node": "^22.13.6",
"eslint": "^9.22.0",
"jsdom": "^25.0.1",
"knip": "^5.44.5",
"nx": "^20.4.6",
"prettier": "^3.5.2",
"knip": "^5.45.0",
"nx": "^20.5.0",
"premove": "^4.0.0",
"prettier": "^3.5.3",
"prettier-plugin-svelte": "^3.3.3",
"publint": "^0.3.6",
"rimraf": "^5.0.10",
"sherif": "^1.3.0",
"publint": "^0.3.9",
"sherif": "^1.4.0",
"typescript": "5.2.2",
"vite": "^5.4.14",
"vitest": "^2.1.9"
8 changes: 8 additions & 0 deletions packages/angular-virtual/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @tanstack/angular-virtual

## 3.13.3

### Patch Changes

- Updated dependencies [[`02ef309`](https://github.com/TanStack/virtual/commit/02ef3097de4a14ed4077ace2ca901dc411bf81c1)]:
- @tanstack/virtual-core@3.13.3
4 changes: 2 additions & 2 deletions packages/angular-virtual/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/angular-virtual",
"version": "3.13.2",
"version": "3.13.3",
"description": "Headless UI for virtualizing scrollable elements in Angular",
"author": "Garrett Darnell",
"license": "MIT",
@@ -40,7 +40,7 @@
"build"
],
"scripts": {
"clean": "rimraf ./build",
"clean": "premove ./build",
"test:types": "tsc --noEmit",
"test:eslint": "eslint ./src",
"build": "ng-packagr -p ng-package.json -c tsconfig.build.json"
8 changes: 8 additions & 0 deletions packages/lit-virtual/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @tanstack/lit-virtual

## 3.13.3

### Patch Changes

- Updated dependencies [[`02ef309`](https://github.com/TanStack/virtual/commit/02ef3097de4a14ed4077ace2ca901dc411bf81c1)]:
- @tanstack/virtual-core@3.13.3
4 changes: 2 additions & 2 deletions packages/lit-virtual/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/lit-virtual",
"version": "3.13.2",
"version": "3.13.3",
"description": "Headless UI for virtualizing scrollable elements in Lit",
"author": "Tanner Linsley",
"license": "MIT",
@@ -21,7 +21,7 @@
"datagrid"
],
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"clean": "premove ./dist ./coverage",
"test:eslint": "eslint ./src",
"test:types": "tsc",
"test:build": "publint --strict",
8 changes: 8 additions & 0 deletions packages/react-virtual/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @tanstack/react-virtual

## 3.13.3

### Patch Changes

- Updated dependencies [[`02ef309`](https://github.com/TanStack/virtual/commit/02ef3097de4a14ed4077ace2ca901dc411bf81c1)]:
- @tanstack/virtual-core@3.13.3
4 changes: 2 additions & 2 deletions packages/react-virtual/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-virtual",
"version": "3.13.2",
"version": "3.13.3",
"description": "Headless UI for virtualizing scrollable elements in React",
"author": "Tanner Linsley",
"license": "MIT",
@@ -23,7 +23,7 @@
"datagrid"
],
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"clean": "premove ./dist ./coverage",
"test:eslint": "eslint ./src",
"test:types": "tsc",
"test:lib": "vitest",
8 changes: 8 additions & 0 deletions packages/solid-virtual/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @tanstack/solid-virtual

## 3.13.3

### Patch Changes

- Updated dependencies [[`02ef309`](https://github.com/TanStack/virtual/commit/02ef3097de4a14ed4077ace2ca901dc411bf81c1)]:
- @tanstack/virtual-core@3.13.3
6 changes: 3 additions & 3 deletions packages/solid-virtual/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-virtual",
"version": "3.13.2",
"version": "3.13.3",
"description": "Headless UI for virtualizing scrollable elements in Solid",
"author": "Tanner Linsley",
"license": "MIT",
@@ -23,7 +23,7 @@
"datagrid"
],
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"clean": "premove ./dist ./coverage",
"test:eslint": "eslint ./src",
"test:types": "tsc",
"test:build": "publint --strict",
@@ -56,7 +56,7 @@
},
"devDependencies": {
"solid-js": "^1.9.5",
"vite-plugin-solid": "^2.11.2"
"vite-plugin-solid": "^2.11.6"
},
"peerDependencies": {
"solid-js": "^1.3.0"
8 changes: 8 additions & 0 deletions packages/svelte-virtual/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @tanstack/svelte-virtual

## 3.13.3

### Patch Changes

- Updated dependencies [[`02ef309`](https://github.com/TanStack/virtual/commit/02ef3097de4a14ed4077ace2ca901dc411bf81c1)]:
- @tanstack/virtual-core@3.13.3
4 changes: 2 additions & 2 deletions packages/svelte-virtual/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/svelte-virtual",
"version": "3.13.2",
"version": "3.13.3",
"description": "Headless UI for virtualizing scrollable elements in Svelte",
"author": "Tanner Linsley",
"license": "MIT",
@@ -24,7 +24,7 @@
"datagrid"
],
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"clean": "premove ./dist ./coverage",
"test:eslint": "eslint ./src",
"test:types": "tsc",
"test:build": "publint --strict",
7 changes: 7 additions & 0 deletions packages/virtual-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @tanstack/virtual-core

## 3.13.3

### Patch Changes

- fix(virtual-core): expand range in masonry layouts to catch items from all lanes ([#937](https://github.com/TanStack/virtual/pull/937))
4 changes: 2 additions & 2 deletions packages/virtual-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/virtual-core",
"version": "3.13.2",
"version": "3.13.3",
"description": "Headless UI for virtualizing scrollable elements in TS/JS + Frameworks",
"author": "Tanner Linsley",
"license": "MIT",
@@ -23,7 +23,7 @@
"datagrid"
],
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"clean": "premove ./dist ./coverage",
"test:eslint": "eslint ./src",
"test:types": "tsc",
"test:lib": "vitest",
58 changes: 44 additions & 14 deletions packages/virtual-core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1036,16 +1036,25 @@ export class Virtualizer<

let end: number
// If there are no measurements, set the end to paddingStart
// If there is only one lane, use the last measurement's end
// Otherwise find the maximum end value among all measurements
if (measurements.length === 0) {
end = this.options.paddingStart
} else if (this.options.lanes === 1) {
end = measurements[measurements.length - 1]?.end ?? 0
} else {
// If lanes is 1, use the last measurement's end, otherwise find the maximum end value among all measurements
end =
this.options.lanes === 1
? (measurements[measurements.length - 1]?.end ?? 0)
: Math.max(
...measurements.slice(-this.options.lanes).map((m) => m.end),
)
const endByLane = Array<number | null>(this.options.lanes).fill(null)
let endIndex = measurements.length - 1
while (endIndex > 0 && endByLane.some((val) => val === null)) {
const item = measurements[endIndex]!
if (endByLane[item.lane] === null) {
endByLane[item.lane] = item.end
}

endIndex--
}

end = Math.max(...endByLane.filter((val): val is number => val !== null))
}

return Math.max(
@@ -1121,14 +1130,35 @@ function calculateRange({
)
let endIndex = startIndex

while (
endIndex < lastIndex &&
measurements[endIndex]!.end < scrollOffset + outerSize
) {
endIndex++
}
if (lanes === 1) {
while (
endIndex < lastIndex &&
measurements[endIndex]!.end < scrollOffset + outerSize
) {
endIndex++
}
} else if (lanes > 1) {
// Expand forward until we include the visible items from all lanes
// which are closer to the end of the virtualizer window
const endPerLane = Array(lanes).fill(0)
while (
endIndex < lastIndex &&
endPerLane.some((pos) => pos < scrollOffset + outerSize)
) {
const item = measurements[endIndex]!
endPerLane[item.lane] = item.end
endIndex++
}

// Expand backward until we include all lanes' visible items
// closer to the top
const startPerLane = Array(lanes).fill(scrollOffset + outerSize)
while (startIndex > 0 && startPerLane.some((pos) => pos >= scrollOffset)) {
const item = measurements[startIndex]!
startPerLane[item.lane] = item.start
startIndex--
}

if (lanes > 1) {
// Align startIndex to the beginning of its lane
startIndex = Math.max(0, startIndex - (startIndex % lanes))
// Align endIndex to the end of its lane
8 changes: 8 additions & 0 deletions packages/vue-virtual/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @tanstack/vue-virtual

## 3.13.3

### Patch Changes

- Updated dependencies [[`02ef309`](https://github.com/TanStack/virtual/commit/02ef3097de4a14ed4077ace2ca901dc411bf81c1)]:
- @tanstack/virtual-core@3.13.3
4 changes: 2 additions & 2 deletions packages/vue-virtual/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-virtual",
"version": "3.13.2",
"version": "3.13.3",
"description": "Headless UI for virtualizing scrollable elements in Vue",
"author": "Tanner Linsley",
"license": "MIT",
@@ -27,7 +27,7 @@
"datagrid"
],
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"clean": "premove ./dist ./coverage",
"test:eslint": "eslint ./src",
"test:types": "tsc",
"test:build": "publint --strict",
3,594 changes: 1,942 additions & 1,652 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

57 changes: 0 additions & 57 deletions scripts/publish.js

This file was deleted.