From 4722e8f2cf3c05291766bb670940114020f2d982 Mon Sep 17 00:00:00 2001 From: nikec Date: Tue, 16 Jan 2024 21:30:16 +0100 Subject: [PATCH 01/21] add solid examples to workspaces --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5d61f825..db7c302e 100644 --- a/package.json +++ b/package.json @@ -23,14 +23,16 @@ "./packages/*", "./examples/react/*", "./examples/svelte/*", - "./examples/vue/*" + "./examples/vue/*", + "./examples/solid/*" ], "pnpm": { "overrides": { "@tanstack/virtual-core": "workspace:*", "@tanstack/react-virtual": "workspace:*", "@tanstack/svelte-virtual": "workspace:*", - "@tanstack/vue-virtual": "workspace:*" + "@tanstack/vue-virtual": "workspace:*", + "@tanstack/solid-virtual": "workspace:*" } }, "devDependencies": { From 9f86455761799a63f9110d48bc7321dc160a148d Mon Sep 17 00:00:00 2001 From: nikec Date: Tue, 16 Jan 2024 21:30:29 +0100 Subject: [PATCH 02/21] fixed example --- examples/solid/fixed/.gitignore | 24 +++ examples/solid/fixed/README.md | 6 + examples/solid/fixed/index.html | 13 ++ examples/solid/fixed/package.json | 20 +++ examples/solid/fixed/public/vite.svg | 1 + examples/solid/fixed/src/App.tsx | 203 ++++++++++++++++++++++++ examples/solid/fixed/src/index.css | 28 ++++ examples/solid/fixed/src/index.tsx | 9 ++ examples/solid/fixed/src/vite-env.d.ts | 1 + examples/solid/fixed/tsconfig.json | 26 +++ examples/solid/fixed/tsconfig.node.json | 10 ++ examples/solid/fixed/vite.config.ts | 6 + 12 files changed, 347 insertions(+) create mode 100644 examples/solid/fixed/.gitignore create mode 100644 examples/solid/fixed/README.md create mode 100644 examples/solid/fixed/index.html create mode 100644 examples/solid/fixed/package.json create mode 100644 examples/solid/fixed/public/vite.svg create mode 100644 examples/solid/fixed/src/App.tsx create mode 100644 examples/solid/fixed/src/index.css create mode 100644 examples/solid/fixed/src/index.tsx create mode 100644 examples/solid/fixed/src/vite-env.d.ts create mode 100644 examples/solid/fixed/tsconfig.json create mode 100644 examples/solid/fixed/tsconfig.node.json create mode 100644 examples/solid/fixed/vite.config.ts diff --git a/examples/solid/fixed/.gitignore b/examples/solid/fixed/.gitignore new file mode 100644 index 00000000..a547bf36 --- /dev/null +++ b/examples/solid/fixed/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/examples/solid/fixed/README.md b/examples/solid/fixed/README.md new file mode 100644 index 00000000..b168d3c4 --- /dev/null +++ b/examples/solid/fixed/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run start` or `yarn start` diff --git a/examples/solid/fixed/index.html b/examples/solid/fixed/index.html new file mode 100644 index 00000000..70217370 --- /dev/null +++ b/examples/solid/fixed/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + Solid + TS + + +
+ + + diff --git a/examples/solid/fixed/package.json b/examples/solid/fixed/package.json new file mode 100644 index 00000000..e6961f96 --- /dev/null +++ b/examples/solid/fixed/package.json @@ -0,0 +1,20 @@ +{ + "name": "fixed", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@tanstack/solid-virtual": "3.0.1", + "solid-js": "^1.8.7" + }, + "devDependencies": { + "typescript": "^5.2.2", + "vite": "^5.0.8", + "vite-plugin-solid": "^2.8.0" + } +} diff --git a/examples/solid/fixed/public/vite.svg b/examples/solid/fixed/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/examples/solid/fixed/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/solid/fixed/src/App.tsx b/examples/solid/fixed/src/App.tsx new file mode 100644 index 00000000..aea023cf --- /dev/null +++ b/examples/solid/fixed/src/App.tsx @@ -0,0 +1,203 @@ +import { createVirtualizer } from '@tanstack/solid-virtual' +import { For } from 'solid-js' + +function App() { + return ( +
+

+ These components are using fixed sizes. This means that + every element's dimensions are hard-coded to the same value and never + change. +

+
+
+ +

Rows

+ +
+
+

Columns

+ +
+
+

Grid

+ +
+ ) +} + +function RowVirtualizerFixed() { + let parentRef!: HTMLDivElement + + const rowVirtualizer = createVirtualizer({ + count: 10000, + getScrollElement: () => parentRef, + estimateSize: () => 35, + overscan: 5, + }) + + return ( + <> +
+
+ + {(virtualRow) => ( +
+ Row {virtualRow.index} +
+ )} +
+
+
+ + ) +} + +function ColumnVirtualizerFixed() { + let parentRef!: HTMLDivElement + + const columnVirtualizer = createVirtualizer({ + horizontal: true, + count: 10000, + getScrollElement: () => parentRef, + estimateSize: () => 100, + overscan: 5, + }) + + return ( + <> +
+
+ + {(virtualColumn) => ( +
+ Column {virtualColumn.index} +
+ )} +
+
+
+ + ) +} + +function GridVirtualizerFixed() { + let parentRef!: HTMLDivElement + + const rowVirtualizer = createVirtualizer({ + count: 10000, + getScrollElement: () => parentRef, + estimateSize: () => 35, + overscan: 5, + }) + + const columnVirtualizer = createVirtualizer({ + horizontal: true, + count: 10000, + getScrollElement: () => parentRef, + estimateSize: () => 100, + overscan: 5, + }) + + return ( + <> +
+
+ + {(virtualRow) => ( + + {(virtualColumn) => ( +
+ Cell {virtualRow.index}, {virtualColumn.index} +
+ )} +
+ )} +
+
+
+ + ) +} + +export default App diff --git a/examples/solid/fixed/src/index.css b/examples/solid/fixed/src/index.css new file mode 100644 index 00000000..c46155fa --- /dev/null +++ b/examples/solid/fixed/src/index.css @@ -0,0 +1,28 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +body { + padding: 1rem; +} + +.List { + border: 1px solid #e6e4dc; + max-width: 100%; +} + +.ListItemEven, +.ListItemOdd { + display: flex; + align-items: center; + justify-content: center; +} + +.ListItemEven { + background-color: #e6e4dc; +} + +button { + border: 1px solid gray; +} diff --git a/examples/solid/fixed/src/index.tsx b/examples/solid/fixed/src/index.tsx new file mode 100644 index 00000000..af7bf042 --- /dev/null +++ b/examples/solid/fixed/src/index.tsx @@ -0,0 +1,9 @@ +/* @refresh reload */ +import { render } from 'solid-js/web' + +import './index.css' +import App from './App' + +const root = document.getElementById('root') + +render(() => , root!) diff --git a/examples/solid/fixed/src/vite-env.d.ts b/examples/solid/fixed/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/examples/solid/fixed/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/solid/fixed/tsconfig.json b/examples/solid/fixed/tsconfig.json new file mode 100644 index 00000000..39999584 --- /dev/null +++ b/examples/solid/fixed/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/examples/solid/fixed/tsconfig.node.json b/examples/solid/fixed/tsconfig.node.json new file mode 100644 index 00000000..42872c59 --- /dev/null +++ b/examples/solid/fixed/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/examples/solid/fixed/vite.config.ts b/examples/solid/fixed/vite.config.ts new file mode 100644 index 00000000..4095d9be --- /dev/null +++ b/examples/solid/fixed/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import solid from 'vite-plugin-solid' + +export default defineConfig({ + plugins: [solid()], +}) From 5f5e4edf06158aad48cb024a54bf402c23683c16 Mon Sep 17 00:00:00 2001 From: nikec Date: Tue, 16 Jan 2024 21:58:18 +0100 Subject: [PATCH 03/21] variable example --- examples/solid/variable/.gitignore | 24 ++ examples/solid/variable/README.md | 6 + examples/solid/variable/index.html | 13 + examples/solid/variable/package.json | 20 ++ examples/solid/variable/public/vite.svg | 1 + examples/solid/variable/src/App.tsx | 323 +++++++++++++++++++++ examples/solid/variable/src/index.css | 28 ++ examples/solid/variable/src/index.tsx | 9 + examples/solid/variable/src/vite-env.d.ts | 1 + examples/solid/variable/tsconfig.json | 26 ++ examples/solid/variable/tsconfig.node.json | 10 + examples/solid/variable/vite.config.ts | 6 + 12 files changed, 467 insertions(+) create mode 100644 examples/solid/variable/.gitignore create mode 100644 examples/solid/variable/README.md create mode 100644 examples/solid/variable/index.html create mode 100644 examples/solid/variable/package.json create mode 100644 examples/solid/variable/public/vite.svg create mode 100644 examples/solid/variable/src/App.tsx create mode 100644 examples/solid/variable/src/index.css create mode 100644 examples/solid/variable/src/index.tsx create mode 100644 examples/solid/variable/src/vite-env.d.ts create mode 100644 examples/solid/variable/tsconfig.json create mode 100644 examples/solid/variable/tsconfig.node.json create mode 100644 examples/solid/variable/vite.config.ts diff --git a/examples/solid/variable/.gitignore b/examples/solid/variable/.gitignore new file mode 100644 index 00000000..a547bf36 --- /dev/null +++ b/examples/solid/variable/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/examples/solid/variable/README.md b/examples/solid/variable/README.md new file mode 100644 index 00000000..b168d3c4 --- /dev/null +++ b/examples/solid/variable/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run start` or `yarn start` diff --git a/examples/solid/variable/index.html b/examples/solid/variable/index.html new file mode 100644 index 00000000..70217370 --- /dev/null +++ b/examples/solid/variable/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + Solid + TS + + +
+ + + diff --git a/examples/solid/variable/package.json b/examples/solid/variable/package.json new file mode 100644 index 00000000..0a8b21cf --- /dev/null +++ b/examples/solid/variable/package.json @@ -0,0 +1,20 @@ +{ + "name": "variable", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@tanstack/solid-virtual": "3.0.1", + "solid-js": "^1.8.7" + }, + "devDependencies": { + "typescript": "^5.2.2", + "vite": "^5.0.8", + "vite-plugin-solid": "^2.8.0" + } +} diff --git a/examples/solid/variable/public/vite.svg b/examples/solid/variable/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/examples/solid/variable/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/solid/variable/src/App.tsx b/examples/solid/variable/src/App.tsx new file mode 100644 index 00000000..43202adb --- /dev/null +++ b/examples/solid/variable/src/App.tsx @@ -0,0 +1,323 @@ +import { createVirtualizer } from '@tanstack/solid-virtual' +import { For } from 'solid-js' + +const rows = new Array(10000) + .fill(true) + .map(() => 25 + Math.round(Math.random() * 100)) + +const columns = new Array(10000) + .fill(true) + .map(() => 75 + Math.round(Math.random() * 100)) + +function App() { + return ( +
+

+ These components are using variable sizes. This means + that each element has a unique, but knowable dimension at render time. +

+
+
+ +

Rows

+ +
+
+

Columns

+ +
+
+

Grid

+ +
+
+

Masonry (vertical)

+ +
+
+

Masonry (horizontal)

+ +
+ ) +} + +function RowVirtualizerVariable() { + let parentRef!: HTMLDivElement + + const rowVirtualizer = createVirtualizer({ + count: rows.length, + getScrollElement: () => parentRef, + estimateSize: (i) => rows[i], + overscan: 5, + }) + + return ( + <> +
+
+ + {(virtualRow) => ( +
+ Row {virtualRow.index} +
+ )} +
+
+
+ + ) +} + +function ColumnVirtualizerVariable() { + let parentRef!: HTMLDivElement + + const columnVirtualizer = createVirtualizer({ + horizontal: true, + count: columns.length, + getScrollElement: () => parentRef, + estimateSize: (i) => columns[i], + overscan: 5, + }) + + return ( + <> +
+
+ + {(virtualColumn) => ( +
+ Column {virtualColumn.index} +
+ )} +
+
+
+ + ) +} + +function GridVirtualizerVariable() { + let parentRef!: HTMLDivElement + + const rowVirtualizer = createVirtualizer({ + count: rows.length, + getScrollElement: () => parentRef, + estimateSize: (i) => rows[i], + overscan: 5, + }) + + const columnVirtualizer = createVirtualizer({ + horizontal: true, + count: columns.length, + getScrollElement: () => parentRef, + estimateSize: (i) => columns[i], + overscan: 5, + }) + + return ( + <> +
+
+ + {(virtualRow) => ( + + {(virtualColumn) => ( +
+ Cell {virtualRow.index}, {virtualColumn.index} +
+ )} +
+ )} +
+
+
+ + ) +} + +function MasonryVerticalVirtualizerVariable() { + let parentRef!: HTMLDivElement + + const rowVirtualizer = createVirtualizer({ + count: rows.length, + getScrollElement: () => parentRef, + estimateSize: (i) => rows[i], + overscan: 5, + lanes: 4, + }) + + return ( + <> +
+
+ + {(virtualRow) => ( +
+ Row {virtualRow.index} +
+ )} +
+
+
+ + ) +} + +function MasonryHorizontalVirtualizerVariable() { + let parentRef!: HTMLDivElement + + const columnVirtualizer = createVirtualizer({ + horizontal: true, + count: columns.length, + getScrollElement: () => parentRef, + estimateSize: (i) => columns[i], + overscan: 5, + lanes: 4, + }) + + return ( + <> +
+
+ + {(virtualColumn) => ( +
+ Column {virtualColumn.index} +
+ )} +
+
+
+ + ) +} + +export default App diff --git a/examples/solid/variable/src/index.css b/examples/solid/variable/src/index.css new file mode 100644 index 00000000..c46155fa --- /dev/null +++ b/examples/solid/variable/src/index.css @@ -0,0 +1,28 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +body { + padding: 1rem; +} + +.List { + border: 1px solid #e6e4dc; + max-width: 100%; +} + +.ListItemEven, +.ListItemOdd { + display: flex; + align-items: center; + justify-content: center; +} + +.ListItemEven { + background-color: #e6e4dc; +} + +button { + border: 1px solid gray; +} diff --git a/examples/solid/variable/src/index.tsx b/examples/solid/variable/src/index.tsx new file mode 100644 index 00000000..af7bf042 --- /dev/null +++ b/examples/solid/variable/src/index.tsx @@ -0,0 +1,9 @@ +/* @refresh reload */ +import { render } from 'solid-js/web' + +import './index.css' +import App from './App' + +const root = document.getElementById('root') + +render(() => , root!) diff --git a/examples/solid/variable/src/vite-env.d.ts b/examples/solid/variable/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/examples/solid/variable/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/solid/variable/tsconfig.json b/examples/solid/variable/tsconfig.json new file mode 100644 index 00000000..39999584 --- /dev/null +++ b/examples/solid/variable/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/examples/solid/variable/tsconfig.node.json b/examples/solid/variable/tsconfig.node.json new file mode 100644 index 00000000..42872c59 --- /dev/null +++ b/examples/solid/variable/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/examples/solid/variable/vite.config.ts b/examples/solid/variable/vite.config.ts new file mode 100644 index 00000000..4095d9be --- /dev/null +++ b/examples/solid/variable/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import solid from 'vite-plugin-solid' + +export default defineConfig({ + plugins: [solid()], +}) From a7c9032216e18368306b59afaa141ca8541b8f7b Mon Sep 17 00:00:00 2001 From: nikec Date: Fri, 19 Jan 2024 01:07:54 +0100 Subject: [PATCH 04/21] padding example --- examples/solid/padding/.gitignore | 24 +++ examples/solid/padding/README.md | 6 + examples/solid/padding/index.html | 13 ++ examples/solid/padding/package.json | 20 +++ examples/solid/padding/public/vite.svg | 1 + examples/solid/padding/src/App.tsx | 206 ++++++++++++++++++++++ examples/solid/padding/src/index.css | 28 +++ examples/solid/padding/src/index.tsx | 9 + examples/solid/padding/src/vite-env.d.ts | 1 + examples/solid/padding/tsconfig.json | 26 +++ examples/solid/padding/tsconfig.node.json | 10 ++ examples/solid/padding/vite.config.ts | 6 + 12 files changed, 350 insertions(+) create mode 100644 examples/solid/padding/.gitignore create mode 100644 examples/solid/padding/README.md create mode 100644 examples/solid/padding/index.html create mode 100644 examples/solid/padding/package.json create mode 100644 examples/solid/padding/public/vite.svg create mode 100644 examples/solid/padding/src/App.tsx create mode 100644 examples/solid/padding/src/index.css create mode 100644 examples/solid/padding/src/index.tsx create mode 100644 examples/solid/padding/src/vite-env.d.ts create mode 100644 examples/solid/padding/tsconfig.json create mode 100644 examples/solid/padding/tsconfig.node.json create mode 100644 examples/solid/padding/vite.config.ts diff --git a/examples/solid/padding/.gitignore b/examples/solid/padding/.gitignore new file mode 100644 index 00000000..a547bf36 --- /dev/null +++ b/examples/solid/padding/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/examples/solid/padding/README.md b/examples/solid/padding/README.md new file mode 100644 index 00000000..b168d3c4 --- /dev/null +++ b/examples/solid/padding/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run start` or `yarn start` diff --git a/examples/solid/padding/index.html b/examples/solid/padding/index.html new file mode 100644 index 00000000..70217370 --- /dev/null +++ b/examples/solid/padding/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + Solid + TS + + +
+ + + diff --git a/examples/solid/padding/package.json b/examples/solid/padding/package.json new file mode 100644 index 00000000..318997a1 --- /dev/null +++ b/examples/solid/padding/package.json @@ -0,0 +1,20 @@ +{ + "name": "padding", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@tanstack/solid-virtual": "3.0.1", + "solid-js": "^1.8.7" + }, + "devDependencies": { + "typescript": "^5.2.2", + "vite": "^5.0.8", + "vite-plugin-solid": "^2.8.0" + } +} diff --git a/examples/solid/padding/public/vite.svg b/examples/solid/padding/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/examples/solid/padding/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/solid/padding/src/App.tsx b/examples/solid/padding/src/App.tsx new file mode 100644 index 00000000..2a04e774 --- /dev/null +++ b/examples/solid/padding/src/App.tsx @@ -0,0 +1,206 @@ +import { createVirtualizer } from '@tanstack/solid-virtual' +import { For } from 'solid-js' + +function App() { + return ( +
+

+ Examples with additional padding applied to the start + and the end of the scrolling area. +

+
+
+ +

Rows

+ +
+
+

Columns

+ +
+
+

Grid

+ +
+ ) +} + +function RowVirtualizerPadding() { + let parentRef!: HTMLDivElement + + const rowVirtualizer = createVirtualizer({ + count: 10000, + getScrollElement: () => parentRef, + estimateSize: () => 35, + paddingStart: 100, + paddingEnd: 100, + }) + + return ( + <> +
+
+ + {(virtualRow) => ( +
+ Row {virtualRow.index} +
+ )} +
+
+
+ + ) +} + +function ColumnVirtualizerPadding() { + let parentRef!: HTMLDivElement + + const columnVirtualizer = createVirtualizer({ + horizontal: true, + count: 10000, + getScrollElement: () => parentRef, + estimateSize: () => 100, + paddingStart: 100, + paddingEnd: 100, + }) + + return ( + <> +
+
+ + {(virtualColumn) => ( +
+ Column {virtualColumn.index} +
+ )} +
+
+
+ + ) +} + +function GridVirtualizerPadding() { + let parentRef!: HTMLDivElement + + const rowVirtualizer = createVirtualizer({ + count: 10000, + getScrollElement: () => parentRef, + estimateSize: () => 35, + paddingStart: 100, + paddingEnd: 100, + }) + + const columnVirtualizer = createVirtualizer({ + horizontal: true, + count: 10000, + getScrollElement: () => parentRef, + estimateSize: () => 100, + paddingStart: 100, + paddingEnd: 100, + }) + + return ( + <> +
+
+ + {(virtualRow) => ( + + {(virtualColumn) => ( +
+ Cell {virtualRow.index}, {virtualColumn.index} +
+ )} +
+ )} +
+
+
+ + ) +} + +export default App diff --git a/examples/solid/padding/src/index.css b/examples/solid/padding/src/index.css new file mode 100644 index 00000000..c46155fa --- /dev/null +++ b/examples/solid/padding/src/index.css @@ -0,0 +1,28 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +body { + padding: 1rem; +} + +.List { + border: 1px solid #e6e4dc; + max-width: 100%; +} + +.ListItemEven, +.ListItemOdd { + display: flex; + align-items: center; + justify-content: center; +} + +.ListItemEven { + background-color: #e6e4dc; +} + +button { + border: 1px solid gray; +} diff --git a/examples/solid/padding/src/index.tsx b/examples/solid/padding/src/index.tsx new file mode 100644 index 00000000..af7bf042 --- /dev/null +++ b/examples/solid/padding/src/index.tsx @@ -0,0 +1,9 @@ +/* @refresh reload */ +import { render } from 'solid-js/web' + +import './index.css' +import App from './App' + +const root = document.getElementById('root') + +render(() => , root!) diff --git a/examples/solid/padding/src/vite-env.d.ts b/examples/solid/padding/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/examples/solid/padding/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/solid/padding/tsconfig.json b/examples/solid/padding/tsconfig.json new file mode 100644 index 00000000..39999584 --- /dev/null +++ b/examples/solid/padding/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/examples/solid/padding/tsconfig.node.json b/examples/solid/padding/tsconfig.node.json new file mode 100644 index 00000000..42872c59 --- /dev/null +++ b/examples/solid/padding/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/examples/solid/padding/vite.config.ts b/examples/solid/padding/vite.config.ts new file mode 100644 index 00000000..4095d9be --- /dev/null +++ b/examples/solid/padding/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import solid from 'vite-plugin-solid' + +export default defineConfig({ + plugins: [solid()], +}) From b3026282504adf44ebd70ad8eec860cd987e1d5e Mon Sep 17 00:00:00 2001 From: nikec Date: Fri, 19 Jan 2024 01:36:19 +0100 Subject: [PATCH 05/21] smooth scroll example --- examples/solid/smooth-scroll/.gitignore | 24 ++++ examples/solid/smooth-scroll/README.md | 6 + examples/solid/smooth-scroll/index.html | 13 ++ examples/solid/smooth-scroll/package.json | 20 +++ examples/solid/smooth-scroll/public/vite.svg | 1 + examples/solid/smooth-scroll/src/App.tsx | 125 ++++++++++++++++++ examples/solid/smooth-scroll/src/index.css | 28 ++++ examples/solid/smooth-scroll/src/index.tsx | 9 ++ .../solid/smooth-scroll/src/vite-env.d.ts | 1 + examples/solid/smooth-scroll/tsconfig.json | 26 ++++ .../solid/smooth-scroll/tsconfig.node.json | 10 ++ examples/solid/smooth-scroll/vite.config.ts | 6 + 12 files changed, 269 insertions(+) create mode 100644 examples/solid/smooth-scroll/.gitignore create mode 100644 examples/solid/smooth-scroll/README.md create mode 100644 examples/solid/smooth-scroll/index.html create mode 100644 examples/solid/smooth-scroll/package.json create mode 100644 examples/solid/smooth-scroll/public/vite.svg create mode 100644 examples/solid/smooth-scroll/src/App.tsx create mode 100644 examples/solid/smooth-scroll/src/index.css create mode 100644 examples/solid/smooth-scroll/src/index.tsx create mode 100644 examples/solid/smooth-scroll/src/vite-env.d.ts create mode 100644 examples/solid/smooth-scroll/tsconfig.json create mode 100644 examples/solid/smooth-scroll/tsconfig.node.json create mode 100644 examples/solid/smooth-scroll/vite.config.ts diff --git a/examples/solid/smooth-scroll/.gitignore b/examples/solid/smooth-scroll/.gitignore new file mode 100644 index 00000000..a547bf36 --- /dev/null +++ b/examples/solid/smooth-scroll/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/examples/solid/smooth-scroll/README.md b/examples/solid/smooth-scroll/README.md new file mode 100644 index 00000000..b168d3c4 --- /dev/null +++ b/examples/solid/smooth-scroll/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run start` or `yarn start` diff --git a/examples/solid/smooth-scroll/index.html b/examples/solid/smooth-scroll/index.html new file mode 100644 index 00000000..70217370 --- /dev/null +++ b/examples/solid/smooth-scroll/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + Solid + TS + + +
+ + + diff --git a/examples/solid/smooth-scroll/package.json b/examples/solid/smooth-scroll/package.json new file mode 100644 index 00000000..9e4c2eb7 --- /dev/null +++ b/examples/solid/smooth-scroll/package.json @@ -0,0 +1,20 @@ +{ + "name": "smooth-scroll", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@tanstack/solid-virtual": "3.0.1", + "solid-js": "^1.8.7" + }, + "devDependencies": { + "typescript": "^5.2.2", + "vite": "^5.0.8", + "vite-plugin-solid": "^2.8.0" + } +} diff --git a/examples/solid/smooth-scroll/public/vite.svg b/examples/solid/smooth-scroll/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/examples/solid/smooth-scroll/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/solid/smooth-scroll/src/App.tsx b/examples/solid/smooth-scroll/src/App.tsx new file mode 100644 index 00000000..b38a292a --- /dev/null +++ b/examples/solid/smooth-scroll/src/App.tsx @@ -0,0 +1,125 @@ +import { + VirtualizerOptions, + createVirtualizer, + elementScroll, +} from '@tanstack/solid-virtual' +import { For, createSignal } from 'solid-js' + +function App() { + return ( +
+

+ This smooth scroll example uses the `scrollToFn` to + implement a custom scrolling function for the methods like{' '} + `scrollToIndex` and `scrollToOffset` +

+
+
+ + +
+ ) +} + +function easeInOutQuint(t: number) { + return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t +} + +function generateRandomIndex() { + return Math.floor(Math.random() * 10000) +} + +function RowVirtualizer() { + let parentRef!: HTMLDivElement + let scrollingRef!: number + + const scrollToFn: VirtualizerOptions['scrollToFn'] = ( + offset, + canSmooth, + instance, + ) => { + const duration = 1000 + const start = parentRef?.scrollTop + const startTime = (scrollingRef = Date.now()) + + const run = () => { + if (scrollingRef !== startTime) return + const now = Date.now() + const elapsed = now - startTime + const progress = easeInOutQuint(Math.min(elapsed / duration, 1)) + const interpolated = start + (offset - start) * progress + + if (elapsed < duration) { + elementScroll(interpolated, canSmooth, instance) + requestAnimationFrame(run) + } else { + elementScroll(interpolated, canSmooth, instance) + } + } + + requestAnimationFrame(run) + } + + const rowVirtualizer = createVirtualizer({ + count: 10000, + getScrollElement: () => parentRef, + estimateSize: () => 35, + scrollToFn, + }) + + const [randomIndex, setRandomIndex] = createSignal(generateRandomIndex()) + + return ( + <> +
+ +
+
+
+
+
+ + {(virtualRow) => ( +
+ Row {virtualRow.index} +
+ )} +
+
+
+ + ) +} + +export default App diff --git a/examples/solid/smooth-scroll/src/index.css b/examples/solid/smooth-scroll/src/index.css new file mode 100644 index 00000000..c46155fa --- /dev/null +++ b/examples/solid/smooth-scroll/src/index.css @@ -0,0 +1,28 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +body { + padding: 1rem; +} + +.List { + border: 1px solid #e6e4dc; + max-width: 100%; +} + +.ListItemEven, +.ListItemOdd { + display: flex; + align-items: center; + justify-content: center; +} + +.ListItemEven { + background-color: #e6e4dc; +} + +button { + border: 1px solid gray; +} diff --git a/examples/solid/smooth-scroll/src/index.tsx b/examples/solid/smooth-scroll/src/index.tsx new file mode 100644 index 00000000..af7bf042 --- /dev/null +++ b/examples/solid/smooth-scroll/src/index.tsx @@ -0,0 +1,9 @@ +/* @refresh reload */ +import { render } from 'solid-js/web' + +import './index.css' +import App from './App' + +const root = document.getElementById('root') + +render(() => , root!) diff --git a/examples/solid/smooth-scroll/src/vite-env.d.ts b/examples/solid/smooth-scroll/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/examples/solid/smooth-scroll/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/solid/smooth-scroll/tsconfig.json b/examples/solid/smooth-scroll/tsconfig.json new file mode 100644 index 00000000..39999584 --- /dev/null +++ b/examples/solid/smooth-scroll/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/examples/solid/smooth-scroll/tsconfig.node.json b/examples/solid/smooth-scroll/tsconfig.node.json new file mode 100644 index 00000000..42872c59 --- /dev/null +++ b/examples/solid/smooth-scroll/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/examples/solid/smooth-scroll/vite.config.ts b/examples/solid/smooth-scroll/vite.config.ts new file mode 100644 index 00000000..4095d9be --- /dev/null +++ b/examples/solid/smooth-scroll/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import solid from 'vite-plugin-solid' + +export default defineConfig({ + plugins: [solid()], +}) From ee36c747ad2bd4ade24f36ac1bb2831ee78478a4 Mon Sep 17 00:00:00 2001 From: nikec Date: Sat, 27 Jan 2024 14:44:05 +0100 Subject: [PATCH 06/21] window --- examples/solid/window/.gitignore | 24 +++++++++ examples/solid/window/README.md | 6 +++ examples/solid/window/index.html | 13 +++++ examples/solid/window/package.json | 20 +++++++ examples/solid/window/public/vite.svg | 1 + examples/solid/window/src/App.tsx | 68 ++++++++++++++++++++++++ examples/solid/window/src/index.css | 28 ++++++++++ examples/solid/window/src/index.tsx | 9 ++++ examples/solid/window/src/vite-env.d.ts | 1 + examples/solid/window/tsconfig.json | 26 +++++++++ examples/solid/window/tsconfig.node.json | 10 ++++ examples/solid/window/vite.config.ts | 6 +++ 12 files changed, 212 insertions(+) create mode 100644 examples/solid/window/.gitignore create mode 100644 examples/solid/window/README.md create mode 100644 examples/solid/window/index.html create mode 100644 examples/solid/window/package.json create mode 100644 examples/solid/window/public/vite.svg create mode 100644 examples/solid/window/src/App.tsx create mode 100644 examples/solid/window/src/index.css create mode 100644 examples/solid/window/src/index.tsx create mode 100644 examples/solid/window/src/vite-env.d.ts create mode 100644 examples/solid/window/tsconfig.json create mode 100644 examples/solid/window/tsconfig.node.json create mode 100644 examples/solid/window/vite.config.ts diff --git a/examples/solid/window/.gitignore b/examples/solid/window/.gitignore new file mode 100644 index 00000000..a547bf36 --- /dev/null +++ b/examples/solid/window/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/examples/solid/window/README.md b/examples/solid/window/README.md new file mode 100644 index 00000000..b168d3c4 --- /dev/null +++ b/examples/solid/window/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run start` or `yarn start` diff --git a/examples/solid/window/index.html b/examples/solid/window/index.html new file mode 100644 index 00000000..70217370 --- /dev/null +++ b/examples/solid/window/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + Solid + TS + + +
+ + + diff --git a/examples/solid/window/package.json b/examples/solid/window/package.json new file mode 100644 index 00000000..0c4cb32d --- /dev/null +++ b/examples/solid/window/package.json @@ -0,0 +1,20 @@ +{ + "name": "window", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@tanstack/solid-virtual": "3.0.1", + "solid-js": "^1.8.7" + }, + "devDependencies": { + "typescript": "^5.2.2", + "vite": "^5.0.8", + "vite-plugin-solid": "^2.8.0" + } +} diff --git a/examples/solid/window/public/vite.svg b/examples/solid/window/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/examples/solid/window/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/solid/window/src/App.tsx b/examples/solid/window/src/App.tsx new file mode 100644 index 00000000..38b5bee1 --- /dev/null +++ b/examples/solid/window/src/App.tsx @@ -0,0 +1,68 @@ +import { createWindowVirtualizer } from '@tanstack/solid-virtual' +import { For, createSignal, onMount } from 'solid-js' + +function App() { + return ( +
+

+ In many cases, when implementing a virtualizer with a window as the + scrolling element, developers often find the need to specify a + "scrollMargin." The scroll margin is a crucial setting that defines the + space or gap between the start of the page and the edges of the list. +

+
+
+

Window scroller

+ +
+ ) +} + +function Example() { + let listRef!: HTMLDivElement + + const [scrollMargin, setScrollMargin] = createSignal(0) + onMount(() => setScrollMargin(listRef.offsetTop)) + + const virtualizer = createWindowVirtualizer({ + count: 10000, + estimateSize: () => 35, + get scrollMargin() { + return scrollMargin() + }, + }) + + return ( +
+
+ + {(virtualRow) => ( +
+ Row {virtualRow.index} +
+ )} +
+
+
+ ) +} + +export default App diff --git a/examples/solid/window/src/index.css b/examples/solid/window/src/index.css new file mode 100644 index 00000000..c46155fa --- /dev/null +++ b/examples/solid/window/src/index.css @@ -0,0 +1,28 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +body { + padding: 1rem; +} + +.List { + border: 1px solid #e6e4dc; + max-width: 100%; +} + +.ListItemEven, +.ListItemOdd { + display: flex; + align-items: center; + justify-content: center; +} + +.ListItemEven { + background-color: #e6e4dc; +} + +button { + border: 1px solid gray; +} diff --git a/examples/solid/window/src/index.tsx b/examples/solid/window/src/index.tsx new file mode 100644 index 00000000..af7bf042 --- /dev/null +++ b/examples/solid/window/src/index.tsx @@ -0,0 +1,9 @@ +/* @refresh reload */ +import { render } from 'solid-js/web' + +import './index.css' +import App from './App' + +const root = document.getElementById('root') + +render(() => , root!) diff --git a/examples/solid/window/src/vite-env.d.ts b/examples/solid/window/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/examples/solid/window/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/solid/window/tsconfig.json b/examples/solid/window/tsconfig.json new file mode 100644 index 00000000..39999584 --- /dev/null +++ b/examples/solid/window/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/examples/solid/window/tsconfig.node.json b/examples/solid/window/tsconfig.node.json new file mode 100644 index 00000000..42872c59 --- /dev/null +++ b/examples/solid/window/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/examples/solid/window/vite.config.ts b/examples/solid/window/vite.config.ts new file mode 100644 index 00000000..4095d9be --- /dev/null +++ b/examples/solid/window/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import solid from 'vite-plugin-solid' + +export default defineConfig({ + plugins: [solid()], +}) From 2250535dfc09f7af03e2b59e687d619336fcc7ee Mon Sep 17 00:00:00 2001 From: nikec Date: Sat, 27 Jan 2024 15:15:30 +0100 Subject: [PATCH 07/21] update smooth scroll --- examples/solid/smooth-scroll/src/App.tsx | 55 +++++++++++++----------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/examples/solid/smooth-scroll/src/App.tsx b/examples/solid/smooth-scroll/src/App.tsx index b38a292a..afbb69cb 100644 --- a/examples/solid/smooth-scroll/src/App.tsx +++ b/examples/solid/smooth-scroll/src/App.tsx @@ -3,7 +3,7 @@ import { createVirtualizer, elementScroll, } from '@tanstack/solid-virtual' -import { For, createSignal } from 'solid-js' +import { For, createSignal, onMount } from 'solid-js' function App() { return ( @@ -31,40 +31,43 @@ function generateRandomIndex() { function RowVirtualizer() { let parentRef!: HTMLDivElement - let scrollingRef!: number + let time = Date.now() - const scrollToFn: VirtualizerOptions['scrollToFn'] = ( - offset, - canSmooth, - instance, - ) => { - const duration = 1000 - const start = parentRef?.scrollTop - const startTime = (scrollingRef = Date.now()) + const [scrollToFn, setScrollToFn] = + createSignal['scrollToFn']>() - const run = () => { - if (scrollingRef !== startTime) return - const now = Date.now() - const elapsed = now - startTime - const progress = easeInOutQuint(Math.min(elapsed / duration, 1)) - const interpolated = start + (offset - start) * progress + onMount(() => { + setScrollToFn(() => (offset, canSmooth, instance) => { + const duration = 1000 + const start = parentRef.scrollTop + const startTime = (time = Date.now()) - if (elapsed < duration) { - elementScroll(interpolated, canSmooth, instance) - requestAnimationFrame(run) - } else { - elementScroll(interpolated, canSmooth, instance) + const run = () => { + if (time !== startTime) return + const now = Date.now() + const elapsed = now - startTime + const progress = easeInOutQuint(Math.min(elapsed / duration, 1)) + const interpolated = start + (offset - start) * progress + + if (elapsed < duration) { + elementScroll(interpolated, canSmooth, instance) + requestAnimationFrame(run) + } else { + elementScroll(interpolated, canSmooth, instance) + } } - } - requestAnimationFrame(run) - } + requestAnimationFrame(run) + }) + }) const rowVirtualizer = createVirtualizer({ count: 10000, getScrollElement: () => parentRef, estimateSize: () => 35, - scrollToFn, + get scrollToFn() { + return scrollToFn() + }, }) const [randomIndex, setRandomIndex] = createSignal(generateRandomIndex()) @@ -75,7 +78,7 @@ function RowVirtualizer() { + + + +
+
+ +
+ + + + + + + + + + {(virtualRow) => ( + + + + + )} + + +
IndexKey
{virtualRow.index}{virtualRow.key}
+
+ + ) +} + +export default App diff --git a/examples/solid/scroll-padding/src/index.css b/examples/solid/scroll-padding/src/index.css new file mode 100644 index 00000000..9b04143e --- /dev/null +++ b/examples/solid/scroll-padding/src/index.css @@ -0,0 +1,48 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +.List table { + background-color: #fff; + border: 1px solid #e6e4dc; + max-width: 100%; + border-collapse: collapse; + + display: flex; + flex-direction: column; + align-items: stretch; + position: relative; +} + +.List thead { + display: flex; + flex-direction: column; + background-color: #fff; + + position: sticky; + top: 0; + z-index: 1; +} + +.List thead tr { + height: 70px; +} + +.List tr { + display: flex; + flex-direction: row; +} + +.List td, +.List th { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + width: 180px; +} + +.ListItemEven { + background-color: #e6e4dc; +} diff --git a/examples/solid/scroll-padding/src/index.tsx b/examples/solid/scroll-padding/src/index.tsx new file mode 100644 index 00000000..af7bf042 --- /dev/null +++ b/examples/solid/scroll-padding/src/index.tsx @@ -0,0 +1,9 @@ +/* @refresh reload */ +import { render } from 'solid-js/web' + +import './index.css' +import App from './App' + +const root = document.getElementById('root') + +render(() => , root!) diff --git a/examples/solid/scroll-padding/src/vite-env.d.ts b/examples/solid/scroll-padding/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/examples/solid/scroll-padding/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/solid/scroll-padding/tsconfig.json b/examples/solid/scroll-padding/tsconfig.json new file mode 100644 index 00000000..39999584 --- /dev/null +++ b/examples/solid/scroll-padding/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/examples/solid/scroll-padding/tsconfig.node.json b/examples/solid/scroll-padding/tsconfig.node.json new file mode 100644 index 00000000..42872c59 --- /dev/null +++ b/examples/solid/scroll-padding/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/examples/solid/scroll-padding/vite.config.ts b/examples/solid/scroll-padding/vite.config.ts new file mode 100644 index 00000000..4095d9be --- /dev/null +++ b/examples/solid/scroll-padding/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import solid from 'vite-plugin-solid' + +export default defineConfig({ + plugins: [solid()], +}) From 3c862b6b33a113048069301b672621deb1b46a83 Mon Sep 17 00:00:00 2001 From: nikec Date: Sat, 27 Jan 2024 19:26:18 +0100 Subject: [PATCH 10/21] dynamic --- examples/solid/dynamic/.gitignore | 24 ++ examples/solid/dynamic/README.md | 6 + examples/solid/dynamic/index.html | 13 + examples/solid/dynamic/package.json | 21 ++ examples/solid/dynamic/public/vite.svg | 1 + examples/solid/dynamic/src/App.tsx | 388 ++++++++++++++++++++++ examples/solid/dynamic/src/index.css | 23 ++ examples/solid/dynamic/src/index.tsx | 9 + examples/solid/dynamic/src/vite-env.d.ts | 1 + examples/solid/dynamic/tsconfig.json | 26 ++ examples/solid/dynamic/tsconfig.node.json | 10 + examples/solid/dynamic/vite.config.ts | 6 + 12 files changed, 528 insertions(+) create mode 100644 examples/solid/dynamic/.gitignore create mode 100644 examples/solid/dynamic/README.md create mode 100644 examples/solid/dynamic/index.html create mode 100644 examples/solid/dynamic/package.json create mode 100644 examples/solid/dynamic/public/vite.svg create mode 100644 examples/solid/dynamic/src/App.tsx create mode 100644 examples/solid/dynamic/src/index.css create mode 100644 examples/solid/dynamic/src/index.tsx create mode 100644 examples/solid/dynamic/src/vite-env.d.ts create mode 100644 examples/solid/dynamic/tsconfig.json create mode 100644 examples/solid/dynamic/tsconfig.node.json create mode 100644 examples/solid/dynamic/vite.config.ts diff --git a/examples/solid/dynamic/.gitignore b/examples/solid/dynamic/.gitignore new file mode 100644 index 00000000..a547bf36 --- /dev/null +++ b/examples/solid/dynamic/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/examples/solid/dynamic/README.md b/examples/solid/dynamic/README.md new file mode 100644 index 00000000..b168d3c4 --- /dev/null +++ b/examples/solid/dynamic/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run start` or `yarn start` diff --git a/examples/solid/dynamic/index.html b/examples/solid/dynamic/index.html new file mode 100644 index 00000000..70217370 --- /dev/null +++ b/examples/solid/dynamic/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + Solid + TS + + +
+ + + diff --git a/examples/solid/dynamic/package.json b/examples/solid/dynamic/package.json new file mode 100644 index 00000000..7ca3179b --- /dev/null +++ b/examples/solid/dynamic/package.json @@ -0,0 +1,21 @@ +{ + "name": "dynamic", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@faker-js/faker": "7.6.0", + "@tanstack/solid-virtual": "3.0.1", + "solid-js": "^1.8.7" + }, + "devDependencies": { + "typescript": "^5.2.2", + "vite": "^5.0.8", + "vite-plugin-solid": "^2.8.0" + } +} diff --git a/examples/solid/dynamic/public/vite.svg b/examples/solid/dynamic/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/examples/solid/dynamic/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/solid/dynamic/src/App.tsx b/examples/solid/dynamic/src/App.tsx new file mode 100644 index 00000000..43455be5 --- /dev/null +++ b/examples/solid/dynamic/src/App.tsx @@ -0,0 +1,388 @@ +import { faker } from '@faker-js/faker' +import { + createVirtualizer, + createWindowVirtualizer, +} from '@tanstack/solid-virtual' +import { For, Show, createMemo, createSignal, onMount } from 'solid-js' + +const randomNumber = (min: number, max: number) => + faker.datatype.number({ min, max }) + +const sentences = new Array(10000) + .fill(true) + .map(() => faker.lorem.sentence(randomNumber(20, 70))) + +function App() { + const pathname = location.pathname + + return ( +
+

+ These components are using dynamic 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. +

+ + + + + + + + + + + + + +
+ ) +} + +function RowVirtualizerDynamic() { + let parentRef!: HTMLDivElement + + const count = sentences.length + + const virtualizer = createVirtualizer({ + count, + getScrollElement: () => parentRef, + estimateSize: () => 45, + }) + + const items = virtualizer.getVirtualItems() + + return ( +
+ + + + + +
+
+
+
+ + {(virtualRow) => { + let ref!: HTMLDivElement + onMount(() => virtualizer.measureElement(ref)) + + return ( +
+
+
Row {virtualRow.index}
+
{sentences[virtualRow.index]}
+
+
+ ) + }} +
+
+
+
+
+ ) +} + +function RowVirtualizerDynamicWindow() { + let listRef!: HTMLDivElement + + const [scrollMargin, setScrollMargin] = createSignal(0) + onMount(() => setScrollMargin(listRef.offsetTop)) + + const virtualizer = createWindowVirtualizer({ + count: sentences.length, + estimateSize: () => 45, + get scrollMargin() { + return scrollMargin() + }, + }) + + const items = virtualizer.getVirtualItems() + + return ( +
+
+ + {(virtualRow) => { + let ref!: HTMLDivElement + onMount(() => virtualizer.measureElement(ref)) + + return ( +
+
+
Row {virtualRow.index}
+
{sentences[virtualRow.index]}
+
+
+ ) + }} +
+
+
+ ) +} + +function ColumnVirtualizerDynamic() { + let parentRef!: HTMLDivElement + + const virtualizer = createVirtualizer({ + horizontal: true, + count: sentences.length, + getScrollElement: () => parentRef, + estimateSize: () => 45, + }) + + return ( +
+
+ + {(virtualColumn) => { + let ref!: HTMLDivElement + onMount(() => virtualizer.measureElement(ref)) + + return ( +
+
+
Column {virtualColumn.index}
+
{sentences[virtualColumn.index]}
+
+
+ ) + }} +
+
+
+ ) +} + +const generateColumns = (count: number) => { + return new Array(count).fill(0).map((_, i) => { + const key: string = i.toString() + return { + key, + name: `Column ${i}`, + width: randomNumber(75, 300), + } + }) +} + +const generateData = ( + columns: ReturnType, + count = 300, +) => { + return new Array(count).fill(0).map((_, rowIndex) => + columns.reduce((acc, _, colIndex) => { + // simulate dynamic size cells + const val = faker.lorem.lines(((rowIndex + colIndex) % 10) + 1) + + acc.push(val) + + return acc + }, []), + ) +} + +function GridVirtualizerVariable() { + let parentRef!: HTMLDivElement + + const [scrollMargin, setScrollMargin] = createSignal(0) + onMount(() => setScrollMargin(parentRef.offsetTop)) + + const columns = generateColumns(30) + const data = generateData(columns) + + const getColumnWidth = (index: number) => columns[index].width + + const virtualizer = createWindowVirtualizer({ + count: data.length, + estimateSize: () => 350, + overscan: 5, + get scrollMargin() { + return scrollMargin() + }, + }) + + const columnVirtualizer = createVirtualizer({ + horizontal: true, + count: columns.length, + getScrollElement: () => parentRef, + estimateSize: getColumnWidth, + overscan: 5, + }) + + const columnItems = columnVirtualizer.getVirtualItems() + + const position = createMemo(() => { + if (columnItems.length === 0) return [0, 0] + return [ + columnItems[0].start, + columnVirtualizer.getTotalSize() - + columnItems[columnItems.length - 1].end, + ] + }) + + return ( +
+
+ + {(row) => { + let ref!: HTMLDivElement + onMount(() => virtualizer.measureElement(ref)) + + return ( +
+
+ + {(column) => ( +
+ {columns[column.index].name}
} + > +
{data[row.index][column.index]}
+ +
+ )} + +
+
+ ) + }} + +
+
+ ) +} + +export default App diff --git a/examples/solid/dynamic/src/index.css b/examples/solid/dynamic/src/index.css new file mode 100644 index 00000000..f0ca336f --- /dev/null +++ b/examples/solid/dynamic/src/index.css @@ -0,0 +1,23 @@ +*, +*:before, +*:after { + box-sizing: border-box; +} + +html { + font-family: sans-serif; + font-size: 14px; +} + +body { + padding: 1rem; +} + +.List { + border: 1px solid #e6e4dc; + max-width: 100%; +} + +.ListItemEven { + background-color: #e6e4dc; +} diff --git a/examples/solid/dynamic/src/index.tsx b/examples/solid/dynamic/src/index.tsx new file mode 100644 index 00000000..af7bf042 --- /dev/null +++ b/examples/solid/dynamic/src/index.tsx @@ -0,0 +1,9 @@ +/* @refresh reload */ +import { render } from 'solid-js/web' + +import './index.css' +import App from './App' + +const root = document.getElementById('root') + +render(() => , root!) diff --git a/examples/solid/dynamic/src/vite-env.d.ts b/examples/solid/dynamic/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/examples/solid/dynamic/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/solid/dynamic/tsconfig.json b/examples/solid/dynamic/tsconfig.json new file mode 100644 index 00000000..39999584 --- /dev/null +++ b/examples/solid/dynamic/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/examples/solid/dynamic/tsconfig.node.json b/examples/solid/dynamic/tsconfig.node.json new file mode 100644 index 00000000..42872c59 --- /dev/null +++ b/examples/solid/dynamic/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/examples/solid/dynamic/vite.config.ts b/examples/solid/dynamic/vite.config.ts new file mode 100644 index 00000000..4095d9be --- /dev/null +++ b/examples/solid/dynamic/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import solid from 'vite-plugin-solid' + +export default defineConfig({ + plugins: [solid()], +}) From e11f8b190cec9873fd62ac1aeead0da246dd5bd5 Mon Sep 17 00:00:00 2001 From: nikec Date: Sat, 27 Jan 2024 20:09:31 +0100 Subject: [PATCH 11/21] sticky --- examples/solid/sticky/.gitignore | 24 ++++++ examples/solid/sticky/README.md | 6 ++ examples/solid/sticky/index.html | 13 +++ examples/solid/sticky/package.json | 23 ++++++ examples/solid/sticky/public/vite.svg | 1 + examples/solid/sticky/src/App.tsx | 101 +++++++++++++++++++++++ examples/solid/sticky/src/index.css | 13 +++ examples/solid/sticky/src/index.tsx | 9 ++ examples/solid/sticky/src/vite-env.d.ts | 1 + examples/solid/sticky/tsconfig.json | 26 ++++++ examples/solid/sticky/tsconfig.node.json | 10 +++ examples/solid/sticky/vite.config.ts | 6 ++ 12 files changed, 233 insertions(+) create mode 100644 examples/solid/sticky/.gitignore create mode 100644 examples/solid/sticky/README.md create mode 100644 examples/solid/sticky/index.html create mode 100644 examples/solid/sticky/package.json create mode 100644 examples/solid/sticky/public/vite.svg create mode 100644 examples/solid/sticky/src/App.tsx create mode 100644 examples/solid/sticky/src/index.css create mode 100644 examples/solid/sticky/src/index.tsx create mode 100644 examples/solid/sticky/src/vite-env.d.ts create mode 100644 examples/solid/sticky/tsconfig.json create mode 100644 examples/solid/sticky/tsconfig.node.json create mode 100644 examples/solid/sticky/vite.config.ts diff --git a/examples/solid/sticky/.gitignore b/examples/solid/sticky/.gitignore new file mode 100644 index 00000000..a547bf36 --- /dev/null +++ b/examples/solid/sticky/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/examples/solid/sticky/README.md b/examples/solid/sticky/README.md new file mode 100644 index 00000000..b168d3c4 --- /dev/null +++ b/examples/solid/sticky/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run start` or `yarn start` diff --git a/examples/solid/sticky/index.html b/examples/solid/sticky/index.html new file mode 100644 index 00000000..70217370 --- /dev/null +++ b/examples/solid/sticky/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + Solid + TS + + +
+ + + diff --git a/examples/solid/sticky/package.json b/examples/solid/sticky/package.json new file mode 100644 index 00000000..ac738e12 --- /dev/null +++ b/examples/solid/sticky/package.json @@ -0,0 +1,23 @@ +{ + "name": "sticky", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@faker-js/faker": "^8.4.0", + "@tanstack/solid-virtual": "3.0.1", + "lodash": "^4.17.21", + "solid-js": "^1.8.7" + }, + "devDependencies": { + "@types/lodash": "^4.14.202", + "typescript": "^5.2.2", + "vite": "^5.0.8", + "vite-plugin-solid": "^2.8.0" + } +} diff --git a/examples/solid/sticky/public/vite.svg b/examples/solid/sticky/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/examples/solid/sticky/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/solid/sticky/src/App.tsx b/examples/solid/sticky/src/App.tsx new file mode 100644 index 00000000..cf91d649 --- /dev/null +++ b/examples/solid/sticky/src/App.tsx @@ -0,0 +1,101 @@ +import { + createVirtualizer, + defaultRangeExtractor, +} from '@tanstack/solid-virtual' +import { For, createSignal } from 'solid-js' + +import { faker } from '@faker-js/faker' +import { findIndex, groupBy } from 'lodash' + +const groupedNames = groupBy( + Array.from({ length: 1000 }) + .map(() => faker.person.firstName()) + .sort(), + (name) => name[0], +) +const groups = Object.keys(groupedNames) +const rows = groups.reduce( + (acc, k) => [...acc, k, ...groupedNames[k]], + [] as string[], +) +const stickyIndexes = groups.map((gn) => findIndex(rows, (n) => n === gn)) + +const isSticky = (index: number) => stickyIndexes.includes(index) + +function App() { + let parentRef!: HTMLDivElement + + const [activeStickyIndex, setActiveStickyIndex] = createSignal(0) + + const rowVirtualizer = createVirtualizer({ + count: rows.length, + getScrollElement: () => parentRef, + estimateSize: () => 50, + overscan: 5, + rangeExtractor: (range) => { + const activeIndex = [...stickyIndexes] + .reverse() + .find((index) => range.startIndex >= index)! + + setActiveStickyIndex(activeIndex) + + const next = new Set([activeIndex, ...defaultRangeExtractor(range)]) + + return [...next].sort((a, b) => a - b) + }, + }) + + const isActiveSticky = (index: number) => activeStickyIndex() === index + + return ( +
+
+ + {(virtualRow) => { + return ( +
+ {rows[virtualRow.index]} +
+ ) + }} +
+
+
+ ) +} + +export default App diff --git a/examples/solid/sticky/src/index.css b/examples/solid/sticky/src/index.css new file mode 100644 index 00000000..f8f171b2 --- /dev/null +++ b/examples/solid/sticky/src/index.css @@ -0,0 +1,13 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +body { + padding: 1rem; +} + +.List { + border: 1px solid #e6e4dc; + max-width: 100%; +} diff --git a/examples/solid/sticky/src/index.tsx b/examples/solid/sticky/src/index.tsx new file mode 100644 index 00000000..af7bf042 --- /dev/null +++ b/examples/solid/sticky/src/index.tsx @@ -0,0 +1,9 @@ +/* @refresh reload */ +import { render } from 'solid-js/web' + +import './index.css' +import App from './App' + +const root = document.getElementById('root') + +render(() => , root!) diff --git a/examples/solid/sticky/src/vite-env.d.ts b/examples/solid/sticky/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/examples/solid/sticky/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/solid/sticky/tsconfig.json b/examples/solid/sticky/tsconfig.json new file mode 100644 index 00000000..39999584 --- /dev/null +++ b/examples/solid/sticky/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/examples/solid/sticky/tsconfig.node.json b/examples/solid/sticky/tsconfig.node.json new file mode 100644 index 00000000..42872c59 --- /dev/null +++ b/examples/solid/sticky/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/examples/solid/sticky/vite.config.ts b/examples/solid/sticky/vite.config.ts new file mode 100644 index 00000000..4095d9be --- /dev/null +++ b/examples/solid/sticky/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import solid from 'vite-plugin-solid' + +export default defineConfig({ + plugins: [solid()], +}) From a189587673a7656d7934a373cb1b3cdc7a4de665 Mon Sep 17 00:00:00 2001 From: nikec Date: Sat, 27 Jan 2024 21:50:10 +0100 Subject: [PATCH 12/21] table --- examples/solid/table/.gitignore | 24 ++++ examples/solid/table/README.md | 6 + examples/solid/table/index.html | 13 ++ examples/solid/table/package.json | 22 ++++ examples/solid/table/public/vite.svg | 1 + examples/solid/table/src/App.tsx | 167 ++++++++++++++++++++++++ examples/solid/table/src/index.css | 20 +++ examples/solid/table/src/index.tsx | 9 ++ examples/solid/table/src/makeData.ts | 50 +++++++ examples/solid/table/src/vite-env.d.ts | 1 + examples/solid/table/tsconfig.json | 26 ++++ examples/solid/table/tsconfig.node.json | 10 ++ examples/solid/table/vite.config.ts | 6 + 13 files changed, 355 insertions(+) create mode 100644 examples/solid/table/.gitignore create mode 100644 examples/solid/table/README.md create mode 100644 examples/solid/table/index.html create mode 100644 examples/solid/table/package.json create mode 100644 examples/solid/table/public/vite.svg create mode 100644 examples/solid/table/src/App.tsx create mode 100644 examples/solid/table/src/index.css create mode 100644 examples/solid/table/src/index.tsx create mode 100644 examples/solid/table/src/makeData.ts create mode 100644 examples/solid/table/src/vite-env.d.ts create mode 100644 examples/solid/table/tsconfig.json create mode 100644 examples/solid/table/tsconfig.node.json create mode 100644 examples/solid/table/vite.config.ts diff --git a/examples/solid/table/.gitignore b/examples/solid/table/.gitignore new file mode 100644 index 00000000..a547bf36 --- /dev/null +++ b/examples/solid/table/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/examples/solid/table/README.md b/examples/solid/table/README.md new file mode 100644 index 00000000..b168d3c4 --- /dev/null +++ b/examples/solid/table/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run start` or `yarn start` diff --git a/examples/solid/table/index.html b/examples/solid/table/index.html new file mode 100644 index 00000000..70217370 --- /dev/null +++ b/examples/solid/table/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + Solid + TS + + +
+ + + diff --git a/examples/solid/table/package.json b/examples/solid/table/package.json new file mode 100644 index 00000000..863b1dbc --- /dev/null +++ b/examples/solid/table/package.json @@ -0,0 +1,22 @@ +{ + "name": "table", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@faker-js/faker": "^8.4.0", + "@tanstack/solid-table": "^8.11.7", + "@tanstack/solid-virtual": "3.0.1", + "solid-js": "^1.8.7" + }, + "devDependencies": { + "typescript": "^5.2.2", + "vite": "^5.0.8", + "vite-plugin-solid": "^2.8.0" + } +} diff --git a/examples/solid/table/public/vite.svg b/examples/solid/table/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/examples/solid/table/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/solid/table/src/App.tsx b/examples/solid/table/src/App.tsx new file mode 100644 index 00000000..81a523a2 --- /dev/null +++ b/examples/solid/table/src/App.tsx @@ -0,0 +1,167 @@ +import { + ColumnDef, + createSolidTable, + flexRender, + getCoreRowModel, + getSortedRowModel, + SortingState, +} from '@tanstack/solid-table' +import { createVirtualizer } from '@tanstack/solid-virtual' +import { createMemo, createSignal, For, Show } from 'solid-js' +import { makeData, Person } from './makeData' + +const data = makeData(50_000) + +const columns: ColumnDef[] = [ + { + accessorKey: 'id', + header: 'ID', + size: 60, + }, + { + accessorKey: 'firstName', + cell: (info) => info.getValue(), + }, + { + accessorFn: (row) => row.lastName, + id: 'lastName', + cell: (info) => info.getValue(), + header: () => 'Last Name', + }, + { + accessorKey: 'age', + header: () => 'Age', + size: 50, + }, + { + accessorKey: 'visits', + header: () => 'Visits', + size: 50, + }, + { + accessorKey: 'status', + header: 'Status', + }, + { + accessorKey: 'progress', + header: 'Profile Progress', + size: 80, + }, + { + accessorKey: 'createdAt', + header: 'Created At', + cell: (info) => info.getValue().toLocaleString(), + }, +] + +function App() { + const [sorting, setSorting] = createSignal([]) + + const table = createSolidTable({ + data, + columns, + state: { + get sorting() { + return sorting() + }, + }, + onSortingChange: setSorting, + getCoreRowModel: getCoreRowModel(), + getSortedRowModel: getSortedRowModel(), + debugTable: true, + }) + + let parentRef!: HTMLDivElement + + const rows = createMemo(() => table.getRowModel().rows) + + const rowVirtualizer = createVirtualizer({ + get count() { + return rows().length + }, + getScrollElement: () => parentRef, + estimateSize: () => 34, + overscan: 5, + }) + + return ( +
+

+ 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. +

+ +
+
+ + + + {(headerGroup) => ( + + + {(header) => ( + + )} + + + )} + + + + + {(virtualRow, index) => ( + + + {(cell) => ( + + )} + + + )} + + +
+ +
+ {flexRender( + header.column.columnDef.header, + header.getContext(), + )} + {{ + asc: ' 🔼', + desc: ' 🔽', + }[header.column.getIsSorted() as string] ?? null} +
+
+
+ {flexRender( + cell.column.columnDef.cell, + cell.getContext(), + )} +
+
+
+
+ ) +} + +export default App diff --git a/examples/solid/table/src/index.css b/examples/solid/table/src/index.css new file mode 100644 index 00000000..92080981 --- /dev/null +++ b/examples/solid/table/src/index.css @@ -0,0 +1,20 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +body { + padding: 1rem; +} + +.cursor-pointer { + cursor: pointer; +} + +.select-none { + user-select: none; +} + +.text-left { + text-align: left; +} diff --git a/examples/solid/table/src/index.tsx b/examples/solid/table/src/index.tsx new file mode 100644 index 00000000..af7bf042 --- /dev/null +++ b/examples/solid/table/src/index.tsx @@ -0,0 +1,9 @@ +/* @refresh reload */ +import { render } from 'solid-js/web' + +import './index.css' +import App from './App' + +const root = document.getElementById('root') + +render(() => , root!) diff --git a/examples/solid/table/src/makeData.ts b/examples/solid/table/src/makeData.ts new file mode 100644 index 00000000..7e5f966d --- /dev/null +++ b/examples/solid/table/src/makeData.ts @@ -0,0 +1,50 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + id: number + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + createdAt: Date +} + +const range = (len: number) => { + const arr: number[] = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (index: number): Person => { + return { + id: index + 1, + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + createdAt: faker.date.past({ refDate: new Date().getTime() }), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, + } +} + +export function makeData(...lens: number[]) { + const makeDataLevel = (depth = 0): Person[] => { + const len = lens[depth]! + return range(len).map((d): Person => { + return { + ...newPerson(d), + } + }) + } + + return makeDataLevel() +} diff --git a/examples/solid/table/src/vite-env.d.ts b/examples/solid/table/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/examples/solid/table/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/solid/table/tsconfig.json b/examples/solid/table/tsconfig.json new file mode 100644 index 00000000..39999584 --- /dev/null +++ b/examples/solid/table/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/examples/solid/table/tsconfig.node.json b/examples/solid/table/tsconfig.node.json new file mode 100644 index 00000000..42872c59 --- /dev/null +++ b/examples/solid/table/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/examples/solid/table/vite.config.ts b/examples/solid/table/vite.config.ts new file mode 100644 index 00000000..4095d9be --- /dev/null +++ b/examples/solid/table/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import solid from 'vite-plugin-solid' + +export default defineConfig({ + plugins: [solid()], +}) From 3ca702826edae43bc6210f7e7ec87b63743f02fa Mon Sep 17 00:00:00 2001 From: nikec Date: Sat, 27 Jan 2024 23:21:58 +0100 Subject: [PATCH 13/21] apply text-left --- examples/solid/table/src/App.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/solid/table/src/App.tsx b/examples/solid/table/src/App.tsx index 81a523a2..3cd41a11 100644 --- a/examples/solid/table/src/App.tsx +++ b/examples/solid/table/src/App.tsx @@ -108,11 +108,11 @@ function App() { >
{flexRender( From fd983c848881b818f69b7b72cee7099c6796a359 Mon Sep 17 00:00:00 2001 From: nikec Date: Sat, 27 Jan 2024 23:29:17 +0100 Subject: [PATCH 14/21] Lets be consistent --- examples/solid/fixed/src/App.tsx | 12 ++++++------ examples/solid/variable/src/App.tsx | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/examples/solid/fixed/src/App.tsx b/examples/solid/fixed/src/App.tsx index aea023cf..b22504e9 100644 --- a/examples/solid/fixed/src/App.tsx +++ b/examples/solid/fixed/src/App.tsx @@ -42,8 +42,8 @@ function RowVirtualizerFixed() { ref={parentRef} class="List" style={{ - height: `200px`, - width: `400px`, + height: '200px', + width: '400px', overflow: 'auto', }} > @@ -94,8 +94,8 @@ function ColumnVirtualizerFixed() { ref={parentRef} class="List" style={{ - width: `400px`, - height: `100px`, + width: '400px', + height: '100px', overflow: 'auto', }} > @@ -153,8 +153,8 @@ function GridVirtualizerFixed() { ref={parentRef} class="List" style={{ - height: `500px`, - width: `500px`, + height: '500px', + width: '500px', overflow: 'auto', }} > diff --git a/examples/solid/variable/src/App.tsx b/examples/solid/variable/src/App.tsx index 43202adb..2fa77318 100644 --- a/examples/solid/variable/src/App.tsx +++ b/examples/solid/variable/src/App.tsx @@ -57,8 +57,8 @@ function RowVirtualizerVariable() { ref={parentRef} class="List" style={{ - height: `200px`, - width: `400px`, + height: '200px', + width: '400px', overflow: 'auto', }} > @@ -109,8 +109,8 @@ function ColumnVirtualizerVariable() { ref={parentRef} class="List" style={{ - width: `400px`, - height: `100px`, + width: '400px', + height: '100px', overflow: 'auto', }} > @@ -168,8 +168,8 @@ function GridVirtualizerVariable() { ref={parentRef} class="List" style={{ - height: `400px`, - width: `500px`, + height: '400px', + width: '500px', overflow: 'auto', }} > @@ -232,8 +232,8 @@ function MasonryVerticalVirtualizerVariable() { ref={parentRef} class="List" style={{ - height: `200px`, - width: `400px`, + height: '200px', + width: '400px', overflow: 'auto', }} > @@ -285,8 +285,8 @@ function MasonryHorizontalVirtualizerVariable() { ref={parentRef} class="List" style={{ - width: `500px`, - height: `400px`, + width: '500px', + height: '400px', overflow: 'auto', }} > From 68282414c67e8a771cae23f0249069665a19c6ab Mon Sep 17 00:00:00 2001 From: nikec Date: Sat, 27 Jan 2024 23:32:59 +0100 Subject: [PATCH 15/21] update vite --- examples/solid/dynamic/package.json | 4 ++-- examples/solid/fixed/package.json | 4 ++-- examples/solid/infinite-scroll/package.json | 4 ++-- examples/solid/padding/package.json | 4 ++-- examples/solid/scroll-padding/package.json | 4 ++-- examples/solid/smooth-scroll/package.json | 4 ++-- examples/solid/sticky/package.json | 4 ++-- examples/solid/table/package.json | 4 ++-- examples/solid/variable/package.json | 4 ++-- examples/solid/window/package.json | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/solid/dynamic/package.json b/examples/solid/dynamic/package.json index 7ca3179b..e12510bc 100644 --- a/examples/solid/dynamic/package.json +++ b/examples/solid/dynamic/package.json @@ -15,7 +15,7 @@ }, "devDependencies": { "typescript": "^5.2.2", - "vite": "^5.0.8", - "vite-plugin-solid": "^2.8.0" + "vite": "^5.0.12", + "vite-plugin-solid": "^2.9.1" } } diff --git a/examples/solid/fixed/package.json b/examples/solid/fixed/package.json index e6961f96..359da138 100644 --- a/examples/solid/fixed/package.json +++ b/examples/solid/fixed/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "typescript": "^5.2.2", - "vite": "^5.0.8", - "vite-plugin-solid": "^2.8.0" + "vite": "^5.0.12", + "vite-plugin-solid": "^2.9.1" } } diff --git a/examples/solid/infinite-scroll/package.json b/examples/solid/infinite-scroll/package.json index 00968875..898a38d5 100644 --- a/examples/solid/infinite-scroll/package.json +++ b/examples/solid/infinite-scroll/package.json @@ -15,7 +15,7 @@ }, "devDependencies": { "typescript": "^5.2.2", - "vite": "^5.0.8", - "vite-plugin-solid": "^2.8.0" + "vite": "^5.0.12", + "vite-plugin-solid": "^2.9.1" } } diff --git a/examples/solid/padding/package.json b/examples/solid/padding/package.json index 318997a1..cfc010fa 100644 --- a/examples/solid/padding/package.json +++ b/examples/solid/padding/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "typescript": "^5.2.2", - "vite": "^5.0.8", - "vite-plugin-solid": "^2.8.0" + "vite": "^5.0.12", + "vite-plugin-solid": "^2.9.1" } } diff --git a/examples/solid/scroll-padding/package.json b/examples/solid/scroll-padding/package.json index ca8eb63e..2a59acd2 100644 --- a/examples/solid/scroll-padding/package.json +++ b/examples/solid/scroll-padding/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "typescript": "^5.2.2", - "vite": "^5.0.8", - "vite-plugin-solid": "^2.8.0" + "vite": "^5.0.12", + "vite-plugin-solid": "^2.9.1" } } diff --git a/examples/solid/smooth-scroll/package.json b/examples/solid/smooth-scroll/package.json index 9e4c2eb7..0d84aee9 100644 --- a/examples/solid/smooth-scroll/package.json +++ b/examples/solid/smooth-scroll/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "typescript": "^5.2.2", - "vite": "^5.0.8", - "vite-plugin-solid": "^2.8.0" + "vite": "^5.0.12", + "vite-plugin-solid": "^2.9.1" } } diff --git a/examples/solid/sticky/package.json b/examples/solid/sticky/package.json index ac738e12..48a5e8b6 100644 --- a/examples/solid/sticky/package.json +++ b/examples/solid/sticky/package.json @@ -17,7 +17,7 @@ "devDependencies": { "@types/lodash": "^4.14.202", "typescript": "^5.2.2", - "vite": "^5.0.8", - "vite-plugin-solid": "^2.8.0" + "vite": "^5.0.12", + "vite-plugin-solid": "^2.9.1" } } diff --git a/examples/solid/table/package.json b/examples/solid/table/package.json index 863b1dbc..ee211959 100644 --- a/examples/solid/table/package.json +++ b/examples/solid/table/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "typescript": "^5.2.2", - "vite": "^5.0.8", - "vite-plugin-solid": "^2.8.0" + "vite": "^5.0.12", + "vite-plugin-solid": "^2.9.1" } } diff --git a/examples/solid/variable/package.json b/examples/solid/variable/package.json index 0a8b21cf..92c7feb0 100644 --- a/examples/solid/variable/package.json +++ b/examples/solid/variable/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "typescript": "^5.2.2", - "vite": "^5.0.8", - "vite-plugin-solid": "^2.8.0" + "vite": "^5.0.12", + "vite-plugin-solid": "^2.9.1" } } diff --git a/examples/solid/window/package.json b/examples/solid/window/package.json index 0c4cb32d..bb169f48 100644 --- a/examples/solid/window/package.json +++ b/examples/solid/window/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "typescript": "^5.2.2", - "vite": "^5.0.8", - "vite-plugin-solid": "^2.8.0" + "vite": "^5.0.12", + "vite-plugin-solid": "^2.9.1" } } From 6b24e172a0e19ffde9f8a5b423068d85598b4286 Mon Sep 17 00:00:00 2001 From: nikec Date: Sat, 27 Jan 2024 23:34:06 +0100 Subject: [PATCH 16/21] Update pnpm-lock.yaml --- pnpm-lock.yaml | 776 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 757 insertions(+), 19 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 82ecba3d..e3ef7cad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: '6.0' settings: - autoInstallPeers: false + autoInstallPeers: true excludeLinksFromLockfile: false overrides: @@ -9,6 +9,7 @@ overrides: '@tanstack/react-virtual': workspace:* '@tanstack/svelte-virtual': workspace:* '@tanstack/vue-virtual': workspace:* + '@tanstack/solid-virtual': workspace:* importers: @@ -463,6 +464,217 @@ importers: specifier: ^4.0.4 version: 4.5.0(@types/node@18.19.0) + examples/solid/dynamic: + dependencies: + '@faker-js/faker': + specifier: 7.6.0 + version: 7.6.0 + '@tanstack/solid-virtual': + specifier: workspace:* + version: link:../../../packages/solid-virtual + solid-js: + specifier: ^1.8.7 + version: 1.8.12 + devDependencies: + typescript: + specifier: ^5.2.2 + version: 5.3.2 + vite: + specifier: ^5.0.12 + version: 5.0.12(@types/node@17.0.45) + vite-plugin-solid: + specifier: ^2.9.1 + version: 2.9.1(@testing-library/jest-dom@5.17.0)(solid-js@1.8.12)(vite@5.0.12) + + examples/solid/fixed: + dependencies: + '@tanstack/solid-virtual': + specifier: workspace:* + version: link:../../../packages/solid-virtual + solid-js: + specifier: ^1.8.7 + version: 1.8.12 + devDependencies: + typescript: + specifier: ^5.2.2 + version: 5.3.2 + vite: + specifier: ^5.0.12 + version: 5.0.12(@types/node@17.0.45) + vite-plugin-solid: + specifier: ^2.9.1 + version: 2.9.1(@testing-library/jest-dom@5.17.0)(solid-js@1.8.12)(vite@5.0.12) + + examples/solid/infinite-scroll: + dependencies: + '@tanstack/solid-query': + specifier: ^5.17.19 + version: 5.17.19(solid-js@1.8.12) + '@tanstack/solid-virtual': + specifier: workspace:* + version: link:../../../packages/solid-virtual + solid-js: + specifier: ^1.8.7 + version: 1.8.12 + devDependencies: + typescript: + specifier: ^5.2.2 + version: 5.3.2 + vite: + specifier: ^5.0.12 + version: 5.0.12(@types/node@17.0.45) + vite-plugin-solid: + specifier: ^2.9.1 + version: 2.9.1(@testing-library/jest-dom@5.17.0)(solid-js@1.8.12)(vite@5.0.12) + + examples/solid/padding: + dependencies: + '@tanstack/solid-virtual': + specifier: workspace:* + version: link:../../../packages/solid-virtual + solid-js: + specifier: ^1.8.7 + version: 1.8.12 + devDependencies: + typescript: + specifier: ^5.2.2 + version: 5.3.2 + vite: + specifier: ^5.0.12 + version: 5.0.12(@types/node@17.0.45) + vite-plugin-solid: + specifier: ^2.9.1 + version: 2.9.1(@testing-library/jest-dom@5.17.0)(solid-js@1.8.12)(vite@5.0.12) + + examples/solid/scroll-padding: + dependencies: + '@tanstack/solid-virtual': + specifier: workspace:* + version: link:../../../packages/solid-virtual + solid-js: + specifier: ^1.8.7 + version: 1.8.12 + devDependencies: + typescript: + specifier: ^5.2.2 + version: 5.3.2 + vite: + specifier: ^5.0.12 + version: 5.0.12(@types/node@17.0.45) + vite-plugin-solid: + specifier: ^2.9.1 + version: 2.9.1(@testing-library/jest-dom@5.17.0)(solid-js@1.8.12)(vite@5.0.12) + + examples/solid/smooth-scroll: + dependencies: + '@tanstack/solid-virtual': + specifier: workspace:* + version: link:../../../packages/solid-virtual + solid-js: + specifier: ^1.8.7 + version: 1.8.12 + devDependencies: + typescript: + specifier: ^5.2.2 + version: 5.3.2 + vite: + specifier: ^5.0.12 + version: 5.0.12(@types/node@17.0.45) + vite-plugin-solid: + specifier: ^2.9.1 + version: 2.9.1(@testing-library/jest-dom@5.17.0)(solid-js@1.8.12)(vite@5.0.12) + + examples/solid/sticky: + dependencies: + '@faker-js/faker': + specifier: ^8.4.0 + version: 8.4.0 + '@tanstack/solid-virtual': + specifier: workspace:* + version: link:../../../packages/solid-virtual + lodash: + specifier: ^4.17.21 + version: 4.17.21 + solid-js: + specifier: ^1.8.7 + version: 1.8.12 + devDependencies: + '@types/lodash': + specifier: ^4.14.202 + version: 4.14.202 + typescript: + specifier: ^5.2.2 + version: 5.3.2 + vite: + specifier: ^5.0.12 + version: 5.0.12(@types/node@17.0.45) + vite-plugin-solid: + specifier: ^2.9.1 + version: 2.9.1(@testing-library/jest-dom@5.17.0)(solid-js@1.8.12)(vite@5.0.12) + + examples/solid/table: + dependencies: + '@faker-js/faker': + specifier: ^8.4.0 + version: 8.4.0 + '@tanstack/solid-table': + specifier: ^8.11.7 + version: 8.11.7(solid-js@1.8.12) + '@tanstack/solid-virtual': + specifier: workspace:* + version: link:../../../packages/solid-virtual + solid-js: + specifier: ^1.8.7 + version: 1.8.12 + devDependencies: + typescript: + specifier: ^5.2.2 + version: 5.3.2 + vite: + specifier: ^5.0.12 + version: 5.0.12(@types/node@17.0.45) + vite-plugin-solid: + specifier: ^2.9.1 + version: 2.9.1(@testing-library/jest-dom@5.17.0)(solid-js@1.8.12)(vite@5.0.12) + + examples/solid/variable: + dependencies: + '@tanstack/solid-virtual': + specifier: workspace:* + version: link:../../../packages/solid-virtual + solid-js: + specifier: ^1.8.7 + version: 1.8.12 + devDependencies: + typescript: + specifier: ^5.2.2 + version: 5.3.2 + vite: + specifier: ^5.0.12 + version: 5.0.12(@types/node@17.0.45) + vite-plugin-solid: + specifier: ^2.9.1 + version: 2.9.1(@testing-library/jest-dom@5.17.0)(solid-js@1.8.12)(vite@5.0.12) + + examples/solid/window: + dependencies: + '@tanstack/solid-virtual': + specifier: workspace:* + version: link:../../../packages/solid-virtual + solid-js: + specifier: ^1.8.7 + version: 1.8.12 + devDependencies: + typescript: + specifier: ^5.2.2 + version: 5.3.2 + vite: + specifier: ^5.0.12 + version: 5.0.12(@types/node@17.0.45) + vite-plugin-solid: + specifier: ^2.9.1 + version: 2.9.1(@testing-library/jest-dom@5.17.0)(solid-js@1.8.12)(vite@5.0.12) + examples/svelte/dynamic: dependencies: '@faker-js/faker': @@ -947,7 +1159,7 @@ importers: devDependencies: vue: specifier: ^3.2.45 - version: 3.3.9 + version: 3.3.9(typescript@4.9.5) packages: @@ -1008,6 +1220,16 @@ packages: jsesc: 2.5.2 dev: true + /@babel/generator@7.23.6: + resolution: {integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.9 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.20 + jsesc: 2.5.2 + dev: true + /@babel/helper-annotate-as-pure@7.22.5: resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} @@ -2265,6 +2487,15 @@ packages: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 + /@babel/types@7.23.9: + resolution: {integrity: sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.23.4 + '@babel/helper-validator-identifier': 7.22.20 + to-fast-properties: 2.0.0 + dev: true + /@bcoe/v8-coverage@0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true @@ -2302,6 +2533,15 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true + /@esbuild/aix-ppc64@0.19.12: + resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm64@0.18.20: resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} @@ -2311,6 +2551,15 @@ packages: dev: true optional: true + /@esbuild/android-arm64@0.19.12: + resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm@0.15.18: resolution: {integrity: sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==} engines: {node: '>=12'} @@ -2329,6 +2578,15 @@ packages: dev: true optional: true + /@esbuild/android-arm@0.19.12: + resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-x64@0.18.20: resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} engines: {node: '>=12'} @@ -2338,6 +2596,15 @@ packages: dev: true optional: true + /@esbuild/android-x64@0.19.12: + resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-arm64@0.18.20: resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} engines: {node: '>=12'} @@ -2347,6 +2614,15 @@ packages: dev: true optional: true + /@esbuild/darwin-arm64@0.19.12: + resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-x64@0.18.20: resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} engines: {node: '>=12'} @@ -2356,6 +2632,15 @@ packages: dev: true optional: true + /@esbuild/darwin-x64@0.19.12: + resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-arm64@0.18.20: resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} engines: {node: '>=12'} @@ -2365,6 +2650,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-arm64@0.19.12: + resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-x64@0.18.20: resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} engines: {node: '>=12'} @@ -2374,6 +2668,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-x64@0.19.12: + resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm64@0.18.20: resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} engines: {node: '>=12'} @@ -2383,6 +2686,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm64@0.19.12: + resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm@0.18.20: resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} engines: {node: '>=12'} @@ -2392,6 +2704,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm@0.19.12: + resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ia32@0.18.20: resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} engines: {node: '>=12'} @@ -2401,6 +2722,15 @@ packages: dev: true optional: true + /@esbuild/linux-ia32@0.19.12: + resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-loong64@0.14.54: resolution: {integrity: sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==} engines: {node: '>=12'} @@ -2428,6 +2758,15 @@ packages: dev: true optional: true + /@esbuild/linux-loong64@0.19.12: + resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-mips64el@0.18.20: resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} engines: {node: '>=12'} @@ -2437,6 +2776,15 @@ packages: dev: true optional: true + /@esbuild/linux-mips64el@0.19.12: + resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ppc64@0.18.20: resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} engines: {node: '>=12'} @@ -2446,6 +2794,15 @@ packages: dev: true optional: true + /@esbuild/linux-ppc64@0.19.12: + resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-riscv64@0.18.20: resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} engines: {node: '>=12'} @@ -2455,6 +2812,15 @@ packages: dev: true optional: true + /@esbuild/linux-riscv64@0.19.12: + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-s390x@0.18.20: resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} engines: {node: '>=12'} @@ -2464,6 +2830,15 @@ packages: dev: true optional: true + /@esbuild/linux-s390x@0.19.12: + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-x64@0.18.20: resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} engines: {node: '>=12'} @@ -2473,6 +2848,15 @@ packages: dev: true optional: true + /@esbuild/linux-x64@0.19.12: + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/netbsd-x64@0.18.20: resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} engines: {node: '>=12'} @@ -2482,6 +2866,15 @@ packages: dev: true optional: true + /@esbuild/netbsd-x64@0.19.12: + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/openbsd-x64@0.18.20: resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} engines: {node: '>=12'} @@ -2491,6 +2884,15 @@ packages: dev: true optional: true + /@esbuild/openbsd-x64@0.19.12: + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/sunos-x64@0.18.20: resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} engines: {node: '>=12'} @@ -2500,6 +2902,15 @@ packages: dev: true optional: true + /@esbuild/sunos-x64@0.19.12: + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-arm64@0.18.20: resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} engines: {node: '>=12'} @@ -2509,6 +2920,15 @@ packages: dev: true optional: true + /@esbuild/win32-arm64@0.19.12: + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-ia32@0.18.20: resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} engines: {node: '>=12'} @@ -2518,6 +2938,15 @@ packages: dev: true optional: true + /@esbuild/win32-ia32@0.19.12: + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-x64@0.18.20: resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} engines: {node: '>=12'} @@ -2527,6 +2956,15 @@ packages: dev: true optional: true + /@esbuild/win32-x64@0.19.12: + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@faker-js/faker@6.3.1: resolution: {integrity: sha512-8YXBE2ZcU/pImVOHX7MWrSR/X5up7t6rPWZlk34RwZEcdr3ua6X+32pSd6XuOQRN+vbuvYNfA6iey8NbrjuMFQ==} engines: {node: '>=14.0.0', npm: '>=6.0.0'} @@ -2537,6 +2975,11 @@ packages: engines: {node: '>=14.0.0', npm: '>=6.0.0'} dev: false + /@faker-js/faker@8.4.0: + resolution: {integrity: sha512-htW87352wzUCdX1jyUQocUcmAaFqcR/w082EC8iP/gtkF0K+aKcBp0hR5Arb7dzR8tQ1TrhE9DNa5EbJELm84w==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13'} + dev: false + /@gar/promisify@1.1.3: resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} dev: true @@ -3959,6 +4402,110 @@ packages: rollup: 2.79.1 dev: true + /@rollup/rollup-android-arm-eabi@4.9.6: + resolution: {integrity: sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-android-arm64@4.9.6: + resolution: {integrity: sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-arm64@4.9.6: + resolution: {integrity: sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-x64@4.9.6: + resolution: {integrity: sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.9.6: + resolution: {integrity: sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-gnu@4.9.6: + resolution: {integrity: sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-musl@4.9.6: + resolution: {integrity: sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-riscv64-gnu@4.9.6: + resolution: {integrity: sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.9.6: + resolution: {integrity: sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-musl@4.9.6: + resolution: {integrity: sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-arm64-msvc@4.9.6: + resolution: {integrity: sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-ia32-msvc@4.9.6: + resolution: {integrity: sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-x64-msvc@4.9.6: + resolution: {integrity: sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true @@ -4031,6 +4578,10 @@ packages: resolution: {integrity: sha512-WbZztNmKq0t6QjdNmHzezbi/uifYo9j6e2GLJkodsYaYUlzMbAp91RDyeHkIZrm7EfO4wa6Sm5sxJZm5SPlh6w==} dev: false + /@tanstack/query-core@5.17.19: + resolution: {integrity: sha512-Lzw8FUtnLCc9Jwz0sw9xOjZB+/mCCmJev38v2wHMUl/ioXNIhnNWeMxu0NKUjIhAd62IRB3eAtvxAGDJ55UkyA==} + dev: false + /@tanstack/react-router@0.0.1-beta.223(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-Kjncwp6OL0/qwfeewCf+nTYNzhJNFncnwHe+b5v9QJ219foOIO2cQPjuB0nuNIItcdrETG5/J/uvToLNJX5KcQ==} engines: {node: '>=12'} @@ -4058,6 +4609,25 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@tanstack/solid-query@5.17.19(solid-js@1.8.12): + resolution: {integrity: sha512-MKvmksjpF91mfjFJ/QnvA3onSObl0mg/Gn8TS5LI+hNJbPy+X1qbDjt1/OrOSwmrnh5nGdEvjJbinoGpLPFLSg==} + peerDependencies: + solid-js: ^1.6.0 + dependencies: + '@tanstack/query-core': 5.17.19 + solid-js: 1.8.12 + dev: false + + /@tanstack/solid-table@8.11.7(solid-js@1.8.12): + resolution: {integrity: sha512-xjDi+bpD1GHj2pCV5OCnXpA801san3uk9JBm558m+/O+Mjay1zAo3f6eakN/281xagC88AigMdPrt2HssOdzGA==} + engines: {node: '>=12'} + peerDependencies: + solid-js: ^1.3.13 + dependencies: + '@tanstack/table-core': 8.11.7 + solid-js: 1.8.12 + dev: false + /@tanstack/svelte-query@5.12.1(svelte@4.2.8): resolution: {integrity: sha512-jEfwJDN+h8Qslos4lIfFbkJM8dOhKMRE7+iuq/OgvAZHJKMHF4Hdt/ElLs5XJz8FsR6yhh8/vh2QBKUls4YFgw==} peerDependencies: @@ -4082,6 +4652,11 @@ packages: engines: {node: '>=12'} dev: false + /@tanstack/table-core@8.11.7: + resolution: {integrity: sha512-N3ksnkbPbsF3PjubuZCB/etTqvctpXWRHIXTmYfJFnhynQKjeZu8BCuHvdlLPpumKbA+bjY4Ay9AELYLOXPWBg==} + engines: {node: '>=12'} + dev: false + /@tanstack/vue-query@4.37.1(vue@3.3.9): resolution: {integrity: sha512-QzCQ94g2oZQcEfI4nfqa6Qr3aFXtXiEH17Jho+QFl73c7epqsWNcyP3ovF1fgJz5jEOE5OYtwgkoaRKIRaSigg==} peerDependencies: @@ -4301,6 +4876,10 @@ packages: pretty-format: 29.7.0 dev: true + /@types/lodash@4.14.202: + resolution: {integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==} + dev: true + /@types/luxon@2.4.0: resolution: {integrity: sha512-oCavjEjRXuR6URJEtQm0eBdfsBiEcGBZbq21of8iGkeKxU1+1xgKuFPClaBZl2KB8ZZBSWlgk61tH6Mf+nvZVw==} dev: true @@ -4639,7 +5218,7 @@ packages: dependencies: '@vue/compiler-ssr': 3.3.9 '@vue/shared': 3.3.9 - vue: 3.3.9 + vue: 3.3.9(typescript@4.9.5) /@vue/shared@3.3.9: resolution: {integrity: sha512-ZE0VTIR0LmYgeyhurPTpy4KzKsuDyQbMSdM49eKkMnT5X4VfFBLysMzjIZhLEFQYjjOVVfbvUDHckwjDFiO2eA==} @@ -6653,6 +7232,37 @@ packages: '@esbuild/win32-x64': 0.18.20 dev: true + /esbuild@0.19.12: + resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.19.12 + '@esbuild/android-arm': 0.19.12 + '@esbuild/android-arm64': 0.19.12 + '@esbuild/android-x64': 0.19.12 + '@esbuild/darwin-arm64': 0.19.12 + '@esbuild/darwin-x64': 0.19.12 + '@esbuild/freebsd-arm64': 0.19.12 + '@esbuild/freebsd-x64': 0.19.12 + '@esbuild/linux-arm': 0.19.12 + '@esbuild/linux-arm64': 0.19.12 + '@esbuild/linux-ia32': 0.19.12 + '@esbuild/linux-loong64': 0.19.12 + '@esbuild/linux-mips64el': 0.19.12 + '@esbuild/linux-ppc64': 0.19.12 + '@esbuild/linux-riscv64': 0.19.12 + '@esbuild/linux-s390x': 0.19.12 + '@esbuild/linux-x64': 0.19.12 + '@esbuild/netbsd-x64': 0.19.12 + '@esbuild/openbsd-x64': 0.19.12 + '@esbuild/sunos-x64': 0.19.12 + '@esbuild/win32-arm64': 0.19.12 + '@esbuild/win32-ia32': 0.19.12 + '@esbuild/win32-x64': 0.19.12 + dev: true + /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} @@ -7779,6 +8389,11 @@ packages: get-intrinsic: 1.2.2 dev: true + /is-what@4.1.16: + resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==} + engines: {node: '>=12.13'} + dev: true + /is-wsl@2.2.0: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} @@ -8861,6 +9476,13 @@ packages: yargs-parser: 20.2.9 dev: true + /merge-anything@5.1.7: + resolution: {integrity: sha512-eRtbOb1N5iyH0tkQDAoQ4Ipsp/5qSR79Dzrz8hEPxRX10RWWR/iQXdoKmBSRCThY1Fh5EhISDtpSc93fpxUniQ==} + engines: {node: '>=12.13'} + dependencies: + is-what: 4.1.16 + dev: true + /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: true @@ -9810,6 +10432,15 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 + /postcss@8.4.33: + resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + /prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -10427,6 +11058,29 @@ packages: fsevents: 2.3.3 dev: true + /rollup@4.9.6: + resolution: {integrity: sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.9.6 + '@rollup/rollup-android-arm64': 4.9.6 + '@rollup/rollup-darwin-arm64': 4.9.6 + '@rollup/rollup-darwin-x64': 4.9.6 + '@rollup/rollup-linux-arm-gnueabihf': 4.9.6 + '@rollup/rollup-linux-arm64-gnu': 4.9.6 + '@rollup/rollup-linux-arm64-musl': 4.9.6 + '@rollup/rollup-linux-riscv64-gnu': 4.9.6 + '@rollup/rollup-linux-x64-gnu': 4.9.6 + '@rollup/rollup-linux-x64-musl': 4.9.6 + '@rollup/rollup-win32-arm64-msvc': 4.9.6 + '@rollup/rollup-win32-ia32-msvc': 4.9.6 + '@rollup/rollup-win32-x64-msvc': 4.9.6 + fsevents: 2.3.3 + dev: true + /run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} @@ -10548,11 +11202,23 @@ packages: randombytes: 2.1.0 dev: true + /seroval-plugins@1.0.4(seroval@1.0.4): + resolution: {integrity: sha512-DQ2IK6oQVvy8k+c2V5x5YCtUa/GGGsUwUBNN9UqohrZ0rWdUapBFpNMYP1bCyRHoxOJjdKGl+dieacFIpU/i1A==} + engines: {node: '>=10'} + peerDependencies: + seroval: ^1.0 + dependencies: + seroval: 1.0.4 + /seroval@0.14.1: resolution: {integrity: sha512-ZlC9y1KVDhZFdEHLYZup1RjKDutyX1tt3ffOauqRbRURa2vRr2NU/bHuVEuNEqR3zE2uCU3WM6LqH6Oinc3tWg==} engines: {node: '>=10'} dev: true + /seroval@1.0.4: + resolution: {integrity: sha512-qQs/N+KfJu83rmszFQaTxcoJoPn6KNUruX4KmnmyD0oZkUoiNvJ1rpdYKDf4YHM05k+HOgCxa3yvf15QbVijGg==} + engines: {node: '>=10'} + /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} dev: true @@ -10700,6 +11366,13 @@ packages: smart-buffer: 4.2.0 dev: true + /solid-js@1.8.12: + resolution: {integrity: sha512-sLE/i6M9FSWlov3a2pTC5ISzanH2aKwqXTZj+bbFt4SUrVb4iGEa7fpILBMOxsQjkv3eXqEk6JVLlogOdTe0UQ==} + dependencies: + csstype: 3.1.2 + seroval: 1.0.4 + seroval-plugins: 1.0.4(seroval@1.0.4) + /solid-js@1.8.6: resolution: {integrity: sha512-yiH6ZfBBZ3xj/aU/PBpVKB+8r8WWp100NGF7k/Z0IrK9Y8Lv0jwvFiJY1cHdc6Tj7GqXArKnMBabM0m1k+LzkA==} dependencies: @@ -10707,6 +11380,17 @@ packages: seroval: 0.14.1 dev: true + /solid-refresh@0.6.3(solid-js@1.8.12): + resolution: {integrity: sha512-F3aPsX6hVw9ttm5LYlth8Q15x6MlI/J3Dn+o3EQyRTtTxidepSTwAYdozt01/YA+7ObcciagGEyXIopGZzQtbA==} + peerDependencies: + solid-js: ^1.3 + dependencies: + '@babel/generator': 7.23.6 + '@babel/helper-module-imports': 7.22.15 + '@babel/types': 7.23.9 + solid-js: 1.8.12 + dev: true + /sorcery@0.11.0: resolution: {integrity: sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==} hasBin: true @@ -11499,7 +12183,6 @@ packages: resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} hasBin: true - dev: true /typescript@5.3.2: resolution: {integrity: sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==} @@ -11722,6 +12405,29 @@ packages: - terser dev: true + /vite-plugin-solid@2.9.1(@testing-library/jest-dom@5.17.0)(solid-js@1.8.12)(vite@5.0.12): + resolution: {integrity: sha512-RC4hj+lbvljw57BbMGDApvEOPEh14lwrr/GeXRLNQLcR1qnOdzOwwTSFy13Gj/6FNIZpBEl0bWPU+VYFawrqUw==} + peerDependencies: + '@testing-library/jest-dom': ^5.16.6 || ^5.17.0 || ^6.* + solid-js: ^1.7.2 + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + '@testing-library/jest-dom': + optional: true + dependencies: + '@babel/core': 7.23.5 + '@testing-library/jest-dom': 5.17.0 + '@types/babel__core': 7.20.5 + babel-preset-solid: 1.8.6(@babel/core@7.23.5) + merge-anything: 5.1.7 + solid-js: 1.8.12 + solid-refresh: 0.6.3(solid-js@1.8.12) + vite: 5.0.12(@types/node@17.0.45) + vitefu: 0.2.5(vite@5.0.12) + transitivePeerDependencies: + - supports-color + dev: true + /vite@2.9.16: resolution: {integrity: sha512-X+6q8KPyeuBvTQV8AVSnKDvXoBMnTx8zxh54sOwmmuOdxkjMmEJXH2UEchA+vTMps1xw9vL64uwJOWryULg7nA==} engines: {node: '>=12.2.0'} @@ -11852,6 +12558,42 @@ packages: fsevents: 2.3.3 dev: true + /vite@5.0.12(@types/node@17.0.45): + resolution: {integrity: sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 17.0.45 + esbuild: 0.19.12 + postcss: 8.4.33 + rollup: 4.9.6 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /vitefu@0.2.5(vite@4.5.0): resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} peerDependencies: @@ -11863,6 +12605,17 @@ packages: vite: 4.5.0(@types/node@17.0.45) dev: true + /vitefu@0.2.5(vite@5.0.12): + resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + vite: + optional: true + dependencies: + vite: 5.0.12(@types/node@17.0.45) + dev: true + /vitest@0.34.6: resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} engines: {node: '>=v14.18.0'} @@ -11977,20 +12730,6 @@ packages: typescript: 5.3.2 dev: true - /vue@3.3.9: - resolution: {integrity: sha512-sy5sLCTR8m6tvUk1/ijri3Yqzgpdsmxgj6n6yl7GXXCXqVbmW2RCXe9atE4cEI6Iv7L89v5f35fZRRr5dChP9w==} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@vue/compiler-dom': 3.3.9 - '@vue/compiler-sfc': 3.3.9 - '@vue/runtime-dom': 3.3.9 - '@vue/server-renderer': 3.3.9(vue@3.3.9) - '@vue/shared': 3.3.9 - /vue@3.3.9(typescript@4.9.5): resolution: {integrity: sha512-sy5sLCTR8m6tvUk1/ijri3Yqzgpdsmxgj6n6yl7GXXCXqVbmW2RCXe9atE4cEI6Iv7L89v5f35fZRRr5dChP9w==} peerDependencies: @@ -12005,7 +12744,6 @@ packages: '@vue/server-renderer': 3.3.9(vue@3.3.9) '@vue/shared': 3.3.9 typescript: 4.9.5 - dev: true /vue@3.3.9(typescript@5.3.2): resolution: {integrity: sha512-sy5sLCTR8m6tvUk1/ijri3Yqzgpdsmxgj6n6yl7GXXCXqVbmW2RCXe9atE4cEI6Iv7L89v5f35fZRRr5dChP9w==} From 4ab5a87f89a85c3a2dd5f63031e7b5bce02c4a17 Mon Sep 17 00:00:00 2001 From: nikec Date: Sat, 27 Jan 2024 23:39:23 +0100 Subject: [PATCH 17/21] cleanup css --- examples/solid/dynamic/src/index.css | 4 ++++ examples/solid/fixed/src/index.css | 4 ---- examples/solid/infinite-scroll/src/index.css | 4 ---- examples/solid/padding/src/index.css | 4 ---- examples/solid/variable/src/index.css | 4 ---- examples/solid/window/src/index.css | 4 ---- 6 files changed, 4 insertions(+), 20 deletions(-) diff --git a/examples/solid/dynamic/src/index.css b/examples/solid/dynamic/src/index.css index f0ca336f..7ca2a750 100644 --- a/examples/solid/dynamic/src/index.css +++ b/examples/solid/dynamic/src/index.css @@ -21,3 +21,7 @@ body { .ListItemEven { background-color: #e6e4dc; } + +button { + border: 1px solid gray; +} diff --git a/examples/solid/fixed/src/index.css b/examples/solid/fixed/src/index.css index c46155fa..45d24164 100644 --- a/examples/solid/fixed/src/index.css +++ b/examples/solid/fixed/src/index.css @@ -22,7 +22,3 @@ body { .ListItemEven { background-color: #e6e4dc; } - -button { - border: 1px solid gray; -} diff --git a/examples/solid/infinite-scroll/src/index.css b/examples/solid/infinite-scroll/src/index.css index c46155fa..45d24164 100644 --- a/examples/solid/infinite-scroll/src/index.css +++ b/examples/solid/infinite-scroll/src/index.css @@ -22,7 +22,3 @@ body { .ListItemEven { background-color: #e6e4dc; } - -button { - border: 1px solid gray; -} diff --git a/examples/solid/padding/src/index.css b/examples/solid/padding/src/index.css index c46155fa..45d24164 100644 --- a/examples/solid/padding/src/index.css +++ b/examples/solid/padding/src/index.css @@ -22,7 +22,3 @@ body { .ListItemEven { background-color: #e6e4dc; } - -button { - border: 1px solid gray; -} diff --git a/examples/solid/variable/src/index.css b/examples/solid/variable/src/index.css index c46155fa..45d24164 100644 --- a/examples/solid/variable/src/index.css +++ b/examples/solid/variable/src/index.css @@ -22,7 +22,3 @@ body { .ListItemEven { background-color: #e6e4dc; } - -button { - border: 1px solid gray; -} diff --git a/examples/solid/window/src/index.css b/examples/solid/window/src/index.css index c46155fa..45d24164 100644 --- a/examples/solid/window/src/index.css +++ b/examples/solid/window/src/index.css @@ -22,7 +22,3 @@ body { .ListItemEven { background-color: #e6e4dc; } - -button { - border: 1px solid gray; -} From b36cf967ac0775b4aa86d1a13f07aedda0c4f557 Mon Sep 17 00:00:00 2001 From: nikec Date: Sat, 27 Jan 2024 23:47:49 +0100 Subject: [PATCH 18/21] add examples to docs --- docs/config.json | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/docs/config.json b/docs/config.json index 6e0796db..4c1f7d37 100644 --- a/docs/config.json +++ b/docs/config.json @@ -85,6 +85,51 @@ "children": [ { "label": "Solid Virtual", "to": "framework/solid/solid-virtual" } ] + }, + { + "label": "Examples", + "children": [ + { + "to": "framework/solid/examples/fixed", + "label": "Fixed" + }, + { + "to": "framework/solid/examples/variable", + "label": "Variable" + }, + { + "to": "framework/solid/examples/dynamic", + "label": "Dynamic" + }, + { + "to": "framework/solid/examples/sticky", + "label": "Sticky" + }, + { + "to": "framework/solid/examples/infinite-scroll", + "label": "Infinite Scroll" + }, + { + "to": "framework/solid/examples/smooth-scroll", + "label": "Smooth Scroll" + }, + { + "to": "framework/solid/examples/table", + "label": "Table" + }, + { + "to": "framework/solid/examples/padding", + "label": "Padding" + }, + { + "to": "framework/solid/examples/scroll-padding", + "label": "Scroll Padding" + }, + { + "to": "framework/solid/examples/window", + "label": "Window" + } + ] } ] }, From a47f3834b7364791059ec526ef0d26031a7c8db2 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 18 Feb 2024 10:20:02 +1100 Subject: [PATCH 19/21] Fix merge --- examples/solid/dynamic/package.json | 8 +- examples/solid/fixed/package.json | 6 +- examples/solid/infinite-scroll/package.json | 6 +- examples/solid/padding/package.json | 6 +- examples/solid/scroll-padding/package.json | 6 +- examples/solid/smooth-scroll/package.json | 6 +- examples/solid/sticky/package.json | 8 +- examples/solid/table/package.json | 8 +- examples/solid/variable/package.json | 6 +- examples/solid/window/package.json | 6 +- packages/solid-virtual/package.json | 2 +- pnpm-lock.yaml | 289 +++++++++++++++++++- pnpm-workspace.yaml | 1 + 13 files changed, 309 insertions(+), 49 deletions(-) diff --git a/examples/solid/dynamic/package.json b/examples/solid/dynamic/package.json index e12510bc..799e9b17 100644 --- a/examples/solid/dynamic/package.json +++ b/examples/solid/dynamic/package.json @@ -9,13 +9,13 @@ "preview": "vite preview" }, "dependencies": { - "@faker-js/faker": "7.6.0", + "@faker-js/faker": "^7.6.0", "@tanstack/solid-virtual": "3.0.1", "solid-js": "^1.8.7" }, "devDependencies": { - "typescript": "^5.2.2", - "vite": "^5.0.12", - "vite-plugin-solid": "^2.9.1" + "typescript": "5.2.2", + "vite": "^5.1.3", + "vite-plugin-solid": "^2.10.1" } } diff --git a/examples/solid/fixed/package.json b/examples/solid/fixed/package.json index 359da138..f2c292b5 100644 --- a/examples/solid/fixed/package.json +++ b/examples/solid/fixed/package.json @@ -13,8 +13,8 @@ "solid-js": "^1.8.7" }, "devDependencies": { - "typescript": "^5.2.2", - "vite": "^5.0.12", - "vite-plugin-solid": "^2.9.1" + "typescript": "5.2.2", + "vite": "^5.1.3", + "vite-plugin-solid": "^2.10.1" } } diff --git a/examples/solid/infinite-scroll/package.json b/examples/solid/infinite-scroll/package.json index 898a38d5..dc1297aa 100644 --- a/examples/solid/infinite-scroll/package.json +++ b/examples/solid/infinite-scroll/package.json @@ -14,8 +14,8 @@ "solid-js": "^1.8.7" }, "devDependencies": { - "typescript": "^5.2.2", - "vite": "^5.0.12", - "vite-plugin-solid": "^2.9.1" + "typescript": "5.2.2", + "vite": "^5.1.3", + "vite-plugin-solid": "^2.10.1" } } diff --git a/examples/solid/padding/package.json b/examples/solid/padding/package.json index cfc010fa..3574b284 100644 --- a/examples/solid/padding/package.json +++ b/examples/solid/padding/package.json @@ -13,8 +13,8 @@ "solid-js": "^1.8.7" }, "devDependencies": { - "typescript": "^5.2.2", - "vite": "^5.0.12", - "vite-plugin-solid": "^2.9.1" + "typescript": "5.2.2", + "vite": "^5.1.3", + "vite-plugin-solid": "^2.10.1" } } diff --git a/examples/solid/scroll-padding/package.json b/examples/solid/scroll-padding/package.json index 2a59acd2..ca57b1d7 100644 --- a/examples/solid/scroll-padding/package.json +++ b/examples/solid/scroll-padding/package.json @@ -13,8 +13,8 @@ "solid-js": "^1.8.7" }, "devDependencies": { - "typescript": "^5.2.2", - "vite": "^5.0.12", - "vite-plugin-solid": "^2.9.1" + "typescript": "5.2.2", + "vite": "^5.1.3", + "vite-plugin-solid": "^2.10.1" } } diff --git a/examples/solid/smooth-scroll/package.json b/examples/solid/smooth-scroll/package.json index 0d84aee9..637c79d8 100644 --- a/examples/solid/smooth-scroll/package.json +++ b/examples/solid/smooth-scroll/package.json @@ -13,8 +13,8 @@ "solid-js": "^1.8.7" }, "devDependencies": { - "typescript": "^5.2.2", - "vite": "^5.0.12", - "vite-plugin-solid": "^2.9.1" + "typescript": "5.2.2", + "vite": "^5.1.3", + "vite-plugin-solid": "^2.10.1" } } diff --git a/examples/solid/sticky/package.json b/examples/solid/sticky/package.json index 48a5e8b6..ec81f6ed 100644 --- a/examples/solid/sticky/package.json +++ b/examples/solid/sticky/package.json @@ -9,15 +9,15 @@ "preview": "vite preview" }, "dependencies": { - "@faker-js/faker": "^8.4.0", + "@faker-js/faker": "^7.6.0", "@tanstack/solid-virtual": "3.0.1", "lodash": "^4.17.21", "solid-js": "^1.8.7" }, "devDependencies": { "@types/lodash": "^4.14.202", - "typescript": "^5.2.2", - "vite": "^5.0.12", - "vite-plugin-solid": "^2.9.1" + "typescript": "5.2.2", + "vite": "^5.1.3", + "vite-plugin-solid": "^2.10.1" } } diff --git a/examples/solid/table/package.json b/examples/solid/table/package.json index ee211959..bd568092 100644 --- a/examples/solid/table/package.json +++ b/examples/solid/table/package.json @@ -9,14 +9,14 @@ "preview": "vite preview" }, "dependencies": { - "@faker-js/faker": "^8.4.0", + "@faker-js/faker": "^7.6.0", "@tanstack/solid-table": "^8.11.7", "@tanstack/solid-virtual": "3.0.1", "solid-js": "^1.8.7" }, "devDependencies": { - "typescript": "^5.2.2", - "vite": "^5.0.12", - "vite-plugin-solid": "^2.9.1" + "typescript": "5.2.2", + "vite": "^5.1.3", + "vite-plugin-solid": "^2.10.1" } } diff --git a/examples/solid/variable/package.json b/examples/solid/variable/package.json index 92c7feb0..137e5142 100644 --- a/examples/solid/variable/package.json +++ b/examples/solid/variable/package.json @@ -13,8 +13,8 @@ "solid-js": "^1.8.7" }, "devDependencies": { - "typescript": "^5.2.2", - "vite": "^5.0.12", - "vite-plugin-solid": "^2.9.1" + "typescript": "5.2.2", + "vite": "^5.1.3", + "vite-plugin-solid": "^2.10.1" } } diff --git a/examples/solid/window/package.json b/examples/solid/window/package.json index bb169f48..2ef71763 100644 --- a/examples/solid/window/package.json +++ b/examples/solid/window/package.json @@ -13,8 +13,8 @@ "solid-js": "^1.8.7" }, "devDependencies": { - "typescript": "^5.2.2", - "vite": "^5.0.12", - "vite-plugin-solid": "^2.9.1" + "typescript": "5.2.2", + "vite": "^5.1.3", + "vite-plugin-solid": "^2.10.1" } } diff --git a/packages/solid-virtual/package.json b/packages/solid-virtual/package.json index 1aba197a..5c4e8deb 100644 --- a/packages/solid-virtual/package.json +++ b/packages/solid-virtual/package.json @@ -53,7 +53,7 @@ "@tanstack/virtual-core": "workspace:*" }, "devDependencies": { - "solid-js": "^1.3.15", + "solid-js": "^1.8.7", "vite-plugin-solid": "^2.10.1" }, "peerDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4694a973..241ec6fe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -331,6 +331,217 @@ importers: specifier: ^5.1.3 version: 5.1.3(@types/node@18.19.17) + examples/solid/dynamic: + dependencies: + '@faker-js/faker': + specifier: ^7.6.0 + version: 7.6.0 + '@tanstack/solid-virtual': + specifier: 3.0.1 + version: 3.0.1(solid-js@1.8.15) + solid-js: + specifier: ^1.8.7 + version: 1.8.15 + devDependencies: + typescript: + specifier: 5.2.2 + version: 5.2.2 + vite: + specifier: ^5.1.3 + version: 5.1.3(@types/node@18.19.17) + vite-plugin-solid: + specifier: ^2.10.1 + version: 2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.15)(vite@5.1.3) + + examples/solid/fixed: + dependencies: + '@tanstack/solid-virtual': + specifier: 3.0.1 + version: 3.0.1(solid-js@1.8.15) + solid-js: + specifier: ^1.8.7 + version: 1.8.15 + devDependencies: + typescript: + specifier: 5.2.2 + version: 5.2.2 + vite: + specifier: ^5.1.3 + version: 5.1.3(@types/node@18.19.17) + vite-plugin-solid: + specifier: ^2.10.1 + version: 2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.15)(vite@5.1.3) + + examples/solid/infinite-scroll: + dependencies: + '@tanstack/solid-query': + specifier: ^5.17.19 + version: 5.21.4(solid-js@1.8.15) + '@tanstack/solid-virtual': + specifier: 3.0.1 + version: 3.0.1(solid-js@1.8.15) + solid-js: + specifier: ^1.8.7 + version: 1.8.15 + devDependencies: + typescript: + specifier: 5.2.2 + version: 5.2.2 + vite: + specifier: ^5.1.3 + version: 5.1.3(@types/node@18.19.17) + vite-plugin-solid: + specifier: ^2.10.1 + version: 2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.15)(vite@5.1.3) + + examples/solid/padding: + dependencies: + '@tanstack/solid-virtual': + specifier: 3.0.1 + version: 3.0.1(solid-js@1.8.15) + solid-js: + specifier: ^1.8.7 + version: 1.8.15 + devDependencies: + typescript: + specifier: 5.2.2 + version: 5.2.2 + vite: + specifier: ^5.1.3 + version: 5.1.3(@types/node@18.19.17) + vite-plugin-solid: + specifier: ^2.10.1 + version: 2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.15)(vite@5.1.3) + + examples/solid/scroll-padding: + dependencies: + '@tanstack/solid-virtual': + specifier: 3.0.1 + version: 3.0.1(solid-js@1.8.15) + solid-js: + specifier: ^1.8.7 + version: 1.8.15 + devDependencies: + typescript: + specifier: 5.2.2 + version: 5.2.2 + vite: + specifier: ^5.1.3 + version: 5.1.3(@types/node@18.19.17) + vite-plugin-solid: + specifier: ^2.10.1 + version: 2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.15)(vite@5.1.3) + + examples/solid/smooth-scroll: + dependencies: + '@tanstack/solid-virtual': + specifier: 3.0.1 + version: 3.0.1(solid-js@1.8.15) + solid-js: + specifier: ^1.8.7 + version: 1.8.15 + devDependencies: + typescript: + specifier: 5.2.2 + version: 5.2.2 + vite: + specifier: ^5.1.3 + version: 5.1.3(@types/node@18.19.17) + vite-plugin-solid: + specifier: ^2.10.1 + version: 2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.15)(vite@5.1.3) + + examples/solid/sticky: + dependencies: + '@faker-js/faker': + specifier: ^7.6.0 + version: 7.6.0 + '@tanstack/solid-virtual': + specifier: 3.0.1 + version: 3.0.1(solid-js@1.8.15) + lodash: + specifier: ^4.17.21 + version: 4.17.21 + solid-js: + specifier: ^1.8.7 + version: 1.8.15 + devDependencies: + '@types/lodash': + specifier: ^4.14.202 + version: 4.14.202 + typescript: + specifier: 5.2.2 + version: 5.2.2 + vite: + specifier: ^5.1.3 + version: 5.1.3(@types/node@18.19.17) + vite-plugin-solid: + specifier: ^2.10.1 + version: 2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.15)(vite@5.1.3) + + examples/solid/table: + dependencies: + '@faker-js/faker': + specifier: ^7.6.0 + version: 7.6.0 + '@tanstack/solid-table': + specifier: ^8.11.7 + version: 8.12.0(solid-js@1.8.15) + '@tanstack/solid-virtual': + specifier: 3.0.1 + version: 3.0.1(solid-js@1.8.15) + solid-js: + specifier: ^1.8.7 + version: 1.8.15 + devDependencies: + typescript: + specifier: 5.2.2 + version: 5.2.2 + vite: + specifier: ^5.1.3 + version: 5.1.3(@types/node@18.19.17) + vite-plugin-solid: + specifier: ^2.10.1 + version: 2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.15)(vite@5.1.3) + + examples/solid/variable: + dependencies: + '@tanstack/solid-virtual': + specifier: 3.0.1 + version: 3.0.1(solid-js@1.8.15) + solid-js: + specifier: ^1.8.7 + version: 1.8.15 + devDependencies: + typescript: + specifier: 5.2.2 + version: 5.2.2 + vite: + specifier: ^5.1.3 + version: 5.1.3(@types/node@18.19.17) + vite-plugin-solid: + specifier: ^2.10.1 + version: 2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.15)(vite@5.1.3) + + examples/solid/window: + dependencies: + '@tanstack/solid-virtual': + specifier: 3.0.1 + version: 3.0.1(solid-js@1.8.15) + solid-js: + specifier: ^1.8.7 + version: 1.8.15 + devDependencies: + typescript: + specifier: 5.2.2 + version: 5.2.2 + vite: + specifier: ^5.1.3 + version: 5.1.3(@types/node@18.19.17) + vite-plugin-solid: + specifier: ^2.10.1 + version: 2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.15)(vite@5.1.3) + examples/svelte/dynamic: dependencies: '@faker-js/faker': @@ -804,11 +1015,11 @@ importers: version: link:../virtual-core devDependencies: solid-js: - specifier: ^1.3.15 - version: 1.8.6 + specifier: ^1.8.7 + version: 1.8.15 vite-plugin-solid: specifier: ^2.10.1 - version: 2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.6)(vite@5.1.3) + version: 2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.15)(vite@5.1.3) packages/svelte-virtual: dependencies: @@ -2070,6 +2281,10 @@ packages: resolution: {integrity: sha512-WbZztNmKq0t6QjdNmHzezbi/uifYo9j6e2GLJkodsYaYUlzMbAp91RDyeHkIZrm7EfO4wa6Sm5sxJZm5SPlh6w==} dev: false + /@tanstack/query-core@5.21.4: + resolution: {integrity: sha512-k3u4RcDAtcCurs8KVEIf52k4yUayc852v4ZQrtI8pkEii71riM9758A2WVGo5T/v4/X7b1RLON5g0aDvkoZYCA==} + dev: false + /@tanstack/react-table@8.10.7(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-bXhjA7xsTcsW8JPTTYlUg/FuBpn8MNjiEPhkNhIGCUR6iRQM2+WEco4OBpvDeVcR9SE+bmWLzdfiY7bCbCSVuA==} engines: {node: '>=12'} @@ -2082,6 +2297,34 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@tanstack/solid-query@5.21.4(solid-js@1.8.15): + resolution: {integrity: sha512-19rk31HBbFg1G4e22iLFjIvRXxggHjZxsIzx3qHsFRVAJuB7DQ93rVE3oxifOo1qvaHgKVmWLh/gX4txzBtf+g==} + peerDependencies: + solid-js: ^1.6.0 + dependencies: + '@tanstack/query-core': 5.21.4 + solid-js: 1.8.15 + dev: false + + /@tanstack/solid-table@8.12.0(solid-js@1.8.15): + resolution: {integrity: sha512-ONTTOmOiSi0eluiDAsH5U4D2J4/bJFwaE43PpdHgdnlC5q+PrjzZ5CNDkvR7wPi/hR3SENE4hdVJxcDMP9jjrw==} + engines: {node: '>=12'} + peerDependencies: + solid-js: ^1.3.13 + dependencies: + '@tanstack/table-core': 8.12.0 + solid-js: 1.8.15 + dev: false + + /@tanstack/solid-virtual@3.0.1(solid-js@1.8.15): + resolution: {integrity: sha512-DxP3GUBEDUNdCH50Q2RgRkaol3bAGpkMcJAdUIPWywEL37TkH/MC748nees0EXRylrC7RMP0zVNN3Z94WFBULA==} + peerDependencies: + solid-js: ^1.3.0 + dependencies: + '@tanstack/virtual-core': 3.0.0 + solid-js: 1.8.15 + dev: false + /@tanstack/svelte-query@5.12.1(svelte@4.2.8): resolution: {integrity: sha512-jEfwJDN+h8Qslos4lIfFbkJM8dOhKMRE7+iuq/OgvAZHJKMHF4Hdt/ElLs5XJz8FsR6yhh8/vh2QBKUls4YFgw==} peerDependencies: @@ -2106,6 +2349,15 @@ packages: engines: {node: '>=12'} dev: false + /@tanstack/table-core@8.12.0: + resolution: {integrity: sha512-cq/ylWVrOwixmwNXQjgZaQw1Izf7+nPxjczum7paAnMtwPg1S2qRAJU+Jb8rEBUWm69voC/zcChmePlk2hc6ug==} + engines: {node: '>=12'} + dev: false + + /@tanstack/virtual-core@3.0.0: + resolution: {integrity: sha512-SYXOBTjJb05rXa2vl55TTwO40A6wKu0R5i1qQwhJYNDIqaIGF7D0HsLw+pJAyi2OvntlEIVusx3xtbbgSUi6zg==} + dev: false + /@tanstack/vue-query@4.37.1(vue@3.3.9): resolution: {integrity: sha512-QzCQ94g2oZQcEfI4nfqa6Qr3aFXtXiEH17Jho+QFl73c7epqsWNcyP3ovF1fgJz5jEOE5OYtwgkoaRKIRaSigg==} peerDependencies: @@ -5642,10 +5894,17 @@ packages: lru-cache: 6.0.0 dev: true - /seroval@0.14.1: - resolution: {integrity: sha512-ZlC9y1KVDhZFdEHLYZup1RjKDutyX1tt3ffOauqRbRURa2vRr2NU/bHuVEuNEqR3zE2uCU3WM6LqH6Oinc3tWg==} + /seroval-plugins@1.0.4(seroval@1.0.4): + resolution: {integrity: sha512-DQ2IK6oQVvy8k+c2V5x5YCtUa/GGGsUwUBNN9UqohrZ0rWdUapBFpNMYP1bCyRHoxOJjdKGl+dieacFIpU/i1A==} + engines: {node: '>=10'} + peerDependencies: + seroval: ^1.0 + dependencies: + seroval: 1.0.4 + + /seroval@1.0.4: + resolution: {integrity: sha512-qQs/N+KfJu83rmszFQaTxcoJoPn6KNUruX4KmnmyD0oZkUoiNvJ1rpdYKDf4YHM05k+HOgCxa3yvf15QbVijGg==} engines: {node: '>=10'} - dev: true /set-function-length@1.1.1: resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} @@ -5780,14 +6039,14 @@ packages: engines: {node: '>= 18', pnpm: '>= 8'} dev: true - /solid-js@1.8.6: - resolution: {integrity: sha512-yiH6ZfBBZ3xj/aU/PBpVKB+8r8WWp100NGF7k/Z0IrK9Y8Lv0jwvFiJY1cHdc6Tj7GqXArKnMBabM0m1k+LzkA==} + /solid-js@1.8.15: + resolution: {integrity: sha512-d0QP/efr3UVcwGgWVPveQQ0IHOH6iU7yUhc2piy8arNG8wxKmvUy1kFxyF8owpmfCWGB87usDKMaVnsNYZm+Vw==} dependencies: csstype: 3.1.2 - seroval: 0.14.1 - dev: true + seroval: 1.0.4 + seroval-plugins: 1.0.4(seroval@1.0.4) - /solid-refresh@0.6.3(solid-js@1.8.6): + /solid-refresh@0.6.3(solid-js@1.8.15): resolution: {integrity: sha512-F3aPsX6hVw9ttm5LYlth8Q15x6MlI/J3Dn+o3EQyRTtTxidepSTwAYdozt01/YA+7ObcciagGEyXIopGZzQtbA==} peerDependencies: solid-js: ^1.3 @@ -5795,7 +6054,7 @@ packages: '@babel/generator': 7.23.6 '@babel/helper-module-imports': 7.22.15 '@babel/types': 7.23.9 - solid-js: 1.8.6 + solid-js: 1.8.15 dev: true /sorcery@0.11.0: @@ -6452,7 +6711,7 @@ packages: vite: 5.1.3(@types/node@18.19.17) dev: true - /vite-plugin-solid@2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.6)(vite@5.1.3): + /vite-plugin-solid@2.10.1(@testing-library/jest-dom@6.4.2)(solid-js@1.8.15)(vite@5.1.3): resolution: {integrity: sha512-kfVdNLWaJqaJVL52U6iCCKNW/nXE7bS1VVGOWPGllOkJfcNILymVSY0LCBLSnyy0iYnRtrXpiHm14rMuzeC7CA==} peerDependencies: '@testing-library/jest-dom': ^5.16.6 || ^5.17.0 || ^6.* @@ -6467,8 +6726,8 @@ packages: '@types/babel__core': 7.20.5 babel-preset-solid: 1.8.15(@babel/core@7.23.5) merge-anything: 5.1.7 - solid-js: 1.8.6 - solid-refresh: 0.6.3(solid-js@1.8.6) + solid-js: 1.8.15 + solid-refresh: 0.6.3(solid-js@1.8.15) vite: 5.1.3(@types/node@18.19.17) vitefu: 0.2.5(vite@5.1.3) transitivePeerDependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 3f178b5c..6e3e598b 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,6 @@ packages: - 'packages/*' - 'examples/react/*' + - 'examples/solid/*' - 'examples/svelte/*' - 'examples/vue/*' From 5a90eb30abddd2ad3a36a3948b3c9b7e10e2253e Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 18 Feb 2024 10:24:04 +1100 Subject: [PATCH 20/21] Fix CI issues --- examples/solid/dynamic/package.json | 2 +- examples/solid/fixed/package.json | 2 +- examples/solid/fixed/src/App.tsx | 4 ++-- examples/solid/padding/src/App.tsx | 4 ++-- examples/solid/variable/src/App.tsx | 4 ++-- examples/solid/window/package.json | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/solid/dynamic/package.json b/examples/solid/dynamic/package.json index 799e9b17..af6f6598 100644 --- a/examples/solid/dynamic/package.json +++ b/examples/solid/dynamic/package.json @@ -1,5 +1,5 @@ { - "name": "dynamic", + "name": "tanstack-solid-virtual-example-dynamic", "private": true, "version": "0.0.0", "type": "module", diff --git a/examples/solid/fixed/package.json b/examples/solid/fixed/package.json index f2c292b5..e3122c75 100644 --- a/examples/solid/fixed/package.json +++ b/examples/solid/fixed/package.json @@ -1,5 +1,5 @@ { - "name": "fixed", + "name": "tanstack-solid-virtual-example-fixed", "private": true, "version": "0.0.0", "type": "module", diff --git a/examples/solid/fixed/src/App.tsx b/examples/solid/fixed/src/App.tsx index b22504e9..999b22f1 100644 --- a/examples/solid/fixed/src/App.tsx +++ b/examples/solid/fixed/src/App.tsx @@ -176,8 +176,8 @@ function GridVirtualizerFixed() { ? 'ListItemOdd' : 'ListItemEven' : virtualRow.index % 2 - ? 'ListItemOdd' - : 'ListItemEven' + ? 'ListItemOdd' + : 'ListItemEven' } style={{ position: 'absolute', diff --git a/examples/solid/padding/src/App.tsx b/examples/solid/padding/src/App.tsx index 2a04e774..dd4e745a 100644 --- a/examples/solid/padding/src/App.tsx +++ b/examples/solid/padding/src/App.tsx @@ -179,8 +179,8 @@ function GridVirtualizerPadding() { ? 'ListItemOdd' : 'ListItemEven' : virtualRow.index % 2 - ? 'ListItemOdd' - : 'ListItemEven' + ? 'ListItemOdd' + : 'ListItemEven' } style={{ position: 'absolute', diff --git a/examples/solid/variable/src/App.tsx b/examples/solid/variable/src/App.tsx index 2fa77318..14c33320 100644 --- a/examples/solid/variable/src/App.tsx +++ b/examples/solid/variable/src/App.tsx @@ -191,8 +191,8 @@ function GridVirtualizerVariable() { ? 'ListItemOdd' : 'ListItemEven' : virtualRow.index % 2 - ? 'ListItemOdd' - : 'ListItemEven' + ? 'ListItemOdd' + : 'ListItemEven' } style={{ position: 'absolute', diff --git a/examples/solid/window/package.json b/examples/solid/window/package.json index 2ef71763..721bdf69 100644 --- a/examples/solid/window/package.json +++ b/examples/solid/window/package.json @@ -1,5 +1,5 @@ { - "name": "window", + "name": "tanstack-solid-virtual-example-window", "private": true, "version": "0.0.0", "type": "module", From 58f2fab34533ae962fed3ad5a6ca3ba566829ff9 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 18 Feb 2024 10:30:52 +1100 Subject: [PATCH 21/21] Fix faker version --- examples/react/dynamic/package.json | 2 +- examples/react/sticky/package.json | 2 +- examples/react/table/package.json | 2 +- examples/solid/dynamic/package.json | 2 +- examples/solid/infinite-scroll/package.json | 2 +- examples/solid/padding/package.json | 2 +- examples/solid/scroll-padding/package.json | 2 +- examples/solid/smooth-scroll/package.json | 2 +- examples/solid/sticky/package.json | 4 +- examples/solid/table/package.json | 4 +- examples/solid/variable/package.json | 2 +- examples/svelte/dynamic/package.json | 2 +- examples/svelte/smooth-scroll/package.json | 2 +- examples/svelte/sticky/package.json | 2 +- examples/svelte/table/package.json | 2 +- examples/vue/dynamic/package.json | 2 +- examples/vue/sticky/package.json | 2 +- examples/vue/table/package.json | 2 +- pnpm-lock.yaml | 58 ++++++++++----------- 19 files changed, 49 insertions(+), 49 deletions(-) diff --git a/examples/react/dynamic/package.json b/examples/react/dynamic/package.json index af6224a8..8c119034 100644 --- a/examples/react/dynamic/package.json +++ b/examples/react/dynamic/package.json @@ -7,7 +7,7 @@ "serve": "vite preview" }, "dependencies": { - "@faker-js/faker": "^7.6.0", + "@faker-js/faker": "^8.3.1", "@tanstack/react-virtual": "^3.1.0", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/sticky/package.json b/examples/react/sticky/package.json index d2d1336d..e389cc79 100644 --- a/examples/react/sticky/package.json +++ b/examples/react/sticky/package.json @@ -9,7 +9,7 @@ "start": "vite" }, "dependencies": { - "@faker-js/faker": "^7.6.0", + "@faker-js/faker": "^8.3.1", "@tanstack/react-virtual": "^3.1.0", "lodash": "^4.17.21", "react": "^18.2.0", diff --git a/examples/react/table/package.json b/examples/react/table/package.json index 224c415d..640b9ef4 100644 --- a/examples/react/table/package.json +++ b/examples/react/table/package.json @@ -9,7 +9,7 @@ "start": "vite" }, "dependencies": { - "@faker-js/faker": "^7.6.0", + "@faker-js/faker": "^8.3.1", "@tanstack/react-table": "^8.7.9", "@tanstack/react-virtual": "^3.1.0", "react": "^18.2.0", diff --git a/examples/solid/dynamic/package.json b/examples/solid/dynamic/package.json index af6f6598..242ed914 100644 --- a/examples/solid/dynamic/package.json +++ b/examples/solid/dynamic/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "@faker-js/faker": "^7.6.0", + "@faker-js/faker": "^8.3.1", "@tanstack/solid-virtual": "3.0.1", "solid-js": "^1.8.7" }, diff --git a/examples/solid/infinite-scroll/package.json b/examples/solid/infinite-scroll/package.json index dc1297aa..c28a5c29 100644 --- a/examples/solid/infinite-scroll/package.json +++ b/examples/solid/infinite-scroll/package.json @@ -1,5 +1,5 @@ { - "name": "infinite-scroll", + "name": "tanstack-solid-virtual-example-infinite-scroll", "private": true, "version": "0.0.0", "type": "module", diff --git a/examples/solid/padding/package.json b/examples/solid/padding/package.json index 3574b284..58bc82cc 100644 --- a/examples/solid/padding/package.json +++ b/examples/solid/padding/package.json @@ -1,5 +1,5 @@ { - "name": "padding", + "name": "tanstack-solid-virtual-example-padding", "private": true, "version": "0.0.0", "type": "module", diff --git a/examples/solid/scroll-padding/package.json b/examples/solid/scroll-padding/package.json index ca57b1d7..9c90228a 100644 --- a/examples/solid/scroll-padding/package.json +++ b/examples/solid/scroll-padding/package.json @@ -1,5 +1,5 @@ { - "name": "scroll-padding", + "name": "tanstack-solid-virtual-example-scroll-padding", "private": true, "version": "0.0.0", "type": "module", diff --git a/examples/solid/smooth-scroll/package.json b/examples/solid/smooth-scroll/package.json index 637c79d8..034aa988 100644 --- a/examples/solid/smooth-scroll/package.json +++ b/examples/solid/smooth-scroll/package.json @@ -1,5 +1,5 @@ { - "name": "smooth-scroll", + "name": "tanstack-solid-virtual-example-smooth-scroll", "private": true, "version": "0.0.0", "type": "module", diff --git a/examples/solid/sticky/package.json b/examples/solid/sticky/package.json index ec81f6ed..7d76008e 100644 --- a/examples/solid/sticky/package.json +++ b/examples/solid/sticky/package.json @@ -1,5 +1,5 @@ { - "name": "sticky", + "name": "tanstack-solid-virtual-example-sticky", "private": true, "version": "0.0.0", "type": "module", @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "@faker-js/faker": "^7.6.0", + "@faker-js/faker": "^8.3.1", "@tanstack/solid-virtual": "3.0.1", "lodash": "^4.17.21", "solid-js": "^1.8.7" diff --git a/examples/solid/table/package.json b/examples/solid/table/package.json index bd568092..32e5237e 100644 --- a/examples/solid/table/package.json +++ b/examples/solid/table/package.json @@ -1,5 +1,5 @@ { - "name": "table", + "name": "tanstack-solid-virtual-example-table", "private": true, "version": "0.0.0", "type": "module", @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "@faker-js/faker": "^7.6.0", + "@faker-js/faker": "^8.3.1", "@tanstack/solid-table": "^8.11.7", "@tanstack/solid-virtual": "3.0.1", "solid-js": "^1.8.7" diff --git a/examples/solid/variable/package.json b/examples/solid/variable/package.json index 137e5142..d5dd9f9b 100644 --- a/examples/solid/variable/package.json +++ b/examples/solid/variable/package.json @@ -1,5 +1,5 @@ { - "name": "variable", + "name": "tanstack-solid-virtual-example-variable", "private": true, "version": "0.0.0", "type": "module", diff --git a/examples/svelte/dynamic/package.json b/examples/svelte/dynamic/package.json index 65489294..b375bfd6 100644 --- a/examples/svelte/dynamic/package.json +++ b/examples/svelte/dynamic/package.json @@ -10,7 +10,7 @@ "check": "svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@faker-js/faker": "^7.6.0", + "@faker-js/faker": "^8.3.1", "@tanstack/svelte-virtual": "3.0.4" }, "devDependencies": { diff --git a/examples/svelte/smooth-scroll/package.json b/examples/svelte/smooth-scroll/package.json index 0714fd65..be180557 100644 --- a/examples/svelte/smooth-scroll/package.json +++ b/examples/svelte/smooth-scroll/package.json @@ -10,7 +10,7 @@ "check": "svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@faker-js/faker": "^7.6.0", + "@faker-js/faker": "^8.3.1", "@tanstack/svelte-virtual": "3.0.4" }, "devDependencies": { diff --git a/examples/svelte/sticky/package.json b/examples/svelte/sticky/package.json index dd0fdbaf..87c86e18 100644 --- a/examples/svelte/sticky/package.json +++ b/examples/svelte/sticky/package.json @@ -10,7 +10,7 @@ "check": "svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@faker-js/faker": "^7.6.0", + "@faker-js/faker": "^8.3.1", "@tanstack/svelte-virtual": "3.0.4", "lodash": "^4.17.21" }, diff --git a/examples/svelte/table/package.json b/examples/svelte/table/package.json index e696079f..f8b2b2f6 100644 --- a/examples/svelte/table/package.json +++ b/examples/svelte/table/package.json @@ -10,7 +10,7 @@ "check": "svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@faker-js/faker": "^7.6.0", + "@faker-js/faker": "^8.3.1", "@tanstack/svelte-table": "^8.10.7", "@tanstack/svelte-virtual": "3.0.4" }, diff --git a/examples/vue/dynamic/package.json b/examples/vue/dynamic/package.json index 97c64d4f..34202735 100644 --- a/examples/vue/dynamic/package.json +++ b/examples/vue/dynamic/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "@faker-js/faker": "^7.6.0", + "@faker-js/faker": "^8.3.1", "@tanstack/vue-virtual": "^3.1.0", "vue": "^3.3.4" }, diff --git a/examples/vue/sticky/package.json b/examples/vue/sticky/package.json index aa3cde6b..57e1488e 100644 --- a/examples/vue/sticky/package.json +++ b/examples/vue/sticky/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "@faker-js/faker": "^7.6.0", + "@faker-js/faker": "^8.3.1", "@tanstack/vue-virtual": "^3.1.0", "lodash": "^4.17.21", "vue": "^3.3.4" diff --git a/examples/vue/table/package.json b/examples/vue/table/package.json index 9fa787a9..157722e8 100644 --- a/examples/vue/table/package.json +++ b/examples/vue/table/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "@faker-js/faker": "^7.6.0", + "@faker-js/faker": "^8.3.1", "@tanstack/vue-table": "^8.10.7", "@tanstack/vue-virtual": "^3.1.0", "vue": "^3.3.4" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 241ec6fe..6be696af 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,8 +51,8 @@ importers: examples/react/dynamic: dependencies: '@faker-js/faker': - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^8.3.1 + version: 8.4.1 '@tanstack/react-virtual': specifier: ^3.1.0 version: link:../../../packages/react-virtual @@ -219,8 +219,8 @@ importers: examples/react/sticky: dependencies: '@faker-js/faker': - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^8.3.1 + version: 8.4.1 '@tanstack/react-virtual': specifier: ^3.1.0 version: link:../../../packages/react-virtual @@ -247,8 +247,8 @@ importers: examples/react/table: dependencies: '@faker-js/faker': - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^8.3.1 + version: 8.4.1 '@tanstack/react-table': specifier: ^8.7.9 version: 8.10.7(react-dom@18.2.0)(react@18.2.0) @@ -334,8 +334,8 @@ importers: examples/solid/dynamic: dependencies: '@faker-js/faker': - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^8.3.1 + version: 8.4.1 '@tanstack/solid-virtual': specifier: 3.0.1 version: 3.0.1(solid-js@1.8.15) @@ -454,8 +454,8 @@ importers: examples/solid/sticky: dependencies: '@faker-js/faker': - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^8.3.1 + version: 8.4.1 '@tanstack/solid-virtual': specifier: 3.0.1 version: 3.0.1(solid-js@1.8.15) @@ -482,8 +482,8 @@ importers: examples/solid/table: dependencies: '@faker-js/faker': - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^8.3.1 + version: 8.4.1 '@tanstack/solid-table': specifier: ^8.11.7 version: 8.12.0(solid-js@1.8.15) @@ -545,8 +545,8 @@ importers: examples/svelte/dynamic: dependencies: '@faker-js/faker': - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^8.3.1 + version: 8.4.1 '@tanstack/svelte-virtual': specifier: 3.0.4 version: link:../../../packages/svelte-virtual @@ -635,8 +635,8 @@ importers: examples/svelte/smooth-scroll: dependencies: '@faker-js/faker': - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^8.3.1 + version: 8.4.1 '@tanstack/svelte-virtual': specifier: 3.0.4 version: link:../../../packages/svelte-virtual @@ -666,8 +666,8 @@ importers: examples/svelte/sticky: dependencies: '@faker-js/faker': - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^8.3.1 + version: 8.4.1 '@tanstack/svelte-virtual': specifier: 3.0.4 version: link:../../../packages/svelte-virtual @@ -700,8 +700,8 @@ importers: examples/svelte/table: dependencies: '@faker-js/faker': - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^8.3.1 + version: 8.4.1 '@tanstack/svelte-table': specifier: ^8.10.7 version: 8.10.7(svelte@4.2.8) @@ -734,8 +734,8 @@ importers: examples/vue/dynamic: dependencies: '@faker-js/faker': - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^8.3.1 + version: 8.4.1 '@tanstack/vue-virtual': specifier: ^3.1.0 version: link:../../../packages/vue-virtual @@ -893,8 +893,8 @@ importers: examples/vue/sticky: dependencies: '@faker-js/faker': - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^8.3.1 + version: 8.4.1 '@tanstack/vue-virtual': specifier: ^3.1.0 version: link:../../../packages/vue-virtual @@ -927,8 +927,8 @@ importers: examples/vue/table: dependencies: '@faker-js/faker': - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^8.3.1 + version: 8.4.1 '@tanstack/vue-table': specifier: ^8.10.7 version: 8.10.7(vue@3.3.9) @@ -1561,9 +1561,9 @@ packages: dev: true optional: true - /@faker-js/faker@7.6.0: - resolution: {integrity: sha512-XK6BTq1NDMo9Xqw/YkYyGjSsg44fbNwYRx7QK2CuoQgyy+f1rrTDHoExVM5PsyXCtfl2vs2vVJ0MN0yN6LppRw==} - engines: {node: '>=14.0.0', npm: '>=6.0.0'} + /@faker-js/faker@8.4.1: + resolution: {integrity: sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13'} dev: false /@isaacs/cliui@8.0.2: