@legendapp/list 2.0.0-next.0 → 2.0.0-next.10
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/animated.d.mts +3 -2
- package/animated.d.ts +3 -2
- package/animated.js +2 -2
- package/animated.mjs +2 -2
- package/index.d.mts +102 -37
- package/index.d.ts +102 -37
- package/index.js +1547 -1319
- package/index.mjs +1550 -1322
- package/keyboard-controller.d.mts +8 -4
- package/keyboard-controller.d.ts +8 -4
- package/keyboard-controller.js +4 -4
- package/keyboard-controller.mjs +4 -4
- package/package.json +1 -1
- package/reanimated.d.mts +1 -1
- package/reanimated.d.ts +1 -1
- package/reanimated.js +7 -7
- package/reanimated.mjs +7 -7
package/animated.d.mts
CHANGED
|
@@ -31,7 +31,7 @@ declare const AnimatedLegendList: Animated.AnimatedComponent<(<T>(props: Omit<Om
|
|
|
31
31
|
ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
|
|
32
32
|
ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
|
|
33
33
|
ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
|
|
34
|
-
maintainScrollAtEnd?: boolean;
|
|
34
|
+
maintainScrollAtEnd?: boolean | _legendapp_list.MaintainScrollAtEndOptions;
|
|
35
35
|
maintainScrollAtEndThreshold?: number;
|
|
36
36
|
maintainVisibleContentPosition?: boolean;
|
|
37
37
|
numColumns?: number;
|
|
@@ -56,7 +56,7 @@ declare const AnimatedLegendList: Animated.AnimatedComponent<(<T>(props: Omit<Om
|
|
|
56
56
|
recycleItems?: boolean;
|
|
57
57
|
refScrollView?: React.Ref<react_native.ScrollView>;
|
|
58
58
|
refreshing?: boolean;
|
|
59
|
-
renderItem?:
|
|
59
|
+
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<_legendapp_list.LegendListRenderItemProps<T>> | undefined;
|
|
60
60
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
|
|
61
61
|
suggestEstimatedItemSize?: boolean;
|
|
62
62
|
viewabilityConfig?: _legendapp_list.ViewabilityConfig;
|
|
@@ -65,6 +65,7 @@ declare const AnimatedLegendList: Animated.AnimatedComponent<(<T>(props: Omit<Om
|
|
|
65
65
|
onLoad?: (info: {
|
|
66
66
|
elapsedTimeInMs: number;
|
|
67
67
|
}) => void;
|
|
68
|
+
snapToIndices?: number[];
|
|
68
69
|
} & React$1.RefAttributes<_legendapp_list.LegendListRef>) => React.ReactNode)>;
|
|
69
70
|
|
|
70
71
|
export { AnimatedLegendList };
|
package/animated.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ declare const AnimatedLegendList: Animated.AnimatedComponent<(<T>(props: Omit<Om
|
|
|
31
31
|
ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
|
|
32
32
|
ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
|
|
33
33
|
ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
|
|
34
|
-
maintainScrollAtEnd?: boolean;
|
|
34
|
+
maintainScrollAtEnd?: boolean | _legendapp_list.MaintainScrollAtEndOptions;
|
|
35
35
|
maintainScrollAtEndThreshold?: number;
|
|
36
36
|
maintainVisibleContentPosition?: boolean;
|
|
37
37
|
numColumns?: number;
|
|
@@ -56,7 +56,7 @@ declare const AnimatedLegendList: Animated.AnimatedComponent<(<T>(props: Omit<Om
|
|
|
56
56
|
recycleItems?: boolean;
|
|
57
57
|
refScrollView?: React.Ref<react_native.ScrollView>;
|
|
58
58
|
refreshing?: boolean;
|
|
59
|
-
renderItem?:
|
|
59
|
+
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<_legendapp_list.LegendListRenderItemProps<T>> | undefined;
|
|
60
60
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
|
|
61
61
|
suggestEstimatedItemSize?: boolean;
|
|
62
62
|
viewabilityConfig?: _legendapp_list.ViewabilityConfig;
|
|
@@ -65,6 +65,7 @@ declare const AnimatedLegendList: Animated.AnimatedComponent<(<T>(props: Omit<Om
|
|
|
65
65
|
onLoad?: (info: {
|
|
66
66
|
elapsedTimeInMs: number;
|
|
67
67
|
}) => void;
|
|
68
|
+
snapToIndices?: number[];
|
|
68
69
|
} & React$1.RefAttributes<_legendapp_list.LegendListRef>) => React.ReactNode)>;
|
|
69
70
|
|
|
70
71
|
export { AnimatedLegendList };
|
package/animated.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var list = require('@legendapp/list');
|
|
4
3
|
var reactNative = require('react-native');
|
|
4
|
+
var list = require('@legendapp/list');
|
|
5
5
|
|
|
6
|
-
// src/animated.tsx
|
|
6
|
+
// src/integrations/animated.tsx
|
|
7
7
|
var AnimatedLegendList = reactNative.Animated.createAnimatedComponent(list.LegendList);
|
|
8
8
|
|
|
9
9
|
exports.AnimatedLegendList = AnimatedLegendList;
|
package/animated.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { LegendList } from '@legendapp/list';
|
|
2
1
|
import { Animated } from 'react-native';
|
|
2
|
+
import { LegendList } from '@legendapp/list';
|
|
3
3
|
|
|
4
|
-
// src/animated.tsx
|
|
4
|
+
// src/integrations/animated.tsx
|
|
5
5
|
var AnimatedLegendList = Animated.createAnimatedComponent(LegendList);
|
|
6
6
|
|
|
7
7
|
export { AnimatedLegendList };
|
package/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import * as _legendapp_list_reanimated from '@legendapp/list/reanimated';
|
|
1
2
|
import * as React$1 from 'react';
|
|
2
3
|
import { ComponentProps, ReactNode, Dispatch, SetStateAction } from 'react';
|
|
3
4
|
import * as react_native from 'react-native';
|
|
4
|
-
import { View, ScrollView, StyleProp, ViewStyle, ScrollViewProps, NativeSyntheticEvent, NativeScrollEvent, ScrollViewComponent, ScrollResponderMixin } from 'react-native';
|
|
5
|
-
import Animated from 'react-native-reanimated';
|
|
6
|
-
import * as _legendapp_list_reanimated from '@legendapp/list/reanimated';
|
|
5
|
+
import { View, ScrollView, Animated, StyleProp, ViewStyle, ScrollViewProps, LayoutRectangle, NativeSyntheticEvent, NativeScrollEvent, ScrollViewComponent, ScrollResponderMixin } from 'react-native';
|
|
6
|
+
import Animated$1 from 'react-native-reanimated';
|
|
7
7
|
|
|
8
|
-
type ListenerType = "numContainers" | "numContainersPooled" | `containerItemKey${number}` | `containerItemData${number}` | `containerPosition${number}` | `containerColumn${number}` | "containersDidLayout" | "extraData" | "numColumns" | "lastItemKeys" | "totalSize" | "alignItemsPaddingTop" | "stylePaddingTop" | "scrollAdjust" | "scrollAdjustUserOffset" | "headerSize" | "footerSize" | "maintainVisibleContentPosition" | "debugRawScroll" | "debugComputedScroll" | "otherAxisSize" | "scrollSize";
|
|
8
|
+
type ListenerType = "numContainers" | "numContainersPooled" | `containerItemKey${number}` | `containerItemData${number}` | `containerPosition${number}` | `containerColumn${number}` | "containersDidLayout" | "extraData" | "numColumns" | "lastItemKeys" | "totalSize" | "alignItemsPaddingTop" | "stylePaddingTop" | "scrollAdjust" | "scrollAdjustUserOffset" | "headerSize" | "footerSize" | "maintainVisibleContentPosition" | "debugRawScroll" | "debugComputedScroll" | "otherAxisSize" | "snapToOffsets" | "scrollSize";
|
|
9
9
|
interface StateContext {
|
|
10
10
|
listeners: Map<ListenerType, Set<(value: any) => void>>;
|
|
11
11
|
values: Map<ListenerType, any>;
|
|
@@ -26,7 +26,7 @@ declare class ScrollAdjustHandler {
|
|
|
26
26
|
setMounted(): void;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
type LegendListPropsBase<ItemT, TScrollView extends ComponentProps<typeof ScrollView> | ComponentProps<typeof Animated.ScrollView>> = Omit<TScrollView, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
|
|
29
|
+
type LegendListPropsBase<ItemT, TScrollView extends ComponentProps<typeof ScrollView> | ComponentProps<typeof Animated.ScrollView> | ComponentProps<typeof Animated$1.ScrollView>> = Omit<TScrollView, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
|
|
30
30
|
/**
|
|
31
31
|
* If true, aligns items at the end of the list.
|
|
32
32
|
* @default false
|
|
@@ -122,7 +122,7 @@ type LegendListPropsBase<ItemT, TScrollView extends ComponentProps<typeof Scroll
|
|
|
122
122
|
* If true, auto-scrolls to end when new items are added.
|
|
123
123
|
* @default false
|
|
124
124
|
*/
|
|
125
|
-
maintainScrollAtEnd?: boolean;
|
|
125
|
+
maintainScrollAtEnd?: boolean | MaintainScrollAtEndOptions;
|
|
126
126
|
/**
|
|
127
127
|
* Distance threshold in percentage of screen size to trigger maintainScrollAtEnd.
|
|
128
128
|
* @default 0.1
|
|
@@ -232,7 +232,13 @@ type LegendListPropsBase<ItemT, TScrollView extends ComponentProps<typeof Scroll
|
|
|
232
232
|
onLoad?: (info: {
|
|
233
233
|
elapsedTimeInMs: number;
|
|
234
234
|
}) => void;
|
|
235
|
+
snapToIndices?: number[];
|
|
235
236
|
};
|
|
237
|
+
interface MaintainScrollAtEndOptions {
|
|
238
|
+
onLayout?: boolean;
|
|
239
|
+
onItemLayout?: boolean;
|
|
240
|
+
onDataChange?: boolean;
|
|
241
|
+
}
|
|
236
242
|
interface ColumnWrapperStyle {
|
|
237
243
|
rowGap?: number;
|
|
238
244
|
gap?: number;
|
|
@@ -250,7 +256,6 @@ interface InternalState {
|
|
|
250
256
|
isEndReached: boolean;
|
|
251
257
|
isAtEnd: boolean;
|
|
252
258
|
isAtStart: boolean;
|
|
253
|
-
data: readonly any[];
|
|
254
259
|
hasScrolled?: boolean;
|
|
255
260
|
scrollLength: number;
|
|
256
261
|
startBuffered: number;
|
|
@@ -275,7 +280,6 @@ interface InternalState {
|
|
|
275
280
|
indexByKey: Map<string, number>;
|
|
276
281
|
idCache: Map<number, string>;
|
|
277
282
|
viewabilityConfigCallbackPairs: ViewabilityConfigCallbackPairs | undefined;
|
|
278
|
-
renderItem: ((props: LegendListRenderItemProps<any>) => ReactNode) | React.ComponentType<LegendListRenderItemProps<any>>;
|
|
279
283
|
scrollHistory: Array<{
|
|
280
284
|
scroll: number;
|
|
281
285
|
time: number;
|
|
@@ -308,8 +312,62 @@ interface InternalState {
|
|
|
308
312
|
num: number;
|
|
309
313
|
avg: number;
|
|
310
314
|
}>;
|
|
311
|
-
|
|
312
|
-
|
|
315
|
+
refScroller: React.RefObject<ScrollView>;
|
|
316
|
+
loadStartTime: number;
|
|
317
|
+
initialScroll: ScrollIndexWithOffsetPosition | undefined;
|
|
318
|
+
lastLayout: LayoutRectangle | undefined;
|
|
319
|
+
queuedItemSizeUpdates: {
|
|
320
|
+
itemKey: string;
|
|
321
|
+
sizeObj: {
|
|
322
|
+
width: number;
|
|
323
|
+
height: number;
|
|
324
|
+
};
|
|
325
|
+
}[];
|
|
326
|
+
queuedItemSizeUpdatesWaiting?: boolean;
|
|
327
|
+
timeoutSetPaddingTop?: any;
|
|
328
|
+
props: {
|
|
329
|
+
alignItemsAtEnd: boolean;
|
|
330
|
+
data: readonly any[];
|
|
331
|
+
estimatedItemSize: number | undefined;
|
|
332
|
+
getEstimatedItemSize: ((index: number, item: any) => number) | undefined;
|
|
333
|
+
horizontal: boolean;
|
|
334
|
+
keyExtractor: ((item: any, index: number) => string) | undefined;
|
|
335
|
+
maintainScrollAtEnd: boolean | MaintainScrollAtEndOptions;
|
|
336
|
+
maintainScrollAtEndThreshold: number | undefined;
|
|
337
|
+
maintainVisibleContentPosition: boolean;
|
|
338
|
+
onEndReached: (((info: {
|
|
339
|
+
distanceFromEnd: number;
|
|
340
|
+
}) => void) | null | undefined) | undefined;
|
|
341
|
+
onEndReachedThreshold: number | null | undefined;
|
|
342
|
+
onItemSizeChanged: ((info: {
|
|
343
|
+
size: number;
|
|
344
|
+
previous: number;
|
|
345
|
+
index: number;
|
|
346
|
+
itemKey: string;
|
|
347
|
+
itemData: any;
|
|
348
|
+
}) => void) | undefined;
|
|
349
|
+
onLoad: ((info: {
|
|
350
|
+
elapsedTimeInMs: number;
|
|
351
|
+
}) => void) | undefined;
|
|
352
|
+
onScroll: ((event: NativeSyntheticEvent<NativeScrollEvent>) => void) | undefined;
|
|
353
|
+
onStartReached: (((info: {
|
|
354
|
+
distanceFromStart: number;
|
|
355
|
+
}) => void) | null | undefined) | undefined;
|
|
356
|
+
onStartReachedThreshold: number | null | undefined;
|
|
357
|
+
suggestEstimatedItemSize: boolean;
|
|
358
|
+
stylePaddingBottom: number | undefined;
|
|
359
|
+
renderItem: ((props: LegendListRenderItemProps<any>) => ReactNode) | React.ComponentType<LegendListRenderItemProps<any>>;
|
|
360
|
+
initialScroll: {
|
|
361
|
+
index: number;
|
|
362
|
+
viewOffset?: number;
|
|
363
|
+
viewPosition?: number;
|
|
364
|
+
} | undefined;
|
|
365
|
+
scrollBuffer: number;
|
|
366
|
+
numColumns: number;
|
|
367
|
+
initialContainerPoolRatio: number;
|
|
368
|
+
stylePaddingTop: number | undefined;
|
|
369
|
+
snapToIndices: number[] | undefined;
|
|
370
|
+
};
|
|
313
371
|
}
|
|
314
372
|
interface ViewableRange<T> {
|
|
315
373
|
startBuffered: number;
|
|
@@ -329,6 +387,7 @@ type ScrollState = {
|
|
|
329
387
|
endBuffered: number;
|
|
330
388
|
isAtEnd: boolean;
|
|
331
389
|
isAtStart: boolean;
|
|
390
|
+
positions: Map<string, number>;
|
|
332
391
|
scroll: number;
|
|
333
392
|
scrollLength: number;
|
|
334
393
|
start: number;
|
|
@@ -381,9 +440,11 @@ type LegendListRef = {
|
|
|
381
440
|
* Scrolls to the end of the list.
|
|
382
441
|
* @param options - Options for scrolling.
|
|
383
442
|
* @param options.animated - If true, animates the scroll. Default: true.
|
|
443
|
+
* @param options.viewOffset - Offset from the target position.
|
|
384
444
|
*/
|
|
385
445
|
scrollToEnd(options?: {
|
|
386
446
|
animated?: boolean | undefined;
|
|
447
|
+
viewOffset?: number | undefined;
|
|
387
448
|
}): void;
|
|
388
449
|
/**
|
|
389
450
|
* Scrolls to a specific index in the list.
|
|
@@ -492,7 +553,7 @@ interface LegendListRecyclingState<T> {
|
|
|
492
553
|
}
|
|
493
554
|
type TypedForwardRef = <T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactNode) => (props: P & React.RefAttributes<T>) => React.ReactNode;
|
|
494
555
|
declare const typedForwardRef: TypedForwardRef;
|
|
495
|
-
type TypedMemo = <T extends React.ComponentType<any>>(Component: T, propsAreEqual?: (prevProps: Readonly<
|
|
556
|
+
type TypedMemo = <T extends React.ComponentType<any>>(Component: T, propsAreEqual?: (prevProps: Readonly<React.JSXElementConstructor<T>>, nextProps: Readonly<React.JSXElementConstructor<T>>) => boolean) => T & {
|
|
496
557
|
displayName?: string;
|
|
497
558
|
};
|
|
498
559
|
declare const typedMemo: TypedMemo;
|
|
@@ -508,7 +569,11 @@ type GetRenderedItemResult<ItemT> = {
|
|
|
508
569
|
};
|
|
509
570
|
type GetRenderedItem = (key: string) => GetRenderedItemResult<any> | null;
|
|
510
571
|
|
|
511
|
-
|
|
572
|
+
interface LazyLegendListProps<ItemT, ListT> extends Omit<LegendListProps<ItemT>, "data" | "keyExtractor" | "renderItem"> {
|
|
573
|
+
children?: React$1.ReactNode | undefined;
|
|
574
|
+
LegendList?: ListT;
|
|
575
|
+
}
|
|
576
|
+
declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
|
|
512
577
|
alignItemsAtEnd?: boolean;
|
|
513
578
|
columnWrapperStyle?: ColumnWrapperStyle;
|
|
514
579
|
data: readonly T[];
|
|
@@ -533,10 +598,10 @@ declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "sc
|
|
|
533
598
|
keyExtractor?: ((item: T, index: number) => string) | undefined;
|
|
534
599
|
ListEmptyComponent?: React$1.ComponentType<any> | React$1.ReactElement | null | undefined;
|
|
535
600
|
ListFooterComponent?: React$1.ComponentType<any> | React$1.ReactElement | null | undefined;
|
|
536
|
-
ListFooterComponentStyle?: react_native.StyleProp<ViewStyle> | undefined;
|
|
601
|
+
ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
|
|
537
602
|
ListHeaderComponent?: React$1.ComponentType<any> | React$1.ReactElement | null | undefined;
|
|
538
|
-
ListHeaderComponentStyle?: react_native.StyleProp<ViewStyle> | undefined;
|
|
539
|
-
maintainScrollAtEnd?: boolean;
|
|
603
|
+
ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
|
|
604
|
+
maintainScrollAtEnd?: boolean | MaintainScrollAtEndOptions;
|
|
540
605
|
maintainScrollAtEndThreshold?: number;
|
|
541
606
|
maintainVisibleContentPosition?: boolean;
|
|
542
607
|
numColumns?: number;
|
|
@@ -559,9 +624,9 @@ declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "sc
|
|
|
559
624
|
onViewableItemsChanged?: OnViewableItemsChanged | undefined;
|
|
560
625
|
progressViewOffset?: number;
|
|
561
626
|
recycleItems?: boolean;
|
|
562
|
-
refScrollView?: React$1.Ref<ScrollView>;
|
|
627
|
+
refScrollView?: React$1.Ref<react_native.ScrollView>;
|
|
563
628
|
refreshing?: boolean;
|
|
564
|
-
renderItem?:
|
|
629
|
+
renderItem?: ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<LegendListRenderItemProps<T>> | undefined;
|
|
565
630
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React$1.ReactElement<react_native.ScrollViewProps>;
|
|
566
631
|
suggestEstimatedItemSize?: boolean;
|
|
567
632
|
viewabilityConfig?: ViewabilityConfig;
|
|
@@ -570,13 +635,8 @@ declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "sc
|
|
|
570
635
|
onLoad?: (info: {
|
|
571
636
|
elapsedTimeInMs: number;
|
|
572
637
|
}) => void;
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
interface LazyLegendListProps<ItemT, ListT> extends Omit<LegendListProps<ItemT>, "data" | "keyExtractor" | "renderItem"> {
|
|
576
|
-
children?: React$1.ReactNode | undefined;
|
|
577
|
-
LegendList?: ListT;
|
|
578
|
-
}
|
|
579
|
-
declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
|
|
638
|
+
snapToIndices?: number[];
|
|
639
|
+
} & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
|
|
580
640
|
alignItemsAtEnd?: boolean;
|
|
581
641
|
columnWrapperStyle?: ColumnWrapperStyle;
|
|
582
642
|
data: readonly T[];
|
|
@@ -604,7 +664,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
|
|
|
604
664
|
ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
|
|
605
665
|
ListHeaderComponent?: React$1.ComponentType<any> | React$1.ReactElement | null | undefined;
|
|
606
666
|
ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
|
|
607
|
-
maintainScrollAtEnd?: boolean;
|
|
667
|
+
maintainScrollAtEnd?: boolean | MaintainScrollAtEndOptions;
|
|
608
668
|
maintainScrollAtEndThreshold?: number;
|
|
609
669
|
maintainVisibleContentPosition?: boolean;
|
|
610
670
|
numColumns?: number;
|
|
@@ -629,7 +689,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
|
|
|
629
689
|
recycleItems?: boolean;
|
|
630
690
|
refScrollView?: React$1.Ref<react_native.ScrollView>;
|
|
631
691
|
refreshing?: boolean;
|
|
632
|
-
renderItem?:
|
|
692
|
+
renderItem?: ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<LegendListRenderItemProps<T>> | undefined;
|
|
633
693
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React$1.ReactElement<react_native.ScrollViewProps>;
|
|
634
694
|
suggestEstimatedItemSize?: boolean;
|
|
635
695
|
viewabilityConfig?: ViewabilityConfig;
|
|
@@ -638,7 +698,10 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
|
|
|
638
698
|
onLoad?: (info: {
|
|
639
699
|
elapsedTimeInMs: number;
|
|
640
700
|
}) => void;
|
|
641
|
-
|
|
701
|
+
snapToIndices?: number[];
|
|
702
|
+
} & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode)> | (<ItemT_1>(props: _legendapp_list_reanimated.AnimatedLegendListProps<ItemT_1> & {
|
|
703
|
+
ref?: React$1.Ref<LegendListRef>;
|
|
704
|
+
}) => React$1.ReactElement | null) = <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
|
|
642
705
|
alignItemsAtEnd?: boolean;
|
|
643
706
|
columnWrapperStyle?: ColumnWrapperStyle;
|
|
644
707
|
data: readonly T[];
|
|
@@ -666,7 +729,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
|
|
|
666
729
|
ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
|
|
667
730
|
ListHeaderComponent?: React$1.ComponentType<any> | React$1.ReactElement | null | undefined;
|
|
668
731
|
ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
|
|
669
|
-
maintainScrollAtEnd?: boolean;
|
|
732
|
+
maintainScrollAtEnd?: boolean | MaintainScrollAtEndOptions;
|
|
670
733
|
maintainScrollAtEndThreshold?: number;
|
|
671
734
|
maintainVisibleContentPosition?: boolean;
|
|
672
735
|
numColumns?: number;
|
|
@@ -691,7 +754,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
|
|
|
691
754
|
recycleItems?: boolean;
|
|
692
755
|
refScrollView?: React$1.Ref<react_native.ScrollView>;
|
|
693
756
|
refreshing?: boolean;
|
|
694
|
-
renderItem?:
|
|
757
|
+
renderItem?: ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<LegendListRenderItemProps<T>> | undefined;
|
|
695
758
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React$1.ReactElement<react_native.ScrollViewProps>;
|
|
696
759
|
suggestEstimatedItemSize?: boolean;
|
|
697
760
|
viewabilityConfig?: ViewabilityConfig;
|
|
@@ -700,9 +763,10 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
|
|
|
700
763
|
onLoad?: (info: {
|
|
701
764
|
elapsedTimeInMs: number;
|
|
702
765
|
}) => void;
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
766
|
+
snapToIndices?: number[];
|
|
767
|
+
} & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode>(props: LazyLegendListProps<ItemT, ListT> & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode;
|
|
768
|
+
|
|
769
|
+
declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
|
|
706
770
|
alignItemsAtEnd?: boolean;
|
|
707
771
|
columnWrapperStyle?: ColumnWrapperStyle;
|
|
708
772
|
data: readonly T[];
|
|
@@ -730,7 +794,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
|
|
|
730
794
|
ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
|
|
731
795
|
ListHeaderComponent?: React$1.ComponentType<any> | React$1.ReactElement | null | undefined;
|
|
732
796
|
ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
|
|
733
|
-
maintainScrollAtEnd?: boolean;
|
|
797
|
+
maintainScrollAtEnd?: boolean | MaintainScrollAtEndOptions;
|
|
734
798
|
maintainScrollAtEndThreshold?: number;
|
|
735
799
|
maintainVisibleContentPosition?: boolean;
|
|
736
800
|
numColumns?: number;
|
|
@@ -753,9 +817,9 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
|
|
|
753
817
|
onViewableItemsChanged?: OnViewableItemsChanged | undefined;
|
|
754
818
|
progressViewOffset?: number;
|
|
755
819
|
recycleItems?: boolean;
|
|
756
|
-
refScrollView?: React$1.Ref<
|
|
820
|
+
refScrollView?: React$1.Ref<ScrollView>;
|
|
757
821
|
refreshing?: boolean;
|
|
758
|
-
renderItem?:
|
|
822
|
+
renderItem?: ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<LegendListRenderItemProps<T>> | undefined;
|
|
759
823
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React$1.ReactElement<react_native.ScrollViewProps>;
|
|
760
824
|
suggestEstimatedItemSize?: boolean;
|
|
761
825
|
viewabilityConfig?: ViewabilityConfig;
|
|
@@ -764,7 +828,8 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
|
|
|
764
828
|
onLoad?: (info: {
|
|
765
829
|
elapsedTimeInMs: number;
|
|
766
830
|
}) => void;
|
|
767
|
-
|
|
831
|
+
snapToIndices?: number[];
|
|
832
|
+
} & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode;
|
|
768
833
|
|
|
769
834
|
declare function useViewability(callback: ViewabilityCallback, configId?: string): void;
|
|
770
835
|
declare function useViewabilityAmount(callback: ViewabilityAmountCallback): void;
|
|
@@ -776,4 +841,4 @@ declare function useListScrollSize(): {
|
|
|
776
841
|
height: number;
|
|
777
842
|
};
|
|
778
843
|
|
|
779
|
-
export { type ColumnWrapperStyle, type GetRenderedItem, type GetRenderedItemResult, type InternalState, LazyLegendList, type LazyLegendListProps, LegendList, type LegendListProps, type LegendListPropsBase, type LegendListRecyclingState, type LegendListRef, type LegendListRenderItemProps, type OnViewableItemsChanged, type ScrollIndexWithOffsetPosition, type ScrollState, type TypedForwardRef, type TypedMemo, type ViewAmountToken, type ViewToken, type ViewabilityAmountCallback, type ViewabilityCallback, type ViewabilityConfig, type ViewabilityConfigCallbackPair, type ViewabilityConfigCallbackPairs, type ViewableRange, typedForwardRef, typedMemo, useIsLastItem, useListScrollSize, useRecyclingEffect, useRecyclingState, useViewability, useViewabilityAmount };
|
|
844
|
+
export { type ColumnWrapperStyle, type GetRenderedItem, type GetRenderedItemResult, type InternalState, LazyLegendList, type LazyLegendListProps, LegendList, type LegendListProps, type LegendListPropsBase, type LegendListRecyclingState, type LegendListRef, type LegendListRenderItemProps, type MaintainScrollAtEndOptions, type OnViewableItemsChanged, type ScrollIndexWithOffsetPosition, type ScrollState, type TypedForwardRef, type TypedMemo, type ViewAmountToken, type ViewToken, type ViewabilityAmountCallback, type ViewabilityCallback, type ViewabilityConfig, type ViewabilityConfigCallbackPair, type ViewabilityConfigCallbackPairs, type ViewableRange, typedForwardRef, typedMemo, useIsLastItem, useListScrollSize, useRecyclingEffect, useRecyclingState, useViewability, useViewabilityAmount };
|