react-virtuoso 2.8.0-alpha.3 → 2.8.1
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/dist/AATree.d.ts +40 -40
- package/dist/Grid.d.ts +482 -482
- package/dist/List.d.ts +6253 -6041
- package/dist/Table.d.ts +6087 -5875
- package/dist/alignToBottomSystem.d.ts +549 -529
- package/dist/comparators.d.ts +3 -3
- package/dist/{components/TableVirtuoso.d.ts → components.d.ts} +7869 -5717
- package/dist/domIOSystem.d.ts +15 -15
- package/dist/followOutputSystem.d.ts +378 -362
- package/dist/gridSystem.d.ts +281 -281
- package/dist/groupedListSystem.d.ts +75 -71
- package/dist/hooks/__mocks__/useChangedChildSizes.d.ts +4 -4
- package/dist/hooks/__mocks__/useScrollTop.d.ts +7 -7
- package/dist/hooks/__mocks__/useSize.d.ts +3 -3
- package/dist/hooks/useChangedChildSizes.d.ts +3 -3
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +3 -3
- package/dist/hooks/useScrollTop.d.ts +6 -6
- package/dist/hooks/useSize.d.ts +6 -6
- package/dist/hooks/useWindowViewportRect.d.ts +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.m.js +2 -0
- package/dist/index.m.js.map +1 -0
- package/dist/initialItemCountSystem.d.ts +542 -518
- package/dist/initialScrollTopSystem.d.ts +560 -540
- package/dist/initialTopMostItemIndexSystem.d.ts +163 -153
- package/dist/interfaces.d.ts +279 -279
- package/dist/listStateSystem.d.ts +489 -469
- package/dist/listSystem.d.ts +5426 -5214
- package/dist/loggerSystem.d.ts +17 -17
- package/dist/propsReadySystem.d.ts +12 -12
- package/dist/scrollIntoViewSystem.d.ts +645 -617
- package/dist/scrollSeekSystem.d.ts +57 -57
- package/dist/scrollToIndexSystem.d.ts +81 -77
- package/dist/sizeRangeSystem.d.ts +50 -50
- package/dist/sizeSystem.d.ts +68 -66
- package/dist/stateFlagsSystem.d.ts +65 -65
- package/dist/topItemCountSystem.d.ts +489 -469
- package/dist/totalListHeightSystem.d.ts +517 -497
- package/dist/upwardScrollFixSystem.d.ts +614 -590
- package/dist/utils/binaryArraySearch.d.ts +6 -6
- package/dist/utils/correctItemSize.d.ts +1 -1
- package/dist/utils/positionStickyCssValue.d.ts +1 -1
- package/dist/utils/simpleMemoize.d.ts +1 -1
- package/dist/windowScrollerSystem.d.ts +35 -35
- package/package.json +5 -16
- package/dist/TableVirtuoso.js +0 -2
- package/dist/TableVirtuoso.js.map +0 -1
- package/dist/TableVirtuoso.mjs +0 -2
- package/dist/TableVirtuoso.mjs.map +0 -1
- package/dist/VirtuosoGrid.js +0 -2
- package/dist/VirtuosoGrid.js.map +0 -1
- package/dist/VirtuosoGrid.mjs +0 -2
- package/dist/VirtuosoGrid.mjs.map +0 -1
- package/dist/components/CompProps.d.ts +0 -2
- package/dist/components/GroupedVirtuoso.d.ts +0 -27
- package/dist/components/Virtuoso.d.ts +0 -205
- package/dist/components/VirtuosoGrid.d.ts +0 -93
- package/dist/components/index.d.ts +0 -4
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +0 -1
- package/dist/react-virtuoso.cjs.development.js +0 -3871
- package/dist/react-virtuoso.cjs.development.js.map +0 -1
- package/dist/react-virtuoso.cjs.production.min.js +0 -2
- package/dist/react-virtuoso.cjs.production.min.js.map +0 -1
- package/dist/react-virtuoso.esm.js +0 -3845
- package/dist/react-virtuoso.esm.js.map +0 -1
- package/dist/shared.js +0 -2
- package/dist/shared.js.map +0 -1
- package/dist/shared.mjs +0 -2
- package/dist/shared.mjs.map +0 -1
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { ReactElement, Ref } from 'react';
|
|
2
|
-
import { Grid, GridHandle } from '../Grid';
|
|
3
|
-
import { GridComponents, GridComputeItemKey, GridItemContent, IndexLocationWithAlign, ListRange, ScrollSeekConfiguration } from '../interfaces';
|
|
4
|
-
import { CompProps } from './CompProps';
|
|
5
|
-
declare type GridProps = CompProps<typeof Grid>;
|
|
6
|
-
export interface VirtuosoGridProps<C extends unknown = unknown> extends GridProps {
|
|
7
|
-
/**
|
|
8
|
-
* The total amount of items to be rendered.
|
|
9
|
-
*/
|
|
10
|
-
totalCount: number;
|
|
11
|
-
/**
|
|
12
|
-
* Set the callback to specify the contents of the item.
|
|
13
|
-
*/
|
|
14
|
-
itemContent?: GridItemContent<C>;
|
|
15
|
-
/**
|
|
16
|
-
* Use the `components` property for advanced customization of the elements rendered by the list.
|
|
17
|
-
*/
|
|
18
|
-
components?: GridComponents<C>;
|
|
19
|
-
/**
|
|
20
|
-
* Set the overscan property to make the component "chunk" the rendering of new items on scroll.
|
|
21
|
-
* The property causes the component to render more items than the necessary, but reduces the re-renders on scroll.
|
|
22
|
-
* Setting `{ main: number, reverse: number }` lets you extend the list in both the main and the reverse scrollable directions.
|
|
23
|
-
*/
|
|
24
|
-
overscan?: number | {
|
|
25
|
-
main: number;
|
|
26
|
-
reverse: number;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* If specified, the component will use the function to generate the `key` property for each list item.
|
|
30
|
-
*/
|
|
31
|
-
computeItemKey?: GridComputeItemKey;
|
|
32
|
-
/**
|
|
33
|
-
* Use to display placeholders if the user scrolls fast through the list.
|
|
34
|
-
*
|
|
35
|
-
* Set `components.ScrollSeekPlaceholder` to change the placeholder content.
|
|
36
|
-
*/
|
|
37
|
-
scrollSeekConfiguration?: ScrollSeekConfiguration | false;
|
|
38
|
-
/**
|
|
39
|
-
* Called when the list starts/stops scrolling.
|
|
40
|
-
*/
|
|
41
|
-
isScrolling?: (isScrolling: boolean) => void;
|
|
42
|
-
/**
|
|
43
|
-
* Gets called when the user scrolls to the end of the list.
|
|
44
|
-
* Receives the last item index as an argument. Can be used to implement endless scrolling.
|
|
45
|
-
*/
|
|
46
|
-
endReached?: (index: number) => void;
|
|
47
|
-
/**
|
|
48
|
-
* Called when the user scrolls to the start of the list.
|
|
49
|
-
*/
|
|
50
|
-
startReached?: (index: number) => void;
|
|
51
|
-
/**
|
|
52
|
-
* Called with the new set of items each time the list items are rendered due to scrolling.
|
|
53
|
-
*/
|
|
54
|
-
rangeChanged?: (range: ListRange) => void;
|
|
55
|
-
/**
|
|
56
|
-
* Called with true / false when the list has reached the bottom / gets scrolled up.
|
|
57
|
-
* Can be used to load newer items, like `tail -f`.
|
|
58
|
-
*/
|
|
59
|
-
atBottomStateChange?: (atBottom: boolean) => void;
|
|
60
|
-
/**
|
|
61
|
-
* Called with `true` / `false` when the list has reached the top / gets scrolled down.
|
|
62
|
-
*/
|
|
63
|
-
atTopStateChange?: (atTop: boolean) => void;
|
|
64
|
-
/**
|
|
65
|
-
* Provides access to the root DOM element
|
|
66
|
-
*/
|
|
67
|
-
scrollerRef?: (ref: HTMLElement | null) => any;
|
|
68
|
-
/**
|
|
69
|
-
* Sets the className for the list DOM element
|
|
70
|
-
*/
|
|
71
|
-
listClassName?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Sets the grid items' className
|
|
74
|
-
*/
|
|
75
|
-
itemClassName?: string;
|
|
76
|
-
/**
|
|
77
|
-
* Uses the document scroller rather than wrapping the grid in its own.
|
|
78
|
-
*/
|
|
79
|
-
useWindowScroll?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Pass a reference to a scrollable parent element, so that the grid won't wrap in its own.
|
|
82
|
-
*/
|
|
83
|
-
customScrollParent?: HTMLElement;
|
|
84
|
-
}
|
|
85
|
-
export interface VirtuosoGridHandle extends GridHandle {
|
|
86
|
-
scrollToIndex(location: number | IndexLocationWithAlign): void;
|
|
87
|
-
scrollTo(location: ScrollToOptions): void;
|
|
88
|
-
scrollBy(location: ScrollToOptions): void;
|
|
89
|
-
}
|
|
90
|
-
export declare const VirtuosoGrid: <Context extends unknown = any>(props: VirtuosoGridProps<Context> & {
|
|
91
|
-
ref?: Ref<VirtuosoGridHandle> | undefined;
|
|
92
|
-
}) => ReactElement;
|
|
93
|
-
export {};
|
package/dist/index.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{L as r}from"./shared.mjs";export{a as LogLevel}from"./shared.mjs";export{TableVirtuoso}from"./TableVirtuoso.mjs";export{VirtuosoGrid}from"./VirtuosoGrid.mjs";import"@babel/runtime/helpers/objectWithoutProperties";import"@babel/runtime/helpers/objectSpread2";import"@virtuoso.dev/react-urx";import"@virtuoso.dev/urx";import"react";import"@babel/runtime/helpers/extends";const e=r,o=r;export{o as GroupedVirtuoso,e as Virtuoso};
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/components/Virtuoso.ts","../src/components/GroupedVirtuoso.ts"],"sourcesContent":[null,null],"names":["Virtuoso","List","GroupedVirtuoso"],"mappings":"8XAmPaA,EAAWC,EClNXC,EAAkBD"}
|