virtua 0.4.5 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/lib/core/cache.d.ts +2 -1
- package/lib/core/store.d.ts +8 -7
- package/lib/core/types.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/react/VList.d.ts +9 -14
- package/lib/react/WVList.d.ts +10 -15
- package/lib/react/useSelector.d.ts +6 -1
- package/package.json +15 -15
package/lib/react/VList.d.ts
CHANGED
|
@@ -102,20 +102,15 @@ export interface VListProps extends WindowComponentAttributes {
|
|
|
102
102
|
/**
|
|
103
103
|
* Callback invoked when visible items range changes.
|
|
104
104
|
*/
|
|
105
|
-
onRangeChange?: (
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* The total count of items.
|
|
116
|
-
*/
|
|
117
|
-
count: number;
|
|
118
|
-
}) => void;
|
|
105
|
+
onRangeChange?: (
|
|
106
|
+
/**
|
|
107
|
+
* The start index of viewable items.
|
|
108
|
+
*/
|
|
109
|
+
startIndex: number,
|
|
110
|
+
/**
|
|
111
|
+
* The end index of viewable items.
|
|
112
|
+
*/
|
|
113
|
+
endIndex: number) => void;
|
|
119
114
|
}
|
|
120
115
|
/**
|
|
121
116
|
* Virtualized list component. See {@link VListProps} and {@link VListHandle}.
|
package/lib/react/WVList.d.ts
CHANGED
|
@@ -61,23 +61,18 @@ export interface WVListProps extends WindowComponentAttributes {
|
|
|
61
61
|
/**
|
|
62
62
|
* Callback invoked when visible items range changes.
|
|
63
63
|
*/
|
|
64
|
-
onRangeChange?: (
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* The total count of items.
|
|
75
|
-
*/
|
|
76
|
-
count: number;
|
|
77
|
-
}) => void;
|
|
64
|
+
onRangeChange?: (
|
|
65
|
+
/**
|
|
66
|
+
* The start index of viewable items.
|
|
67
|
+
*/
|
|
68
|
+
startIndex: number,
|
|
69
|
+
/**
|
|
70
|
+
* The end index of viewable items.
|
|
71
|
+
*/
|
|
72
|
+
endIndex: number) => void;
|
|
78
73
|
}
|
|
79
74
|
/**
|
|
80
|
-
* Virtualized list component controlled by the window scrolling. See {@link WVListProps}.
|
|
75
|
+
* Virtualized list component controlled by the window scrolling. See {@link WVListProps} and {@link WVListHandle}.
|
|
81
76
|
*/
|
|
82
77
|
export declare const WVList: import("react").ForwardRefExoticComponent<WVListProps & import("react").RefAttributes<WVListHandle>>;
|
|
83
78
|
export {};
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { VirtualStore } from "../core/store";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const SELECT_RANGE: number;
|
|
3
|
+
export declare const SELECT_SCROLL_SIZE = 2;
|
|
4
|
+
export declare const SELECT_JUMP_COUNT = 4;
|
|
5
|
+
export declare const SELECT_IS_SCROLLING = 8;
|
|
6
|
+
export declare const SELECT_ITEM = 2;
|
|
7
|
+
export declare const useSelector: <T>(store: VirtualStore, getSnapShot: () => T, target: number, shouldGetLatest?: boolean) => T;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virtua",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "A zero-config, fast and small (~3kB) virtual list and grid component for React.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
@@ -30,21 +30,21 @@
|
|
|
30
30
|
"@emotion/styled": "11.10.8",
|
|
31
31
|
"@faker-js/faker": "8.0.2",
|
|
32
32
|
"@mui/material": "5.12.3",
|
|
33
|
-
"@playwright/test": "^1.36.
|
|
33
|
+
"@playwright/test": "^1.36.2",
|
|
34
34
|
"@rollup/plugin-babel": "6.0.3",
|
|
35
35
|
"@rollup/plugin-terser": "0.4.3",
|
|
36
36
|
"@rollup/plugin-typescript": "11.1.2",
|
|
37
37
|
"@size-limit/preset-small-lib": "^8.2.6",
|
|
38
|
-
"@storybook/addon-
|
|
39
|
-
"@storybook/react": "7.1.
|
|
40
|
-
"@storybook/react-vite": "^7.1.
|
|
41
|
-
"@storybook/test-runner": "0.
|
|
38
|
+
"@storybook/addon-storysource": "7.1.1",
|
|
39
|
+
"@storybook/react": "7.1.1",
|
|
40
|
+
"@storybook/react-vite": "^7.1.1",
|
|
41
|
+
"@storybook/test-runner": "0.12.0",
|
|
42
42
|
"@tanstack/react-virtual": "3.0.0-alpha.0",
|
|
43
43
|
"@testing-library/react": "14.0.0",
|
|
44
|
-
"@types/react": "18.2.
|
|
44
|
+
"@types/react": "18.2.17",
|
|
45
45
|
"@types/react-virtualized": "9.21.22",
|
|
46
46
|
"@types/react-window": "1.8.5",
|
|
47
|
-
"@typescript-eslint/parser": "6.
|
|
47
|
+
"@typescript-eslint/parser": "6.2.0",
|
|
48
48
|
"concurrently": "8.2.0",
|
|
49
49
|
"eslint": "8.45.0",
|
|
50
50
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
@@ -58,21 +58,21 @@
|
|
|
58
58
|
"react-is": "18.2.0",
|
|
59
59
|
"react-merge-refs": "2.0.2",
|
|
60
60
|
"react-pull-to-refresh": "2.0.1",
|
|
61
|
-
"react-select": "5.7.
|
|
61
|
+
"react-select": "5.7.4",
|
|
62
62
|
"react-virtualized": "9.22.5",
|
|
63
|
-
"react-virtuoso": "4.4.
|
|
63
|
+
"react-virtuoso": "4.4.2",
|
|
64
64
|
"react-window": "1.8.9",
|
|
65
65
|
"rimraf": "5.0.1",
|
|
66
66
|
"rollup": "3.26.3",
|
|
67
67
|
"rollup-plugin-banner2": "1.2.2",
|
|
68
68
|
"size-limit": "^8.2.6",
|
|
69
|
-
"storybook": "^7.1.
|
|
69
|
+
"storybook": "^7.1.1",
|
|
70
70
|
"ts-jest": "29.1.1",
|
|
71
|
-
"typedoc": "0.24.
|
|
72
|
-
"typedoc-plugin-markdown": "3.15.
|
|
71
|
+
"typedoc": "0.24.8",
|
|
72
|
+
"typedoc-plugin-markdown": "3.15.4",
|
|
73
73
|
"typescript": "5.1.6",
|
|
74
|
-
"virtua": "^0.4.
|
|
75
|
-
"vite": "4.4.
|
|
74
|
+
"virtua": "^0.4.5",
|
|
75
|
+
"vite": "4.4.7",
|
|
76
76
|
"wait-on": "7.0.1"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|