@legendapp/list 2.0.0-next.3 → 2.0.0-next.4

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,9 +1,9 @@
1
+ import * as _legendapp_list_reanimated from '@legendapp/list/reanimated';
1
2
  import * as React$1 from 'react';
2
3
  import { ComponentProps, ReactNode, Dispatch, SetStateAction } from 'react';
3
4
  import * as react_native from 'react-native';
4
5
  import { View, ScrollView, Animated, StyleProp, ViewStyle, ScrollViewProps, LayoutRectangle, NativeSyntheticEvent, NativeScrollEvent, ScrollViewComponent, ScrollResponderMixin } from 'react-native';
5
6
  import Animated$1 from 'react-native-reanimated';
6
- import * as _legendapp_list_reanimated from '@legendapp/list/reanimated';
7
7
 
8
8
  type ListenerType = "numContainers" | "numContainersPooled" | `containerItemKey${number}` | `containerItemData${number}` | `containerPosition${number}` | `containerColumn${number}` | "containersDidLayout" | "extraData" | "numColumns" | "lastItemKeys" | "totalSize" | "alignItemsPaddingTop" | "stylePaddingTop" | "scrollAdjust" | "scrollAdjustUserOffset" | "headerSize" | "footerSize" | "maintainVisibleContentPosition" | "debugRawScroll" | "debugComputedScroll" | "otherAxisSize" | "snapToOffsets" | "scrollSize";
9
9
  interface StateContext {
@@ -559,7 +559,11 @@ type GetRenderedItemResult<ItemT> = {
559
559
  };
560
560
  type GetRenderedItem = (key: string) => GetRenderedItemResult<any> | null;
561
561
 
562
- declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
562
+ interface LazyLegendListProps<ItemT, ListT> extends Omit<LegendListProps<ItemT>, "data" | "keyExtractor" | "renderItem"> {
563
+ children?: React$1.ReactNode | undefined;
564
+ LegendList?: ListT;
565
+ }
566
+ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
563
567
  alignItemsAtEnd?: boolean;
564
568
  columnWrapperStyle?: ColumnWrapperStyle;
565
569
  data: readonly T[];
@@ -610,9 +614,9 @@ declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "sc
610
614
  onViewableItemsChanged?: OnViewableItemsChanged | undefined;
611
615
  progressViewOffset?: number;
612
616
  recycleItems?: boolean;
613
- refScrollView?: React$1.Ref<ScrollView>;
617
+ refScrollView?: React$1.Ref<react_native.ScrollView>;
614
618
  refreshing?: boolean;
615
- renderItem?: React$1.ComponentType<LegendListRenderItemProps<T>> | ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | undefined;
619
+ renderItem?: ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<LegendListRenderItemProps<T>> | undefined;
616
620
  renderScrollComponent?: (props: react_native.ScrollViewProps) => React$1.ReactElement<react_native.ScrollViewProps>;
617
621
  suggestEstimatedItemSize?: boolean;
618
622
  viewabilityConfig?: ViewabilityConfig;
@@ -622,13 +626,7 @@ declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "sc
622
626
  elapsedTimeInMs: number;
623
627
  }) => void;
624
628
  snapToIndices?: number[];
625
- } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode;
626
-
627
- interface LazyLegendListProps<ItemT, ListT> extends Omit<LegendListProps<ItemT>, "data" | "keyExtractor" | "renderItem"> {
628
- children?: React$1.ReactNode | undefined;
629
- LegendList?: ListT;
630
- }
631
- declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
629
+ } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
632
630
  alignItemsAtEnd?: boolean;
633
631
  columnWrapperStyle?: ColumnWrapperStyle;
634
632
  data: readonly T[];
@@ -681,7 +679,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
681
679
  recycleItems?: boolean;
682
680
  refScrollView?: React$1.Ref<react_native.ScrollView>;
683
681
  refreshing?: boolean;
684
- renderItem?: React$1.ComponentType<LegendListRenderItemProps<T>> | ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | undefined;
682
+ renderItem?: ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<LegendListRenderItemProps<T>> | undefined;
685
683
  renderScrollComponent?: (props: react_native.ScrollViewProps) => React$1.ReactElement<react_native.ScrollViewProps>;
686
684
  suggestEstimatedItemSize?: boolean;
687
685
  viewabilityConfig?: ViewabilityConfig;
@@ -691,7 +689,9 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
691
689
  elapsedTimeInMs: number;
692
690
  }) => void;
693
691
  snapToIndices?: number[];
694
- } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
692
+ } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode)> | (<ItemT_1>(props: _legendapp_list_reanimated.AnimatedLegendListProps<ItemT_1> & {
693
+ ref?: React$1.Ref<LegendListRef>;
694
+ }) => React$1.ReactElement | null) = <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
695
695
  alignItemsAtEnd?: boolean;
696
696
  columnWrapperStyle?: ColumnWrapperStyle;
697
697
  data: readonly T[];
@@ -744,7 +744,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
744
744
  recycleItems?: boolean;
745
745
  refScrollView?: React$1.Ref<react_native.ScrollView>;
746
746
  refreshing?: boolean;
747
- renderItem?: React$1.ComponentType<LegendListRenderItemProps<T>> | ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | undefined;
747
+ renderItem?: ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<LegendListRenderItemProps<T>> | undefined;
748
748
  renderScrollComponent?: (props: react_native.ScrollViewProps) => React$1.ReactElement<react_native.ScrollViewProps>;
749
749
  suggestEstimatedItemSize?: boolean;
750
750
  viewabilityConfig?: ViewabilityConfig;
@@ -754,9 +754,9 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
754
754
  elapsedTimeInMs: number;
755
755
  }) => void;
756
756
  snapToIndices?: number[];
757
- } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode)> | (<ItemT_1>(props: _legendapp_list_reanimated.AnimatedLegendListProps<ItemT_1> & {
758
- ref?: React$1.Ref<LegendListRef>;
759
- }) => React$1.ReactElement | null) = <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
757
+ } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode>(props: LazyLegendListProps<ItemT, ListT> & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode;
758
+
759
+ declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
760
760
  alignItemsAtEnd?: boolean;
761
761
  columnWrapperStyle?: ColumnWrapperStyle;
762
762
  data: readonly T[];
@@ -807,9 +807,9 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
807
807
  onViewableItemsChanged?: OnViewableItemsChanged | undefined;
808
808
  progressViewOffset?: number;
809
809
  recycleItems?: boolean;
810
- refScrollView?: React$1.Ref<react_native.ScrollView>;
810
+ refScrollView?: React$1.Ref<ScrollView>;
811
811
  refreshing?: boolean;
812
- renderItem?: React$1.ComponentType<LegendListRenderItemProps<T>> | ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | undefined;
812
+ renderItem?: ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<LegendListRenderItemProps<T>> | undefined;
813
813
  renderScrollComponent?: (props: react_native.ScrollViewProps) => React$1.ReactElement<react_native.ScrollViewProps>;
814
814
  suggestEstimatedItemSize?: boolean;
815
815
  viewabilityConfig?: ViewabilityConfig;
@@ -819,7 +819,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
819
819
  elapsedTimeInMs: number;
820
820
  }) => void;
821
821
  snapToIndices?: number[];
822
- } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode>(props: LazyLegendListProps<ItemT, ListT> & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode;
822
+ } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode;
823
823
 
824
824
  declare function useViewability(callback: ViewabilityCallback, configId?: string): void;
825
825
  declare function useViewabilityAmount(callback: ViewabilityAmountCallback): void;
package/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
+ import * as _legendapp_list_reanimated from '@legendapp/list/reanimated';
1
2
  import * as React$1 from 'react';
2
3
  import { ComponentProps, ReactNode, Dispatch, SetStateAction } from 'react';
3
4
  import * as react_native from 'react-native';
4
5
  import { View, ScrollView, Animated, StyleProp, ViewStyle, ScrollViewProps, LayoutRectangle, NativeSyntheticEvent, NativeScrollEvent, ScrollViewComponent, ScrollResponderMixin } from 'react-native';
5
6
  import Animated$1 from 'react-native-reanimated';
6
- import * as _legendapp_list_reanimated from '@legendapp/list/reanimated';
7
7
 
8
8
  type ListenerType = "numContainers" | "numContainersPooled" | `containerItemKey${number}` | `containerItemData${number}` | `containerPosition${number}` | `containerColumn${number}` | "containersDidLayout" | "extraData" | "numColumns" | "lastItemKeys" | "totalSize" | "alignItemsPaddingTop" | "stylePaddingTop" | "scrollAdjust" | "scrollAdjustUserOffset" | "headerSize" | "footerSize" | "maintainVisibleContentPosition" | "debugRawScroll" | "debugComputedScroll" | "otherAxisSize" | "snapToOffsets" | "scrollSize";
9
9
  interface StateContext {
@@ -559,7 +559,11 @@ type GetRenderedItemResult<ItemT> = {
559
559
  };
560
560
  type GetRenderedItem = (key: string) => GetRenderedItemResult<any> | null;
561
561
 
562
- declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
562
+ interface LazyLegendListProps<ItemT, ListT> extends Omit<LegendListProps<ItemT>, "data" | "keyExtractor" | "renderItem"> {
563
+ children?: React$1.ReactNode | undefined;
564
+ LegendList?: ListT;
565
+ }
566
+ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
563
567
  alignItemsAtEnd?: boolean;
564
568
  columnWrapperStyle?: ColumnWrapperStyle;
565
569
  data: readonly T[];
@@ -610,9 +614,9 @@ declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "sc
610
614
  onViewableItemsChanged?: OnViewableItemsChanged | undefined;
611
615
  progressViewOffset?: number;
612
616
  recycleItems?: boolean;
613
- refScrollView?: React$1.Ref<ScrollView>;
617
+ refScrollView?: React$1.Ref<react_native.ScrollView>;
614
618
  refreshing?: boolean;
615
- renderItem?: React$1.ComponentType<LegendListRenderItemProps<T>> | ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | undefined;
619
+ renderItem?: ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<LegendListRenderItemProps<T>> | undefined;
616
620
  renderScrollComponent?: (props: react_native.ScrollViewProps) => React$1.ReactElement<react_native.ScrollViewProps>;
617
621
  suggestEstimatedItemSize?: boolean;
618
622
  viewabilityConfig?: ViewabilityConfig;
@@ -622,13 +626,7 @@ declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "sc
622
626
  elapsedTimeInMs: number;
623
627
  }) => void;
624
628
  snapToIndices?: number[];
625
- } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode;
626
-
627
- interface LazyLegendListProps<ItemT, ListT> extends Omit<LegendListProps<ItemT>, "data" | "keyExtractor" | "renderItem"> {
628
- children?: React$1.ReactNode | undefined;
629
- LegendList?: ListT;
630
- }
631
- declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
629
+ } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
632
630
  alignItemsAtEnd?: boolean;
633
631
  columnWrapperStyle?: ColumnWrapperStyle;
634
632
  data: readonly T[];
@@ -681,7 +679,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
681
679
  recycleItems?: boolean;
682
680
  refScrollView?: React$1.Ref<react_native.ScrollView>;
683
681
  refreshing?: boolean;
684
- renderItem?: React$1.ComponentType<LegendListRenderItemProps<T>> | ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | undefined;
682
+ renderItem?: ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<LegendListRenderItemProps<T>> | undefined;
685
683
  renderScrollComponent?: (props: react_native.ScrollViewProps) => React$1.ReactElement<react_native.ScrollViewProps>;
686
684
  suggestEstimatedItemSize?: boolean;
687
685
  viewabilityConfig?: ViewabilityConfig;
@@ -691,7 +689,9 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
691
689
  elapsedTimeInMs: number;
692
690
  }) => void;
693
691
  snapToIndices?: number[];
694
- } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
692
+ } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode)> | (<ItemT_1>(props: _legendapp_list_reanimated.AnimatedLegendListProps<ItemT_1> & {
693
+ ref?: React$1.Ref<LegendListRef>;
694
+ }) => React$1.ReactElement | null) = <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
695
695
  alignItemsAtEnd?: boolean;
696
696
  columnWrapperStyle?: ColumnWrapperStyle;
697
697
  data: readonly T[];
@@ -744,7 +744,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
744
744
  recycleItems?: boolean;
745
745
  refScrollView?: React$1.Ref<react_native.ScrollView>;
746
746
  refreshing?: boolean;
747
- renderItem?: React$1.ComponentType<LegendListRenderItemProps<T>> | ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | undefined;
747
+ renderItem?: ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<LegendListRenderItemProps<T>> | undefined;
748
748
  renderScrollComponent?: (props: react_native.ScrollViewProps) => React$1.ReactElement<react_native.ScrollViewProps>;
749
749
  suggestEstimatedItemSize?: boolean;
750
750
  viewabilityConfig?: ViewabilityConfig;
@@ -754,9 +754,9 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
754
754
  elapsedTimeInMs: number;
755
755
  }) => void;
756
756
  snapToIndices?: number[];
757
- } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode)> | (<ItemT_1>(props: _legendapp_list_reanimated.AnimatedLegendListProps<ItemT_1> & {
758
- ref?: React$1.Ref<LegendListRef>;
759
- }) => React$1.ReactElement | null) = <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
757
+ } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode>(props: LazyLegendListProps<ItemT, ListT> & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode;
758
+
759
+ declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
760
760
  alignItemsAtEnd?: boolean;
761
761
  columnWrapperStyle?: ColumnWrapperStyle;
762
762
  data: readonly T[];
@@ -807,9 +807,9 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
807
807
  onViewableItemsChanged?: OnViewableItemsChanged | undefined;
808
808
  progressViewOffset?: number;
809
809
  recycleItems?: boolean;
810
- refScrollView?: React$1.Ref<react_native.ScrollView>;
810
+ refScrollView?: React$1.Ref<ScrollView>;
811
811
  refreshing?: boolean;
812
- renderItem?: React$1.ComponentType<LegendListRenderItemProps<T>> | ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | undefined;
812
+ renderItem?: ((props: LegendListRenderItemProps<T>) => React$1.ReactNode) | React$1.ComponentType<LegendListRenderItemProps<T>> | undefined;
813
813
  renderScrollComponent?: (props: react_native.ScrollViewProps) => React$1.ReactElement<react_native.ScrollViewProps>;
814
814
  suggestEstimatedItemSize?: boolean;
815
815
  viewabilityConfig?: ViewabilityConfig;
@@ -819,7 +819,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
819
819
  elapsedTimeInMs: number;
820
820
  }) => void;
821
821
  snapToIndices?: number[];
822
- } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode>(props: LazyLegendListProps<ItemT, ListT> & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode;
822
+ } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode;
823
823
 
824
824
  declare function useViewability(callback: ViewabilityCallback, configId?: string): void;
825
825
  declare function useViewabilityAmount(callback: ViewabilityAmountCallback): void;