@legendapp/list 3.0.0-beta.5 → 3.0.0-beta.50
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/.DS_Store +0 -0
- package/CHANGELOG.md +19 -0
- package/README.md +9 -2
- package/animated.d.ts +657 -5
- package/animated.js +2 -2
- package/animated.mjs +1 -1
- package/index.d.ts +1316 -11
- package/index.js +4009 -1279
- package/index.mjs +4008 -1280
- package/index.native.js +3772 -1337
- package/index.native.mjs +3758 -1325
- package/keyboard-chat.d.ts +228 -0
- package/keyboard-chat.js +97 -0
- package/keyboard-chat.mjs +76 -0
- package/keyboard-test.d.ts +216 -0
- package/keyboard-test.js +39 -0
- package/keyboard-test.mjs +18 -0
- package/keyboard.d.ts +216 -8
- package/keyboard.js +355 -64
- package/keyboard.mjs +358 -66
- package/package.json +68 -1
- package/{types-YNdphn_A.d.mts → react-native.d.ts} +306 -263
- package/react-native.js +6003 -0
- package/react-native.mjs +5974 -0
- package/{types-YNdphn_A.d.ts → react-native.web.d.ts} +367 -261
- package/react-native.web.js +6537 -0
- package/react-native.web.mjs +6508 -0
- package/react.d.ts +776 -0
- package/react.js +6537 -0
- package/react.mjs +6508 -0
- package/reanimated.d.ts +679 -8
- package/reanimated.js +230 -29
- package/reanimated.mjs +232 -31
- package/section-list.d.ts +661 -5
- package/section-list.js +50 -3675
- package/section-list.mjs +48 -3674
- package/animated.d.mts +0 -9
- package/index.d.mts +0 -23
- package/index.native.d.mts +0 -23
- package/index.native.d.ts +0 -23
- package/keyboard-controller.d.mts +0 -12
- package/keyboard-controller.d.ts +0 -12
- package/keyboard-controller.js +0 -69
- package/keyboard-controller.mjs +0 -48
- package/keyboard.d.mts +0 -13
- package/reanimated.d.mts +0 -18
- package/section-list.d.mts +0 -113
- package/section-list.native.d.mts +0 -113
- package/section-list.native.d.ts +0 -113
- package/section-list.native.js +0 -3711
- package/section-list.native.mjs +0 -3690
package/animated.d.mts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as _legendapp_list from '@legendapp/list';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Animated } from 'react-native';
|
|
4
|
-
|
|
5
|
-
declare const AnimatedLegendList: Animated.AnimatedComponent<(<T>(props: _legendapp_list.LegendListProps<T> & React.RefAttributes<_legendapp_list.LegendListRef>) => React.ReactNode) & {
|
|
6
|
-
displayName?: string;
|
|
7
|
-
}>;
|
|
8
|
-
|
|
9
|
-
export { AnimatedLegendList };
|
package/index.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-YNdphn_A.mjs';
|
|
4
|
-
export { C as ColumnWrapperStyle, u as GetRenderedItem, G as GetRenderedItemResult, s as InitialScrollAnchor, I as InternalState, d as LegendListPropsBase, f as LegendListRenderItemProps, M as MaintainScrollAtEndOptions, O as OnViewableItemsChanged, p as ScrollIndexWithOffset, r as ScrollIndexWithOffsetAndContentOffset, q as ScrollIndexWithOffsetPosition, g as ScrollState, S as ScrollTarget, T as ThresholdSnapshot, m as TypedForwardRef, n as TypedMemo, i as ViewAmountToken, h as ViewToken, l as ViewabilityConfig, j as ViewabilityConfigCallbackPair, k as ViewabilityConfigCallbackPairs, e as ViewableRange, t as typedForwardRef, o as typedMemo } from './types-YNdphn_A.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 | null, 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.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-YNdphn_A.mjs';
|
|
4
|
-
export { C as ColumnWrapperStyle, u as GetRenderedItem, G as GetRenderedItemResult, s as InitialScrollAnchor, I as InternalState, d as LegendListPropsBase, f as LegendListRenderItemProps, M as MaintainScrollAtEndOptions, O as OnViewableItemsChanged, p as ScrollIndexWithOffset, r as ScrollIndexWithOffsetAndContentOffset, q as ScrollIndexWithOffsetPosition, g as ScrollState, S as ScrollTarget, T as ThresholdSnapshot, m as TypedForwardRef, n as TypedMemo, i as ViewAmountToken, h as ViewToken, l as ViewabilityConfig, j as ViewabilityConfigCallbackPair, k as ViewabilityConfigCallbackPairs, e as ViewableRange, t as typedForwardRef, o as typedMemo } from './types-YNdphn_A.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 | null, 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-YNdphn_A.js';
|
|
4
|
-
export { C as ColumnWrapperStyle, u as GetRenderedItem, G as GetRenderedItemResult, s as InitialScrollAnchor, I as InternalState, d as LegendListPropsBase, f as LegendListRenderItemProps, M as MaintainScrollAtEndOptions, O as OnViewableItemsChanged, p as ScrollIndexWithOffset, r as ScrollIndexWithOffsetAndContentOffset, q as ScrollIndexWithOffsetPosition, g as ScrollState, S as ScrollTarget, T as ThresholdSnapshot, m as TypedForwardRef, n as TypedMemo, i as ViewAmountToken, h as ViewToken, l as ViewabilityConfig, j as ViewabilityConfigCallbackPair, k as ViewabilityConfigCallbackPairs, e as ViewableRange, t as typedForwardRef, o as typedMemo } from './types-YNdphn_A.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 | null, 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,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { LegendList as LegendList$1, LegendListProps, LegendListRef } from '@legendapp/list';
|
|
3
|
-
import { AnimatedLegendList } from '@legendapp/list/animated';
|
|
4
|
-
import { AnimatedLegendList as AnimatedLegendList$1 } from '@legendapp/list/reanimated';
|
|
5
|
-
|
|
6
|
-
declare const LegendList: <ItemT, ListT extends typeof LegendList$1 | typeof AnimatedLegendList | typeof AnimatedLegendList$1 = (<T>(props: LegendListProps<T> & React.RefAttributes<LegendListRef>) => React.ReactNode) & {
|
|
7
|
-
displayName?: string;
|
|
8
|
-
}>(props: (LegendListProps<ItemT> & {
|
|
9
|
-
LegendList?: ListT;
|
|
10
|
-
}) & React.RefAttributes<LegendListRef>) => React.ReactNode;
|
|
11
|
-
|
|
12
|
-
export { LegendList };
|
package/keyboard-controller.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { LegendList as LegendList$1, LegendListProps, LegendListRef } from '@legendapp/list';
|
|
3
|
-
import { AnimatedLegendList } from '@legendapp/list/animated';
|
|
4
|
-
import { AnimatedLegendList as AnimatedLegendList$1 } from '@legendapp/list/reanimated';
|
|
5
|
-
|
|
6
|
-
declare const LegendList: <ItemT, ListT extends typeof LegendList$1 | typeof AnimatedLegendList | typeof AnimatedLegendList$1 = (<T>(props: LegendListProps<T> & React.RefAttributes<LegendListRef>) => React.ReactNode) & {
|
|
7
|
-
displayName?: string;
|
|
8
|
-
}>(props: (LegendListProps<ItemT> & {
|
|
9
|
-
LegendList?: ListT;
|
|
10
|
-
}) & React.RefAttributes<LegendListRef>) => React.ReactNode;
|
|
11
|
-
|
|
12
|
-
export { LegendList };
|
package/keyboard-controller.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var reactNative = require('react-native');
|
|
5
|
-
var reactNativeKeyboardController = require('react-native-keyboard-controller');
|
|
6
|
-
var reactNativeReanimated = require('react-native-reanimated');
|
|
7
|
-
var list = require('@legendapp/list');
|
|
8
|
-
|
|
9
|
-
function _interopNamespace(e) {
|
|
10
|
-
if (e && e.__esModule) return e;
|
|
11
|
-
var n = Object.create(null);
|
|
12
|
-
if (e) {
|
|
13
|
-
Object.keys(e).forEach(function (k) {
|
|
14
|
-
if (k !== 'default') {
|
|
15
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () { return e[k]; }
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n.default = e;
|
|
24
|
-
return Object.freeze(n);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
|
-
|
|
29
|
-
// src/integrations/keyboard-controller.tsx
|
|
30
|
-
var typedForwardRef = React.forwardRef;
|
|
31
|
-
var LegendList = typedForwardRef(function LegendList2(props, forwardedRef) {
|
|
32
|
-
const {
|
|
33
|
-
LegendList: LegendListProp,
|
|
34
|
-
contentContainerStyle: contentContainerStyleProp,
|
|
35
|
-
scrollIndicatorInsets: scrollIndicatorInsetsProp,
|
|
36
|
-
...rest
|
|
37
|
-
} = props;
|
|
38
|
-
const [padding, setPadding] = React.useState(0);
|
|
39
|
-
const updatePadding = (height) => {
|
|
40
|
-
setPadding(height);
|
|
41
|
-
};
|
|
42
|
-
reactNativeKeyboardController.useKeyboardHandler({
|
|
43
|
-
onEnd: (e) => {
|
|
44
|
-
"worklet";
|
|
45
|
-
reactNativeReanimated.runOnJS(updatePadding)(e.height);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
const LegendListComponent = LegendListProp != null ? LegendListProp : list.LegendList;
|
|
49
|
-
const contentContainerStyleFlattened = reactNative.StyleSheet.flatten(contentContainerStyleProp) || {};
|
|
50
|
-
const contentContainerStyle = { ...contentContainerStyleFlattened, paddingTop: padding };
|
|
51
|
-
const scrollIndicatorInsets = scrollIndicatorInsetsProp ? { ...scrollIndicatorInsetsProp } : {};
|
|
52
|
-
if (!props.horizontal) {
|
|
53
|
-
scrollIndicatorInsets.top = ((scrollIndicatorInsets == null ? void 0 : scrollIndicatorInsets.top) || 0) + padding;
|
|
54
|
-
}
|
|
55
|
-
return (
|
|
56
|
-
// @ts-expect-error TODO: Fix this type
|
|
57
|
-
/* @__PURE__ */ React__namespace.createElement(
|
|
58
|
-
LegendListComponent,
|
|
59
|
-
{
|
|
60
|
-
...rest,
|
|
61
|
-
contentContainerStyle,
|
|
62
|
-
ref: forwardedRef,
|
|
63
|
-
scrollIndicatorInsets
|
|
64
|
-
}
|
|
65
|
-
)
|
|
66
|
-
);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
exports.LegendList = LegendList;
|
package/keyboard-controller.mjs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { useState, forwardRef } from 'react';
|
|
3
|
-
import { StyleSheet } from 'react-native';
|
|
4
|
-
import { useKeyboardHandler } from 'react-native-keyboard-controller';
|
|
5
|
-
import { runOnJS } from 'react-native-reanimated';
|
|
6
|
-
import { LegendList as LegendList$1 } from '@legendapp/list';
|
|
7
|
-
|
|
8
|
-
// src/integrations/keyboard-controller.tsx
|
|
9
|
-
var typedForwardRef = forwardRef;
|
|
10
|
-
var LegendList = typedForwardRef(function LegendList2(props, forwardedRef) {
|
|
11
|
-
const {
|
|
12
|
-
LegendList: LegendListProp,
|
|
13
|
-
contentContainerStyle: contentContainerStyleProp,
|
|
14
|
-
scrollIndicatorInsets: scrollIndicatorInsetsProp,
|
|
15
|
-
...rest
|
|
16
|
-
} = props;
|
|
17
|
-
const [padding, setPadding] = useState(0);
|
|
18
|
-
const updatePadding = (height) => {
|
|
19
|
-
setPadding(height);
|
|
20
|
-
};
|
|
21
|
-
useKeyboardHandler({
|
|
22
|
-
onEnd: (e) => {
|
|
23
|
-
"worklet";
|
|
24
|
-
runOnJS(updatePadding)(e.height);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
const LegendListComponent = LegendListProp != null ? LegendListProp : LegendList$1;
|
|
28
|
-
const contentContainerStyleFlattened = StyleSheet.flatten(contentContainerStyleProp) || {};
|
|
29
|
-
const contentContainerStyle = { ...contentContainerStyleFlattened, paddingTop: padding };
|
|
30
|
-
const scrollIndicatorInsets = scrollIndicatorInsetsProp ? { ...scrollIndicatorInsetsProp } : {};
|
|
31
|
-
if (!props.horizontal) {
|
|
32
|
-
scrollIndicatorInsets.top = ((scrollIndicatorInsets == null ? void 0 : scrollIndicatorInsets.top) || 0) + padding;
|
|
33
|
-
}
|
|
34
|
-
return (
|
|
35
|
-
// @ts-expect-error TODO: Fix this type
|
|
36
|
-
/* @__PURE__ */ React.createElement(
|
|
37
|
-
LegendListComponent,
|
|
38
|
-
{
|
|
39
|
-
...rest,
|
|
40
|
-
contentContainerStyle,
|
|
41
|
-
ref: forwardedRef,
|
|
42
|
-
scrollIndicatorInsets
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
);
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export { LegendList };
|
package/keyboard.d.mts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Insets } from 'react-native';
|
|
3
|
-
import { ReanimatedScrollEvent } from 'react-native-reanimated/lib/typescript/hook/commonTypes';
|
|
4
|
-
import { LegendListRef } from '@legendapp/list';
|
|
5
|
-
import { AnimatedLegendListProps } from '@legendapp/list/reanimated';
|
|
6
|
-
|
|
7
|
-
declare const KeyboardAvoidingLegendList: <ItemT>(props: Omit<AnimatedLegendListProps<ItemT>, "onScroll" | "contentInset"> & {
|
|
8
|
-
onScroll?: (event: ReanimatedScrollEvent) => void;
|
|
9
|
-
contentInset?: Insets;
|
|
10
|
-
safeAreaInsetBottom?: number;
|
|
11
|
-
} & React.RefAttributes<LegendListRef>) => React.ReactNode;
|
|
12
|
-
|
|
13
|
-
export { KeyboardAvoidingLegendList, KeyboardAvoidingLegendList as LegendList };
|
package/reanimated.d.mts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
import Reanimated from 'react-native-reanimated';
|
|
4
|
-
import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
|
|
5
|
-
|
|
6
|
-
type KeysToOmit = "getEstimatedItemSize" | "getFixedItemSize" | "getItemType" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "itemsAreEqual" | "ItemSeparatorComponent";
|
|
7
|
-
type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Reanimated.ScrollView>>;
|
|
8
|
-
interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
|
|
9
|
-
refScrollView?: React.Ref<Reanimated.ScrollView>;
|
|
10
|
-
}
|
|
11
|
-
type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
|
|
12
|
-
type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList" | "ref"> & OtherAnimatedLegendListProps<ItemT>;
|
|
13
|
-
type AnimatedLegendListDefinition = <ItemT>(props: AnimatedLegendListProps<ItemT> & {
|
|
14
|
-
ref?: React.Ref<LegendListRef>;
|
|
15
|
-
}) => React.ReactElement | null;
|
|
16
|
-
declare const AnimatedLegendList: AnimatedLegendListDefinition;
|
|
17
|
-
|
|
18
|
-
export { AnimatedLegendList, type AnimatedLegendListProps, type AnimatedLegendListPropsBase };
|
package/section-list.d.mts
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-YNdphn_A.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 };
|
|
@@ -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-YNdphn_A.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-YNdphn_A.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 };
|