@prose-reader/core 1.252.0 → 1.254.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
@@ -3935,6 +3935,11 @@ const zo = () => (n) => n.pipe(
3935
3935
  *
3936
3936
  * For now having things centered (negative x) on zoom out in scroll mode can be achieved with transform origin for example.
3937
3937
  * This "limitation" is here at the moment to avoid unexpected behaviors.
3938
+ *
3939
+ * @note
3940
+ * Has a bug where scaling from < 1 to 1 was creating positive x offset. This is "expected" since on scroll mode the viewport
3941
+ * is at the offset 0 at scale 0.2 for eg: then when calculating new scroll delta, we get positive x offset. Anyway, to prevent
3942
+ * out of bounds position this should make sure we always stay within an item.
3938
3943
  */
3939
3944
  position: t.position ? n.fromOutOfBoundsSpinePosition(
3940
3945
  t.position
@@ -4808,7 +4813,7 @@ function Kt({
4808
4813
  t.items.length - 1
4809
4814
  ), r = i.getSpineItemSpineLayoutInfo(
4810
4815
  s || 0
4811
- ), a = r.bottom, c = Math.max(0, n.y), u = Math.min(c, a);
4816
+ ), a = r.bottom - 1, c = Math.max(0, n.y), u = Math.min(c, a);
4812
4817
  if (e) {
4813
4818
  const h = Math.min(o, n.x), p = Math.max(h, r.left);
4814
4819
  return new M({
@@ -4816,7 +4821,7 @@ function Kt({
4816
4821
  y: u
4817
4822
  });
4818
4823
  }
4819
- const l = r.right, d = Math.max(0, n.x), g = Math.min(d, l);
4824
+ const l = r.right - 1, d = Math.max(0, n.x), g = Math.min(d, l);
4820
4825
  return new M({
4821
4826
  x: g,
4822
4827
  y: u