@legendapp/list 1.0.0-beta.45 → 1.0.0-beta.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.mts CHANGED
@@ -108,8 +108,8 @@ type LegendListPropsBase<ItemT, TScrollView extends ComponentProps<typeof Scroll
108
108
  */
109
109
  maintainScrollAtEnd?: boolean;
110
110
  /**
111
- * Distance threshold in pixels to trigger maintainScrollAtEnd.
112
- * @default 100
111
+ * Distance threshold in percentage of screen size to trigger maintainScrollAtEnd.
112
+ * @default 0.1
113
113
  */
114
114
  maintainScrollAtEndThreshold?: number;
115
115
  /**
package/index.d.ts CHANGED
@@ -108,8 +108,8 @@ type LegendListPropsBase<ItemT, TScrollView extends ComponentProps<typeof Scroll
108
108
  */
109
109
  maintainScrollAtEnd?: boolean;
110
110
  /**
111
- * Distance threshold in pixels to trigger maintainScrollAtEnd.
112
- * @default 100
111
+ * Distance threshold in percentage of screen size to trigger maintainScrollAtEnd.
112
+ * @default 0.1
113
113
  */
114
114
  maintainScrollAtEndThreshold?: number;
115
115
  /**
@@ -1,15 +1,137 @@
1
- import * as _legendapp_list from '@legendapp/list';
2
- import { LegendListRef } from '@legendapp/list';
3
1
  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
2
  import * as react_native_reanimated from 'react-native-reanimated';
6
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';
7
8
  import * as React from 'react';
8
9
 
9
- declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendapp_list_reanimated.AnimatedLegendListPropsBase<ItemT_1>, "refLegendList"> & {
10
+ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<react_native.ScrollViewProps, "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
+ viewabilityConfig?: _legendapp_list.ViewabilityConfig;
58
+ viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
59
+ waitForInitialLayout?: boolean;
60
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<react_native.ScrollViewProps, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices"> & {
61
+ alignItemsAtEnd?: boolean;
62
+ columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
63
+ data: readonly T[];
64
+ drawDistance?: number;
65
+ estimatedItemSize?: number;
66
+ extraData?: any;
67
+ getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
68
+ initialContainerPoolRatio?: number | undefined;
69
+ initialScrollOffset?: number;
70
+ initialScrollIndex?: number;
71
+ ItemSeparatorComponent?: React.ComponentType<{
72
+ leadingItem: T;
73
+ }> | undefined;
74
+ keyExtractor?: ((item: T, index: number) => string) | undefined;
75
+ ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
76
+ ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
77
+ ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
78
+ ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
79
+ ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
80
+ maintainScrollAtEnd?: boolean;
81
+ maintainScrollAtEndThreshold?: number;
82
+ maintainVisibleContentPosition?: boolean;
83
+ numColumns?: number;
84
+ onEndReached?: ((info: {
85
+ distanceFromEnd: number;
86
+ }) => void) | null | undefined;
87
+ onEndReachedThreshold?: number | null | undefined;
88
+ onItemSizeChanged?: ((info: {
89
+ size: number;
90
+ previous: number;
91
+ index: number;
92
+ itemKey: string;
93
+ itemData: T;
94
+ }) => void) | undefined;
95
+ onRefresh?: () => void;
96
+ onStartReached?: ((info: {
97
+ distanceFromStart: number;
98
+ }) => void) | null | undefined;
99
+ onStartReachedThreshold?: number | null | undefined;
100
+ onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
101
+ progressViewOffset?: number;
102
+ recycleItems?: boolean;
103
+ refScrollView?: React.Ref<react_native.ScrollView>;
104
+ refreshing?: boolean;
105
+ renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | undefined;
106
+ renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
107
+ viewabilityConfig?: _legendapp_list.ViewabilityConfig;
108
+ viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
109
+ waitForInitialLayout?: boolean;
110
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode)> | (<ItemT_1>(props: Omit<_legendapp_list_reanimated.AnimatedLegendListPropsBase<ItemT_1>, "refLegendList"> & {
10
111
  getEstimatedItemSize?: ((index: number, item: ItemT_1) => number) | undefined;
112
+ ItemSeparatorComponent?: React.ComponentType<{
113
+ leadingItem: ItemT_1;
114
+ }> | undefined;
11
115
  keyExtractor?: ((item: ItemT_1, index: number) => string) | undefined;
116
+ onItemSizeChanged?: ((info: {
117
+ size: number;
118
+ previous: number;
119
+ index: number;
120
+ itemKey: string;
121
+ itemData: ItemT_1;
122
+ }) => void) | undefined;
123
+ renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<ItemT_1>) => React.ReactNode) | undefined;
12
124
  animatedProps?: Partial<{
125
+ contentOffset?: react_native.PointProp | react_native_reanimated.SharedValue<react_native.PointProp | undefined> | undefined;
126
+ contentInset?: Insets | react_native_reanimated.SharedValue<Insets | undefined> | undefined;
127
+ maintainVisibleContentPosition?: {
128
+ autoscrollToTopThreshold?: number | null | undefined;
129
+ minIndexForVisible: number;
130
+ } | react_native_reanimated.SharedValue<{
131
+ autoscrollToTopThreshold?: number | null | undefined;
132
+ minIndexForVisible: number;
133
+ } | null | undefined> | null | undefined;
134
+ stickyHeaderIndices?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
13
135
  decelerationRate?: number | "fast" | "normal" | react_native_reanimated.SharedValue<number | "fast" | "normal" | undefined> | undefined;
14
136
  horizontal?: boolean | react_native_reanimated.SharedValue<boolean | null | undefined> | null | undefined;
15
137
  invertStickyHeaders?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
@@ -32,12 +154,11 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
32
154
  snapToOffsets?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
33
155
  snapToStart?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
34
156
  snapToEnd?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
35
- stickyHeaderIndices?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
36
157
  disableIntervalMomentum?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
37
158
  disableScrollViewPanResponder?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
38
159
  StickyHeaderComponent?: React.ComponentType<any> | react_native_reanimated.SharedValue<React.ComponentType<any> | undefined> | undefined;
39
160
  children?: React.ReactNode | react_native_reanimated.SharedValue<React.ReactNode>;
40
- hitSlop?: number | react_native.Insets | react_native_reanimated.SharedValue<number | react_native.Insets | null | undefined> | null | undefined;
161
+ hitSlop?: number | Insets | react_native_reanimated.SharedValue<number | Insets | null | undefined> | null | undefined;
41
162
  id?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
42
163
  needsOffscreenAlphaCompositing?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
43
164
  onLayout?: ((event: react_native.LayoutChangeEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.LayoutChangeEvent) => void) | undefined> | undefined;
@@ -136,26 +257,17 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
136
257
  bouncesZoom?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
137
258
  canCancelContentTouches?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
138
259
  centerContent?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
139
- contentInset?: react_native.Insets | react_native_reanimated.SharedValue<react_native.Insets | undefined> | undefined;
140
- contentOffset?: react_native.PointProp | react_native_reanimated.SharedValue<react_native.PointProp | undefined> | undefined;
141
260
  contentInsetAdjustmentBehavior?: "always" | "never" | "automatic" | "scrollableAxes" | react_native_reanimated.SharedValue<"always" | "never" | "automatic" | "scrollableAxes" | undefined> | undefined;
142
261
  directionalLockEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
143
- maintainVisibleContentPosition?: {
144
- autoscrollToTopThreshold?: number | null | undefined;
145
- minIndexForVisible: number;
146
- } | react_native_reanimated.SharedValue<{
147
- autoscrollToTopThreshold?: number | null | undefined;
148
- minIndexForVisible: number;
149
- } | null | undefined> | null | undefined;
150
262
  maximumZoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
151
263
  minimumZoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
152
264
  onScrollAnimationEnd?: (() => void) | react_native_reanimated.SharedValue<(() => void) | undefined> | undefined;
153
265
  pinchGestureEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
154
266
  scrollEventThrottle?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
155
- scrollIndicatorInsets?: react_native.Insets | react_native_reanimated.SharedValue<react_native.Insets | undefined> | undefined;
267
+ scrollIndicatorInsets?: Insets | react_native_reanimated.SharedValue<Insets | undefined> | undefined;
156
268
  scrollToOverflowEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
157
269
  scrollsToTop?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
158
- snapToAlignment?: "center" | "start" | "end" | react_native_reanimated.SharedValue<"center" | "start" | "end" | undefined> | undefined;
270
+ snapToAlignment?: "end" | "start" | "center" | react_native_reanimated.SharedValue<"end" | "start" | "center" | undefined> | undefined;
159
271
  onScrollToTop?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
160
272
  zoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
161
273
  endFillColor?: react_native.ColorValue | react_native_reanimated.SharedValue<react_native.ColorValue | undefined> | undefined;
@@ -165,8 +277,8 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
165
277
  fadingEdgeLength?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
166
278
  persistentScrollbar?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
167
279
  } & {
168
- style?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<react_native.StyleProp<react_native.ViewStyle>>>;
169
280
  contentContainerStyle?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<react_native.StyleProp<react_native.ViewStyle>>>;
281
+ style?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<react_native.StyleProp<react_native.ViewStyle>>>;
170
282
  indicatorStyle?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<"default" | "black" | "white" | undefined>>;
171
283
  } & {
172
284
  layout?: react_native_reanimated.BaseAnimationBuilder | react_native_reanimated.LayoutAnimationFunction | typeof react_native_reanimated.BaseAnimationBuilder;
@@ -176,120 +288,9 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
176
288
  sharedTransitionTag?: string;
177
289
  sharedTransitionStyle?: react_native_reanimated.SharedTransition;
178
290
  }> | undefined;
179
- renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<ItemT_1>) => React.ReactNode) | undefined;
180
- onItemSizeChanged?: ((info: {
181
- size: number;
182
- previous: number;
183
- index: number;
184
- itemKey: string;
185
- itemData: ItemT_1;
186
- }) => void) | undefined;
187
- ItemSeparatorComponent?: React.ComponentType<{
188
- leadingItem: ItemT_1;
189
- }> | undefined;
190
291
  } & {
191
292
  ref?: React.Ref<LegendListRef>;
192
- }) => React.ReactElement | null) | (<T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
193
- alignItemsAtEnd?: boolean;
194
- columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
195
- data: readonly T[];
196
- drawDistance?: number;
197
- estimatedItemSize?: number;
198
- extraData?: any;
199
- getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
200
- initialContainerPoolRatio?: number | undefined;
201
- initialScrollOffset?: number;
202
- initialScrollIndex?: number;
203
- ItemSeparatorComponent?: React.ComponentType<{
204
- leadingItem: T;
205
- }> | undefined;
206
- keyExtractor?: ((item: T, index: number) => string) | undefined;
207
- ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
208
- ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
209
- ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
210
- ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
211
- ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
212
- maintainScrollAtEnd?: boolean;
213
- maintainScrollAtEndThreshold?: number;
214
- maintainVisibleContentPosition?: boolean;
215
- numColumns?: number;
216
- onEndReached?: ((info: {
217
- distanceFromEnd: number;
218
- }) => void) | null | undefined;
219
- onEndReachedThreshold?: number | null | undefined;
220
- onItemSizeChanged?: ((info: {
221
- size: number;
222
- previous: number;
223
- index: number;
224
- itemKey: string;
225
- itemData: T;
226
- }) => void) | undefined;
227
- onRefresh?: () => void;
228
- onStartReached?: ((info: {
229
- distanceFromStart: number;
230
- }) => void) | null | undefined;
231
- onStartReachedThreshold?: number | null | undefined;
232
- onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
233
- progressViewOffset?: number;
234
- recycleItems?: boolean;
235
- refScrollView?: React.Ref<react_native.ScrollView>;
236
- refreshing?: boolean;
237
- renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | undefined;
238
- renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
239
- viewabilityConfig?: _legendapp_list.ViewabilityConfig;
240
- viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
241
- waitForInitialLayout?: boolean;
242
- } & React.RefAttributes<LegendListRef>) => React.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
243
- alignItemsAtEnd?: boolean;
244
- columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
245
- data: readonly T[];
246
- drawDistance?: number;
247
- estimatedItemSize?: number;
248
- extraData?: any;
249
- getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
250
- initialContainerPoolRatio?: number | undefined;
251
- initialScrollOffset?: number;
252
- initialScrollIndex?: number;
253
- ItemSeparatorComponent?: React.ComponentType<{
254
- leadingItem: T;
255
- }> | undefined;
256
- keyExtractor?: ((item: T, index: number) => string) | undefined;
257
- ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
258
- ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
259
- ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
260
- ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
261
- ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
262
- maintainScrollAtEnd?: boolean;
263
- maintainScrollAtEndThreshold?: number;
264
- maintainVisibleContentPosition?: boolean;
265
- numColumns?: number;
266
- onEndReached?: ((info: {
267
- distanceFromEnd: number;
268
- }) => void) | null | undefined;
269
- onEndReachedThreshold?: number | null | undefined;
270
- onItemSizeChanged?: ((info: {
271
- size: number;
272
- previous: number;
273
- index: number;
274
- itemKey: string;
275
- itemData: T;
276
- }) => void) | undefined;
277
- onRefresh?: () => void;
278
- onStartReached?: ((info: {
279
- distanceFromStart: number;
280
- }) => void) | null | undefined;
281
- onStartReachedThreshold?: number | null | undefined;
282
- onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
283
- progressViewOffset?: number;
284
- recycleItems?: boolean;
285
- refScrollView?: React.Ref<react_native.ScrollView>;
286
- refreshing?: boolean;
287
- renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | undefined;
288
- renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
289
- viewabilityConfig?: _legendapp_list.ViewabilityConfig;
290
- viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
291
- waitForInitialLayout?: boolean;
292
- } & React.RefAttributes<LegendListRef>) => React.ReactNode)> = <T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
293
+ }) => React.ReactElement | null) = <T>(props: Omit<react_native.ScrollViewProps, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices"> & {
293
294
  alignItemsAtEnd?: boolean;
294
295
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
295
296
  data: readonly T[];
@@ -339,7 +340,7 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
339
340
  viewabilityConfig?: _legendapp_list.ViewabilityConfig;
340
341
  viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
341
342
  waitForInitialLayout?: boolean;
342
- } & React.RefAttributes<LegendListRef>) => React.ReactNode>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
343
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode>(props: Omit<react_native.ScrollViewProps, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices"> & {
343
344
  alignItemsAtEnd?: boolean;
344
345
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
345
346
  data: readonly ItemT[];
@@ -1,15 +1,137 @@
1
- import * as _legendapp_list from '@legendapp/list';
2
- import { LegendListRef } from '@legendapp/list';
3
1
  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
2
  import * as react_native_reanimated from 'react-native-reanimated';
6
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';
7
8
  import * as React from 'react';
8
9
 
9
- declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendapp_list_reanimated.AnimatedLegendListPropsBase<ItemT_1>, "refLegendList"> & {
10
+ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<react_native.ScrollViewProps, "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
+ viewabilityConfig?: _legendapp_list.ViewabilityConfig;
58
+ viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
59
+ waitForInitialLayout?: boolean;
60
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<react_native.ScrollViewProps, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices"> & {
61
+ alignItemsAtEnd?: boolean;
62
+ columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
63
+ data: readonly T[];
64
+ drawDistance?: number;
65
+ estimatedItemSize?: number;
66
+ extraData?: any;
67
+ getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
68
+ initialContainerPoolRatio?: number | undefined;
69
+ initialScrollOffset?: number;
70
+ initialScrollIndex?: number;
71
+ ItemSeparatorComponent?: React.ComponentType<{
72
+ leadingItem: T;
73
+ }> | undefined;
74
+ keyExtractor?: ((item: T, index: number) => string) | undefined;
75
+ ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
76
+ ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
77
+ ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
78
+ ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
79
+ ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
80
+ maintainScrollAtEnd?: boolean;
81
+ maintainScrollAtEndThreshold?: number;
82
+ maintainVisibleContentPosition?: boolean;
83
+ numColumns?: number;
84
+ onEndReached?: ((info: {
85
+ distanceFromEnd: number;
86
+ }) => void) | null | undefined;
87
+ onEndReachedThreshold?: number | null | undefined;
88
+ onItemSizeChanged?: ((info: {
89
+ size: number;
90
+ previous: number;
91
+ index: number;
92
+ itemKey: string;
93
+ itemData: T;
94
+ }) => void) | undefined;
95
+ onRefresh?: () => void;
96
+ onStartReached?: ((info: {
97
+ distanceFromStart: number;
98
+ }) => void) | null | undefined;
99
+ onStartReachedThreshold?: number | null | undefined;
100
+ onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
101
+ progressViewOffset?: number;
102
+ recycleItems?: boolean;
103
+ refScrollView?: React.Ref<react_native.ScrollView>;
104
+ refreshing?: boolean;
105
+ renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | undefined;
106
+ renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
107
+ viewabilityConfig?: _legendapp_list.ViewabilityConfig;
108
+ viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
109
+ waitForInitialLayout?: boolean;
110
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode)> | (<ItemT_1>(props: Omit<_legendapp_list_reanimated.AnimatedLegendListPropsBase<ItemT_1>, "refLegendList"> & {
10
111
  getEstimatedItemSize?: ((index: number, item: ItemT_1) => number) | undefined;
112
+ ItemSeparatorComponent?: React.ComponentType<{
113
+ leadingItem: ItemT_1;
114
+ }> | undefined;
11
115
  keyExtractor?: ((item: ItemT_1, index: number) => string) | undefined;
116
+ onItemSizeChanged?: ((info: {
117
+ size: number;
118
+ previous: number;
119
+ index: number;
120
+ itemKey: string;
121
+ itemData: ItemT_1;
122
+ }) => void) | undefined;
123
+ renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<ItemT_1>) => React.ReactNode) | undefined;
12
124
  animatedProps?: Partial<{
125
+ contentOffset?: react_native.PointProp | react_native_reanimated.SharedValue<react_native.PointProp | undefined> | undefined;
126
+ contentInset?: Insets | react_native_reanimated.SharedValue<Insets | undefined> | undefined;
127
+ maintainVisibleContentPosition?: {
128
+ autoscrollToTopThreshold?: number | null | undefined;
129
+ minIndexForVisible: number;
130
+ } | react_native_reanimated.SharedValue<{
131
+ autoscrollToTopThreshold?: number | null | undefined;
132
+ minIndexForVisible: number;
133
+ } | null | undefined> | null | undefined;
134
+ stickyHeaderIndices?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
13
135
  decelerationRate?: number | "fast" | "normal" | react_native_reanimated.SharedValue<number | "fast" | "normal" | undefined> | undefined;
14
136
  horizontal?: boolean | react_native_reanimated.SharedValue<boolean | null | undefined> | null | undefined;
15
137
  invertStickyHeaders?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
@@ -32,12 +154,11 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
32
154
  snapToOffsets?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
33
155
  snapToStart?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
34
156
  snapToEnd?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
35
- stickyHeaderIndices?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
36
157
  disableIntervalMomentum?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
37
158
  disableScrollViewPanResponder?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
38
159
  StickyHeaderComponent?: React.ComponentType<any> | react_native_reanimated.SharedValue<React.ComponentType<any> | undefined> | undefined;
39
160
  children?: React.ReactNode | react_native_reanimated.SharedValue<React.ReactNode>;
40
- hitSlop?: number | react_native.Insets | react_native_reanimated.SharedValue<number | react_native.Insets | null | undefined> | null | undefined;
161
+ hitSlop?: number | Insets | react_native_reanimated.SharedValue<number | Insets | null | undefined> | null | undefined;
41
162
  id?: string | react_native_reanimated.SharedValue<string | undefined> | undefined;
42
163
  needsOffscreenAlphaCompositing?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
43
164
  onLayout?: ((event: react_native.LayoutChangeEvent) => void) | react_native_reanimated.SharedValue<((event: react_native.LayoutChangeEvent) => void) | undefined> | undefined;
@@ -136,26 +257,17 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
136
257
  bouncesZoom?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
137
258
  canCancelContentTouches?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
138
259
  centerContent?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
139
- contentInset?: react_native.Insets | react_native_reanimated.SharedValue<react_native.Insets | undefined> | undefined;
140
- contentOffset?: react_native.PointProp | react_native_reanimated.SharedValue<react_native.PointProp | undefined> | undefined;
141
260
  contentInsetAdjustmentBehavior?: "always" | "never" | "automatic" | "scrollableAxes" | react_native_reanimated.SharedValue<"always" | "never" | "automatic" | "scrollableAxes" | undefined> | undefined;
142
261
  directionalLockEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
143
- maintainVisibleContentPosition?: {
144
- autoscrollToTopThreshold?: number | null | undefined;
145
- minIndexForVisible: number;
146
- } | react_native_reanimated.SharedValue<{
147
- autoscrollToTopThreshold?: number | null | undefined;
148
- minIndexForVisible: number;
149
- } | null | undefined> | null | undefined;
150
262
  maximumZoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
151
263
  minimumZoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
152
264
  onScrollAnimationEnd?: (() => void) | react_native_reanimated.SharedValue<(() => void) | undefined> | undefined;
153
265
  pinchGestureEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
154
266
  scrollEventThrottle?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
155
- scrollIndicatorInsets?: react_native.Insets | react_native_reanimated.SharedValue<react_native.Insets | undefined> | undefined;
267
+ scrollIndicatorInsets?: Insets | react_native_reanimated.SharedValue<Insets | undefined> | undefined;
156
268
  scrollToOverflowEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
157
269
  scrollsToTop?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
158
- snapToAlignment?: "center" | "start" | "end" | react_native_reanimated.SharedValue<"center" | "start" | "end" | undefined> | undefined;
270
+ snapToAlignment?: "end" | "start" | "center" | react_native_reanimated.SharedValue<"end" | "start" | "center" | undefined> | undefined;
159
271
  onScrollToTop?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
160
272
  zoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
161
273
  endFillColor?: react_native.ColorValue | react_native_reanimated.SharedValue<react_native.ColorValue | undefined> | undefined;
@@ -165,8 +277,8 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
165
277
  fadingEdgeLength?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
166
278
  persistentScrollbar?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
167
279
  } & {
168
- style?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<react_native.StyleProp<react_native.ViewStyle>>>;
169
280
  contentContainerStyle?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<react_native.StyleProp<react_native.ViewStyle>>>;
281
+ style?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<react_native.StyleProp<react_native.ViewStyle>>>;
170
282
  indicatorStyle?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<"default" | "black" | "white" | undefined>>;
171
283
  } & {
172
284
  layout?: react_native_reanimated.BaseAnimationBuilder | react_native_reanimated.LayoutAnimationFunction | typeof react_native_reanimated.BaseAnimationBuilder;
@@ -176,120 +288,9 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
176
288
  sharedTransitionTag?: string;
177
289
  sharedTransitionStyle?: react_native_reanimated.SharedTransition;
178
290
  }> | undefined;
179
- renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<ItemT_1>) => React.ReactNode) | undefined;
180
- onItemSizeChanged?: ((info: {
181
- size: number;
182
- previous: number;
183
- index: number;
184
- itemKey: string;
185
- itemData: ItemT_1;
186
- }) => void) | undefined;
187
- ItemSeparatorComponent?: React.ComponentType<{
188
- leadingItem: ItemT_1;
189
- }> | undefined;
190
291
  } & {
191
292
  ref?: React.Ref<LegendListRef>;
192
- }) => React.ReactElement | null) | (<T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
193
- alignItemsAtEnd?: boolean;
194
- columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
195
- data: readonly T[];
196
- drawDistance?: number;
197
- estimatedItemSize?: number;
198
- extraData?: any;
199
- getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
200
- initialContainerPoolRatio?: number | undefined;
201
- initialScrollOffset?: number;
202
- initialScrollIndex?: number;
203
- ItemSeparatorComponent?: React.ComponentType<{
204
- leadingItem: T;
205
- }> | undefined;
206
- keyExtractor?: ((item: T, index: number) => string) | undefined;
207
- ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
208
- ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
209
- ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
210
- ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
211
- ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
212
- maintainScrollAtEnd?: boolean;
213
- maintainScrollAtEndThreshold?: number;
214
- maintainVisibleContentPosition?: boolean;
215
- numColumns?: number;
216
- onEndReached?: ((info: {
217
- distanceFromEnd: number;
218
- }) => void) | null | undefined;
219
- onEndReachedThreshold?: number | null | undefined;
220
- onItemSizeChanged?: ((info: {
221
- size: number;
222
- previous: number;
223
- index: number;
224
- itemKey: string;
225
- itemData: T;
226
- }) => void) | undefined;
227
- onRefresh?: () => void;
228
- onStartReached?: ((info: {
229
- distanceFromStart: number;
230
- }) => void) | null | undefined;
231
- onStartReachedThreshold?: number | null | undefined;
232
- onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
233
- progressViewOffset?: number;
234
- recycleItems?: boolean;
235
- refScrollView?: React.Ref<react_native.ScrollView>;
236
- refreshing?: boolean;
237
- renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | undefined;
238
- renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
239
- viewabilityConfig?: _legendapp_list.ViewabilityConfig;
240
- viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
241
- waitForInitialLayout?: boolean;
242
- } & React.RefAttributes<LegendListRef>) => React.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
243
- alignItemsAtEnd?: boolean;
244
- columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
245
- data: readonly T[];
246
- drawDistance?: number;
247
- estimatedItemSize?: number;
248
- extraData?: any;
249
- getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
250
- initialContainerPoolRatio?: number | undefined;
251
- initialScrollOffset?: number;
252
- initialScrollIndex?: number;
253
- ItemSeparatorComponent?: React.ComponentType<{
254
- leadingItem: T;
255
- }> | undefined;
256
- keyExtractor?: ((item: T, index: number) => string) | undefined;
257
- ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
258
- ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
259
- ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
260
- ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
261
- ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
262
- maintainScrollAtEnd?: boolean;
263
- maintainScrollAtEndThreshold?: number;
264
- maintainVisibleContentPosition?: boolean;
265
- numColumns?: number;
266
- onEndReached?: ((info: {
267
- distanceFromEnd: number;
268
- }) => void) | null | undefined;
269
- onEndReachedThreshold?: number | null | undefined;
270
- onItemSizeChanged?: ((info: {
271
- size: number;
272
- previous: number;
273
- index: number;
274
- itemKey: string;
275
- itemData: T;
276
- }) => void) | undefined;
277
- onRefresh?: () => void;
278
- onStartReached?: ((info: {
279
- distanceFromStart: number;
280
- }) => void) | null | undefined;
281
- onStartReachedThreshold?: number | null | undefined;
282
- onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
283
- progressViewOffset?: number;
284
- recycleItems?: boolean;
285
- refScrollView?: React.Ref<react_native.ScrollView>;
286
- refreshing?: boolean;
287
- renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | undefined;
288
- renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
289
- viewabilityConfig?: _legendapp_list.ViewabilityConfig;
290
- viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
291
- waitForInitialLayout?: boolean;
292
- } & React.RefAttributes<LegendListRef>) => React.ReactNode)> = <T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
293
+ }) => React.ReactElement | null) = <T>(props: Omit<react_native.ScrollViewProps, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices"> & {
293
294
  alignItemsAtEnd?: boolean;
294
295
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
295
296
  data: readonly T[];
@@ -339,7 +340,7 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
339
340
  viewabilityConfig?: _legendapp_list.ViewabilityConfig;
340
341
  viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
341
342
  waitForInitialLayout?: boolean;
342
- } & React.RefAttributes<LegendListRef>) => React.ReactNode>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
343
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode>(props: Omit<react_native.ScrollViewProps, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices"> & {
343
344
  alignItemsAtEnd?: boolean;
344
345
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
345
346
  data: readonly ItemT[];
@@ -29,7 +29,12 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
29
29
  // src/keyboard-controller.tsx
30
30
  var typedForwardRef = React.forwardRef;
31
31
  var LegendList = typedForwardRef(function LegendList2(props, forwardedRef) {
32
- const { LegendList: LegendListProp, style: styleProp, ...rest } = props;
32
+ const {
33
+ LegendList: LegendListProp,
34
+ style: styleProp,
35
+ scrollIndicatorInsets: scrollIndicatorInsetsProp,
36
+ ...rest
37
+ } = props;
33
38
  const [padding, setPadding] = React.useState(0);
34
39
  const updatePadding = (height) => {
35
40
  setPadding(height);
@@ -43,7 +48,14 @@ var LegendList = typedForwardRef(function LegendList2(props, forwardedRef) {
43
48
  const LegendListComponent = LegendListProp != null ? LegendListProp : list.LegendList;
44
49
  const styleFlattened = reactNative.StyleSheet.flatten(styleProp) || {};
45
50
  const style = { ...styleFlattened, paddingTop: padding + (styleFlattened.paddingTop || 0) };
46
- return /* @__PURE__ */ React__namespace.createElement(LegendListComponent, { ...rest, style, ref: forwardedRef });
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
+ );
47
59
  });
48
60
 
49
61
  exports.LegendList = LegendList;
@@ -8,7 +8,12 @@ import { runOnJS } from 'react-native-reanimated';
8
8
  // src/keyboard-controller.tsx
9
9
  var typedForwardRef = forwardRef;
10
10
  var LegendList = typedForwardRef(function LegendList2(props, forwardedRef) {
11
- const { LegendList: LegendListProp, style: styleProp, ...rest } = props;
11
+ const {
12
+ LegendList: LegendListProp,
13
+ style: styleProp,
14
+ scrollIndicatorInsets: scrollIndicatorInsetsProp,
15
+ ...rest
16
+ } = props;
12
17
  const [padding, setPadding] = useState(0);
13
18
  const updatePadding = (height) => {
14
19
  setPadding(height);
@@ -22,7 +27,14 @@ var LegendList = typedForwardRef(function LegendList2(props, forwardedRef) {
22
27
  const LegendListComponent = LegendListProp != null ? LegendListProp : LegendList$1;
23
28
  const styleFlattened = StyleSheet.flatten(styleProp) || {};
24
29
  const style = { ...styleFlattened, paddingTop: padding + (styleFlattened.paddingTop || 0) };
25
- return /* @__PURE__ */ React.createElement(LegendListComponent, { ...rest, style, ref: forwardedRef });
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
+ );
26
38
  });
27
39
 
28
40
  export { LegendList };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legendapp/list",
3
- "version": "1.0.0-beta.45",
3
+ "version": "1.0.0-beta.46",
4
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,