@legendapp/list 3.0.0-beta.53 → 3.0.0-beta.55
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/animated.d.ts +25 -9
- package/index.d.ts +32 -12
- package/index.js +716 -292
- package/index.mjs +716 -292
- package/index.native.js +581 -264
- package/index.native.mjs +582 -265
- package/keyboard-chat.d.ts +17 -2
- package/keyboard-chat.js +29 -0
- package/keyboard-chat.mjs +30 -2
- package/keyboard-test.d.ts +5 -0
- package/keyboard.d.ts +5 -0
- package/package.json +1 -1
- package/react-native.d.ts +26 -10
- package/react-native.js +581 -264
- package/react-native.mjs +582 -265
- package/react-native.web.d.ts +26 -10
- package/react-native.web.js +716 -292
- package/react-native.web.mjs +716 -292
- package/react.d.ts +26 -10
- package/react.js +716 -292
- package/react.mjs +716 -292
- package/reanimated.d.ts +25 -9
- package/reanimated.js +1 -1
- package/reanimated.mjs +1 -1
- package/section-list.d.ts +25 -9
package/animated.d.ts
CHANGED
|
@@ -154,7 +154,10 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
154
154
|
*/
|
|
155
155
|
extraData?: any;
|
|
156
156
|
/**
|
|
157
|
-
*
|
|
157
|
+
* Optional per-item size estimate used before a row is measured.
|
|
158
|
+
*
|
|
159
|
+
* @deprecated Prefer a single `estimatedItemSize` for initial size hints, or `getFixedItemSize`
|
|
160
|
+
* when item sizes are known exactly.
|
|
158
161
|
*/
|
|
159
162
|
getEstimatedItemSize?: (item: ItemT, index: number, type: TItemType) => number;
|
|
160
163
|
/**
|
|
@@ -172,8 +175,9 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
172
175
|
leadingItem: ItemT;
|
|
173
176
|
}>;
|
|
174
177
|
/**
|
|
175
|
-
* Ratio
|
|
176
|
-
* @
|
|
178
|
+
* Ratio used to size the initial recycled container pool.
|
|
179
|
+
* @deprecated The list now manages spare container capacity automatically.
|
|
180
|
+
* @default 3
|
|
177
181
|
*/
|
|
178
182
|
initialContainerPoolRatio?: number | undefined;
|
|
179
183
|
/**
|
|
@@ -224,6 +228,13 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
224
228
|
* Style for the header component.
|
|
225
229
|
*/
|
|
226
230
|
ListHeaderComponentStyle?: StyleProp<ViewStyle> | undefined;
|
|
231
|
+
/**
|
|
232
|
+
* Estimated height of the ListHeaderComponent. Provide this when the expected header height
|
|
233
|
+
* is known before layout so that only the items actually visible below the header are rendered
|
|
234
|
+
* on the initial frame, rather than a full screen's worth of items that are hidden behind it.
|
|
235
|
+
* The measured header size still replaces this value after layout.
|
|
236
|
+
*/
|
|
237
|
+
estimatedHeaderSize?: number;
|
|
227
238
|
/**
|
|
228
239
|
* If true, auto-scrolls to end when new items are added.
|
|
229
240
|
* Use an options object to opt into specific triggers and control whether that scroll is animated.
|
|
@@ -258,6 +269,12 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
258
269
|
* @default 1
|
|
259
270
|
*/
|
|
260
271
|
numColumns?: number;
|
|
272
|
+
/**
|
|
273
|
+
* Force RTL mode for this list instance.
|
|
274
|
+
* When undefined, uses React Native's global I18nManager.isRTL.
|
|
275
|
+
* @default undefined
|
|
276
|
+
*/
|
|
277
|
+
rtl?: boolean;
|
|
261
278
|
/**
|
|
262
279
|
* Called when scrolling reaches the end within onEndReachedThreshold.
|
|
263
280
|
*/
|
|
@@ -354,12 +371,6 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
354
371
|
* Array of item indices to use as snap points.
|
|
355
372
|
*/
|
|
356
373
|
snapToIndices?: number[];
|
|
357
|
-
/**
|
|
358
|
-
* This will log a suggested estimatedItemSize.
|
|
359
|
-
* @required
|
|
360
|
-
* @default false
|
|
361
|
-
*/
|
|
362
|
-
suggestEstimatedItemSize?: boolean;
|
|
363
374
|
/**
|
|
364
375
|
* Configuration for determining item viewability.
|
|
365
376
|
*/
|
|
@@ -448,6 +459,10 @@ interface LegendListMetrics {
|
|
|
448
459
|
headerSize: number;
|
|
449
460
|
footerSize: number;
|
|
450
461
|
}
|
|
462
|
+
interface LegendListAverageItemSize {
|
|
463
|
+
average: number;
|
|
464
|
+
count: number;
|
|
465
|
+
}
|
|
451
466
|
interface LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
452
467
|
data: readonly ItemT[];
|
|
453
468
|
extraData: any;
|
|
@@ -469,6 +484,7 @@ type LegendListState = {
|
|
|
469
484
|
isEndReached: boolean;
|
|
470
485
|
isStartReached: boolean;
|
|
471
486
|
isWithinMaintainScrollAtEndThreshold: boolean;
|
|
487
|
+
getAverageItemSizes: () => Record<string, LegendListAverageItemSize>;
|
|
472
488
|
listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
|
|
473
489
|
listenToPosition: (key: string, callback: (value: number) => void) => () => void;
|
|
474
490
|
positionAtIndex: (index: number) => number;
|
package/index.d.ts
CHANGED
|
@@ -210,6 +210,7 @@ interface InternalState$1 {
|
|
|
210
210
|
time: number;
|
|
211
211
|
}>;
|
|
212
212
|
scrollingTo?: InternalScrollTarget | undefined;
|
|
213
|
+
horizontalRTLScrollType?: "normal" | "inverted" | "negative";
|
|
213
214
|
scrollLastCalculate?: number;
|
|
214
215
|
scrollLength: number;
|
|
215
216
|
scrollPending: number;
|
|
@@ -228,7 +229,6 @@ interface InternalState$1 {
|
|
|
228
229
|
stickyContainers: Map<number, number>;
|
|
229
230
|
timeouts: Set<number>;
|
|
230
231
|
timeoutSetPaddingTop?: any;
|
|
231
|
-
timeoutSizeMessage: any;
|
|
232
232
|
timeoutCheckFinishedScrollFallback?: any;
|
|
233
233
|
totalSize: number;
|
|
234
234
|
triggerCalculateItemsInView?: (params?: {
|
|
@@ -255,6 +255,7 @@ interface InternalState$1 {
|
|
|
255
255
|
getFixedItemSize: LegendListPropsInternal["getFixedItemSize"];
|
|
256
256
|
getItemType: LegendListPropsInternal["getItemType"];
|
|
257
257
|
horizontal: boolean;
|
|
258
|
+
rtl?: boolean;
|
|
258
259
|
initialContainerPoolRatio: number;
|
|
259
260
|
itemsAreEqual: LegendListPropsInternal["itemsAreEqual"];
|
|
260
261
|
keyExtractor: LegendListPropsInternal["keyExtractor"];
|
|
@@ -280,8 +281,9 @@ interface InternalState$1 {
|
|
|
280
281
|
stickyIndicesArr: number[];
|
|
281
282
|
stickyIndicesSet: Set<number>;
|
|
282
283
|
stylePaddingBottom: number | undefined;
|
|
284
|
+
stylePaddingLeft: number | undefined;
|
|
285
|
+
stylePaddingRight: number | undefined;
|
|
283
286
|
stylePaddingTop: number | undefined;
|
|
284
|
-
suggestEstimatedItemSize: boolean;
|
|
285
287
|
useWindowScroll: boolean;
|
|
286
288
|
};
|
|
287
289
|
}
|
|
@@ -480,7 +482,10 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
480
482
|
*/
|
|
481
483
|
extraData?: any;
|
|
482
484
|
/**
|
|
483
|
-
*
|
|
485
|
+
* Optional per-item size estimate used before a row is measured.
|
|
486
|
+
*
|
|
487
|
+
* @deprecated Prefer a single `estimatedItemSize` for initial size hints, or `getFixedItemSize`
|
|
488
|
+
* when item sizes are known exactly.
|
|
484
489
|
*/
|
|
485
490
|
getEstimatedItemSize?: (item: ItemT, index: number, type: TItemType) => number;
|
|
486
491
|
/**
|
|
@@ -498,8 +503,9 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
498
503
|
leadingItem: ItemT;
|
|
499
504
|
}>;
|
|
500
505
|
/**
|
|
501
|
-
* Ratio
|
|
502
|
-
* @
|
|
506
|
+
* Ratio used to size the initial recycled container pool.
|
|
507
|
+
* @deprecated The list now manages spare container capacity automatically.
|
|
508
|
+
* @default 3
|
|
503
509
|
*/
|
|
504
510
|
initialContainerPoolRatio?: number | undefined;
|
|
505
511
|
/**
|
|
@@ -550,6 +556,13 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
550
556
|
* Style for the header component.
|
|
551
557
|
*/
|
|
552
558
|
ListHeaderComponentStyle?: StyleProp$1<ViewStyle$1> | undefined;
|
|
559
|
+
/**
|
|
560
|
+
* Estimated height of the ListHeaderComponent. Provide this when the expected header height
|
|
561
|
+
* is known before layout so that only the items actually visible below the header are rendered
|
|
562
|
+
* on the initial frame, rather than a full screen's worth of items that are hidden behind it.
|
|
563
|
+
* The measured header size still replaces this value after layout.
|
|
564
|
+
*/
|
|
565
|
+
estimatedHeaderSize?: number;
|
|
553
566
|
/**
|
|
554
567
|
* If true, auto-scrolls to end when new items are added.
|
|
555
568
|
* Use an options object to opt into specific triggers and control whether that scroll is animated.
|
|
@@ -584,6 +597,12 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
584
597
|
* @default 1
|
|
585
598
|
*/
|
|
586
599
|
numColumns?: number;
|
|
600
|
+
/**
|
|
601
|
+
* Force RTL mode for this list instance.
|
|
602
|
+
* When undefined, uses React Native's global I18nManager.isRTL.
|
|
603
|
+
* @default undefined
|
|
604
|
+
*/
|
|
605
|
+
rtl?: boolean;
|
|
587
606
|
/**
|
|
588
607
|
* Called when scrolling reaches the end within onEndReachedThreshold.
|
|
589
608
|
*/
|
|
@@ -680,12 +699,6 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
680
699
|
* Array of item indices to use as snap points.
|
|
681
700
|
*/
|
|
682
701
|
snapToIndices?: number[];
|
|
683
|
-
/**
|
|
684
|
-
* This will log a suggested estimatedItemSize.
|
|
685
|
-
* @required
|
|
686
|
-
* @default false
|
|
687
|
-
*/
|
|
688
|
-
suggestEstimatedItemSize?: boolean;
|
|
689
702
|
/**
|
|
690
703
|
* Configuration for determining item viewability.
|
|
691
704
|
*/
|
|
@@ -774,6 +787,10 @@ interface LegendListMetrics$1 {
|
|
|
774
787
|
headerSize: number;
|
|
775
788
|
footerSize: number;
|
|
776
789
|
}
|
|
790
|
+
interface LegendListAverageItemSize$1 {
|
|
791
|
+
average: number;
|
|
792
|
+
count: number;
|
|
793
|
+
}
|
|
777
794
|
interface LegendListRenderItemProps$1<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
778
795
|
data: readonly ItemT[];
|
|
779
796
|
extraData: any;
|
|
@@ -795,6 +812,7 @@ type LegendListState$1 = {
|
|
|
795
812
|
isEndReached: boolean;
|
|
796
813
|
isStartReached: boolean;
|
|
797
814
|
isWithinMaintainScrollAtEndThreshold: boolean;
|
|
815
|
+
getAverageItemSizes: () => Record<string, LegendListAverageItemSize$1>;
|
|
798
816
|
listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
|
|
799
817
|
listenToPosition: (key: string, callback: (value: number) => void) => () => void;
|
|
800
818
|
positionAtIndex: (index: number) => number;
|
|
@@ -1045,6 +1063,8 @@ type ColumnWrapperStyle = ColumnWrapperStyle$1;
|
|
|
1045
1063
|
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1046
1064
|
type LegendListMetrics = LegendListMetrics$1;
|
|
1047
1065
|
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1066
|
+
type LegendListAverageItemSize = LegendListAverageItemSize$1;
|
|
1067
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1048
1068
|
type ThresholdSnapshot = ThresholdSnapshot$1;
|
|
1049
1069
|
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1050
1070
|
type ScrollTarget = ScrollTarget$1;
|
|
@@ -1331,4 +1351,4 @@ declare function useSyncLayout(): () => void;
|
|
|
1331
1351
|
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1332
1352
|
declare const LegendList: LegendListComponent;
|
|
1333
1353
|
|
|
1334
|
-
export { type AccessibilityActionEvent, type AccessibilityRole, type AccessibilityState, type AccessibilityValue, type AlwaysRenderConfig, type AnchoredEndSpaceConfig, 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 OnViewableItemsChangedInfo, 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 };
|
|
1354
|
+
export { type AccessibilityActionEvent, type AccessibilityRole, type AccessibilityState, type AccessibilityValue, type AlwaysRenderConfig, type AnchoredEndSpaceConfig, type BaseScrollViewProps, type ColorValue, type ColumnWrapperStyle, type GestureResponderEvent, type GetRenderedItem, type GetRenderedItemResult, type InitialScrollAnchor, type Insets, type InternalState, type LayoutChangeEvent, type LayoutRectangle, LegendList, type LegendListAverageItemSize, 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 OnViewableItemsChangedInfo, 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 };
|