@pdf-viewer/react 1.10.0-beta.4 → 1.10.0-beta.5
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.
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { SCROLL_BAR_WIDTH as a } from "./constants.js";
|
|
1
|
+
import { SCROLL_BAR_WIDTH as a, PAGE_PADDING as f } from "./constants.js";
|
|
2
2
|
import { ViewMode as u, ZoomLevel as r } from "./types.js";
|
|
3
|
-
const
|
|
3
|
+
const l = (o, t, m, e, A, c) => {
|
|
4
4
|
if (typeof o == "number")
|
|
5
5
|
return o;
|
|
6
|
-
const n =
|
|
6
|
+
const n = c === u.DUAL_PAGE ? 2 * e : e;
|
|
7
7
|
switch (o) {
|
|
8
8
|
case r.PAGE_FIT:
|
|
9
|
-
const
|
|
9
|
+
const s = Math.min(
|
|
10
10
|
(t - a) / n,
|
|
11
|
-
m /
|
|
11
|
+
(m - f) / A
|
|
12
12
|
);
|
|
13
|
-
return Math.floor(
|
|
13
|
+
return Math.floor(s * 100);
|
|
14
14
|
case r.PAGE_WIDTH:
|
|
15
15
|
return Math.floor((t - a) / n * 100);
|
|
16
16
|
case r.ACTUAL:
|
|
@@ -19,5 +19,5 @@ const Z = (o, t, m, e, c, s) => {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
l as getZoomLevel
|
|
23
23
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState as E, useCallback as h, useEffect as A } from "react";
|
|
2
2
|
import { appConsole as l } from "../appConsole.js";
|
|
3
|
-
const b = /* @__PURE__ */ new Date("2025-10-
|
|
3
|
+
const b = /* @__PURE__ */ new Date("2025-10-24T06:57:21.616Z"), d = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
|
|
4
4
|
invalidLicense: `You are currently using without a valid license. ${d}`,
|
|
5
5
|
mismatchedDomain: `Your license key is not valid for the current domain / IP. ${d}`,
|
|
6
6
|
expired: `Your license key has expired. ${d}`,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@pdf-viewer/react",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "A react-pdf-viewer component for React and Next.js. Suitable for react-pdf document.",
|
|
5
|
-
"version": "1.10.0-beta.
|
|
5
|
+
"version": "1.10.0-beta.5",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react-pdf",
|
|
8
8
|
"react-pdf-viewer",
|