@legendapp/list 3.3.2 → 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.
package/react.d.ts CHANGED
@@ -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}` | `containerItemInfo${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;
@@ -72,7 +73,7 @@ type ListenerTypeValueMap = {
72
73
  } & {
73
74
  [K in ListenerType as K extends `containerItemData${number}` ? K : never]: any;
74
75
  } & {
75
- [K in ListenerType as K extends `containerItemInfo${number}` ? K : never]: ContainerItemInfo;
76
+ [K in ListenerType as K extends `containerItemIndex${number}` ? K : never]: number;
76
77
  } & {
77
78
  [K in ListenerType as K extends `containerPosition${number}` ? K : never]: number;
78
79
  } & {
@@ -82,11 +83,6 @@ type ListenerTypeValueMap = {
82
83
  } & {
83
84
  [K in ListenerType as K extends `containerSticky${number}` ? K : never]: boolean;
84
85
  };
85
- interface ContainerItemInfo {
86
- index: number;
87
- itemKey: string;
88
- value: any;
89
- }
90
86
 
91
87
  interface Insets {
92
88
  top: number;
@@ -590,6 +586,10 @@ type LegendListRef$1 = {
590
586
  * Returns the native ScrollView component reference.
591
587
  */
592
588
  getNativeScrollRef(): any;
589
+ /**
590
+ * Returns the underlying animatable scroll component reference.
591
+ */
592
+ getAnimatableRef(): any;
593
593
  /**
594
594
  * Returns the scroll responder instance for handling scroll events.
595
595
  */
@@ -789,6 +789,7 @@ interface LooseScrollViewProps {
789
789
  onMomentumScrollBegin?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
790
790
  onMomentumScrollEnd?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
791
791
  onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
792
+ onScrollBeginDrag?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
792
793
  refreshControl?: ReactElement | null;
793
794
  removeClippedSubviews?: boolean;
794
795
  scrollEventThrottle?: number;
@@ -800,7 +801,7 @@ interface LooseScrollViewProps {
800
801
 
801
802
  interface AnchoredEndSpaceConfig extends Omit<AnchoredEndSpaceConfig$1, "includeInEndInset"> {
802
803
  }
803
- 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"> & {
804
805
  style?: CSSProperties;
805
806
  contentContainerClassName?: string;
806
807
  contentContainerStyle?: CSSProperties;
@@ -814,7 +815,8 @@ type LegendListPropsOverrides<ItemT, TItemType extends string | undefined> = Omi
814
815
  ListFooterComponentStyle?: CSSProperties | undefined;
815
816
  };
816
817
  type LegendListProps<ItemT = any, TItemType extends string | undefined = string | undefined> = LegendListPropsOverrides<ItemT, TItemType>;
817
- type LegendListRef = Omit<LegendListRef$1, "getNativeScrollRef" | "getScrollableNode" | "getScrollResponder"> & {
818
+ type LegendListRef = Omit<LegendListRef$1, "getAnimatableRef" | "getNativeScrollRef" | "getScrollableNode" | "getScrollResponder"> & {
819
+ getAnimatableRef(): HTMLElement | ScrollViewMethods;
818
820
  getNativeScrollRef(): HTMLElement | ScrollViewMethods;
819
821
  getScrollableNode(): HTMLElement;
820
822
  getScrollResponder(): HTMLElement | null;