@legendapp/list 3.0.0-beta.32 → 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/README.md +7 -1
- package/animated.d.ts +600 -6
- package/animated.js +2 -2
- package/animated.mjs +1 -1
- package/index.d.ts +454 -108
- package/index.js +81 -32
- package/index.mjs +81 -32
- package/index.native.js +89 -44
- package/index.native.mjs +88 -43
- 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} +95 -32
- package/list-react-native.js +4234 -0
- package/list-react-native.mjs +4204 -0
- package/{index.native.d.mts → list-react.d.ts} +355 -40
- 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 -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,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,15 +495,15 @@ 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;
|
|
@@ -479,8 +515,8 @@ interface InternalState {
|
|
|
479
515
|
quietPasses: number;
|
|
480
516
|
expiresAt: number;
|
|
481
517
|
};
|
|
482
|
-
contentInsetOverride?: Partial<Insets> | null;
|
|
483
|
-
nativeContentInset?: Insets;
|
|
518
|
+
contentInsetOverride?: Partial<Insets$1> | null;
|
|
519
|
+
nativeContentInset?: Insets$1;
|
|
484
520
|
nativeMarginTop: number;
|
|
485
521
|
needsOtherAxisSize?: boolean;
|
|
486
522
|
otherAxisSize?: number;
|
|
@@ -490,7 +526,7 @@ interface InternalState {
|
|
|
490
526
|
queuedCalculateItemsInView: number | undefined;
|
|
491
527
|
queuedMVCPRecalculate?: number;
|
|
492
528
|
queuedInitialLayout?: boolean | undefined;
|
|
493
|
-
refScroller: React.RefObject<
|
|
529
|
+
refScroller: React.RefObject<any>;
|
|
494
530
|
scroll: number;
|
|
495
531
|
scrollAdjustHandler: ScrollAdjustHandler;
|
|
496
532
|
scrollForNextCalculateItemsInView: {
|
|
@@ -501,7 +537,7 @@ interface InternalState {
|
|
|
501
537
|
scroll: number;
|
|
502
538
|
time: number;
|
|
503
539
|
}>;
|
|
504
|
-
scrollingTo?: ScrollTarget | undefined;
|
|
540
|
+
scrollingTo?: ScrollTarget$1 | undefined;
|
|
505
541
|
scrollLastCalculate?: number;
|
|
506
542
|
scrollLength: number;
|
|
507
543
|
scrollPending: number;
|
|
@@ -514,7 +550,7 @@ interface InternalState {
|
|
|
514
550
|
startBuffered: number;
|
|
515
551
|
startBufferedId?: string;
|
|
516
552
|
startNoBuffer: number;
|
|
517
|
-
startReachedSnapshot: ThresholdSnapshot | undefined;
|
|
553
|
+
startReachedSnapshot: ThresholdSnapshot$1 | undefined;
|
|
518
554
|
stickyContainerPool: Set<number>;
|
|
519
555
|
stickyContainers: Map<number, number>;
|
|
520
556
|
timeouts: Set<number>;
|
|
@@ -527,41 +563,43 @@ interface InternalState {
|
|
|
527
563
|
dataChanged?: boolean;
|
|
528
564
|
forceFullItemPositions?: boolean;
|
|
529
565
|
}) => void;
|
|
530
|
-
viewabilityConfigCallbackPairs: ViewabilityConfigCallbackPairs<any> | undefined;
|
|
566
|
+
viewabilityConfigCallbackPairs: ViewabilityConfigCallbackPairs$1<any> | undefined;
|
|
531
567
|
props: {
|
|
532
568
|
alignItemsAtEnd: boolean;
|
|
533
|
-
animatedProps: StylesAsSharedValue<
|
|
534
|
-
alwaysRender: AlwaysRenderConfig | undefined;
|
|
569
|
+
animatedProps: StylesAsSharedValue<Record<string, any>>;
|
|
570
|
+
alwaysRender: AlwaysRenderConfig$1 | undefined;
|
|
535
571
|
alwaysRenderIndicesArr: number[];
|
|
536
572
|
alwaysRenderIndicesSet: Set<number>;
|
|
537
|
-
contentInset: Insets | undefined;
|
|
573
|
+
contentInset: Insets$1 | undefined;
|
|
538
574
|
data: readonly any[];
|
|
539
575
|
dataVersion: Key | undefined;
|
|
540
576
|
drawDistance: number;
|
|
541
577
|
estimatedItemSize: number | undefined;
|
|
542
|
-
getEstimatedItemSize:
|
|
543
|
-
getFixedItemSize:
|
|
544
|
-
getItemType:
|
|
578
|
+
getEstimatedItemSize: LegendListPropsInternal["getEstimatedItemSize"];
|
|
579
|
+
getFixedItemSize: LegendListPropsInternal["getFixedItemSize"];
|
|
580
|
+
getItemType: LegendListPropsInternal["getItemType"];
|
|
545
581
|
horizontal: boolean;
|
|
546
582
|
initialContainerPoolRatio: number;
|
|
547
|
-
itemsAreEqual:
|
|
548
|
-
keyExtractor:
|
|
549
|
-
maintainScrollAtEnd: boolean | MaintainScrollAtEndOptions;
|
|
583
|
+
itemsAreEqual: LegendListPropsInternal["itemsAreEqual"];
|
|
584
|
+
keyExtractor: LegendListPropsInternal["keyExtractor"];
|
|
585
|
+
maintainScrollAtEnd: boolean | MaintainScrollAtEndOptions$1;
|
|
550
586
|
maintainScrollAtEndThreshold: number | undefined;
|
|
551
|
-
maintainVisibleContentPosition: MaintainVisibleContentPositionNormalized;
|
|
587
|
+
maintainVisibleContentPosition: MaintainVisibleContentPositionNormalized$1;
|
|
552
588
|
numColumns: number;
|
|
553
|
-
onEndReached:
|
|
589
|
+
onEndReached: LegendListPropsInternal["onEndReached"];
|
|
554
590
|
onEndReachedThreshold: number | null | undefined;
|
|
555
|
-
onItemSizeChanged:
|
|
556
|
-
onLoad:
|
|
557
|
-
onScroll:
|
|
558
|
-
onStartReached:
|
|
591
|
+
onItemSizeChanged: LegendListPropsInternal["onItemSizeChanged"];
|
|
592
|
+
onLoad: LegendListPropsInternal["onLoad"];
|
|
593
|
+
onScroll: LegendListPropsInternal["onScroll"];
|
|
594
|
+
onStartReached: LegendListPropsInternal["onStartReached"];
|
|
559
595
|
onStartReachedThreshold: number | null | undefined;
|
|
560
|
-
onStickyHeaderChange:
|
|
561
|
-
overrideItemLayout:
|
|
596
|
+
onStickyHeaderChange: LegendListPropsInternal["onStickyHeaderChange"];
|
|
597
|
+
overrideItemLayout: LegendListPropsInternal["overrideItemLayout"];
|
|
562
598
|
recycleItems: boolean;
|
|
563
|
-
renderItem:
|
|
599
|
+
renderItem: LegendListPropsInternal["renderItem"];
|
|
600
|
+
scrollBuffer?: number;
|
|
564
601
|
snapToIndices: number[] | undefined;
|
|
602
|
+
stickyPositionComponentInternal: React.ComponentType<any> | undefined;
|
|
565
603
|
stickyIndicesArr: number[];
|
|
566
604
|
stickyIndicesSet: Set<number>;
|
|
567
605
|
stylePaddingBottom: number | undefined;
|
|
@@ -569,25 +607,25 @@ interface InternalState {
|
|
|
569
607
|
suggestEstimatedItemSize: boolean;
|
|
570
608
|
};
|
|
571
609
|
}
|
|
572
|
-
interface ViewableRange<T> {
|
|
610
|
+
interface ViewableRange$1<T> {
|
|
573
611
|
end: number;
|
|
574
612
|
endBuffered: number;
|
|
575
613
|
items: T[];
|
|
576
614
|
start: number;
|
|
577
615
|
startBuffered: number;
|
|
578
616
|
}
|
|
579
|
-
interface LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
617
|
+
interface LegendListRenderItemProps$1<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
580
618
|
data: readonly ItemT[];
|
|
581
619
|
extraData: any;
|
|
582
620
|
index: number;
|
|
583
621
|
item: ItemT;
|
|
584
622
|
type: TItemType;
|
|
585
623
|
}
|
|
586
|
-
type LegendListState = {
|
|
624
|
+
type LegendListState$1 = {
|
|
587
625
|
activeStickyIndex: number;
|
|
588
626
|
contentLength: number;
|
|
589
627
|
data: readonly any[];
|
|
590
|
-
elementAtIndex: (index: number) =>
|
|
628
|
+
elementAtIndex: (index: number) => any;
|
|
591
629
|
end: number;
|
|
592
630
|
endBuffered: number;
|
|
593
631
|
isAtEnd: boolean;
|
|
@@ -604,7 +642,7 @@ type LegendListState = {
|
|
|
604
642
|
start: number;
|
|
605
643
|
startBuffered: number;
|
|
606
644
|
};
|
|
607
|
-
type LegendListRef = {
|
|
645
|
+
type LegendListRef$1 = {
|
|
608
646
|
/**
|
|
609
647
|
* Displays the scroll indicators momentarily.
|
|
610
648
|
*/
|
|
@@ -612,7 +650,7 @@ type LegendListRef = {
|
|
|
612
650
|
/**
|
|
613
651
|
* Returns the native ScrollView component reference.
|
|
614
652
|
*/
|
|
615
|
-
getNativeScrollRef():
|
|
653
|
+
getNativeScrollRef(): any;
|
|
616
654
|
/**
|
|
617
655
|
* Returns the scroll responder instance for handling scroll events.
|
|
618
656
|
*/
|
|
@@ -620,11 +658,11 @@ type LegendListRef = {
|
|
|
620
658
|
/**
|
|
621
659
|
* Returns the ScrollResponderMixin for advanced scroll handling.
|
|
622
660
|
*/
|
|
623
|
-
getScrollResponder():
|
|
661
|
+
getScrollResponder(): any;
|
|
624
662
|
/**
|
|
625
663
|
* Returns the internal state of the scroll virtualization.
|
|
626
664
|
*/
|
|
627
|
-
getState(): LegendListState;
|
|
665
|
+
getState(): LegendListState$1;
|
|
628
666
|
/**
|
|
629
667
|
* Scrolls a specific index into view.
|
|
630
668
|
* @param params - Parameters for scrolling.
|
|
@@ -704,36 +742,44 @@ type LegendListRef = {
|
|
|
704
742
|
* @param enabled - If true, scroll processing is enabled.
|
|
705
743
|
*/
|
|
706
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;
|
|
707
753
|
/**
|
|
708
754
|
* Reports an externally measured content inset. Pass null/undefined to clear.
|
|
709
755
|
* Values are merged on top of props/animated/native insets.
|
|
710
756
|
*/
|
|
711
|
-
reportContentInset(inset?: Partial<Insets> | null): void;
|
|
757
|
+
reportContentInset(inset?: Partial<Insets$1> | null): void;
|
|
712
758
|
};
|
|
713
|
-
interface ViewToken<ItemT = any> {
|
|
759
|
+
interface ViewToken$1<ItemT = any> {
|
|
714
760
|
containerId: number;
|
|
715
761
|
index: number;
|
|
716
762
|
isViewable: boolean;
|
|
717
763
|
item: ItemT;
|
|
718
764
|
key: string;
|
|
719
765
|
}
|
|
720
|
-
interface ViewAmountToken<ItemT = any> extends ViewToken<ItemT> {
|
|
766
|
+
interface ViewAmountToken$1<ItemT = any> extends ViewToken$1<ItemT> {
|
|
721
767
|
percentOfScroller: number;
|
|
722
768
|
percentVisible: number;
|
|
723
769
|
scrollSize: number;
|
|
724
770
|
size: number;
|
|
725
771
|
sizeVisible: number;
|
|
726
772
|
}
|
|
727
|
-
interface ViewabilityConfigCallbackPair<ItemT = any> {
|
|
728
|
-
onViewableItemsChanged?: OnViewableItemsChanged<ItemT>;
|
|
729
|
-
viewabilityConfig: ViewabilityConfig;
|
|
773
|
+
interface ViewabilityConfigCallbackPair$1<ItemT = any> {
|
|
774
|
+
onViewableItemsChanged?: OnViewableItemsChanged$1<ItemT>;
|
|
775
|
+
viewabilityConfig: ViewabilityConfig$1;
|
|
730
776
|
}
|
|
731
|
-
type ViewabilityConfigCallbackPairs<ItemT> = ViewabilityConfigCallbackPair<ItemT>[];
|
|
732
|
-
type OnViewableItemsChanged<ItemT> = ((info: {
|
|
733
|
-
viewableItems: Array<ViewToken<ItemT>>;
|
|
734
|
-
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>>;
|
|
735
781
|
}) => void) | null;
|
|
736
|
-
interface ViewabilityConfig {
|
|
782
|
+
interface ViewabilityConfig$1 {
|
|
737
783
|
/**
|
|
738
784
|
* A unique ID to identify this viewability config
|
|
739
785
|
*/
|
|
@@ -762,51 +808,348 @@ interface ViewabilityConfig {
|
|
|
762
808
|
*/
|
|
763
809
|
waitForInteraction?: boolean | undefined;
|
|
764
810
|
}
|
|
765
|
-
type ViewabilityCallback<ItemT = any> = (viewToken: ViewToken<ItemT>) => void;
|
|
766
|
-
type ViewabilityAmountCallback<ItemT = any> = (viewToken: ViewAmountToken<ItemT>) => void;
|
|
767
|
-
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> {
|
|
768
814
|
index: number;
|
|
769
815
|
item: T;
|
|
770
816
|
prevIndex: number | undefined;
|
|
771
817
|
prevItem: T | undefined;
|
|
772
818
|
}
|
|
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 & {
|
|
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 & {
|
|
776
822
|
displayName?: string;
|
|
777
823
|
};
|
|
778
|
-
declare const typedMemo: TypedMemo;
|
|
779
|
-
interface ScrollIndexWithOffset {
|
|
824
|
+
declare const typedMemo: TypedMemo$1;
|
|
825
|
+
interface ScrollIndexWithOffset$1 {
|
|
780
826
|
index: number;
|
|
781
827
|
viewOffset?: number;
|
|
782
828
|
viewPosition?: number;
|
|
783
829
|
}
|
|
784
|
-
interface ScrollIndexWithOffsetPosition extends ScrollIndexWithOffset {
|
|
830
|
+
interface ScrollIndexWithOffsetPosition$1 extends ScrollIndexWithOffset$1 {
|
|
785
831
|
viewPosition?: number;
|
|
786
832
|
}
|
|
787
|
-
interface ScrollIndexWithOffsetAndContentOffset extends ScrollIndexWithOffsetPosition {
|
|
833
|
+
interface ScrollIndexWithOffsetAndContentOffset$1 extends ScrollIndexWithOffsetPosition$1 {
|
|
788
834
|
contentOffset?: number;
|
|
789
835
|
}
|
|
790
|
-
interface InitialScrollAnchor extends ScrollIndexWithOffsetPosition {
|
|
836
|
+
interface InitialScrollAnchor$1 extends ScrollIndexWithOffsetPosition$1 {
|
|
791
837
|
attempts?: number;
|
|
792
838
|
lastDelta?: number;
|
|
793
839
|
settledTicks?: number;
|
|
794
840
|
}
|
|
795
|
-
type GetRenderedItemResult<ItemT> = {
|
|
841
|
+
type GetRenderedItemResult$1<ItemT> = {
|
|
796
842
|
index: number;
|
|
797
843
|
item: ItemT;
|
|
798
844
|
renderedItem: React.ReactNode;
|
|
799
845
|
};
|
|
800
|
-
type GetRenderedItem = (key: string) => GetRenderedItemResult<any> | null;
|
|
846
|
+
type GetRenderedItem$1 = (key: string) => GetRenderedItemResult$1<any> | null;
|
|
801
847
|
|
|
802
|
-
|
|
803
|
-
|
|
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;
|
|
804
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;
|
|
805
1148
|
|
|
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>>];
|
|
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>>];
|
|
810
1153
|
declare function useIsLastItem(): boolean;
|
|
811
1154
|
declare function useListScrollSize(): {
|
|
812
1155
|
width: number;
|
|
@@ -814,4 +1157,7 @@ declare function useListScrollSize(): {
|
|
|
814
1157
|
};
|
|
815
1158
|
declare function useSyncLayout(): () => void;
|
|
816
1159
|
|
|
817
|
-
|
|
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 };
|