@legendapp/list 2.0.0-next.15 → 2.0.0-next.16

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/animated.d.mts CHANGED
@@ -3,7 +3,7 @@ import * as _legendapp_list from '@legendapp/list';
3
3
  import * as react_native from 'react-native';
4
4
  import { Animated } from 'react-native';
5
5
 
6
- declare const AnimatedLegendList: Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
6
+ declare const AnimatedLegendList: Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "removeClippedSubviews" | "stickyHeaderIndices" | "children" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
7
7
  alignItemsAtEnd?: boolean;
8
8
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
9
9
  data: readonly T[];
package/animated.d.ts CHANGED
@@ -3,7 +3,7 @@ import * as _legendapp_list from '@legendapp/list';
3
3
  import * as react_native from 'react-native';
4
4
  import { Animated } from 'react-native';
5
5
 
6
- declare const AnimatedLegendList: Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
6
+ declare const AnimatedLegendList: Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "removeClippedSubviews" | "stickyHeaderIndices" | "children" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
7
7
  alignItemsAtEnd?: boolean;
8
8
  columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
9
9
  data: readonly T[];
package/index.d.mts CHANGED
@@ -1,9 +1,9 @@
1
- import * as _legendapp_list_reanimated from '@legendapp/list/reanimated';
2
1
  import * as React$1 from 'react';
3
2
  import { ComponentProps, ReactNode, Dispatch, SetStateAction } from 'react';
4
3
  import * as react_native from 'react-native';
5
4
  import { View, Animated, ScrollView, StyleProp, ViewStyle, ScrollViewProps, LayoutRectangle, ScrollViewComponent, ScrollResponderMixin } from 'react-native';
6
5
  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}` | `containerSticky${number}` | `containerStickyOffset${number}` | "containersDidLayout" | "extraData" | "numColumns" | "lastItemKeys" | "totalSize" | "alignItemsPaddingTop" | "stylePaddingTop" | "scrollAdjust" | "scrollAdjustUserOffset" | "headerSize" | "footerSize" | "maintainVisibleContentPosition" | "debugRawScroll" | "debugComputedScroll" | "otherAxisSize" | "snapToOffsets" | "scrollSize";
9
9
  interface StateContext {
@@ -583,7 +583,9 @@ interface LazyLegendListProps<ItemT, ListT> extends Omit<LegendListProps<ItemT>,
583
583
  children?: React$1.ReactNode | undefined;
584
584
  LegendList?: ListT;
585
585
  }
586
- declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
586
+ declare const LazyLegendList: <ItemT, ListT extends (<ItemT_1>(props: _legendapp_list_reanimated.AnimatedLegendListProps<ItemT_1> & {
587
+ ref?: React$1.Ref<LegendListRef>;
588
+ }) => React$1.ReactElement | null) | (<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "removeClippedSubviews" | "stickyHeaderIndices" | "children" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
587
589
  alignItemsAtEnd?: boolean;
588
590
  columnWrapperStyle?: ColumnWrapperStyle;
589
591
  data: readonly T[];
@@ -649,7 +651,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
649
651
  stickyIndices?: number[];
650
652
  getItemType?: ((item: T, index: number) => string | undefined) | undefined;
651
653
  getFixedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
652
- } & 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"> & {
654
+ } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "removeClippedSubviews" | "stickyHeaderIndices" | "children" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
653
655
  alignItemsAtEnd?: boolean;
654
656
  columnWrapperStyle?: ColumnWrapperStyle;
655
657
  data: readonly T[];
@@ -715,9 +717,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
715
717
  stickyIndices?: number[];
716
718
  getItemType?: ((item: T, index: number) => string | undefined) | undefined;
717
719
  getFixedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
718
- } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode)> | (<ItemT_1>(props: _legendapp_list_reanimated.AnimatedLegendListProps<ItemT_1> & {
719
- ref?: React$1.Ref<LegendListRef>;
720
- }) => React$1.ReactElement | null) = <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
720
+ } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode)> = <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "removeClippedSubviews" | "stickyHeaderIndices" | "children" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
721
721
  alignItemsAtEnd?: boolean;
722
722
  columnWrapperStyle?: ColumnWrapperStyle;
723
723
  data: readonly T[];
@@ -785,7 +785,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
785
785
  getFixedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
786
786
  } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode>(props: LazyLegendListProps<ItemT, ListT> & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode;
787
787
 
788
- declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
788
+ declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "removeClippedSubviews" | "stickyHeaderIndices" | "children" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
789
789
  alignItemsAtEnd?: boolean;
790
790
  columnWrapperStyle?: ColumnWrapperStyle;
791
791
  data: readonly T[];
package/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import * as _legendapp_list_reanimated from '@legendapp/list/reanimated';
2
1
  import * as React$1 from 'react';
3
2
  import { ComponentProps, ReactNode, Dispatch, SetStateAction } from 'react';
4
3
  import * as react_native from 'react-native';
5
4
  import { View, Animated, ScrollView, StyleProp, ViewStyle, ScrollViewProps, LayoutRectangle, ScrollViewComponent, ScrollResponderMixin } from 'react-native';
6
5
  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}` | `containerSticky${number}` | `containerStickyOffset${number}` | "containersDidLayout" | "extraData" | "numColumns" | "lastItemKeys" | "totalSize" | "alignItemsPaddingTop" | "stylePaddingTop" | "scrollAdjust" | "scrollAdjustUserOffset" | "headerSize" | "footerSize" | "maintainVisibleContentPosition" | "debugRawScroll" | "debugComputedScroll" | "otherAxisSize" | "snapToOffsets" | "scrollSize";
9
9
  interface StateContext {
@@ -583,7 +583,9 @@ interface LazyLegendListProps<ItemT, ListT> extends Omit<LegendListProps<ItemT>,
583
583
  children?: React$1.ReactNode | undefined;
584
584
  LegendList?: ListT;
585
585
  }
586
- declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
586
+ declare const LazyLegendList: <ItemT, ListT extends (<ItemT_1>(props: _legendapp_list_reanimated.AnimatedLegendListProps<ItemT_1> & {
587
+ ref?: React$1.Ref<LegendListRef>;
588
+ }) => React$1.ReactElement | null) | (<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "removeClippedSubviews" | "stickyHeaderIndices" | "children" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
587
589
  alignItemsAtEnd?: boolean;
588
590
  columnWrapperStyle?: ColumnWrapperStyle;
589
591
  data: readonly T[];
@@ -649,7 +651,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
649
651
  stickyIndices?: number[];
650
652
  getItemType?: ((item: T, index: number) => string | undefined) | undefined;
651
653
  getFixedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
652
- } & 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"> & {
654
+ } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "removeClippedSubviews" | "stickyHeaderIndices" | "children" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
653
655
  alignItemsAtEnd?: boolean;
654
656
  columnWrapperStyle?: ColumnWrapperStyle;
655
657
  data: readonly T[];
@@ -715,9 +717,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
715
717
  stickyIndices?: number[];
716
718
  getItemType?: ((item: T, index: number) => string | undefined) | undefined;
717
719
  getFixedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
718
- } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode)> | (<ItemT_1>(props: _legendapp_list_reanimated.AnimatedLegendListProps<ItemT_1> & {
719
- ref?: React$1.Ref<LegendListRef>;
720
- }) => React$1.ReactElement | null) = <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
720
+ } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode)> = <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "removeClippedSubviews" | "stickyHeaderIndices" | "children" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
721
721
  alignItemsAtEnd?: boolean;
722
722
  columnWrapperStyle?: ColumnWrapperStyle;
723
723
  data: readonly T[];
@@ -785,7 +785,7 @@ declare const LazyLegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_
785
785
  getFixedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
786
786
  } & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode>(props: LazyLegendListProps<ItemT, ListT> & React$1.RefAttributes<LegendListRef>) => React$1.ReactNode;
787
787
 
788
- declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
788
+ declare const LegendList: <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "removeClippedSubviews" | "stickyHeaderIndices" | "children" | "contentInset" | "contentOffset" | "maintainVisibleContentPosition"> & {
789
789
  alignItemsAtEnd?: boolean;
790
790
  columnWrapperStyle?: ColumnWrapperStyle;
791
791
  data: readonly T[];
package/index.js CHANGED
@@ -2453,7 +2453,7 @@ function getRenderedItem(ctx, state, key) {
2453
2453
  item: data[index],
2454
2454
  type: getItemType ? (_a = getItemType(data[index], index)) != null ? _a : "" : ""
2455
2455
  };
2456
- renderedItem = React3__namespace.default.createElement(renderItem2, itemProps);
2456
+ renderedItem = isFunction(renderItem2) ? renderItem2(itemProps) : React3__namespace.default.createElement(renderItem2, itemProps);
2457
2457
  }
2458
2458
  return { index, item: data[index], renderedItem };
2459
2459
  }
package/index.mjs CHANGED
@@ -2432,7 +2432,7 @@ function getRenderedItem(ctx, state, key) {
2432
2432
  item: data[index],
2433
2433
  type: getItemType ? (_a = getItemType(data[index], index)) != null ? _a : "" : ""
2434
2434
  };
2435
- renderedItem = React3__default.createElement(renderItem2, itemProps);
2435
+ renderedItem = isFunction(renderItem2) ? renderItem2(itemProps) : React3__default.createElement(renderItem2, itemProps);
2436
2436
  }
2437
2437
  return { index, item: data[index], renderedItem };
2438
2438
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legendapp/list",
3
- "version": "2.0.0-next.15",
3
+ "version": "2.0.0-next.16",
4
4
  "description": "Legend List is a drop-in replacement for FlatList with much better performance and supporting dynamically sized items.",
5
5
  "sideEffects": false,
6
6
  "private": false,