@legendapp/list 1.0.0-beta.47 → 1.0.0-beta.49

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
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import { ComponentProps, ReactNode } from 'react';
2
+ import { ComponentProps, ReactNode, Dispatch, SetStateAction } from 'react';
3
3
  import * as react_native from 'react-native';
4
4
  import { ScrollView, StyleProp, ViewStyle, ScrollViewProps, NativeSyntheticEvent, NativeScrollEvent, ScrollViewComponent, ScrollResponderMixin } from 'react-native';
5
5
  import react_native_reanimated__default from 'react-native-reanimated';
@@ -508,6 +508,6 @@ declare const LegendList: <T>(props: Omit<react_native.ScrollViewProps, "content
508
508
  declare function useViewability(callback: ViewabilityCallback, configId?: string): void;
509
509
  declare function useViewabilityAmount(callback: ViewabilityAmountCallback): void;
510
510
  declare function useRecyclingEffect(effect: (info: LegendListRecyclingState<unknown>) => void | (() => void)): void;
511
- declare function useRecyclingState(valueOrFun: ((info: LegendListRecyclingState<unknown>) => any) | any): any[];
511
+ declare function useRecyclingState<ItemT>(valueOrFun: ((info: LegendListRecyclingState<ItemT>) => ItemT) | ItemT): (ItemT | Dispatch<SetStateAction<ItemT>> | null)[];
512
512
 
513
513
  export { type AnchoredPosition, type ColumnWrapperStyle, type InternalState, LegendList, type LegendListProps, type LegendListPropsBase, type LegendListRecyclingState, type LegendListRef, type LegendListRenderItemProps, type OnViewableItemsChanged, type ScrollState, type TypedForwardRef, type TypedMemo, type ViewAmountToken, type ViewToken, type ViewabilityAmountCallback, type ViewabilityCallback, type ViewabilityConfig, type ViewabilityConfigCallbackPair, type ViewabilityConfigCallbackPairs, type ViewableRange, typedForwardRef, typedMemo, useRecyclingEffect, useRecyclingState, useViewability, useViewabilityAmount };
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import { ComponentProps, ReactNode } from 'react';
2
+ import { ComponentProps, ReactNode, Dispatch, SetStateAction } from 'react';
3
3
  import * as react_native from 'react-native';
4
4
  import { ScrollView, StyleProp, ViewStyle, ScrollViewProps, NativeSyntheticEvent, NativeScrollEvent, ScrollViewComponent, ScrollResponderMixin } from 'react-native';
5
5
  import react_native_reanimated__default from 'react-native-reanimated';
@@ -508,6 +508,6 @@ declare const LegendList: <T>(props: Omit<react_native.ScrollViewProps, "content
508
508
  declare function useViewability(callback: ViewabilityCallback, configId?: string): void;
509
509
  declare function useViewabilityAmount(callback: ViewabilityAmountCallback): void;
510
510
  declare function useRecyclingEffect(effect: (info: LegendListRecyclingState<unknown>) => void | (() => void)): void;
511
- declare function useRecyclingState(valueOrFun: ((info: LegendListRecyclingState<unknown>) => any) | any): any[];
511
+ declare function useRecyclingState<ItemT>(valueOrFun: ((info: LegendListRecyclingState<ItemT>) => ItemT) | ItemT): (ItemT | Dispatch<SetStateAction<ItemT>> | null)[];
512
512
 
513
513
  export { type AnchoredPosition, type ColumnWrapperStyle, type InternalState, LegendList, type LegendListProps, type LegendListPropsBase, type LegendListRecyclingState, type LegendListRef, type LegendListRenderItemProps, type OnViewableItemsChanged, type ScrollState, type TypedForwardRef, type TypedMemo, type ViewAmountToken, type ViewToken, type ViewabilityAmountCallback, type ViewabilityCallback, type ViewabilityConfig, type ViewabilityConfigCallbackPair, type ViewabilityConfigCallbackPairs, type ViewableRange, typedForwardRef, typedMemo, useRecyclingEffect, useRecyclingState, useViewability, useViewabilityAmount };
package/index.js CHANGED
@@ -144,6 +144,11 @@ function useInterval(callback, delay) {
144
144
  return () => clearInterval(interval);
145
145
  }, [delay]);
146
146
  }
147
+
148
+ // src/helpers.ts
149
+ function isFunction(obj) {
150
+ return typeof obj === "function";
151
+ }
147
152
  var symbolFirst = Symbol();
148
153
  function useInit(cb) {
149
154
  const refValue = React6.useRef(symbolFirst);
@@ -214,27 +219,30 @@ function useRecyclingEffect(effect) {
214
219
  }, [index, value]);
215
220
  }
216
221
  function useRecyclingState(valueOrFun) {
217
- const { index, value, triggerLayout } = React6.useContext(ContextContainer);
218
- const [state, setState_] = React6.useState(
219
- () => typeof valueOrFun === "function" ? valueOrFun({
222
+ const { index, value, itemKey, triggerLayout } = React6.useContext(ContextContainer);
223
+ const refState = React6.useRef({
224
+ itemKey: null,
225
+ value: null
226
+ });
227
+ const [_, setRenderNum] = React6.useState(0);
228
+ if (refState.current.itemKey !== itemKey) {
229
+ refState.current.itemKey = itemKey;
230
+ refState.current.value = isFunction(valueOrFun) ? valueOrFun({
220
231
  index,
221
232
  item: value,
222
233
  prevIndex: void 0,
223
234
  prevItem: void 0
224
- }) : valueOrFun
225
- );
235
+ }) : valueOrFun;
236
+ }
226
237
  const setState = React6.useCallback(
227
238
  (newState) => {
228
- setState_(newState);
239
+ refState.current.value = isFunction(newState) ? newState(refState.current.value) : newState;
240
+ setRenderNum((v) => v + 1);
229
241
  triggerLayout();
230
242
  },
231
243
  [triggerLayout]
232
244
  );
233
- useRecyclingEffect((state2) => {
234
- const newState = typeof valueOrFun === "function" ? valueOrFun(state2) : valueOrFun;
235
- setState_(newState);
236
- });
237
- return [state, setState];
245
+ return [refState.current.value, setState];
238
246
  }
239
247
  var LeanViewComponent = React6__namespace.forwardRef((props, ref) => {
240
248
  return React6__namespace.createElement("RCTView", { ...props, ref });
@@ -251,9 +259,9 @@ var ANCHORED_POSITION_OUT_OF_VIEW = {
251
259
  };
252
260
  var ENABLE_DEVMODE = __DEV__ && false;
253
261
  var ENABLE_DEBUG_VIEW = __DEV__ && false;
262
+ var IsNewArchitecture = global.nativeFabricUIManager != null;
254
263
 
255
264
  // src/Container.tsx
256
- var isNewArchitecture = global.nativeFabricUIManager != null;
257
265
  var Container = ({
258
266
  id,
259
267
  recycleItems,
@@ -324,7 +332,7 @@ var Container = ({
324
332
  updateItemSize(itemKey, size);
325
333
  }
326
334
  };
327
- if (isNewArchitecture) {
335
+ if (IsNewArchitecture) {
328
336
  React6.useLayoutEffect(() => {
329
337
  var _a, _b;
330
338
  if (itemKey !== void 0) {
@@ -651,7 +659,7 @@ var useCombinedRef = (...refs) => {
651
659
  if (!ref) {
652
660
  continue;
653
661
  }
654
- if (typeof ref === "function") {
662
+ if (isFunction(ref)) {
655
663
  ref(element);
656
664
  } else {
657
665
  ref.current = element;
@@ -1975,7 +1983,7 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
1975
1983
  didCalculate = true;
1976
1984
  }
1977
1985
  }
1978
- if (!didCalculate) {
1986
+ if (!didCalculate && IsNewArchitecture) {
1979
1987
  fixGaps();
1980
1988
  }
1981
1989
  }
package/index.mjs CHANGED
@@ -123,6 +123,11 @@ function useInterval(callback, delay) {
123
123
  return () => clearInterval(interval);
124
124
  }, [delay]);
125
125
  }
126
+
127
+ // src/helpers.ts
128
+ function isFunction(obj) {
129
+ return typeof obj === "function";
130
+ }
126
131
  var symbolFirst = Symbol();
127
132
  function useInit(cb) {
128
133
  const refValue = useRef(symbolFirst);
@@ -193,27 +198,30 @@ function useRecyclingEffect(effect) {
193
198
  }, [index, value]);
194
199
  }
195
200
  function useRecyclingState(valueOrFun) {
196
- const { index, value, triggerLayout } = useContext(ContextContainer);
197
- const [state, setState_] = useState(
198
- () => typeof valueOrFun === "function" ? valueOrFun({
201
+ const { index, value, itemKey, triggerLayout } = useContext(ContextContainer);
202
+ const refState = useRef({
203
+ itemKey: null,
204
+ value: null
205
+ });
206
+ const [_, setRenderNum] = useState(0);
207
+ if (refState.current.itemKey !== itemKey) {
208
+ refState.current.itemKey = itemKey;
209
+ refState.current.value = isFunction(valueOrFun) ? valueOrFun({
199
210
  index,
200
211
  item: value,
201
212
  prevIndex: void 0,
202
213
  prevItem: void 0
203
- }) : valueOrFun
204
- );
214
+ }) : valueOrFun;
215
+ }
205
216
  const setState = useCallback(
206
217
  (newState) => {
207
- setState_(newState);
218
+ refState.current.value = isFunction(newState) ? newState(refState.current.value) : newState;
219
+ setRenderNum((v) => v + 1);
208
220
  triggerLayout();
209
221
  },
210
222
  [triggerLayout]
211
223
  );
212
- useRecyclingEffect((state2) => {
213
- const newState = typeof valueOrFun === "function" ? valueOrFun(state2) : valueOrFun;
214
- setState_(newState);
215
- });
216
- return [state, setState];
224
+ return [refState.current.value, setState];
217
225
  }
218
226
  var LeanViewComponent = React6.forwardRef((props, ref) => {
219
227
  return React6.createElement("RCTView", { ...props, ref });
@@ -230,9 +238,9 @@ var ANCHORED_POSITION_OUT_OF_VIEW = {
230
238
  };
231
239
  var ENABLE_DEVMODE = __DEV__ && false;
232
240
  var ENABLE_DEBUG_VIEW = __DEV__ && false;
241
+ var IsNewArchitecture = global.nativeFabricUIManager != null;
233
242
 
234
243
  // src/Container.tsx
235
- var isNewArchitecture = global.nativeFabricUIManager != null;
236
244
  var Container = ({
237
245
  id,
238
246
  recycleItems,
@@ -303,7 +311,7 @@ var Container = ({
303
311
  updateItemSize(itemKey, size);
304
312
  }
305
313
  };
306
- if (isNewArchitecture) {
314
+ if (IsNewArchitecture) {
307
315
  useLayoutEffect(() => {
308
316
  var _a, _b;
309
317
  if (itemKey !== void 0) {
@@ -630,7 +638,7 @@ var useCombinedRef = (...refs) => {
630
638
  if (!ref) {
631
639
  continue;
632
640
  }
633
- if (typeof ref === "function") {
641
+ if (isFunction(ref)) {
634
642
  ref(element);
635
643
  } else {
636
644
  ref.current = element;
@@ -1954,7 +1962,7 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
1954
1962
  didCalculate = true;
1955
1963
  }
1956
1964
  }
1957
- if (!didCalculate) {
1965
+ if (!didCalculate && IsNewArchitecture) {
1958
1966
  fixGaps();
1959
1967
  }
1960
1968
  }
@@ -1,16 +1,137 @@
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';
1
4
  import * as _legendapp_list from '@legendapp/list';
2
5
  import { LegendListRef } from '@legendapp/list';
3
- import * as react_native_reanimated_lib_typescript_layoutReanimation_animationBuilder_Keyframe from 'react-native-reanimated/lib/typescript/layoutReanimation/animationBuilder/Keyframe';
4
6
  import * as react_native from 'react-native';
5
7
  import { Insets } from 'react-native';
6
- import * as react_native_reanimated from 'react-native-reanimated';
7
- import * as _legendapp_list_reanimated from '@legendapp/list/reanimated';
8
8
  import * as React from 'react';
9
9
 
10
- 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"> & {
11
111
  getEstimatedItemSize?: ((index: number, item: ItemT_1) => number) | undefined;
112
+ ItemSeparatorComponent?: React.ComponentType<{
113
+ leadingItem: ItemT_1;
114
+ }> | undefined;
12
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;
13
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;
14
135
  decelerationRate?: number | "fast" | "normal" | react_native_reanimated.SharedValue<number | "fast" | "normal" | undefined> | undefined;
15
136
  horizontal?: boolean | react_native_reanimated.SharedValue<boolean | null | undefined> | null | undefined;
16
137
  invertStickyHeaders?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
@@ -33,7 +154,6 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
33
154
  snapToOffsets?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
34
155
  snapToStart?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
35
156
  snapToEnd?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
36
- stickyHeaderIndices?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
37
157
  disableIntervalMomentum?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
38
158
  disableScrollViewPanResponder?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
39
159
  StickyHeaderComponent?: React.ComponentType<any> | react_native_reanimated.SharedValue<React.ComponentType<any> | undefined> | undefined;
@@ -137,17 +257,8 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
137
257
  bouncesZoom?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
138
258
  canCancelContentTouches?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
139
259
  centerContent?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
140
- contentInset?: Insets | react_native_reanimated.SharedValue<Insets | undefined> | undefined;
141
- contentOffset?: react_native.PointProp | react_native_reanimated.SharedValue<react_native.PointProp | undefined> | undefined;
142
260
  contentInsetAdjustmentBehavior?: "always" | "never" | "automatic" | "scrollableAxes" | react_native_reanimated.SharedValue<"always" | "never" | "automatic" | "scrollableAxes" | undefined> | undefined;
143
261
  directionalLockEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
144
- maintainVisibleContentPosition?: {
145
- autoscrollToTopThreshold?: number | null | undefined;
146
- minIndexForVisible: number;
147
- } | react_native_reanimated.SharedValue<{
148
- autoscrollToTopThreshold?: number | null | undefined;
149
- minIndexForVisible: number;
150
- } | null | undefined> | null | undefined;
151
262
  maximumZoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
152
263
  minimumZoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
153
264
  onScrollAnimationEnd?: (() => void) | react_native_reanimated.SharedValue<(() => void) | undefined> | undefined;
@@ -156,7 +267,7 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
156
267
  scrollIndicatorInsets?: Insets | react_native_reanimated.SharedValue<Insets | undefined> | undefined;
157
268
  scrollToOverflowEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
158
269
  scrollsToTop?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
159
- 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;
160
271
  onScrollToTop?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
161
272
  zoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
162
273
  endFillColor?: react_native.ColorValue | react_native_reanimated.SharedValue<react_native.ColorValue | undefined> | undefined;
@@ -166,8 +277,8 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
166
277
  fadingEdgeLength?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
167
278
  persistentScrollbar?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
168
279
  } & {
169
- style?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<react_native.StyleProp<react_native.ViewStyle>>>;
170
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>>>;
171
282
  indicatorStyle?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<"default" | "black" | "white" | undefined>>;
172
283
  } & {
173
284
  layout?: react_native_reanimated.BaseAnimationBuilder | react_native_reanimated.LayoutAnimationFunction | typeof react_native_reanimated.BaseAnimationBuilder;
@@ -177,120 +288,9 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
177
288
  sharedTransitionTag?: string;
178
289
  sharedTransitionStyle?: react_native_reanimated.SharedTransition;
179
290
  }> | undefined;
180
- renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<ItemT_1>) => React.ReactNode) | undefined;
181
- onItemSizeChanged?: ((info: {
182
- size: number;
183
- previous: number;
184
- index: number;
185
- itemKey: string;
186
- itemData: ItemT_1;
187
- }) => void) | undefined;
188
- ItemSeparatorComponent?: React.ComponentType<{
189
- leadingItem: ItemT_1;
190
- }> | undefined;
191
291
  } & {
192
292
  ref?: React.Ref<LegendListRef>;
193
- }) => React.ReactElement | null) | (<T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
194
- alignItemsAtEnd?: boolean;
195
- columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
196
- data: readonly T[];
197
- drawDistance?: number;
198
- estimatedItemSize?: number;
199
- extraData?: any;
200
- getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
201
- initialContainerPoolRatio?: number | undefined;
202
- initialScrollOffset?: number;
203
- initialScrollIndex?: number;
204
- ItemSeparatorComponent?: React.ComponentType<{
205
- leadingItem: T;
206
- }> | undefined;
207
- keyExtractor?: ((item: T, index: number) => string) | undefined;
208
- ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
209
- ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
210
- ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
211
- ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
212
- ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
213
- maintainScrollAtEnd?: boolean;
214
- maintainScrollAtEndThreshold?: number;
215
- maintainVisibleContentPosition?: boolean;
216
- numColumns?: number;
217
- onEndReached?: ((info: {
218
- distanceFromEnd: number;
219
- }) => void) | null | undefined;
220
- onEndReachedThreshold?: number | null | undefined;
221
- onItemSizeChanged?: ((info: {
222
- size: number;
223
- previous: number;
224
- index: number;
225
- itemKey: string;
226
- itemData: T;
227
- }) => void) | undefined;
228
- onRefresh?: () => void;
229
- onStartReached?: ((info: {
230
- distanceFromStart: number;
231
- }) => void) | null | undefined;
232
- onStartReachedThreshold?: number | null | undefined;
233
- onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
234
- progressViewOffset?: number;
235
- recycleItems?: boolean;
236
- refScrollView?: React.Ref<react_native.ScrollView>;
237
- refreshing?: boolean;
238
- renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | undefined;
239
- renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
240
- viewabilityConfig?: _legendapp_list.ViewabilityConfig;
241
- viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
242
- waitForInitialLayout?: boolean;
243
- } & React.RefAttributes<LegendListRef>) => React.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
244
- alignItemsAtEnd?: boolean;
245
- columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
246
- data: readonly T[];
247
- drawDistance?: number;
248
- estimatedItemSize?: number;
249
- extraData?: any;
250
- getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
251
- initialContainerPoolRatio?: number | undefined;
252
- initialScrollOffset?: number;
253
- initialScrollIndex?: number;
254
- ItemSeparatorComponent?: React.ComponentType<{
255
- leadingItem: T;
256
- }> | undefined;
257
- keyExtractor?: ((item: T, index: number) => string) | undefined;
258
- ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
259
- ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
260
- ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
261
- ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
262
- ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
263
- maintainScrollAtEnd?: boolean;
264
- maintainScrollAtEndThreshold?: number;
265
- maintainVisibleContentPosition?: boolean;
266
- numColumns?: number;
267
- onEndReached?: ((info: {
268
- distanceFromEnd: number;
269
- }) => void) | null | undefined;
270
- onEndReachedThreshold?: number | null | undefined;
271
- onItemSizeChanged?: ((info: {
272
- size: number;
273
- previous: number;
274
- index: number;
275
- itemKey: string;
276
- itemData: T;
277
- }) => void) | undefined;
278
- onRefresh?: () => void;
279
- onStartReached?: ((info: {
280
- distanceFromStart: number;
281
- }) => void) | null | undefined;
282
- onStartReachedThreshold?: number | null | undefined;
283
- onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
284
- progressViewOffset?: number;
285
- recycleItems?: boolean;
286
- refScrollView?: React.Ref<react_native.ScrollView>;
287
- refreshing?: boolean;
288
- renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | undefined;
289
- renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
290
- viewabilityConfig?: _legendapp_list.ViewabilityConfig;
291
- viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
292
- waitForInitialLayout?: boolean;
293
- } & React.RefAttributes<LegendListRef>) => React.ReactNode)> = <T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
293
+ }) => React.ReactElement | null) = <T>(props: Omit<react_native.ScrollViewProps, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices"> & {
294
294
  alignItemsAtEnd?: boolean;
295
295
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
296
296
  data: readonly T[];
@@ -340,7 +340,7 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
340
340
  viewabilityConfig?: _legendapp_list.ViewabilityConfig;
341
341
  viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
342
342
  waitForInitialLayout?: boolean;
343
- } & 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"> & {
344
344
  alignItemsAtEnd?: boolean;
345
345
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
346
346
  data: readonly ItemT[];
@@ -1,16 +1,137 @@
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';
1
4
  import * as _legendapp_list from '@legendapp/list';
2
5
  import { LegendListRef } from '@legendapp/list';
3
- import * as react_native_reanimated_lib_typescript_layoutReanimation_animationBuilder_Keyframe from 'react-native-reanimated/lib/typescript/layoutReanimation/animationBuilder/Keyframe';
4
6
  import * as react_native from 'react-native';
5
7
  import { Insets } from 'react-native';
6
- import * as react_native_reanimated from 'react-native-reanimated';
7
- import * as _legendapp_list_reanimated from '@legendapp/list/reanimated';
8
8
  import * as React from 'react';
9
9
 
10
- 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"> & {
11
111
  getEstimatedItemSize?: ((index: number, item: ItemT_1) => number) | undefined;
112
+ ItemSeparatorComponent?: React.ComponentType<{
113
+ leadingItem: ItemT_1;
114
+ }> | undefined;
12
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;
13
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;
14
135
  decelerationRate?: number | "fast" | "normal" | react_native_reanimated.SharedValue<number | "fast" | "normal" | undefined> | undefined;
15
136
  horizontal?: boolean | react_native_reanimated.SharedValue<boolean | null | undefined> | null | undefined;
16
137
  invertStickyHeaders?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
@@ -33,7 +154,6 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
33
154
  snapToOffsets?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
34
155
  snapToStart?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
35
156
  snapToEnd?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
36
- stickyHeaderIndices?: number[] | react_native_reanimated.SharedValue<number[] | undefined> | undefined;
37
157
  disableIntervalMomentum?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
38
158
  disableScrollViewPanResponder?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
39
159
  StickyHeaderComponent?: React.ComponentType<any> | react_native_reanimated.SharedValue<React.ComponentType<any> | undefined> | undefined;
@@ -137,17 +257,8 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
137
257
  bouncesZoom?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
138
258
  canCancelContentTouches?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
139
259
  centerContent?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
140
- contentInset?: Insets | react_native_reanimated.SharedValue<Insets | undefined> | undefined;
141
- contentOffset?: react_native.PointProp | react_native_reanimated.SharedValue<react_native.PointProp | undefined> | undefined;
142
260
  contentInsetAdjustmentBehavior?: "always" | "never" | "automatic" | "scrollableAxes" | react_native_reanimated.SharedValue<"always" | "never" | "automatic" | "scrollableAxes" | undefined> | undefined;
143
261
  directionalLockEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
144
- maintainVisibleContentPosition?: {
145
- autoscrollToTopThreshold?: number | null | undefined;
146
- minIndexForVisible: number;
147
- } | react_native_reanimated.SharedValue<{
148
- autoscrollToTopThreshold?: number | null | undefined;
149
- minIndexForVisible: number;
150
- } | null | undefined> | null | undefined;
151
262
  maximumZoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
152
263
  minimumZoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
153
264
  onScrollAnimationEnd?: (() => void) | react_native_reanimated.SharedValue<(() => void) | undefined> | undefined;
@@ -156,7 +267,7 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
156
267
  scrollIndicatorInsets?: Insets | react_native_reanimated.SharedValue<Insets | undefined> | undefined;
157
268
  scrollToOverflowEnabled?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
158
269
  scrollsToTop?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
159
- 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;
160
271
  onScrollToTop?: ((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | react_native_reanimated.SharedValue<((event: react_native.NativeSyntheticEvent<react_native.NativeScrollEvent>) => void) | undefined> | undefined;
161
272
  zoomScale?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
162
273
  endFillColor?: react_native.ColorValue | react_native_reanimated.SharedValue<react_native.ColorValue | undefined> | undefined;
@@ -166,8 +277,8 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
166
277
  fadingEdgeLength?: number | react_native_reanimated.SharedValue<number | undefined> | undefined;
167
278
  persistentScrollbar?: boolean | react_native_reanimated.SharedValue<boolean | undefined> | undefined;
168
279
  } & {
169
- style?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<react_native.StyleProp<react_native.ViewStyle>>>;
170
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>>>;
171
282
  indicatorStyle?: react_native.StyleProp<react_native_reanimated.AnimatedStyle<"default" | "black" | "white" | undefined>>;
172
283
  } & {
173
284
  layout?: react_native_reanimated.BaseAnimationBuilder | react_native_reanimated.LayoutAnimationFunction | typeof react_native_reanimated.BaseAnimationBuilder;
@@ -177,120 +288,9 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
177
288
  sharedTransitionTag?: string;
178
289
  sharedTransitionStyle?: react_native_reanimated.SharedTransition;
179
290
  }> | undefined;
180
- renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<ItemT_1>) => React.ReactNode) | undefined;
181
- onItemSizeChanged?: ((info: {
182
- size: number;
183
- previous: number;
184
- index: number;
185
- itemKey: string;
186
- itemData: ItemT_1;
187
- }) => void) | undefined;
188
- ItemSeparatorComponent?: React.ComponentType<{
189
- leadingItem: ItemT_1;
190
- }> | undefined;
191
291
  } & {
192
292
  ref?: React.Ref<LegendListRef>;
193
- }) => React.ReactElement | null) | (<T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
194
- alignItemsAtEnd?: boolean;
195
- columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
196
- data: readonly T[];
197
- drawDistance?: number;
198
- estimatedItemSize?: number;
199
- extraData?: any;
200
- getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
201
- initialContainerPoolRatio?: number | undefined;
202
- initialScrollOffset?: number;
203
- initialScrollIndex?: number;
204
- ItemSeparatorComponent?: React.ComponentType<{
205
- leadingItem: T;
206
- }> | undefined;
207
- keyExtractor?: ((item: T, index: number) => string) | undefined;
208
- ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
209
- ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
210
- ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
211
- ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
212
- ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
213
- maintainScrollAtEnd?: boolean;
214
- maintainScrollAtEndThreshold?: number;
215
- maintainVisibleContentPosition?: boolean;
216
- numColumns?: number;
217
- onEndReached?: ((info: {
218
- distanceFromEnd: number;
219
- }) => void) | null | undefined;
220
- onEndReachedThreshold?: number | null | undefined;
221
- onItemSizeChanged?: ((info: {
222
- size: number;
223
- previous: number;
224
- index: number;
225
- itemKey: string;
226
- itemData: T;
227
- }) => void) | undefined;
228
- onRefresh?: () => void;
229
- onStartReached?: ((info: {
230
- distanceFromStart: number;
231
- }) => void) | null | undefined;
232
- onStartReachedThreshold?: number | null | undefined;
233
- onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
234
- progressViewOffset?: number;
235
- recycleItems?: boolean;
236
- refScrollView?: React.Ref<react_native.ScrollView>;
237
- refreshing?: boolean;
238
- renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | undefined;
239
- renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
240
- viewabilityConfig?: _legendapp_list.ViewabilityConfig;
241
- viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
242
- waitForInitialLayout?: boolean;
243
- } & React.RefAttributes<LegendListRef>) => React.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
244
- alignItemsAtEnd?: boolean;
245
- columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
246
- data: readonly T[];
247
- drawDistance?: number;
248
- estimatedItemSize?: number;
249
- extraData?: any;
250
- getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
251
- initialContainerPoolRatio?: number | undefined;
252
- initialScrollOffset?: number;
253
- initialScrollIndex?: number;
254
- ItemSeparatorComponent?: React.ComponentType<{
255
- leadingItem: T;
256
- }> | undefined;
257
- keyExtractor?: ((item: T, index: number) => string) | undefined;
258
- ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
259
- ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
260
- ListFooterComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
261
- ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
262
- ListHeaderComponentStyle?: react_native.StyleProp<react_native.ViewStyle> | undefined;
263
- maintainScrollAtEnd?: boolean;
264
- maintainScrollAtEndThreshold?: number;
265
- maintainVisibleContentPosition?: boolean;
266
- numColumns?: number;
267
- onEndReached?: ((info: {
268
- distanceFromEnd: number;
269
- }) => void) | null | undefined;
270
- onEndReachedThreshold?: number | null | undefined;
271
- onItemSizeChanged?: ((info: {
272
- size: number;
273
- previous: number;
274
- index: number;
275
- itemKey: string;
276
- itemData: T;
277
- }) => void) | undefined;
278
- onRefresh?: () => void;
279
- onStartReached?: ((info: {
280
- distanceFromStart: number;
281
- }) => void) | null | undefined;
282
- onStartReachedThreshold?: number | null | undefined;
283
- onViewableItemsChanged?: _legendapp_list.OnViewableItemsChanged | undefined;
284
- progressViewOffset?: number;
285
- recycleItems?: boolean;
286
- refScrollView?: React.Ref<react_native.ScrollView>;
287
- refreshing?: boolean;
288
- renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | undefined;
289
- renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
290
- viewabilityConfig?: _legendapp_list.ViewabilityConfig;
291
- viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
292
- waitForInitialLayout?: boolean;
293
- } & React.RefAttributes<LegendListRef>) => React.ReactNode)> = <T>(props: Omit<react_native.ScrollViewProps, "stickyHeaderIndices" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
293
+ }) => React.ReactElement | null) = <T>(props: Omit<react_native.ScrollViewProps, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices"> & {
294
294
  alignItemsAtEnd?: boolean;
295
295
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
296
296
  data: readonly T[];
@@ -340,7 +340,7 @@ declare const LegendList: <ItemT, ListT extends (<ItemT_1>(props: Omit<_legendap
340
340
  viewabilityConfig?: _legendapp_list.ViewabilityConfig;
341
341
  viewabilityConfigCallbackPairs?: _legendapp_list.ViewabilityConfigCallbackPairs | undefined;
342
342
  waitForInitialLayout?: boolean;
343
- } & 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"> & {
344
344
  alignItemsAtEnd?: boolean;
345
345
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
346
346
  data: readonly ItemT[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legendapp/list",
3
- "version": "1.0.0-beta.47",
3
+ "version": "1.0.0-beta.49",
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,
package/reanimated.js CHANGED
@@ -10,13 +10,20 @@ var React__default = /*#__PURE__*/_interopDefault(React);
10
10
  var Animated__default = /*#__PURE__*/_interopDefault(Animated);
11
11
 
12
12
  // src/reanimated.tsx
13
+
14
+ // src/helpers.ts
15
+ function isFunction(obj) {
16
+ return typeof obj === "function";
17
+ }
18
+
19
+ // src/useCombinedRef.ts
13
20
  var useCombinedRef = (...refs) => {
14
21
  const callback = React.useCallback((element) => {
15
22
  for (const ref of refs) {
16
23
  if (!ref) {
17
24
  continue;
18
25
  }
19
- if (typeof ref === "function") {
26
+ if (isFunction(ref)) {
20
27
  ref(element);
21
28
  } else {
22
29
  ref.current = element;
package/reanimated.mjs CHANGED
@@ -3,13 +3,20 @@ import React, { useCallback } from 'react';
3
3
  import Animated from 'react-native-reanimated';
4
4
 
5
5
  // src/reanimated.tsx
6
+
7
+ // src/helpers.ts
8
+ function isFunction(obj) {
9
+ return typeof obj === "function";
10
+ }
11
+
12
+ // src/useCombinedRef.ts
6
13
  var useCombinedRef = (...refs) => {
7
14
  const callback = useCallback((element) => {
8
15
  for (const ref of refs) {
9
16
  if (!ref) {
10
17
  continue;
11
18
  }
12
- if (typeof ref === "function") {
19
+ if (isFunction(ref)) {
13
20
  ref(element);
14
21
  } else {
15
22
  ref.current = element;