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.
Files changed (72) hide show
  1. package/dist/AATree.d.ts +40 -40
  2. package/dist/Grid.d.ts +482 -482
  3. package/dist/List.d.ts +6253 -6041
  4. package/dist/Table.d.ts +6087 -5875
  5. package/dist/alignToBottomSystem.d.ts +549 -529
  6. package/dist/comparators.d.ts +3 -3
  7. package/dist/{components/TableVirtuoso.d.ts → components.d.ts} +7869 -5717
  8. package/dist/domIOSystem.d.ts +15 -15
  9. package/dist/followOutputSystem.d.ts +378 -362
  10. package/dist/gridSystem.d.ts +281 -281
  11. package/dist/groupedListSystem.d.ts +75 -71
  12. package/dist/hooks/__mocks__/useChangedChildSizes.d.ts +4 -4
  13. package/dist/hooks/__mocks__/useScrollTop.d.ts +7 -7
  14. package/dist/hooks/__mocks__/useSize.d.ts +3 -3
  15. package/dist/hooks/useChangedChildSizes.d.ts +3 -3
  16. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +3 -3
  17. package/dist/hooks/useScrollTop.d.ts +6 -6
  18. package/dist/hooks/useSize.d.ts +6 -6
  19. package/dist/hooks/useWindowViewportRect.d.ts +2 -2
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.js +1 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.m.js +2 -0
  24. package/dist/index.m.js.map +1 -0
  25. package/dist/initialItemCountSystem.d.ts +542 -518
  26. package/dist/initialScrollTopSystem.d.ts +560 -540
  27. package/dist/initialTopMostItemIndexSystem.d.ts +163 -153
  28. package/dist/interfaces.d.ts +279 -279
  29. package/dist/listStateSystem.d.ts +489 -469
  30. package/dist/listSystem.d.ts +5426 -5214
  31. package/dist/loggerSystem.d.ts +17 -17
  32. package/dist/propsReadySystem.d.ts +12 -12
  33. package/dist/scrollIntoViewSystem.d.ts +645 -617
  34. package/dist/scrollSeekSystem.d.ts +57 -57
  35. package/dist/scrollToIndexSystem.d.ts +81 -77
  36. package/dist/sizeRangeSystem.d.ts +50 -50
  37. package/dist/sizeSystem.d.ts +68 -66
  38. package/dist/stateFlagsSystem.d.ts +65 -65
  39. package/dist/topItemCountSystem.d.ts +489 -469
  40. package/dist/totalListHeightSystem.d.ts +517 -497
  41. package/dist/upwardScrollFixSystem.d.ts +614 -590
  42. package/dist/utils/binaryArraySearch.d.ts +6 -6
  43. package/dist/utils/correctItemSize.d.ts +1 -1
  44. package/dist/utils/positionStickyCssValue.d.ts +1 -1
  45. package/dist/utils/simpleMemoize.d.ts +1 -1
  46. package/dist/windowScrollerSystem.d.ts +35 -35
  47. package/package.json +5 -16
  48. package/dist/TableVirtuoso.js +0 -2
  49. package/dist/TableVirtuoso.js.map +0 -1
  50. package/dist/TableVirtuoso.mjs +0 -2
  51. package/dist/TableVirtuoso.mjs.map +0 -1
  52. package/dist/VirtuosoGrid.js +0 -2
  53. package/dist/VirtuosoGrid.js.map +0 -1
  54. package/dist/VirtuosoGrid.mjs +0 -2
  55. package/dist/VirtuosoGrid.mjs.map +0 -1
  56. package/dist/components/CompProps.d.ts +0 -2
  57. package/dist/components/GroupedVirtuoso.d.ts +0 -27
  58. package/dist/components/Virtuoso.d.ts +0 -205
  59. package/dist/components/VirtuosoGrid.d.ts +0 -93
  60. package/dist/components/index.d.ts +0 -4
  61. package/dist/index.mjs +0 -2
  62. package/dist/index.mjs.map +0 -1
  63. package/dist/react-virtuoso.cjs.development.js +0 -3871
  64. package/dist/react-virtuoso.cjs.development.js.map +0 -1
  65. package/dist/react-virtuoso.cjs.production.min.js +0 -2
  66. package/dist/react-virtuoso.cjs.production.min.js.map +0 -1
  67. package/dist/react-virtuoso.esm.js +0 -3845
  68. package/dist/react-virtuoso.esm.js.map +0 -1
  69. package/dist/shared.js +0 -2
  70. package/dist/shared.js.map +0 -1
  71. package/dist/shared.mjs +0 -2
  72. package/dist/shared.mjs.map +0 -1
@@ -1,279 +1,279 @@
1
- import { ComponentPropsWithRef, ComponentType, Key, ReactNode } from 'react';
2
- export interface ListRange {
3
- startIndex: number;
4
- endIndex: number;
5
- }
6
- export interface ItemContent<D, C> {
7
- (index: number, data: D, context: C): ReactNode;
8
- }
9
- export declare type FixedHeaderContent = (() => React.ReactChildren | React.ReactNode) | null;
10
- export interface GroupItemContent<D, C> {
11
- (index: number, groupIndex: number, data: D, context: C): ReactNode;
12
- }
13
- export interface GroupContent {
14
- (index: number): ReactNode;
15
- }
16
- export interface ItemProps {
17
- 'data-index': number;
18
- 'data-item-index': number;
19
- 'data-item-group-index'?: number;
20
- 'data-known-size': number;
21
- }
22
- export interface GroupProps {
23
- 'data-index': number;
24
- 'data-item-index': number;
25
- 'data-known-size': number;
26
- }
27
- export declare type TopItemListProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children'>;
28
- export declare type TableProps = Pick<ComponentPropsWithRef<'table'>, 'style'>;
29
- /**
30
- * Passed to the Components.List custom component
31
- */
32
- export declare type ListProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children' | 'ref'> & {
33
- 'data-test-id': string;
34
- };
35
- /**
36
- * Passed to the Components.List custom component
37
- */
38
- export declare type GridListProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children' | 'ref' | 'className'>;
39
- /**
40
- * Passed to the Components.Scroller custom component
41
- */
42
- export declare type ScrollerProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children' | 'tabIndex' | 'ref'> & {
43
- 'data-test-id'?: string;
44
- 'data-virtuoso-scroller'?: boolean;
45
- };
46
- /**
47
- * Passed to the Components.ScrollSeekPlaceholder custom component
48
- */
49
- export interface ScrollSeekPlaceholderProps {
50
- index: number;
51
- height: number;
52
- groupIndex?: number;
53
- type: 'group' | 'item';
54
- }
55
- /**
56
- * Passed to the GridComponents.ScrollSeekPlaceholder custom component
57
- */
58
- export interface GridScrollSeekPlaceholderProps {
59
- index: number;
60
- height: number;
61
- width: number;
62
- }
63
- /**
64
- * Customize the Virtuoso rendering by passing a set of custom components.
65
- */
66
- export interface Components<Context = unknown> {
67
- /**
68
- * Set to render a component at the top of the list.
69
- *
70
- * The header remains above the top items and does not remain sticky.
71
- */
72
- Header?: ComponentType<{
73
- context?: Context;
74
- }>;
75
- /**
76
- * Set to render a component at the bottom of the list.
77
- */
78
- Footer?: ComponentType<{
79
- context?: Context;
80
- }>;
81
- /**
82
- * Set to customize the item wrapping element. Use only if you would like to render list from elements different than a `div`.
83
- */
84
- Item?: ComponentType<ItemProps & {
85
- context?: Context;
86
- }>;
87
- /**
88
- * Set to customize the group item wrapping element. Use only if you would like to render list from elements different than a `div`.
89
- */
90
- Group?: ComponentType<GroupProps & {
91
- context?: Context;
92
- }>;
93
- /**
94
- * Set to customize the top list item wrapping element. Use if you would like to render list from elements different than a `div`
95
- * or you want to set a custom z-index for the sticky position.
96
- */
97
- TopItemList?: ComponentType<TopItemListProps & {
98
- context?: Context;
99
- }>;
100
- /**
101
- * Set to customize the outermost scrollable element. This should not be necessary in general,
102
- * as the component passes its HTML attribute props to it.
103
- */
104
- Scroller?: ComponentType<ScrollerProps & {
105
- context?: Context;
106
- }>;
107
- /**
108
- * Set to customize the items wrapper. Use only if you would like to render list from elements different than a `div`.
109
- */
110
- List?: ComponentType<ListProps & {
111
- context?: Context;
112
- }>;
113
- /**
114
- * Set to render a custom UI when the list is empty.
115
- */
116
- EmptyPlaceholder?: ComponentType<{
117
- context?: Context;
118
- }>;
119
- /**
120
- * Set to render an item placeholder when the user scrolls fast. See the `scrollSeek` property for more details.
121
- */
122
- ScrollSeekPlaceholder?: ComponentType<ScrollSeekPlaceholderProps & {
123
- context?: Context;
124
- }>;
125
- }
126
- /**
127
- * Customize the TableVirtuoso rendering by passing a set of custom components.
128
- */
129
- export interface TableComponents<Context = unknown> {
130
- /**
131
- * Set to customize the wrapping `table` element.
132
- *
133
- */
134
- Table?: ComponentType<TableProps & {
135
- context?: Context;
136
- }>;
137
- /**
138
- * Set to render a fixed header at the top of the table (`thead`). use [[fixedHeaderHeight]] to set the contents
139
- *
140
- */
141
- TableHead?: ComponentType<{
142
- context?: Context;
143
- }>;
144
- /**
145
- * Set to customize the item wrapping element. Default is `tr`.
146
- */
147
- TableRow?: ComponentType<ItemProps & {
148
- context?: Context;
149
- }>;
150
- /**
151
- * Set to customize the outermost scrollable element. This should not be necessary in general,
152
- * as the component passes its HTML attribute props to it.
153
- */
154
- Scroller?: ComponentType<ScrollerProps & {
155
- context?: Context;
156
- }>;
157
- /**
158
- * Set to customize the items wrapper. Default is `tbody`.
159
- */
160
- TableBody?: ComponentType<ListProps & {
161
- context?: Context;
162
- }>;
163
- /**
164
- * Set to render a custom UI when the list is empty.
165
- */
166
- EmptyPlaceholder?: ComponentType<{
167
- context?: Context;
168
- }>;
169
- /**
170
- * Set to render an item placeholder when the user scrolls fast. See the `scrollSeek` property for more details.
171
- */
172
- ScrollSeekPlaceholder?: ComponentType<ScrollSeekPlaceholderProps & {
173
- context?: Context;
174
- }>;
175
- }
176
- export interface ComputeItemKey<D, C> {
177
- (index: number, item: D, context: C): Key;
178
- }
179
- export interface ScrollSeekToggle {
180
- (velocity: number, range: ListRange): boolean;
181
- }
182
- export interface ScrollSeekConfiguration {
183
- /**
184
- * Callback to determine if the list should enter "scroll seek" mode.
185
- */
186
- enter: ScrollSeekToggle;
187
- /**
188
- * called during scrolling in scroll seek mode - use to display a hint where the list is.
189
- */
190
- change?: (velocity: number, range: ListRange) => void;
191
- /**
192
- * Callback to determine if the list should enter "scroll seek" mode.
193
- */
194
- exit: ScrollSeekToggle;
195
- }
196
- export declare type FollowOutputScalarType = boolean | 'smooth' | 'auto';
197
- export declare type FollowOutputCallback = (isAtBottom: boolean) => FollowOutputScalarType;
198
- export declare type FollowOutput = FollowOutputCallback | FollowOutputScalarType;
199
- export interface Item<D> {
200
- index: number;
201
- offset: number;
202
- size: number;
203
- data?: D;
204
- }
205
- export interface RecordItem<D> extends Item<D> {
206
- type?: undefined;
207
- groupIndex?: number;
208
- originalIndex?: number;
209
- data?: D;
210
- }
211
- export interface GroupItem<D> extends Item<D> {
212
- type: 'group';
213
- originalIndex?: number;
214
- }
215
- export declare type ListItem<D> = RecordItem<D> | GroupItem<D>;
216
- export interface IndexLocationWithAlign {
217
- /**
218
- * The index of the item to scroll to.
219
- */
220
- index: number | 'LAST';
221
- /**
222
- * How to position the item in the viewport.
223
- */
224
- align?: 'start' | 'center' | 'end';
225
- /**
226
- * Set 'smooth' to have an animated transition to the specified location.
227
- */
228
- behavior?: 'smooth' | 'auto';
229
- /**
230
- * The offset to scroll.
231
- */
232
- offset?: number;
233
- }
234
- export declare type ListRootProps = Omit<React.HTMLProps<'div'>, 'ref' | 'data'>;
235
- export declare type TableRootProps = Omit<React.HTMLProps<'table'>, 'ref' | 'data'>;
236
- export declare type GridRootProps = Omit<React.HTMLProps<'div'>, 'ref' | 'data'>;
237
- export interface GridItem {
238
- 'data-index': number;
239
- className?: string;
240
- }
241
- export interface GridComponents<Context = any> {
242
- /**
243
- * Set to customize the item wrapping element. Use only if you would like to render list from elements different than a `div`.
244
- */
245
- Item?: ComponentType<GridItem & {
246
- context?: Context;
247
- }>;
248
- /**
249
- * Set to customize the outermost scrollable element. This should not be necessary in general,
250
- * as the component passes its HTML attribute props to it.
251
- */
252
- Scroller?: ComponentType<ScrollerProps & {
253
- context?: Context;
254
- }>;
255
- /**
256
- * Set to customize the items wrapper. Use only if you would like to render list from elements different than a `div`.
257
- */
258
- List?: ComponentType<GridListProps & {
259
- context?: Context;
260
- }>;
261
- /**
262
- * Set to render an item placeholder when the user scrolls fast.
263
- * See the `scrollSeekConfiguration` property for more details.
264
- */
265
- ScrollSeekPlaceholder?: ComponentType<GridScrollSeekPlaceholderProps & {
266
- context?: Context;
267
- }>;
268
- }
269
- export interface GridComputeItemKey {
270
- (index: number): Key;
271
- }
272
- export interface GridItemContent<C> {
273
- (index: number, context: C): ReactNode;
274
- }
275
- export interface WindowViewportInfo {
276
- offsetTop: number;
277
- visibleHeight: number;
278
- visibleWidth: number;
279
- }
1
+ import { ComponentPropsWithRef, ComponentType, Key, ReactNode } from 'react';
2
+ export interface ListRange {
3
+ startIndex: number;
4
+ endIndex: number;
5
+ }
6
+ export interface ItemContent<D, C> {
7
+ (index: number, data: D, context: C): ReactNode;
8
+ }
9
+ export declare type FixedHeaderContent = (() => React.ReactChildren | React.ReactNode) | null;
10
+ export interface GroupItemContent<D, C> {
11
+ (index: number, groupIndex: number, data: D, context: C): ReactNode;
12
+ }
13
+ export interface GroupContent {
14
+ (index: number): ReactNode;
15
+ }
16
+ export interface ItemProps {
17
+ 'data-index': number;
18
+ 'data-item-index': number;
19
+ 'data-item-group-index'?: number;
20
+ 'data-known-size': number;
21
+ }
22
+ export interface GroupProps {
23
+ 'data-index': number;
24
+ 'data-item-index': number;
25
+ 'data-known-size': number;
26
+ }
27
+ export declare type TopItemListProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children'>;
28
+ export declare type TableProps = Pick<ComponentPropsWithRef<'table'>, 'style'>;
29
+ /**
30
+ * Passed to the Components.List custom component
31
+ */
32
+ export declare type ListProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children' | 'ref'> & {
33
+ 'data-test-id': string;
34
+ };
35
+ /**
36
+ * Passed to the Components.List custom component
37
+ */
38
+ export declare type GridListProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children' | 'ref' | 'className'>;
39
+ /**
40
+ * Passed to the Components.Scroller custom component
41
+ */
42
+ export declare type ScrollerProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children' | 'tabIndex' | 'ref'> & {
43
+ 'data-test-id'?: string;
44
+ 'data-virtuoso-scroller'?: boolean;
45
+ };
46
+ /**
47
+ * Passed to the Components.ScrollSeekPlaceholder custom component
48
+ */
49
+ export interface ScrollSeekPlaceholderProps {
50
+ index: number;
51
+ height: number;
52
+ groupIndex?: number;
53
+ type: 'group' | 'item';
54
+ }
55
+ /**
56
+ * Passed to the GridComponents.ScrollSeekPlaceholder custom component
57
+ */
58
+ export interface GridScrollSeekPlaceholderProps {
59
+ index: number;
60
+ height: number;
61
+ width: number;
62
+ }
63
+ /**
64
+ * Customize the Virtuoso rendering by passing a set of custom components.
65
+ */
66
+ export interface Components<Context = unknown> {
67
+ /**
68
+ * Set to render a component at the top of the list.
69
+ *
70
+ * The header remains above the top items and does not remain sticky.
71
+ */
72
+ Header?: ComponentType<{
73
+ context?: Context;
74
+ }>;
75
+ /**
76
+ * Set to render a component at the bottom of the list.
77
+ */
78
+ Footer?: ComponentType<{
79
+ context?: Context;
80
+ }>;
81
+ /**
82
+ * Set to customize the item wrapping element. Use only if you would like to render list from elements different than a `div`.
83
+ */
84
+ Item?: ComponentType<ItemProps & {
85
+ context?: Context;
86
+ }>;
87
+ /**
88
+ * Set to customize the group item wrapping element. Use only if you would like to render list from elements different than a `div`.
89
+ */
90
+ Group?: ComponentType<GroupProps & {
91
+ context?: Context;
92
+ }>;
93
+ /**
94
+ * Set to customize the top list item wrapping element. Use if you would like to render list from elements different than a `div`
95
+ * or you want to set a custom z-index for the sticky position.
96
+ */
97
+ TopItemList?: ComponentType<TopItemListProps & {
98
+ context?: Context;
99
+ }>;
100
+ /**
101
+ * Set to customize the outermost scrollable element. This should not be necessary in general,
102
+ * as the component passes its HTML attribute props to it.
103
+ */
104
+ Scroller?: ComponentType<ScrollerProps & {
105
+ context?: Context;
106
+ }>;
107
+ /**
108
+ * Set to customize the items wrapper. Use only if you would like to render list from elements different than a `div`.
109
+ */
110
+ List?: ComponentType<ListProps & {
111
+ context?: Context;
112
+ }>;
113
+ /**
114
+ * Set to render a custom UI when the list is empty.
115
+ */
116
+ EmptyPlaceholder?: ComponentType<{
117
+ context?: Context;
118
+ }>;
119
+ /**
120
+ * Set to render an item placeholder when the user scrolls fast. See the `scrollSeek` property for more details.
121
+ */
122
+ ScrollSeekPlaceholder?: ComponentType<ScrollSeekPlaceholderProps & {
123
+ context?: Context;
124
+ }>;
125
+ }
126
+ /**
127
+ * Customize the TableVirtuoso rendering by passing a set of custom components.
128
+ */
129
+ export interface TableComponents<Context = unknown> {
130
+ /**
131
+ * Set to customize the wrapping `table` element.
132
+ *
133
+ */
134
+ Table?: ComponentType<TableProps & {
135
+ context?: Context;
136
+ }>;
137
+ /**
138
+ * Set to render a fixed header at the top of the table (`thead`). use [[fixedHeaderHeight]] to set the contents
139
+ *
140
+ */
141
+ TableHead?: ComponentType<{
142
+ context?: Context;
143
+ }>;
144
+ /**
145
+ * Set to customize the item wrapping element. Default is `tr`.
146
+ */
147
+ TableRow?: ComponentType<ItemProps & {
148
+ context?: Context;
149
+ }>;
150
+ /**
151
+ * Set to customize the outermost scrollable element. This should not be necessary in general,
152
+ * as the component passes its HTML attribute props to it.
153
+ */
154
+ Scroller?: ComponentType<ScrollerProps & {
155
+ context?: Context;
156
+ }>;
157
+ /**
158
+ * Set to customize the items wrapper. Default is `tbody`.
159
+ */
160
+ TableBody?: ComponentType<ListProps & {
161
+ context?: Context;
162
+ }>;
163
+ /**
164
+ * Set to render a custom UI when the list is empty.
165
+ */
166
+ EmptyPlaceholder?: ComponentType<{
167
+ context?: Context;
168
+ }>;
169
+ /**
170
+ * Set to render an item placeholder when the user scrolls fast. See the `scrollSeek` property for more details.
171
+ */
172
+ ScrollSeekPlaceholder?: ComponentType<ScrollSeekPlaceholderProps & {
173
+ context?: Context;
174
+ }>;
175
+ }
176
+ export interface ComputeItemKey<D, C> {
177
+ (index: number, item: D, context: C): Key;
178
+ }
179
+ export interface ScrollSeekToggle {
180
+ (velocity: number, range: ListRange): boolean;
181
+ }
182
+ export interface ScrollSeekConfiguration {
183
+ /**
184
+ * Callback to determine if the list should enter "scroll seek" mode.
185
+ */
186
+ enter: ScrollSeekToggle;
187
+ /**
188
+ * called during scrolling in scroll seek mode - use to display a hint where the list is.
189
+ */
190
+ change?: (velocity: number, range: ListRange) => void;
191
+ /**
192
+ * Callback to determine if the list should enter "scroll seek" mode.
193
+ */
194
+ exit: ScrollSeekToggle;
195
+ }
196
+ export declare type FollowOutputScalarType = boolean | 'smooth' | 'auto';
197
+ export declare type FollowOutputCallback = (isAtBottom: boolean) => FollowOutputScalarType;
198
+ export declare type FollowOutput = FollowOutputCallback | FollowOutputScalarType;
199
+ export interface Item<D> {
200
+ index: number;
201
+ offset: number;
202
+ size: number;
203
+ data?: D;
204
+ }
205
+ export interface RecordItem<D> extends Item<D> {
206
+ type?: undefined;
207
+ groupIndex?: number;
208
+ originalIndex?: number;
209
+ data?: D;
210
+ }
211
+ export interface GroupItem<D> extends Item<D> {
212
+ type: 'group';
213
+ originalIndex?: number;
214
+ }
215
+ export declare type ListItem<D> = RecordItem<D> | GroupItem<D>;
216
+ export interface IndexLocationWithAlign {
217
+ /**
218
+ * The index of the item to scroll to.
219
+ */
220
+ index: number | 'LAST';
221
+ /**
222
+ * How to position the item in the viewport.
223
+ */
224
+ align?: 'start' | 'center' | 'end';
225
+ /**
226
+ * Set 'smooth' to have an animated transition to the specified location.
227
+ */
228
+ behavior?: 'smooth' | 'auto';
229
+ /**
230
+ * The offset to scroll.
231
+ */
232
+ offset?: number;
233
+ }
234
+ export declare type ListRootProps = Omit<React.HTMLProps<'div'>, 'ref' | 'data'>;
235
+ export declare type TableRootProps = Omit<React.HTMLProps<'table'>, 'ref' | 'data'>;
236
+ export declare type GridRootProps = Omit<React.HTMLProps<'div'>, 'ref' | 'data'>;
237
+ export interface GridItem {
238
+ 'data-index': number;
239
+ className?: string;
240
+ }
241
+ export interface GridComponents<Context = any> {
242
+ /**
243
+ * Set to customize the item wrapping element. Use only if you would like to render list from elements different than a `div`.
244
+ */
245
+ Item?: ComponentType<GridItem & {
246
+ context?: Context;
247
+ }>;
248
+ /**
249
+ * Set to customize the outermost scrollable element. This should not be necessary in general,
250
+ * as the component passes its HTML attribute props to it.
251
+ */
252
+ Scroller?: ComponentType<ScrollerProps & {
253
+ context?: Context;
254
+ }>;
255
+ /**
256
+ * Set to customize the items wrapper. Use only if you would like to render list from elements different than a `div`.
257
+ */
258
+ List?: ComponentType<GridListProps & {
259
+ context?: Context;
260
+ }>;
261
+ /**
262
+ * Set to render an item placeholder when the user scrolls fast.
263
+ * See the `scrollSeekConfiguration` property for more details.
264
+ */
265
+ ScrollSeekPlaceholder?: ComponentType<GridScrollSeekPlaceholderProps & {
266
+ context?: Context;
267
+ }>;
268
+ }
269
+ export interface GridComputeItemKey {
270
+ (index: number): Key;
271
+ }
272
+ export interface GridItemContent<C> {
273
+ (index: number, context: C): ReactNode;
274
+ }
275
+ export interface WindowViewportInfo {
276
+ offsetTop: number;
277
+ visibleHeight: number;
278
+ visibleWidth: number;
279
+ }