@legendapp/list 3.0.0-beta.40 → 3.0.0-beta.42
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/README.md +1 -1
- package/animated.d.ts +16 -3
- package/index.d.ts +39 -5
- package/index.js +745 -204
- package/index.mjs +745 -204
- package/index.native.js +795 -288
- package/index.native.mjs +795 -288
- package/package.json +14 -4
- package/react-native.d.ts +37 -5
- package/react-native.js +792 -281
- package/react-native.mjs +792 -281
- package/react-native.web.d.ts +1004 -0
- package/react-native.web.js +5370 -0
- package/react-native.web.mjs +5339 -0
- package/react.d.ts +37 -5
- package/react.js +764 -206
- package/react.mjs +764 -207
- package/reanimated.d.ts +16 -3
- package/section-list.d.ts +16 -3
package/react.d.ts
CHANGED
|
@@ -303,6 +303,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
303
303
|
ListHeaderComponentStyle?: StyleProp<ViewStyle> | undefined;
|
|
304
304
|
/**
|
|
305
305
|
* If true, auto-scrolls to end when new items are added.
|
|
306
|
+
* Use an options object to opt into specific triggers and control whether that scroll is animated.
|
|
306
307
|
* @default false
|
|
307
308
|
*/
|
|
308
309
|
maintainScrollAtEnd?: boolean | MaintainScrollAtEndOptions;
|
|
@@ -481,10 +482,22 @@ interface AlwaysRenderConfig {
|
|
|
481
482
|
indices?: number[];
|
|
482
483
|
keys?: string[];
|
|
483
484
|
}
|
|
485
|
+
interface MaintainScrollAtEndOnOptions {
|
|
486
|
+
dataChange?: boolean;
|
|
487
|
+
itemLayout?: boolean;
|
|
488
|
+
layout?: boolean;
|
|
489
|
+
}
|
|
484
490
|
interface MaintainScrollAtEndOptions {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
491
|
+
/**
|
|
492
|
+
* Whether maintainScrollAtEnd should animate when it scrolls to the end.
|
|
493
|
+
*/
|
|
494
|
+
animated?: boolean;
|
|
495
|
+
/**
|
|
496
|
+
* Which events should keep the list pinned to the end.
|
|
497
|
+
* - If omitted, object values default to all triggers.
|
|
498
|
+
* - If provided, only the keys set to `true` are enabled.
|
|
499
|
+
*/
|
|
500
|
+
on?: MaintainScrollAtEndOnOptions;
|
|
488
501
|
}
|
|
489
502
|
interface ColumnWrapperStyle {
|
|
490
503
|
rowGap?: number;
|
|
@@ -508,6 +521,7 @@ interface ScrollTarget {
|
|
|
508
521
|
itemSize?: number;
|
|
509
522
|
offset: number;
|
|
510
523
|
precomputedWithViewOffset?: boolean;
|
|
524
|
+
targetOffset?: number;
|
|
511
525
|
viewOffset?: number;
|
|
512
526
|
viewPosition?: number;
|
|
513
527
|
}
|
|
@@ -545,7 +559,18 @@ interface InternalState {
|
|
|
545
559
|
ignoreScrollFromMVCPTimeout?: any;
|
|
546
560
|
indexByKey: Map<string, number>;
|
|
547
561
|
initialAnchor?: InitialScrollAnchor;
|
|
562
|
+
initialNativeScrollWatchdog?: {
|
|
563
|
+
startScroll: number;
|
|
564
|
+
targetOffset: number;
|
|
565
|
+
};
|
|
566
|
+
initialScrollLastDidFinish: boolean;
|
|
567
|
+
initialScrollLastTarget: ScrollIndexWithOffsetAndContentOffset | undefined;
|
|
568
|
+
initialScrollLastTargetUsesOffset: boolean;
|
|
569
|
+
initialScrollPreviousDataLength: number;
|
|
570
|
+
initialScrollRetryLastLength: number | undefined;
|
|
571
|
+
initialScrollRetryWindowUntil: number;
|
|
548
572
|
initialScroll: ScrollIndexWithOffsetAndContentOffset | undefined;
|
|
573
|
+
initialScrollUsesOffset: boolean;
|
|
549
574
|
isAtEnd: boolean;
|
|
550
575
|
isAtStart: boolean;
|
|
551
576
|
isEndReached: boolean | null;
|
|
@@ -569,6 +594,13 @@ interface InternalState {
|
|
|
569
594
|
nativeMarginTop: number;
|
|
570
595
|
needsOtherAxisSize?: boolean;
|
|
571
596
|
otherAxisSize?: number;
|
|
597
|
+
pendingNativeMVCPAdjust?: {
|
|
598
|
+
amount: number;
|
|
599
|
+
furthestProgressTowardAmount: number;
|
|
600
|
+
manualApplied: number;
|
|
601
|
+
startScroll: number;
|
|
602
|
+
};
|
|
603
|
+
pendingMaintainScrollAtEnd?: boolean;
|
|
572
604
|
pendingTotalSize?: number;
|
|
573
605
|
pendingScrollResolve?: (() => void) | undefined;
|
|
574
606
|
positions: Array<number | undefined>;
|
|
@@ -633,7 +665,7 @@ interface InternalState {
|
|
|
633
665
|
initialContainerPoolRatio: number;
|
|
634
666
|
itemsAreEqual: LegendListPropsInternal["itemsAreEqual"];
|
|
635
667
|
keyExtractor: LegendListPropsInternal["keyExtractor"];
|
|
636
|
-
maintainScrollAtEnd:
|
|
668
|
+
maintainScrollAtEnd: MaintainScrollAtEndNormalized | undefined;
|
|
637
669
|
maintainScrollAtEndThreshold: number | undefined;
|
|
638
670
|
maintainVisibleContentPosition: MaintainVisibleContentPositionNormalized;
|
|
639
671
|
numColumns: number;
|
|
@@ -969,4 +1001,4 @@ declare function useSyncLayout(): () => void;
|
|
|
969
1001
|
|
|
970
1002
|
declare const LegendList: LegendListComponent;
|
|
971
1003
|
|
|
972
|
-
export { type AlwaysRenderConfig, type BaseScrollViewProps, type ColumnWrapperStyle, type GetRenderedItem, type GetRenderedItemResult, type InitialScrollAnchor, type Insets, type InternalState, type LayoutRectangle, LegendList, type LegendListComponent, type LegendListMetrics, type LegendListProps, type LegendListPropsBase, type LegendListRecyclingState, type LegendListRef, type LegendListRenderItemProps, type LegendListScrollerRef, type LegendListState, type MaintainScrollAtEndOptions, type MaintainVisibleContentPositionConfig, type MaintainVisibleContentPositionNormalized, type NativeScrollEvent, type NativeSyntheticEvent, type OnViewableItemsChanged, type ScrollEventTargetLike, type ScrollIndexWithOffset, type ScrollIndexWithOffsetAndContentOffset, type ScrollIndexWithOffsetPosition, type ScrollTarget, 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 };
|
|
1004
|
+
export { type AlwaysRenderConfig, type BaseScrollViewProps, type ColumnWrapperStyle, type GetRenderedItem, type GetRenderedItemResult, type InitialScrollAnchor, type Insets, type InternalState, type LayoutRectangle, LegendList, type LegendListComponent, type LegendListMetrics, type LegendListProps, type LegendListPropsBase, type LegendListRecyclingState, type LegendListRef, type LegendListRenderItemProps, type LegendListScrollerRef, type LegendListState, type MaintainScrollAtEndOnOptions, type MaintainScrollAtEndOptions, type MaintainVisibleContentPositionConfig, type MaintainVisibleContentPositionNormalized, type NativeScrollEvent, type NativeSyntheticEvent, type OnViewableItemsChanged, type ScrollEventTargetLike, type ScrollIndexWithOffset, type ScrollIndexWithOffsetAndContentOffset, type ScrollIndexWithOffsetPosition, type ScrollTarget, 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 };
|