@legendapp/list 3.0.0-beta.46 → 3.0.0-beta.47
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.native.js +3 -6
- package/index.native.mjs +3 -6
- package/package.json +1 -1
- package/react-native.js +3 -6
- package/react-native.mjs +3 -6
- package/reanimated.js +1 -1
- package/reanimated.mjs +1 -1
package/index.native.js
CHANGED
|
@@ -374,7 +374,7 @@ var PositionViewSticky = typedMemo(function PositionViewSticky2({
|
|
|
374
374
|
() => getStickyPushLimit(ctx.state, index, itemKey),
|
|
375
375
|
[ctx.state, index, itemKey, _totalSize]
|
|
376
376
|
);
|
|
377
|
-
const
|
|
377
|
+
const transform = React2__namespace.useMemo(() => {
|
|
378
378
|
var _a3;
|
|
379
379
|
if (animatedScrollY) {
|
|
380
380
|
const stickyConfigOffset = (_a3 = stickyHeaderConfig == null ? void 0 : stickyHeaderConfig.offset) != null ? _a3 : 0;
|
|
@@ -399,13 +399,10 @@ var PositionViewSticky = typedMemo(function PositionViewSticky2({
|
|
|
399
399
|
outputRange: [position, position + 5e3]
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
|
-
return nextStickyPosition;
|
|
402
|
+
return horizontal ? [{ translateX: nextStickyPosition }] : [{ translateY: nextStickyPosition }];
|
|
403
403
|
}
|
|
404
404
|
}, [animatedScrollY, headerSize, position, pushLimit, stylePaddingTop, stickyHeaderConfig == null ? void 0 : stickyHeaderConfig.offset]);
|
|
405
|
-
const viewStyle = React2__namespace.useMemo(
|
|
406
|
-
() => [style, { zIndex: index + 1e3 }, horizontal ? { left: stickyPosition } : { top: stickyPosition }],
|
|
407
|
-
[horizontal, index, stickyPosition, style]
|
|
408
|
-
);
|
|
405
|
+
const viewStyle = React2__namespace.useMemo(() => [style, { zIndex: index + 1e3 }, { transform }], [style, transform]);
|
|
409
406
|
const renderStickyHeaderBackdrop = React2__namespace.useMemo(() => {
|
|
410
407
|
if (!(stickyHeaderConfig == null ? void 0 : stickyHeaderConfig.backdropComponent)) {
|
|
411
408
|
return null;
|
package/index.native.mjs
CHANGED
|
@@ -353,7 +353,7 @@ var PositionViewSticky = typedMemo(function PositionViewSticky2({
|
|
|
353
353
|
() => getStickyPushLimit(ctx.state, index, itemKey),
|
|
354
354
|
[ctx.state, index, itemKey, _totalSize]
|
|
355
355
|
);
|
|
356
|
-
const
|
|
356
|
+
const transform = React2.useMemo(() => {
|
|
357
357
|
var _a3;
|
|
358
358
|
if (animatedScrollY) {
|
|
359
359
|
const stickyConfigOffset = (_a3 = stickyHeaderConfig == null ? void 0 : stickyHeaderConfig.offset) != null ? _a3 : 0;
|
|
@@ -378,13 +378,10 @@ var PositionViewSticky = typedMemo(function PositionViewSticky2({
|
|
|
378
378
|
outputRange: [position, position + 5e3]
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
return nextStickyPosition;
|
|
381
|
+
return horizontal ? [{ translateX: nextStickyPosition }] : [{ translateY: nextStickyPosition }];
|
|
382
382
|
}
|
|
383
383
|
}, [animatedScrollY, headerSize, position, pushLimit, stylePaddingTop, stickyHeaderConfig == null ? void 0 : stickyHeaderConfig.offset]);
|
|
384
|
-
const viewStyle = React2.useMemo(
|
|
385
|
-
() => [style, { zIndex: index + 1e3 }, horizontal ? { left: stickyPosition } : { top: stickyPosition }],
|
|
386
|
-
[horizontal, index, stickyPosition, style]
|
|
387
|
-
);
|
|
384
|
+
const viewStyle = React2.useMemo(() => [style, { zIndex: index + 1e3 }, { transform }], [style, transform]);
|
|
388
385
|
const renderStickyHeaderBackdrop = React2.useMemo(() => {
|
|
389
386
|
if (!(stickyHeaderConfig == null ? void 0 : stickyHeaderConfig.backdropComponent)) {
|
|
390
387
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/list",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.47",
|
|
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,
|
package/react-native.js
CHANGED
|
@@ -374,7 +374,7 @@ var PositionViewSticky = typedMemo(function PositionViewSticky2({
|
|
|
374
374
|
() => getStickyPushLimit(ctx.state, index, itemKey),
|
|
375
375
|
[ctx.state, index, itemKey, _totalSize]
|
|
376
376
|
);
|
|
377
|
-
const
|
|
377
|
+
const transform = React2__namespace.useMemo(() => {
|
|
378
378
|
var _a3;
|
|
379
379
|
if (animatedScrollY) {
|
|
380
380
|
const stickyConfigOffset = (_a3 = stickyHeaderConfig == null ? void 0 : stickyHeaderConfig.offset) != null ? _a3 : 0;
|
|
@@ -399,13 +399,10 @@ var PositionViewSticky = typedMemo(function PositionViewSticky2({
|
|
|
399
399
|
outputRange: [position, position + 5e3]
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
|
-
return nextStickyPosition;
|
|
402
|
+
return horizontal ? [{ translateX: nextStickyPosition }] : [{ translateY: nextStickyPosition }];
|
|
403
403
|
}
|
|
404
404
|
}, [animatedScrollY, headerSize, position, pushLimit, stylePaddingTop, stickyHeaderConfig == null ? void 0 : stickyHeaderConfig.offset]);
|
|
405
|
-
const viewStyle = React2__namespace.useMemo(
|
|
406
|
-
() => [style, { zIndex: index + 1e3 }, horizontal ? { left: stickyPosition } : { top: stickyPosition }],
|
|
407
|
-
[horizontal, index, stickyPosition, style]
|
|
408
|
-
);
|
|
405
|
+
const viewStyle = React2__namespace.useMemo(() => [style, { zIndex: index + 1e3 }, { transform }], [style, transform]);
|
|
409
406
|
const renderStickyHeaderBackdrop = React2__namespace.useMemo(() => {
|
|
410
407
|
if (!(stickyHeaderConfig == null ? void 0 : stickyHeaderConfig.backdropComponent)) {
|
|
411
408
|
return null;
|
package/react-native.mjs
CHANGED
|
@@ -353,7 +353,7 @@ var PositionViewSticky = typedMemo(function PositionViewSticky2({
|
|
|
353
353
|
() => getStickyPushLimit(ctx.state, index, itemKey),
|
|
354
354
|
[ctx.state, index, itemKey, _totalSize]
|
|
355
355
|
);
|
|
356
|
-
const
|
|
356
|
+
const transform = React2.useMemo(() => {
|
|
357
357
|
var _a3;
|
|
358
358
|
if (animatedScrollY) {
|
|
359
359
|
const stickyConfigOffset = (_a3 = stickyHeaderConfig == null ? void 0 : stickyHeaderConfig.offset) != null ? _a3 : 0;
|
|
@@ -378,13 +378,10 @@ var PositionViewSticky = typedMemo(function PositionViewSticky2({
|
|
|
378
378
|
outputRange: [position, position + 5e3]
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
return nextStickyPosition;
|
|
381
|
+
return horizontal ? [{ translateX: nextStickyPosition }] : [{ translateY: nextStickyPosition }];
|
|
382
382
|
}
|
|
383
383
|
}, [animatedScrollY, headerSize, position, pushLimit, stylePaddingTop, stickyHeaderConfig == null ? void 0 : stickyHeaderConfig.offset]);
|
|
384
|
-
const viewStyle = React2.useMemo(
|
|
385
|
-
() => [style, { zIndex: index + 1e3 }, horizontal ? { left: stickyPosition } : { top: stickyPosition }],
|
|
386
|
-
[horizontal, index, stickyPosition, style]
|
|
387
|
-
);
|
|
384
|
+
const viewStyle = React2.useMemo(() => [style, { zIndex: index + 1e3 }, { transform }], [style, transform]);
|
|
388
385
|
const renderStickyHeaderBackdrop = React2.useMemo(() => {
|
|
389
386
|
if (!(stickyHeaderConfig == null ? void 0 : stickyHeaderConfig.backdropComponent)) {
|
|
390
387
|
return null;
|
package/reanimated.js
CHANGED
|
@@ -93,7 +93,7 @@ var ReanimatedPositionViewSticky = typedMemo(function ReanimatedPositionViewStic
|
|
|
93
93
|
const delta = Math.max(0, stickyScrollOffset.value - stickyStart);
|
|
94
94
|
const stickyPosition = position + delta;
|
|
95
95
|
const resolvedPosition = pushLimit !== void 0 ? Math.min(stickyPosition, pushLimit) : stickyPosition;
|
|
96
|
-
return horizontal ? {
|
|
96
|
+
return horizontal ? { transform: [{ translateX: resolvedPosition }] } : { transform: [{ translateY: resolvedPosition }] };
|
|
97
97
|
}, [horizontal, position, pushLimit, stickyStart]);
|
|
98
98
|
const viewStyle = React__namespace.useMemo(
|
|
99
99
|
() => [style, { zIndex: index + 1e3 }, stickyPositionStyle],
|
package/reanimated.mjs
CHANGED
|
@@ -69,7 +69,7 @@ var ReanimatedPositionViewSticky = typedMemo(function ReanimatedPositionViewStic
|
|
|
69
69
|
const delta = Math.max(0, stickyScrollOffset.value - stickyStart);
|
|
70
70
|
const stickyPosition = position + delta;
|
|
71
71
|
const resolvedPosition = pushLimit !== void 0 ? Math.min(stickyPosition, pushLimit) : stickyPosition;
|
|
72
|
-
return horizontal ? {
|
|
72
|
+
return horizontal ? { transform: [{ translateX: resolvedPosition }] } : { transform: [{ translateY: resolvedPosition }] };
|
|
73
73
|
}, [horizontal, position, pushLimit, stickyStart]);
|
|
74
74
|
const viewStyle = React.useMemo(
|
|
75
75
|
() => [style, { zIndex: index + 1e3 }, stickyPositionStyle],
|