@legendapp/list 2.0.0 → 2.1.0-beta.0

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/index.d.mts CHANGED
@@ -1,10 +1,13 @@
1
1
  import * as React$1 from 'react';
2
2
  import { ComponentProps, ReactNode, Dispatch, SetStateAction } from 'react';
3
- import { View, Animated, ScrollView, LayoutRectangle, ScrollViewComponent, ScrollResponderMixin, StyleProp, ViewStyle, NativeSyntheticEvent, NativeScrollEvent, ScrollViewProps } from 'react-native';
3
+ import { View, ScrollView, Animated, LayoutRectangle, ScrollViewComponent, ScrollResponderMixin, StyleProp, ViewStyle, NativeSyntheticEvent, NativeScrollEvent, ScrollViewProps } from 'react-native';
4
4
  import Animated$1 from 'react-native-reanimated';
5
5
 
6
- type ListenerType = "numContainers" | "numContainersPooled" | `containerItemKey${number}` | `containerItemData${number}` | `containerPosition${number}` | `containerColumn${number}` | `containerSticky${number}` | `containerStickyOffset${number}` | "containersDidLayout" | "extraData" | "numColumns" | "lastItemKeys" | "totalSize" | "alignItemsPaddingTop" | "stylePaddingTop" | "scrollAdjust" | "scrollAdjustUserOffset" | "headerSize" | "footerSize" | "maintainVisibleContentPosition" | "debugRawScroll" | "debugComputedScroll" | "otherAxisSize" | "snapToOffsets" | "scrollSize";
6
+ type AnimatedValue = number;
7
+
8
+ type ListenerType = "numContainers" | "numContainersPooled" | `containerItemKey${number}` | `containerItemData${number}` | `containerPosition${number}` | `containerColumn${number}` | `containerSticky${number}` | `containerStickyOffset${number}` | "containersDidLayout" | "extraData" | "numColumns" | "lastItemKeys" | "totalSize" | "alignItemsPaddingTop" | "stylePaddingTop" | "scrollAdjust" | "scrollAdjustUserOffset" | "headerSize" | "footerSize" | "maintainVisibleContentPosition" | "debugRawScroll" | "debugComputedScroll" | "otherAxisSize" | "snapToOffsets" | "scrollSize" | "lastPositionUpdate";
7
9
  interface StateContext {
10
+ internalState: InternalState | undefined;
8
11
  listeners: Map<ListenerType, Set<(value: any) => void>>;
9
12
  values: Map<ListenerType, any>;
10
13
  mapViewabilityCallbacks: Map<string, ViewabilityCallback>;
@@ -20,7 +23,7 @@ interface StateContext {
20
23
  }>;
21
24
  columnWrapperStyle: ColumnWrapperStyle | undefined;
22
25
  viewRefs: Map<number, React$1.RefObject<View>>;
23
- animatedScrollY: Animated.Value;
26
+ animatedScrollY: AnimatedValue;
24
27
  }
25
28
 
26
29
  declare class ScrollAdjustHandler {
@@ -358,6 +361,7 @@ interface InternalState {
358
361
  stickyContainers: Map<number, number>;
359
362
  stickyContainerPool: Set<number>;
360
363
  scrollProcessingEnabled: boolean;
364
+ onScrollRafScheduled?: boolean;
361
365
  props: {
362
366
  alignItemsAtEnd: boolean;
363
367
  data: readonly any[];
package/index.d.ts CHANGED
@@ -1,10 +1,13 @@
1
1
  import * as React$1 from 'react';
2
2
  import { ComponentProps, ReactNode, Dispatch, SetStateAction } from 'react';
3
- import { View, Animated, ScrollView, LayoutRectangle, ScrollViewComponent, ScrollResponderMixin, StyleProp, ViewStyle, NativeSyntheticEvent, NativeScrollEvent, ScrollViewProps } from 'react-native';
3
+ import { View, ScrollView, Animated, LayoutRectangle, ScrollViewComponent, ScrollResponderMixin, StyleProp, ViewStyle, NativeSyntheticEvent, NativeScrollEvent, ScrollViewProps } from 'react-native';
4
4
  import Animated$1 from 'react-native-reanimated';
5
5
 
6
- type ListenerType = "numContainers" | "numContainersPooled" | `containerItemKey${number}` | `containerItemData${number}` | `containerPosition${number}` | `containerColumn${number}` | `containerSticky${number}` | `containerStickyOffset${number}` | "containersDidLayout" | "extraData" | "numColumns" | "lastItemKeys" | "totalSize" | "alignItemsPaddingTop" | "stylePaddingTop" | "scrollAdjust" | "scrollAdjustUserOffset" | "headerSize" | "footerSize" | "maintainVisibleContentPosition" | "debugRawScroll" | "debugComputedScroll" | "otherAxisSize" | "snapToOffsets" | "scrollSize";
6
+ type AnimatedValue = number;
7
+
8
+ type ListenerType = "numContainers" | "numContainersPooled" | `containerItemKey${number}` | `containerItemData${number}` | `containerPosition${number}` | `containerColumn${number}` | `containerSticky${number}` | `containerStickyOffset${number}` | "containersDidLayout" | "extraData" | "numColumns" | "lastItemKeys" | "totalSize" | "alignItemsPaddingTop" | "stylePaddingTop" | "scrollAdjust" | "scrollAdjustUserOffset" | "headerSize" | "footerSize" | "maintainVisibleContentPosition" | "debugRawScroll" | "debugComputedScroll" | "otherAxisSize" | "snapToOffsets" | "scrollSize" | "lastPositionUpdate";
7
9
  interface StateContext {
10
+ internalState: InternalState | undefined;
8
11
  listeners: Map<ListenerType, Set<(value: any) => void>>;
9
12
  values: Map<ListenerType, any>;
10
13
  mapViewabilityCallbacks: Map<string, ViewabilityCallback>;
@@ -20,7 +23,7 @@ interface StateContext {
20
23
  }>;
21
24
  columnWrapperStyle: ColumnWrapperStyle | undefined;
22
25
  viewRefs: Map<number, React$1.RefObject<View>>;
23
- animatedScrollY: Animated.Value;
26
+ animatedScrollY: AnimatedValue;
24
27
  }
25
28
 
26
29
  declare class ScrollAdjustHandler {
@@ -358,6 +361,7 @@ interface InternalState {
358
361
  stickyContainers: Map<number, number>;
359
362
  stickyContainerPool: Set<number>;
360
363
  scrollProcessingEnabled: boolean;
364
+ onScrollRafScheduled?: boolean;
361
365
  props: {
362
366
  alignItemsAtEnd: boolean;
363
367
  data: readonly any[];