@legendapp/list 3.0.0-beta.32 → 3.0.0-beta.34
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 +7 -1
- package/animated.d.ts +605 -6
- package/animated.js +2 -2
- package/animated.mjs +1 -1
- package/index.d.ts +503 -118
- package/index.js +607 -275
- package/index.mjs +607 -275
- package/index.native.js +348 -189
- package/index.native.mjs +347 -188
- package/keyboard-controller.d.ts +616 -6
- package/keyboard-controller.js +2 -2
- package/keyboard-controller.mjs +1 -1
- package/keyboard.d.ts +204 -8
- package/keyboard.js +68 -53
- package/keyboard.mjs +71 -55
- package/{index.d.mts → list-react-native.d.ts} +138 -42
- package/list-react-native.js +4348 -0
- package/list-react-native.mjs +4318 -0
- package/{index.native.d.mts → list-react.d.ts} +195 -42
- package/list-react.js +4709 -0
- package/list-react.mjs +4679 -0
- package/package.json +52 -1
- package/reanimated.d.ts +605 -7
- package/reanimated.js +180 -12
- package/reanimated.mjs +177 -9
- package/section-list.d.ts +615 -14
- package/section-list.js +6 -6
- package/section-list.mjs +1 -1
- package/animated.d.mts +0 -9
- package/animated.native.d.mts +0 -9
- package/animated.native.d.ts +0 -9
- package/animated.native.js +0 -9
- package/animated.native.mjs +0 -7
- package/index.native.d.ts +0 -817
- package/keyboard-controller.d.mts +0 -12
- package/keyboard-controller.native.d.mts +0 -12
- package/keyboard-controller.native.d.ts +0 -12
- package/keyboard-controller.native.js +0 -69
- package/keyboard-controller.native.mjs +0 -48
- package/keyboard.d.mts +0 -13
- package/keyboard.native.d.mts +0 -13
- package/keyboard.native.d.ts +0 -13
- package/keyboard.native.js +0 -399
- package/keyboard.native.mjs +0 -377
- package/reanimated.d.mts +0 -18
- package/reanimated.native.d.mts +0 -18
- package/reanimated.native.d.ts +0 -18
- package/reanimated.native.js +0 -89
- package/reanimated.native.mjs +0 -65
- package/section-list.d.mts +0 -112
- package/section-list.native.d.mts +0 -112
- package/section-list.native.d.ts +0 -112
- package/section-list.native.js +0 -293
- package/section-list.native.mjs +0 -271
package/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { Key,
|
|
3
|
-
import { View, LayoutRectangle, Insets, ScrollView, ScrollViewProps, Animated, StyleProp, ViewStyle, NativeSyntheticEvent, NativeScrollEvent, ScrollViewComponent, ScrollResponderMixin } from 'react-native';
|
|
4
|
-
import Reanimated from 'react-native-reanimated';
|
|
2
|
+
import { Key, ReactNode, ComponentType, CSSProperties, Ref, ReactElement, JSXElementConstructor, RefAttributes, Dispatch, SetStateAction } from 'react';
|
|
5
3
|
|
|
6
4
|
type AnimatedValue = number;
|
|
7
5
|
|
|
6
|
+
type LooseMeasureCallback = (x: number, y: number, width: number, height: number, pageX: number, pageY: number) => void;
|
|
7
|
+
interface LooseView {
|
|
8
|
+
measure?: (callback: LooseMeasureCallback) => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
8
11
|
type ListenerType = "activeStickyIndex" | "debugComputedScroll" | "debugRawScroll" | "extraData" | "footerSize" | "headerSize" | "lastItemKeys" | "lastPositionUpdate" | "maintainVisibleContentPosition" | "numColumns" | "numContainers" | "numContainersPooled" | "otherAxisSize" | "readyToRender" | "scrollAdjust" | "scrollAdjustPending" | "scrollAdjustUserOffset" | "scrollSize" | "snapToOffsets" | "stylePaddingTop" | "totalSize" | `containerColumn${number}` | `containerSpan${number}` | `containerItemData${number}` | `containerItemKey${number}` | `containerPosition${number}` | `containerSticky${number}`;
|
|
9
12
|
type LegendListListenerType = Extract<ListenerType, "activeStickyIndex" | "footerSize" | "headerSize" | "lastItemKeys" | "lastPositionUpdate" | "numContainers" | "numContainersPooled" | "otherAxisSize" | "readyToRender" | "snapToOffsets" | "totalSize">;
|
|
10
13
|
type ListenerTypeValueMap = {
|
|
@@ -17,7 +20,7 @@ type ListenerTypeValueMap = {
|
|
|
17
20
|
headerSize: number;
|
|
18
21
|
lastItemKeys: string[];
|
|
19
22
|
lastPositionUpdate: number;
|
|
20
|
-
maintainVisibleContentPosition: MaintainVisibleContentPositionNormalized;
|
|
23
|
+
maintainVisibleContentPosition: MaintainVisibleContentPositionNormalized$1;
|
|
21
24
|
numColumns: number;
|
|
22
25
|
numContainers: number;
|
|
23
26
|
numContainersPooled: number;
|
|
@@ -48,24 +51,24 @@ type ListenerTypeValueMap = {
|
|
|
48
51
|
};
|
|
49
52
|
interface StateContext {
|
|
50
53
|
animatedScrollY: AnimatedValue;
|
|
51
|
-
columnWrapperStyle: ColumnWrapperStyle | undefined;
|
|
54
|
+
columnWrapperStyle: ColumnWrapperStyle$1 | undefined;
|
|
52
55
|
contextNum: number;
|
|
53
56
|
listeners: Map<ListenerType, Set<(value: any) => void>>;
|
|
54
|
-
mapViewabilityCallbacks: Map<string, ViewabilityCallback>;
|
|
55
|
-
mapViewabilityValues: Map<string, ViewToken>;
|
|
56
|
-
mapViewabilityAmountCallbacks: Map<number, ViewabilityAmountCallback>;
|
|
57
|
-
mapViewabilityAmountValues: Map<number, ViewAmountToken>;
|
|
57
|
+
mapViewabilityCallbacks: Map<string, ViewabilityCallback$1>;
|
|
58
|
+
mapViewabilityValues: Map<string, ViewToken$1>;
|
|
59
|
+
mapViewabilityAmountCallbacks: Map<number, ViewabilityAmountCallback$1>;
|
|
60
|
+
mapViewabilityAmountValues: Map<number, ViewAmountToken$1>;
|
|
58
61
|
mapViewabilityConfigStates: Map<string, {
|
|
59
|
-
viewableItems: ViewToken[];
|
|
62
|
+
viewableItems: ViewToken$1[];
|
|
60
63
|
start: number;
|
|
61
64
|
end: number;
|
|
62
65
|
previousStart: number;
|
|
63
66
|
previousEnd: number;
|
|
64
67
|
}>;
|
|
65
68
|
positionListeners: Map<string, Set<(value: any) => void>>;
|
|
66
|
-
state: InternalState;
|
|
69
|
+
state: InternalState$1;
|
|
67
70
|
values: Map<ListenerType, any>;
|
|
68
|
-
viewRefs: Map<number, React$1.RefObject<
|
|
71
|
+
viewRefs: Map<number, React$1.RefObject<LooseView>>;
|
|
69
72
|
}
|
|
70
73
|
|
|
71
74
|
declare class ScrollAdjustHandler {
|
|
@@ -75,7 +78,7 @@ declare class ScrollAdjustHandler {
|
|
|
75
78
|
constructor(ctx: StateContext);
|
|
76
79
|
requestAdjust(add: number): void;
|
|
77
80
|
getAdjust(): number;
|
|
78
|
-
commitPendingAdjust(scrollTarget: ScrollTarget): void;
|
|
81
|
+
commitPendingAdjust(scrollTarget: ScrollTarget$1): void;
|
|
79
82
|
}
|
|
80
83
|
|
|
81
84
|
type BaseSharedValue<T = number> = {
|
|
@@ -85,7 +88,63 @@ type StylesAsSharedValue<Style> = {
|
|
|
85
88
|
[key in keyof Style]: Style[key] | BaseSharedValue<Style[key]>;
|
|
86
89
|
};
|
|
87
90
|
|
|
88
|
-
|
|
91
|
+
interface Insets$1 {
|
|
92
|
+
top: number;
|
|
93
|
+
left: number;
|
|
94
|
+
bottom: number;
|
|
95
|
+
right: number;
|
|
96
|
+
}
|
|
97
|
+
interface LayoutRectangle$1 {
|
|
98
|
+
x: number;
|
|
99
|
+
y: number;
|
|
100
|
+
width: number;
|
|
101
|
+
height: number;
|
|
102
|
+
}
|
|
103
|
+
interface NativeScrollEvent$1 {
|
|
104
|
+
contentOffset: {
|
|
105
|
+
x: number;
|
|
106
|
+
y: number;
|
|
107
|
+
};
|
|
108
|
+
contentSize: {
|
|
109
|
+
width: number;
|
|
110
|
+
height: number;
|
|
111
|
+
};
|
|
112
|
+
layoutMeasurement: {
|
|
113
|
+
width: number;
|
|
114
|
+
height: number;
|
|
115
|
+
};
|
|
116
|
+
contentInset: Insets$1;
|
|
117
|
+
zoomScale: number;
|
|
118
|
+
}
|
|
119
|
+
interface NativeSyntheticEvent$1<T> {
|
|
120
|
+
nativeEvent: T;
|
|
121
|
+
}
|
|
122
|
+
type ViewStyle$1 = Record<string, unknown>;
|
|
123
|
+
type StyleProp$1<T> = T | T[] | null | undefined | false;
|
|
124
|
+
interface ScrollEventTargetLike$1 {
|
|
125
|
+
addEventListener(type: string, listener: (...args: any[]) => void): void;
|
|
126
|
+
removeEventListener(type: string, listener: (...args: any[]) => void): void;
|
|
127
|
+
}
|
|
128
|
+
interface ScrollableNodeLike$1 {
|
|
129
|
+
scrollLeft?: number;
|
|
130
|
+
scrollTop?: number;
|
|
131
|
+
}
|
|
132
|
+
interface LegendListScrollerRef$1 {
|
|
133
|
+
flashScrollIndicators(): void;
|
|
134
|
+
getCurrentScrollOffset?(): number;
|
|
135
|
+
getScrollEventTarget(): ScrollEventTargetLike$1 | null;
|
|
136
|
+
getScrollableNode(): ScrollableNodeLike$1 | null;
|
|
137
|
+
getScrollResponder(): unknown;
|
|
138
|
+
scrollTo(options: {
|
|
139
|
+
animated?: boolean;
|
|
140
|
+
x?: number;
|
|
141
|
+
y?: number;
|
|
142
|
+
}): void;
|
|
143
|
+
scrollToEnd(options?: {
|
|
144
|
+
animated?: boolean;
|
|
145
|
+
}): void;
|
|
146
|
+
}
|
|
147
|
+
type BaseScrollViewProps$1<TScrollView> = Omit<TScrollView, "contentOffset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children" | "onScroll">;
|
|
89
148
|
interface DataModeProps<ItemT, TItemType extends string | undefined> {
|
|
90
149
|
/**
|
|
91
150
|
* Array of items to render in the list.
|
|
@@ -99,7 +158,7 @@ interface DataModeProps<ItemT, TItemType extends string | undefined> {
|
|
|
99
158
|
* - A React component: React.ComponentType<LegendListRenderItemProps<ItemT>>
|
|
100
159
|
* @required when using data mode
|
|
101
160
|
*/
|
|
102
|
-
renderItem: ((props: LegendListRenderItemProps<ItemT, TItemType>) => ReactNode) | React.ComponentType<LegendListRenderItemProps<ItemT, TItemType>>;
|
|
161
|
+
renderItem: ((props: LegendListRenderItemProps$1<ItemT, TItemType>) => ReactNode) | React.ComponentType<LegendListRenderItemProps$1<ItemT, TItemType>>;
|
|
103
162
|
children?: never;
|
|
104
163
|
}
|
|
105
164
|
interface ChildrenModeProps {
|
|
@@ -122,11 +181,11 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
122
181
|
* Keeps selected items mounted even when they scroll out of view.
|
|
123
182
|
* @default undefined
|
|
124
183
|
*/
|
|
125
|
-
alwaysRender?: AlwaysRenderConfig;
|
|
184
|
+
alwaysRender?: AlwaysRenderConfig$1;
|
|
126
185
|
/**
|
|
127
186
|
* Style applied to each column's wrapper view.
|
|
128
187
|
*/
|
|
129
|
-
columnWrapperStyle?: ColumnWrapperStyle;
|
|
188
|
+
columnWrapperStyle?: ColumnWrapperStyle$1;
|
|
130
189
|
/**
|
|
131
190
|
* Distance in pixels to pre-render items ahead of the visible area.
|
|
132
191
|
* @default 250
|
|
@@ -213,7 +272,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
213
272
|
/**
|
|
214
273
|
* Style for the footer component.
|
|
215
274
|
*/
|
|
216
|
-
ListFooterComponentStyle?: StyleProp<ViewStyle> | undefined;
|
|
275
|
+
ListFooterComponentStyle?: StyleProp$1<ViewStyle$1> | undefined;
|
|
217
276
|
/**
|
|
218
277
|
* Component or element to render above the list.
|
|
219
278
|
*/
|
|
@@ -221,12 +280,12 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
221
280
|
/**
|
|
222
281
|
* Style for the header component.
|
|
223
282
|
*/
|
|
224
|
-
ListHeaderComponentStyle?: StyleProp<ViewStyle> | undefined;
|
|
283
|
+
ListHeaderComponentStyle?: StyleProp$1<ViewStyle$1> | undefined;
|
|
225
284
|
/**
|
|
226
285
|
* If true, auto-scrolls to end when new items are added.
|
|
227
286
|
* @default false
|
|
228
287
|
*/
|
|
229
|
-
maintainScrollAtEnd?: boolean | MaintainScrollAtEndOptions;
|
|
288
|
+
maintainScrollAtEnd?: boolean | MaintainScrollAtEndOptions$1;
|
|
230
289
|
/**
|
|
231
290
|
* Distance threshold in percentage of screen size to trigger maintainScrollAtEnd.
|
|
232
291
|
* @default 0.1
|
|
@@ -240,7 +299,12 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
240
299
|
* - undefined (default) enables scroll stabilization but skips data-change anchoring.
|
|
241
300
|
* - true enables both behaviors; false disables both.
|
|
242
301
|
*/
|
|
243
|
-
maintainVisibleContentPosition?: boolean | MaintainVisibleContentPositionConfig<ItemT>;
|
|
302
|
+
maintainVisibleContentPosition?: boolean | MaintainVisibleContentPositionConfig$1<ItemT>;
|
|
303
|
+
/**
|
|
304
|
+
* Web only: when true, listens to window/body scrolling instead of rendering a scrollable list container.
|
|
305
|
+
* @default false
|
|
306
|
+
*/
|
|
307
|
+
useWindowScroll?: boolean;
|
|
244
308
|
/**
|
|
245
309
|
* Number of columns to render items in.
|
|
246
310
|
* @default 1
|
|
@@ -270,12 +334,12 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
270
334
|
/**
|
|
271
335
|
* Called when list layout metrics change.
|
|
272
336
|
*/
|
|
273
|
-
onMetricsChange?: (metrics: LegendListMetrics) => void;
|
|
337
|
+
onMetricsChange?: (metrics: LegendListMetrics$1) => void;
|
|
274
338
|
/**
|
|
275
339
|
* Function to call when the user pulls to refresh.
|
|
276
340
|
*/
|
|
277
341
|
onRefresh?: () => void;
|
|
278
|
-
onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
342
|
+
onScroll?: (event: NativeSyntheticEvent$1<NativeScrollEvent$1>) => void;
|
|
279
343
|
/**
|
|
280
344
|
* Called when scrolling reaches the start within onStartReachedThreshold.
|
|
281
345
|
*/
|
|
@@ -297,7 +361,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
297
361
|
/**
|
|
298
362
|
* Called when the viewability of items changes.
|
|
299
363
|
*/
|
|
300
|
-
onViewableItemsChanged?: OnViewableItemsChanged<ItemT> | undefined;
|
|
364
|
+
onViewableItemsChanged?: OnViewableItemsChanged$1<ItemT> | undefined;
|
|
301
365
|
/**
|
|
302
366
|
* Offset in pixels for the refresh indicator.
|
|
303
367
|
* @default 0
|
|
@@ -311,7 +375,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
311
375
|
/**
|
|
312
376
|
* Ref to the underlying ScrollView component.
|
|
313
377
|
*/
|
|
314
|
-
refScrollView?: React.Ref<
|
|
378
|
+
refScrollView?: React.Ref<any>;
|
|
315
379
|
/**
|
|
316
380
|
* If true, shows a refresh indicator.
|
|
317
381
|
* @default false
|
|
@@ -322,7 +386,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
322
386
|
* Note: When using `stickyHeaderIndices`, you must provide an Animated ScrollView component.
|
|
323
387
|
* @default (props) => <ScrollView {...props} />
|
|
324
388
|
*/
|
|
325
|
-
renderScrollComponent?: (props:
|
|
389
|
+
renderScrollComponent?: (props: any) => React.ReactElement | null;
|
|
326
390
|
/**
|
|
327
391
|
* This will log a suggested estimatedItemSize.
|
|
328
392
|
* @required
|
|
@@ -332,11 +396,11 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
332
396
|
/**
|
|
333
397
|
* Configuration for determining item viewability.
|
|
334
398
|
*/
|
|
335
|
-
viewabilityConfig?: ViewabilityConfig;
|
|
399
|
+
viewabilityConfig?: ViewabilityConfig$1;
|
|
336
400
|
/**
|
|
337
401
|
* Pairs of viewability configs and their callbacks for tracking visibility.
|
|
338
402
|
*/
|
|
339
|
-
viewabilityConfigCallbackPairs?: ViewabilityConfigCallbackPairs<ItemT> | undefined;
|
|
403
|
+
viewabilityConfigCallbackPairs?: ViewabilityConfigCallbackPairs$1<ItemT> | undefined;
|
|
340
404
|
/**
|
|
341
405
|
* If true, delays rendering until initial layout is complete.
|
|
342
406
|
* @default false
|
|
@@ -361,23 +425,24 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
361
425
|
* Configuration for sticky headers.
|
|
362
426
|
* @default undefined
|
|
363
427
|
*/
|
|
364
|
-
stickyHeaderConfig?: StickyHeaderConfig;
|
|
428
|
+
stickyHeaderConfig?: StickyHeaderConfig$1;
|
|
365
429
|
getItemType?: (item: ItemT, index: number) => TItemType;
|
|
366
430
|
getFixedItemSize?: (item: ItemT, index: number, type: TItemType) => number | undefined;
|
|
367
431
|
itemsAreEqual?: (itemPrevious: ItemT, item: ItemT, index: number, data: readonly ItemT[]) => boolean;
|
|
368
432
|
}
|
|
369
|
-
type LegendListPropsBase<ItemT,
|
|
370
|
-
|
|
433
|
+
type LegendListPropsBase$1<ItemT, TScrollViewProps = Record<string, any>, TItemType extends string | undefined = string | undefined> = BaseScrollViewProps$1<TScrollViewProps> & LegendListSpecificProps<ItemT, TItemType> & (DataModeProps<ItemT, TItemType> | ChildrenModeProps);
|
|
434
|
+
type LegendListPropsInternal = LegendListSpecificProps<any, string | undefined> & DataModeProps<any, string | undefined>;
|
|
435
|
+
interface MaintainVisibleContentPositionConfig$1<ItemT = any> {
|
|
371
436
|
data?: boolean;
|
|
372
437
|
size?: boolean;
|
|
373
438
|
shouldRestorePosition?: (item: ItemT, index: number, data: readonly ItemT[]) => boolean;
|
|
374
439
|
}
|
|
375
|
-
interface MaintainVisibleContentPositionNormalized<ItemT = any> {
|
|
440
|
+
interface MaintainVisibleContentPositionNormalized$1<ItemT = any> {
|
|
376
441
|
data: boolean;
|
|
377
442
|
size: boolean;
|
|
378
443
|
shouldRestorePosition?: (item: ItemT, index: number, data: readonly ItemT[]) => boolean;
|
|
379
444
|
}
|
|
380
|
-
interface StickyHeaderConfig {
|
|
445
|
+
interface StickyHeaderConfig$1 {
|
|
381
446
|
/**
|
|
382
447
|
* Specifies how far from the top edge sticky headers should start sticking.
|
|
383
448
|
* Useful for scenarios with a fixed navbar or header, where sticky elements pin below it..
|
|
@@ -390,34 +455,33 @@ interface StickyHeaderConfig {
|
|
|
390
455
|
*/
|
|
391
456
|
backdropComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
|
|
392
457
|
}
|
|
393
|
-
interface AlwaysRenderConfig {
|
|
458
|
+
interface AlwaysRenderConfig$1 {
|
|
394
459
|
top?: number;
|
|
395
460
|
bottom?: number;
|
|
396
461
|
indices?: number[];
|
|
397
462
|
keys?: string[];
|
|
398
463
|
}
|
|
399
|
-
interface MaintainScrollAtEndOptions {
|
|
464
|
+
interface MaintainScrollAtEndOptions$1 {
|
|
400
465
|
onLayout?: boolean;
|
|
401
466
|
onItemLayout?: boolean;
|
|
402
467
|
onDataChange?: boolean;
|
|
403
468
|
}
|
|
404
|
-
interface ColumnWrapperStyle {
|
|
469
|
+
interface ColumnWrapperStyle$1 {
|
|
405
470
|
rowGap?: number;
|
|
406
471
|
gap?: number;
|
|
407
472
|
columnGap?: number;
|
|
408
473
|
}
|
|
409
|
-
interface LegendListMetrics {
|
|
474
|
+
interface LegendListMetrics$1 {
|
|
410
475
|
headerSize: number;
|
|
411
476
|
footerSize: number;
|
|
412
477
|
}
|
|
413
|
-
|
|
414
|
-
interface ThresholdSnapshot {
|
|
478
|
+
interface ThresholdSnapshot$1 {
|
|
415
479
|
scrollPosition: number;
|
|
416
480
|
contentSize?: number;
|
|
417
481
|
dataLength?: number;
|
|
418
482
|
atThreshold: boolean;
|
|
419
483
|
}
|
|
420
|
-
interface ScrollTarget {
|
|
484
|
+
interface ScrollTarget$1 {
|
|
421
485
|
animated?: boolean;
|
|
422
486
|
index?: number;
|
|
423
487
|
isInitialScroll?: boolean;
|
|
@@ -427,7 +491,7 @@ interface ScrollTarget {
|
|
|
427
491
|
viewOffset?: number;
|
|
428
492
|
viewPosition?: number;
|
|
429
493
|
}
|
|
430
|
-
interface InternalState {
|
|
494
|
+
interface InternalState$1 {
|
|
431
495
|
activeStickyIndex: number | undefined;
|
|
432
496
|
adjustingFromInitialMount?: number;
|
|
433
497
|
animFrameCheckFinishedScroll?: any;
|
|
@@ -435,10 +499,11 @@ interface InternalState {
|
|
|
435
499
|
num: number;
|
|
436
500
|
avg: number;
|
|
437
501
|
}>;
|
|
438
|
-
columns:
|
|
439
|
-
columnSpans:
|
|
502
|
+
columns: Array<number | undefined>;
|
|
503
|
+
columnSpans: Array<number | undefined>;
|
|
440
504
|
containerItemKeys: Map<string, number>;
|
|
441
505
|
containerItemTypes: Map<number, string>;
|
|
506
|
+
dataChangeEpoch: number;
|
|
442
507
|
dataChangeNeedsScrollUpdate: boolean;
|
|
443
508
|
didColumnsChange?: boolean;
|
|
444
509
|
didDataChange?: boolean;
|
|
@@ -447,7 +512,7 @@ interface InternalState {
|
|
|
447
512
|
enableScrollForNextCalculateItemsInView: boolean;
|
|
448
513
|
endBuffered: number;
|
|
449
514
|
endNoBuffer: number;
|
|
450
|
-
endReachedSnapshot: ThresholdSnapshot | undefined;
|
|
515
|
+
endReachedSnapshot: ThresholdSnapshot$1 | undefined;
|
|
451
516
|
firstFullyOnScreenIndex: number;
|
|
452
517
|
hasScrolled?: boolean;
|
|
453
518
|
idCache: string[];
|
|
@@ -459,15 +524,15 @@ interface InternalState {
|
|
|
459
524
|
ignoreScrollFromMVCPIgnored?: boolean;
|
|
460
525
|
ignoreScrollFromMVCPTimeout?: any;
|
|
461
526
|
indexByKey: Map<string, number>;
|
|
462
|
-
initialAnchor?: InitialScrollAnchor;
|
|
463
|
-
initialScroll: ScrollIndexWithOffsetAndContentOffset | undefined;
|
|
527
|
+
initialAnchor?: InitialScrollAnchor$1;
|
|
528
|
+
initialScroll: ScrollIndexWithOffsetAndContentOffset$1 | undefined;
|
|
464
529
|
isAtEnd: boolean;
|
|
465
530
|
isAtStart: boolean;
|
|
466
531
|
isEndReached: boolean | null;
|
|
467
532
|
isFirst?: boolean;
|
|
468
533
|
isStartReached: boolean | null;
|
|
469
534
|
lastBatchingAction: number;
|
|
470
|
-
lastLayout: LayoutRectangle | undefined;
|
|
535
|
+
lastLayout: LayoutRectangle$1 | undefined;
|
|
471
536
|
lastScrollAdjustForHistory?: number;
|
|
472
537
|
lastScrollDelta: number;
|
|
473
538
|
loadStartTime: number;
|
|
@@ -479,18 +544,19 @@ interface InternalState {
|
|
|
479
544
|
quietPasses: number;
|
|
480
545
|
expiresAt: number;
|
|
481
546
|
};
|
|
482
|
-
contentInsetOverride?: Partial<Insets> | null;
|
|
483
|
-
nativeContentInset?: Insets;
|
|
547
|
+
contentInsetOverride?: Partial<Insets$1> | null;
|
|
548
|
+
nativeContentInset?: Insets$1;
|
|
484
549
|
nativeMarginTop: number;
|
|
485
550
|
needsOtherAxisSize?: boolean;
|
|
486
551
|
otherAxisSize?: number;
|
|
487
552
|
pendingTotalSize?: number;
|
|
488
|
-
|
|
553
|
+
pendingScrollResolve?: (() => void) | undefined;
|
|
554
|
+
positions: Array<number | undefined>;
|
|
489
555
|
previousData?: readonly unknown[];
|
|
490
556
|
queuedCalculateItemsInView: number | undefined;
|
|
491
557
|
queuedMVCPRecalculate?: number;
|
|
492
558
|
queuedInitialLayout?: boolean | undefined;
|
|
493
|
-
refScroller: React.RefObject<
|
|
559
|
+
refScroller: React.RefObject<LegendListScrollerRef$1 | null>;
|
|
494
560
|
scroll: number;
|
|
495
561
|
scrollAdjustHandler: ScrollAdjustHandler;
|
|
496
562
|
scrollForNextCalculateItemsInView: {
|
|
@@ -501,7 +567,7 @@ interface InternalState {
|
|
|
501
567
|
scroll: number;
|
|
502
568
|
time: number;
|
|
503
569
|
}>;
|
|
504
|
-
scrollingTo?: ScrollTarget | undefined;
|
|
570
|
+
scrollingTo?: ScrollTarget$1 | undefined;
|
|
505
571
|
scrollLastCalculate?: number;
|
|
506
572
|
scrollLength: number;
|
|
507
573
|
scrollPending: number;
|
|
@@ -514,7 +580,8 @@ interface InternalState {
|
|
|
514
580
|
startBuffered: number;
|
|
515
581
|
startBufferedId?: string;
|
|
516
582
|
startNoBuffer: number;
|
|
517
|
-
|
|
583
|
+
startReachedSnapshotDataChangeEpoch: number | undefined;
|
|
584
|
+
startReachedSnapshot: ThresholdSnapshot$1 | undefined;
|
|
518
585
|
stickyContainerPool: Set<number>;
|
|
519
586
|
stickyContainers: Map<number, number>;
|
|
520
587
|
timeouts: Set<number>;
|
|
@@ -527,67 +594,71 @@ interface InternalState {
|
|
|
527
594
|
dataChanged?: boolean;
|
|
528
595
|
forceFullItemPositions?: boolean;
|
|
529
596
|
}) => void;
|
|
530
|
-
viewabilityConfigCallbackPairs: ViewabilityConfigCallbackPairs<any> | undefined;
|
|
597
|
+
viewabilityConfigCallbackPairs: ViewabilityConfigCallbackPairs$1<any> | undefined;
|
|
531
598
|
props: {
|
|
532
599
|
alignItemsAtEnd: boolean;
|
|
533
|
-
animatedProps: StylesAsSharedValue<
|
|
534
|
-
alwaysRender: AlwaysRenderConfig | undefined;
|
|
600
|
+
animatedProps: StylesAsSharedValue<Record<string, any>>;
|
|
601
|
+
alwaysRender: AlwaysRenderConfig$1 | undefined;
|
|
535
602
|
alwaysRenderIndicesArr: number[];
|
|
536
603
|
alwaysRenderIndicesSet: Set<number>;
|
|
537
|
-
contentInset: Insets | undefined;
|
|
604
|
+
contentInset: Insets$1 | undefined;
|
|
538
605
|
data: readonly any[];
|
|
539
606
|
dataVersion: Key | undefined;
|
|
540
607
|
drawDistance: number;
|
|
541
608
|
estimatedItemSize: number | undefined;
|
|
542
|
-
getEstimatedItemSize:
|
|
543
|
-
getFixedItemSize:
|
|
544
|
-
getItemType:
|
|
609
|
+
getEstimatedItemSize: LegendListPropsInternal["getEstimatedItemSize"];
|
|
610
|
+
getFixedItemSize: LegendListPropsInternal["getFixedItemSize"];
|
|
611
|
+
getItemType: LegendListPropsInternal["getItemType"];
|
|
545
612
|
horizontal: boolean;
|
|
546
613
|
initialContainerPoolRatio: number;
|
|
547
|
-
itemsAreEqual:
|
|
548
|
-
keyExtractor:
|
|
549
|
-
maintainScrollAtEnd: boolean | MaintainScrollAtEndOptions;
|
|
614
|
+
itemsAreEqual: LegendListPropsInternal["itemsAreEqual"];
|
|
615
|
+
keyExtractor: LegendListPropsInternal["keyExtractor"];
|
|
616
|
+
maintainScrollAtEnd: boolean | MaintainScrollAtEndOptions$1;
|
|
550
617
|
maintainScrollAtEndThreshold: number | undefined;
|
|
551
|
-
maintainVisibleContentPosition: MaintainVisibleContentPositionNormalized;
|
|
618
|
+
maintainVisibleContentPosition: MaintainVisibleContentPositionNormalized$1;
|
|
552
619
|
numColumns: number;
|
|
553
|
-
onEndReached:
|
|
620
|
+
onEndReached: LegendListPropsInternal["onEndReached"];
|
|
554
621
|
onEndReachedThreshold: number | null | undefined;
|
|
555
|
-
onItemSizeChanged:
|
|
556
|
-
onLoad:
|
|
557
|
-
onScroll:
|
|
558
|
-
onStartReached:
|
|
622
|
+
onItemSizeChanged: LegendListPropsInternal["onItemSizeChanged"];
|
|
623
|
+
onLoad: LegendListPropsInternal["onLoad"];
|
|
624
|
+
onScroll: LegendListPropsInternal["onScroll"];
|
|
625
|
+
onStartReached: LegendListPropsInternal["onStartReached"];
|
|
559
626
|
onStartReachedThreshold: number | null | undefined;
|
|
560
|
-
onStickyHeaderChange:
|
|
561
|
-
overrideItemLayout:
|
|
627
|
+
onStickyHeaderChange: LegendListPropsInternal["onStickyHeaderChange"];
|
|
628
|
+
overrideItemLayout: LegendListPropsInternal["overrideItemLayout"];
|
|
562
629
|
recycleItems: boolean;
|
|
563
|
-
renderItem:
|
|
630
|
+
renderItem: LegendListPropsInternal["renderItem"];
|
|
631
|
+
scrollBuffer?: number;
|
|
564
632
|
snapToIndices: number[] | undefined;
|
|
633
|
+
positionComponentInternal: React.ComponentType<any> | undefined;
|
|
634
|
+
stickyPositionComponentInternal: React.ComponentType<any> | undefined;
|
|
565
635
|
stickyIndicesArr: number[];
|
|
566
636
|
stickyIndicesSet: Set<number>;
|
|
567
637
|
stylePaddingBottom: number | undefined;
|
|
568
638
|
stylePaddingTop: number | undefined;
|
|
569
639
|
suggestEstimatedItemSize: boolean;
|
|
640
|
+
useWindowScroll: boolean;
|
|
570
641
|
};
|
|
571
642
|
}
|
|
572
|
-
interface ViewableRange<T> {
|
|
643
|
+
interface ViewableRange$1<T> {
|
|
573
644
|
end: number;
|
|
574
645
|
endBuffered: number;
|
|
575
646
|
items: T[];
|
|
576
647
|
start: number;
|
|
577
648
|
startBuffered: number;
|
|
578
649
|
}
|
|
579
|
-
interface LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
650
|
+
interface LegendListRenderItemProps$1<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
580
651
|
data: readonly ItemT[];
|
|
581
652
|
extraData: any;
|
|
582
653
|
index: number;
|
|
583
654
|
item: ItemT;
|
|
584
655
|
type: TItemType;
|
|
585
656
|
}
|
|
586
|
-
type LegendListState = {
|
|
657
|
+
type LegendListState$1 = {
|
|
587
658
|
activeStickyIndex: number;
|
|
588
659
|
contentLength: number;
|
|
589
660
|
data: readonly any[];
|
|
590
|
-
elementAtIndex: (index: number) =>
|
|
661
|
+
elementAtIndex: (index: number) => any;
|
|
591
662
|
end: number;
|
|
592
663
|
endBuffered: number;
|
|
593
664
|
isAtEnd: boolean;
|
|
@@ -595,7 +666,7 @@ type LegendListState = {
|
|
|
595
666
|
listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
|
|
596
667
|
listenToPosition: (key: string, callback: (value: number) => void) => () => void;
|
|
597
668
|
positionAtIndex: (index: number) => number;
|
|
598
|
-
|
|
669
|
+
positionByKey: (key: string) => number | undefined;
|
|
599
670
|
scroll: number;
|
|
600
671
|
scrollLength: number;
|
|
601
672
|
scrollVelocity: number;
|
|
@@ -604,7 +675,7 @@ type LegendListState = {
|
|
|
604
675
|
start: number;
|
|
605
676
|
startBuffered: number;
|
|
606
677
|
};
|
|
607
|
-
type LegendListRef = {
|
|
678
|
+
type LegendListRef$1 = {
|
|
608
679
|
/**
|
|
609
680
|
* Displays the scroll indicators momentarily.
|
|
610
681
|
*/
|
|
@@ -612,7 +683,7 @@ type LegendListRef = {
|
|
|
612
683
|
/**
|
|
613
684
|
* Returns the native ScrollView component reference.
|
|
614
685
|
*/
|
|
615
|
-
getNativeScrollRef():
|
|
686
|
+
getNativeScrollRef(): any;
|
|
616
687
|
/**
|
|
617
688
|
* Returns the scroll responder instance for handling scroll events.
|
|
618
689
|
*/
|
|
@@ -620,11 +691,11 @@ type LegendListRef = {
|
|
|
620
691
|
/**
|
|
621
692
|
* Returns the ScrollResponderMixin for advanced scroll handling.
|
|
622
693
|
*/
|
|
623
|
-
getScrollResponder():
|
|
694
|
+
getScrollResponder(): any;
|
|
624
695
|
/**
|
|
625
696
|
* Returns the internal state of the scroll virtualization.
|
|
626
697
|
*/
|
|
627
|
-
getState(): LegendListState;
|
|
698
|
+
getState(): LegendListState$1;
|
|
628
699
|
/**
|
|
629
700
|
* Scrolls a specific index into view.
|
|
630
701
|
* @param params - Parameters for scrolling.
|
|
@@ -634,7 +705,7 @@ type LegendListRef = {
|
|
|
634
705
|
scrollIndexIntoView(params: {
|
|
635
706
|
animated?: boolean | undefined;
|
|
636
707
|
index: number;
|
|
637
|
-
}): void
|
|
708
|
+
}): Promise<void>;
|
|
638
709
|
/**
|
|
639
710
|
* Scrolls a specific index into view.
|
|
640
711
|
* @param params - Parameters for scrolling.
|
|
@@ -644,7 +715,7 @@ type LegendListRef = {
|
|
|
644
715
|
scrollItemIntoView(params: {
|
|
645
716
|
animated?: boolean | undefined;
|
|
646
717
|
item: any;
|
|
647
|
-
}): void
|
|
718
|
+
}): Promise<void>;
|
|
648
719
|
/**
|
|
649
720
|
* Scrolls to the end of the list.
|
|
650
721
|
* @param options - Options for scrolling.
|
|
@@ -654,7 +725,7 @@ type LegendListRef = {
|
|
|
654
725
|
scrollToEnd(options?: {
|
|
655
726
|
animated?: boolean | undefined;
|
|
656
727
|
viewOffset?: number | undefined;
|
|
657
|
-
}): void
|
|
728
|
+
}): Promise<void>;
|
|
658
729
|
/**
|
|
659
730
|
* Scrolls to a specific index in the list.
|
|
660
731
|
* @param params - Parameters for scrolling.
|
|
@@ -668,7 +739,7 @@ type LegendListRef = {
|
|
|
668
739
|
index: number;
|
|
669
740
|
viewOffset?: number | undefined;
|
|
670
741
|
viewPosition?: number | undefined;
|
|
671
|
-
}): void
|
|
742
|
+
}): Promise<void>;
|
|
672
743
|
/**
|
|
673
744
|
* Scrolls to a specific item in the list.
|
|
674
745
|
* @param params - Parameters for scrolling.
|
|
@@ -682,7 +753,7 @@ type LegendListRef = {
|
|
|
682
753
|
item: any;
|
|
683
754
|
viewOffset?: number | undefined;
|
|
684
755
|
viewPosition?: number | undefined;
|
|
685
|
-
}): void
|
|
756
|
+
}): Promise<void>;
|
|
686
757
|
/**
|
|
687
758
|
* Scrolls to a specific offset in pixels.
|
|
688
759
|
* @param params - Parameters for scrolling.
|
|
@@ -692,7 +763,7 @@ type LegendListRef = {
|
|
|
692
763
|
scrollToOffset(params: {
|
|
693
764
|
offset: number;
|
|
694
765
|
animated?: boolean | undefined;
|
|
695
|
-
}): void
|
|
766
|
+
}): Promise<void>;
|
|
696
767
|
/**
|
|
697
768
|
* Sets or adds to the offset of the visible content anchor.
|
|
698
769
|
* @param value - The offset to set or add.
|
|
@@ -704,36 +775,44 @@ type LegendListRef = {
|
|
|
704
775
|
* @param enabled - If true, scroll processing is enabled.
|
|
705
776
|
*/
|
|
706
777
|
setScrollProcessingEnabled(enabled: boolean): void;
|
|
778
|
+
/**
|
|
779
|
+
* Clears internal virtualization caches.
|
|
780
|
+
* @param options - Cache clearing options.
|
|
781
|
+
* @param options.mode - `sizes` clears measurement caches. `full` also clears key/position caches.
|
|
782
|
+
*/
|
|
783
|
+
clearCaches(options?: {
|
|
784
|
+
mode?: "sizes" | "full";
|
|
785
|
+
}): void;
|
|
707
786
|
/**
|
|
708
787
|
* Reports an externally measured content inset. Pass null/undefined to clear.
|
|
709
788
|
* Values are merged on top of props/animated/native insets.
|
|
710
789
|
*/
|
|
711
|
-
reportContentInset(inset?: Partial<Insets> | null): void;
|
|
790
|
+
reportContentInset(inset?: Partial<Insets$1> | null): void;
|
|
712
791
|
};
|
|
713
|
-
interface ViewToken<ItemT = any> {
|
|
792
|
+
interface ViewToken$1<ItemT = any> {
|
|
714
793
|
containerId: number;
|
|
715
794
|
index: number;
|
|
716
795
|
isViewable: boolean;
|
|
717
796
|
item: ItemT;
|
|
718
797
|
key: string;
|
|
719
798
|
}
|
|
720
|
-
interface ViewAmountToken<ItemT = any> extends ViewToken<ItemT> {
|
|
799
|
+
interface ViewAmountToken$1<ItemT = any> extends ViewToken$1<ItemT> {
|
|
721
800
|
percentOfScroller: number;
|
|
722
801
|
percentVisible: number;
|
|
723
802
|
scrollSize: number;
|
|
724
803
|
size: number;
|
|
725
804
|
sizeVisible: number;
|
|
726
805
|
}
|
|
727
|
-
interface ViewabilityConfigCallbackPair<ItemT = any> {
|
|
728
|
-
onViewableItemsChanged?: OnViewableItemsChanged<ItemT>;
|
|
729
|
-
viewabilityConfig: ViewabilityConfig;
|
|
806
|
+
interface ViewabilityConfigCallbackPair$1<ItemT = any> {
|
|
807
|
+
onViewableItemsChanged?: OnViewableItemsChanged$1<ItemT>;
|
|
808
|
+
viewabilityConfig: ViewabilityConfig$1;
|
|
730
809
|
}
|
|
731
|
-
type ViewabilityConfigCallbackPairs<ItemT> = ViewabilityConfigCallbackPair<ItemT>[];
|
|
732
|
-
type OnViewableItemsChanged<ItemT> = ((info: {
|
|
733
|
-
viewableItems: Array<ViewToken<ItemT>>;
|
|
734
|
-
changed: Array<ViewToken<ItemT>>;
|
|
810
|
+
type ViewabilityConfigCallbackPairs$1<ItemT> = ViewabilityConfigCallbackPair$1<ItemT>[];
|
|
811
|
+
type OnViewableItemsChanged$1<ItemT> = ((info: {
|
|
812
|
+
viewableItems: Array<ViewToken$1<ItemT>>;
|
|
813
|
+
changed: Array<ViewToken$1<ItemT>>;
|
|
735
814
|
}) => void) | null;
|
|
736
|
-
interface ViewabilityConfig {
|
|
815
|
+
interface ViewabilityConfig$1 {
|
|
737
816
|
/**
|
|
738
817
|
* A unique ID to identify this viewability config
|
|
739
818
|
*/
|
|
@@ -762,51 +841,354 @@ interface ViewabilityConfig {
|
|
|
762
841
|
*/
|
|
763
842
|
waitForInteraction?: boolean | undefined;
|
|
764
843
|
}
|
|
765
|
-
type ViewabilityCallback<ItemT = any> = (viewToken: ViewToken<ItemT>) => void;
|
|
766
|
-
type ViewabilityAmountCallback<ItemT = any> = (viewToken: ViewAmountToken<ItemT>) => void;
|
|
767
|
-
interface LegendListRecyclingState<T> {
|
|
844
|
+
type ViewabilityCallback$1<ItemT = any> = (viewToken: ViewToken$1<ItemT>) => void;
|
|
845
|
+
type ViewabilityAmountCallback$1<ItemT = any> = (viewToken: ViewAmountToken$1<ItemT>) => void;
|
|
846
|
+
interface LegendListRecyclingState$1<T> {
|
|
768
847
|
index: number;
|
|
769
848
|
item: T;
|
|
770
849
|
prevIndex: number | undefined;
|
|
771
850
|
prevItem: T | undefined;
|
|
772
851
|
}
|
|
773
|
-
type TypedForwardRef = <T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactNode) => (props: P & React.RefAttributes<T>) => React.ReactNode;
|
|
774
|
-
declare const typedForwardRef: TypedForwardRef;
|
|
775
|
-
type TypedMemo = <T extends React.ComponentType<any>>(Component: T, propsAreEqual?: (prevProps: Readonly<React.JSXElementConstructor<T>>, nextProps: Readonly<React.JSXElementConstructor<T>>) => boolean) => T & {
|
|
852
|
+
type TypedForwardRef$1 = <T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactNode) => (props: P & React.RefAttributes<T>) => React.ReactNode;
|
|
853
|
+
declare const typedForwardRef: TypedForwardRef$1;
|
|
854
|
+
type TypedMemo$1 = <T extends React.ComponentType<any>>(Component: T, propsAreEqual?: (prevProps: Readonly<React.JSXElementConstructor<T>>, nextProps: Readonly<React.JSXElementConstructor<T>>) => boolean) => T & {
|
|
776
855
|
displayName?: string;
|
|
777
856
|
};
|
|
778
|
-
declare const typedMemo: TypedMemo;
|
|
779
|
-
interface ScrollIndexWithOffset {
|
|
857
|
+
declare const typedMemo: TypedMemo$1;
|
|
858
|
+
interface ScrollIndexWithOffset$1 {
|
|
780
859
|
index: number;
|
|
781
860
|
viewOffset?: number;
|
|
782
861
|
viewPosition?: number;
|
|
783
862
|
}
|
|
784
|
-
interface ScrollIndexWithOffsetPosition extends ScrollIndexWithOffset {
|
|
863
|
+
interface ScrollIndexWithOffsetPosition$1 extends ScrollIndexWithOffset$1 {
|
|
785
864
|
viewPosition?: number;
|
|
786
865
|
}
|
|
787
|
-
interface ScrollIndexWithOffsetAndContentOffset extends ScrollIndexWithOffsetPosition {
|
|
866
|
+
interface ScrollIndexWithOffsetAndContentOffset$1 extends ScrollIndexWithOffsetPosition$1 {
|
|
788
867
|
contentOffset?: number;
|
|
789
868
|
}
|
|
790
|
-
interface InitialScrollAnchor extends ScrollIndexWithOffsetPosition {
|
|
869
|
+
interface InitialScrollAnchor$1 extends ScrollIndexWithOffsetPosition$1 {
|
|
791
870
|
attempts?: number;
|
|
792
871
|
lastDelta?: number;
|
|
793
872
|
settledTicks?: number;
|
|
794
873
|
}
|
|
795
|
-
type GetRenderedItemResult<ItemT> = {
|
|
874
|
+
type GetRenderedItemResult$1<ItemT> = {
|
|
796
875
|
index: number;
|
|
797
876
|
item: ItemT;
|
|
798
877
|
renderedItem: React.ReactNode;
|
|
799
878
|
};
|
|
800
|
-
type GetRenderedItem = (key: string) => GetRenderedItemResult<any> | null;
|
|
879
|
+
type GetRenderedItem$1 = (key: string) => GetRenderedItemResult$1<any> | null;
|
|
801
880
|
|
|
802
|
-
|
|
803
|
-
|
|
881
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
882
|
+
type Insets = Insets$1;
|
|
883
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
884
|
+
type LayoutRectangle = LayoutRectangle$1;
|
|
885
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
886
|
+
type NativeScrollEvent = NativeScrollEvent$1;
|
|
887
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
888
|
+
type NativeSyntheticEvent<T> = NativeSyntheticEvent$1<T>;
|
|
889
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
890
|
+
type ViewStyle = ViewStyle$1;
|
|
891
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
892
|
+
type StyleProp<T> = StyleProp$1<T>;
|
|
893
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
894
|
+
type ScrollEventTargetLike = ScrollEventTargetLike$1;
|
|
895
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
896
|
+
type ScrollableNodeLike = ScrollableNodeLike$1;
|
|
897
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
898
|
+
type LegendListScrollerRef = LegendListScrollerRef$1;
|
|
899
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
900
|
+
type BaseScrollViewProps<TScrollView> = BaseScrollViewProps$1<TScrollView>;
|
|
901
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
902
|
+
type LegendListPropsBase<ItemT, TScrollViewProps = Record<string, any>, TItemType extends string | undefined = string | undefined> = LegendListPropsBase$1<ItemT, TScrollViewProps, TItemType>;
|
|
903
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
904
|
+
type MaintainVisibleContentPositionConfig<ItemT = any> = MaintainVisibleContentPositionConfig$1<ItemT>;
|
|
905
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
906
|
+
type MaintainVisibleContentPositionNormalized<ItemT = any> = MaintainVisibleContentPositionNormalized$1<ItemT>;
|
|
907
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
908
|
+
type StickyHeaderConfig = StickyHeaderConfig$1;
|
|
909
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
910
|
+
type AlwaysRenderConfig = AlwaysRenderConfig$1;
|
|
911
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
912
|
+
type MaintainScrollAtEndOptions = MaintainScrollAtEndOptions$1;
|
|
913
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
914
|
+
type ColumnWrapperStyle = ColumnWrapperStyle$1;
|
|
915
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
916
|
+
type LegendListMetrics = LegendListMetrics$1;
|
|
917
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
918
|
+
type ThresholdSnapshot = ThresholdSnapshot$1;
|
|
919
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
920
|
+
type ScrollTarget = ScrollTarget$1;
|
|
921
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
922
|
+
type InternalState = InternalState$1;
|
|
923
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
924
|
+
type ViewableRange<T> = ViewableRange$1<T>;
|
|
925
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
926
|
+
type LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> = LegendListRenderItemProps$1<ItemT, TItemType>;
|
|
927
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
928
|
+
type LegendListState = LegendListState$1;
|
|
929
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
930
|
+
type LegendListRef = LegendListRef$1;
|
|
931
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
932
|
+
type ViewToken<ItemT = any> = ViewToken$1<ItemT>;
|
|
933
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
934
|
+
type ViewAmountToken<ItemT = any> = ViewAmountToken$1<ItemT>;
|
|
935
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
936
|
+
type ViewabilityConfigCallbackPair<ItemT = any> = ViewabilityConfigCallbackPair$1<ItemT>;
|
|
937
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
938
|
+
type ViewabilityConfigCallbackPairs<ItemT> = ViewabilityConfigCallbackPairs$1<ItemT>;
|
|
939
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
940
|
+
type OnViewableItemsChanged<ItemT> = OnViewableItemsChanged$1<ItemT>;
|
|
941
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
942
|
+
type ViewabilityConfig = ViewabilityConfig$1;
|
|
943
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
944
|
+
type ViewabilityCallback<ItemT = any> = ViewabilityCallback$1<ItemT>;
|
|
945
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
946
|
+
type ViewabilityAmountCallback<ItemT = any> = ViewabilityAmountCallback$1<ItemT>;
|
|
947
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
948
|
+
type LegendListRecyclingState<T> = LegendListRecyclingState$1<T>;
|
|
949
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
950
|
+
type TypedForwardRef = TypedForwardRef$1;
|
|
951
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
952
|
+
type TypedMemo = TypedMemo$1;
|
|
953
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
954
|
+
type ScrollIndexWithOffset = ScrollIndexWithOffset$1;
|
|
955
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
956
|
+
type ScrollIndexWithOffsetPosition = ScrollIndexWithOffsetPosition$1;
|
|
957
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
958
|
+
type ScrollIndexWithOffsetAndContentOffset = ScrollIndexWithOffsetAndContentOffset$1;
|
|
959
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
960
|
+
type InitialScrollAnchor = InitialScrollAnchor$1;
|
|
961
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
962
|
+
type GetRenderedItemResult<ItemT> = GetRenderedItemResult$1<ItemT>;
|
|
963
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
964
|
+
type GetRenderedItem = GetRenderedItem$1;
|
|
965
|
+
interface LooseAccessibilityActionEvent {
|
|
966
|
+
nativeEvent?: {
|
|
967
|
+
actionName?: string;
|
|
968
|
+
};
|
|
969
|
+
}
|
|
970
|
+
type AccessibilityActionEvent = LooseAccessibilityActionEvent;
|
|
971
|
+
type LooseAccessibilityRole = string;
|
|
972
|
+
type AccessibilityRole = LooseAccessibilityRole;
|
|
973
|
+
interface LooseAccessibilityState {
|
|
974
|
+
busy?: boolean;
|
|
975
|
+
checked?: boolean | "mixed";
|
|
976
|
+
disabled?: boolean;
|
|
977
|
+
expanded?: boolean;
|
|
978
|
+
selected?: boolean;
|
|
979
|
+
}
|
|
980
|
+
type AccessibilityState = LooseAccessibilityState;
|
|
981
|
+
interface LooseAccessibilityValue {
|
|
982
|
+
max?: number;
|
|
983
|
+
min?: number;
|
|
984
|
+
now?: number;
|
|
985
|
+
text?: string;
|
|
986
|
+
}
|
|
987
|
+
type AccessibilityValue = LooseAccessibilityValue;
|
|
988
|
+
type LooseColorValue = string | number;
|
|
989
|
+
type ColorValue = LooseColorValue;
|
|
990
|
+
interface LooseGestureResponderEvent {
|
|
991
|
+
nativeEvent?: unknown;
|
|
992
|
+
}
|
|
993
|
+
type GestureResponderEvent = LooseGestureResponderEvent;
|
|
994
|
+
interface LoosePointerEvent {
|
|
995
|
+
nativeEvent?: unknown;
|
|
996
|
+
}
|
|
997
|
+
type PointerEvent = LoosePointerEvent;
|
|
998
|
+
interface LooseRefreshControlProps {
|
|
999
|
+
onRefresh?: () => void;
|
|
1000
|
+
progressViewOffset?: number;
|
|
1001
|
+
refreshing?: boolean;
|
|
1002
|
+
}
|
|
1003
|
+
type RefreshControlProps = LooseRefreshControlProps;
|
|
1004
|
+
type LooseRole = string;
|
|
1005
|
+
type Role = LooseRole;
|
|
1006
|
+
interface PointProp {
|
|
1007
|
+
x: number;
|
|
1008
|
+
y: number;
|
|
1009
|
+
}
|
|
1010
|
+
interface LayoutChangeEvent {
|
|
1011
|
+
nativeEvent: {
|
|
1012
|
+
layout: LayoutRectangle;
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1016
|
+
interface LooseScrollViewProps {
|
|
1017
|
+
StickyHeaderComponent?: ComponentType<unknown>;
|
|
1018
|
+
accessibilityActions?: Array<{
|
|
1019
|
+
label?: string;
|
|
1020
|
+
name: string;
|
|
1021
|
+
}>;
|
|
1022
|
+
accessibilityElementsHidden?: boolean;
|
|
1023
|
+
accessibilityHint?: string;
|
|
1024
|
+
accessibilityIgnoresInvertColors?: boolean;
|
|
1025
|
+
accessibilityLabel?: string;
|
|
1026
|
+
accessibilityLabelledBy?: string | string[];
|
|
1027
|
+
accessibilityLanguage?: string;
|
|
1028
|
+
accessibilityLargeContentTitle?: string;
|
|
1029
|
+
accessibilityLiveRegion?: "none" | "polite" | "assertive";
|
|
1030
|
+
accessibilityRespondsToUserInteraction?: boolean;
|
|
1031
|
+
accessibilityRole?: AccessibilityRole;
|
|
1032
|
+
accessibilityShowsLargeContentViewer?: boolean;
|
|
1033
|
+
accessibilityState?: AccessibilityState;
|
|
1034
|
+
accessibilityValue?: AccessibilityValue;
|
|
1035
|
+
accessibilityViewIsModal?: boolean;
|
|
1036
|
+
accessible?: boolean;
|
|
1037
|
+
alwaysBounceHorizontal?: boolean;
|
|
1038
|
+
alwaysBounceVertical?: boolean;
|
|
1039
|
+
"aria-busy"?: boolean;
|
|
1040
|
+
"aria-checked"?: boolean | "mixed";
|
|
1041
|
+
"aria-disabled"?: boolean;
|
|
1042
|
+
"aria-expanded"?: boolean;
|
|
1043
|
+
"aria-hidden"?: boolean;
|
|
1044
|
+
"aria-label"?: string;
|
|
1045
|
+
"aria-labelledby"?: string;
|
|
1046
|
+
"aria-live"?: "polite" | "assertive" | "off";
|
|
1047
|
+
"aria-modal"?: boolean;
|
|
1048
|
+
"aria-selected"?: boolean;
|
|
1049
|
+
"aria-valuemax"?: number;
|
|
1050
|
+
"aria-valuemin"?: number;
|
|
1051
|
+
"aria-valuenow"?: number;
|
|
1052
|
+
"aria-valuetext"?: string;
|
|
1053
|
+
automaticallyAdjustContentInsets?: boolean;
|
|
1054
|
+
automaticallyAdjustKeyboardInsets?: boolean;
|
|
1055
|
+
automaticallyAdjustsScrollIndicatorInsets?: boolean;
|
|
1056
|
+
bounces?: boolean;
|
|
1057
|
+
bouncesZoom?: boolean;
|
|
1058
|
+
canCancelContentTouches?: boolean;
|
|
1059
|
+
centerContent?: boolean;
|
|
1060
|
+
children?: ReactNode;
|
|
1061
|
+
collapsable?: boolean;
|
|
1062
|
+
collapsableChildren?: boolean;
|
|
1063
|
+
contentContainerStyle?: StyleProp<ViewStyle> | CSSProperties;
|
|
1064
|
+
contentInset?: Insets;
|
|
1065
|
+
contentInsetAdjustmentBehavior?: "always" | "never" | "automatic" | "scrollableAxes";
|
|
1066
|
+
contentOffset?: PointProp;
|
|
1067
|
+
decelerationRate?: number | "fast" | "normal";
|
|
1068
|
+
directionalLockEnabled?: boolean;
|
|
1069
|
+
disableIntervalMomentum?: boolean;
|
|
1070
|
+
disableScrollViewPanResponder?: boolean;
|
|
1071
|
+
endFillColor?: ColorValue;
|
|
1072
|
+
fadingEdgeLength?: number | {
|
|
1073
|
+
end?: number;
|
|
1074
|
+
start?: number;
|
|
1075
|
+
};
|
|
1076
|
+
focusable?: boolean;
|
|
1077
|
+
hasTVPreferredFocus?: boolean;
|
|
1078
|
+
hitSlop?: number | Insets;
|
|
1079
|
+
horizontal?: boolean;
|
|
1080
|
+
id?: string;
|
|
1081
|
+
importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants";
|
|
1082
|
+
indicatorStyle?: "default" | "black" | "white";
|
|
1083
|
+
innerViewRef?: Ref<unknown>;
|
|
1084
|
+
invertStickyHeaders?: boolean;
|
|
1085
|
+
isTVSelectable?: boolean;
|
|
1086
|
+
keyboardDismissMode?: "none" | "interactive" | "on-drag";
|
|
1087
|
+
keyboardShouldPersistTaps?: boolean | "always" | "never" | "handled";
|
|
1088
|
+
maintainVisibleContentPosition?: {
|
|
1089
|
+
autoscrollToTopThreshold?: number;
|
|
1090
|
+
minIndexForVisible: number;
|
|
1091
|
+
};
|
|
1092
|
+
maximumZoomScale?: number;
|
|
1093
|
+
minimumZoomScale?: number;
|
|
1094
|
+
nativeID?: string;
|
|
1095
|
+
needsOffscreenAlphaCompositing?: boolean;
|
|
1096
|
+
nestedScrollEnabled?: boolean;
|
|
1097
|
+
onAccessibilityAction?: (event: AccessibilityActionEvent) => void;
|
|
1098
|
+
onAccessibilityEscape?: () => void;
|
|
1099
|
+
onAccessibilityTap?: () => void;
|
|
1100
|
+
onBlur?: (event: unknown) => void;
|
|
1101
|
+
onContentSizeChange?: (width: number, height: number) => void;
|
|
1102
|
+
onFocus?: (event: unknown) => void;
|
|
1103
|
+
onLayout?: (event: LayoutChangeEvent) => void;
|
|
1104
|
+
onMagicTap?: () => void;
|
|
1105
|
+
onMomentumScrollBegin?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1106
|
+
onMomentumScrollEnd?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1107
|
+
onMoveShouldSetResponder?: (event: GestureResponderEvent) => boolean;
|
|
1108
|
+
onMoveShouldSetResponderCapture?: (event: GestureResponderEvent) => boolean;
|
|
1109
|
+
onPointerCancel?: (event: PointerEvent) => void;
|
|
1110
|
+
onPointerCancelCapture?: (event: PointerEvent) => void;
|
|
1111
|
+
onPointerDown?: (event: PointerEvent) => void;
|
|
1112
|
+
onPointerDownCapture?: (event: PointerEvent) => void;
|
|
1113
|
+
onPointerEnter?: (event: PointerEvent) => void;
|
|
1114
|
+
onPointerEnterCapture?: (event: PointerEvent) => void;
|
|
1115
|
+
onPointerLeave?: (event: PointerEvent) => void;
|
|
1116
|
+
onPointerLeaveCapture?: (event: PointerEvent) => void;
|
|
1117
|
+
onPointerMove?: (event: PointerEvent) => void;
|
|
1118
|
+
onPointerMoveCapture?: (event: PointerEvent) => void;
|
|
1119
|
+
onPointerUp?: (event: PointerEvent) => void;
|
|
1120
|
+
onPointerUpCapture?: (event: PointerEvent) => void;
|
|
1121
|
+
onResponderEnd?: (event: GestureResponderEvent) => void;
|
|
1122
|
+
onResponderGrant?: (event: GestureResponderEvent) => void;
|
|
1123
|
+
onResponderMove?: (event: GestureResponderEvent) => void;
|
|
1124
|
+
onResponderReject?: (event: GestureResponderEvent) => void;
|
|
1125
|
+
onResponderRelease?: (event: GestureResponderEvent) => void;
|
|
1126
|
+
onResponderStart?: (event: GestureResponderEvent) => void;
|
|
1127
|
+
onResponderTerminate?: (event: GestureResponderEvent) => void;
|
|
1128
|
+
onResponderTerminationRequest?: (event: GestureResponderEvent) => boolean;
|
|
1129
|
+
onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1130
|
+
onScrollAnimationEnd?: () => void;
|
|
1131
|
+
onScrollBeginDrag?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1132
|
+
onScrollEndDrag?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1133
|
+
onScrollToTop?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1134
|
+
onStartShouldSetResponder?: (event: GestureResponderEvent) => boolean;
|
|
1135
|
+
onStartShouldSetResponderCapture?: (event: GestureResponderEvent) => boolean;
|
|
1136
|
+
onTouchCancel?: (event: GestureResponderEvent) => void;
|
|
1137
|
+
onTouchEnd?: (event: GestureResponderEvent) => void;
|
|
1138
|
+
onTouchEndCapture?: (event: GestureResponderEvent) => void;
|
|
1139
|
+
onTouchMove?: (event: GestureResponderEvent) => void;
|
|
1140
|
+
onTouchStart?: (event: GestureResponderEvent) => void;
|
|
1141
|
+
overScrollMode?: "always" | "never" | "auto";
|
|
1142
|
+
pagingEnabled?: boolean;
|
|
1143
|
+
persistentScrollbar?: boolean;
|
|
1144
|
+
pinchGestureEnabled?: boolean;
|
|
1145
|
+
pointerEvents?: "none" | "box-none" | "box-only" | "auto";
|
|
1146
|
+
refreshControl?: ReactElement<RefreshControlProps, string | JSXElementConstructor<unknown>>;
|
|
1147
|
+
removeClippedSubviews?: boolean;
|
|
1148
|
+
renderToHardwareTextureAndroid?: boolean;
|
|
1149
|
+
role?: Role;
|
|
1150
|
+
screenReaderFocusable?: boolean;
|
|
1151
|
+
scrollEnabled?: boolean;
|
|
1152
|
+
scrollEventThrottle?: number;
|
|
1153
|
+
scrollIndicatorInsets?: Insets;
|
|
1154
|
+
scrollPerfTag?: string;
|
|
1155
|
+
scrollToOverflowEnabled?: boolean;
|
|
1156
|
+
scrollViewRef?: Ref<unknown>;
|
|
1157
|
+
scrollsToTop?: boolean;
|
|
1158
|
+
shouldRasterizeIOS?: boolean;
|
|
1159
|
+
showsHorizontalScrollIndicator?: boolean;
|
|
1160
|
+
showsVerticalScrollIndicator?: boolean;
|
|
1161
|
+
snapToAlignment?: "start" | "center" | "end";
|
|
1162
|
+
snapToEnd?: boolean;
|
|
1163
|
+
snapToInterval?: number;
|
|
1164
|
+
snapToOffsets?: number[];
|
|
1165
|
+
snapToStart?: boolean;
|
|
1166
|
+
stickyHeaderHiddenOnScroll?: boolean;
|
|
1167
|
+
stickyHeaderIndices?: number[];
|
|
1168
|
+
style?: StyleProp<ViewStyle> | CSSProperties;
|
|
1169
|
+
tabIndex?: 0 | -1;
|
|
1170
|
+
testID?: string;
|
|
1171
|
+
tvParallaxMagnification?: number;
|
|
1172
|
+
tvParallaxShiftDistanceX?: number;
|
|
1173
|
+
tvParallaxShiftDistanceY?: number;
|
|
1174
|
+
tvParallaxTiltAngle?: number;
|
|
1175
|
+
zoomScale?: number;
|
|
1176
|
+
}
|
|
1177
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1178
|
+
type ScrollViewPropsLoose = LooseScrollViewProps;
|
|
1179
|
+
type LegendListPropsLoose<ItemT = any> = Omit<LegendListPropsBase<ItemT, LooseScrollViewProps>, "ListHeaderComponentStyle" | "ListFooterComponentStyle"> & {
|
|
1180
|
+
ListHeaderComponentStyle?: StyleProp<ViewStyle> | CSSProperties | undefined;
|
|
1181
|
+
ListFooterComponentStyle?: StyleProp<ViewStyle> | CSSProperties | undefined;
|
|
804
1182
|
};
|
|
1183
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1184
|
+
type LegendListProps<ItemT = any> = LegendListPropsLoose<ItemT>;
|
|
1185
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1186
|
+
type LegendListComponent = <ItemT = any>(props: LegendListProps<ItemT> & RefAttributes<LegendListRef>) => ReactElement | null;
|
|
805
1187
|
|
|
806
|
-
declare function useViewability<ItemT = any>(callback: ViewabilityCallback<ItemT>, configId?: string): void;
|
|
807
|
-
declare function useViewabilityAmount<ItemT = any>(callback: ViewabilityAmountCallback<ItemT>): void;
|
|
808
|
-
declare function useRecyclingEffect(effect: (info: LegendListRecyclingState<unknown>) => void | (() => void)): void;
|
|
809
|
-
declare function useRecyclingState<ItemT>(valueOrFun: ((info: LegendListRecyclingState<ItemT>) => ItemT) | ItemT): readonly [ItemT, Dispatch<SetStateAction<ItemT>>];
|
|
1188
|
+
declare function useViewability<ItemT = any>(callback: ViewabilityCallback$1<ItemT>, configId?: string): void;
|
|
1189
|
+
declare function useViewabilityAmount<ItemT = any>(callback: ViewabilityAmountCallback$1<ItemT>): void;
|
|
1190
|
+
declare function useRecyclingEffect(effect: (info: LegendListRecyclingState$1<unknown>) => void | (() => void)): void;
|
|
1191
|
+
declare function useRecyclingState<ItemT>(valueOrFun: ((info: LegendListRecyclingState$1<ItemT>) => ItemT) | ItemT): readonly [ItemT, Dispatch<SetStateAction<ItemT>>];
|
|
810
1192
|
declare function useIsLastItem(): boolean;
|
|
811
1193
|
declare function useListScrollSize(): {
|
|
812
1194
|
width: number;
|
|
@@ -814,4 +1196,7 @@ declare function useListScrollSize(): {
|
|
|
814
1196
|
};
|
|
815
1197
|
declare function useSyncLayout(): () => void;
|
|
816
1198
|
|
|
817
|
-
|
|
1199
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1200
|
+
declare const LegendList: LegendListComponent;
|
|
1201
|
+
|
|
1202
|
+
export { type AccessibilityActionEvent, type AccessibilityRole, type AccessibilityState, type AccessibilityValue, type AlwaysRenderConfig, type BaseScrollViewProps, type ColorValue, type ColumnWrapperStyle, type GestureResponderEvent, type GetRenderedItem, type GetRenderedItemResult, type InitialScrollAnchor, type Insets, type InternalState, type LayoutChangeEvent, type LayoutRectangle, LegendList, type LegendListComponent, type LegendListMetrics, type LegendListProps, type LegendListPropsBase, type LegendListRecyclingState, type LegendListRef, type LegendListRenderItemProps, type LegendListScrollerRef, type LegendListState, type LooseAccessibilityActionEvent, type LooseAccessibilityRole, type LooseAccessibilityState, type LooseAccessibilityValue, type LooseColorValue, type LooseGestureResponderEvent, type LoosePointerEvent, type LooseRefreshControlProps, type LooseRole, type LooseScrollViewProps, type MaintainScrollAtEndOptions, type MaintainVisibleContentPositionConfig, type MaintainVisibleContentPositionNormalized, type NativeScrollEvent, type NativeSyntheticEvent, type OnViewableItemsChanged, type PointProp, type PointerEvent, type RefreshControlProps, type Role, type ScrollEventTargetLike, type ScrollIndexWithOffset, type ScrollIndexWithOffsetAndContentOffset, type ScrollIndexWithOffsetPosition, type ScrollTarget, type ScrollViewPropsLoose, type ScrollableNodeLike, type StickyHeaderConfig, type StyleProp, type ThresholdSnapshot, type TypedForwardRef, type TypedMemo, type ViewAmountToken, type ViewStyle, type ViewToken, type ViewabilityAmountCallback, type ViewabilityCallback, type ViewabilityConfig, type ViewabilityConfigCallbackPair, type ViewabilityConfigCallbackPairs, type ViewableRange, typedForwardRef, typedMemo, useIsLastItem, useListScrollSize, useRecyclingEffect, useRecyclingState, useSyncLayout, useViewability, useViewabilityAmount };
|