@legendapp/list 3.0.0-beta.31 → 3.0.0-beta.33
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/.DS_Store +0 -0
- package/README.md +7 -1
- package/animated.d.ts +600 -6
- package/animated.js +2 -2
- package/animated.mjs +1 -1
- package/index.d.ts +462 -109
- package/index.js +290 -147
- package/index.mjs +290 -147
- package/index.native.js +245 -122
- package/index.native.mjs +246 -123
- package/keyboard-controller.d.ts +611 -6
- package/keyboard-controller.js +2 -2
- package/keyboard-controller.mjs +1 -1
- package/keyboard.d.ts +204 -8
- package/keyboard.js +66 -52
- package/keyboard.mjs +69 -54
- package/{index.d.mts → list-react-native.d.ts} +103 -33
- package/list-react-native.js +4234 -0
- package/list-react-native.mjs +4204 -0
- package/{index.native.d.mts → list-react.d.ts} +363 -41
- package/list-react.js +4426 -0
- package/list-react.mjs +4396 -0
- package/package.json +52 -1
- package/reanimated.d.ts +595 -7
- package/reanimated.js +156 -11
- package/reanimated.mjs +153 -8
- package/section-list.d.ts +610 -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 -810
- 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 {
|
|
3
|
-
import { View, ScrollView, Animated, LayoutRectangle, Insets, ScrollViewProps, ScrollViewComponent, ScrollResponderMixin, StyleProp, ViewStyle, NativeSyntheticEvent, NativeScrollEvent } 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,40 @@ 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
|
+
type BaseScrollViewProps$1<TScrollView> = Omit<TScrollView, "contentOffset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children" | "onScroll">;
|
|
89
125
|
interface DataModeProps<ItemT, TItemType extends string | undefined> {
|
|
90
126
|
/**
|
|
91
127
|
* Array of items to render in the list.
|
|
@@ -99,7 +135,7 @@ interface DataModeProps<ItemT, TItemType extends string | undefined> {
|
|
|
99
135
|
* - A React component: React.ComponentType<LegendListRenderItemProps<ItemT>>
|
|
100
136
|
* @required when using data mode
|
|
101
137
|
*/
|
|
102
|
-
renderItem: ((props: LegendListRenderItemProps<ItemT, TItemType>) => ReactNode) | React.ComponentType<LegendListRenderItemProps<ItemT, TItemType>>;
|
|
138
|
+
renderItem: ((props: LegendListRenderItemProps$1<ItemT, TItemType>) => ReactNode) | React.ComponentType<LegendListRenderItemProps$1<ItemT, TItemType>>;
|
|
103
139
|
children?: never;
|
|
104
140
|
}
|
|
105
141
|
interface ChildrenModeProps {
|
|
@@ -122,11 +158,11 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
122
158
|
* Keeps selected items mounted even when they scroll out of view.
|
|
123
159
|
* @default undefined
|
|
124
160
|
*/
|
|
125
|
-
alwaysRender?: AlwaysRenderConfig;
|
|
161
|
+
alwaysRender?: AlwaysRenderConfig$1;
|
|
126
162
|
/**
|
|
127
163
|
* Style applied to each column's wrapper view.
|
|
128
164
|
*/
|
|
129
|
-
columnWrapperStyle?: ColumnWrapperStyle;
|
|
165
|
+
columnWrapperStyle?: ColumnWrapperStyle$1;
|
|
130
166
|
/**
|
|
131
167
|
* Distance in pixels to pre-render items ahead of the visible area.
|
|
132
168
|
* @default 250
|
|
@@ -213,7 +249,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
213
249
|
/**
|
|
214
250
|
* Style for the footer component.
|
|
215
251
|
*/
|
|
216
|
-
ListFooterComponentStyle?: StyleProp<ViewStyle> | undefined;
|
|
252
|
+
ListFooterComponentStyle?: StyleProp$1<ViewStyle$1> | undefined;
|
|
217
253
|
/**
|
|
218
254
|
* Component or element to render above the list.
|
|
219
255
|
*/
|
|
@@ -221,12 +257,12 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
221
257
|
/**
|
|
222
258
|
* Style for the header component.
|
|
223
259
|
*/
|
|
224
|
-
ListHeaderComponentStyle?: StyleProp<ViewStyle> | undefined;
|
|
260
|
+
ListHeaderComponentStyle?: StyleProp$1<ViewStyle$1> | undefined;
|
|
225
261
|
/**
|
|
226
262
|
* If true, auto-scrolls to end when new items are added.
|
|
227
263
|
* @default false
|
|
228
264
|
*/
|
|
229
|
-
maintainScrollAtEnd?: boolean | MaintainScrollAtEndOptions;
|
|
265
|
+
maintainScrollAtEnd?: boolean | MaintainScrollAtEndOptions$1;
|
|
230
266
|
/**
|
|
231
267
|
* Distance threshold in percentage of screen size to trigger maintainScrollAtEnd.
|
|
232
268
|
* @default 0.1
|
|
@@ -240,7 +276,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
240
276
|
* - undefined (default) enables scroll stabilization but skips data-change anchoring.
|
|
241
277
|
* - true enables both behaviors; false disables both.
|
|
242
278
|
*/
|
|
243
|
-
maintainVisibleContentPosition?: boolean | MaintainVisibleContentPositionConfig<ItemT>;
|
|
279
|
+
maintainVisibleContentPosition?: boolean | MaintainVisibleContentPositionConfig$1<ItemT>;
|
|
244
280
|
/**
|
|
245
281
|
* Number of columns to render items in.
|
|
246
282
|
* @default 1
|
|
@@ -270,12 +306,12 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
270
306
|
/**
|
|
271
307
|
* Called when list layout metrics change.
|
|
272
308
|
*/
|
|
273
|
-
onMetricsChange?: (metrics: LegendListMetrics) => void;
|
|
309
|
+
onMetricsChange?: (metrics: LegendListMetrics$1) => void;
|
|
274
310
|
/**
|
|
275
311
|
* Function to call when the user pulls to refresh.
|
|
276
312
|
*/
|
|
277
313
|
onRefresh?: () => void;
|
|
278
|
-
onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
314
|
+
onScroll?: (event: NativeSyntheticEvent$1<NativeScrollEvent$1>) => void;
|
|
279
315
|
/**
|
|
280
316
|
* Called when scrolling reaches the start within onStartReachedThreshold.
|
|
281
317
|
*/
|
|
@@ -297,7 +333,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
297
333
|
/**
|
|
298
334
|
* Called when the viewability of items changes.
|
|
299
335
|
*/
|
|
300
|
-
onViewableItemsChanged?: OnViewableItemsChanged<ItemT> | undefined;
|
|
336
|
+
onViewableItemsChanged?: OnViewableItemsChanged$1<ItemT> | undefined;
|
|
301
337
|
/**
|
|
302
338
|
* Offset in pixels for the refresh indicator.
|
|
303
339
|
* @default 0
|
|
@@ -311,7 +347,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
311
347
|
/**
|
|
312
348
|
* Ref to the underlying ScrollView component.
|
|
313
349
|
*/
|
|
314
|
-
refScrollView?: React.Ref<
|
|
350
|
+
refScrollView?: React.Ref<any>;
|
|
315
351
|
/**
|
|
316
352
|
* If true, shows a refresh indicator.
|
|
317
353
|
* @default false
|
|
@@ -322,7 +358,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
322
358
|
* Note: When using `stickyHeaderIndices`, you must provide an Animated ScrollView component.
|
|
323
359
|
* @default (props) => <ScrollView {...props} />
|
|
324
360
|
*/
|
|
325
|
-
renderScrollComponent?: (props:
|
|
361
|
+
renderScrollComponent?: (props: any) => React.ReactElement | null;
|
|
326
362
|
/**
|
|
327
363
|
* This will log a suggested estimatedItemSize.
|
|
328
364
|
* @required
|
|
@@ -332,11 +368,11 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
332
368
|
/**
|
|
333
369
|
* Configuration for determining item viewability.
|
|
334
370
|
*/
|
|
335
|
-
viewabilityConfig?: ViewabilityConfig;
|
|
371
|
+
viewabilityConfig?: ViewabilityConfig$1;
|
|
336
372
|
/**
|
|
337
373
|
* Pairs of viewability configs and their callbacks for tracking visibility.
|
|
338
374
|
*/
|
|
339
|
-
viewabilityConfigCallbackPairs?: ViewabilityConfigCallbackPairs<ItemT> | undefined;
|
|
375
|
+
viewabilityConfigCallbackPairs?: ViewabilityConfigCallbackPairs$1<ItemT> | undefined;
|
|
340
376
|
/**
|
|
341
377
|
* If true, delays rendering until initial layout is complete.
|
|
342
378
|
* @default false
|
|
@@ -361,23 +397,24 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
361
397
|
* Configuration for sticky headers.
|
|
362
398
|
* @default undefined
|
|
363
399
|
*/
|
|
364
|
-
stickyHeaderConfig?: StickyHeaderConfig;
|
|
400
|
+
stickyHeaderConfig?: StickyHeaderConfig$1;
|
|
365
401
|
getItemType?: (item: ItemT, index: number) => TItemType;
|
|
366
402
|
getFixedItemSize?: (item: ItemT, index: number, type: TItemType) => number | undefined;
|
|
367
403
|
itemsAreEqual?: (itemPrevious: ItemT, item: ItemT, index: number, data: readonly ItemT[]) => boolean;
|
|
368
404
|
}
|
|
369
|
-
type LegendListPropsBase<ItemT,
|
|
370
|
-
|
|
405
|
+
type LegendListPropsBase$1<ItemT, TScrollViewProps = Record<string, any>, TItemType extends string | undefined = string | undefined> = BaseScrollViewProps$1<TScrollViewProps> & LegendListSpecificProps<ItemT, TItemType> & (DataModeProps<ItemT, TItemType> | ChildrenModeProps);
|
|
406
|
+
type LegendListPropsInternal = LegendListSpecificProps<any, string | undefined> & DataModeProps<any, string | undefined>;
|
|
407
|
+
interface MaintainVisibleContentPositionConfig$1<ItemT = any> {
|
|
371
408
|
data?: boolean;
|
|
372
409
|
size?: boolean;
|
|
373
410
|
shouldRestorePosition?: (item: ItemT, index: number, data: readonly ItemT[]) => boolean;
|
|
374
411
|
}
|
|
375
|
-
interface MaintainVisibleContentPositionNormalized<ItemT = any> {
|
|
412
|
+
interface MaintainVisibleContentPositionNormalized$1<ItemT = any> {
|
|
376
413
|
data: boolean;
|
|
377
414
|
size: boolean;
|
|
378
415
|
shouldRestorePosition?: (item: ItemT, index: number, data: readonly ItemT[]) => boolean;
|
|
379
416
|
}
|
|
380
|
-
interface StickyHeaderConfig {
|
|
417
|
+
interface StickyHeaderConfig$1 {
|
|
381
418
|
/**
|
|
382
419
|
* Specifies how far from the top edge sticky headers should start sticking.
|
|
383
420
|
* Useful for scenarios with a fixed navbar or header, where sticky elements pin below it..
|
|
@@ -390,34 +427,33 @@ interface StickyHeaderConfig {
|
|
|
390
427
|
*/
|
|
391
428
|
backdropComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
|
|
392
429
|
}
|
|
393
|
-
interface AlwaysRenderConfig {
|
|
430
|
+
interface AlwaysRenderConfig$1 {
|
|
394
431
|
top?: number;
|
|
395
432
|
bottom?: number;
|
|
396
433
|
indices?: number[];
|
|
397
434
|
keys?: string[];
|
|
398
435
|
}
|
|
399
|
-
interface MaintainScrollAtEndOptions {
|
|
436
|
+
interface MaintainScrollAtEndOptions$1 {
|
|
400
437
|
onLayout?: boolean;
|
|
401
438
|
onItemLayout?: boolean;
|
|
402
439
|
onDataChange?: boolean;
|
|
403
440
|
}
|
|
404
|
-
interface ColumnWrapperStyle {
|
|
441
|
+
interface ColumnWrapperStyle$1 {
|
|
405
442
|
rowGap?: number;
|
|
406
443
|
gap?: number;
|
|
407
444
|
columnGap?: number;
|
|
408
445
|
}
|
|
409
|
-
interface LegendListMetrics {
|
|
446
|
+
interface LegendListMetrics$1 {
|
|
410
447
|
headerSize: number;
|
|
411
448
|
footerSize: number;
|
|
412
449
|
}
|
|
413
|
-
|
|
414
|
-
interface ThresholdSnapshot {
|
|
450
|
+
interface ThresholdSnapshot$1 {
|
|
415
451
|
scrollPosition: number;
|
|
416
452
|
contentSize?: number;
|
|
417
453
|
dataLength?: number;
|
|
418
454
|
atThreshold: boolean;
|
|
419
455
|
}
|
|
420
|
-
interface ScrollTarget {
|
|
456
|
+
interface ScrollTarget$1 {
|
|
421
457
|
animated?: boolean;
|
|
422
458
|
index?: number;
|
|
423
459
|
isInitialScroll?: boolean;
|
|
@@ -427,7 +463,7 @@ interface ScrollTarget {
|
|
|
427
463
|
viewOffset?: number;
|
|
428
464
|
viewPosition?: number;
|
|
429
465
|
}
|
|
430
|
-
interface InternalState {
|
|
466
|
+
interface InternalState$1 {
|
|
431
467
|
activeStickyIndex: number | undefined;
|
|
432
468
|
adjustingFromInitialMount?: number;
|
|
433
469
|
animFrameCheckFinishedScroll?: any;
|
|
@@ -447,7 +483,7 @@ interface InternalState {
|
|
|
447
483
|
enableScrollForNextCalculateItemsInView: boolean;
|
|
448
484
|
endBuffered: number;
|
|
449
485
|
endNoBuffer: number;
|
|
450
|
-
endReachedSnapshot: ThresholdSnapshot | undefined;
|
|
486
|
+
endReachedSnapshot: ThresholdSnapshot$1 | undefined;
|
|
451
487
|
firstFullyOnScreenIndex: number;
|
|
452
488
|
hasScrolled?: boolean;
|
|
453
489
|
idCache: string[];
|
|
@@ -459,22 +495,28 @@ interface InternalState {
|
|
|
459
495
|
ignoreScrollFromMVCPIgnored?: boolean;
|
|
460
496
|
ignoreScrollFromMVCPTimeout?: any;
|
|
461
497
|
indexByKey: Map<string, number>;
|
|
462
|
-
initialAnchor?: InitialScrollAnchor;
|
|
463
|
-
initialScroll: ScrollIndexWithOffsetAndContentOffset | undefined;
|
|
498
|
+
initialAnchor?: InitialScrollAnchor$1;
|
|
499
|
+
initialScroll: ScrollIndexWithOffsetAndContentOffset$1 | undefined;
|
|
464
500
|
isAtEnd: boolean;
|
|
465
501
|
isAtStart: boolean;
|
|
466
502
|
isEndReached: boolean | null;
|
|
467
503
|
isFirst?: boolean;
|
|
468
504
|
isStartReached: boolean | null;
|
|
469
505
|
lastBatchingAction: number;
|
|
470
|
-
lastLayout: LayoutRectangle | undefined;
|
|
506
|
+
lastLayout: LayoutRectangle$1 | undefined;
|
|
471
507
|
lastScrollAdjustForHistory?: number;
|
|
472
508
|
lastScrollDelta: number;
|
|
473
509
|
loadStartTime: number;
|
|
474
510
|
maintainingScrollAtEnd?: boolean;
|
|
475
511
|
minIndexSizeChanged: number | undefined;
|
|
476
|
-
|
|
477
|
-
|
|
512
|
+
mvcpAnchorLock?: {
|
|
513
|
+
id: string;
|
|
514
|
+
position: number;
|
|
515
|
+
quietPasses: number;
|
|
516
|
+
expiresAt: number;
|
|
517
|
+
};
|
|
518
|
+
contentInsetOverride?: Partial<Insets$1> | null;
|
|
519
|
+
nativeContentInset?: Insets$1;
|
|
478
520
|
nativeMarginTop: number;
|
|
479
521
|
needsOtherAxisSize?: boolean;
|
|
480
522
|
otherAxisSize?: number;
|
|
@@ -482,8 +524,9 @@ interface InternalState {
|
|
|
482
524
|
positions: Map<string, number>;
|
|
483
525
|
previousData?: readonly unknown[];
|
|
484
526
|
queuedCalculateItemsInView: number | undefined;
|
|
527
|
+
queuedMVCPRecalculate?: number;
|
|
485
528
|
queuedInitialLayout?: boolean | undefined;
|
|
486
|
-
refScroller: React.RefObject<
|
|
529
|
+
refScroller: React.RefObject<any>;
|
|
487
530
|
scroll: number;
|
|
488
531
|
scrollAdjustHandler: ScrollAdjustHandler;
|
|
489
532
|
scrollForNextCalculateItemsInView: {
|
|
@@ -494,7 +537,7 @@ interface InternalState {
|
|
|
494
537
|
scroll: number;
|
|
495
538
|
time: number;
|
|
496
539
|
}>;
|
|
497
|
-
scrollingTo?: ScrollTarget | undefined;
|
|
540
|
+
scrollingTo?: ScrollTarget$1 | undefined;
|
|
498
541
|
scrollLastCalculate?: number;
|
|
499
542
|
scrollLength: number;
|
|
500
543
|
scrollPending: number;
|
|
@@ -507,7 +550,7 @@ interface InternalState {
|
|
|
507
550
|
startBuffered: number;
|
|
508
551
|
startBufferedId?: string;
|
|
509
552
|
startNoBuffer: number;
|
|
510
|
-
startReachedSnapshot: ThresholdSnapshot | undefined;
|
|
553
|
+
startReachedSnapshot: ThresholdSnapshot$1 | undefined;
|
|
511
554
|
stickyContainerPool: Set<number>;
|
|
512
555
|
stickyContainers: Map<number, number>;
|
|
513
556
|
timeouts: Set<number>;
|
|
@@ -520,41 +563,43 @@ interface InternalState {
|
|
|
520
563
|
dataChanged?: boolean;
|
|
521
564
|
forceFullItemPositions?: boolean;
|
|
522
565
|
}) => void;
|
|
523
|
-
viewabilityConfigCallbackPairs: ViewabilityConfigCallbackPairs<any> | undefined;
|
|
566
|
+
viewabilityConfigCallbackPairs: ViewabilityConfigCallbackPairs$1<any> | undefined;
|
|
524
567
|
props: {
|
|
525
568
|
alignItemsAtEnd: boolean;
|
|
526
|
-
animatedProps: StylesAsSharedValue<
|
|
527
|
-
alwaysRender: AlwaysRenderConfig | undefined;
|
|
569
|
+
animatedProps: StylesAsSharedValue<Record<string, any>>;
|
|
570
|
+
alwaysRender: AlwaysRenderConfig$1 | undefined;
|
|
528
571
|
alwaysRenderIndicesArr: number[];
|
|
529
572
|
alwaysRenderIndicesSet: Set<number>;
|
|
530
|
-
contentInset: Insets | undefined;
|
|
573
|
+
contentInset: Insets$1 | undefined;
|
|
531
574
|
data: readonly any[];
|
|
532
575
|
dataVersion: Key | undefined;
|
|
576
|
+
drawDistance: number;
|
|
533
577
|
estimatedItemSize: number | undefined;
|
|
534
|
-
getEstimatedItemSize:
|
|
535
|
-
getFixedItemSize:
|
|
536
|
-
getItemType:
|
|
578
|
+
getEstimatedItemSize: LegendListPropsInternal["getEstimatedItemSize"];
|
|
579
|
+
getFixedItemSize: LegendListPropsInternal["getFixedItemSize"];
|
|
580
|
+
getItemType: LegendListPropsInternal["getItemType"];
|
|
537
581
|
horizontal: boolean;
|
|
538
582
|
initialContainerPoolRatio: number;
|
|
539
|
-
itemsAreEqual:
|
|
540
|
-
keyExtractor:
|
|
541
|
-
maintainScrollAtEnd: boolean | MaintainScrollAtEndOptions;
|
|
583
|
+
itemsAreEqual: LegendListPropsInternal["itemsAreEqual"];
|
|
584
|
+
keyExtractor: LegendListPropsInternal["keyExtractor"];
|
|
585
|
+
maintainScrollAtEnd: boolean | MaintainScrollAtEndOptions$1;
|
|
542
586
|
maintainScrollAtEndThreshold: number | undefined;
|
|
543
|
-
maintainVisibleContentPosition: MaintainVisibleContentPositionNormalized;
|
|
587
|
+
maintainVisibleContentPosition: MaintainVisibleContentPositionNormalized$1;
|
|
544
588
|
numColumns: number;
|
|
545
|
-
onEndReached:
|
|
589
|
+
onEndReached: LegendListPropsInternal["onEndReached"];
|
|
546
590
|
onEndReachedThreshold: number | null | undefined;
|
|
547
|
-
onItemSizeChanged:
|
|
548
|
-
onLoad:
|
|
549
|
-
onScroll:
|
|
550
|
-
onStartReached:
|
|
591
|
+
onItemSizeChanged: LegendListPropsInternal["onItemSizeChanged"];
|
|
592
|
+
onLoad: LegendListPropsInternal["onLoad"];
|
|
593
|
+
onScroll: LegendListPropsInternal["onScroll"];
|
|
594
|
+
onStartReached: LegendListPropsInternal["onStartReached"];
|
|
551
595
|
onStartReachedThreshold: number | null | undefined;
|
|
552
|
-
onStickyHeaderChange:
|
|
553
|
-
overrideItemLayout:
|
|
596
|
+
onStickyHeaderChange: LegendListPropsInternal["onStickyHeaderChange"];
|
|
597
|
+
overrideItemLayout: LegendListPropsInternal["overrideItemLayout"];
|
|
554
598
|
recycleItems: boolean;
|
|
555
|
-
renderItem:
|
|
556
|
-
scrollBuffer
|
|
599
|
+
renderItem: LegendListPropsInternal["renderItem"];
|
|
600
|
+
scrollBuffer?: number;
|
|
557
601
|
snapToIndices: number[] | undefined;
|
|
602
|
+
stickyPositionComponentInternal: React.ComponentType<any> | undefined;
|
|
558
603
|
stickyIndicesArr: number[];
|
|
559
604
|
stickyIndicesSet: Set<number>;
|
|
560
605
|
stylePaddingBottom: number | undefined;
|
|
@@ -562,25 +607,25 @@ interface InternalState {
|
|
|
562
607
|
suggestEstimatedItemSize: boolean;
|
|
563
608
|
};
|
|
564
609
|
}
|
|
565
|
-
interface ViewableRange<T> {
|
|
610
|
+
interface ViewableRange$1<T> {
|
|
566
611
|
end: number;
|
|
567
612
|
endBuffered: number;
|
|
568
613
|
items: T[];
|
|
569
614
|
start: number;
|
|
570
615
|
startBuffered: number;
|
|
571
616
|
}
|
|
572
|
-
interface LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
617
|
+
interface LegendListRenderItemProps$1<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
573
618
|
data: readonly ItemT[];
|
|
574
619
|
extraData: any;
|
|
575
620
|
index: number;
|
|
576
621
|
item: ItemT;
|
|
577
622
|
type: TItemType;
|
|
578
623
|
}
|
|
579
|
-
type LegendListState = {
|
|
624
|
+
type LegendListState$1 = {
|
|
580
625
|
activeStickyIndex: number;
|
|
581
626
|
contentLength: number;
|
|
582
627
|
data: readonly any[];
|
|
583
|
-
elementAtIndex: (index: number) =>
|
|
628
|
+
elementAtIndex: (index: number) => any;
|
|
584
629
|
end: number;
|
|
585
630
|
endBuffered: number;
|
|
586
631
|
isAtEnd: boolean;
|
|
@@ -597,7 +642,7 @@ type LegendListState = {
|
|
|
597
642
|
start: number;
|
|
598
643
|
startBuffered: number;
|
|
599
644
|
};
|
|
600
|
-
type LegendListRef = {
|
|
645
|
+
type LegendListRef$1 = {
|
|
601
646
|
/**
|
|
602
647
|
* Displays the scroll indicators momentarily.
|
|
603
648
|
*/
|
|
@@ -605,7 +650,7 @@ type LegendListRef = {
|
|
|
605
650
|
/**
|
|
606
651
|
* Returns the native ScrollView component reference.
|
|
607
652
|
*/
|
|
608
|
-
getNativeScrollRef():
|
|
653
|
+
getNativeScrollRef(): any;
|
|
609
654
|
/**
|
|
610
655
|
* Returns the scroll responder instance for handling scroll events.
|
|
611
656
|
*/
|
|
@@ -613,11 +658,11 @@ type LegendListRef = {
|
|
|
613
658
|
/**
|
|
614
659
|
* Returns the ScrollResponderMixin for advanced scroll handling.
|
|
615
660
|
*/
|
|
616
|
-
getScrollResponder():
|
|
661
|
+
getScrollResponder(): any;
|
|
617
662
|
/**
|
|
618
663
|
* Returns the internal state of the scroll virtualization.
|
|
619
664
|
*/
|
|
620
|
-
getState(): LegendListState;
|
|
665
|
+
getState(): LegendListState$1;
|
|
621
666
|
/**
|
|
622
667
|
* Scrolls a specific index into view.
|
|
623
668
|
* @param params - Parameters for scrolling.
|
|
@@ -697,36 +742,44 @@ type LegendListRef = {
|
|
|
697
742
|
* @param enabled - If true, scroll processing is enabled.
|
|
698
743
|
*/
|
|
699
744
|
setScrollProcessingEnabled(enabled: boolean): void;
|
|
745
|
+
/**
|
|
746
|
+
* Clears internal virtualization caches.
|
|
747
|
+
* @param options - Cache clearing options.
|
|
748
|
+
* @param options.mode - `sizes` clears measurement caches. `full` also clears key/position caches.
|
|
749
|
+
*/
|
|
750
|
+
clearCaches(options?: {
|
|
751
|
+
mode?: "sizes" | "full";
|
|
752
|
+
}): void;
|
|
700
753
|
/**
|
|
701
754
|
* Reports an externally measured content inset. Pass null/undefined to clear.
|
|
702
755
|
* Values are merged on top of props/animated/native insets.
|
|
703
756
|
*/
|
|
704
|
-
reportContentInset(inset?: Partial<Insets> | null): void;
|
|
757
|
+
reportContentInset(inset?: Partial<Insets$1> | null): void;
|
|
705
758
|
};
|
|
706
|
-
interface ViewToken<ItemT = any> {
|
|
759
|
+
interface ViewToken$1<ItemT = any> {
|
|
707
760
|
containerId: number;
|
|
708
761
|
index: number;
|
|
709
762
|
isViewable: boolean;
|
|
710
763
|
item: ItemT;
|
|
711
764
|
key: string;
|
|
712
765
|
}
|
|
713
|
-
interface ViewAmountToken<ItemT = any> extends ViewToken<ItemT> {
|
|
766
|
+
interface ViewAmountToken$1<ItemT = any> extends ViewToken$1<ItemT> {
|
|
714
767
|
percentOfScroller: number;
|
|
715
768
|
percentVisible: number;
|
|
716
769
|
scrollSize: number;
|
|
717
770
|
size: number;
|
|
718
771
|
sizeVisible: number;
|
|
719
772
|
}
|
|
720
|
-
interface ViewabilityConfigCallbackPair<ItemT = any> {
|
|
721
|
-
onViewableItemsChanged?: OnViewableItemsChanged<ItemT>;
|
|
722
|
-
viewabilityConfig: ViewabilityConfig;
|
|
773
|
+
interface ViewabilityConfigCallbackPair$1<ItemT = any> {
|
|
774
|
+
onViewableItemsChanged?: OnViewableItemsChanged$1<ItemT>;
|
|
775
|
+
viewabilityConfig: ViewabilityConfig$1;
|
|
723
776
|
}
|
|
724
|
-
type ViewabilityConfigCallbackPairs<ItemT> = ViewabilityConfigCallbackPair<ItemT>[];
|
|
725
|
-
type OnViewableItemsChanged<ItemT> = ((info: {
|
|
726
|
-
viewableItems: Array<ViewToken<ItemT>>;
|
|
727
|
-
changed: Array<ViewToken<ItemT>>;
|
|
777
|
+
type ViewabilityConfigCallbackPairs$1<ItemT> = ViewabilityConfigCallbackPair$1<ItemT>[];
|
|
778
|
+
type OnViewableItemsChanged$1<ItemT> = ((info: {
|
|
779
|
+
viewableItems: Array<ViewToken$1<ItemT>>;
|
|
780
|
+
changed: Array<ViewToken$1<ItemT>>;
|
|
728
781
|
}) => void) | null;
|
|
729
|
-
interface ViewabilityConfig {
|
|
782
|
+
interface ViewabilityConfig$1 {
|
|
730
783
|
/**
|
|
731
784
|
* A unique ID to identify this viewability config
|
|
732
785
|
*/
|
|
@@ -755,51 +808,348 @@ interface ViewabilityConfig {
|
|
|
755
808
|
*/
|
|
756
809
|
waitForInteraction?: boolean | undefined;
|
|
757
810
|
}
|
|
758
|
-
type ViewabilityCallback<ItemT = any> = (viewToken: ViewToken<ItemT>) => void;
|
|
759
|
-
type ViewabilityAmountCallback<ItemT = any> = (viewToken: ViewAmountToken<ItemT>) => void;
|
|
760
|
-
interface LegendListRecyclingState<T> {
|
|
811
|
+
type ViewabilityCallback$1<ItemT = any> = (viewToken: ViewToken$1<ItemT>) => void;
|
|
812
|
+
type ViewabilityAmountCallback$1<ItemT = any> = (viewToken: ViewAmountToken$1<ItemT>) => void;
|
|
813
|
+
interface LegendListRecyclingState$1<T> {
|
|
761
814
|
index: number;
|
|
762
815
|
item: T;
|
|
763
816
|
prevIndex: number | undefined;
|
|
764
817
|
prevItem: T | undefined;
|
|
765
818
|
}
|
|
766
|
-
type TypedForwardRef = <T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactNode) => (props: P & React.RefAttributes<T>) => React.ReactNode;
|
|
767
|
-
declare const typedForwardRef: TypedForwardRef;
|
|
768
|
-
type TypedMemo = <T extends React.ComponentType<any>>(Component: T, propsAreEqual?: (prevProps: Readonly<React.JSXElementConstructor<T>>, nextProps: Readonly<React.JSXElementConstructor<T>>) => boolean) => T & {
|
|
819
|
+
type TypedForwardRef$1 = <T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactNode) => (props: P & React.RefAttributes<T>) => React.ReactNode;
|
|
820
|
+
declare const typedForwardRef: TypedForwardRef$1;
|
|
821
|
+
type TypedMemo$1 = <T extends React.ComponentType<any>>(Component: T, propsAreEqual?: (prevProps: Readonly<React.JSXElementConstructor<T>>, nextProps: Readonly<React.JSXElementConstructor<T>>) => boolean) => T & {
|
|
769
822
|
displayName?: string;
|
|
770
823
|
};
|
|
771
|
-
declare const typedMemo: TypedMemo;
|
|
772
|
-
interface ScrollIndexWithOffset {
|
|
824
|
+
declare const typedMemo: TypedMemo$1;
|
|
825
|
+
interface ScrollIndexWithOffset$1 {
|
|
773
826
|
index: number;
|
|
774
827
|
viewOffset?: number;
|
|
775
828
|
viewPosition?: number;
|
|
776
829
|
}
|
|
777
|
-
interface ScrollIndexWithOffsetPosition extends ScrollIndexWithOffset {
|
|
830
|
+
interface ScrollIndexWithOffsetPosition$1 extends ScrollIndexWithOffset$1 {
|
|
778
831
|
viewPosition?: number;
|
|
779
832
|
}
|
|
780
|
-
interface ScrollIndexWithOffsetAndContentOffset extends ScrollIndexWithOffsetPosition {
|
|
833
|
+
interface ScrollIndexWithOffsetAndContentOffset$1 extends ScrollIndexWithOffsetPosition$1 {
|
|
781
834
|
contentOffset?: number;
|
|
782
835
|
}
|
|
783
|
-
interface InitialScrollAnchor extends ScrollIndexWithOffsetPosition {
|
|
836
|
+
interface InitialScrollAnchor$1 extends ScrollIndexWithOffsetPosition$1 {
|
|
784
837
|
attempts?: number;
|
|
785
838
|
lastDelta?: number;
|
|
786
839
|
settledTicks?: number;
|
|
787
840
|
}
|
|
788
|
-
type GetRenderedItemResult<ItemT> = {
|
|
841
|
+
type GetRenderedItemResult$1<ItemT> = {
|
|
789
842
|
index: number;
|
|
790
843
|
item: ItemT;
|
|
791
844
|
renderedItem: React.ReactNode;
|
|
792
845
|
};
|
|
793
|
-
type GetRenderedItem = (key: string) => GetRenderedItemResult<any> | null;
|
|
846
|
+
type GetRenderedItem$1 = (key: string) => GetRenderedItemResult$1<any> | null;
|
|
794
847
|
|
|
795
|
-
|
|
796
|
-
|
|
848
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
849
|
+
type Insets = Insets$1;
|
|
850
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
851
|
+
type LayoutRectangle = LayoutRectangle$1;
|
|
852
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
853
|
+
type NativeScrollEvent = NativeScrollEvent$1;
|
|
854
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
855
|
+
type NativeSyntheticEvent<T> = NativeSyntheticEvent$1<T>;
|
|
856
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
857
|
+
type ViewStyle = ViewStyle$1;
|
|
858
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
859
|
+
type StyleProp<T> = StyleProp$1<T>;
|
|
860
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
861
|
+
type BaseScrollViewProps<TScrollView> = BaseScrollViewProps$1<TScrollView>;
|
|
862
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
863
|
+
type LegendListPropsBase<ItemT, TScrollViewProps = Record<string, any>, TItemType extends string | undefined = string | undefined> = LegendListPropsBase$1<ItemT, TScrollViewProps, TItemType>;
|
|
864
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
865
|
+
type MaintainVisibleContentPositionConfig<ItemT = any> = MaintainVisibleContentPositionConfig$1<ItemT>;
|
|
866
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
867
|
+
type MaintainVisibleContentPositionNormalized<ItemT = any> = MaintainVisibleContentPositionNormalized$1<ItemT>;
|
|
868
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
869
|
+
type StickyHeaderConfig = StickyHeaderConfig$1;
|
|
870
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
871
|
+
type AlwaysRenderConfig = AlwaysRenderConfig$1;
|
|
872
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
873
|
+
type MaintainScrollAtEndOptions = MaintainScrollAtEndOptions$1;
|
|
874
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
875
|
+
type ColumnWrapperStyle = ColumnWrapperStyle$1;
|
|
876
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
877
|
+
type LegendListMetrics = LegendListMetrics$1;
|
|
878
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
879
|
+
type ThresholdSnapshot = ThresholdSnapshot$1;
|
|
880
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
881
|
+
type ScrollTarget = ScrollTarget$1;
|
|
882
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
883
|
+
type InternalState = InternalState$1;
|
|
884
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
885
|
+
type ViewableRange<T> = ViewableRange$1<T>;
|
|
886
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
887
|
+
type LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> = LegendListRenderItemProps$1<ItemT, TItemType>;
|
|
888
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
889
|
+
type LegendListState = LegendListState$1;
|
|
890
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
891
|
+
type LegendListRef = LegendListRef$1;
|
|
892
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
893
|
+
type ViewToken<ItemT = any> = ViewToken$1<ItemT>;
|
|
894
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
895
|
+
type ViewAmountToken<ItemT = any> = ViewAmountToken$1<ItemT>;
|
|
896
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
897
|
+
type ViewabilityConfigCallbackPair<ItemT = any> = ViewabilityConfigCallbackPair$1<ItemT>;
|
|
898
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
899
|
+
type ViewabilityConfigCallbackPairs<ItemT> = ViewabilityConfigCallbackPairs$1<ItemT>;
|
|
900
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
901
|
+
type OnViewableItemsChanged<ItemT> = OnViewableItemsChanged$1<ItemT>;
|
|
902
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
903
|
+
type ViewabilityConfig = ViewabilityConfig$1;
|
|
904
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
905
|
+
type ViewabilityCallback<ItemT = any> = ViewabilityCallback$1<ItemT>;
|
|
906
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
907
|
+
type ViewabilityAmountCallback<ItemT = any> = ViewabilityAmountCallback$1<ItemT>;
|
|
908
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
909
|
+
type LegendListRecyclingState<T> = LegendListRecyclingState$1<T>;
|
|
910
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
911
|
+
type TypedForwardRef = TypedForwardRef$1;
|
|
912
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
913
|
+
type TypedMemo = TypedMemo$1;
|
|
914
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
915
|
+
type ScrollIndexWithOffset = ScrollIndexWithOffset$1;
|
|
916
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
917
|
+
type ScrollIndexWithOffsetPosition = ScrollIndexWithOffsetPosition$1;
|
|
918
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
919
|
+
type ScrollIndexWithOffsetAndContentOffset = ScrollIndexWithOffsetAndContentOffset$1;
|
|
920
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
921
|
+
type InitialScrollAnchor = InitialScrollAnchor$1;
|
|
922
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
923
|
+
type GetRenderedItemResult<ItemT> = GetRenderedItemResult$1<ItemT>;
|
|
924
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
925
|
+
type GetRenderedItem = GetRenderedItem$1;
|
|
926
|
+
interface LooseAccessibilityActionEvent {
|
|
927
|
+
nativeEvent?: {
|
|
928
|
+
actionName?: string;
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
type AccessibilityActionEvent = LooseAccessibilityActionEvent;
|
|
932
|
+
type LooseAccessibilityRole = string;
|
|
933
|
+
type AccessibilityRole = LooseAccessibilityRole;
|
|
934
|
+
interface LooseAccessibilityState {
|
|
935
|
+
busy?: boolean;
|
|
936
|
+
checked?: boolean | "mixed";
|
|
937
|
+
disabled?: boolean;
|
|
938
|
+
expanded?: boolean;
|
|
939
|
+
selected?: boolean;
|
|
940
|
+
}
|
|
941
|
+
type AccessibilityState = LooseAccessibilityState;
|
|
942
|
+
interface LooseAccessibilityValue {
|
|
943
|
+
max?: number;
|
|
944
|
+
min?: number;
|
|
945
|
+
now?: number;
|
|
946
|
+
text?: string;
|
|
947
|
+
}
|
|
948
|
+
type AccessibilityValue = LooseAccessibilityValue;
|
|
949
|
+
type LooseColorValue = string | number;
|
|
950
|
+
type ColorValue = LooseColorValue;
|
|
951
|
+
interface LooseGestureResponderEvent {
|
|
952
|
+
nativeEvent?: unknown;
|
|
953
|
+
}
|
|
954
|
+
type GestureResponderEvent = LooseGestureResponderEvent;
|
|
955
|
+
interface LoosePointerEvent {
|
|
956
|
+
nativeEvent?: unknown;
|
|
957
|
+
}
|
|
958
|
+
type PointerEvent = LoosePointerEvent;
|
|
959
|
+
interface LooseRefreshControlProps {
|
|
960
|
+
onRefresh?: () => void;
|
|
961
|
+
progressViewOffset?: number;
|
|
962
|
+
refreshing?: boolean;
|
|
963
|
+
}
|
|
964
|
+
type RefreshControlProps = LooseRefreshControlProps;
|
|
965
|
+
type LooseRole = string;
|
|
966
|
+
type Role = LooseRole;
|
|
967
|
+
interface PointProp {
|
|
968
|
+
x: number;
|
|
969
|
+
y: number;
|
|
970
|
+
}
|
|
971
|
+
interface LayoutChangeEvent {
|
|
972
|
+
nativeEvent: {
|
|
973
|
+
layout: LayoutRectangle;
|
|
974
|
+
};
|
|
975
|
+
}
|
|
976
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
977
|
+
interface LooseScrollViewProps {
|
|
978
|
+
StickyHeaderComponent?: ComponentType<unknown>;
|
|
979
|
+
accessibilityActions?: Array<{
|
|
980
|
+
label?: string;
|
|
981
|
+
name: string;
|
|
982
|
+
}>;
|
|
983
|
+
accessibilityElementsHidden?: boolean;
|
|
984
|
+
accessibilityHint?: string;
|
|
985
|
+
accessibilityIgnoresInvertColors?: boolean;
|
|
986
|
+
accessibilityLabel?: string;
|
|
987
|
+
accessibilityLabelledBy?: string | string[];
|
|
988
|
+
accessibilityLanguage?: string;
|
|
989
|
+
accessibilityLargeContentTitle?: string;
|
|
990
|
+
accessibilityLiveRegion?: "none" | "polite" | "assertive";
|
|
991
|
+
accessibilityRespondsToUserInteraction?: boolean;
|
|
992
|
+
accessibilityRole?: AccessibilityRole;
|
|
993
|
+
accessibilityShowsLargeContentViewer?: boolean;
|
|
994
|
+
accessibilityState?: AccessibilityState;
|
|
995
|
+
accessibilityValue?: AccessibilityValue;
|
|
996
|
+
accessibilityViewIsModal?: boolean;
|
|
997
|
+
accessible?: boolean;
|
|
998
|
+
alwaysBounceHorizontal?: boolean;
|
|
999
|
+
alwaysBounceVertical?: boolean;
|
|
1000
|
+
"aria-busy"?: boolean;
|
|
1001
|
+
"aria-checked"?: boolean | "mixed";
|
|
1002
|
+
"aria-disabled"?: boolean;
|
|
1003
|
+
"aria-expanded"?: boolean;
|
|
1004
|
+
"aria-hidden"?: boolean;
|
|
1005
|
+
"aria-label"?: string;
|
|
1006
|
+
"aria-labelledby"?: string;
|
|
1007
|
+
"aria-live"?: "polite" | "assertive" | "off";
|
|
1008
|
+
"aria-modal"?: boolean;
|
|
1009
|
+
"aria-selected"?: boolean;
|
|
1010
|
+
"aria-valuemax"?: number;
|
|
1011
|
+
"aria-valuemin"?: number;
|
|
1012
|
+
"aria-valuenow"?: number;
|
|
1013
|
+
"aria-valuetext"?: string;
|
|
1014
|
+
automaticallyAdjustContentInsets?: boolean;
|
|
1015
|
+
automaticallyAdjustKeyboardInsets?: boolean;
|
|
1016
|
+
automaticallyAdjustsScrollIndicatorInsets?: boolean;
|
|
1017
|
+
bounces?: boolean;
|
|
1018
|
+
bouncesZoom?: boolean;
|
|
1019
|
+
canCancelContentTouches?: boolean;
|
|
1020
|
+
centerContent?: boolean;
|
|
1021
|
+
children?: ReactNode;
|
|
1022
|
+
collapsable?: boolean;
|
|
1023
|
+
collapsableChildren?: boolean;
|
|
1024
|
+
contentContainerStyle?: StyleProp<ViewStyle> | CSSProperties;
|
|
1025
|
+
contentInset?: Insets;
|
|
1026
|
+
contentInsetAdjustmentBehavior?: "always" | "never" | "automatic" | "scrollableAxes";
|
|
1027
|
+
contentOffset?: PointProp;
|
|
1028
|
+
decelerationRate?: number | "fast" | "normal";
|
|
1029
|
+
directionalLockEnabled?: boolean;
|
|
1030
|
+
disableIntervalMomentum?: boolean;
|
|
1031
|
+
disableScrollViewPanResponder?: boolean;
|
|
1032
|
+
endFillColor?: ColorValue;
|
|
1033
|
+
fadingEdgeLength?: number | {
|
|
1034
|
+
end?: number;
|
|
1035
|
+
start?: number;
|
|
1036
|
+
};
|
|
1037
|
+
focusable?: boolean;
|
|
1038
|
+
hasTVPreferredFocus?: boolean;
|
|
1039
|
+
hitSlop?: number | Insets;
|
|
1040
|
+
horizontal?: boolean;
|
|
1041
|
+
id?: string;
|
|
1042
|
+
importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants";
|
|
1043
|
+
indicatorStyle?: "default" | "black" | "white";
|
|
1044
|
+
innerViewRef?: Ref<unknown>;
|
|
1045
|
+
invertStickyHeaders?: boolean;
|
|
1046
|
+
isTVSelectable?: boolean;
|
|
1047
|
+
keyboardDismissMode?: "none" | "interactive" | "on-drag";
|
|
1048
|
+
keyboardShouldPersistTaps?: boolean | "always" | "never" | "handled";
|
|
1049
|
+
maintainVisibleContentPosition?: {
|
|
1050
|
+
autoscrollToTopThreshold?: number;
|
|
1051
|
+
minIndexForVisible: number;
|
|
1052
|
+
};
|
|
1053
|
+
maximumZoomScale?: number;
|
|
1054
|
+
minimumZoomScale?: number;
|
|
1055
|
+
nativeID?: string;
|
|
1056
|
+
needsOffscreenAlphaCompositing?: boolean;
|
|
1057
|
+
nestedScrollEnabled?: boolean;
|
|
1058
|
+
onAccessibilityAction?: (event: AccessibilityActionEvent) => void;
|
|
1059
|
+
onAccessibilityEscape?: () => void;
|
|
1060
|
+
onAccessibilityTap?: () => void;
|
|
1061
|
+
onBlur?: (event: unknown) => void;
|
|
1062
|
+
onContentSizeChange?: (width: number, height: number) => void;
|
|
1063
|
+
onFocus?: (event: unknown) => void;
|
|
1064
|
+
onLayout?: (event: LayoutChangeEvent) => void;
|
|
1065
|
+
onMagicTap?: () => void;
|
|
1066
|
+
onMomentumScrollBegin?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1067
|
+
onMomentumScrollEnd?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1068
|
+
onMoveShouldSetResponder?: (event: GestureResponderEvent) => boolean;
|
|
1069
|
+
onMoveShouldSetResponderCapture?: (event: GestureResponderEvent) => boolean;
|
|
1070
|
+
onPointerCancel?: (event: PointerEvent) => void;
|
|
1071
|
+
onPointerCancelCapture?: (event: PointerEvent) => void;
|
|
1072
|
+
onPointerDown?: (event: PointerEvent) => void;
|
|
1073
|
+
onPointerDownCapture?: (event: PointerEvent) => void;
|
|
1074
|
+
onPointerEnter?: (event: PointerEvent) => void;
|
|
1075
|
+
onPointerEnterCapture?: (event: PointerEvent) => void;
|
|
1076
|
+
onPointerLeave?: (event: PointerEvent) => void;
|
|
1077
|
+
onPointerLeaveCapture?: (event: PointerEvent) => void;
|
|
1078
|
+
onPointerMove?: (event: PointerEvent) => void;
|
|
1079
|
+
onPointerMoveCapture?: (event: PointerEvent) => void;
|
|
1080
|
+
onPointerUp?: (event: PointerEvent) => void;
|
|
1081
|
+
onPointerUpCapture?: (event: PointerEvent) => void;
|
|
1082
|
+
onResponderEnd?: (event: GestureResponderEvent) => void;
|
|
1083
|
+
onResponderGrant?: (event: GestureResponderEvent) => void;
|
|
1084
|
+
onResponderMove?: (event: GestureResponderEvent) => void;
|
|
1085
|
+
onResponderReject?: (event: GestureResponderEvent) => void;
|
|
1086
|
+
onResponderRelease?: (event: GestureResponderEvent) => void;
|
|
1087
|
+
onResponderStart?: (event: GestureResponderEvent) => void;
|
|
1088
|
+
onResponderTerminate?: (event: GestureResponderEvent) => void;
|
|
1089
|
+
onResponderTerminationRequest?: (event: GestureResponderEvent) => boolean;
|
|
1090
|
+
onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1091
|
+
onScrollAnimationEnd?: () => void;
|
|
1092
|
+
onScrollBeginDrag?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1093
|
+
onScrollEndDrag?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1094
|
+
onScrollToTop?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1095
|
+
onStartShouldSetResponder?: (event: GestureResponderEvent) => boolean;
|
|
1096
|
+
onStartShouldSetResponderCapture?: (event: GestureResponderEvent) => boolean;
|
|
1097
|
+
onTouchCancel?: (event: GestureResponderEvent) => void;
|
|
1098
|
+
onTouchEnd?: (event: GestureResponderEvent) => void;
|
|
1099
|
+
onTouchEndCapture?: (event: GestureResponderEvent) => void;
|
|
1100
|
+
onTouchMove?: (event: GestureResponderEvent) => void;
|
|
1101
|
+
onTouchStart?: (event: GestureResponderEvent) => void;
|
|
1102
|
+
overScrollMode?: "always" | "never" | "auto";
|
|
1103
|
+
pagingEnabled?: boolean;
|
|
1104
|
+
persistentScrollbar?: boolean;
|
|
1105
|
+
pinchGestureEnabled?: boolean;
|
|
1106
|
+
pointerEvents?: "none" | "box-none" | "box-only" | "auto";
|
|
1107
|
+
refreshControl?: ReactElement<RefreshControlProps, string | JSXElementConstructor<unknown>>;
|
|
1108
|
+
removeClippedSubviews?: boolean;
|
|
1109
|
+
renderToHardwareTextureAndroid?: boolean;
|
|
1110
|
+
role?: Role;
|
|
1111
|
+
screenReaderFocusable?: boolean;
|
|
1112
|
+
scrollEnabled?: boolean;
|
|
1113
|
+
scrollEventThrottle?: number;
|
|
1114
|
+
scrollIndicatorInsets?: Insets;
|
|
1115
|
+
scrollPerfTag?: string;
|
|
1116
|
+
scrollToOverflowEnabled?: boolean;
|
|
1117
|
+
scrollViewRef?: Ref<unknown>;
|
|
1118
|
+
scrollsToTop?: boolean;
|
|
1119
|
+
shouldRasterizeIOS?: boolean;
|
|
1120
|
+
showsHorizontalScrollIndicator?: boolean;
|
|
1121
|
+
showsVerticalScrollIndicator?: boolean;
|
|
1122
|
+
snapToAlignment?: "start" | "center" | "end";
|
|
1123
|
+
snapToEnd?: boolean;
|
|
1124
|
+
snapToInterval?: number;
|
|
1125
|
+
snapToOffsets?: number[];
|
|
1126
|
+
snapToStart?: boolean;
|
|
1127
|
+
stickyHeaderHiddenOnScroll?: boolean;
|
|
1128
|
+
stickyHeaderIndices?: number[];
|
|
1129
|
+
style?: StyleProp<ViewStyle> | CSSProperties;
|
|
1130
|
+
tabIndex?: 0 | -1;
|
|
1131
|
+
testID?: string;
|
|
1132
|
+
tvParallaxMagnification?: number;
|
|
1133
|
+
tvParallaxShiftDistanceX?: number;
|
|
1134
|
+
tvParallaxShiftDistanceY?: number;
|
|
1135
|
+
tvParallaxTiltAngle?: number;
|
|
1136
|
+
zoomScale?: number;
|
|
1137
|
+
}
|
|
1138
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1139
|
+
type ScrollViewPropsLoose = LooseScrollViewProps;
|
|
1140
|
+
type LegendListPropsLoose<ItemT = any> = Omit<LegendListPropsBase<ItemT, LooseScrollViewProps>, "ListHeaderComponentStyle" | "ListFooterComponentStyle"> & {
|
|
1141
|
+
ListHeaderComponentStyle?: StyleProp<ViewStyle> | CSSProperties | undefined;
|
|
1142
|
+
ListFooterComponentStyle?: StyleProp<ViewStyle> | CSSProperties | undefined;
|
|
797
1143
|
};
|
|
1144
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1145
|
+
type LegendListProps<ItemT = any> = LegendListPropsLoose<ItemT>;
|
|
1146
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1147
|
+
type LegendListComponent = <ItemT = any>(props: LegendListProps<ItemT> & RefAttributes<LegendListRef>) => ReactElement | null;
|
|
798
1148
|
|
|
799
|
-
declare function useViewability<ItemT = any>(callback: ViewabilityCallback<ItemT>, configId?: string): void;
|
|
800
|
-
declare function useViewabilityAmount<ItemT = any>(callback: ViewabilityAmountCallback<ItemT>): void;
|
|
801
|
-
declare function useRecyclingEffect(effect: (info: LegendListRecyclingState<unknown>) => void | (() => void)): void;
|
|
802
|
-
declare function useRecyclingState<ItemT>(valueOrFun: ((info: LegendListRecyclingState<ItemT>) => ItemT) | ItemT): readonly [ItemT, Dispatch<SetStateAction<ItemT>>];
|
|
1149
|
+
declare function useViewability<ItemT = any>(callback: ViewabilityCallback$1<ItemT>, configId?: string): void;
|
|
1150
|
+
declare function useViewabilityAmount<ItemT = any>(callback: ViewabilityAmountCallback$1<ItemT>): void;
|
|
1151
|
+
declare function useRecyclingEffect(effect: (info: LegendListRecyclingState$1<unknown>) => void | (() => void)): void;
|
|
1152
|
+
declare function useRecyclingState<ItemT>(valueOrFun: ((info: LegendListRecyclingState$1<ItemT>) => ItemT) | ItemT): readonly [ItemT, Dispatch<SetStateAction<ItemT>>];
|
|
803
1153
|
declare function useIsLastItem(): boolean;
|
|
804
1154
|
declare function useListScrollSize(): {
|
|
805
1155
|
width: number;
|
|
@@ -807,4 +1157,7 @@ declare function useListScrollSize(): {
|
|
|
807
1157
|
};
|
|
808
1158
|
declare function useSyncLayout(): () => void;
|
|
809
1159
|
|
|
810
|
-
|
|
1160
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1161
|
+
declare const LegendList: LegendListComponent;
|
|
1162
|
+
|
|
1163
|
+
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 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 ScrollIndexWithOffset, type ScrollIndexWithOffsetAndContentOffset, type ScrollIndexWithOffsetPosition, type ScrollTarget, type ScrollViewPropsLoose, 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 };
|