@legendapp/list 3.0.0-beta.4 → 3.0.0-beta.41

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.
Files changed (49) hide show
  1. package/.DS_Store +0 -0
  2. package/CHANGELOG.md +19 -0
  3. package/README.md +9 -2
  4. package/animated.d.ts +620 -5
  5. package/animated.js +2 -2
  6. package/animated.mjs +1 -1
  7. package/index.d.ts +1227 -11
  8. package/index.js +2594 -1023
  9. package/index.mjs +2593 -1024
  10. package/index.native.js +2347 -961
  11. package/index.native.mjs +2327 -943
  12. package/keyboard-test.d.ts +206 -0
  13. package/keyboard-test.js +34 -0
  14. package/keyboard-test.mjs +13 -0
  15. package/keyboard.d.ts +206 -8
  16. package/keyboard.js +340 -32
  17. package/keyboard.mjs +343 -34
  18. package/package.json +62 -1
  19. package/{types-JPHClxiw.d.mts → react-native.d.ts} +436 -158
  20. package/react-native.js +4942 -0
  21. package/react-native.mjs +4911 -0
  22. package/{types-JPHClxiw.d.ts → react-native.web.d.ts} +493 -158
  23. package/react-native.web.js +5357 -0
  24. package/react-native.web.mjs +5326 -0
  25. package/{types-YNdphn_A.d.mts → react.d.ts} +493 -158
  26. package/react.js +5357 -0
  27. package/react.mjs +5326 -0
  28. package/reanimated.d.ts +631 -7
  29. package/reanimated.js +156 -30
  30. package/reanimated.mjs +155 -29
  31. package/section-list.d.ts +620 -5
  32. package/section-list.js +38 -3679
  33. package/section-list.mjs +34 -3676
  34. package/animated.d.mts +0 -9
  35. package/index.d.mts +0 -23
  36. package/index.native.d.mts +0 -23
  37. package/index.native.d.ts +0 -23
  38. package/keyboard-controller.d.mts +0 -12
  39. package/keyboard-controller.d.ts +0 -12
  40. package/keyboard-controller.js +0 -69
  41. package/keyboard-controller.mjs +0 -48
  42. package/keyboard.d.mts +0 -13
  43. package/reanimated.d.mts +0 -18
  44. package/section-list.d.mts +0 -113
  45. package/section-list.native.d.mts +0 -113
  46. package/section-list.native.d.ts +0 -113
  47. package/section-list.native.js +0 -3700
  48. package/section-list.native.mjs +0 -3679
  49. package/types-YNdphn_A.d.ts +0 -670
package/index.d.ts CHANGED
@@ -1,18 +1,1231 @@
1
1
  import * as React from 'react';
2
- import { Dispatch, SetStateAction } from 'react';
3
- import { L as LegendListProps, a as LegendListRef, V as ViewabilityCallback, b as ViewabilityAmountCallback, c as LegendListRecyclingState } from './types-JPHClxiw.js';
4
- export { C as ColumnWrapperStyle, u as GetRenderedItem, G as GetRenderedItemResult, s as InitialScrollAnchor, I as InternalState, d as LegendListPropsBase, f as LegendListRenderItemProps, M as MaintainScrollAtEndOptions, O as OnViewableItemsChanged, p as ScrollIndexWithOffset, r as ScrollIndexWithOffsetAndContentOffset, q as ScrollIndexWithOffsetPosition, g as ScrollState, S as ScrollTarget, T as ThresholdSnapshot, m as TypedForwardRef, n as TypedMemo, i as ViewAmountToken, h as ViewToken, l as ViewabilityConfig, j as ViewabilityConfigCallbackPair, k as ViewabilityConfigCallbackPairs, e as ViewableRange, t as typedForwardRef, o as typedMemo } from './types-JPHClxiw.js';
5
- import 'react-native';
6
- import 'react-native-reanimated';
2
+ import { Key, ComponentType, ReactNode, CSSProperties, Ref, ReactElement, JSXElementConstructor, RefAttributes, Dispatch, SetStateAction } from 'react';
7
3
 
8
- declare const LegendList: (<T>(props: LegendListProps<T> & React.RefAttributes<LegendListRef>) => React.ReactNode) & {
4
+ type AnimatedValue = number;
5
+
6
+ type LooseMeasureCallback = (x: number, y: number, width: number, height: number, pageX: number, pageY: number) => void;
7
+ interface LooseView {
8
+ measure?: (callback: LooseMeasureCallback) => void;
9
+ }
10
+
11
+ type ListenerType = "activeStickyIndex" | "debugComputedScroll" | "debugRawScroll" | "extraData" | "footerSize" | "headerSize" | "lastItemKeys" | "lastPositionUpdate" | "maintainVisibleContentPosition" | "numColumns" | "numContainers" | "numContainersPooled" | "otherAxisSize" | "readyToRender" | "scrollAdjust" | "scrollAdjustPending" | "scrollAdjustUserOffset" | "scrollSize" | "snapToOffsets" | "stylePaddingTop" | "totalSize" | `containerColumn${number}` | `containerSpan${number}` | `containerItemData${number}` | `containerItemKey${number}` | `containerPosition${number}` | `containerSticky${number}`;
12
+ type LegendListListenerType = Extract<ListenerType, "activeStickyIndex" | "footerSize" | "headerSize" | "lastItemKeys" | "lastPositionUpdate" | "numContainers" | "numContainersPooled" | "otherAxisSize" | "readyToRender" | "snapToOffsets" | "totalSize">;
13
+ type ListenerTypeValueMap = {
14
+ activeStickyIndex: number;
15
+ animatedScrollY: any;
16
+ debugComputedScroll: number;
17
+ debugRawScroll: number;
18
+ extraData: any;
19
+ footerSize: number;
20
+ headerSize: number;
21
+ lastItemKeys: string[];
22
+ lastPositionUpdate: number;
23
+ maintainVisibleContentPosition: MaintainVisibleContentPositionNormalized$1;
24
+ numColumns: number;
25
+ numContainers: number;
26
+ numContainersPooled: number;
27
+ otherAxisSize: number;
28
+ readyToRender: boolean;
29
+ scrollAdjust: number;
30
+ scrollAdjustPending: number;
31
+ scrollAdjustUserOffset: number;
32
+ scrollSize: {
33
+ width: number;
34
+ height: number;
35
+ };
36
+ snapToOffsets: number[];
37
+ stylePaddingTop: number;
38
+ totalSize: number;
39
+ } & {
40
+ [K in ListenerType as K extends `containerItemKey${number}` ? K : never]: string;
41
+ } & {
42
+ [K in ListenerType as K extends `containerItemData${number}` ? K : never]: any;
43
+ } & {
44
+ [K in ListenerType as K extends `containerPosition${number}` ? K : never]: number;
45
+ } & {
46
+ [K in ListenerType as K extends `containerColumn${number}` ? K : never]: number;
47
+ } & {
48
+ [K in ListenerType as K extends `containerSpan${number}` ? K : never]: number;
49
+ } & {
50
+ [K in ListenerType as K extends `containerSticky${number}` ? K : never]: boolean;
51
+ };
52
+ interface StateContext {
53
+ animatedScrollY: AnimatedValue;
54
+ columnWrapperStyle: ColumnWrapperStyle$1 | undefined;
55
+ contextNum: number;
56
+ listeners: Map<ListenerType, Set<(value: any) => void>>;
57
+ mapViewabilityCallbacks: Map<string, ViewabilityCallback$1>;
58
+ mapViewabilityValues: Map<string, ViewToken$1>;
59
+ mapViewabilityAmountCallbacks: Map<number, ViewabilityAmountCallback$1>;
60
+ mapViewabilityAmountValues: Map<number, ViewAmountToken$1>;
61
+ mapViewabilityConfigStates: Map<string, {
62
+ viewableItems: ViewToken$1[];
63
+ start: number;
64
+ end: number;
65
+ previousStart: number;
66
+ previousEnd: number;
67
+ }>;
68
+ positionListeners: Map<string, Set<(value: any) => void>>;
69
+ state: InternalState$1;
70
+ values: Map<ListenerType, any>;
71
+ viewRefs: Map<number, React.RefObject<LooseView | null>>;
72
+ }
73
+
74
+ declare class ScrollAdjustHandler {
75
+ private appliedAdjust;
76
+ private pendingAdjust;
77
+ private ctx;
78
+ constructor(ctx: StateContext);
79
+ requestAdjust(add: number): void;
80
+ getAdjust(): number;
81
+ commitPendingAdjust(scrollTarget: ScrollTarget$1): void;
82
+ }
83
+
84
+ type BaseSharedValue<T = number> = {
85
+ get: () => T;
86
+ };
87
+ type StylesAsSharedValue<Style> = {
88
+ [key in keyof Style]: Style[key] | BaseSharedValue<Style[key]>;
89
+ };
90
+
91
+ interface Insets$1 {
92
+ top: number;
93
+ left: number;
94
+ bottom: number;
95
+ right: number;
96
+ }
97
+ interface LayoutRectangle$1 {
98
+ x: number;
99
+ y: number;
100
+ width: number;
101
+ height: number;
102
+ }
103
+ interface NativeScrollEvent$1 {
104
+ contentOffset: {
105
+ x: number;
106
+ y: number;
107
+ };
108
+ contentSize: {
109
+ width: number;
110
+ height: number;
111
+ };
112
+ layoutMeasurement: {
113
+ width: number;
114
+ height: number;
115
+ };
116
+ contentInset: Insets$1;
117
+ zoomScale: number;
118
+ }
119
+ interface NativeSyntheticEvent$1<T> {
120
+ nativeEvent: T;
121
+ }
122
+ type ViewStyle$1 = Record<string, unknown>;
123
+ type StyleProp$1<T> = T | T[] | null | undefined | false;
124
+ interface ScrollEventTargetLike$1 {
125
+ addEventListener(type: string, listener: (...args: any[]) => void): void;
126
+ removeEventListener(type: string, listener: (...args: any[]) => void): void;
127
+ }
128
+ interface ScrollableNodeLike$1 {
129
+ scrollLeft?: number;
130
+ scrollTop?: number;
131
+ }
132
+ interface LegendListScrollerRef$1 {
133
+ flashScrollIndicators(): void;
134
+ getCurrentScrollOffset?(): number;
135
+ getScrollEventTarget(): ScrollEventTargetLike$1 | null;
136
+ getScrollableNode(): ScrollableNodeLike$1 | null;
137
+ getScrollResponder(): unknown;
138
+ scrollTo(options: {
139
+ animated?: boolean;
140
+ x?: number;
141
+ y?: number;
142
+ }): void;
143
+ scrollToEnd(options?: {
144
+ animated?: boolean;
145
+ }): void;
146
+ }
147
+ type BaseScrollViewProps$1<TScrollView> = Omit<TScrollView, "contentOffset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children" | "onScroll">;
148
+ interface DataModeProps<ItemT, TItemType extends string | undefined> {
149
+ /**
150
+ * Array of items to render in the list.
151
+ * @required when using data mode
152
+ */
153
+ data: ReadonlyArray<ItemT>;
154
+ /**
155
+ * Function or React component to render each item in the list.
156
+ * Can be either:
157
+ * - A function: (props: LegendListRenderItemProps<ItemT>) => ReactNode
158
+ * - A React component: React.ComponentType<LegendListRenderItemProps<ItemT>>
159
+ * @required when using data mode
160
+ */
161
+ renderItem: ((props: LegendListRenderItemProps$1<ItemT, TItemType>) => React.ReactNode) | React.ComponentType<LegendListRenderItemProps$1<ItemT, TItemType>>;
162
+ children?: never;
163
+ }
164
+ interface ChildrenModeProps {
165
+ /**
166
+ * React children elements to render as list items.
167
+ * Each child will be treated as an individual list item.
168
+ * @required when using children mode
169
+ */
170
+ children: React.ReactNode;
171
+ data?: never;
172
+ renderItem?: never;
173
+ }
174
+ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
175
+ /**
176
+ * If true, aligns items at the end of the list.
177
+ * @default false
178
+ */
179
+ alignItemsAtEnd?: boolean;
180
+ /**
181
+ * Keeps selected items mounted even when they scroll out of view.
182
+ * @default undefined
183
+ */
184
+ alwaysRender?: AlwaysRenderConfig$1;
185
+ /**
186
+ * Style applied to each column's wrapper view.
187
+ */
188
+ columnWrapperStyle?: ColumnWrapperStyle$1;
189
+ /**
190
+ * Distance in pixels to pre-render items ahead of the visible area.
191
+ * @default 250
192
+ */
193
+ drawDistance?: number;
194
+ /**
195
+ * Estimated size of each item in pixels, a hint for the first render. After some
196
+ * items are rendered, the average size of rendered items will be used instead.
197
+ * @default undefined
198
+ */
199
+ estimatedItemSize?: number;
200
+ /**
201
+ * Estimated size of the ScrollView in pixels, a hint for the first render to improve performance
202
+ * @default undefined
203
+ */
204
+ estimatedListSize?: {
205
+ height: number;
206
+ width: number;
207
+ };
208
+ /**
209
+ * Extra data to trigger re-rendering when changed.
210
+ */
211
+ extraData?: any;
212
+ /**
213
+ * Version token that forces the list to treat data as updated even when the array reference is stable.
214
+ * Increment or change this when mutating the data array in place.
215
+ */
216
+ dataVersion?: Key;
217
+ /**
218
+ * In case you have distinct item sizes, you can provide a function to get the size of an item.
219
+ * Use instead of FlatList's getItemLayout or FlashList overrideItemLayout if you want to have accurate initialScrollOffset, you should provide this function
220
+ */
221
+ getEstimatedItemSize?: (item: ItemT, index: number, type: TItemType) => number;
222
+ /**
223
+ * Customize layout for multi-column lists, such as allowing items to span multiple columns.
224
+ * Similar to FlashList's overrideItemLayout.
225
+ */
226
+ overrideItemLayout?: (layout: {
227
+ span?: number;
228
+ }, item: ItemT, index: number, maxColumns: number, extraData?: any) => void;
229
+ /**
230
+ * Ratio of initial container pool size to data length (e.g., 0.5 for half).
231
+ * @default 2
232
+ */
233
+ initialContainerPoolRatio?: number | undefined;
234
+ /**
235
+ * Initial scroll position in pixels.
236
+ * @default 0
237
+ */
238
+ initialScrollOffset?: number;
239
+ /**
240
+ * Index to scroll to initially.
241
+ * @default 0
242
+ */
243
+ initialScrollIndex?: number | {
244
+ index: number;
245
+ viewOffset?: number | undefined;
246
+ viewPosition?: number | undefined;
247
+ };
248
+ /**
249
+ * When true, the list initializes scrolled to the last item.
250
+ * Overrides `initialScrollIndex` and `initialScrollOffset` when data is available.
251
+ * @default false
252
+ */
253
+ initialScrollAtEnd?: boolean;
254
+ /**
255
+ * Component to render between items, receiving the leading item as prop.
256
+ */
257
+ ItemSeparatorComponent?: React.ComponentType<{
258
+ leadingItem: ItemT;
259
+ }>;
260
+ /**
261
+ * Function to extract a unique key for each item.
262
+ */
263
+ keyExtractor?: (item: ItemT, index: number) => string;
264
+ /**
265
+ * Component or element to render when the list is empty.
266
+ */
267
+ ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
268
+ /**
269
+ * Component or element to render below the list.
270
+ */
271
+ ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
272
+ /**
273
+ * Style for the footer component.
274
+ */
275
+ ListFooterComponentStyle?: StyleProp$1<ViewStyle$1> | undefined;
276
+ /**
277
+ * Component or element to render above the list.
278
+ */
279
+ ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
280
+ /**
281
+ * Style for the header component.
282
+ */
283
+ ListHeaderComponentStyle?: StyleProp$1<ViewStyle$1> | undefined;
284
+ /**
285
+ * If true, auto-scrolls to end when new items are added.
286
+ * Use an options object to opt into specific triggers and control whether that scroll is animated.
287
+ * @default false
288
+ */
289
+ maintainScrollAtEnd?: boolean | MaintainScrollAtEndOptions$1;
290
+ /**
291
+ * Distance threshold in percentage of screen size to trigger maintainScrollAtEnd.
292
+ * @default 0.1
293
+ */
294
+ maintainScrollAtEndThreshold?: number;
295
+ /**
296
+ * Maintains visibility of content.
297
+ * - scroll (default: true) stabilizes during size/layout changes while scrolling.
298
+ * - data (default: false) stabilizes when the data array changes; passing true also sets the RN maintainVisibleContentPosition prop.
299
+ * - shouldRestorePosition can opt out specific items from data-change anchoring.
300
+ * - undefined (default) enables scroll stabilization but skips data-change anchoring.
301
+ * - true enables both behaviors; false disables both.
302
+ */
303
+ maintainVisibleContentPosition?: boolean | MaintainVisibleContentPositionConfig$1<ItemT>;
304
+ /**
305
+ * Web only: when true, listens to window/body scrolling instead of rendering a scrollable list container.
306
+ * @default false
307
+ */
308
+ useWindowScroll?: boolean;
309
+ /**
310
+ * Number of columns to render items in.
311
+ * @default 1
312
+ */
313
+ numColumns?: number;
314
+ /**
315
+ * Called when scrolling reaches the end within onEndReachedThreshold.
316
+ */
317
+ onEndReached?: ((info: {
318
+ distanceFromEnd: number;
319
+ }) => void) | null | undefined;
320
+ /**
321
+ * How close to the end (in fractional units of visible length) to trigger onEndReached.
322
+ * @default 0.5
323
+ */
324
+ onEndReachedThreshold?: number | null | undefined;
325
+ /**
326
+ * Called when an item's size changes.
327
+ */
328
+ onItemSizeChanged?: (info: {
329
+ size: number;
330
+ previous: number;
331
+ index: number;
332
+ itemKey: string;
333
+ itemData: ItemT;
334
+ }) => void;
335
+ /**
336
+ * Called when list layout metrics change.
337
+ */
338
+ onMetricsChange?: (metrics: LegendListMetrics$1) => void;
339
+ /**
340
+ * Function to call when the user pulls to refresh.
341
+ */
342
+ onRefresh?: () => void;
343
+ onScroll?: (event: NativeSyntheticEvent$1<NativeScrollEvent$1>) => void;
344
+ /**
345
+ * Called when scrolling reaches the start within onStartReachedThreshold.
346
+ */
347
+ onStartReached?: ((info: {
348
+ distanceFromStart: number;
349
+ }) => void) | null | undefined;
350
+ /**
351
+ * How close to the start (in fractional units of visible length) to trigger onStartReached.
352
+ * @default 0.5
353
+ */
354
+ onStartReachedThreshold?: number | null | undefined;
355
+ /**
356
+ * Called when the sticky header changes.
357
+ */
358
+ onStickyHeaderChange?: (info: {
359
+ index: number;
360
+ item: any;
361
+ }) => void;
362
+ /**
363
+ * Called when the viewability of items changes.
364
+ */
365
+ onViewableItemsChanged?: OnViewableItemsChanged$1<ItemT> | undefined;
366
+ /**
367
+ * Offset in pixels for the refresh indicator.
368
+ * @default 0
369
+ */
370
+ progressViewOffset?: number;
371
+ /**
372
+ * If true, recycles item views for better performance.
373
+ * @default false
374
+ */
375
+ recycleItems?: boolean;
376
+ /**
377
+ * Ref to the underlying ScrollView component.
378
+ */
379
+ refScrollView?: React.Ref<any>;
380
+ /**
381
+ * If true, shows a refresh indicator.
382
+ * @default false
383
+ */
384
+ refreshing?: boolean;
385
+ /**
386
+ * Render custom ScrollView component.
387
+ * Note: When using `stickyHeaderIndices`, you must provide an Animated ScrollView component.
388
+ * @default (props) => <ScrollView {...props} />
389
+ */
390
+ renderScrollComponent?: (props: any) => React.ReactElement | null;
391
+ /**
392
+ * This will log a suggested estimatedItemSize.
393
+ * @required
394
+ * @default false
395
+ */
396
+ suggestEstimatedItemSize?: boolean;
397
+ /**
398
+ * Configuration for determining item viewability.
399
+ */
400
+ viewabilityConfig?: ViewabilityConfig$1;
401
+ /**
402
+ * Pairs of viewability configs and their callbacks for tracking visibility.
403
+ */
404
+ viewabilityConfigCallbackPairs?: ViewabilityConfigCallbackPairs$1<ItemT> | undefined;
405
+ /**
406
+ * If true, delays rendering until initial layout is complete.
407
+ * @default false
408
+ */
409
+ waitForInitialLayout?: boolean;
410
+ onLoad?: (info: {
411
+ elapsedTimeInMs: number;
412
+ }) => void;
413
+ snapToIndices?: number[];
414
+ /**
415
+ * Array of child indices determining which children get docked to the top of the screen when scrolling.
416
+ * For example, passing stickyHeaderIndices={[0]} will cause the first child to be fixed to the top of the scroll view.
417
+ * Not supported in conjunction with horizontal={true}.
418
+ * @default undefined
419
+ */
420
+ stickyHeaderIndices?: number[];
421
+ /**
422
+ * @deprecated Use stickyHeaderIndices instead for parity with React Native.
423
+ */
424
+ stickyIndices?: number[];
425
+ /**
426
+ * Configuration for sticky headers.
427
+ * @default undefined
428
+ */
429
+ stickyHeaderConfig?: StickyHeaderConfig$1;
430
+ getItemType?: (item: ItemT, index: number) => TItemType;
431
+ getFixedItemSize?: (item: ItemT, index: number, type: TItemType) => number | undefined;
432
+ itemsAreEqual?: (itemPrevious: ItemT, item: ItemT, index: number, data: readonly ItemT[]) => boolean;
433
+ }
434
+ type LegendListPropsBase$1<ItemT, TScrollViewProps = Record<string, any>, TItemType extends string | undefined = string | undefined> = BaseScrollViewProps$1<TScrollViewProps> & LegendListSpecificProps<ItemT, TItemType> & (DataModeProps<ItemT, TItemType> | ChildrenModeProps);
435
+ type LegendListPropsInternal = LegendListSpecificProps<any, string | undefined> & DataModeProps<any, string | undefined>;
436
+ interface MaintainVisibleContentPositionConfig$1<ItemT = any> {
437
+ data?: boolean;
438
+ size?: boolean;
439
+ shouldRestorePosition?: (item: ItemT, index: number, data: readonly ItemT[]) => boolean;
440
+ }
441
+ interface MaintainVisibleContentPositionNormalized$1<ItemT = any> {
442
+ data: boolean;
443
+ size: boolean;
444
+ shouldRestorePosition?: (item: ItemT, index: number, data: readonly ItemT[]) => boolean;
445
+ }
446
+ interface StickyHeaderConfig$1 {
447
+ /**
448
+ * Specifies how far from the top edge sticky headers should start sticking.
449
+ * Useful for scenarios with a fixed navbar or header, where sticky elements pin below it..
450
+ * @default 0
451
+ */
452
+ offset?: number;
453
+ /**
454
+ * Component to render as a backdrop behind the sticky header.
455
+ * @default undefined
456
+ */
457
+ backdropComponent?: React.ComponentType<any> | React.ReactElement | null | undefined;
458
+ }
459
+ interface AlwaysRenderConfig$1 {
460
+ top?: number;
461
+ bottom?: number;
462
+ indices?: number[];
463
+ keys?: string[];
464
+ }
465
+ interface MaintainScrollAtEndOnOptions$1 {
466
+ dataChange?: boolean;
467
+ itemLayout?: boolean;
468
+ layout?: boolean;
469
+ }
470
+ interface MaintainScrollAtEndOptions$1 {
471
+ /**
472
+ * Whether maintainScrollAtEnd should animate when it scrolls to the end.
473
+ */
474
+ animated?: boolean;
475
+ /**
476
+ * Which events should keep the list pinned to the end.
477
+ * - If omitted, object values default to all triggers.
478
+ * - If provided, only the keys set to `true` are enabled.
479
+ */
480
+ on?: MaintainScrollAtEndOnOptions$1;
481
+ }
482
+ interface ColumnWrapperStyle$1 {
483
+ rowGap?: number;
484
+ gap?: number;
485
+ columnGap?: number;
486
+ }
487
+ interface LegendListMetrics$1 {
488
+ headerSize: number;
489
+ footerSize: number;
490
+ }
491
+ interface ThresholdSnapshot$1 {
492
+ scrollPosition: number;
493
+ contentSize?: number;
494
+ dataLength?: number;
495
+ atThreshold: boolean;
496
+ }
497
+ interface ScrollTarget$1 {
498
+ animated?: boolean;
499
+ index?: number;
500
+ isInitialScroll?: boolean;
501
+ itemSize?: number;
502
+ offset: number;
503
+ precomputedWithViewOffset?: boolean;
504
+ targetOffset?: number;
505
+ viewOffset?: number;
506
+ viewPosition?: number;
507
+ }
508
+ interface InternalState$1 {
509
+ activeStickyIndex: number | undefined;
510
+ adjustingFromInitialMount?: number;
511
+ animFrameCheckFinishedScroll?: any;
512
+ averageSizes: Record<string, {
513
+ num: number;
514
+ avg: number;
515
+ }>;
516
+ columns: Array<number | undefined>;
517
+ columnSpans: Array<number | undefined>;
518
+ containerItemKeys: Map<string, number>;
519
+ containerItemTypes: Map<number, string>;
520
+ dataChangeEpoch: number;
521
+ dataChangeNeedsScrollUpdate: boolean;
522
+ didColumnsChange?: boolean;
523
+ didDataChange?: boolean;
524
+ didFinishInitialScroll?: boolean;
525
+ didContainersLayout?: boolean;
526
+ enableScrollForNextCalculateItemsInView: boolean;
527
+ endBuffered: number;
528
+ endNoBuffer: number;
529
+ endReachedSnapshot: ThresholdSnapshot$1 | undefined;
530
+ firstFullyOnScreenIndex: number;
531
+ hasScrolled?: boolean;
532
+ idCache: string[];
533
+ idsInView: string[];
534
+ ignoreScrollFromMVCP?: {
535
+ lt?: number;
536
+ gt?: number;
537
+ };
538
+ ignoreScrollFromMVCPIgnored?: boolean;
539
+ ignoreScrollFromMVCPTimeout?: any;
540
+ indexByKey: Map<string, number>;
541
+ initialAnchor?: InitialScrollAnchor$1;
542
+ initialNativeScrollWatchdog?: {
543
+ startScroll: number;
544
+ targetOffset: number;
545
+ };
546
+ initialScrollLastDidFinish: boolean;
547
+ initialScrollLastTarget: ScrollIndexWithOffsetAndContentOffset$1 | undefined;
548
+ initialScrollLastTargetUsesOffset: boolean;
549
+ initialScrollPreviousDataLength: number;
550
+ initialScrollRetryLastLength: number | undefined;
551
+ initialScrollRetryWindowUntil: number;
552
+ initialScroll: ScrollIndexWithOffsetAndContentOffset$1 | undefined;
553
+ initialScrollUsesOffset: boolean;
554
+ isAtEnd: boolean;
555
+ isAtStart: boolean;
556
+ isEndReached: boolean | null;
557
+ isFirst?: boolean;
558
+ isStartReached: boolean | null;
559
+ lastBatchingAction: number;
560
+ lastLayout: LayoutRectangle$1 | undefined;
561
+ lastScrollAdjustForHistory?: number;
562
+ lastScrollDelta: number;
563
+ loadStartTime: number;
564
+ maintainingScrollAtEnd?: boolean;
565
+ minIndexSizeChanged: number | undefined;
566
+ mvcpAnchorLock?: {
567
+ id: string;
568
+ position: number;
569
+ quietPasses: number;
570
+ expiresAt: number;
571
+ };
572
+ contentInsetOverride?: Partial<Insets$1> | null;
573
+ nativeContentInset?: Insets$1;
574
+ nativeMarginTop: number;
575
+ needsOtherAxisSize?: boolean;
576
+ otherAxisSize?: number;
577
+ pendingNativeMVCPAdjust?: {
578
+ amount: number;
579
+ closestDistanceToClamp: number;
580
+ hasApproachedClamp: boolean;
581
+ manualApplied: number;
582
+ startScroll: number;
583
+ };
584
+ pendingMaintainScrollAtEnd?: boolean;
585
+ pendingTotalSize?: number;
586
+ pendingScrollResolve?: (() => void) | undefined;
587
+ positions: Array<number | undefined>;
588
+ previousData?: readonly unknown[];
589
+ queuedCalculateItemsInView: number | undefined;
590
+ queuedMVCPRecalculate?: number;
591
+ queuedInitialLayout?: boolean | undefined;
592
+ refScroller: React.RefObject<LegendListScrollerRef$1 | null>;
593
+ scroll: number;
594
+ scrollAdjustHandler: ScrollAdjustHandler;
595
+ scrollForNextCalculateItemsInView: {
596
+ top: number | null;
597
+ bottom: number | null;
598
+ } | undefined;
599
+ scrollHistory: Array<{
600
+ scroll: number;
601
+ time: number;
602
+ }>;
603
+ scrollingTo?: ScrollTarget$1 | undefined;
604
+ scrollLastCalculate?: number;
605
+ scrollLength: number;
606
+ scrollPending: number;
607
+ scrollPrev: number;
608
+ scrollPrevTime: number;
609
+ scrollProcessingEnabled: boolean;
610
+ scrollTime: number;
611
+ sizes: Map<string, number>;
612
+ sizesKnown: Map<string, number>;
613
+ startBuffered: number;
614
+ startBufferedId?: string;
615
+ startNoBuffer: number;
616
+ startReachedSnapshotDataChangeEpoch: number | undefined;
617
+ startReachedSnapshot: ThresholdSnapshot$1 | undefined;
618
+ stickyContainerPool: Set<number>;
619
+ stickyContainers: Map<number, number>;
620
+ timeouts: Set<number>;
621
+ timeoutSetPaddingTop?: any;
622
+ timeoutSizeMessage: any;
623
+ timeoutCheckFinishedScrollFallback?: any;
624
+ totalSize: number;
625
+ triggerCalculateItemsInView?: (params?: {
626
+ doMVCP?: boolean;
627
+ dataChanged?: boolean;
628
+ forceFullItemPositions?: boolean;
629
+ }) => void;
630
+ viewabilityConfigCallbackPairs: ViewabilityConfigCallbackPairs$1<any> | undefined;
631
+ props: {
632
+ alignItemsAtEnd: boolean;
633
+ animatedProps: StylesAsSharedValue<Record<string, any>>;
634
+ alwaysRender: AlwaysRenderConfig$1 | undefined;
635
+ alwaysRenderIndicesArr: number[];
636
+ alwaysRenderIndicesSet: Set<number>;
637
+ contentInset: Insets$1 | undefined;
638
+ data: readonly any[];
639
+ dataVersion: Key | undefined;
640
+ drawDistance: number;
641
+ estimatedItemSize: number | undefined;
642
+ getEstimatedItemSize: LegendListPropsInternal["getEstimatedItemSize"];
643
+ getFixedItemSize: LegendListPropsInternal["getFixedItemSize"];
644
+ getItemType: LegendListPropsInternal["getItemType"];
645
+ horizontal: boolean;
646
+ initialContainerPoolRatio: number;
647
+ itemsAreEqual: LegendListPropsInternal["itemsAreEqual"];
648
+ keyExtractor: LegendListPropsInternal["keyExtractor"];
649
+ maintainScrollAtEnd: MaintainScrollAtEndNormalized | undefined;
650
+ maintainScrollAtEndThreshold: number | undefined;
651
+ maintainVisibleContentPosition: MaintainVisibleContentPositionNormalized$1;
652
+ numColumns: number;
653
+ onEndReached: LegendListPropsInternal["onEndReached"];
654
+ onEndReachedThreshold: number | null | undefined;
655
+ onItemSizeChanged: LegendListPropsInternal["onItemSizeChanged"];
656
+ onLoad: LegendListPropsInternal["onLoad"];
657
+ onScroll: LegendListPropsInternal["onScroll"];
658
+ onStartReached: LegendListPropsInternal["onStartReached"];
659
+ onStartReachedThreshold: number | null | undefined;
660
+ onStickyHeaderChange: LegendListPropsInternal["onStickyHeaderChange"];
661
+ overrideItemLayout: LegendListPropsInternal["overrideItemLayout"];
662
+ recycleItems: boolean;
663
+ renderItem: LegendListPropsInternal["renderItem"];
664
+ scrollBuffer?: number;
665
+ snapToIndices: number[] | undefined;
666
+ positionComponentInternal: React.ComponentType<any> | undefined;
667
+ stickyPositionComponentInternal: React.ComponentType<any> | undefined;
668
+ stickyIndicesArr: number[];
669
+ stickyIndicesSet: Set<number>;
670
+ stylePaddingBottom: number | undefined;
671
+ stylePaddingTop: number | undefined;
672
+ suggestEstimatedItemSize: boolean;
673
+ useWindowScroll: boolean;
674
+ };
675
+ }
676
+ interface ViewableRange$1<T> {
677
+ end: number;
678
+ endBuffered: number;
679
+ items: T[];
680
+ start: number;
681
+ startBuffered: number;
682
+ }
683
+ interface LegendListRenderItemProps$1<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
684
+ data: readonly ItemT[];
685
+ extraData: any;
686
+ index: number;
687
+ item: ItemT;
688
+ type: TItemType;
689
+ }
690
+ type LegendListState$1 = {
691
+ activeStickyIndex: number;
692
+ contentLength: number;
693
+ data: readonly any[];
694
+ elementAtIndex: (index: number) => any;
695
+ end: number;
696
+ endBuffered: number;
697
+ isAtEnd: boolean;
698
+ isAtStart: boolean;
699
+ isEndReached: boolean;
700
+ isStartReached: boolean;
701
+ listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
702
+ listenToPosition: (key: string, callback: (value: number) => void) => () => void;
703
+ positionAtIndex: (index: number) => number;
704
+ positionByKey: (key: string) => number | undefined;
705
+ scroll: number;
706
+ scrollLength: number;
707
+ scrollVelocity: number;
708
+ sizeAtIndex: (index: number) => number;
709
+ sizes: Map<string, number>;
710
+ start: number;
711
+ startBuffered: number;
712
+ };
713
+ type LegendListRef$1 = {
714
+ /**
715
+ * Displays the scroll indicators momentarily.
716
+ */
717
+ flashScrollIndicators(): void;
718
+ /**
719
+ * Returns the native ScrollView component reference.
720
+ */
721
+ getNativeScrollRef(): any;
722
+ /**
723
+ * Returns the scroll responder instance for handling scroll events.
724
+ */
725
+ getScrollableNode(): any;
726
+ /**
727
+ * Returns the ScrollResponderMixin for advanced scroll handling.
728
+ */
729
+ getScrollResponder(): any;
730
+ /**
731
+ * Returns the internal state of the scroll virtualization.
732
+ */
733
+ getState(): LegendListState$1;
734
+ /**
735
+ * Scrolls a specific index into view.
736
+ * @param params - Parameters for scrolling.
737
+ * @param params.animated - If true, animates the scroll. Default: true.
738
+ * @param params.index - The index to scroll to.
739
+ */
740
+ scrollIndexIntoView(params: {
741
+ animated?: boolean | undefined;
742
+ index: number;
743
+ }): Promise<void>;
744
+ /**
745
+ * Scrolls a specific index into view.
746
+ * @param params - Parameters for scrolling.
747
+ * @param params.animated - If true, animates the scroll. Default: true.
748
+ * @param params.item - The item to scroll to.
749
+ */
750
+ scrollItemIntoView(params: {
751
+ animated?: boolean | undefined;
752
+ item: any;
753
+ }): Promise<void>;
754
+ /**
755
+ * Scrolls to the end of the list.
756
+ * @param options - Options for scrolling.
757
+ * @param options.animated - If true, animates the scroll. Default: true.
758
+ * @param options.viewOffset - Offset from the target position.
759
+ */
760
+ scrollToEnd(options?: {
761
+ animated?: boolean | undefined;
762
+ viewOffset?: number | undefined;
763
+ }): Promise<void>;
764
+ /**
765
+ * Scrolls to a specific index in the list.
766
+ * @param params - Parameters for scrolling.
767
+ * @param params.animated - If true, animates the scroll. Default: true.
768
+ * @param params.index - The index to scroll to.
769
+ * @param params.viewOffset - Offset from the target position.
770
+ * @param params.viewPosition - Position of the item in the viewport (0 to 1).
771
+ */
772
+ scrollToIndex(params: {
773
+ animated?: boolean | undefined;
774
+ index: number;
775
+ viewOffset?: number | undefined;
776
+ viewPosition?: number | undefined;
777
+ }): Promise<void>;
778
+ /**
779
+ * Scrolls to a specific item in the list.
780
+ * @param params - Parameters for scrolling.
781
+ * @param params.animated - If true, animates the scroll. Default: true.
782
+ * @param params.item - The item to scroll to.
783
+ * @param params.viewOffset - Offset from the target position.
784
+ * @param params.viewPosition - Position of the item in the viewport (0 to 1).
785
+ */
786
+ scrollToItem(params: {
787
+ animated?: boolean | undefined;
788
+ item: any;
789
+ viewOffset?: number | undefined;
790
+ viewPosition?: number | undefined;
791
+ }): Promise<void>;
792
+ /**
793
+ * Scrolls to a specific offset in pixels.
794
+ * @param params - Parameters for scrolling.
795
+ * @param params.offset - The pixel offset to scroll to.
796
+ * @param params.animated - If true, animates the scroll. Default: true.
797
+ */
798
+ scrollToOffset(params: {
799
+ offset: number;
800
+ animated?: boolean | undefined;
801
+ }): Promise<void>;
802
+ /**
803
+ * Sets or adds to the offset of the visible content anchor.
804
+ * @param value - The offset to set or add.
805
+ * @param animated - If true, uses Animated to animate the change.
806
+ */
807
+ setVisibleContentAnchorOffset(value: number | ((val: number) => number)): void;
808
+ /**
809
+ * Sets whether scroll processing is enabled.
810
+ * @param enabled - If true, scroll processing is enabled.
811
+ */
812
+ setScrollProcessingEnabled(enabled: boolean): void;
813
+ /**
814
+ * Clears internal virtualization caches.
815
+ * @param options - Cache clearing options.
816
+ * @param options.mode - `sizes` clears measurement caches. `full` also clears key/position caches.
817
+ */
818
+ clearCaches(options?: {
819
+ mode?: "sizes" | "full";
820
+ }): void;
821
+ /**
822
+ * Reports an externally measured content inset. Pass null/undefined to clear.
823
+ * Values are merged on top of props/animated/native insets.
824
+ */
825
+ reportContentInset(inset?: Partial<Insets$1> | null): void;
826
+ };
827
+ interface ViewToken$1<ItemT = any> {
828
+ containerId: number;
829
+ index: number;
830
+ isViewable: boolean;
831
+ item: ItemT;
832
+ key: string;
833
+ }
834
+ interface ViewAmountToken$1<ItemT = any> extends ViewToken$1<ItemT> {
835
+ percentOfScroller: number;
836
+ percentVisible: number;
837
+ scrollSize: number;
838
+ size: number;
839
+ sizeVisible: number;
840
+ }
841
+ interface ViewabilityConfigCallbackPair$1<ItemT = any> {
842
+ onViewableItemsChanged?: OnViewableItemsChanged$1<ItemT>;
843
+ viewabilityConfig: ViewabilityConfig$1;
844
+ }
845
+ type ViewabilityConfigCallbackPairs$1<ItemT> = ViewabilityConfigCallbackPair$1<ItemT>[];
846
+ type OnViewableItemsChanged$1<ItemT> = ((info: {
847
+ viewableItems: Array<ViewToken$1<ItemT>>;
848
+ changed: Array<ViewToken$1<ItemT>>;
849
+ }) => void) | null;
850
+ interface ViewabilityConfig$1 {
851
+ /**
852
+ * A unique ID to identify this viewability config
853
+ */
854
+ id?: string;
855
+ /**
856
+ * Minimum amount of time (in milliseconds) that an item must be physically viewable before the
857
+ * viewability callback will be fired. A high number means that scrolling through content without
858
+ * stopping will not mark the content as viewable.
859
+ */
860
+ minimumViewTime?: number | undefined;
861
+ /**
862
+ * Percent of viewport that must be covered for a partially occluded item to count as
863
+ * "viewable", 0-100. Fully visible items are always considered viewable. A value of 0 means
864
+ * that a single pixel in the viewport makes the item viewable, and a value of 100 means that
865
+ * an item must be either entirely visible or cover the entire viewport to count as viewable.
866
+ */
867
+ viewAreaCoveragePercentThreshold?: number | undefined;
868
+ /**
869
+ * Similar to `viewAreaCoveragePercentThreshold`, but considers the percent of the item that is visible,
870
+ * rather than the fraction of the viewable area it covers.
871
+ */
872
+ itemVisiblePercentThreshold?: number | undefined;
873
+ /**
874
+ * Nothing is considered viewable until the user scrolls or `recordInteraction` is called after
875
+ * render.
876
+ */
877
+ waitForInteraction?: boolean | undefined;
878
+ }
879
+ type ViewabilityCallback$1<ItemT = any> = (viewToken: ViewToken$1<ItemT>) => void;
880
+ type ViewabilityAmountCallback$1<ItemT = any> = (viewToken: ViewAmountToken$1<ItemT>) => void;
881
+ interface LegendListRecyclingState$1<T> {
882
+ index: number;
883
+ item: T;
884
+ prevIndex: number | undefined;
885
+ prevItem: T | undefined;
886
+ }
887
+ type TypedForwardRef$1 = <T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null) => (props: P & React.RefAttributes<T>) => React.ReactElement | null;
888
+ declare const typedForwardRef: TypedForwardRef$1;
889
+ type TypedMemo$1 = <T extends React.ComponentType<any>>(Component: T, propsAreEqual?: (prevProps: Readonly<React.ComponentProps<T>>, nextProps: Readonly<React.ComponentProps<T>>) => boolean) => T & {
9
890
  displayName?: string;
10
891
  };
892
+ declare const typedMemo: TypedMemo$1;
893
+ interface ScrollIndexWithOffset$1 {
894
+ index: number;
895
+ viewOffset?: number;
896
+ viewPosition?: number;
897
+ }
898
+ interface ScrollIndexWithOffsetPosition$1 extends ScrollIndexWithOffset$1 {
899
+ viewPosition?: number;
900
+ }
901
+ interface ScrollIndexWithOffsetAndContentOffset$1 extends ScrollIndexWithOffsetPosition$1 {
902
+ contentOffset?: number;
903
+ }
904
+ interface InitialScrollAnchor$1 extends ScrollIndexWithOffsetPosition$1 {
905
+ attempts?: number;
906
+ lastDelta?: number;
907
+ settledTicks?: number;
908
+ }
909
+ type GetRenderedItemResult$1<ItemT> = {
910
+ index: number;
911
+ item: ItemT;
912
+ renderedItem: React.ReactNode;
913
+ };
914
+ type GetRenderedItem$1 = (key: string) => GetRenderedItemResult$1<any> | null;
915
+
916
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
917
+ type Insets = Insets$1;
918
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
919
+ type LayoutRectangle = LayoutRectangle$1;
920
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
921
+ type NativeScrollEvent = NativeScrollEvent$1;
922
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
923
+ type NativeSyntheticEvent<T> = NativeSyntheticEvent$1<T>;
924
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
925
+ type ViewStyle = ViewStyle$1;
926
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
927
+ type StyleProp<T> = StyleProp$1<T>;
928
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
929
+ type ScrollEventTargetLike = ScrollEventTargetLike$1;
930
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
931
+ type ScrollableNodeLike = ScrollableNodeLike$1;
932
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
933
+ type LegendListScrollerRef = LegendListScrollerRef$1;
934
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
935
+ type BaseScrollViewProps<TScrollView> = BaseScrollViewProps$1<TScrollView>;
936
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
937
+ type LegendListPropsBase<ItemT, TScrollViewProps = Record<string, any>, TItemType extends string | undefined = string | undefined> = LegendListPropsBase$1<ItemT, TScrollViewProps, TItemType>;
938
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
939
+ type MaintainVisibleContentPositionConfig<ItemT = any> = MaintainVisibleContentPositionConfig$1<ItemT>;
940
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
941
+ type MaintainVisibleContentPositionNormalized<ItemT = any> = MaintainVisibleContentPositionNormalized$1<ItemT>;
942
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
943
+ type StickyHeaderConfig = StickyHeaderConfig$1;
944
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
945
+ type AlwaysRenderConfig = AlwaysRenderConfig$1;
946
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
947
+ type MaintainScrollAtEndOnOptions = MaintainScrollAtEndOnOptions$1;
948
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
949
+ type MaintainScrollAtEndOptions = MaintainScrollAtEndOptions$1;
950
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
951
+ type ColumnWrapperStyle = ColumnWrapperStyle$1;
952
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
953
+ type LegendListMetrics = LegendListMetrics$1;
954
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
955
+ type ThresholdSnapshot = ThresholdSnapshot$1;
956
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
957
+ type ScrollTarget = ScrollTarget$1;
958
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
959
+ type InternalState = InternalState$1;
960
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
961
+ type ViewableRange<T> = ViewableRange$1<T>;
962
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
963
+ type LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> = LegendListRenderItemProps$1<ItemT, TItemType>;
964
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
965
+ type LegendListState = LegendListState$1;
966
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
967
+ type LegendListRef = LegendListRef$1;
968
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
969
+ type ViewToken<ItemT = any> = ViewToken$1<ItemT>;
970
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
971
+ type ViewAmountToken<ItemT = any> = ViewAmountToken$1<ItemT>;
972
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
973
+ type ViewabilityConfigCallbackPair<ItemT = any> = ViewabilityConfigCallbackPair$1<ItemT>;
974
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
975
+ type ViewabilityConfigCallbackPairs<ItemT> = ViewabilityConfigCallbackPairs$1<ItemT>;
976
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
977
+ type OnViewableItemsChanged<ItemT> = OnViewableItemsChanged$1<ItemT>;
978
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
979
+ type ViewabilityConfig = ViewabilityConfig$1;
980
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
981
+ type ViewabilityCallback<ItemT = any> = ViewabilityCallback$1<ItemT>;
982
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
983
+ type ViewabilityAmountCallback<ItemT = any> = ViewabilityAmountCallback$1<ItemT>;
984
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
985
+ type LegendListRecyclingState<T> = LegendListRecyclingState$1<T>;
986
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
987
+ type TypedForwardRef = TypedForwardRef$1;
988
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
989
+ type TypedMemo = TypedMemo$1;
990
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
991
+ type ScrollIndexWithOffset = ScrollIndexWithOffset$1;
992
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
993
+ type ScrollIndexWithOffsetPosition = ScrollIndexWithOffsetPosition$1;
994
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
995
+ type ScrollIndexWithOffsetAndContentOffset = ScrollIndexWithOffsetAndContentOffset$1;
996
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
997
+ type InitialScrollAnchor = InitialScrollAnchor$1;
998
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
999
+ type GetRenderedItemResult<ItemT> = GetRenderedItemResult$1<ItemT>;
1000
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
1001
+ type GetRenderedItem = GetRenderedItem$1;
1002
+ interface LooseAccessibilityActionEvent {
1003
+ nativeEvent?: {
1004
+ actionName?: string;
1005
+ };
1006
+ }
1007
+ type AccessibilityActionEvent = LooseAccessibilityActionEvent;
1008
+ type LooseAccessibilityRole = string;
1009
+ type AccessibilityRole = LooseAccessibilityRole;
1010
+ interface LooseAccessibilityState {
1011
+ busy?: boolean;
1012
+ checked?: boolean | "mixed";
1013
+ disabled?: boolean;
1014
+ expanded?: boolean;
1015
+ selected?: boolean;
1016
+ }
1017
+ type AccessibilityState = LooseAccessibilityState;
1018
+ interface LooseAccessibilityValue {
1019
+ max?: number;
1020
+ min?: number;
1021
+ now?: number;
1022
+ text?: string;
1023
+ }
1024
+ type AccessibilityValue = LooseAccessibilityValue;
1025
+ type LooseColorValue = string | number;
1026
+ type ColorValue = LooseColorValue;
1027
+ interface LooseGestureResponderEvent {
1028
+ nativeEvent?: unknown;
1029
+ }
1030
+ type GestureResponderEvent = LooseGestureResponderEvent;
1031
+ interface LoosePointerEvent {
1032
+ nativeEvent?: unknown;
1033
+ }
1034
+ type PointerEvent = LoosePointerEvent;
1035
+ interface LooseRefreshControlProps {
1036
+ onRefresh?: () => void;
1037
+ progressViewOffset?: number;
1038
+ refreshing?: boolean;
1039
+ }
1040
+ type RefreshControlProps = LooseRefreshControlProps;
1041
+ type LooseRole = string;
1042
+ type Role = LooseRole;
1043
+ interface PointProp {
1044
+ x: number;
1045
+ y: number;
1046
+ }
1047
+ interface LayoutChangeEvent {
1048
+ nativeEvent: {
1049
+ layout: LayoutRectangle;
1050
+ };
1051
+ }
1052
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
1053
+ interface LooseScrollViewProps {
1054
+ StickyHeaderComponent?: ComponentType<unknown>;
1055
+ accessibilityActions?: Array<{
1056
+ label?: string;
1057
+ name: string;
1058
+ }>;
1059
+ accessibilityElementsHidden?: boolean;
1060
+ accessibilityHint?: string;
1061
+ accessibilityIgnoresInvertColors?: boolean;
1062
+ accessibilityLabel?: string;
1063
+ accessibilityLabelledBy?: string | string[];
1064
+ accessibilityLanguage?: string;
1065
+ accessibilityLargeContentTitle?: string;
1066
+ accessibilityLiveRegion?: "none" | "polite" | "assertive";
1067
+ accessibilityRespondsToUserInteraction?: boolean;
1068
+ accessibilityRole?: AccessibilityRole;
1069
+ accessibilityShowsLargeContentViewer?: boolean;
1070
+ accessibilityState?: AccessibilityState;
1071
+ accessibilityValue?: AccessibilityValue;
1072
+ accessibilityViewIsModal?: boolean;
1073
+ accessible?: boolean;
1074
+ alwaysBounceHorizontal?: boolean;
1075
+ alwaysBounceVertical?: boolean;
1076
+ "aria-busy"?: boolean;
1077
+ "aria-checked"?: boolean | "mixed";
1078
+ "aria-disabled"?: boolean;
1079
+ "aria-expanded"?: boolean;
1080
+ "aria-hidden"?: boolean;
1081
+ "aria-label"?: string;
1082
+ "aria-labelledby"?: string;
1083
+ "aria-live"?: "polite" | "assertive" | "off";
1084
+ "aria-modal"?: boolean;
1085
+ "aria-selected"?: boolean;
1086
+ "aria-valuemax"?: number;
1087
+ "aria-valuemin"?: number;
1088
+ "aria-valuenow"?: number;
1089
+ "aria-valuetext"?: string;
1090
+ automaticallyAdjustContentInsets?: boolean;
1091
+ automaticallyAdjustKeyboardInsets?: boolean;
1092
+ automaticallyAdjustsScrollIndicatorInsets?: boolean;
1093
+ bounces?: boolean;
1094
+ bouncesZoom?: boolean;
1095
+ canCancelContentTouches?: boolean;
1096
+ centerContent?: boolean;
1097
+ children?: ReactNode;
1098
+ collapsable?: boolean;
1099
+ collapsableChildren?: boolean;
1100
+ contentContainerStyle?: StyleProp<ViewStyle> | CSSProperties;
1101
+ contentInset?: Insets;
1102
+ contentInsetAdjustmentBehavior?: "always" | "never" | "automatic" | "scrollableAxes";
1103
+ contentOffset?: PointProp;
1104
+ decelerationRate?: number | "fast" | "normal";
1105
+ directionalLockEnabled?: boolean;
1106
+ disableIntervalMomentum?: boolean;
1107
+ disableScrollViewPanResponder?: boolean;
1108
+ endFillColor?: ColorValue;
1109
+ fadingEdgeLength?: number | {
1110
+ end?: number;
1111
+ start?: number;
1112
+ };
1113
+ focusable?: boolean;
1114
+ hasTVPreferredFocus?: boolean;
1115
+ hitSlop?: number | Insets;
1116
+ horizontal?: boolean;
1117
+ id?: string;
1118
+ importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants";
1119
+ indicatorStyle?: "default" | "black" | "white";
1120
+ innerViewRef?: Ref<unknown>;
1121
+ invertStickyHeaders?: boolean;
1122
+ isTVSelectable?: boolean;
1123
+ keyboardDismissMode?: "none" | "interactive" | "on-drag";
1124
+ keyboardShouldPersistTaps?: boolean | "always" | "never" | "handled";
1125
+ maintainVisibleContentPosition?: {
1126
+ autoscrollToTopThreshold?: number;
1127
+ minIndexForVisible: number;
1128
+ };
1129
+ maximumZoomScale?: number;
1130
+ minimumZoomScale?: number;
1131
+ nativeID?: string;
1132
+ needsOffscreenAlphaCompositing?: boolean;
1133
+ nestedScrollEnabled?: boolean;
1134
+ onAccessibilityAction?: (event: AccessibilityActionEvent) => void;
1135
+ onAccessibilityEscape?: () => void;
1136
+ onAccessibilityTap?: () => void;
1137
+ onBlur?: (event: unknown) => void;
1138
+ onContentSizeChange?: (width: number, height: number) => void;
1139
+ onFocus?: (event: unknown) => void;
1140
+ onLayout?: (event: LayoutChangeEvent) => void;
1141
+ onMagicTap?: () => void;
1142
+ onMomentumScrollBegin?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
1143
+ onMomentumScrollEnd?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
1144
+ onMoveShouldSetResponder?: (event: GestureResponderEvent) => boolean;
1145
+ onMoveShouldSetResponderCapture?: (event: GestureResponderEvent) => boolean;
1146
+ onPointerCancel?: (event: PointerEvent) => void;
1147
+ onPointerCancelCapture?: (event: PointerEvent) => void;
1148
+ onPointerDown?: (event: PointerEvent) => void;
1149
+ onPointerDownCapture?: (event: PointerEvent) => void;
1150
+ onPointerEnter?: (event: PointerEvent) => void;
1151
+ onPointerEnterCapture?: (event: PointerEvent) => void;
1152
+ onPointerLeave?: (event: PointerEvent) => void;
1153
+ onPointerLeaveCapture?: (event: PointerEvent) => void;
1154
+ onPointerMove?: (event: PointerEvent) => void;
1155
+ onPointerMoveCapture?: (event: PointerEvent) => void;
1156
+ onPointerUp?: (event: PointerEvent) => void;
1157
+ onPointerUpCapture?: (event: PointerEvent) => void;
1158
+ onResponderEnd?: (event: GestureResponderEvent) => void;
1159
+ onResponderGrant?: (event: GestureResponderEvent) => void;
1160
+ onResponderMove?: (event: GestureResponderEvent) => void;
1161
+ onResponderReject?: (event: GestureResponderEvent) => void;
1162
+ onResponderRelease?: (event: GestureResponderEvent) => void;
1163
+ onResponderStart?: (event: GestureResponderEvent) => void;
1164
+ onResponderTerminate?: (event: GestureResponderEvent) => void;
1165
+ onResponderTerminationRequest?: (event: GestureResponderEvent) => boolean;
1166
+ onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
1167
+ onScrollAnimationEnd?: () => void;
1168
+ onScrollBeginDrag?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
1169
+ onScrollEndDrag?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
1170
+ onScrollToTop?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
1171
+ onStartShouldSetResponder?: (event: GestureResponderEvent) => boolean;
1172
+ onStartShouldSetResponderCapture?: (event: GestureResponderEvent) => boolean;
1173
+ onTouchCancel?: (event: GestureResponderEvent) => void;
1174
+ onTouchEnd?: (event: GestureResponderEvent) => void;
1175
+ onTouchEndCapture?: (event: GestureResponderEvent) => void;
1176
+ onTouchMove?: (event: GestureResponderEvent) => void;
1177
+ onTouchStart?: (event: GestureResponderEvent) => void;
1178
+ overScrollMode?: "always" | "never" | "auto";
1179
+ pagingEnabled?: boolean;
1180
+ persistentScrollbar?: boolean;
1181
+ pinchGestureEnabled?: boolean;
1182
+ pointerEvents?: "none" | "box-none" | "box-only" | "auto";
1183
+ refreshControl?: ReactElement<RefreshControlProps, string | JSXElementConstructor<unknown>>;
1184
+ removeClippedSubviews?: boolean;
1185
+ renderToHardwareTextureAndroid?: boolean;
1186
+ role?: Role;
1187
+ screenReaderFocusable?: boolean;
1188
+ scrollEnabled?: boolean;
1189
+ scrollEventThrottle?: number;
1190
+ scrollIndicatorInsets?: Insets;
1191
+ scrollPerfTag?: string;
1192
+ scrollToOverflowEnabled?: boolean;
1193
+ scrollViewRef?: Ref<unknown>;
1194
+ scrollsToTop?: boolean;
1195
+ shouldRasterizeIOS?: boolean;
1196
+ showsHorizontalScrollIndicator?: boolean;
1197
+ showsVerticalScrollIndicator?: boolean;
1198
+ snapToAlignment?: "start" | "center" | "end";
1199
+ snapToEnd?: boolean;
1200
+ snapToInterval?: number;
1201
+ snapToOffsets?: number[];
1202
+ snapToStart?: boolean;
1203
+ stickyHeaderHiddenOnScroll?: boolean;
1204
+ stickyHeaderIndices?: number[];
1205
+ style?: StyleProp<ViewStyle> | CSSProperties;
1206
+ tabIndex?: 0 | -1;
1207
+ testID?: string;
1208
+ tvParallaxMagnification?: number;
1209
+ tvParallaxShiftDistanceX?: number;
1210
+ tvParallaxShiftDistanceY?: number;
1211
+ tvParallaxTiltAngle?: number;
1212
+ zoomScale?: number;
1213
+ }
1214
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
1215
+ type ScrollViewPropsLoose = LooseScrollViewProps;
1216
+ type LegendListPropsLoose<ItemT = any> = Omit<LegendListPropsBase<ItemT, LooseScrollViewProps>, "ListHeaderComponentStyle" | "ListFooterComponentStyle"> & {
1217
+ ListHeaderComponentStyle?: StyleProp<ViewStyle> | CSSProperties | undefined;
1218
+ ListFooterComponentStyle?: StyleProp<ViewStyle> | CSSProperties | undefined;
1219
+ };
1220
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
1221
+ type LegendListProps<ItemT = any> = LegendListPropsLoose<ItemT>;
1222
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
1223
+ type LegendListComponent = <ItemT = any>(props: LegendListProps<ItemT> & RefAttributes<LegendListRef>) => ReactElement | null;
11
1224
 
12
- declare function useViewability<ItemT = any>(callback: ViewabilityCallback<ItemT>, configId?: string): void;
13
- declare function useViewabilityAmount<ItemT = any>(callback: ViewabilityAmountCallback<ItemT>): void;
14
- declare function useRecyclingEffect(effect: (info: LegendListRecyclingState<unknown>) => void | (() => void)): void;
15
- declare function useRecyclingState<ItemT>(valueOrFun: ((info: LegendListRecyclingState<ItemT>) => ItemT) | ItemT): readonly [ItemT | null, Dispatch<SetStateAction<ItemT>>];
1225
+ declare function useViewability<ItemT = any>(callback: ViewabilityCallback$1<ItemT>, configId?: string): void;
1226
+ declare function useViewabilityAmount<ItemT = any>(callback: ViewabilityAmountCallback$1<ItemT>): void;
1227
+ declare function useRecyclingEffect(effect: (info: LegendListRecyclingState$1<unknown>) => void | (() => void)): void;
1228
+ declare function useRecyclingState<ItemT>(valueOrFun: ((info: LegendListRecyclingState$1<ItemT>) => ItemT) | ItemT): readonly [ItemT, Dispatch<SetStateAction<ItemT>>];
16
1229
  declare function useIsLastItem(): boolean;
17
1230
  declare function useListScrollSize(): {
18
1231
  width: number;
@@ -20,4 +1233,7 @@ declare function useListScrollSize(): {
20
1233
  };
21
1234
  declare function useSyncLayout(): () => void;
22
1235
 
23
- export { LegendList, LegendListProps, LegendListRecyclingState, LegendListRef, ViewabilityAmountCallback, ViewabilityCallback, useIsLastItem, useListScrollSize, useRecyclingEffect, useRecyclingState, useSyncLayout, useViewability, useViewabilityAmount };
1236
+ /** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
1237
+ declare const LegendList: LegendListComponent;
1238
+
1239
+ export { type AccessibilityActionEvent, type AccessibilityRole, type AccessibilityState, type AccessibilityValue, type AlwaysRenderConfig, type BaseScrollViewProps, type ColorValue, type ColumnWrapperStyle, type GestureResponderEvent, type GetRenderedItem, type GetRenderedItemResult, type InitialScrollAnchor, type Insets, type InternalState, type LayoutChangeEvent, type LayoutRectangle, LegendList, type LegendListComponent, type LegendListMetrics, type LegendListProps, type LegendListPropsBase, type LegendListRecyclingState, type LegendListRef, type LegendListRenderItemProps, type LegendListScrollerRef, type LegendListState, type LooseAccessibilityActionEvent, type LooseAccessibilityRole, type LooseAccessibilityState, type LooseAccessibilityValue, type LooseColorValue, type LooseGestureResponderEvent, type LoosePointerEvent, type LooseRefreshControlProps, type LooseRole, type LooseScrollViewProps, type MaintainScrollAtEndOnOptions, type MaintainScrollAtEndOptions, type MaintainVisibleContentPositionConfig, type MaintainVisibleContentPositionNormalized, type NativeScrollEvent, type NativeSyntheticEvent, type OnViewableItemsChanged, type PointProp, type PointerEvent, type RefreshControlProps, type Role, type ScrollEventTargetLike, type ScrollIndexWithOffset, type ScrollIndexWithOffsetAndContentOffset, type ScrollIndexWithOffsetPosition, type ScrollTarget, type ScrollViewPropsLoose, type ScrollableNodeLike, type StickyHeaderConfig, type StyleProp, type ThresholdSnapshot, type TypedForwardRef, type TypedMemo, type ViewAmountToken, type ViewStyle, type ViewToken, type ViewabilityAmountCallback, type ViewabilityCallback, type ViewabilityConfig, type ViewabilityConfigCallbackPair, type ViewabilityConfigCallbackPairs, type ViewableRange, typedForwardRef, typedMemo, useIsLastItem, useListScrollSize, useRecyclingEffect, useRecyclingState, useSyncLayout, useViewability, useViewabilityAmount };