virtua 0.13.0 → 0.15.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 +22 -22
- package/lib/core/cache.d.ts +0 -1
- package/lib/core/environment.d.ts +2 -0
- package/lib/core/scroller.d.ts +2 -2
- package/lib/core/store.d.ts +12 -14
- package/lib/core/types.d.ts +17 -7
- package/lib/index.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/ListItem.d.ts +3 -3
- package/lib/react/VGrid.d.ts +1 -1
- package/lib/react/VList.d.ts +4 -5
- package/lib/react/WVList.d.ts +2 -2
- package/lib/react/useRerender.d.ts +1 -0
- package/package.json +26 -26
- package/lib/react/useSelector.d.ts +0 -2
package/lib/react/ListItem.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CSSProperties, ReactElement, ReactNode } from "react";
|
|
2
|
-
import { VirtualStore } from "../core/store";
|
|
3
2
|
import { ListResizer } from "../core/resizer";
|
|
4
3
|
/**
|
|
5
4
|
* Props of customized item component for {@link VList}.
|
|
@@ -12,10 +11,11 @@ export type CustomItemComponent = React.ForwardRefExoticComponent<React.PropsWit
|
|
|
12
11
|
type ListItemProps = {
|
|
13
12
|
_children: ReactNode;
|
|
14
13
|
_resizer: ListResizer;
|
|
15
|
-
_store: VirtualStore;
|
|
16
14
|
_index: number;
|
|
15
|
+
_offset: number;
|
|
16
|
+
_hide: boolean;
|
|
17
17
|
_element: "div";
|
|
18
18
|
_isHorizontal: boolean;
|
|
19
19
|
};
|
|
20
|
-
export declare const ListItem: import("react").MemoExoticComponent<({ _children: children, _resizer: resizer,
|
|
20
|
+
export declare const ListItem: import("react").MemoExoticComponent<({ _children: children, _resizer: resizer, _index: index, _offset: offset, _hide: hide, _element: Element, _isHorizontal: isHorizontal, }: ListItemProps) => ReactElement>;
|
|
21
21
|
export {};
|
package/lib/react/VGrid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from "react";
|
|
2
|
-
import { CustomViewportComponent, ViewportComponentAttributes } from "
|
|
2
|
+
import { CustomViewportComponent, ViewportComponentAttributes } from "./Viewport";
|
|
3
3
|
/**
|
|
4
4
|
* Props of customized cell component for {@link VGrid}.
|
|
5
5
|
*/
|
package/lib/react/VList.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import { ViewportComponentAttributes } from "
|
|
3
|
-
import { CustomViewportComponent } from "./Viewport";
|
|
2
|
+
import { CustomViewportComponent, ViewportComponentAttributes } from "./Viewport";
|
|
4
3
|
import { CustomItemComponent } from "./ListItem";
|
|
5
|
-
import { CacheSnapshot,
|
|
4
|
+
import { CacheSnapshot, ScrollToIndexOpts } from "../core/types";
|
|
6
5
|
type CustomItemComponentOrElement = keyof JSX.IntrinsicElements | CustomItemComponent;
|
|
7
6
|
/**
|
|
8
7
|
* Methods of {@link VList}.
|
|
@@ -27,9 +26,9 @@ export interface VListHandle {
|
|
|
27
26
|
/**
|
|
28
27
|
* Scroll to the item specified by index.
|
|
29
28
|
* @param index index of item
|
|
30
|
-
* @param
|
|
29
|
+
* @param opts options
|
|
31
30
|
*/
|
|
32
|
-
scrollToIndex(index: number,
|
|
31
|
+
scrollToIndex(index: number, opts?: ScrollToIndexOpts): void;
|
|
33
32
|
/**
|
|
34
33
|
* Scroll to the given offset.
|
|
35
34
|
* @param offset offset from start
|
package/lib/react/WVList.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import { CacheSnapshot
|
|
3
|
-
import { CustomViewportComponent } from "./Viewport";
|
|
2
|
+
import { CacheSnapshot } from "../core/types";
|
|
3
|
+
import { CustomViewportComponent, ViewportComponentAttributes } from "./Viewport";
|
|
4
4
|
import { CustomItemComponent } from "./ListItem";
|
|
5
5
|
type CustomItemComponentOrElement = keyof JSX.IntrinsicElements | CustomItemComponent;
|
|
6
6
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useRerender: () => (() => void);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virtua",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A zero-config, fast and small (~3kB) virtual list and grid component for React.",
|
|
3
|
+
"version": "0.15.0",
|
|
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",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -37,55 +37,54 @@
|
|
|
37
37
|
"@dnd-kit/sortable": "7.0.2",
|
|
38
38
|
"@emotion/react": "11.10.8",
|
|
39
39
|
"@emotion/styled": "11.10.8",
|
|
40
|
-
"@faker-js/faker": "8.
|
|
40
|
+
"@faker-js/faker": "8.2.0",
|
|
41
41
|
"@mui/material": "5.14.11",
|
|
42
|
-
"@playwright/test": "^1.
|
|
42
|
+
"@playwright/test": "^1.39.0",
|
|
43
43
|
"@radix-ui/colors": "2.1.0",
|
|
44
44
|
"@radix-ui/react-scroll-area": "1.0.5",
|
|
45
|
-
"@rollup/plugin-babel": "6.0.
|
|
46
|
-
"@rollup/plugin-terser": "0.4.
|
|
47
|
-
"@rollup/plugin-typescript": "11.1.
|
|
48
|
-
"@size-limit/preset-small-lib": "^
|
|
49
|
-
"@storybook/addon-storysource": "7.
|
|
50
|
-
"@storybook/react": "7.
|
|
51
|
-
"@storybook/react-vite": "^7.
|
|
45
|
+
"@rollup/plugin-babel": "6.0.4",
|
|
46
|
+
"@rollup/plugin-terser": "0.4.4",
|
|
47
|
+
"@rollup/plugin-typescript": "11.1.5",
|
|
48
|
+
"@size-limit/preset-small-lib": "^10.0.1",
|
|
49
|
+
"@storybook/addon-storysource": "7.5.1",
|
|
50
|
+
"@storybook/react": "7.5.1",
|
|
51
|
+
"@storybook/react-vite": "^7.5.1",
|
|
52
52
|
"@storybook/test-runner": "0.13.0",
|
|
53
53
|
"@tanstack/react-virtual": "3.0.0-alpha.0",
|
|
54
54
|
"@testing-library/react": "14.0.0",
|
|
55
|
-
"@types/react": "18.2.
|
|
55
|
+
"@types/react": "18.2.31",
|
|
56
56
|
"@types/react-beautiful-dnd": "13.1.4",
|
|
57
|
-
"@types/react-virtualized": "9.21.
|
|
58
|
-
"@types/react-window": "1.8.
|
|
59
|
-
"@typescript-eslint/parser": "6.
|
|
57
|
+
"@types/react-virtualized": "9.21.26",
|
|
58
|
+
"@types/react-window": "1.8.7",
|
|
59
|
+
"@typescript-eslint/parser": "6.9.0",
|
|
60
60
|
"concurrently": "8.2.0",
|
|
61
|
-
"eslint": "8.
|
|
61
|
+
"eslint": "8.52.0",
|
|
62
62
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
63
|
-
"jest": "29.
|
|
64
|
-
"jest-environment-jsdom": "29.
|
|
63
|
+
"jest": "29.7.0",
|
|
64
|
+
"jest-environment-jsdom": "29.7.0",
|
|
65
65
|
"re-resizable": "6.9.11",
|
|
66
66
|
"react": "18.2.0",
|
|
67
67
|
"react-beautiful-dnd": "13.1.1",
|
|
68
68
|
"react-content-loader": "6.2.1",
|
|
69
|
-
"react-cool-virtual": "0.7.0",
|
|
70
69
|
"react-dom": "18.2.0",
|
|
71
70
|
"react-is": "18.2.0",
|
|
72
71
|
"react-merge-refs": "2.0.2",
|
|
73
72
|
"react-pull-to-refresh": "2.0.1",
|
|
74
73
|
"react-select": "5.7.4",
|
|
75
74
|
"react-virtualized": "9.22.5",
|
|
76
|
-
"react-virtuoso": "4.6.
|
|
75
|
+
"react-virtuoso": "4.6.2",
|
|
77
76
|
"react-window": "1.8.9",
|
|
78
77
|
"rimraf": "5.0.1",
|
|
79
|
-
"rollup": "
|
|
78
|
+
"rollup": "4.1.4",
|
|
80
79
|
"rollup-plugin-banner2": "1.2.2",
|
|
81
|
-
"size-limit": "^
|
|
82
|
-
"storybook": "^7.
|
|
80
|
+
"size-limit": "^10.0.1",
|
|
81
|
+
"storybook": "^7.5.1",
|
|
83
82
|
"ts-jest": "29.1.1",
|
|
84
83
|
"typedoc": "0.24.8",
|
|
85
84
|
"typedoc-plugin-markdown": "3.15.4",
|
|
86
|
-
"typescript": "5.
|
|
87
|
-
"virtua": "^0.
|
|
88
|
-
"vite": "4.
|
|
85
|
+
"typescript": "5.2.2",
|
|
86
|
+
"virtua": "^0.14.0",
|
|
87
|
+
"vite": "4.5.0",
|
|
89
88
|
"wait-on": "7.0.1"
|
|
90
89
|
},
|
|
91
90
|
"peerDependencies": {
|
|
@@ -105,6 +104,7 @@
|
|
|
105
104
|
"grid",
|
|
106
105
|
"table",
|
|
107
106
|
"flex",
|
|
107
|
+
"scroll",
|
|
108
108
|
"scroller",
|
|
109
109
|
"scrolling",
|
|
110
110
|
"virtual",
|