@prose-reader/core 1.90.0 → 1.92.0

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/dist/index.js CHANGED
@@ -4759,13 +4759,13 @@ class ReaderSettingsManager extends SettingsManager3 {
4759
4759
  getDefaultSettings() {
4760
4760
  return {
4761
4761
  forceSinglePageMode: false,
4762
- pageTurnAnimation: `none`,
4762
+ pageTurnAnimation: `slide`,
4763
4763
  pageTurnDirection: `horizontal`,
4764
4764
  pageTurnAnimationDuration: void 0,
4765
4765
  pageTurnMode: `controlled`,
4766
4766
  snapAnimationDuration: 300,
4767
4767
  navigationSnapThreshold: 0.3,
4768
- numberOfAdjacentSpineItemToPreLoad: 2
4768
+ numberOfAdjacentSpineItemToPreLoad: 3
4769
4769
  };
4770
4770
  }
4771
4771
  }
@@ -6430,17 +6430,20 @@ const getItemVisibilityForPosition = ({
6430
6430
  context
6431
6431
  }) => {
6432
6432
  const viewportLeft = viewportPosition.x;
6433
- const viewportRight = Math.max(
6434
- viewportPosition.x + (context.state.visibleAreaRect.width - 1),
6435
- 0
6436
- );
6433
+ const viewportRight = viewportPosition.x + (context.state.visibleAreaRect.width - 1);
6437
6434
  const viewportTop = viewportPosition.y;
6438
6435
  const viewportBottom = Math.max(
6439
6436
  viewportPosition.y + (context.state.visibleAreaRect.height - 1),
6440
6437
  0
6441
6438
  );
6442
- const visibleWidthOfItem = Math.min(right, viewportRight) - Math.max(left, viewportLeft);
6443
- const visibleHeightOfItem = Math.min(bottom, viewportBottom) - Math.max(top, viewportTop);
6439
+ const visibleWidthOfItem = Math.max(
6440
+ 0,
6441
+ Math.min(right, viewportRight) - Math.max(left, viewportLeft)
6442
+ );
6443
+ const visibleHeightOfItem = Math.max(
6444
+ 0,
6445
+ Math.min(bottom, viewportBottom) - Math.max(top, viewportTop)
6446
+ );
6444
6447
  const itemIsOnTheOuterEdge = visibleWidthOfItem <= 0 || visibleHeightOfItem <= 0;
6445
6448
  if (itemIsOnTheOuterEdge) return { visible: false };
6446
6449
  const isItemVisibleEnoughOnScreen = isItemVisibleOnScreenByThresholdForPosition({