@legendapp/list 1.0.0-beta.9 → 1.0.1

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