virtua 0.50.2 → 0.50.4
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/VList.d.ts +7 -7
- package/lib/angular/Virtualizer.d.ts +11 -11
- package/lib/angular/WindowVirtualizer.d.ts +13 -9
- package/lib/angular/index.js +440 -434
- package/lib/angular/index.js.map +1 -1
- package/lib/core/index.cjs +342 -335
- package/lib/core/index.cjs.map +1 -1
- package/lib/core/index.d.ts +5 -2
- package/lib/core/index.js +326 -318
- package/lib/core/index.js.map +1 -1
- package/lib/core/layouts/types.d.ts +1 -0
- package/lib/core/observer.d.ts +1 -0
- package/lib/core/scroll-to.d.ts +1 -0
- package/lib/core/types.d.ts +1 -5
- package/lib/index.cjs +534 -532
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +496 -494
- package/lib/index.js.map +1 -1
- package/lib/solid/VList.d.ts +1 -1
- package/lib/solid/Virtualizer.d.ts +4 -0
- package/lib/solid/WindowVirtualizer.d.ts +4 -0
- package/lib/solid/index.cjs +366 -378
- package/lib/solid/index.cjs.map +1 -1
- package/lib/solid/index.js +373 -386
- package/lib/solid/index.js.map +1 -1
- package/lib/solid/index.jsx +383 -368
- package/lib/solid/index.jsx.map +1 -1
- package/lib/svelte/ListItem.svelte +2 -2
- package/lib/svelte/Virtualizer.svelte +22 -32
- package/lib/svelte/WindowVirtualizer.svelte +22 -21
- package/lib/svelte/WindowVirtualizer.type.d.ts +4 -0
- package/lib/svelte/utils.js.map +1 -1
- package/lib/vue/WindowVirtualizer.d.ts +4 -0
- package/lib/vue/index.cjs +366 -385
- package/lib/vue/index.cjs.map +1 -1
- package/lib/vue/index.js +342 -361
- package/lib/vue/index.js.map +1 -1
- package/package.json +30 -29
- /package/lib/core/{resizer.d.ts → driver.d.ts} +0 -0
- /package/lib/core/{scroller.d.ts → layouts/list.d.ts} +0 -0
package/lib/angular/VList.d.ts
CHANGED
|
@@ -56,11 +56,11 @@ export declare class VList<T> implements OnInit, VListHandle {
|
|
|
56
56
|
*/
|
|
57
57
|
readonly keepMounted: import("@angular/core").InputSignal<readonly number[] | undefined>;
|
|
58
58
|
/**
|
|
59
|
-
* 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 VListHandle.
|
|
59
|
+
* 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 VListHandle.cache}.
|
|
60
60
|
*
|
|
61
61
|
* **The length of items should be the same as when you take the snapshot, otherwise restoration may not work as expected.**
|
|
62
62
|
*/
|
|
63
|
-
readonly
|
|
63
|
+
readonly cacheProp: import("@angular/core").InputSignal<CacheSnapshot | undefined>;
|
|
64
64
|
/**
|
|
65
65
|
* Emitted whenever scroll offset changes. The value is current scrollTop, or scrollLeft if horizontal: true.
|
|
66
66
|
*/
|
|
@@ -70,10 +70,10 @@ export declare class VList<T> implements OnInit, VListHandle {
|
|
|
70
70
|
*/
|
|
71
71
|
readonly scrollEnd: import("@angular/core").OutputEmitterRef<void>;
|
|
72
72
|
ngOnInit(): void;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
get cache(): CacheSnapshot;
|
|
74
|
+
get scrollOffset(): number;
|
|
75
|
+
get scrollSize(): number;
|
|
76
|
+
get viewportSize(): number;
|
|
77
77
|
findItemIndex(offset: number): number;
|
|
78
78
|
getItemOffset(index: number): number;
|
|
79
79
|
getItemSize(index: number): number;
|
|
@@ -81,5 +81,5 @@ export declare class VList<T> implements OnInit, VListHandle {
|
|
|
81
81
|
scrollTo(offset: number): void;
|
|
82
82
|
scrollBy(offset: number): void;
|
|
83
83
|
static ɵfac: i0.ɵɵFactoryDeclaration<VList<any>, never>;
|
|
84
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<VList<any>, "virtua-vlist", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "getKey": { "alias": "getKey"; "required": false; "isSignal": true; }; "itemProps": { "alias": "itemProps"; "required": false; "isSignal": true; }; "bufferSize": { "alias": "bufferSize"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "ssrCount": { "alias": "ssrCount"; "required": false; "isSignal": true; }; "shift": { "alias": "shift"; "required": false; "isSignal": true; }; "horizontal": { "alias": "horizontal"; "required": false; "isSignal": true; }; "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; "
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<VList<any>, "virtua-vlist", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "getKey": { "alias": "getKey"; "required": false; "isSignal": true; }; "itemProps": { "alias": "itemProps"; "required": false; "isSignal": true; }; "bufferSize": { "alias": "bufferSize"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "ssrCount": { "alias": "ssrCount"; "required": false; "isSignal": true; }; "shift": { "alias": "shift"; "required": false; "isSignal": true; }; "horizontal": { "alias": "horizontal"; "required": false; "isSignal": true; }; "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; "cacheProp": { "alias": "cache"; "required": false; "isSignal": true; }; }, { "scroll": "scroll"; "scrollEnd": "scrollEnd"; }, ["template"], never, true, never>;
|
|
85
85
|
}
|
|
@@ -9,19 +9,19 @@ export interface VirtualizerHandle {
|
|
|
9
9
|
/**
|
|
10
10
|
* Get current {@link CacheSnapshot}.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
readonly cache: CacheSnapshot;
|
|
13
13
|
/**
|
|
14
14
|
* Get current scrollTop, or scrollLeft if horizontal: true.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
readonly scrollOffset: number;
|
|
17
17
|
/**
|
|
18
18
|
* Get current scrollHeight, or scrollWidth if horizontal: true.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
readonly scrollSize: number;
|
|
21
21
|
/**
|
|
22
22
|
* Get current offsetHeight, or offsetWidth if horizontal: true.
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
readonly viewportSize: number;
|
|
25
25
|
/**
|
|
26
26
|
* Find nearest item index from offset.
|
|
27
27
|
* @param offset offset in pixels from the start of the scroll container
|
|
@@ -107,11 +107,11 @@ export declare class Virtualizer<T> implements OnInit, VirtualizerHandle {
|
|
|
107
107
|
*/
|
|
108
108
|
readonly keepMounted: import("@angular/core").InputSignal<readonly number[] | undefined>;
|
|
109
109
|
/**
|
|
110
|
-
* 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 VirtualizerHandle.
|
|
110
|
+
* 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 VirtualizerHandle.cache}.
|
|
111
111
|
*
|
|
112
112
|
* **The length of items should be the same as when you take the snapshot, otherwise restoration may not work as expected.**
|
|
113
113
|
*/
|
|
114
|
-
readonly
|
|
114
|
+
readonly cacheProp: import("@angular/core").InputSignal<CacheSnapshot | undefined>;
|
|
115
115
|
/**
|
|
116
116
|
* The offset to the scrollable parent before virtualizer in pixels. If you put an element before virtualizer, you have to set its height to this prop.
|
|
117
117
|
*/
|
|
@@ -126,10 +126,10 @@ export declare class Virtualizer<T> implements OnInit, VirtualizerHandle {
|
|
|
126
126
|
readonly scrollEnd: import("@angular/core").OutputEmitterRef<void>;
|
|
127
127
|
constructor();
|
|
128
128
|
ngOnInit(): void;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
get cache(): CacheSnapshot;
|
|
130
|
+
get scrollOffset(): number;
|
|
131
|
+
get scrollSize(): number;
|
|
132
|
+
get viewportSize(): number;
|
|
133
133
|
findItemIndex(offset: number): number;
|
|
134
134
|
getItemOffset(index: number): number;
|
|
135
135
|
getItemSize(index: number): number;
|
|
@@ -137,5 +137,5 @@ export declare class Virtualizer<T> implements OnInit, VirtualizerHandle {
|
|
|
137
137
|
scrollTo(offset: number): void;
|
|
138
138
|
scrollBy(offset: number): void;
|
|
139
139
|
static ɵfac: i0.ɵɵFactoryDeclaration<Virtualizer<any>, never>;
|
|
140
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Virtualizer<any>, "virtua-virtualizer, [virtuaVirtualizer]", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "getKey": { "alias": "getKey"; "required": false; "isSignal": true; }; "itemProps": { "alias": "itemProps"; "required": false; "isSignal": true; }; "bufferSize": { "alias": "bufferSize"; "required": false; "isSignal": true; }; "scrollRef": { "alias": "scrollRef"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "ssrCount": { "alias": "ssrCount"; "required": false; "isSignal": true; }; "shift": { "alias": "shift"; "required": false; "isSignal": true; }; "horizontal": { "alias": "horizontal"; "required": false; "isSignal": true; }; "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; "
|
|
140
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Virtualizer<any>, "virtua-virtualizer, [virtuaVirtualizer]", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "getKey": { "alias": "getKey"; "required": false; "isSignal": true; }; "itemProps": { "alias": "itemProps"; "required": false; "isSignal": true; }; "bufferSize": { "alias": "bufferSize"; "required": false; "isSignal": true; }; "scrollRef": { "alias": "scrollRef"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "ssrCount": { "alias": "ssrCount"; "required": false; "isSignal": true; }; "shift": { "alias": "shift"; "required": false; "isSignal": true; }; "horizontal": { "alias": "horizontal"; "required": false; "isSignal": true; }; "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; "cacheProp": { "alias": "cache"; "required": false; "isSignal": true; }; "startMargin": { "alias": "startMargin"; "required": false; "isSignal": true; }; }, { "scroll": "scroll"; "scrollEnd": "scrollEnd"; }, ["contentTemplate"], never, true, never>;
|
|
141
141
|
}
|
|
@@ -8,15 +8,15 @@ export interface WindowVirtualizerHandle {
|
|
|
8
8
|
/**
|
|
9
9
|
* Get current {@link CacheSnapshot}.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
readonly cache: CacheSnapshot;
|
|
12
12
|
/**
|
|
13
13
|
* Get current scrollTop, or scrollLeft if horizontal: true.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
readonly scrollOffset: number;
|
|
16
16
|
/**
|
|
17
17
|
* Get current offsetHeight, or offsetWidth if horizontal: true.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
readonly viewportSize: number;
|
|
20
20
|
/**
|
|
21
21
|
* Find nearest item index from offset.
|
|
22
22
|
* @param offset offset in pixels from the start of the scroll container
|
|
@@ -67,6 +67,10 @@ export declare class WindowVirtualizer<T> implements OnInit, WindowVirtualizerHa
|
|
|
67
67
|
* - If set, you can opt out estimation and use the value as initial item size.
|
|
68
68
|
*/
|
|
69
69
|
readonly itemSize: import("@angular/core").InputSignal<number | undefined>;
|
|
70
|
+
/**
|
|
71
|
+
* A prop for SSR. If set, the specified amount of items will be mounted in the initial rendering regardless of the container size until hydrated. The minimum value is 0.
|
|
72
|
+
*/
|
|
73
|
+
readonly ssrCount: import("@angular/core").InputSignal<number | undefined>;
|
|
70
74
|
/**
|
|
71
75
|
* While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling.
|
|
72
76
|
*/
|
|
@@ -76,11 +80,11 @@ export declare class WindowVirtualizer<T> implements OnInit, WindowVirtualizerHa
|
|
|
76
80
|
*/
|
|
77
81
|
readonly horizontal: import("@angular/core").InputSignal<boolean>;
|
|
78
82
|
/**
|
|
79
|
-
* 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 WindowVirtualizerHandle.
|
|
83
|
+
* 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 WindowVirtualizerHandle.cache}.
|
|
80
84
|
*
|
|
81
85
|
* **The length of items should be the same as when you take the snapshot, otherwise restoration may not work as expected.**
|
|
82
86
|
*/
|
|
83
|
-
readonly
|
|
87
|
+
readonly cacheProp: import("@angular/core").InputSignal<CacheSnapshot | undefined>;
|
|
84
88
|
/**
|
|
85
89
|
* Emitted whenever scroll offset changes.
|
|
86
90
|
*/
|
|
@@ -91,13 +95,13 @@ export declare class WindowVirtualizer<T> implements OnInit, WindowVirtualizerHa
|
|
|
91
95
|
readonly scrollEnd: import("@angular/core").OutputEmitterRef<void>;
|
|
92
96
|
constructor();
|
|
93
97
|
ngOnInit(): void;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
get cache(): CacheSnapshot;
|
|
99
|
+
get scrollOffset(): number;
|
|
100
|
+
get viewportSize(): number;
|
|
97
101
|
findItemIndex(offset: number): number;
|
|
98
102
|
getItemOffset(index: number): number;
|
|
99
103
|
getItemSize(index: number): number;
|
|
100
104
|
scrollToIndex(index: number, opts?: ScrollToIndexOpts): void;
|
|
101
105
|
static ɵfac: i0.ɵɵFactoryDeclaration<WindowVirtualizer<any>, never>;
|
|
102
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<WindowVirtualizer<any>, "virtua-window-virtualizer, [virtuaWindowVirtualizer]", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "getKey": { "alias": "getKey"; "required": false; "isSignal": true; }; "bufferSize": { "alias": "bufferSize"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "shift": { "alias": "shift"; "required": false; "isSignal": true; }; "horizontal": { "alias": "horizontal"; "required": false; "isSignal": true; }; "
|
|
106
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WindowVirtualizer<any>, "virtua-window-virtualizer, [virtuaWindowVirtualizer]", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "getKey": { "alias": "getKey"; "required": false; "isSignal": true; }; "bufferSize": { "alias": "bufferSize"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "ssrCount": { "alias": "ssrCount"; "required": false; "isSignal": true; }; "shift": { "alias": "shift"; "required": false; "isSignal": true; }; "horizontal": { "alias": "horizontal"; "required": false; "isSignal": true; }; "cacheProp": { "alias": "cache"; "required": false; "isSignal": true; }; }, { "scroll": "scroll"; "scrollEnd": "scrollEnd"; }, ["template"], never, true, never>;
|
|
103
107
|
}
|