@legendapp/list 1.0.0-beta.35 → 1.0.0-beta.36
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.js +8 -1
- package/index.mjs +8 -1
- package/package.json +1 -1
- package/reanimated.d.mts +5 -4
- package/reanimated.d.ts +5 -4
package/index.js
CHANGED
|
@@ -1635,7 +1635,14 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
|
|
|
1635
1635
|
const initalizeStateVars = () => {
|
|
1636
1636
|
set$(ctx, "lastItemKeys", memoizedLastItemKeys);
|
|
1637
1637
|
set$(ctx, "numColumns", numColumnsProp);
|
|
1638
|
-
|
|
1638
|
+
if (maintainVisibleContentPosition) {
|
|
1639
|
+
const prevPaddingTop = peek$(ctx, "stylePaddingTop");
|
|
1640
|
+
const paddingDiff = stylePaddingTop - prevPaddingTop;
|
|
1641
|
+
if (paddingDiff) {
|
|
1642
|
+
scrollTo(refState.current.scroll + paddingDiff, false);
|
|
1643
|
+
}
|
|
1644
|
+
set$(ctx, "stylePaddingTop", stylePaddingTop);
|
|
1645
|
+
}
|
|
1639
1646
|
};
|
|
1640
1647
|
if (isFirst) {
|
|
1641
1648
|
initalizeStateVars();
|
package/index.mjs
CHANGED
|
@@ -1614,7 +1614,14 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
|
|
|
1614
1614
|
const initalizeStateVars = () => {
|
|
1615
1615
|
set$(ctx, "lastItemKeys", memoizedLastItemKeys);
|
|
1616
1616
|
set$(ctx, "numColumns", numColumnsProp);
|
|
1617
|
-
|
|
1617
|
+
if (maintainVisibleContentPosition) {
|
|
1618
|
+
const prevPaddingTop = peek$(ctx, "stylePaddingTop");
|
|
1619
|
+
const paddingDiff = stylePaddingTop - prevPaddingTop;
|
|
1620
|
+
if (paddingDiff) {
|
|
1621
|
+
scrollTo(refState.current.scroll + paddingDiff, false);
|
|
1622
|
+
}
|
|
1623
|
+
set$(ctx, "stylePaddingTop", stylePaddingTop);
|
|
1624
|
+
}
|
|
1618
1625
|
};
|
|
1619
1626
|
if (isFirst) {
|
|
1620
1627
|
initalizeStateVars();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/list",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.36",
|
|
4
4
|
"description": "Legend List aims to be a drop-in replacement for FlatList with much better performance and supporting dynamically sized items.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"private": false,
|
package/reanimated.d.mts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
|
|
2
2
|
import React__default, { ComponentProps } from 'react';
|
|
3
3
|
import Animated from 'react-native-reanimated';
|
|
4
4
|
|
|
5
5
|
type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "ItemSeparatorComponent";
|
|
6
6
|
type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
|
|
7
|
-
interface
|
|
7
|
+
interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
|
|
8
8
|
refScrollView?: React__default.Ref<Animated.ScrollView>;
|
|
9
9
|
}
|
|
10
10
|
type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
|
|
11
|
-
type
|
|
11
|
+
type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT>;
|
|
12
|
+
type AnimatedLegendListDefinition = <ItemT>(props: Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT> & {
|
|
12
13
|
ref?: React__default.Ref<LegendListRef>;
|
|
13
14
|
}) => React__default.ReactElement | null;
|
|
14
15
|
declare const AnimatedLegendList: AnimatedLegendListDefinition;
|
|
15
16
|
|
|
16
|
-
export { AnimatedLegendList };
|
|
17
|
+
export { AnimatedLegendList, type AnimatedLegendListProps, type AnimatedLegendListPropsBase };
|
package/reanimated.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
|
|
2
2
|
import React__default, { ComponentProps } from 'react';
|
|
3
3
|
import Animated from 'react-native-reanimated';
|
|
4
4
|
|
|
5
5
|
type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "ItemSeparatorComponent";
|
|
6
6
|
type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
|
|
7
|
-
interface
|
|
7
|
+
interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
|
|
8
8
|
refScrollView?: React__default.Ref<Animated.ScrollView>;
|
|
9
9
|
}
|
|
10
10
|
type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
|
|
11
|
-
type
|
|
11
|
+
type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT>;
|
|
12
|
+
type AnimatedLegendListDefinition = <ItemT>(props: Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList"> & OtherAnimatedLegendListProps<ItemT> & {
|
|
12
13
|
ref?: React__default.Ref<LegendListRef>;
|
|
13
14
|
}) => React__default.ReactElement | null;
|
|
14
15
|
declare const AnimatedLegendList: AnimatedLegendListDefinition;
|
|
15
16
|
|
|
16
|
-
export { AnimatedLegendList };
|
|
17
|
+
export { AnimatedLegendList, type AnimatedLegendListProps, type AnimatedLegendListPropsBase };
|