@legendapp/list 3.0.0-beta.49 → 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/index.js CHANGED
@@ -1402,8 +1402,9 @@ function ScrollAdjust() {
1402
1402
  const ctx = useStateContext();
1403
1403
  const lastScrollOffsetRef = React3__namespace.useRef(0);
1404
1404
  const resetPaddingRafRef = React3__namespace.useRef(void 0);
1405
+ const resetPaddingBaselineRef = React3__namespace.useRef(void 0);
1405
1406
  const callback = React3__namespace.useCallback(() => {
1406
- var _a3;
1407
+ var _a3, _b;
1407
1408
  const scrollAdjust = peek$(ctx, "scrollAdjust");
1408
1409
  const scrollAdjustUserOffset = peek$(ctx, "scrollAdjustUserOffset");
1409
1410
  const scrollOffset = (scrollAdjust || 0) + (scrollAdjustUserOffset || 0);
@@ -1425,7 +1426,8 @@ function ScrollAdjust() {
1425
1426
  const viewportSize = el[axis.viewportSizeKey];
1426
1427
  const nextScroll = prevScroll + scrollDelta;
1427
1428
  if (scrollDelta > 0 && !ctx.state.adjustingFromInitialMount && totalSize < nextScroll + viewportSize) {
1428
- const previousPaddingEnd = contentNode.style[axis.paddingEndProp];
1429
+ const previousPaddingEnd = (_b = resetPaddingBaselineRef.current) != null ? _b : contentNode.style[axis.paddingEndProp];
1430
+ resetPaddingBaselineRef.current = previousPaddingEnd;
1429
1431
  const pad = (nextScroll + viewportSize - totalSize) * 2;
1430
1432
  contentNode.style[axis.paddingEndProp] = `${pad}px`;
1431
1433
  void contentNode.offsetHeight;
@@ -1435,6 +1437,7 @@ function ScrollAdjust() {
1435
1437
  }
1436
1438
  resetPaddingRafRef.current = requestAnimationFrame(() => {
1437
1439
  resetPaddingRafRef.current = void 0;
1440
+ resetPaddingBaselineRef.current = void 0;
1438
1441
  contentNode.style[axis.paddingEndProp] = previousPaddingEnd;
1439
1442
  });
1440
1443
  } else {
package/index.mjs CHANGED
@@ -1381,8 +1381,9 @@ function ScrollAdjust() {
1381
1381
  const ctx = useStateContext();
1382
1382
  const lastScrollOffsetRef = React3.useRef(0);
1383
1383
  const resetPaddingRafRef = React3.useRef(void 0);
1384
+ const resetPaddingBaselineRef = React3.useRef(void 0);
1384
1385
  const callback = React3.useCallback(() => {
1385
- var _a3;
1386
+ var _a3, _b;
1386
1387
  const scrollAdjust = peek$(ctx, "scrollAdjust");
1387
1388
  const scrollAdjustUserOffset = peek$(ctx, "scrollAdjustUserOffset");
1388
1389
  const scrollOffset = (scrollAdjust || 0) + (scrollAdjustUserOffset || 0);
@@ -1404,7 +1405,8 @@ function ScrollAdjust() {
1404
1405
  const viewportSize = el[axis.viewportSizeKey];
1405
1406
  const nextScroll = prevScroll + scrollDelta;
1406
1407
  if (scrollDelta > 0 && !ctx.state.adjustingFromInitialMount && totalSize < nextScroll + viewportSize) {
1407
- const previousPaddingEnd = contentNode.style[axis.paddingEndProp];
1408
+ const previousPaddingEnd = (_b = resetPaddingBaselineRef.current) != null ? _b : contentNode.style[axis.paddingEndProp];
1409
+ resetPaddingBaselineRef.current = previousPaddingEnd;
1408
1410
  const pad = (nextScroll + viewportSize - totalSize) * 2;
1409
1411
  contentNode.style[axis.paddingEndProp] = `${pad}px`;
1410
1412
  void contentNode.offsetHeight;
@@ -1414,6 +1416,7 @@ function ScrollAdjust() {
1414
1416
  }
1415
1417
  resetPaddingRafRef.current = requestAnimationFrame(() => {
1416
1418
  resetPaddingRafRef.current = void 0;
1419
+ resetPaddingBaselineRef.current = void 0;
1417
1420
  contentNode.style[axis.paddingEndProp] = previousPaddingEnd;
1418
1421
  });
1419
1422
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legendapp/list",
3
- "version": "3.0.0-beta.49",
3
+ "version": "3.0.0-beta.50",
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,
@@ -1405,8 +1405,9 @@ function ScrollAdjust() {
1405
1405
  const ctx = useStateContext();
1406
1406
  const lastScrollOffsetRef = React3__namespace.useRef(0);
1407
1407
  const resetPaddingRafRef = React3__namespace.useRef(void 0);
1408
+ const resetPaddingBaselineRef = React3__namespace.useRef(void 0);
1408
1409
  const callback = React3__namespace.useCallback(() => {
1409
- var _a3;
1410
+ var _a3, _b;
1410
1411
  const scrollAdjust = peek$(ctx, "scrollAdjust");
1411
1412
  const scrollAdjustUserOffset = peek$(ctx, "scrollAdjustUserOffset");
1412
1413
  const scrollOffset = (scrollAdjust || 0) + (scrollAdjustUserOffset || 0);
@@ -1428,7 +1429,8 @@ function ScrollAdjust() {
1428
1429
  const viewportSize = el[axis.viewportSizeKey];
1429
1430
  const nextScroll = prevScroll + scrollDelta;
1430
1431
  if (scrollDelta > 0 && !ctx.state.adjustingFromInitialMount && totalSize < nextScroll + viewportSize) {
1431
- const previousPaddingEnd = contentNode.style[axis.paddingEndProp];
1432
+ const previousPaddingEnd = (_b = resetPaddingBaselineRef.current) != null ? _b : contentNode.style[axis.paddingEndProp];
1433
+ resetPaddingBaselineRef.current = previousPaddingEnd;
1432
1434
  const pad = (nextScroll + viewportSize - totalSize) * 2;
1433
1435
  contentNode.style[axis.paddingEndProp] = `${pad}px`;
1434
1436
  void contentNode.offsetHeight;
@@ -1438,6 +1440,7 @@ function ScrollAdjust() {
1438
1440
  }
1439
1441
  resetPaddingRafRef.current = requestAnimationFrame(() => {
1440
1442
  resetPaddingRafRef.current = void 0;
1443
+ resetPaddingBaselineRef.current = void 0;
1441
1444
  contentNode.style[axis.paddingEndProp] = previousPaddingEnd;
1442
1445
  });
1443
1446
  } else {
@@ -1384,8 +1384,9 @@ function ScrollAdjust() {
1384
1384
  const ctx = useStateContext();
1385
1385
  const lastScrollOffsetRef = React3.useRef(0);
1386
1386
  const resetPaddingRafRef = React3.useRef(void 0);
1387
+ const resetPaddingBaselineRef = React3.useRef(void 0);
1387
1388
  const callback = React3.useCallback(() => {
1388
- var _a3;
1389
+ var _a3, _b;
1389
1390
  const scrollAdjust = peek$(ctx, "scrollAdjust");
1390
1391
  const scrollAdjustUserOffset = peek$(ctx, "scrollAdjustUserOffset");
1391
1392
  const scrollOffset = (scrollAdjust || 0) + (scrollAdjustUserOffset || 0);
@@ -1407,7 +1408,8 @@ function ScrollAdjust() {
1407
1408
  const viewportSize = el[axis.viewportSizeKey];
1408
1409
  const nextScroll = prevScroll + scrollDelta;
1409
1410
  if (scrollDelta > 0 && !ctx.state.adjustingFromInitialMount && totalSize < nextScroll + viewportSize) {
1410
- const previousPaddingEnd = contentNode.style[axis.paddingEndProp];
1411
+ const previousPaddingEnd = (_b = resetPaddingBaselineRef.current) != null ? _b : contentNode.style[axis.paddingEndProp];
1412
+ resetPaddingBaselineRef.current = previousPaddingEnd;
1411
1413
  const pad = (nextScroll + viewportSize - totalSize) * 2;
1412
1414
  contentNode.style[axis.paddingEndProp] = `${pad}px`;
1413
1415
  void contentNode.offsetHeight;
@@ -1417,6 +1419,7 @@ function ScrollAdjust() {
1417
1419
  }
1418
1420
  resetPaddingRafRef.current = requestAnimationFrame(() => {
1419
1421
  resetPaddingRafRef.current = void 0;
1422
+ resetPaddingBaselineRef.current = void 0;
1420
1423
  contentNode.style[axis.paddingEndProp] = previousPaddingEnd;
1421
1424
  });
1422
1425
  } else {
package/react.js CHANGED
@@ -1405,8 +1405,9 @@ function ScrollAdjust() {
1405
1405
  const ctx = useStateContext();
1406
1406
  const lastScrollOffsetRef = React3__namespace.useRef(0);
1407
1407
  const resetPaddingRafRef = React3__namespace.useRef(void 0);
1408
+ const resetPaddingBaselineRef = React3__namespace.useRef(void 0);
1408
1409
  const callback = React3__namespace.useCallback(() => {
1409
- var _a3;
1410
+ var _a3, _b;
1410
1411
  const scrollAdjust = peek$(ctx, "scrollAdjust");
1411
1412
  const scrollAdjustUserOffset = peek$(ctx, "scrollAdjustUserOffset");
1412
1413
  const scrollOffset = (scrollAdjust || 0) + (scrollAdjustUserOffset || 0);
@@ -1428,7 +1429,8 @@ function ScrollAdjust() {
1428
1429
  const viewportSize = el[axis.viewportSizeKey];
1429
1430
  const nextScroll = prevScroll + scrollDelta;
1430
1431
  if (scrollDelta > 0 && !ctx.state.adjustingFromInitialMount && totalSize < nextScroll + viewportSize) {
1431
- const previousPaddingEnd = contentNode.style[axis.paddingEndProp];
1432
+ const previousPaddingEnd = (_b = resetPaddingBaselineRef.current) != null ? _b : contentNode.style[axis.paddingEndProp];
1433
+ resetPaddingBaselineRef.current = previousPaddingEnd;
1432
1434
  const pad = (nextScroll + viewportSize - totalSize) * 2;
1433
1435
  contentNode.style[axis.paddingEndProp] = `${pad}px`;
1434
1436
  void contentNode.offsetHeight;
@@ -1438,6 +1440,7 @@ function ScrollAdjust() {
1438
1440
  }
1439
1441
  resetPaddingRafRef.current = requestAnimationFrame(() => {
1440
1442
  resetPaddingRafRef.current = void 0;
1443
+ resetPaddingBaselineRef.current = void 0;
1441
1444
  contentNode.style[axis.paddingEndProp] = previousPaddingEnd;
1442
1445
  });
1443
1446
  } else {
package/react.mjs CHANGED
@@ -1384,8 +1384,9 @@ function ScrollAdjust() {
1384
1384
  const ctx = useStateContext();
1385
1385
  const lastScrollOffsetRef = React3.useRef(0);
1386
1386
  const resetPaddingRafRef = React3.useRef(void 0);
1387
+ const resetPaddingBaselineRef = React3.useRef(void 0);
1387
1388
  const callback = React3.useCallback(() => {
1388
- var _a3;
1389
+ var _a3, _b;
1389
1390
  const scrollAdjust = peek$(ctx, "scrollAdjust");
1390
1391
  const scrollAdjustUserOffset = peek$(ctx, "scrollAdjustUserOffset");
1391
1392
  const scrollOffset = (scrollAdjust || 0) + (scrollAdjustUserOffset || 0);
@@ -1407,7 +1408,8 @@ function ScrollAdjust() {
1407
1408
  const viewportSize = el[axis.viewportSizeKey];
1408
1409
  const nextScroll = prevScroll + scrollDelta;
1409
1410
  if (scrollDelta > 0 && !ctx.state.adjustingFromInitialMount && totalSize < nextScroll + viewportSize) {
1410
- const previousPaddingEnd = contentNode.style[axis.paddingEndProp];
1411
+ const previousPaddingEnd = (_b = resetPaddingBaselineRef.current) != null ? _b : contentNode.style[axis.paddingEndProp];
1412
+ resetPaddingBaselineRef.current = previousPaddingEnd;
1411
1413
  const pad = (nextScroll + viewportSize - totalSize) * 2;
1412
1414
  contentNode.style[axis.paddingEndProp] = `${pad}px`;
1413
1415
  void contentNode.offsetHeight;
@@ -1417,6 +1419,7 @@ function ScrollAdjust() {
1417
1419
  }
1418
1420
  resetPaddingRafRef.current = requestAnimationFrame(() => {
1419
1421
  resetPaddingRafRef.current = void 0;
1422
+ resetPaddingBaselineRef.current = void 0;
1420
1423
  contentNode.style[axis.paddingEndProp] = previousPaddingEnd;
1421
1424
  });
1422
1425
  } else {