@legendapp/list 3.0.0-beta.17 → 3.0.0-beta.18
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 +756 -9
- package/index.d.ts +756 -9
- package/index.js +28 -13
- package/index.mjs +27 -14
- package/index.native.js +28 -13
- package/index.native.mjs +27 -14
- package/package.json +1 -1
- package/section-list.d.mts +1 -2
- package/section-list.d.ts +1 -2
- package/section-list.js +25 -3895
- package/section-list.mjs +23 -3894
- package/index.native.d.mts +0 -23
- package/index.native.d.ts +0 -23
- package/section-list.native.d.mts +0 -113
- package/section-list.native.d.ts +0 -113
- package/section-list.native.js +0 -3979
- package/section-list.native.mjs +0 -3958
- package/types-Dj2MEm9V.d.mts +0 -752
- package/types-Dj2MEm9V.d.ts +0 -752
package/index.native.d.mts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
-
import { L as LegendListProps, a as LegendListRef, V as ViewabilityCallback, b as ViewabilityAmountCallback, c as LegendListRecyclingState } from './types-Dj2MEm9V.mjs';
|
|
4
|
-
export { C as ColumnWrapperStyle, x as GetRenderedItem, G as GetRenderedItemResult, w as InitialScrollAnchor, I as InternalState, d as LegendListPropsBase, i as LegendListRenderItemProps, j as LegendListState, f as MaintainScrollAtEndOptions, M as MaintainVisibleContentPositionConfig, e as MaintainVisibleContentPositionNormalized, O as OnViewableItemsChanged, s as ScrollIndexWithOffset, v as ScrollIndexWithOffsetAndContentOffset, u as ScrollIndexWithOffsetPosition, g as ScrollTarget, S as StickyHeaderConfig, T as ThresholdSnapshot, p as TypedForwardRef, q as TypedMemo, l as ViewAmountToken, k as ViewToken, o as ViewabilityConfig, m as ViewabilityConfigCallbackPair, n as ViewabilityConfigCallbackPairs, h as ViewableRange, t as typedForwardRef, r as typedMemo } from './types-Dj2MEm9V.mjs';
|
|
5
|
-
import 'react-native';
|
|
6
|
-
import 'react-native-reanimated';
|
|
7
|
-
|
|
8
|
-
declare const LegendList: (<T>(props: LegendListProps<T> & React.RefAttributes<LegendListRef>) => React.ReactNode) & {
|
|
9
|
-
displayName?: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
declare function useViewability<ItemT = any>(callback: ViewabilityCallback<ItemT>, configId?: string): void;
|
|
13
|
-
declare function useViewabilityAmount<ItemT = any>(callback: ViewabilityAmountCallback<ItemT>): void;
|
|
14
|
-
declare function useRecyclingEffect(effect: (info: LegendListRecyclingState<unknown>) => void | (() => void)): void;
|
|
15
|
-
declare function useRecyclingState<ItemT>(valueOrFun: ((info: LegendListRecyclingState<ItemT>) => ItemT) | ItemT): readonly [ItemT, Dispatch<SetStateAction<ItemT>>];
|
|
16
|
-
declare function useIsLastItem(): boolean;
|
|
17
|
-
declare function useListScrollSize(): {
|
|
18
|
-
width: number;
|
|
19
|
-
height: number;
|
|
20
|
-
};
|
|
21
|
-
declare function useSyncLayout(): () => void;
|
|
22
|
-
|
|
23
|
-
export { LegendList, LegendListProps, LegendListRecyclingState, LegendListRef, ViewabilityAmountCallback, ViewabilityCallback, useIsLastItem, useListScrollSize, useRecyclingEffect, useRecyclingState, useSyncLayout, useViewability, useViewabilityAmount };
|
package/index.native.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
-
import { L as LegendListProps, a as LegendListRef, V as ViewabilityCallback, b as ViewabilityAmountCallback, c as LegendListRecyclingState } from './types-Dj2MEm9V.js';
|
|
4
|
-
export { C as ColumnWrapperStyle, x as GetRenderedItem, G as GetRenderedItemResult, w as InitialScrollAnchor, I as InternalState, d as LegendListPropsBase, i as LegendListRenderItemProps, j as LegendListState, f as MaintainScrollAtEndOptions, M as MaintainVisibleContentPositionConfig, e as MaintainVisibleContentPositionNormalized, O as OnViewableItemsChanged, s as ScrollIndexWithOffset, v as ScrollIndexWithOffsetAndContentOffset, u as ScrollIndexWithOffsetPosition, g as ScrollTarget, S as StickyHeaderConfig, T as ThresholdSnapshot, p as TypedForwardRef, q as TypedMemo, l as ViewAmountToken, k as ViewToken, o as ViewabilityConfig, m as ViewabilityConfigCallbackPair, n as ViewabilityConfigCallbackPairs, h as ViewableRange, t as typedForwardRef, r as typedMemo } from './types-Dj2MEm9V.js';
|
|
5
|
-
import 'react-native';
|
|
6
|
-
import 'react-native-reanimated';
|
|
7
|
-
|
|
8
|
-
declare const LegendList: (<T>(props: LegendListProps<T> & React.RefAttributes<LegendListRef>) => React.ReactNode) & {
|
|
9
|
-
displayName?: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
declare function useViewability<ItemT = any>(callback: ViewabilityCallback<ItemT>, configId?: string): void;
|
|
13
|
-
declare function useViewabilityAmount<ItemT = any>(callback: ViewabilityAmountCallback<ItemT>): void;
|
|
14
|
-
declare function useRecyclingEffect(effect: (info: LegendListRecyclingState<unknown>) => void | (() => void)): void;
|
|
15
|
-
declare function useRecyclingState<ItemT>(valueOrFun: ((info: LegendListRecyclingState<ItemT>) => ItemT) | ItemT): readonly [ItemT, Dispatch<SetStateAction<ItemT>>];
|
|
16
|
-
declare function useIsLastItem(): boolean;
|
|
17
|
-
declare function useListScrollSize(): {
|
|
18
|
-
width: number;
|
|
19
|
-
height: number;
|
|
20
|
-
};
|
|
21
|
-
declare function useSyncLayout(): () => void;
|
|
22
|
-
|
|
23
|
-
export { LegendList, LegendListProps, LegendListRecyclingState, LegendListRef, ViewabilityAmountCallback, ViewabilityCallback, useIsLastItem, useListScrollSize, useRecyclingEffect, useRecyclingState, useSyncLayout, useViewability, useViewabilityAmount };
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import * as react_native from 'react-native';
|
|
2
|
-
import { SectionListData, SectionBase, SectionListRenderItemInfo, SectionListScrollParams } from 'react-native';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { a as LegendListRef, L as LegendListProps } from './types-Dj2MEm9V.mjs';
|
|
5
|
-
import 'react-native-reanimated';
|
|
6
|
-
|
|
7
|
-
type SectionListSeparatorProps<ItemT, SectionT> = {
|
|
8
|
-
leadingItem?: ItemT;
|
|
9
|
-
leadingSection?: SectionListData<ItemT, SectionT>;
|
|
10
|
-
section: SectionListData<ItemT, SectionT>;
|
|
11
|
-
trailingItem?: ItemT;
|
|
12
|
-
trailingSection?: SectionListData<ItemT, SectionT>;
|
|
13
|
-
};
|
|
14
|
-
type SectionHeaderItem<SectionT> = {
|
|
15
|
-
kind: "header";
|
|
16
|
-
key: string;
|
|
17
|
-
section: SectionT;
|
|
18
|
-
sectionIndex: number;
|
|
19
|
-
};
|
|
20
|
-
type SectionFooterItem<SectionT> = {
|
|
21
|
-
kind: "footer";
|
|
22
|
-
key: string;
|
|
23
|
-
section: SectionT;
|
|
24
|
-
sectionIndex: number;
|
|
25
|
-
};
|
|
26
|
-
type SectionBodyItem<ItemT, SectionT> = {
|
|
27
|
-
kind: "item";
|
|
28
|
-
key: string;
|
|
29
|
-
section: SectionT;
|
|
30
|
-
sectionIndex: number;
|
|
31
|
-
item: ItemT;
|
|
32
|
-
itemIndex: number;
|
|
33
|
-
absoluteItemIndex: number;
|
|
34
|
-
};
|
|
35
|
-
type SectionItemSeparator<ItemT, SectionT> = {
|
|
36
|
-
kind: "item-separator";
|
|
37
|
-
key: string;
|
|
38
|
-
section: SectionT;
|
|
39
|
-
sectionIndex: number;
|
|
40
|
-
leadingItem: ItemT;
|
|
41
|
-
leadingItemIndex: number;
|
|
42
|
-
trailingItem?: ItemT;
|
|
43
|
-
};
|
|
44
|
-
type SectionSeparator<SectionT> = {
|
|
45
|
-
kind: "section-separator";
|
|
46
|
-
key: string;
|
|
47
|
-
leadingSection: SectionT;
|
|
48
|
-
leadingSectionIndex: number;
|
|
49
|
-
trailingSection?: SectionT;
|
|
50
|
-
};
|
|
51
|
-
type FlatSectionListItem<ItemT, SectionT> = SectionHeaderItem<SectionT> | SectionFooterItem<SectionT> | SectionBodyItem<ItemT, SectionT> | SectionItemSeparator<ItemT, SectionT> | SectionSeparator<SectionT>;
|
|
52
|
-
type SectionMeta = {
|
|
53
|
-
header?: number;
|
|
54
|
-
footer?: number;
|
|
55
|
-
items: number[];
|
|
56
|
-
};
|
|
57
|
-
type BuildSectionListDataResult<ItemT, SectionT> = {
|
|
58
|
-
data: Array<FlatSectionListItem<ItemT, SectionT>>;
|
|
59
|
-
sectionMeta: SectionMeta[];
|
|
60
|
-
stickyHeaderIndices: number[];
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
type SectionListViewToken<ItemT, SectionT> = {
|
|
64
|
-
item: ItemT;
|
|
65
|
-
key: string;
|
|
66
|
-
index: number;
|
|
67
|
-
isViewable: boolean;
|
|
68
|
-
section: SectionListData<ItemT, SectionT>;
|
|
69
|
-
};
|
|
70
|
-
type SectionListOnViewableItemsChanged<ItemT, SectionT> = ((info: {
|
|
71
|
-
viewableItems: Array<SectionListViewToken<ItemT, SectionT>>;
|
|
72
|
-
changed: Array<SectionListViewToken<ItemT, SectionT>>;
|
|
73
|
-
}) => void) | null;
|
|
74
|
-
type SectionListLegendProps<ItemT, SectionT> = Omit<LegendListProps<FlatSectionListItem<ItemT, SectionT>>, "data" | "children" | "renderItem" | "keyExtractor" | "ItemSeparatorComponent" | "getItemType" | "getFixedItemSize" | "stickyHeaderIndices" | "numColumns" | "columnWrapperStyle" | "onViewableItemsChanged">;
|
|
75
|
-
type SectionListProps<ItemT, SectionT extends SectionBase<ItemT> = SectionBase<ItemT>> = SectionListLegendProps<ItemT, SectionT> & {
|
|
76
|
-
sections: ReadonlyArray<SectionListData<ItemT, SectionT>>;
|
|
77
|
-
extraData?: any;
|
|
78
|
-
renderItem?: (info: SectionListRenderItemInfo<ItemT, SectionT>) => React.ReactElement | null;
|
|
79
|
-
renderSectionHeader?: (info: {
|
|
80
|
-
section: SectionListData<ItemT, SectionT>;
|
|
81
|
-
}) => React.ReactElement | null;
|
|
82
|
-
renderSectionFooter?: (info: {
|
|
83
|
-
section: SectionListData<ItemT, SectionT>;
|
|
84
|
-
}) => React.ReactElement | null;
|
|
85
|
-
ItemSeparatorComponent?: React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | null;
|
|
86
|
-
SectionSeparatorComponent?: React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | React.ReactElement | null;
|
|
87
|
-
keyExtractor?: (item: ItemT, index: number) => string;
|
|
88
|
-
stickySectionHeadersEnabled?: boolean;
|
|
89
|
-
onViewableItemsChanged?: SectionListOnViewableItemsChanged<ItemT, SectionT>;
|
|
90
|
-
};
|
|
91
|
-
type SectionListRef = LegendListRef & {
|
|
92
|
-
scrollToLocation(params: SectionListScrollParams): void;
|
|
93
|
-
};
|
|
94
|
-
declare const SectionList: (<ItemT, SectionT extends SectionBase<ItemT, react_native.DefaultSectionT>>(props: SectionListLegendProps<ItemT, SectionT> & {
|
|
95
|
-
sections: readonly SectionListData<ItemT, SectionT>[];
|
|
96
|
-
extraData?: any;
|
|
97
|
-
renderItem?: ((info: SectionListRenderItemInfo<ItemT, SectionT>) => React.ReactElement | null) | undefined;
|
|
98
|
-
renderSectionHeader?: ((info: {
|
|
99
|
-
section: SectionListData<ItemT, SectionT>;
|
|
100
|
-
}) => React.ReactElement | null) | undefined;
|
|
101
|
-
renderSectionFooter?: ((info: {
|
|
102
|
-
section: SectionListData<ItemT, SectionT>;
|
|
103
|
-
}) => React.ReactElement | null) | undefined;
|
|
104
|
-
ItemSeparatorComponent?: React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | null | undefined;
|
|
105
|
-
SectionSeparatorComponent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | null | undefined;
|
|
106
|
-
keyExtractor?: ((item: ItemT, index: number) => string) | undefined;
|
|
107
|
-
stickySectionHeadersEnabled?: boolean;
|
|
108
|
-
onViewableItemsChanged?: SectionListOnViewableItemsChanged<ItemT, SectionT> | undefined;
|
|
109
|
-
} & React.RefAttributes<SectionListRef>) => React.ReactNode) & {
|
|
110
|
-
displayName?: string;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export { type BuildSectionListDataResult, type FlatSectionListItem, SectionList, type SectionListOnViewableItemsChanged, type SectionListProps, type SectionListRef, type SectionListSeparatorProps, type SectionListViewToken, type SectionMeta };
|
package/section-list.native.d.ts
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import * as react_native from 'react-native';
|
|
2
|
-
import { SectionListData, SectionBase, SectionListRenderItemInfo, SectionListScrollParams } from 'react-native';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { a as LegendListRef, L as LegendListProps } from './types-Dj2MEm9V.js';
|
|
5
|
-
import 'react-native-reanimated';
|
|
6
|
-
|
|
7
|
-
type SectionListSeparatorProps<ItemT, SectionT> = {
|
|
8
|
-
leadingItem?: ItemT;
|
|
9
|
-
leadingSection?: SectionListData<ItemT, SectionT>;
|
|
10
|
-
section: SectionListData<ItemT, SectionT>;
|
|
11
|
-
trailingItem?: ItemT;
|
|
12
|
-
trailingSection?: SectionListData<ItemT, SectionT>;
|
|
13
|
-
};
|
|
14
|
-
type SectionHeaderItem<SectionT> = {
|
|
15
|
-
kind: "header";
|
|
16
|
-
key: string;
|
|
17
|
-
section: SectionT;
|
|
18
|
-
sectionIndex: number;
|
|
19
|
-
};
|
|
20
|
-
type SectionFooterItem<SectionT> = {
|
|
21
|
-
kind: "footer";
|
|
22
|
-
key: string;
|
|
23
|
-
section: SectionT;
|
|
24
|
-
sectionIndex: number;
|
|
25
|
-
};
|
|
26
|
-
type SectionBodyItem<ItemT, SectionT> = {
|
|
27
|
-
kind: "item";
|
|
28
|
-
key: string;
|
|
29
|
-
section: SectionT;
|
|
30
|
-
sectionIndex: number;
|
|
31
|
-
item: ItemT;
|
|
32
|
-
itemIndex: number;
|
|
33
|
-
absoluteItemIndex: number;
|
|
34
|
-
};
|
|
35
|
-
type SectionItemSeparator<ItemT, SectionT> = {
|
|
36
|
-
kind: "item-separator";
|
|
37
|
-
key: string;
|
|
38
|
-
section: SectionT;
|
|
39
|
-
sectionIndex: number;
|
|
40
|
-
leadingItem: ItemT;
|
|
41
|
-
leadingItemIndex: number;
|
|
42
|
-
trailingItem?: ItemT;
|
|
43
|
-
};
|
|
44
|
-
type SectionSeparator<SectionT> = {
|
|
45
|
-
kind: "section-separator";
|
|
46
|
-
key: string;
|
|
47
|
-
leadingSection: SectionT;
|
|
48
|
-
leadingSectionIndex: number;
|
|
49
|
-
trailingSection?: SectionT;
|
|
50
|
-
};
|
|
51
|
-
type FlatSectionListItem<ItemT, SectionT> = SectionHeaderItem<SectionT> | SectionFooterItem<SectionT> | SectionBodyItem<ItemT, SectionT> | SectionItemSeparator<ItemT, SectionT> | SectionSeparator<SectionT>;
|
|
52
|
-
type SectionMeta = {
|
|
53
|
-
header?: number;
|
|
54
|
-
footer?: number;
|
|
55
|
-
items: number[];
|
|
56
|
-
};
|
|
57
|
-
type BuildSectionListDataResult<ItemT, SectionT> = {
|
|
58
|
-
data: Array<FlatSectionListItem<ItemT, SectionT>>;
|
|
59
|
-
sectionMeta: SectionMeta[];
|
|
60
|
-
stickyHeaderIndices: number[];
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
type SectionListViewToken<ItemT, SectionT> = {
|
|
64
|
-
item: ItemT;
|
|
65
|
-
key: string;
|
|
66
|
-
index: number;
|
|
67
|
-
isViewable: boolean;
|
|
68
|
-
section: SectionListData<ItemT, SectionT>;
|
|
69
|
-
};
|
|
70
|
-
type SectionListOnViewableItemsChanged<ItemT, SectionT> = ((info: {
|
|
71
|
-
viewableItems: Array<SectionListViewToken<ItemT, SectionT>>;
|
|
72
|
-
changed: Array<SectionListViewToken<ItemT, SectionT>>;
|
|
73
|
-
}) => void) | null;
|
|
74
|
-
type SectionListLegendProps<ItemT, SectionT> = Omit<LegendListProps<FlatSectionListItem<ItemT, SectionT>>, "data" | "children" | "renderItem" | "keyExtractor" | "ItemSeparatorComponent" | "getItemType" | "getFixedItemSize" | "stickyHeaderIndices" | "numColumns" | "columnWrapperStyle" | "onViewableItemsChanged">;
|
|
75
|
-
type SectionListProps<ItemT, SectionT extends SectionBase<ItemT> = SectionBase<ItemT>> = SectionListLegendProps<ItemT, SectionT> & {
|
|
76
|
-
sections: ReadonlyArray<SectionListData<ItemT, SectionT>>;
|
|
77
|
-
extraData?: any;
|
|
78
|
-
renderItem?: (info: SectionListRenderItemInfo<ItemT, SectionT>) => React.ReactElement | null;
|
|
79
|
-
renderSectionHeader?: (info: {
|
|
80
|
-
section: SectionListData<ItemT, SectionT>;
|
|
81
|
-
}) => React.ReactElement | null;
|
|
82
|
-
renderSectionFooter?: (info: {
|
|
83
|
-
section: SectionListData<ItemT, SectionT>;
|
|
84
|
-
}) => React.ReactElement | null;
|
|
85
|
-
ItemSeparatorComponent?: React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | null;
|
|
86
|
-
SectionSeparatorComponent?: React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | React.ReactElement | null;
|
|
87
|
-
keyExtractor?: (item: ItemT, index: number) => string;
|
|
88
|
-
stickySectionHeadersEnabled?: boolean;
|
|
89
|
-
onViewableItemsChanged?: SectionListOnViewableItemsChanged<ItemT, SectionT>;
|
|
90
|
-
};
|
|
91
|
-
type SectionListRef = LegendListRef & {
|
|
92
|
-
scrollToLocation(params: SectionListScrollParams): void;
|
|
93
|
-
};
|
|
94
|
-
declare const SectionList: (<ItemT, SectionT extends SectionBase<ItemT, react_native.DefaultSectionT>>(props: SectionListLegendProps<ItemT, SectionT> & {
|
|
95
|
-
sections: readonly SectionListData<ItemT, SectionT>[];
|
|
96
|
-
extraData?: any;
|
|
97
|
-
renderItem?: ((info: SectionListRenderItemInfo<ItemT, SectionT>) => React.ReactElement | null) | undefined;
|
|
98
|
-
renderSectionHeader?: ((info: {
|
|
99
|
-
section: SectionListData<ItemT, SectionT>;
|
|
100
|
-
}) => React.ReactElement | null) | undefined;
|
|
101
|
-
renderSectionFooter?: ((info: {
|
|
102
|
-
section: SectionListData<ItemT, SectionT>;
|
|
103
|
-
}) => React.ReactElement | null) | undefined;
|
|
104
|
-
ItemSeparatorComponent?: React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | null | undefined;
|
|
105
|
-
SectionSeparatorComponent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ComponentType<SectionListSeparatorProps<ItemT, SectionT>> | null | undefined;
|
|
106
|
-
keyExtractor?: ((item: ItemT, index: number) => string) | undefined;
|
|
107
|
-
stickySectionHeadersEnabled?: boolean;
|
|
108
|
-
onViewableItemsChanged?: SectionListOnViewableItemsChanged<ItemT, SectionT> | undefined;
|
|
109
|
-
} & React.RefAttributes<SectionListRef>) => React.ReactNode) & {
|
|
110
|
-
displayName?: string;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export { type BuildSectionListDataResult, type FlatSectionListItem, SectionList, type SectionListOnViewableItemsChanged, type SectionListProps, type SectionListRef, type SectionListSeparatorProps, type SectionListViewToken, type SectionMeta };
|