@legendapp/list 1.0.19 → 1.1.0

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.
@@ -1,23 +1,28 @@
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
1
  import * as _legendapp_list_reanimated from '@legendapp/list/reanimated';
4
2
  import * as _legendapp_list from '@legendapp/list';
5
3
  import { LegendListRef } from '@legendapp/list';
6
4
  import * as react_native from 'react-native';
7
- import { Insets } from 'react-native';
8
5
  import * as React from 'react';
9
6
 
10
- declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews"> & {
7
+ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
11
8
  alignItemsAtEnd?: boolean;
12
9
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
13
10
  data: readonly T[];
14
11
  drawDistance?: number;
15
12
  estimatedItemSize?: number;
13
+ estimatedListSize?: {
14
+ height: number;
15
+ width: number;
16
+ };
16
17
  extraData?: any;
17
18
  getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
18
19
  initialContainerPoolRatio?: number | undefined;
19
20
  initialScrollOffset?: number;
20
- initialScrollIndex?: number;
21
+ initialScrollIndex?: number | {
22
+ index: number;
23
+ viewOffset?: number | undefined;
24
+ viewPosition?: number | undefined;
25
+ };
21
26
  ItemSeparatorComponent?: React.ComponentType<{
22
27
  leadingItem: T;
23
28
  }> | undefined;
@@ -61,17 +66,25 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
61
66
  onLoad?: (info: {
62
67
  elapsedTimeInMs: number;
63
68
  }) => void;
64
- } & React.RefAttributes<LegendListRef>) => React.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews"> & {
69
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
65
70
  alignItemsAtEnd?: boolean;
66
71
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
67
72
  data: readonly T[];
68
73
  drawDistance?: number;
69
74
  estimatedItemSize?: number;
75
+ estimatedListSize?: {
76
+ height: number;
77
+ width: number;
78
+ };
70
79
  extraData?: any;
71
80
  getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
72
81
  initialContainerPoolRatio?: number | undefined;
73
82
  initialScrollOffset?: number;
74
- initialScrollIndex?: number;
83
+ initialScrollIndex?: number | {
84
+ index: number;
85
+ viewOffset?: number | undefined;
86
+ viewPosition?: number | undefined;
87
+ };
75
88
  ItemSeparatorComponent?: React.ComponentType<{
76
89
  leadingItem: T;
77
90
  }> | undefined;
@@ -115,200 +128,27 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
115
128
  onLoad?: (info: {
116
129
  elapsedTimeInMs: number;
117
130
  }) => void;
118
- } & React.RefAttributes<LegendListRef>) => React.ReactNode)> | (<ItemT_1>(props: Omit<_legendapp_list_reanimated.AnimatedLegendListPropsBase<ItemT_1>, "refLegendList"> & {
119
- getEstimatedItemSize?: ((index: number, item: ItemT_1) => number) | undefined;
120
- ItemSeparatorComponent?: React.ComponentType<{
121
- leadingItem: ItemT_1;
122
- }> | undefined;
123
- keyExtractor?: ((item: ItemT_1, index: number) => string) | undefined;
124
- onItemSizeChanged?: ((info: {
125
- size: number;
126
- previous: number;
127
- index: number;
128
- itemKey: string;
129
- itemData: ItemT_1;
130
- }) => void) | undefined;
131
- renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<ItemT_1>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<ItemT_1>> | undefined;
132
- animatedProps?: Partial<{
133
- contentOffset?: react_native.PointProp | react_native_reanimated.SharedValue<react_native.PointProp | undefined> | undefined;
134
- contentInset?: Insets | react_native_reanimated.SharedValue<Insets | undefined> | undefined;
135
- maintainVisibleContentPosition?: {
136
- autoscrollToTopThreshold?: number | null | undefined;
137
- minIndexForVisible: number;
138
- } | react_native_reanimated.SharedValue<{
139
- autoscrollToTopThreshold?: number | null | undefined;
140
- minIndexForVisible: number;
141
- } | null | undefined> | null | undefined;
142
- stickyHeaderIndices?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
143
- removeClippedSubviews?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
144
- scrollEventThrottle?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
145
- decelerationRate?: number | "fast" | "normal" | react_native_reanimated.SharedValue<number | "fast" | "normal" | undefined> | undefined;
146
- horizontal?: boolean | react_native_reanimated.SharedValue<boolean | null | undefined> | null | undefined;
147
- invertStickyHeaders?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
148
- keyboardDismissMode?: "none" | "interactive" | "on-drag" | react_native_reanimated.SharedValue<"none" | "interactive" | "on-drag" | undefined> | undefined;
149
- keyboardShouldPersistTaps?: boolean | "always" | "never" | "handled" | react_native_reanimated.SharedValue<boolean | "always" | "never" | "handled" | undefined> | undefined;
150
- onContentSizeChange?: ((w: number, h: number) => void) | react_native_reanimated.SharedValue<((w: number, h: number) => void) | undefined> | undefined;
151
- onScroll?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
152
- onScrollBeginDrag?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
153
- onScrollEndDrag?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
154
- onMomentumScrollEnd?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
155
- onMomentumScrollBegin?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
156
- pagingEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
157
- scrollEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
158
- showsHorizontalScrollIndicator?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
159
- showsVerticalScrollIndicator?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
160
- stickyHeaderHiddenOnScroll?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
161
- 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;
162
- snapToInterval?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
163
- snapToOffsets?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
164
- snapToStart?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
165
- snapToEnd?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
166
- disableIntervalMomentum?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
167
- disableScrollViewPanResponder?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
168
- StickyHeaderComponent?: React.ComponentType<any> | react_native_reanimated.SharedValue<React.ComponentType<any> | undefined> | undefined;
169
- children?: React.ReactNode | react_native_reanimated.SharedValue<React.ReactNode>;
170
- hitSlop?: number | Insets | react_native_reanimated.SharedValue<number | Insets | null | undefined> | null | undefined;
171
- id?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
172
- needsOffscreenAlphaCompositing?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
173
- onLayout?: ((event: react_native.LayoutChangeEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.LayoutChangeEvent) => void) | undefined> | undefined;
174
- pointerEvents?: "box-none" | "none" | "box-only" | "auto" | react_native_reanimated.SharedValue<"box-none" | "none" | "box-only" | "auto" | undefined> | undefined;
175
- testID?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
176
- nativeID?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
177
- className?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
178
- collapsable?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
179
- collapsableChildren?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
180
- renderToHardwareTextureAndroid?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
181
- focusable?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
182
- tabIndex?: 0 | -1 | react_native_reanimated.SharedValue<0 | -1 | undefined> | undefined;
183
- shouldRasterizeIOS?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
184
- isTVSelectable?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
185
- hasTVPreferredFocus?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
186
- tvParallaxShiftDistanceX?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
187
- tvParallaxShiftDistanceY?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
188
- tvParallaxTiltAngle?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
189
- tvParallaxMagnification?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
190
- onStartShouldSetResponder?: ((event: react_native.GestureResponderEvent) => boolean) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => boolean) | undefined> | undefined;
191
- onMoveShouldSetResponder?: ((event: react_native.GestureResponderEvent) => boolean) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => boolean) | undefined> | undefined;
192
- onResponderEnd?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
193
- onResponderGrant?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
194
- onResponderReject?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
195
- onResponderMove?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
196
- onResponderRelease?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
197
- onResponderStart?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
198
- onResponderTerminationRequest?: ((event: react_native.GestureResponderEvent) => boolean) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => boolean) | undefined> | undefined;
199
- onResponderTerminate?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
200
- onStartShouldSetResponderCapture?: ((event: react_native.GestureResponderEvent) => boolean) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => boolean) | undefined> | undefined;
201
- onMoveShouldSetResponderCapture?: ((event: react_native.GestureResponderEvent) => boolean) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => boolean) | undefined> | undefined;
202
- onTouchStart?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
203
- onTouchMove?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
204
- onTouchEnd?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
205
- onTouchCancel?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
206
- onTouchEndCapture?: ((event: react_native.GestureResponderEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.GestureResponderEvent) => void) | undefined> | undefined;
207
- onPointerEnter?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
208
- onPointerEnterCapture?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
209
- onPointerLeave?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
210
- onPointerLeaveCapture?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
211
- onPointerMove?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
212
- onPointerMoveCapture?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
213
- onPointerCancel?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
214
- onPointerCancelCapture?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
215
- onPointerDown?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
216
- onPointerDownCapture?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
217
- onPointerUp?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
218
- onPointerUpCapture?: ((event: react_native.PointerEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.PointerEvent) => void) | undefined> | undefined;
219
- accessible?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
220
- accessibilityActions?: readonly Readonly<{
221
- name: react_native.AccessibilityActionName | string;
222
- label?: string | undefined;
223
- }>[] | react_native_reanimated.SharedValue<readonly Readonly<{
224
- name: react_native.AccessibilityActionName | string;
225
- label?: string | undefined;
226
- }>[] | undefined> | undefined;
227
- accessibilityLabel?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
228
- 'aria-label'?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
229
- accessibilityRole?: react_native.AccessibilityRole | react_native_reanimated.SharedValue<react_native.AccessibilityRole | undefined> | undefined;
230
- accessibilityState?: react_native.AccessibilityState | react_native_reanimated.SharedValue<react_native.AccessibilityState | undefined> | undefined;
231
- 'aria-busy'?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
232
- 'aria-checked'?: boolean | "mixed" | react_native_reanimated.SharedValue<boolean | "mixed" | undefined> | undefined;
233
- 'aria-disabled'?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
234
- 'aria-expanded'?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
235
- 'aria-selected'?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
236
- accessibilityHint?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
237
- accessibilityValue?: react_native.AccessibilityValue | react_native_reanimated.SharedValue<react_native.AccessibilityValue | undefined> | undefined;
238
- 'aria-valuemax'?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
239
- 'aria-valuemin'?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
240
- 'aria-valuenow'?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
241
- 'aria-valuetext'?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
242
- onAccessibilityAction?: ((event: react_native.AccessibilityActionEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.AccessibilityActionEvent) => void) | undefined> | undefined;
243
- importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | react_native_reanimated.SharedValue<"auto" | "yes" | "no" | "no-hide-descendants" | undefined> | undefined;
244
- 'aria-hidden'?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
245
- 'aria-modal'?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
246
- role?: react_native.Role | react_native_reanimated.SharedValue<react_native.Role | undefined> | undefined;
247
- accessibilityLabelledBy?: string | string[] | react_native_reanimated.SharedValue<string | string[] | undefined> | undefined;
248
- 'aria-labelledby'?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
249
- accessibilityLiveRegion?: "none" | "polite" | "assertive" | react_native_reanimated.SharedValue<"none" | "polite" | "assertive" | undefined> | undefined;
250
- 'aria-live'?: "polite" | "assertive" | "off" | react_native_reanimated.SharedValue<"polite" | "assertive" | "off" | undefined> | undefined;
251
- accessibilityElementsHidden?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
252
- accessibilityViewIsModal?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
253
- onAccessibilityEscape?: (() => void) | react_native_reanimated.SharedValue<(() => void) | undefined> | undefined;
254
- onAccessibilityTap?: (() => void) | react_native_reanimated.SharedValue<(() => void) | undefined> | undefined;
255
- onMagicTap?: (() => void) | react_native_reanimated.SharedValue<(() => void) | undefined> | undefined;
256
- accessibilityIgnoresInvertColors?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
257
- accessibilityLanguage?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
258
- accessibilityShowsLargeContentViewer?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
259
- accessibilityLargeContentTitle?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
260
- alwaysBounceHorizontal?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
261
- alwaysBounceVertical?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
262
- automaticallyAdjustContentInsets?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
263
- automaticallyAdjustKeyboardInsets?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
264
- automaticallyAdjustsScrollIndicatorInsets?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
265
- bounces?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
266
- bouncesZoom?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
267
- canCancelContentTouches?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
268
- centerContent?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
269
- contentInsetAdjustmentBehavior?: "always" | "never" | "automatic" | "scrollableAxes" | react_native_reanimated.SharedValue<"always" | "never" | "automatic" | "scrollableAxes" | undefined> | undefined;
270
- directionalLockEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
271
- maximumZoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
272
- minimumZoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
273
- onScrollAnimationEnd?: (() => void) | react_native_reanimated.SharedValue<(() => void) | undefined> | undefined;
274
- pinchGestureEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
275
- scrollIndicatorInsets?: Insets | react_native_reanimated.SharedValue<Insets | undefined> | undefined;
276
- scrollToOverflowEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
277
- scrollsToTop?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
278
- snapToAlignment?: "end" | "start" | "center" | react_native_reanimated.SharedValue<"end" | "start" | "center" | undefined> | undefined;
279
- onScrollToTop?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
280
- zoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
281
- endFillColor?: react_native.ColorValue | react_native_reanimated.SharedValue<react_native.ColorValue | undefined> | undefined;
282
- scrollPerfTag?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
283
- overScrollMode?: "auto" | "always" | "never" | react_native_reanimated.SharedValue<"auto" | "always" | "never" | undefined> | undefined;
284
- nestedScrollEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
285
- fadingEdgeLength?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
286
- persistentScrollbar?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
287
- } & {
288
- contentContainerStyle?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<react_native.StyleProp<react_native.ViewStyle>>>;
289
- style?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<react_native.StyleProp<react_native.ViewStyle>>>;
290
- indicatorStyle?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<"default" | "black" | "white" | undefined>>;
291
- } & {
292
- layout?: react_native_reanimated.BaseAnimationBuilder | react_native_reanimated.LayoutAnimationFunction | typeof react_native_reanimated.BaseAnimationBuilder;
293
- entering?: react_native_reanimated.BaseAnimationBuilder | typeof react_native_reanimated.BaseAnimationBuilder | react_native_reanimated.EntryExitAnimationFunction | react_native_reanimated_lib_typescript_layoutReanimation_animationBuilder_Keyframe.ReanimatedKeyframe;
294
- exiting?: react_native_reanimated.BaseAnimationBuilder | typeof react_native_reanimated.BaseAnimationBuilder | react_native_reanimated.EntryExitAnimationFunction | react_native_reanimated_lib_typescript_layoutReanimation_animationBuilder_Keyframe.ReanimatedKeyframe;
295
- } & {
296
- sharedTransitionTag?: string;
297
- sharedTransitionStyle?: react_native_reanimated.SharedTransition;
298
- }> | undefined;
299
- } & {
131
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode)> | (<ItemT_1>(props: _legendapp_list_reanimated.AnimatedLegendListProps<ItemT_1> & {
300
132
  ref?: React.Ref<LegendListRef>;
301
- }) => React.ReactElement | null) = <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews"> & {
133
+ }) => React.ReactElement | null) = <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
302
134
  alignItemsAtEnd?: boolean;
303
135
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
304
136
  data: readonly T[];
305
137
  drawDistance?: number;
306
138
  estimatedItemSize?: number;
139
+ estimatedListSize?: {
140
+ height: number;
141
+ width: number;
142
+ };
307
143
  extraData?: any;
308
144
  getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
309
145
  initialContainerPoolRatio?: number | undefined;
310
146
  initialScrollOffset?: number;
311
- initialScrollIndex?: number;
147
+ initialScrollIndex?: number | {
148
+ index: number;
149
+ viewOffset?: number | undefined;
150
+ viewPosition?: number | undefined;
151
+ };
312
152
  ItemSeparatorComponent?: React.ComponentType<{
313
153
  leadingItem: T;
314
154
  }> | undefined;
@@ -352,17 +192,25 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
352
192
  onLoad?: (info: {
353
193
  elapsedTimeInMs: number;
354
194
  }) => void;
355
- } & React.RefAttributes<LegendListRef>) => React.ReactNode>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews"> & {
195
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
356
196
  alignItemsAtEnd?: boolean;
357
197
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
358
198
  data: readonly ItemT[];
359
199
  drawDistance?: number;
360
200
  estimatedItemSize?: number;
201
+ estimatedListSize?: {
202
+ height: number;
203
+ width: number;
204
+ };
361
205
  extraData?: any;
362
206
  getEstimatedItemSize?: ((index: number, item: ItemT) => number) | undefined;
363
207
  initialContainerPoolRatio?: number | undefined;
364
208
  initialScrollOffset?: number;
365
- initialScrollIndex?: number;
209
+ initialScrollIndex?: number | {
210
+ index: number;
211
+ viewOffset?: number | undefined;
212
+ viewPosition?: number | undefined;
213
+ };
366
214
  ItemSeparatorComponent?: React.ComponentType<{
367
215
  leadingItem: ItemT;
368
216
  }> | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legendapp/list",
3
- "version": "1.0.19",
3
+ "version": "1.1.0",
4
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,
package/reanimated.d.mts CHANGED
@@ -1,15 +1,15 @@
1
1
  import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
2
2
  import React__default, { ComponentProps } from 'react';
3
- import react_native_reanimated__default from 'react-native-reanimated';
3
+ import Animated from 'react-native-reanimated';
4
4
 
5
5
  type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "ItemSeparatorComponent";
6
- type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof react_native_reanimated__default.ScrollView>>;
6
+ type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
7
7
  interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
8
- refScrollView?: React__default.Ref<react_native_reanimated__default.ScrollView>;
8
+ refScrollView?: React__default.Ref<Animated.ScrollView>;
9
9
  }
10
10
  type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
11
- type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT>;
12
- type AnimatedLegendListDefinition = <ItemT>(props: Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT> & {
11
+ type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList" | "ref"> & OtherAnimatedLegendListProps<ItemT>;
12
+ type AnimatedLegendListDefinition = <ItemT>(props: AnimatedLegendListProps<ItemT> & {
13
13
  ref?: React__default.Ref<LegendListRef>;
14
14
  }) => React__default.ReactElement | null;
15
15
  declare const AnimatedLegendList: AnimatedLegendListDefinition;
package/reanimated.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
2
2
  import React__default, { ComponentProps } from 'react';
3
- import react_native_reanimated__default from 'react-native-reanimated';
3
+ import Animated from 'react-native-reanimated';
4
4
 
5
5
  type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "ItemSeparatorComponent";
6
- type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof react_native_reanimated__default.ScrollView>>;
6
+ type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
7
7
  interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
8
- refScrollView?: React__default.Ref<react_native_reanimated__default.ScrollView>;
8
+ refScrollView?: React__default.Ref<Animated.ScrollView>;
9
9
  }
10
10
  type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
11
- type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT>;
12
- type AnimatedLegendListDefinition = <ItemT>(props: Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT> & {
11
+ type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList" | "ref"> & OtherAnimatedLegendListProps<ItemT>;
12
+ type AnimatedLegendListDefinition = <ItemT>(props: AnimatedLegendListProps<ItemT> & {
13
13
  ref?: React__default.Ref<LegendListRef>;
14
14
  }) => React__default.ReactElement | null;
15
15
  declare const AnimatedLegendList: AnimatedLegendListDefinition;