@legendapp/list 1.0.0-beta.5 → 1.0.0-beta.50

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.
@@ -0,0 +1,397 @@
1
+ import * as _legendapp_list from '@legendapp/list';
2
+ import { LegendListRef } from '@legendapp/list';
3
+ import * as react_native_reanimated_lib_typescript_layoutReanimation_animationBuilder_Keyframe from 'react-native-reanimated/lib/typescript/layoutReanimation/animationBuilder/Keyframe';
4
+ import * as react_native from 'react-native';
5
+ import { Insets } from 'react-native';
6
+ import * as react_native_reanimated from 'react-native-reanimated';
7
+ import * as _legendapp_list_reanimated from '@legendapp/list/reanimated';
8
+ import * as React from 'react';
9
+
10
+ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendapp_list_reanimated.AnimatedLegendListPropsBase<ItemT_1>, "refLegendList"> & {
11
+ getEstimatedItemSize?: ((index: number, item: ItemT_1) => number) | undefined;
12
+ keyExtractor?: ((item: ItemT_1, index: number) => string) | undefined;
13
+ animatedProps?: Partial<{
14
+ decelerationRate?: number | "fast" | "normal" | react_native_reanimated.SharedValue<number | "fast" | "normal" | undefined> | undefined;
15
+ horizontal?: boolean | react_native_reanimated.SharedValue<boolean | null | undefined> | null | undefined;
16
+ invertStickyHeaders?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
17
+ keyboardDismissMode?: "none" | "interactive" | "on-drag" | react_native_reanimated.SharedValue<"none" | "interactive" | "on-drag" | undefined> | undefined;
18
+ keyboardShouldPersistTaps?: boolean | "always" | "never" | "handled" | react_native_reanimated.SharedValue<boolean | "always" | "never" | "handled" | undefined> | undefined;
19
+ onContentSizeChange?: ((w: number, h: number) => void) | react_native_reanimated.SharedValue<((w: number, h: number) => void) | undefined> | undefined;
20
+ onScroll?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
21
+ onScrollBeginDrag?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
22
+ onScrollEndDrag?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
23
+ onMomentumScrollEnd?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
24
+ onMomentumScrollBegin?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
25
+ pagingEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
26
+ scrollEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
27
+ removeClippedSubviews?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
28
+ showsHorizontalScrollIndicator?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
29
+ showsVerticalScrollIndicator?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
30
+ stickyHeaderHiddenOnScroll?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
31
+ refreshControl?: React.ReactElement<react_native.RefreshControlProps, string | React.JSXElementConstructor<any>> | react_native_reanimated.SharedValue<React.ReactElement<react_native.RefreshControlProps, string | React.JSXElementConstructor<any>> | undefined> | undefined;
32
+ snapToInterval?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
33
+ snapToOffsets?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
34
+ snapToStart?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
35
+ snapToEnd?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
36
+ stickyHeaderIndices?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
37
+ disableIntervalMomentum?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
38
+ disableScrollViewPanResponder?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
39
+ StickyHeaderComponent?: React.ComponentType<any> | react_native_reanimated.SharedValue<React.ComponentType<any> | undefined> | undefined;
40
+ children?: React.ReactNode | react_native_reanimated.SharedValue<React.ReactNode>;
41
+ hitSlop?: number | Insets | react_native_reanimated.SharedValue<number | Insets | null | undefined> | null | undefined;
42
+ id?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
43
+ needsOffscreenAlphaCompositing?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
44
+ onLayout?: ((event: react_native.LayoutChangeEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.LayoutChangeEvent) => void) | undefined> | undefined;
45
+ pointerEvents?: "box-none" | "none" | "box-only" | "auto" | react_native_reanimated.SharedValue<"box-none" | "none" | "box-only" | "auto" | undefined> | undefined;
46
+ testID?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
47
+ nativeID?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
48
+ className?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
49
+ collapsable?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
50
+ collapsableChildren?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
51
+ renderToHardwareTextureAndroid?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
52
+ focusable?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
53
+ tabIndex?: 0 | -1 | react_native_reanimated.SharedValue<0 | -1 | undefined> | undefined;
54
+ shouldRasterizeIOS?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
55
+ isTVSelectable?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
56
+ hasTVPreferredFocus?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
57
+ tvParallaxShiftDistanceX?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
58
+ tvParallaxShiftDistanceY?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
59
+ tvParallaxTiltAngle?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
60
+ tvParallaxMagnification?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
61
+ onStartShouldSetResponder?: ((event: react_native.GestureResponderEvent) => boolean) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => boolean) | undefined> | undefined;
62
+ onMoveShouldSetResponder?: ((event: react_native.GestureResponderEvent) => boolean) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => boolean) | undefined> | undefined;
63
+ onResponderEnd?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
64
+ onResponderGrant?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
65
+ onResponderReject?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
66
+ onResponderMove?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
67
+ onResponderRelease?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
68
+ onResponderStart?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
69
+ onResponderTerminationRequest?: ((event: react_native.GestureResponderEvent) => boolean) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => boolean) | undefined> | undefined;
70
+ onResponderTerminate?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
71
+ onStartShouldSetResponderCapture?: ((event: react_native.GestureResponderEvent) => boolean) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => boolean) | undefined> | undefined;
72
+ onMoveShouldSetResponderCapture?: ((event: react_native.GestureResponderEvent) => boolean) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => boolean) | undefined> | undefined;
73
+ onTouchStart?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
74
+ onTouchMove?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
75
+ onTouchEnd?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
76
+ onTouchCancel?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
77
+ onTouchEndCapture?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
78
+ onPointerEnter?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
79
+ onPointerEnterCapture?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
80
+ onPointerLeave?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
81
+ onPointerLeaveCapture?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
82
+ onPointerMove?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
83
+ onPointerMoveCapture?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
84
+ onPointerCancel?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
85
+ onPointerCancelCapture?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
86
+ onPointerDown?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
87
+ onPointerDownCapture?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
88
+ onPointerUp?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
89
+ onPointerUpCapture?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
90
+ accessible?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
91
+ accessibilityActions?: readonly Readonly<{
92
+ name: react_native.AccessibilityActionName | string;
93
+ label?: string | undefined;
94
+ }>[] | react_native_reanimated.SharedValue<readonly Readonly<{
95
+ name: react_native.AccessibilityActionName | string;
96
+ label?: string | undefined;
97
+ }>[] | undefined> | undefined;
98
+ accessibilityLabel?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
99
+ 'aria-label'?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
100
+ accessibilityRole?: react_native.AccessibilityRole | react_native_reanimated.SharedValue<react_native.AccessibilityRole | undefined> | undefined;
101
+ accessibilityState?: react_native.AccessibilityState | react_native_reanimated.SharedValue<react_native.AccessibilityState | undefined> | undefined;
102
+ 'aria-busy'?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
103
+ 'aria-checked'?: boolean | "mixed" | react_native_reanimated.SharedValue<boolean | "mixed" | undefined> | undefined;
104
+ 'aria-disabled'?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
105
+ 'aria-expanded'?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
106
+ 'aria-selected'?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
107
+ accessibilityHint?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
108
+ accessibilityValue?: react_native.AccessibilityValue | react_native_reanimated.SharedValue<react_native.AccessibilityValue | undefined> | undefined;
109
+ 'aria-valuemax'?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
110
+ 'aria-valuemin'?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
111
+ 'aria-valuenow'?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
112
+ 'aria-valuetext'?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
113
+ onAccessibilityAction?: ((event: react_native.AccessibilityActionEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.AccessibilityActionEvent) => void) | undefined> | undefined;
114
+ importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | react_native_reanimated.SharedValue<"auto" | "yes" | "no" | "no-hide-descendants" | undefined> | undefined;
115
+ 'aria-hidden'?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
116
+ 'aria-modal'?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
117
+ role?: react_native.Role | react_native_reanimated.SharedValue<react_native.Role | undefined> | undefined;
118
+ accessibilityLabelledBy?: string | string[] | react_native_reanimated.SharedValue<string | string[] | undefined> | undefined;
119
+ 'aria-labelledby'?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
120
+ accessibilityLiveRegion?: "none" | "polite" | "assertive" | react_native_reanimated.SharedValue<"none" | "polite" | "assertive" | undefined> | undefined;
121
+ 'aria-live'?: "polite" | "assertive" | "off" | react_native_reanimated.SharedValue<"polite" | "assertive" | "off" | undefined> | undefined;
122
+ accessibilityElementsHidden?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
123
+ accessibilityViewIsModal?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
124
+ onAccessibilityEscape?: (() => void) | react_native_reanimated.SharedValue<(() => void) | undefined> | undefined;
125
+ onAccessibilityTap?: (() => void) | react_native_reanimated.SharedValue<(() => void) | undefined> | undefined;
126
+ onMagicTap?: (() => void) | react_native_reanimated.SharedValue<(() => void) | undefined> | undefined;
127
+ accessibilityIgnoresInvertColors?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
128
+ accessibilityLanguage?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
129
+ accessibilityShowsLargeContentViewer?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
130
+ accessibilityLargeContentTitle?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
131
+ alwaysBounceHorizontal?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
132
+ alwaysBounceVertical?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
133
+ automaticallyAdjustContentInsets?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
134
+ automaticallyAdjustKeyboardInsets?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
135
+ automaticallyAdjustsScrollIndicatorInsets?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
136
+ bounces?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
137
+ bouncesZoom?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
138
+ canCancelContentTouches?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
139
+ centerContent?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
140
+ contentInset?: Insets | react_native_reanimated.SharedValue<Insets | undefined> | undefined;
141
+ contentOffset?: react_native.PointProp | react_native_reanimated.SharedValue<react_native.PointProp | undefined> | undefined;
142
+ contentInsetAdjustmentBehavior?: "always" | "never" | "automatic" | "scrollableAxes" | react_native_reanimated.SharedValue<"always" | "never" | "automatic" | "scrollableAxes" | undefined> | undefined;
143
+ directionalLockEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
144
+ maintainVisibleContentPosition?: {
145
+ autoscrollToTopThreshold?: number | null | undefined;
146
+ minIndexForVisible: number;
147
+ } | react_native_reanimated.SharedValue<{
148
+ autoscrollToTopThreshold?: number | null | undefined;
149
+ minIndexForVisible: number;
150
+ } | null | undefined> | null | undefined;
151
+ maximumZoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
152
+ minimumZoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
153
+ onScrollAnimationEnd?: (() => void) | react_native_reanimated.SharedValue<(() => void) | undefined> | undefined;
154
+ pinchGestureEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
155
+ scrollEventThrottle?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
156
+ scrollIndicatorInsets?: Insets | react_native_reanimated.SharedValue<Insets | undefined> | undefined;
157
+ scrollToOverflowEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
158
+ scrollsToTop?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
159
+ snapToAlignment?: "center" | "start" | "end" | react_native_reanimated.SharedValue<"center" | "start" | "end" | undefined> | undefined;
160
+ onScrollToTop?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
161
+ zoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
162
+ endFillColor?: react_native.ColorValue | react_native_reanimated.SharedValue<react_native.ColorValue | undefined> | undefined;
163
+ scrollPerfTag?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
164
+ overScrollMode?: "auto" | "always" | "never" | react_native_reanimated.SharedValue<"auto" | "always" | "never" | undefined> | undefined;
165
+ nestedScrollEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
166
+ fadingEdgeLength?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
167
+ persistentScrollbar?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
168
+ } & {
169
+ style?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<react_native.StyleProp<react_native.ViewStyle>>>;
170
+ contentContainerStyle?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<react_native.StyleProp<react_native.ViewStyle>>>;
171
+ indicatorStyle?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<"default" | "black" | "white" | undefined>>;
172
+ } & {
173
+ layout?: react_native_reanimated.BaseAnimationBuilder | react_native_reanimated.LayoutAnimationFunction | typeof react_native_reanimated.BaseAnimationBuilder;
174
+ entering?: react_native_reanimated.BaseAnimationBuilder | typeof react_native_reanimated.BaseAnimationBuilder | react_native_reanimated.EntryExitAnimationFunction | react_native_reanimated_lib_typescript_layoutReanimation_animationBuilder_Keyframe.ReanimatedKeyframe;
175
+ exiting?: react_native_reanimated.BaseAnimationBuilder | typeof react_native_reanimated.BaseAnimationBuilder | react_native_reanimated.EntryExitAnimationFunction | react_native_reanimated_lib_typescript_layoutReanimation_animationBuilder_Keyframe.ReanimatedKeyframe;
176
+ } & {
177
+ sharedTransitionTag?: string;
178
+ sharedTransitionStyle?: react_native_reanimated.SharedTransition;
179
+ }> | undefined;
180
+ renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<ItemT_1>) => React.ReactNode) | undefined;
181
+ onItemSizeChanged?: ((info: {
182
+ size: number;
183
+ previous: number;
184
+ index: number;
185
+ itemKey: string;
186
+ itemData: ItemT_1;
187
+ }) => void) | undefined;
188
+ ItemSeparatorComponent?: React.ComponentType<{
189
+ leadingItem: ItemT_1;
190
+ }> | undefined;
191
+ } & {
192
+ ref?: React.Ref<LegendListRef>;
193
+ }) => React.ReactElement | null) | (<T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
194
+ alignItemsAtEnd?: boolean;
195
+ columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
196
+ data: readonly T[];
197
+ drawDistance?: number;
198
+ estimatedItemSize?: number;
199
+ extraData?: any;
200
+ getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
201
+ initialContainerPoolRatio?: number | undefined;
202
+ initialScrollOffset?: number;
203
+ initialScrollIndex?: number;
204
+ ItemSeparatorComponent?: React.ComponentType<{
205
+ leadingItem: T;
206
+ }> | undefined;
207
+ keyExtractor?: ((item: T, index: number) => string) | undefined;
208
+ ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
209
+ ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
210
+ ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
211
+ ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
212
+ ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
213
+ maintainScrollAtEnd?: boolean;
214
+ maintainScrollAtEndThreshold?: number;
215
+ maintainVisibleContentPosition?: boolean;
216
+ numColumns?: number;
217
+ onEndReached?: ((info: {
218
+ distanceFromEnd: number;
219
+ }) => void) | null | undefined;
220
+ onEndReachedThreshold?: number | null | undefined;
221
+ onItemSizeChanged?: ((info: {
222
+ size: number;
223
+ previous: number;
224
+ index: number;
225
+ itemKey: string;
226
+ itemData: T;
227
+ }) => void) | undefined;
228
+ onRefresh?: () => void;
229
+ onStartReached?: ((info: {
230
+ distanceFromStart: number;
231
+ }) => void) | null | undefined;
232
+ onStartReachedThreshold?: number | null | undefined;
233
+ onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
234
+ progressViewOffset?: number;
235
+ recycleItems?: boolean;
236
+ refScrollView?: React.Ref<react_native.ScrollView>;
237
+ refreshing?: boolean;
238
+ renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | undefined;
239
+ renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
240
+ viewabilityConfig?: _legendapp_list.ViewabilityConfig;
241
+ viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
242
+ waitForInitialLayout?: boolean;
243
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
244
+ alignItemsAtEnd?: boolean;
245
+ columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
246
+ data: readonly T[];
247
+ drawDistance?: number;
248
+ estimatedItemSize?: number;
249
+ extraData?: any;
250
+ getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
251
+ initialContainerPoolRatio?: number | undefined;
252
+ initialScrollOffset?: number;
253
+ initialScrollIndex?: number;
254
+ ItemSeparatorComponent?: React.ComponentType<{
255
+ leadingItem: T;
256
+ }> | undefined;
257
+ keyExtractor?: ((item: T, index: number) => string) | undefined;
258
+ ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
259
+ ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
260
+ ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
261
+ ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
262
+ ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
263
+ maintainScrollAtEnd?: boolean;
264
+ maintainScrollAtEndThreshold?: number;
265
+ maintainVisibleContentPosition?: boolean;
266
+ numColumns?: number;
267
+ onEndReached?: ((info: {
268
+ distanceFromEnd: number;
269
+ }) => void) | null | undefined;
270
+ onEndReachedThreshold?: number | null | undefined;
271
+ onItemSizeChanged?: ((info: {
272
+ size: number;
273
+ previous: number;
274
+ index: number;
275
+ itemKey: string;
276
+ itemData: T;
277
+ }) => void) | undefined;
278
+ onRefresh?: () => void;
279
+ onStartReached?: ((info: {
280
+ distanceFromStart: number;
281
+ }) => void) | null | undefined;
282
+ onStartReachedThreshold?: number | null | undefined;
283
+ onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
284
+ progressViewOffset?: number;
285
+ recycleItems?: boolean;
286
+ refScrollView?: React.Ref<react_native.ScrollView>;
287
+ refreshing?: boolean;
288
+ renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | undefined;
289
+ renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
290
+ viewabilityConfig?: _legendapp_list.ViewabilityConfig;
291
+ viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
292
+ waitForInitialLayout?: boolean;
293
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode)> = <T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
294
+ alignItemsAtEnd?: boolean;
295
+ columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
296
+ data: readonly T[];
297
+ drawDistance?: number;
298
+ estimatedItemSize?: number;
299
+ extraData?: any;
300
+ getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
301
+ initialContainerPoolRatio?: number | undefined;
302
+ initialScrollOffset?: number;
303
+ initialScrollIndex?: number;
304
+ ItemSeparatorComponent?: React.ComponentType<{
305
+ leadingItem: T;
306
+ }> | undefined;
307
+ keyExtractor?: ((item: T, index: number) => string) | undefined;
308
+ ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
309
+ ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
310
+ ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
311
+ ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
312
+ ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
313
+ maintainScrollAtEnd?: boolean;
314
+ maintainScrollAtEndThreshold?: number;
315
+ maintainVisibleContentPosition?: boolean;
316
+ numColumns?: number;
317
+ onEndReached?: ((info: {
318
+ distanceFromEnd: number;
319
+ }) => void) | null | undefined;
320
+ onEndReachedThreshold?: number | null | undefined;
321
+ onItemSizeChanged?: ((info: {
322
+ size: number;
323
+ previous: number;
324
+ index: number;
325
+ itemKey: string;
326
+ itemData: T;
327
+ }) => void) | undefined;
328
+ onRefresh?: () => void;
329
+ onStartReached?: ((info: {
330
+ distanceFromStart: number;
331
+ }) => void) | null | undefined;
332
+ onStartReachedThreshold?: number | null | undefined;
333
+ onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
334
+ progressViewOffset?: number;
335
+ recycleItems?: boolean;
336
+ refScrollView?: React.Ref<react_native.ScrollView>;
337
+ refreshing?: boolean;
338
+ renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | undefined;
339
+ renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
340
+ viewabilityConfig?: _legendapp_list.ViewabilityConfig;
341
+ viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
342
+ waitForInitialLayout?: boolean;
343
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
344
+ alignItemsAtEnd?: boolean;
345
+ columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
346
+ data: readonly ItemT[];
347
+ drawDistance?: number;
348
+ estimatedItemSize?: number;
349
+ extraData?: any;
350
+ getEstimatedItemSize?: ((index: number, item: ItemT) => number) | undefined;
351
+ initialContainerPoolRatio?: number | undefined;
352
+ initialScrollOffset?: number;
353
+ initialScrollIndex?: number;
354
+ ItemSeparatorComponent?: React.ComponentType<{
355
+ leadingItem: ItemT;
356
+ }> | undefined;
357
+ keyExtractor?: ((item: ItemT, index: number) => string) | undefined;
358
+ ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
359
+ ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
360
+ ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
361
+ ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
362
+ ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
363
+ maintainScrollAtEnd?: boolean;
364
+ maintainScrollAtEndThreshold?: number;
365
+ maintainVisibleContentPosition?: boolean;
366
+ numColumns?: number;
367
+ onEndReached?: ((info: {
368
+ distanceFromEnd: number;
369
+ }) => void) | null | undefined;
370
+ onEndReachedThreshold?: number | null | undefined;
371
+ onItemSizeChanged?: ((info: {
372
+ size: number;
373
+ previous: number;
374
+ index: number;
375
+ itemKey: string;
376
+ itemData: ItemT;
377
+ }) => void) | undefined;
378
+ onRefresh?: () => void;
379
+ onStartReached?: ((info: {
380
+ distanceFromStart: number;
381
+ }) => void) | null | undefined;
382
+ onStartReachedThreshold?: number | null | undefined;
383
+ onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
384
+ progressViewOffset?: number;
385
+ recycleItems?: boolean;
386
+ refScrollView?: React.Ref<react_native.ScrollView>;
387
+ refreshing?: boolean;
388
+ renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<ItemT>) => React.ReactNode) | undefined;
389
+ renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
390
+ viewabilityConfig?: _legendapp_list.ViewabilityConfig;
391
+ viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
392
+ waitForInitialLayout?: boolean;
393
+ } & {
394
+ LegendList?: ListT;
395
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode;
396
+
397
+ export { LegendList };
@@ -0,0 +1,61 @@
1
+ 'use strict';
2
+
3
+ var list = require('@legendapp/list');
4
+ var React = require('react');
5
+ var reactNative = require('react-native');
6
+ var reactNativeKeyboardController = require('react-native-keyboard-controller');
7
+ var reactNativeReanimated = require('react-native-reanimated');
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n.default = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
+
29
+ // src/keyboard-controller.tsx
30
+ var typedForwardRef = React.forwardRef;
31
+ var LegendList = typedForwardRef(function LegendList2(props, forwardedRef) {
32
+ const {
33
+ LegendList: LegendListProp,
34
+ style: styleProp,
35
+ scrollIndicatorInsets: scrollIndicatorInsetsProp,
36
+ ...rest
37
+ } = props;
38
+ const [padding, setPadding] = React.useState(0);
39
+ const updatePadding = (height) => {
40
+ setPadding(height);
41
+ };
42
+ reactNativeKeyboardController.useKeyboardHandler({
43
+ onEnd: (e) => {
44
+ "worklet";
45
+ reactNativeReanimated.runOnJS(updatePadding)(e.height);
46
+ }
47
+ });
48
+ const LegendListComponent = LegendListProp != null ? LegendListProp : list.LegendList;
49
+ const styleFlattened = reactNative.StyleSheet.flatten(styleProp) || {};
50
+ const style = { ...styleFlattened, paddingTop: padding + (styleFlattened.paddingTop || 0) };
51
+ const scrollIndicatorInsets = scrollIndicatorInsetsProp ? { ...scrollIndicatorInsetsProp } : {};
52
+ if (!props.horizontal) {
53
+ scrollIndicatorInsets.top = (scrollIndicatorInsets.top || 0) + padding;
54
+ }
55
+ return (
56
+ // @ts-expect-error TODO: Fix this type
57
+ /* @__PURE__ */ React__namespace.createElement(LegendListComponent, { ...rest, style, scrollIndicatorInsets, ref: forwardedRef })
58
+ );
59
+ });
60
+
61
+ exports.LegendList = LegendList;
@@ -0,0 +1,40 @@
1
+ import { LegendList as LegendList$1 } from '@legendapp/list';
2
+ import * as React from 'react';
3
+ import { useState, forwardRef } from 'react';
4
+ import { StyleSheet } from 'react-native';
5
+ import { useKeyboardHandler } from 'react-native-keyboard-controller';
6
+ import { runOnJS } from 'react-native-reanimated';
7
+
8
+ // src/keyboard-controller.tsx
9
+ var typedForwardRef = forwardRef;
10
+ var LegendList = typedForwardRef(function LegendList2(props, forwardedRef) {
11
+ const {
12
+ LegendList: LegendListProp,
13
+ style: styleProp,
14
+ scrollIndicatorInsets: scrollIndicatorInsetsProp,
15
+ ...rest
16
+ } = props;
17
+ const [padding, setPadding] = useState(0);
18
+ const updatePadding = (height) => {
19
+ setPadding(height);
20
+ };
21
+ useKeyboardHandler({
22
+ onEnd: (e) => {
23
+ "worklet";
24
+ runOnJS(updatePadding)(e.height);
25
+ }
26
+ });
27
+ const LegendListComponent = LegendListProp != null ? LegendListProp : LegendList$1;
28
+ const styleFlattened = StyleSheet.flatten(styleProp) || {};
29
+ const style = { ...styleFlattened, paddingTop: padding + (styleFlattened.paddingTop || 0) };
30
+ const scrollIndicatorInsets = scrollIndicatorInsetsProp ? { ...scrollIndicatorInsetsProp } : {};
31
+ if (!props.horizontal) {
32
+ scrollIndicatorInsets.top = (scrollIndicatorInsets.top || 0) + padding;
33
+ }
34
+ return (
35
+ // @ts-expect-error TODO: Fix this type
36
+ /* @__PURE__ */ React.createElement(LegendListComponent, { ...rest, style, scrollIndicatorInsets, ref: forwardedRef })
37
+ );
38
+ });
39
+
40
+ export { LegendList };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@legendapp/list",
3
- "version": "1.0.0-beta.5",
4
- "description": "legend-list",
3
+ "version": "1.0.0-beta.50",
4
+ "description": "Legend List aims to be a drop-in replacement for FlatList with much better performance and supporting dynamically sized items.",
5
5
  "sideEffects": false,
6
6
  "private": false,
7
7
  "main": "./index.js",
@@ -20,10 +20,7 @@
20
20
  "react-native",
21
21
  "list"
22
22
  ],
23
- "repository": {
24
- "type": "git",
25
- "url": "git+https://github.com/LegendApp/legend-list.git"
26
- },
23
+ "repository": "github:LegendApp/legend-list",
27
24
  "license": "MIT",
28
25
  "bugs": {
29
26
  "url": "https://github.com/LegendApp/legend-list/issues"
package/reanimated.d.mts CHANGED
@@ -1,16 +1,17 @@
1
- import { LegendListRef, LegendListPropsBase } from '@legendapp/list';
2
- import react__default, { ComponentProps } from 'react';
3
- import Animated from 'react-native-reanimated';
1
+ import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
2
+ import React__default, { ComponentProps } from 'react';
3
+ import react_native_reanimated__default from 'react-native-reanimated';
4
4
 
5
- type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged";
6
- type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
7
- interface AnimatedLegendListProps<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
8
- refScrollView?: react__default.Ref<Animated.ScrollView>;
5
+ type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "ItemSeparatorComponent";
6
+ type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof react_native_reanimated__default.ScrollView>>;
7
+ interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
8
+ refScrollView?: React__default.Ref<react_native_reanimated__default.ScrollView>;
9
9
  }
10
10
  type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
11
- type AnimatedLegendListDefinition = <ItemT>(props: Omit<AnimatedLegendListProps<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT> & {
12
- ref?: react__default.Ref<LegendListRef>;
13
- }) => react__default.ReactElement | null;
11
+ type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT>;
12
+ type AnimatedLegendListDefinition = <ItemT>(props: Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT> & {
13
+ ref?: React__default.Ref<LegendListRef>;
14
+ }) => React__default.ReactElement | null;
14
15
  declare const AnimatedLegendList: AnimatedLegendListDefinition;
15
16
 
16
- export { AnimatedLegendList };
17
+ export { AnimatedLegendList, type AnimatedLegendListProps, type AnimatedLegendListPropsBase };
package/reanimated.d.ts CHANGED
@@ -1,16 +1,17 @@
1
- import { LegendListRef, LegendListPropsBase } from '@legendapp/list';
2
- import react__default, { ComponentProps } from 'react';
3
- import Animated from 'react-native-reanimated';
1
+ import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
2
+ import React__default, { ComponentProps } from 'react';
3
+ import react_native_reanimated__default from 'react-native-reanimated';
4
4
 
5
- type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged";
6
- type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
7
- interface AnimatedLegendListProps<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
8
- refScrollView?: react__default.Ref<Animated.ScrollView>;
5
+ type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "ItemSeparatorComponent";
6
+ type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof react_native_reanimated__default.ScrollView>>;
7
+ interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
8
+ refScrollView?: React__default.Ref<react_native_reanimated__default.ScrollView>;
9
9
  }
10
10
  type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
11
- type AnimatedLegendListDefinition = <ItemT>(props: Omit<AnimatedLegendListProps<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT> & {
12
- ref?: react__default.Ref<LegendListRef>;
13
- }) => react__default.ReactElement | null;
11
+ type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT>;
12
+ type AnimatedLegendListDefinition = <ItemT>(props: Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT> & {
13
+ ref?: React__default.Ref<LegendListRef>;
14
+ }) => React__default.ReactElement | null;
14
15
  declare const AnimatedLegendList: AnimatedLegendListDefinition;
15
16
 
16
- export { AnimatedLegendList };
17
+ export { AnimatedLegendList, type AnimatedLegendListProps, type AnimatedLegendListPropsBase };