diff --git a/.changeset/brown-experts-search.md b/.changeset/brown-experts-search.md
new file mode 100644
index 0000000..7c18fb4
--- /dev/null
+++ b/.changeset/brown-experts-search.md
@@ -0,0 +1,5 @@
+---
+'react-virtual-masonry': minor
+---
+
+mv virtual to peer, fix lane caching (virtaul#1115)
diff --git a/.changeset/cool-clocks-sneeze.md b/.changeset/cool-clocks-sneeze.md
new file mode 100644
index 0000000..2df906c
--- /dev/null
+++ b/.changeset/cool-clocks-sneeze.md
@@ -0,0 +1,5 @@
+---
+'react-virtual-masonry': patch
+---
+
+disable react compiler for useWindowVirtualizer
diff --git a/.oxlintrc.json b/.oxlintrc.json
index ec3a0e1..acc45ff 100644
--- a/.oxlintrc.json
+++ b/.oxlintrc.json
@@ -1,5 +1,9 @@
{
- "plugins": ["react", "unicorn", "typescript", "oxc", "react-hooks"],
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
+ "plugins": ["react", "unicorn", "typescript", "oxc", "react-perf"],
+ "env": {
+ "browser": true
+ },
"rules": {
"correctness": "error",
"suspicious": "error",
diff --git a/docs/contents/pages/index.mdx b/docs/contents/pages/index.mdx
index dbfb8df..f0b1005 100644
--- a/docs/contents/pages/index.mdx
+++ b/docs/contents/pages/index.mdx
@@ -11,7 +11,7 @@ import { HomePage } from 'vocs/components';
Modern Masonry Layout with ease, powered by @tanstack/virtual.
-
+
Get started
diff --git a/package.json b/package.json
index 0ddaa95..2b01460 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
"@changesets/cli": "^2.29.8",
"husky": "^9.1.7",
"lint-staged": "^15.5.2",
- "oxlint": "^0.16.12",
+ "oxlint": "^1.39.0",
"prettier": "^3.7.4",
"taze": "^19.9.2",
"turbo": "^2.7.3"
diff --git a/package/package.json b/package/package.json
index dbb88d4..3a6c4f1 100644
--- a/package/package.json
+++ b/package/package.json
@@ -39,11 +39,11 @@
"build": "tsdown"
},
"dependencies": {
- "@tanstack/react-virtual": "3.13.12",
"react-compiler-runtime": "^1.0.0"
},
"devDependencies": {
"@rollup/plugin-babel": "^6.1.0",
+ "@tanstack/react-virtual": "^3.13.24",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"babel-plugin-react-compiler": "^1.0.0",
@@ -53,6 +53,7 @@
"typescript": "catalog:"
},
"peerDependencies": {
+ "@tanstack/react-virtual": ">=3.13.24",
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
}
diff --git a/package/src/Masonry/index.tsx b/package/src/Masonry/index.tsx
index 7d95419..23dc439 100644
--- a/package/src/Masonry/index.tsx
+++ b/package/src/Masonry/index.tsx
@@ -25,6 +25,8 @@ export function Masonry({
estimateSize,
overscan = DEFAULT_OVERSCAN,
}: Props) {
+ 'use no memo';
+
const { getResponsiveValue } = useResponsiveValue();
const columnsCount = getResponsiveValue(columnsCountBreakPoints, DEFAULT_COLUMNS_COUNT);
@@ -42,6 +44,7 @@ export function Masonry({
lanes: columnsCount,
scrollMargin: containerRef.current?.offsetTop ?? 0,
gap: gutter,
+ laneAssignmentMode: 'measured',
});
return (
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index cde3eae..3c9ca0b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -44,8 +44,8 @@ importers:
specifier: ^15.5.2
version: 15.5.2
oxlint:
- specifier: ^0.16.12
- version: 0.16.12
+ specifier: ^1.39.0
+ version: 1.39.0
prettier:
specifier: ^3.7.4
version: 3.7.4
@@ -111,9 +111,6 @@ importers:
package:
dependencies:
- '@tanstack/react-virtual':
- specifier: 3.13.12
- version: 3.13.12(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
react-compiler-runtime:
specifier: ^1.0.0
version: 1.0.0(react@19.2.3)
@@ -121,6 +118,9 @@ importers:
'@rollup/plugin-babel':
specifier: ^6.1.0
version: 6.1.0(@babel/core@7.28.5)(@types/babel__core@7.20.5)(rollup@4.55.1)
+ '@tanstack/react-virtual':
+ specifier: ^3.13.24
+ version: 3.13.24(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@types/react':
specifier: 'catalog:'
version: 19.2.7
@@ -764,43 +764,43 @@ packages:
'@oxc-project/types@0.106.0':
resolution: {integrity: sha512-QdsH3rZq480VnOHSHgPYOhjL8O8LBdcnSjM408BpPCCUc0JYYZPG9Gafl9i3OcGk/7137o+gweb4cCv3WAUykg==}
- '@oxlint/darwin-arm64@0.16.12':
- resolution: {integrity: sha512-G7phYhlIA4ke2nW7tHLl+E5+rvdzgGA6830D+e+y1RGllT0w2ONGdKcVTj+2pXGCw6yPmCC5fDsDEn2+RPTfxg==}
+ '@oxlint/darwin-arm64@1.39.0':
+ resolution: {integrity: sha512-lT3hNhIa02xCujI6YGgjmYGg3Ht/X9ag5ipUVETaMpx5Rd4BbTNWUPif1WN1YZHxt3KLCIqaAe7zVhatv83HOQ==}
cpu: [arm64]
os: [darwin]
- '@oxlint/darwin-x64@0.16.12':
- resolution: {integrity: sha512-P/LSOgJ6SzQ3OKEIf3HsebgokZiZ5nDuTgIL4LpNCHlkOLDu/fT8XL9pSkR5y+60v0SOxUF/+aN0Q8EmxblrCw==}
+ '@oxlint/darwin-x64@1.39.0':
+ resolution: {integrity: sha512-UT+rfTWd+Yr7iJeSLd/7nF8X4gTYssKh+n77hxl6Oilp3NnG1CKRHxZDy3o3lIBnwgzJkdyUAiYWO1bTMXQ1lA==}
cpu: [x64]
os: [darwin]
- '@oxlint/linux-arm64-gnu@0.16.12':
- resolution: {integrity: sha512-0N/ZsW+cL7ZAUvOHbzMp3iApt5b/Q81q2e9RgEzkI6gUDCJK8/blWg0se/i6y9e24WH0ZC4bcxY1+Qz4ZQ+mFw==}
+ '@oxlint/linux-arm64-gnu@1.39.0':
+ resolution: {integrity: sha512-qocBkvS2V6rH0t9AT3DfQunMnj3xkM7srs5/Ycj2j5ZqMoaWd/FxHNVJDFP++35roKSvsRJoS0mtA8/77jqm6Q==}
cpu: [arm64]
os: [linux]
- '@oxlint/linux-arm64-musl@0.16.12':
- resolution: {integrity: sha512-MoG1SIw4RGowsOsPjm5HjRWymisRZWBea7ewMoXA5xIVQ3eqECifG0KJW0OZp96Ad8DFBEavdlNuImB2uXsMwg==}
+ '@oxlint/linux-arm64-musl@1.39.0':
+ resolution: {integrity: sha512-arZzAc1PPcz9epvGBBCMHICeyQloKtHX3eoOe62B3Dskn7gf6Q14wnDHr1r9Vp4vtcBATNq6HlKV14smdlC/qA==}
cpu: [arm64]
os: [linux]
- '@oxlint/linux-x64-gnu@0.16.12':
- resolution: {integrity: sha512-STho8QdMLfn/0lqRU94tGPaYX8lGJccPbqeUcEr3eK5gZ5ZBdXmiHlvkcngXFEXksYC8/5VoJN7Vf3HsmkEskw==}
+ '@oxlint/linux-x64-gnu@1.39.0':
+ resolution: {integrity: sha512-ZVt5qsECpuNprdWxAPpDBwoixr1VTcZ4qAEQA2l/wmFyVPDYFD3oBY/SWACNnWBddMrswjTg9O8ALxYWoEpmXw==}
cpu: [x64]
os: [linux]
- '@oxlint/linux-x64-musl@0.16.12':
- resolution: {integrity: sha512-i7pzSoj9nCg/ZzOe8dCZeFWyRRWDylR9tIX04xRTq3G6PBLm6i9VrOdEkxbgM9+pCkRzUc0a9D7rbtCF34TQUA==}
+ '@oxlint/linux-x64-musl@1.39.0':
+ resolution: {integrity: sha512-pB0hlGyKPbxr9NMIV783lD6cWL3MpaqnZRM9MWni4yBdHPTKyFNYdg5hGD0Bwg+UP4S2rOevq/+OO9x9Bi7E6g==}
cpu: [x64]
os: [linux]
- '@oxlint/win32-arm64@0.16.12':
- resolution: {integrity: sha512-wcxq3IBJ7ZlONlXJxQM+7EMx+LX1nkz3ZS3R0EtDM76EOZaqe8BMkW5cXVhF8jarZTZC18oKAckW4Ng9d8adBg==}
+ '@oxlint/win32-arm64@1.39.0':
+ resolution: {integrity: sha512-Gg2SFaJohI9+tIQVKXlPw3FsPQFi/eCSWiCgwPtPn5uzQxHRTeQEZKuluz1fuzR5U70TXubb2liZi4Dgl8LJQA==}
cpu: [arm64]
os: [win32]
- '@oxlint/win32-x64@0.16.12':
- resolution: {integrity: sha512-Ae1fx7wmAcMVqzS8rLINaFRpAdh29QzHh133bEYMHzfWBYyK/hLu9g4GLwC/lEIVQu9884b8qutGfdOk6Qia3w==}
+ '@oxlint/win32-x64@1.39.0':
+ resolution: {integrity: sha512-sbi25lfj74hH+6qQtb7s1wEvd1j8OQbTaH8v3xTcDjrwm579Cyh0HBv1YSZ2+gsnVwfVDiCTL1D0JsNqYXszVA==}
cpu: [x64]
os: [win32]
@@ -1896,14 +1896,14 @@ packages:
peerDependencies:
vite: ^5.2.0 || ^6 || ^7
- '@tanstack/react-virtual@3.13.12':
- resolution: {integrity: sha512-Gd13QdxPSukP8ZrkbgS2RwoZseTTbQPLnQEn7HY/rqtM+8Zt95f7xKC7N0EsKs7aoz0WzZ+fditZux+F8EzYxA==}
+ '@tanstack/react-virtual@3.13.24':
+ resolution: {integrity: sha512-aIJvz5OSkhNIhZIpYivrxrPTKYsjW9Uzy+sP/mx0S3sev2HyvPb7xmjbYvokzEpfgYHy/HjzJ2zFAETuUfgCpg==}
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
- '@tanstack/virtual-core@3.13.12':
- resolution: {integrity: sha512-1YBOJfRHV4sXUmWsFSf5rQor4Ss82G8dQWLRbnk3GA4jeP8hQt1hxXh0tmflpC0dz3VgEv/1+qwPyLeWkQuPFA==}
+ '@tanstack/virtual-core@3.14.0':
+ resolution: {integrity: sha512-JLANqGy/D6k4Ujmh8Tr25lGimuOXNiaVyXaCAZS0W+1390sADdGnyUdSWNIfd49gebtIxGMij4IktRVzrdr12Q==}
'@tybys/wasm-util@0.10.1':
resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==}
@@ -3536,10 +3536,15 @@ packages:
outdent@0.5.0:
resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==}
- oxlint@0.16.12:
- resolution: {integrity: sha512-1oN3P9bzE90zkbjLTc+uICVLwSR+eQaDaYVipS0BtmtmEd3ccQue0y7npCinb35YqKzIv1LZxhoU9nm5fgmQuw==}
- engines: {node: '>=8.*'}
+ oxlint@1.39.0:
+ resolution: {integrity: sha512-wSiLr0wjG+KTU6c1LpVoQk7JZ7l8HCKlAkVDVTJKWmCGazsNxexxnOXl7dsar92mQcRnzko5g077ggP3RINSjA==}
+ engines: {node: ^20.19.0 || >=22.12.0}
hasBin: true
+ peerDependencies:
+ oxlint-tsgolint: '>=0.10.0'
+ peerDependenciesMeta:
+ oxlint-tsgolint:
+ optional: true
p-filter@2.1.0:
resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==}
@@ -5107,28 +5112,28 @@ snapshots:
'@oxc-project/types@0.106.0': {}
- '@oxlint/darwin-arm64@0.16.12':
+ '@oxlint/darwin-arm64@1.39.0':
optional: true
- '@oxlint/darwin-x64@0.16.12':
+ '@oxlint/darwin-x64@1.39.0':
optional: true
- '@oxlint/linux-arm64-gnu@0.16.12':
+ '@oxlint/linux-arm64-gnu@1.39.0':
optional: true
- '@oxlint/linux-arm64-musl@0.16.12':
+ '@oxlint/linux-arm64-musl@1.39.0':
optional: true
- '@oxlint/linux-x64-gnu@0.16.12':
+ '@oxlint/linux-x64-gnu@1.39.0':
optional: true
- '@oxlint/linux-x64-musl@0.16.12':
+ '@oxlint/linux-x64-musl@1.39.0':
optional: true
- '@oxlint/win32-arm64@0.16.12':
+ '@oxlint/win32-arm64@1.39.0':
optional: true
- '@oxlint/win32-x64@0.16.12':
+ '@oxlint/win32-x64@1.39.0':
optional: true
'@quansync/fs@1.0.0':
@@ -6182,13 +6187,13 @@ snapshots:
tailwindcss: 4.1.15
vite: 7.3.1(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)
- '@tanstack/react-virtual@3.13.12(react-dom@19.2.3(react@19.2.3))(react@19.2.3)':
+ '@tanstack/react-virtual@3.13.24(react-dom@19.2.3(react@19.2.3))(react@19.2.3)':
dependencies:
- '@tanstack/virtual-core': 3.13.12
+ '@tanstack/virtual-core': 3.14.0
react: 19.2.3
react-dom: 19.2.3(react@19.2.3)
- '@tanstack/virtual-core@3.13.12': {}
+ '@tanstack/virtual-core@3.14.0': {}
'@tybys/wasm-util@0.10.1':
dependencies:
@@ -8276,16 +8281,16 @@ snapshots:
outdent@0.5.0: {}
- oxlint@0.16.12:
+ oxlint@1.39.0:
optionalDependencies:
- '@oxlint/darwin-arm64': 0.16.12
- '@oxlint/darwin-x64': 0.16.12
- '@oxlint/linux-arm64-gnu': 0.16.12
- '@oxlint/linux-arm64-musl': 0.16.12
- '@oxlint/linux-x64-gnu': 0.16.12
- '@oxlint/linux-x64-musl': 0.16.12
- '@oxlint/win32-arm64': 0.16.12
- '@oxlint/win32-x64': 0.16.12
+ '@oxlint/darwin-arm64': 1.39.0
+ '@oxlint/darwin-x64': 1.39.0
+ '@oxlint/linux-arm64-gnu': 1.39.0
+ '@oxlint/linux-arm64-musl': 1.39.0
+ '@oxlint/linux-x64-gnu': 1.39.0
+ '@oxlint/linux-x64-musl': 1.39.0
+ '@oxlint/win32-arm64': 1.39.0
+ '@oxlint/win32-x64': 1.39.0
p-filter@2.1.0:
dependencies: