virtua 0.53.0 → 0.53.2
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/lib/angular/VGrid.d.ts +5 -1
- package/lib/angular/VList.d.ts +5 -1
- package/lib/angular/VMasonry.d.ts +10 -1
- package/lib/angular/Virtualizer.d.ts +5 -1
- package/lib/angular/WindowVirtualizer.d.ts +5 -1
- package/lib/angular/index.js +410 -376
- package/lib/angular/index.js.map +1 -1
- package/lib/core/index.cjs +101 -108
- package/lib/core/index.cjs.map +1 -1
- package/lib/core/index.d.ts +1 -1
- package/lib/core/index.js +193 -200
- package/lib/core/index.js.map +1 -1
- package/lib/index.cjs +423 -407
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +436 -421
- package/lib/index.js.map +1 -1
- package/lib/react/VGrid.d.ts +4 -0
- package/lib/react/VList.d.ts +1 -1
- package/lib/react/VMasonry.d.ts +8 -0
- package/lib/react/Virtualizer.d.ts +4 -0
- package/lib/react/WindowVirtualizer.d.ts +4 -0
- package/lib/react/types.d.ts +1 -1
- package/lib/solid/VGrid.d.ts +4 -0
- package/lib/solid/VList.d.ts +1 -1
- package/lib/solid/VMasonry.d.ts +8 -0
- package/lib/solid/Virtualizer.d.ts +4 -0
- package/lib/solid/WindowVirtualizer.d.ts +4 -0
- package/lib/solid/index.cjs +453 -437
- package/lib/solid/index.cjs.map +1 -1
- package/lib/solid/index.js +415 -399
- package/lib/solid/index.js.map +1 -1
- package/lib/solid/index.jsx +55 -25
- package/lib/solid/index.jsx.map +1 -1
- package/lib/solid/types.d.ts +1 -1
- package/lib/svelte/VGrid.svelte +26 -6
- package/lib/svelte/VGrid.type.d.ts +4 -0
- package/lib/svelte/VList.svelte +2 -0
- package/lib/svelte/VList.type.d.ts +1 -1
- package/lib/svelte/VMasonry.svelte +28 -7
- package/lib/svelte/VMasonry.type.d.ts +8 -0
- package/lib/svelte/Virtualizer.svelte +9 -2
- package/lib/svelte/Virtualizer.type.d.ts +4 -0
- package/lib/svelte/WindowVirtualizer.svelte +9 -2
- package/lib/svelte/WindowVirtualizer.type.d.ts +4 -0
- package/lib/svelte/types.d.ts +1 -1
- package/lib/vue/VGrid.d.ts +4 -0
- package/lib/vue/VList.d.ts +1 -1
- package/lib/vue/VMasonry.d.ts +8 -0
- package/lib/vue/Virtualizer.d.ts +4 -0
- package/lib/vue/WindowVirtualizer.d.ts +4 -0
- package/lib/vue/index.cjs +625 -608
- package/lib/vue/index.cjs.map +1 -1
- package/lib/vue/index.js +605 -588
- package/lib/vue/index.js.map +1 -1
- package/package.json +1 -1
package/lib/react/VGrid.d.ts
CHANGED
|
@@ -182,6 +182,10 @@ export interface VGridProps<R = number, C = number> extends Omit<ViewportCompone
|
|
|
182
182
|
* Callback invoked when scrolling stops.
|
|
183
183
|
*/
|
|
184
184
|
onScrollEnd?: () => void;
|
|
185
|
+
/**
|
|
186
|
+
* Callback invoked when the size of the viewport or the items changes.
|
|
187
|
+
*/
|
|
188
|
+
onResize?: () => void;
|
|
185
189
|
}
|
|
186
190
|
/**
|
|
187
191
|
* Virtualized grid component for tabular data. See {@link VGridProps} and {@link VGridHandle}.
|
package/lib/react/VList.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface VListHandle extends VirtualizerHandle {
|
|
|
9
9
|
/**
|
|
10
10
|
* Props of {@link VList}.
|
|
11
11
|
*/
|
|
12
|
-
export interface VListProps<T = unknown> extends Pick<VirtualizerProps<T>, "children" | "data" | "bufferSize" | "itemSize" | "shift" | "horizontal" | "cache" | "ssrCount" | "item" | "onScroll" | "onScrollEnd" | "keepMounted">, ViewportComponentAttributes {
|
|
12
|
+
export interface VListProps<T = unknown> extends Pick<VirtualizerProps<T>, "children" | "data" | "bufferSize" | "itemSize" | "shift" | "horizontal" | "cache" | "ssrCount" | "item" | "onScroll" | "onScrollEnd" | "onResize" | "keepMounted">, ViewportComponentAttributes {
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Virtualized list component. See {@link VListProps} and {@link VListHandle}.
|
package/lib/react/VMasonry.d.ts
CHANGED
|
@@ -81,6 +81,10 @@ export interface VMasonryProps<T> extends ViewportComponentAttributes {
|
|
|
81
81
|
* @defaultValue 200
|
|
82
82
|
*/
|
|
83
83
|
bufferSize?: number;
|
|
84
|
+
/**
|
|
85
|
+
* List of indexes that should be always mounted, even when off screen.
|
|
86
|
+
*/
|
|
87
|
+
keepMounted?: readonly number[];
|
|
84
88
|
/**
|
|
85
89
|
* You can restore cache by passing a {@link CacheSnapshot} on mount. This is useful when you want to restore scroll position after navigation. The snapshot can be obtained from {@link VMasonryHandle.cache}.
|
|
86
90
|
*
|
|
@@ -96,6 +100,10 @@ export interface VMasonryProps<T> extends ViewportComponentAttributes {
|
|
|
96
100
|
* Callback invoked when scrolling stops.
|
|
97
101
|
*/
|
|
98
102
|
onScrollEnd?: () => void;
|
|
103
|
+
/**
|
|
104
|
+
* Callback invoked when the size of the viewport or the items changes.
|
|
105
|
+
*/
|
|
106
|
+
onResize?: () => void;
|
|
99
107
|
}
|
|
100
108
|
/**
|
|
101
109
|
* Virtualized masonry component. See {@link VMasonryProps} and {@link VMasonryHandle}.
|
|
@@ -130,6 +130,10 @@ export interface VirtualizerProps<T = unknown> {
|
|
|
130
130
|
* Callback invoked when scrolling stops.
|
|
131
131
|
*/
|
|
132
132
|
onScrollEnd?: () => void;
|
|
133
|
+
/**
|
|
134
|
+
* Callback invoked when the size of the viewport or the items changes.
|
|
135
|
+
*/
|
|
136
|
+
onResize?: () => void;
|
|
133
137
|
}
|
|
134
138
|
/**
|
|
135
139
|
* Customizable list virtualizer for advanced usage. See {@link VirtualizerProps} and {@link VirtualizerHandle}.
|
|
@@ -103,6 +103,10 @@ export interface WindowVirtualizerProps<T = unknown> {
|
|
|
103
103
|
* Callback invoked when scrolling stops.
|
|
104
104
|
*/
|
|
105
105
|
onScrollEnd?: () => void;
|
|
106
|
+
/**
|
|
107
|
+
* Callback invoked when the size of the viewport or the items changes.
|
|
108
|
+
*/
|
|
109
|
+
onResize?: () => void;
|
|
106
110
|
}
|
|
107
111
|
/**
|
|
108
112
|
* {@link Virtualizer} controlled by the window scrolling. See {@link WindowVirtualizerProps} and {@link WindowVirtualizerHandle}.
|
package/lib/react/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType, CSSProperties, LegacyRef, ReactNode } from 'react';
|
|
2
|
-
export type ViewportComponentAttributes = Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onScroll" | "onScrollEnd">;
|
|
2
|
+
export type ViewportComponentAttributes = Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onScroll" | "onScrollEnd" | "onResize">;
|
|
3
3
|
export interface CustomContainerComponentProps {
|
|
4
4
|
style: CSSProperties;
|
|
5
5
|
children: ReactNode;
|
package/lib/solid/VGrid.d.ts
CHANGED
|
@@ -186,6 +186,10 @@ export interface VGridProps<R = number, C = number> extends Omit<ViewportCompone
|
|
|
186
186
|
* Callback invoked when scrolling stops.
|
|
187
187
|
*/
|
|
188
188
|
onScrollEnd?: () => void;
|
|
189
|
+
/**
|
|
190
|
+
* Callback invoked when the size of the viewport or the items changes.
|
|
191
|
+
*/
|
|
192
|
+
onResize?: () => void;
|
|
189
193
|
}
|
|
190
194
|
/**
|
|
191
195
|
* Virtualized grid component for tabular data. See {@link VGridProps} and {@link VGridHandle}.
|
package/lib/solid/VList.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface VListHandle extends VirtualizerHandle {
|
|
|
9
9
|
/**
|
|
10
10
|
* Props of {@link VList}.
|
|
11
11
|
*/
|
|
12
|
-
export interface VListProps<T> extends Pick<VirtualizerProps<T>, "ref" | "data" | "children" | "bufferSize" | "itemSize" | "ssrCount" | "shift" | "horizontal" | "cache" | "item" | "onScroll" | "onScrollEnd" | "keepMounted">, ViewportComponentAttributes {
|
|
12
|
+
export interface VListProps<T> extends Pick<VirtualizerProps<T>, "ref" | "data" | "children" | "bufferSize" | "itemSize" | "ssrCount" | "shift" | "horizontal" | "cache" | "item" | "onScroll" | "onScrollEnd" | "onResize" | "keepMounted">, ViewportComponentAttributes {
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Virtualized list component. See {@link VListProps} and {@link VListHandle}.
|
package/lib/solid/VMasonry.d.ts
CHANGED
|
@@ -85,6 +85,10 @@ export interface VMasonryProps<T> extends ViewportComponentAttributes {
|
|
|
85
85
|
* @defaultValue 200
|
|
86
86
|
*/
|
|
87
87
|
bufferSize?: number;
|
|
88
|
+
/**
|
|
89
|
+
* List of indexes that should be always mounted, even when off screen.
|
|
90
|
+
*/
|
|
91
|
+
keepMounted?: readonly number[];
|
|
88
92
|
/**
|
|
89
93
|
* You can restore cache by passing a {@link CacheSnapshot} on mount. This is useful when you want to restore scroll position after navigation. The snapshot can be obtained from {@link VMasonryHandle.cache}.
|
|
90
94
|
*
|
|
@@ -100,6 +104,10 @@ export interface VMasonryProps<T> extends ViewportComponentAttributes {
|
|
|
100
104
|
* Callback invoked when scrolling stops.
|
|
101
105
|
*/
|
|
102
106
|
onScrollEnd?: () => void;
|
|
107
|
+
/**
|
|
108
|
+
* Callback invoked when the size of the viewport or the items changes.
|
|
109
|
+
*/
|
|
110
|
+
onResize?: () => void;
|
|
103
111
|
}
|
|
104
112
|
/**
|
|
105
113
|
* Virtualized masonry component. See {@link VMasonryProps} and {@link VMasonryHandle}.
|
|
@@ -131,6 +131,10 @@ export interface VirtualizerProps<T> {
|
|
|
131
131
|
* Callback invoked when scrolling stops.
|
|
132
132
|
*/
|
|
133
133
|
onScrollEnd?: () => void;
|
|
134
|
+
/**
|
|
135
|
+
* Callback invoked when the size of the viewport or the items changes.
|
|
136
|
+
*/
|
|
137
|
+
onResize?: () => void;
|
|
134
138
|
}
|
|
135
139
|
/**
|
|
136
140
|
* Customizable list virtualizer for advanced usage. See {@link VirtualizerProps} and {@link VirtualizerHandle}.
|
|
@@ -94,6 +94,10 @@ export interface WindowVirtualizerProps<T> {
|
|
|
94
94
|
* Callback invoked when scrolling stops.
|
|
95
95
|
*/
|
|
96
96
|
onScrollEnd?: () => void;
|
|
97
|
+
/**
|
|
98
|
+
* Callback invoked when the size of the viewport or the items changes.
|
|
99
|
+
*/
|
|
100
|
+
onResize?: () => void;
|
|
97
101
|
}
|
|
98
102
|
/**
|
|
99
103
|
* {@link Virtualizer} controlled by the window scrolling. See {@link WindowVirtualizerProps} and {@link WindowVirtualizerHandle}.
|