@legendapp/list 3.3.1 → 3.3.3

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.
@@ -31,12 +31,13 @@ interface MaintainVisibleContentPositionNormalized<ItemT = any> {
31
31
  shouldRestorePosition?: (item: ItemT, index: number, data: readonly ItemT[]) => boolean;
32
32
  }
33
33
 
34
- type ListenerType = "activeStickyIndex" | "alignItemsAtEndPadding" | "anchoredEndSpaceSize" | "debugComputedScroll" | "debugRawScroll" | "extraData" | "footerSize" | "headerSize" | "lastItemKeys" | "lastPositionUpdate" | "maintainVisibleContentPosition" | "numColumns" | "numContainers" | "numContainersPooled" | "otherAxisSize" | "readyToRender" | "scrollAdjust" | "scrollAdjustPending" | "scrollAdjustUserOffset" | "scrollSize" | "snapToOffsets" | "stylePaddingTop" | "totalSize" | "isAtEnd" | "isAtStart" | "isNearEnd" | "isNearStart" | "isWithinMaintainScrollAtEndThreshold" | "adaptiveRender" | `containerColumn${number}` | `containerSpan${number}` | `containerItemData${number}` | `containerItemKey${number}` | `containerPosition${number}` | `containerSticky${number}`;
34
+ type ListenerType = "activeStickyIndex" | "alignItemsAtEndPadding" | "anchoredEndSpaceSize" | "containerLayoutEpoch" | "debugComputedScroll" | "debugRawScroll" | "extraData" | "footerSize" | "headerSize" | "lastItemKeys" | "lastPositionUpdate" | "maintainVisibleContentPosition" | "numColumns" | "numContainers" | "numContainersPooled" | "otherAxisSize" | "readyToRender" | "scrollAdjust" | "scrollAdjustPending" | "scrollAdjustUserOffset" | "scrollSize" | "snapToOffsets" | "stylePaddingTop" | "totalSize" | "isAtEnd" | "isAtStart" | "isNearEnd" | "isNearStart" | "isWithinMaintainScrollAtEndThreshold" | "adaptiveRender" | `containerColumn${number}` | `containerSpan${number}` | `containerItemData${number}` | `containerItemIndex${number}` | `containerItemKey${number}` | `containerPosition${number}` | `containerSticky${number}`;
35
35
  type LegendListListenerType = Extract<ListenerType, "activeStickyIndex" | "anchoredEndSpaceSize" | "footerSize" | "headerSize" | "isAtEnd" | "isAtStart" | "isNearEnd" | "isNearStart" | "isWithinMaintainScrollAtEndThreshold" | "adaptiveRender" | "lastItemKeys" | "lastPositionUpdate" | "numContainers" | "numContainersPooled" | "otherAxisSize" | "readyToRender" | "snapToOffsets" | "totalSize">;
36
36
  type ListenerTypeValueMap = {
37
37
  activeStickyIndex: number;
38
38
  alignItemsAtEndPadding: number;
39
39
  anchoredEndSpaceSize: number;
40
+ containerLayoutEpoch: number;
40
41
  animatedScrollY: any;
41
42
  debugComputedScroll: number;
42
43
  debugRawScroll: number;
@@ -71,6 +72,8 @@ type ListenerTypeValueMap = {
71
72
  [K in ListenerType as K extends `containerItemKey${number}` ? K : never]: string;
72
73
  } & {
73
74
  [K in ListenerType as K extends `containerItemData${number}` ? K : never]: any;
75
+ } & {
76
+ [K in ListenerType as K extends `containerItemIndex${number}` ? K : never]: number;
74
77
  } & {
75
78
  [K in ListenerType as K extends `containerPosition${number}` ? K : never]: number;
76
79
  } & {
@@ -583,6 +586,10 @@ type LegendListRef$1 = {
583
586
  * Returns the native ScrollView component reference.
584
587
  */
585
588
  getNativeScrollRef(): any;
589
+ /**
590
+ * Returns the underlying animatable scroll component reference.
591
+ */
592
+ getAnimatableRef(): any;
586
593
  /**
587
594
  * Returns the scroll responder instance for handling scroll events.
588
595
  */
@@ -782,6 +789,7 @@ interface LooseScrollViewProps {
782
789
  onMomentumScrollBegin?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
783
790
  onMomentumScrollEnd?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
784
791
  onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
792
+ onScrollBeginDrag?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
785
793
  refreshControl?: ReactElement | null;
786
794
  removeClippedSubviews?: boolean;
787
795
  scrollEventThrottle?: number;
@@ -793,7 +801,7 @@ interface LooseScrollViewProps {
793
801
 
794
802
  interface AnchoredEndSpaceConfig extends Omit<AnchoredEndSpaceConfig$1, "includeInEndInset"> {
795
803
  }
796
- type ScrollViewPropsWeb = Omit<LooseScrollViewProps, "style" | "contentContainerStyle" | "onScroll" | "onLayout" | "onMomentumScrollBegin" | "onMomentumScrollEnd" | "pagingEnabled" | "snapToInterval"> & Omit<HTMLAttributes<HTMLDivElement>, "onScroll" | "onLayout" | "style"> & {
804
+ type ScrollViewPropsWeb = Omit<LooseScrollViewProps, "style" | "contentContainerStyle" | "onScroll" | "onLayout" | "onMomentumScrollBegin" | "onMomentumScrollEnd" | "onScrollBeginDrag" | "pagingEnabled" | "snapToInterval"> & Omit<HTMLAttributes<HTMLDivElement>, "onScroll" | "onLayout" | "style"> & {
797
805
  style?: CSSProperties;
798
806
  contentContainerClassName?: string;
799
807
  contentContainerStyle?: CSSProperties;
@@ -807,7 +815,8 @@ type LegendListPropsOverrides<ItemT, TItemType extends string | undefined> = Omi
807
815
  ListFooterComponentStyle?: CSSProperties | undefined;
808
816
  };
809
817
  type LegendListProps<ItemT = any, TItemType extends string | undefined = string | undefined> = LegendListPropsOverrides<ItemT, TItemType>;
810
- type LegendListRef = Omit<LegendListRef$1, "getNativeScrollRef" | "getScrollableNode" | "getScrollResponder"> & {
818
+ type LegendListRef = Omit<LegendListRef$1, "getAnimatableRef" | "getNativeScrollRef" | "getScrollableNode" | "getScrollResponder"> & {
819
+ getAnimatableRef(): HTMLElement | ScrollViewMethods;
811
820
  getNativeScrollRef(): HTMLElement | ScrollViewMethods;
812
821
  getScrollableNode(): HTMLElement;
813
822
  getScrollResponder(): HTMLElement | null;