@react-pdf-kit/viewer 2.3.0-beta.4 → 2.4.0-beta.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.
Files changed (93) hide show
  1. package/dist/assets/style.css +1 -1
  2. package/dist/assets/style.js +5 -5
  3. package/dist/components/RPController.js +1 -1
  4. package/dist/components/RPDropFileZone.js +7 -6
  5. package/dist/components/RPPages.js +375 -373
  6. package/dist/components/RPProvider.js +1 -1
  7. package/dist/components/layout/RPDefaultLayout.js +3 -2
  8. package/dist/components/layout/RPLayout.js +3 -2
  9. package/dist/components/layout/WrapperLayout.js +3 -2
  10. package/dist/components/layout/sidebar/RPSidebar.js +3 -2
  11. package/dist/components/layout/sidebar/Thumbnail.js +3 -2
  12. package/dist/components/layout/sidebar/Thumbnails.js +3 -2
  13. package/dist/components/layout/toolbar/DocumentDialog.js +5 -4
  14. package/dist/components/layout/toolbar/FileDownloadTool.js +3 -2
  15. package/dist/components/layout/toolbar/FileUploadTool.js +3 -2
  16. package/dist/components/layout/toolbar/MostPageTool.js +3 -2
  17. package/dist/components/layout/toolbar/OtherTool.js +3 -2
  18. package/dist/components/layout/toolbar/Paginate.js +3 -2
  19. package/dist/components/layout/toolbar/PrintTool.js +3 -2
  20. package/dist/components/layout/toolbar/RPMoreOptions.js +3 -2
  21. package/dist/components/layout/toolbar/RPToolbar.js +3 -2
  22. package/dist/components/layout/toolbar/RPToolbarEnd.js +3 -2
  23. package/dist/components/layout/toolbar/RotateTool.js +3 -2
  24. package/dist/components/layout/toolbar/SearchResultNavigator.js +3 -2
  25. package/dist/components/layout/toolbar/SearchTool.js +3 -2
  26. package/dist/components/layout/toolbar/ThumbnailTool.js +3 -2
  27. package/dist/components/layout/toolbar/ToolbarCustom.js +3 -2
  28. package/dist/components/layout/toolbar/ToolbarDefault.js +3 -2
  29. package/dist/components/layout/toolbar/ToolbarLayout.js +3 -2
  30. package/dist/components/layout/toolbar/ZoomTool.js +3 -2
  31. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +3 -2
  32. package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +1 -1
  33. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +3 -2
  34. package/dist/components/layout/toolbar/tools/FileUploadTool.js +3 -2
  35. package/dist/components/layout/toolbar/tools/FirstPageTool.js +1 -1
  36. package/dist/components/layout/toolbar/tools/InputPageTool.js +3 -2
  37. package/dist/components/layout/toolbar/tools/LastPageTool.js +1 -1
  38. package/dist/components/layout/toolbar/tools/NextPageTool.js +3 -2
  39. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +3 -2
  40. package/dist/components/layout/toolbar/tools/PrintTool.js +3 -2
  41. package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +3 -2
  42. package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +3 -2
  43. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +3 -2
  44. package/dist/components/layout/toolbar/tools/ZoomInTool.js +3 -2
  45. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +13 -12
  46. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +3 -2
  47. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +3 -2
  48. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +3 -2
  49. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +3 -2
  50. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +3 -2
  51. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +3 -2
  52. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +3 -2
  53. package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +3 -2
  54. package/dist/components/page/AnnotationLayer.js +3 -2
  55. package/dist/components/page/CanvasLayer.js +3 -2
  56. package/dist/components/page/CustomElement.js +1 -1
  57. package/dist/components/page/DualPage.js +1 -1
  58. package/dist/components/page/DualPageWithCover.js +1 -1
  59. package/dist/components/page/RPPage.js +1 -1
  60. package/dist/components/page/SinglePage.js +1 -1
  61. package/dist/components/page/TextHighlightLayer.js +1 -1
  62. package/dist/components/page/TextLayer.js +3 -2
  63. package/dist/components/ui/LoadingIndicator.js +7 -6
  64. package/dist/contexts/DimensionPagesContext.js +5 -4
  65. package/dist/contexts/DropFileZoneContext.js +4 -3
  66. package/dist/contexts/FileInputContext.js +5 -4
  67. package/dist/contexts/HighlightContext.js +5 -4
  68. package/dist/contexts/PagesRotateContext.js +5 -4
  69. package/dist/contexts/PaginationContext.js +5 -4
  70. package/dist/contexts/PrintContext.js +16 -15
  71. package/dist/contexts/RPDocumentContext.js +13 -12
  72. package/dist/contexts/RenderQueueProvider.js +5 -4
  73. package/dist/contexts/RotationContext.js +8 -7
  74. package/dist/contexts/SearchContext.js +5 -4
  75. package/dist/contexts/ThumbnailsContext.js +4 -3
  76. package/dist/contexts/ZoomContext.js +5 -4
  77. package/dist/types/utils/const.d.ts +1 -0
  78. package/dist/types/utils/types.d.ts +2 -1
  79. package/dist/utils/const.js +2 -1
  80. package/dist/utils/hooks/useFileDownload.js +5 -4
  81. package/dist/utils/hooks/useLicense.js +1 -1
  82. package/dist/utils/hooks/useLoadPdf.js +67 -60
  83. package/dist/utils/hooks/usePaginate.js +3 -2
  84. package/dist/utils/hooks/usePinch.js +10 -9
  85. package/dist/utils/hooks/usePresentPage.js +3 -2
  86. package/dist/utils/hooks/usePrint.js +3 -2
  87. package/dist/utils/hooks/useRotate.js +3 -2
  88. package/dist/utils/hooks/useScrollToPage.js +3 -2
  89. package/dist/utils/hooks/useSearch.js +15 -14
  90. package/dist/utils/hooks/useThumbnail.js +17 -16
  91. package/dist/utils/hooks/useVirtualReactWindow.js +3 -2
  92. package/dist/utils/types.js +3 -3
  93. package/package.json +1 -1
@@ -10,13 +10,14 @@ import "../getThumbnailViewport.js";
10
10
  import "../../contexts/ConfigContext.js";
11
11
  import "../../contexts/DocumentPasswordContext.js";
12
12
  import "../appConsole.js";
13
+ import "../const.js";
13
14
  import "./usePdfProperties.js";
14
15
  import "../convertPdfDate.js";
15
16
  import "../formatFileSize.js";
16
- const i = ".pdf", d = (o) => URL.createObjectURL(o), l = async (o) => {
17
+ const i = ".pdf", d = (o) => URL.createObjectURL(o), p = async (o) => {
17
18
  const r = await (await fetch(o)).blob();
18
19
  return d(r);
19
- }, k = () => {
20
+ }, B = () => {
20
21
  const { filename: o, pdfSrc: e } = c(), { downloadFilename: r } = s(), m = (t) => {
21
22
  const n = r || t;
22
23
  return n.endsWith(i) ? n : `${n}${i}`;
@@ -25,9 +26,9 @@ const i = ".pdf", d = (o) => URL.createObjectURL(o), l = async (o) => {
25
26
  if (!o || !e)
26
27
  throw new Error("There is no PDF source to download");
27
28
  const t = document.createElement("a");
28
- t.href = await l(e), t.download = m(o), document.body.appendChild(t), t.click(), document.body.removeChild(t);
29
+ t.href = await p(e), t.download = m(o), document.body.appendChild(t), t.click(), document.body.removeChild(t);
29
30
  }, [o, e]) };
30
31
  };
31
32
  export {
32
- k as useFileDownload
33
+ B as useFileDownload
33
34
  };
@@ -2,7 +2,7 @@ import { useState as E, useCallback as y, useEffect as b } from "react";
2
2
  import { LicenseType as L } from "../types.js";
3
3
  import { appConsole as c } from "../appConsole.js";
4
4
  import "../../de_DE-a553b162.js";
5
- const A = /* @__PURE__ */ new Date("2026-04-02T17:46:20.744Z"), w = `-----BEGIN PUBLIC KEY-----
5
+ const A = /* @__PURE__ */ new Date("2026-04-07T05:21:21.306Z"), w = `-----BEGIN PUBLIC KEY-----
6
6
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvIokvErJ0Fctu0jduSAx
7
7
  gr+5Har/VSuZLlOunS28hnlqqA+OF1apHL7RYkjBosS15yvviYdLrVWYHpHnoY4b
8
8
  HLQ9I6YX6FMB9T/VbB4xLdVdKvfi8r49aTScl5EKuSpgpPgz2VSJTfvVGcRuth/Y
@@ -1,86 +1,93 @@
1
- import { useState as d, useRef as F, useEffect as k } from "react";
2
- import * as h from "pdfjs-dist";
3
- import { ErrorType as j } from "../types.js";
1
+ import { useState as d, useRef as j, useEffect as C } from "react";
2
+ import * as A from "pdfjs-dist";
3
+ import { ErrorType as T } from "../types.js";
4
4
  import { getThumbnailViewport as z } from "../getThumbnailViewport.js";
5
- import { useConfigContext as _ } from "../../contexts/ConfigContext.js";
5
+ import { useConfigContext as G } from "../../contexts/ConfigContext.js";
6
6
  import { useDocumentPasswordContext as B } from "../../contexts/DocumentPasswordContext.js";
7
+ import { INVALID_OR_CORRUPTED_PDF_MESSAGE as H } from "../const.js";
7
8
  import "../../de_DE-a553b162.js";
8
9
  import "react/jsx-runtime";
9
10
  import "../appConsole.js";
10
- const Z = (m, s, q = {}) => {
11
- const [n, S] = d(), { workerUrlAdded: T, wasmUrl: f } = _(), [D, x] = d(/* @__PURE__ */ new Map()), a = F(), [g, P] = d(0), [c, C] = d(!1), [N, O] = d(), { password: u, passwordError: A, setPasswordError: p, passwordRequired: w, setPasswordRequired: E } = B(), { onLoadError: i, onLoaded: b, onLoadProgress: R, disableAutoFetch: V, disableStream: I, rangeChunkSize: U } = q;
12
- return k(() => {
13
- R && R(g);
14
- }, [g, R]), k(() => {
15
- if (!T || !m)
11
+ function F(i) {
12
+ const t = new Error(H);
13
+ return t.cause = i, t;
14
+ }
15
+ const ee = (i, t, L = {}) => {
16
+ const [a, P] = d(), { workerUrlAdded: S, wasmUrl: c } = G(), [N, V] = d(/* @__PURE__ */ new Map()), u = j(), [g, p] = d(0), [w, y] = d(!1), [h, l] = d(), { password: f, passwordError: q, setPasswordError: E, passwordRequired: R, setPasswordRequired: D } = B(), { onLoadError: o, onLoaded: I, onLoadProgress: v, disableAutoFetch: U, disableStream: k, rangeChunkSize: x } = L;
17
+ return C(() => {
18
+ v && v(g);
19
+ }, [g, v]), C(() => {
20
+ if (!S || !i)
16
21
  return;
17
- P(0), a.current = Date.now();
18
- const r = a.current, v = {
19
- url: m,
20
- cMapPacked: (s == null ? void 0 : s.isCompressed) ?? !0,
21
- ...(s == null ? void 0 : s.url) && { cMapUrl: s.url },
22
- ...u && { password: u },
23
- ...V !== void 0 && { disableAutoFetch: V },
24
- ...I !== void 0 && { disableStream: I },
25
- ...U !== void 0 && { rangeChunkSize: U },
26
- ...f && { wasmUrl: f },
27
- verbosity: h.VerbosityLevel.ERRORS
22
+ p(0), l(void 0), u.current = Date.now();
23
+ const n = u.current, _ = {
24
+ url: i,
25
+ cMapPacked: (t == null ? void 0 : t.isCompressed) ?? !0,
26
+ ...(t == null ? void 0 : t.url) && { cMapUrl: t.url },
27
+ ...f && { password: f },
28
+ ...U !== void 0 && { disableAutoFetch: U },
29
+ ...k !== void 0 && { disableStream: k },
30
+ ...x !== void 0 && { rangeChunkSize: x },
31
+ ...c && { wasmUrl: c },
32
+ verbosity: A.VerbosityLevel.ERRORS
28
33
  };
29
34
  try {
30
- const e = h.getDocument(v);
31
- e.onProgress = (o) => {
32
- if (r === a.current) {
33
- const { loaded: y, total: l } = o, L = l ? Math.min(100, Math.round(y / l * 100)) : 0;
34
- P(L);
35
+ const r = A.getDocument(_);
36
+ r.onProgress = (e) => {
37
+ if (n === u.current) {
38
+ const { loaded: O, total: m } = e, b = m ? Math.min(100, Math.round(O / m * 100)) : 0;
39
+ p(b);
35
40
  }
36
- }, C(!0), S(void 0);
37
- const t = e.promise.then((o) => (r === a.current && (S(o), P(100)), b && b(o), E(!1), p(""), o)).catch((o) => {
38
- o instanceof Error && o.name === "PasswordException" ? (E(!0), p(o.message || "Password required")) : o instanceof Error && o.name === "InvalidPDFException" && u ? (E(!0), p("Incorrect password")) : i && i(o);
41
+ }, y(!0), P(void 0);
42
+ const s = r.promise.then((e) => (n === u.current && (P(e), p(100)), I && I(e), D(!1), E(""), e)).catch((e) => {
43
+ e instanceof Error && e.name === "PasswordException" ? (D(!0), E(e.message || "Password required")) : e instanceof Error && e.name === "InvalidPDFException" && f ? (D(!0), E("Incorrect password")) : e instanceof Error && e.name === "InvalidPDFException" ? (l(T.INVALID_OR_CORRUPTED_PDF), o == null || o(F(e))) : o && o(e);
39
44
  }).finally(() => {
40
- C(!1);
45
+ y(!1);
41
46
  });
42
47
  return () => {
43
- t.finally(() => {
44
- e.destroy();
48
+ s.finally(() => {
49
+ r.destroy();
45
50
  });
46
51
  };
47
- } catch (e) {
48
- O(j.NOT_SUPPORTED), i && i(e);
52
+ } catch (r) {
53
+ l(T.NOT_SUPPORTED), o && o(r);
49
54
  }
50
- }, [m, T, f, u, i, b]), k(() => {
51
- if (w)
55
+ }, [i, S, c, f, o, I]), C(() => {
56
+ if (R)
52
57
  return;
53
- const r = /* @__PURE__ */ new Map();
54
- if (!n || c) {
55
- x(r);
58
+ const n = /* @__PURE__ */ new Map();
59
+ if (!a || w) {
60
+ V(n);
56
61
  return;
57
62
  }
58
- const v = n.numPages, e = [];
59
- for (let t = 1; t <= v; t++) {
60
- const o = n.getPage(t);
61
- e.push(o);
63
+ const _ = a.numPages, r = [];
64
+ for (let s = 1; s <= _; s++) {
65
+ const e = a.getPage(s);
66
+ r.push(e);
62
67
  }
63
- Promise.all(e).then((t) => {
64
- t.map((o) => {
65
- const { thumbnailViewport: y, scale: l } = z(o), L = o.getViewport();
66
- r.set(o.pageNumber, {
67
- page: o,
68
- thumbnailViewport: y,
69
- thumbnailScale: l,
70
- defaultRotation: L.rotation
68
+ Promise.all(r).then((s) => {
69
+ s.map((e) => {
70
+ const { thumbnailViewport: O, scale: m } = z(e), b = e.getViewport();
71
+ n.set(e.pageNumber, {
72
+ page: e,
73
+ thumbnailViewport: O,
74
+ thumbnailScale: m,
75
+ defaultRotation: b.rotation
71
76
  });
72
- }), x(r);
77
+ }), V(n);
78
+ }).catch((s) => {
79
+ P(void 0), l(T.INVALID_OR_CORRUPTED_PDF), o == null || o(F(s));
73
80
  });
74
- }, [n, c, w]), {
75
- pdf: n,
76
- pages: D,
77
- loading: c,
78
- error: N,
81
+ }, [a, w, R, o]), {
82
+ pdf: a,
83
+ pages: N,
84
+ loading: w,
85
+ error: h,
79
86
  loadingProgress: g,
80
- passwordRequired: w,
81
- passwordError: A
87
+ passwordRequired: R,
88
+ passwordError: q
82
89
  };
83
90
  };
84
91
  export {
85
- Z as useLoadPdf
92
+ ee as useLoadPdf
86
93
  };
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "../types.js";
3
- import { b as I } from "../../PaginationContext-15f88187.js";
3
+ import { b as J } from "../../PaginationContext-15f88187.js";
4
4
  import "../../contexts/ViewModeContext.js";
5
5
  import "../../contexts/ScrollModeContext.js";
6
6
  import "./useDebounce.js";
@@ -15,6 +15,7 @@ import "../getThumbnailViewport.js";
15
15
  import "../../contexts/ConfigContext.js";
16
16
  import "../../contexts/DocumentPasswordContext.js";
17
17
  import "../appConsole.js";
18
+ import "../const.js";
18
19
  import "./usePdfProperties.js";
19
20
  import "../convertPdfDate.js";
20
21
  import "../formatFileSize.js";
@@ -33,5 +34,5 @@ import "../getZoomLevel.js";
33
34
  import "../../contexts/RotationContext.js";
34
35
  import "../../contexts/PagesRotateContext.js";
35
36
  export {
36
- I as usePaginate
37
+ J as usePaginate
37
38
  };
@@ -12,6 +12,7 @@ import "pdfjs-dist";
12
12
  import "../getThumbnailViewport.js";
13
13
  import "../../contexts/ConfigContext.js";
14
14
  import "../../contexts/DocumentPasswordContext.js";
15
+ import "../const.js";
15
16
  import "./usePdfProperties.js";
16
17
  import "../convertPdfDate.js";
17
18
  import "../formatFileSize.js";
@@ -22,7 +23,7 @@ import "../../contexts/ViewModeContext.js";
22
23
  import "../../contexts/RotationContext.js";
23
24
  import "../../contexts/GlobalCurrentPage.js";
24
25
  import "../../contexts/EventCallbackContext.js";
25
- const V = (o) => {
26
+ const _ = (o) => {
26
27
  const { currentZoom: L, setZoomLevel: w } = A(), [D, m] = E(0), d = g(D, 100), [s, b] = E(!1), r = T(null), u = c((e) => {
27
28
  m(e ? (t) => t + 3 : (t) => t - 3);
28
29
  }, []), a = c(
@@ -41,24 +42,24 @@ const V = (o) => {
41
42
  m(0), w(e > 25 ? e : 25);
42
43
  }
43
44
  }, [d]);
44
- const p = (e, t) => {
45
+ const v = (e, t) => {
45
46
  const n = e.clientX - t.clientX, l = e.clientY - t.clientY;
46
47
  return Math.sqrt(n * n + l * l);
47
48
  }, f = c(
48
49
  (e) => {
49
50
  if (!s || e.touches.length !== 2)
50
51
  return;
51
- const t = p(e.touches[0], e.touches[1]);
52
+ const t = v(e.touches[0], e.touches[1]);
52
53
  r.current = t, e.preventDefault();
53
54
  },
54
55
  [s]
55
56
  ), h = c(() => {
56
57
  r.current = null;
57
- }, []), v = c(
58
+ }, []), p = c(
58
59
  (e) => {
59
60
  if (!s || e.touches.length !== 2 || r.current === null)
60
61
  return;
61
- const t = p(e.touches[0], e.touches[1]), n = t - r.current, l = Math.abs(n) > 5, S = n > 0;
62
+ const t = v(e.touches[0], e.touches[1]), n = t - r.current, l = Math.abs(n) > 5, S = n > 0;
62
63
  l && (u(S), r.current = t, e.preventDefault());
63
64
  },
64
65
  [u, s]
@@ -90,11 +91,11 @@ const V = (o) => {
90
91
  };
91
92
  }, [o]), i(() => {
92
93
  if (o)
93
- return o.addEventListener("wheel", a, { passive: !1 }), o.addEventListener("touchstart", f, { passive: !1 }), o.addEventListener("touchmove", v, { passive: !1 }), o.addEventListener("touchend", h, { passive: !1 }), () => {
94
- o.removeEventListener("wheel", a), o.removeEventListener("touchstart", f), o.removeEventListener("touchmove", v), o.removeEventListener("touchend", h);
94
+ return o.addEventListener("wheel", a, { passive: !1 }), o.addEventListener("touchstart", f, { passive: !1 }), o.addEventListener("touchmove", p, { passive: !1 }), o.addEventListener("touchend", h, { passive: !1 }), () => {
95
+ o.removeEventListener("wheel", a), o.removeEventListener("touchstart", f), o.removeEventListener("touchmove", p), o.removeEventListener("touchend", h);
95
96
  };
96
- }, [o, a, f, v, h]);
97
+ }, [o, a, f, p, h]);
97
98
  };
98
99
  export {
99
- V as usePinch
100
+ _ as usePinch
100
101
  };
@@ -14,6 +14,7 @@ import "pdfjs-dist";
14
14
  import "../getThumbnailViewport.js";
15
15
  import "../../contexts/ConfigContext.js";
16
16
  import "../../contexts/DocumentPasswordContext.js";
17
+ import "../const.js";
17
18
  import "./usePdfProperties.js";
18
19
  import "../convertPdfDate.js";
19
20
  import "../formatFileSize.js";
@@ -32,7 +33,7 @@ import "../../contexts/VirtualScrollContext.js";
32
33
  import "../../contexts/VirtualGridContext.js";
33
34
  import "../smoothScrollTo.js";
34
35
  import "../getScrollDistance.js";
35
- const bt = (f, R, e, W) => {
36
+ const It = (f, R, e, W) => {
36
37
  const P = Y(), { contentRef: S } = v(), { heights: h, widths: g } = A(), { setFocusedPage: b } = q(), I = Y(b);
37
38
  I.current = b;
38
39
  const [F, x] = C([]), { targetScrollPage: l } = M(), i = G(F, 0, 500), X = D(() => {
@@ -88,5 +89,5 @@ const bt = (f, R, e, W) => {
88
89
  }, [e, L]);
89
90
  };
90
91
  export {
91
- bt as usePresentPage
92
+ It as usePresentPage
92
93
  };
@@ -9,10 +9,11 @@ import "../getThumbnailViewport.js";
9
9
  import "../../contexts/ConfigContext.js";
10
10
  import "../../contexts/DocumentPasswordContext.js";
11
11
  import "../appConsole.js";
12
+ import "../const.js";
12
13
  import "./usePdfProperties.js";
13
14
  import "../convertPdfDate.js";
14
15
  import "../formatFileSize.js";
15
- const re = () => {
16
+ const oe = () => {
16
17
  const { pdf: l, pages: f } = q(), [R, E] = g({
17
18
  loadedPages: 0,
18
19
  totalPages: 0,
@@ -174,5 +175,5 @@ const re = () => {
174
175
  };
175
176
  };
176
177
  export {
177
- re as usePrint
178
+ oe as usePrint
178
179
  };
@@ -11,10 +11,11 @@ import "../../de_DE-a553b162.js";
11
11
  import "../getThumbnailViewport.js";
12
12
  import "../../contexts/ConfigContext.js";
13
13
  import "../../contexts/DocumentPasswordContext.js";
14
+ import "../const.js";
14
15
  import "./usePdfProperties.js";
15
16
  import "../convertPdfDate.js";
16
17
  import "../formatFileSize.js";
17
- const g = () => {
18
+ const j = () => {
18
19
  const { setRotate: t } = p(), i = r(() => {
19
20
  t((o) => (o + 90) % 360);
20
21
  }, [t]), m = r(() => {
@@ -23,5 +24,5 @@ const g = () => {
23
24
  return { handleRotateClockwise: i, handleRotateCounterclockwise: m };
24
25
  };
25
26
  export {
26
- g as useRotate
27
+ j as useRotate
27
28
  };
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "../../contexts/ScrollModeContext.js";
3
- import { a as G } from "../../PaginationContext-15f88187.js";
3
+ import { a as H } from "../../PaginationContext-15f88187.js";
4
4
  import "../../contexts/ViewModeContext.js";
5
5
  import "../types.js";
6
6
  import "../../contexts/VirtualScrollContext.js";
@@ -20,6 +20,7 @@ import "pdfjs-dist";
20
20
  import "../getThumbnailViewport.js";
21
21
  import "../../contexts/ConfigContext.js";
22
22
  import "../../contexts/DocumentPasswordContext.js";
23
+ import "../const.js";
23
24
  import "./usePdfProperties.js";
24
25
  import "../convertPdfDate.js";
25
26
  import "../formatFileSize.js";
@@ -33,5 +34,5 @@ import "../getZoomLevel.js";
33
34
  import "../../contexts/RotationContext.js";
34
35
  import "../../contexts/PagesRotateContext.js";
35
36
  export {
36
- G as useScrollToPage
37
+ H as useScrollToPage
37
38
  };
@@ -6,8 +6,8 @@ import { useScrollModeContext as ct } from "../../contexts/ScrollModeContext.js"
6
6
  import { useDocumentContext as it } from "../../contexts/RPDocumentContext.js";
7
7
  import { useZoomContext as at } from "../../contexts/ZoomContext.js";
8
8
  import { u as mt } from "../../PaginationContext-15f88187.js";
9
- import { useViewModeContext as ut } from "../../contexts/ViewModeContext.js";
10
- import { useDimensionPagesContext as pt } from "../../contexts/DimensionPagesContext.js";
9
+ import { useViewModeContext as pt } from "../../contexts/ViewModeContext.js";
10
+ import { useDimensionPagesContext as ut } from "../../contexts/DimensionPagesContext.js";
11
11
  import { useLayoutContainer as lt } from "../../contexts/LayoutContainerContext.js";
12
12
  import { getScrollDistance as F } from "../getScrollDistance.js";
13
13
  import { getWordPositionInPage as ft } from "../getWordPositionInPage.js";
@@ -22,6 +22,7 @@ import "pdfjs-dist";
22
22
  import "../getThumbnailViewport.js";
23
23
  import "../../contexts/ConfigContext.js";
24
24
  import "../../contexts/DocumentPasswordContext.js";
25
+ import "../const.js";
25
26
  import "./usePdfProperties.js";
26
27
  import "../convertPdfDate.js";
27
28
  import "../formatFileSize.js";
@@ -35,8 +36,8 @@ import "../../contexts/VirtualGridContext.js";
35
36
  import "../smoothScrollTo.js";
36
37
  import "../../contexts/SmoothScrollContext.js";
37
38
  import "../calculatePage.js";
38
- const Yt = (O = {}, U = "") => {
39
- const [u, q] = C(U), [B, y] = C(!1), { pdf: _, pages: S } = it(), { widths: f, heights: R } = pt(), w = b(!u), { currentZoom: A } = at(), [s, g] = C([]), { setFocusedPage: D } = mt(), { columnCount: G, viewMode: V } = ut(), { pageRotate: v } = gt(), [c, i] = C(0), { pageScrollElementRef: W, virtualScrollableElementRef: Z } = st(), { scrollMode: h } = ct(), { pagesRef: L } = lt(), J = b({}), m = b(0), K = H(() => c === 0 ? null : s[c - 1], [c, s]), a = H(() => s.length, [s]), p = I(
39
+ const $t = (O = {}, U = "") => {
40
+ const [p, q] = C(U), [B, y] = C(!1), { pdf: _, pages: S } = it(), { widths: f, heights: R } = ut(), w = b(!p), { currentZoom: A } = at(), [s, g] = C([]), { setFocusedPage: D } = mt(), { columnCount: G, viewMode: V } = pt(), { pageRotate: v } = gt(), [c, i] = C(0), { pageScrollElementRef: W, virtualScrollableElementRef: Z } = st(), { scrollMode: h } = ct(), { pagesRef: L } = lt(), J = b({}), m = b(0), K = H(() => c === 0 ? null : s[c - 1], [c, s]), a = H(() => s.length, [s]), u = I(
40
41
  (e) => {
41
42
  if (e === 0)
42
43
  return;
@@ -100,19 +101,19 @@ const Yt = (O = {}, U = "") => {
100
101
  ]
101
102
  );
102
103
  z(() => {
103
- c && p(c);
104
+ c && u(c);
104
105
  }, [c]);
105
106
  const Q = I(() => {
106
107
  i((e) => {
107
108
  let t;
108
109
  return a ? e + 1 > a ? t = 1 : t = e + 1 : t = 0, m.current = t, t;
109
- }), m.current === 1 && p(m.current);
110
- }, [a, p]), X = I(() => {
110
+ }), m.current === 1 && u(m.current);
111
+ }, [a, u]), X = I(() => {
111
112
  i((e) => {
112
113
  let t;
113
114
  return a ? e - 1 <= 0 ? t = a : t = e - 1 : t = 0, m.current = t, t;
114
- }), m.current === 1 && p(m.current);
115
- }, [a, p]), j = I(async (e) => {
115
+ }), m.current === 1 && u(m.current);
116
+ }, [a, u]), j = I(async (e) => {
116
117
  if (!e)
117
118
  return {};
118
119
  const t = e.numPages, o = {};
@@ -125,7 +126,7 @@ const Yt = (O = {}, U = "") => {
125
126
  return o;
126
127
  }, []);
127
128
  return z(() => {
128
- if (!u) {
129
+ if (!p) {
129
130
  w.current = !0, g([]), i(0);
130
131
  return;
131
132
  }
@@ -133,7 +134,7 @@ const Yt = (O = {}, U = "") => {
133
134
  J.current = e;
134
135
  const o = Object.keys(e).reduce((r, n) => {
135
136
  const l = nt(
136
- [u],
137
+ [p],
137
138
  e[n],
138
139
  Number(n) - 1,
139
140
  O
@@ -144,8 +145,8 @@ const Yt = (O = {}, U = "") => {
144
145
  }).catch(() => {
145
146
  g([]), i(0);
146
147
  }).finally(() => y(!1));
147
- }, [u, j, _, O]), {
148
- search: u,
148
+ }, [p, j, _, O]), {
149
+ search: p,
149
150
  setSearch: q,
150
151
  loading: B,
151
152
  matches: s,
@@ -158,5 +159,5 @@ const Yt = (O = {}, U = "") => {
158
159
  };
159
160
  };
160
161
  export {
161
- Yt as useSearch
162
+ $t as useSearch
162
163
  };
@@ -1,4 +1,4 @@
1
- import { useState as f, useMemo as d, useCallback as m, useEffect as b } from "react";
1
+ import { useState as f, useMemo as d, useCallback as u, useEffect as b } from "react";
2
2
  import { useDocumentContext as h } from "../../contexts/RPDocumentContext.js";
3
3
  import { getThumbnailViewport as P } from "../getThumbnailViewport.js";
4
4
  import "react/jsx-runtime";
@@ -9,24 +9,25 @@ import "../../de_DE-a553b162.js";
9
9
  import "../../contexts/ConfigContext.js";
10
10
  import "../../contexts/DocumentPasswordContext.js";
11
11
  import "../appConsole.js";
12
+ import "../const.js";
12
13
  import "./usePdfProperties.js";
13
14
  import "../convertPdfDate.js";
14
15
  import "../formatFileSize.js";
15
- const D = () => {
16
- const [r, s] = f({}), { pages: t } = h(), p = d(() => Object.keys(r).length, [r]), n = m(
17
- (a) => {
16
+ const E = () => {
17
+ const [a, s] = f({}), { pages: t } = h(), p = d(() => Object.keys(a).length, [a]), n = u(
18
+ (i) => {
18
19
  if (!t.size)
19
20
  return;
20
- const e = a > t.size ? t.size : a, c = Array.from(t.values()).slice(0, e).map((o) => {
21
- const { thumbnailViewport: i, scale: g } = P(o.page, o.defaultRotation);
21
+ const e = i > t.size ? t.size : i, c = Array.from(t.values()).slice(0, e).map((o) => {
22
+ const { thumbnailViewport: r, scale: g } = P(o.page, o.defaultRotation);
22
23
  return {
23
24
  scale: g,
24
25
  page: o.page,
25
26
  loading: !0,
26
- viewport: i,
27
+ viewport: r,
27
28
  defaultRotation: o.defaultRotation
28
29
  };
29
- }).reduce((o, i) => (o[i.page.pageNumber] = i, o), {});
30
+ }).reduce((o, r) => (o[r.page.pageNumber] = r, o), {});
30
31
  s(c);
31
32
  },
32
33
  [t]
@@ -34,14 +35,14 @@ const D = () => {
34
35
  b(() => {
35
36
  n(10);
36
37
  }, [n]);
37
- const l = m(
38
- (a) => {
38
+ const l = u(
39
+ (i) => {
39
40
  if (!t)
40
41
  return;
41
- const e = t.get(a);
42
- e && s((u) => ({
43
- ...u,
44
- [a]: {
42
+ const e = t.get(i);
43
+ e && s((m) => ({
44
+ ...m,
45
+ [i]: {
45
46
  loading: !0,
46
47
  page: e.page,
47
48
  viewport: e.thumbnailViewport,
@@ -52,8 +53,8 @@ const D = () => {
52
53
  },
53
54
  [t]
54
55
  );
55
- return { thumbnailPages: r, addPage: l, addToPage: n, thumbnailLength: p };
56
+ return { thumbnailPages: a, addPage: l, addToPage: n, thumbnailLength: p };
56
57
  };
57
58
  export {
58
- D as useThumbnail
59
+ E as useThumbnail
59
60
  };
@@ -16,6 +16,7 @@ import "pdfjs-dist";
16
16
  import "../getThumbnailViewport.js";
17
17
  import "../../contexts/ConfigContext.js";
18
18
  import "../../contexts/DocumentPasswordContext.js";
19
+ import "../const.js";
19
20
  import "./usePdfProperties.js";
20
21
  import "../convertPdfDate.js";
21
22
  import "../formatFileSize.js";
@@ -28,7 +29,7 @@ import "../../contexts/GlobalCurrentPage.js";
28
29
  import "../../contexts/EventCallbackContext.js";
29
30
  import "./useDebounce.js";
30
31
  import "../../contexts/PagesRotateContext.js";
31
- const ct = () => {
32
+ const lt = () => {
32
33
  const { viewMode: n } = G(), { scrollMode: c } = x(), { setColumnCount: f } = H(), { virtualScrollableElementRef: w } = M(), t = O(), l = m(() => t.heights.length, [t.heights]), o = m(() => c === C.HORIZONTAL_SCROLLING ? l : n === g.DUAL_PAGE || n === g.DUAL_PAGE_WITH_COVER ? 2 : 1, [n, c, c, l, w]), d = m(() => {
33
34
  if (n === g.DUAL_PAGE_WITH_COVER && t.widths.length > 0) {
34
35
  const i = [0, 0];
@@ -92,5 +93,5 @@ const ct = () => {
92
93
  };
93
94
  };
94
95
  export {
95
- ct as useVirtualReactWindow
96
+ lt as useVirtualReactWindow
96
97
  };
@@ -1,5 +1,5 @@
1
1
  import { e as r, z as _, i as R, p as o, t as p, d as D } from "../de_DE-a553b162.js";
2
- var I = /* @__PURE__ */ ((O) => (O[O.Text = 1] = "Text", O[O.Link = 2] = "Link", O[O.FreeText = 3] = "FreeText", O[O.Line = 4] = "Line", O[O.Square = 5] = "Square", O[O.Circle = 6] = "Circle", O[O.Polygon = 7] = "Polygon", O[O.Polyline = 8] = "Polyline", O[O.Highlight = 9] = "Highlight", O[O.Underline = 10] = "Underline", O[O.Squiggly = 11] = "Squiggly", O[O.StrikeOut = 12] = "StrikeOut", O[O.Stamp = 13] = "Stamp", O[O.Caret = 14] = "Caret", O[O.Ink = 15] = "Ink", O[O.Popup = 16] = "Popup", O[O.FileAttachment = 17] = "FileAttachment", O[O.Widget = 20] = "Widget", O))(I || {}), N = /* @__PURE__ */ ((O) => (O.INTERNAL_LINK = "internal-link", O.LINK = "link", O.FILE_ATTACHMENT = "file-attachment", O.FORM_TEXT = "form-text", O.FORM_SELECT = "form-select", O.FORM_CHECKBOX = "form-checkbox", O.FORM_RADIO = "form-radio", O.FORM_BUTTON = "form-button", O.BUTTON = "button", O))(N || {}), E = /* @__PURE__ */ ((O) => (O.NOT_SUPPORTED = "not-supported", O))(E || {}), L = /* @__PURE__ */ ((O) => (O.ACTUAL = "Actual Size", O.PAGE_FIT = "Page Fit", O.PAGE_WIDTH = "Page Width", O))(L || {}), d = /* @__PURE__ */ ((O) => (O.Organization = "organization", O.Developer = "developer", O.FreeTrial = "free-trial", O.Custom = "custom", O))(d || {}), C = /* @__PURE__ */ ((O) => (O.SINGLE_PAGE = "Single", O.DUAL_PAGE = "Dual", O.DUAL_PAGE_WITH_COVER = "DualWithCover", O))(C || {}), P = /* @__PURE__ */ ((O) => (O.FONT_FAMILY = "--rp-font-family", O.PRIMARY_COLOR = "--rp-primary-color", O.BORDER_RADIUS = "--rp-border-radius", O.TEXT_COLOR = "--rp-text-color", O.OUTLINE_COLOR = "--rp-outline-color", O.FONT_SIZE = "--rp-font-size", O.DROP_MASK_BACKGROUND_COLOR = "--rp-drop-mask-background-color", O.LOADER_BACKDROP_COLOR = "--rp-loader-backdrop-color", O.ICON_DISABLED = "--rp-icon-disabled", O.ICON_FONT_SIZE = "--rp-icon-font-size", O.TOOLBAR_BACKGROUND = "--rp-toolbar-background", O.TOOLBAR_BORDER_COLOR = "--rp-toolbar-border-color", O.TOOLBAR_PADDING = "--rp-toolbar-padding", O.TOOLBAR_GAP = "--rp-toolbar-gap", O.TOOLBAR_SIZE = "--rp-toolbar-size", O.SIDEBAR_WIDTH = "--rp-sidebar-width", O.THUMBNAIL_BORDER_COLOR = "--rp-thumbnail-border-color", O.THUMBNAIL_BACKGROUND_COLOR = "--rp-thumbnail-background-color", O.THUMBNAIL_ACTIVE_COLOR = "--rp-thumbnail-active-color", O.THUMBNAIL_PADDING_Y = "--rp-thumbnail-padding-y", O.BUTTON_HOVER_BACKGROUND = "--rp-button-hover-background", O.BUTTON_PADDING = "--rp-button-padding", O.INPUT_PADDING = "--rp-input-padding", O.INPUT_BORDER_RADIUS = "--rp-input-border-radius", O.INPUT_BACKGROUND_COLOR = "--rp-input-background-color", O.INPUT_PLACEHOLDER_COLOR = "--rp-input-placeholder-color", O.PAGES_BACKGROUND_COLOR = "--rp-pages-background-color", O.ANNOTATION_LAYER_LINK_HOVER_BACKGROUND = "--rp-annotation-layer__link-hover-background", O.DROPDOWN_BACKGROUND_COLOR = "--rp-dropdown-background-color", O.DROPDOWN_PADDING = "--rp-dropdown-padding", O.DROPDOWN_HOVER_BACKGROUND_COLOR = "--rp-dropdown-hover-background-color", O.DROPDOWN_SEPARATOR_COLOR = "--rp-dropdown-separator-color", O.DROPDOWN_SEPARATOR_MARGIN = "--rp-dropdown-separator-margin", O.DROPDOWN_PADDING_MENU_ITEM = "--rp-dropdown-padding-menu-item", O.DROPDOWN_FONT_SIZE = "--rp-dropdown-font-size", O.DROPDOWN_BORDER_RADIUS = "--rp-dropdown-border-radius", O.SEARCH_TOOL_DROPDOWN_PADDING = "--rp-search-tool-dropdown-padding", O.POPOVER_FONT_SIZE = "--rp-popover-font-size", O.POPOVER_BACKGROUND_COLOR = "--rp-popover-background-color", O.POPOVER_COLOR = "--rp-popover-color", O.POPOVER_BORDER_COLOR = "--rp-popover-border-color", O.POPOVER_BORDER_RADIUS = "--rp-popover-border-radius", O.OVERLAY_BACKGROUND_COLOR = "--rp-overlay-background-color", O.DIALOG_BACKGROUND_COLOR = "--rp-dialog-background-color", O.PROPERTIES_DIVIDER_COLOR = "--rp-properties-divider-color", O.PROPERTIES_DIVIDER_MARGIN = "--rp-properties-divider-margin", O.PROPERTY_ITEM_GAP = "--rp-property-item-gap", O.DIALOG_TITLE_COLOR = "--rp-dialog-title-color", O.PROPERTY_ITEM_LABEL_COLOR = "--rp-property-item-label-color", O.PROPERTY_CLOSE_ICON_SIZE = "--rp-property-close-icon-size", O.PROPERTY_ITEM_FONT_SIZE = "--rp-property-item-font-size", O.PROPERTY_ITEM_FONT_WEIGHT = "--rp-property-item-font-weight", O.DIALOG_TITLE_FONT_SIZE = "--rp-dialog-title-font-size", O.DIALOG_TITLE_FONT_WEIGHT = "--rp-dialog-title-font-weight", O.MENU_ITEM_ICON_SIZE = "--rp-menu-item-icon-size", O.PRINT_PROGRESS_BACKGROUND = "--rp-print-progress-background", O.PRINT_PROGRESS_COLOR = "--rp-print-progress-color", O.DROP_ZONE_BORDER = "--rp-drop-zone-border", O.DROP_ZONE_FONT_COLOR = "--rp-drop-zone-font-color", O.DROP_ZONE_FONT_SIZE = "--rp-drop-zone-font-size", O.DROP_ZONE_BACKGROUND_COLOR = "--rp-drop-zone-background-color", O.CHECKBOX_BORDER_RADIUS = "--rp-checkbox-border-radius", O.CHECKBOX_BORDER_COLOR = "--rp-checkbox-border-color", O.CHECKBOX_INDICATOR_COLOR = "--rp-checkbox-indicator-color", O.HIGHLIGHT_BACKGROUND_COLOR = "--rp-highlight-background-color", O.TEXT_LAYER_HIGHLIGHT_BORDER_RADIUS = "--rp-text-layer-highlight-border-radius", O.CURRENT_HIGHLIGHT_BACKGROUND_COLOR = "--rp-current-highlight-background-color", O.TOOLTIP_BACKGROUND_COLOR = "--rp-tooltip-background-color", O.TOOLTIP_BORDER_RADIUS = "--rp-tooltip-border-radius", O.TOOLTIP_FONT_COLOR = "--rp-tooltip-font-color", O.TOOLTIP_FONT_SIZE = "--rp-tooltip-font-size", O.TOOLTIP_PADDING = "--rp-tooltip-padding", O.PASSWORD_MODAL_BACKGROUND_COLOR = "--rp-password-background-color", O.PASSWORD_MODAL_TITLE_FONT_COLOR = "--rp-password-title-font-color", O.PASSWORD_MODAL_CONTENT_FONT_COLOR = "--rp-password-content-font-color", O.PASSWORD_MODAL_INPUT_PLACEHOLDER_COLOR = "--rp-password-input-placeholder-color", O.PASSWORD_MODAL_INPUT_BORDER_COLOR = "--rp-password-input-border-color", O.PASSWORD_MODAL_INPUT_FONT_COLOR = "--rp-password-input-font-color", O.PASSWORD_MODAL_BUTTON_FONT_COLOR = "--rp-password-button-font-color", O.PASSWORD_MODAL_BUTTON_BACKGROUND_COLOR = "--rp-password-button-background-color", O.PASSWORD_MODAL_BUTTON_BORDER_COLOR = "--rp-password-button-border-color", O.PASSWORD_MODAL_BORDER_COLOR = "--rp-password-border-color", O.CONTAINER_FOCUS_OUTLINE_WIDTH = "--rp-container-focus-outline-width", O.CONTAINER_FOCUS_OUTLINE_COLOR = "--rp-container-focus-outline-color", O.CONTAINER_FOCUS_OUTLINE_OFFSET = "--rp-container-focus-outline-offset", O.BUTTON_BORDER_RADIUS = "--rp-button-border-radius", O.SKIP_LINK_FONT_SIZE = "--rp-skip-link-font-size", O.SKIP_LINK_COLOR = "--rp-skip-link-color", O.SKIP_LINK_BACKGROUND_COLOR = "--rp-skip-link-background-color", O.SKIP_LINK_BORDER_COLOR = "--rp-skip-link-border-color", O))(P || {}), c = /* @__PURE__ */ ((O) => (O.PAGE_SCROLLING = "PAGE", O.VERTICAL_SCROLLING = "VERTICAL", O.HORIZONTAL_SCROLLING = "HORIZONTAL", O))(c || {}), t = /* @__PURE__ */ ((O) => (O.TEXT = "TEXT", O.HAND = "HAND", O))(t || {});
2
+ var I = /* @__PURE__ */ ((O) => (O[O.Text = 1] = "Text", O[O.Link = 2] = "Link", O[O.FreeText = 3] = "FreeText", O[O.Line = 4] = "Line", O[O.Square = 5] = "Square", O[O.Circle = 6] = "Circle", O[O.Polygon = 7] = "Polygon", O[O.Polyline = 8] = "Polyline", O[O.Highlight = 9] = "Highlight", O[O.Underline = 10] = "Underline", O[O.Squiggly = 11] = "Squiggly", O[O.StrikeOut = 12] = "StrikeOut", O[O.Stamp = 13] = "Stamp", O[O.Caret = 14] = "Caret", O[O.Ink = 15] = "Ink", O[O.Popup = 16] = "Popup", O[O.FileAttachment = 17] = "FileAttachment", O[O.Widget = 20] = "Widget", O))(I || {}), N = /* @__PURE__ */ ((O) => (O.INTERNAL_LINK = "internal-link", O.LINK = "link", O.FILE_ATTACHMENT = "file-attachment", O.FORM_TEXT = "form-text", O.FORM_SELECT = "form-select", O.FORM_CHECKBOX = "form-checkbox", O.FORM_RADIO = "form-radio", O.FORM_BUTTON = "form-button", O.BUTTON = "button", O))(N || {}), L = /* @__PURE__ */ ((O) => (O.NOT_SUPPORTED = "not-supported", O.INVALID_OR_CORRUPTED_PDF = "invalid-or-corrupted-pdf", O))(L || {}), E = /* @__PURE__ */ ((O) => (O.ACTUAL = "Actual Size", O.PAGE_FIT = "Page Fit", O.PAGE_WIDTH = "Page Width", O))(E || {}), d = /* @__PURE__ */ ((O) => (O.Organization = "organization", O.Developer = "developer", O.FreeTrial = "free-trial", O.Custom = "custom", O))(d || {}), C = /* @__PURE__ */ ((O) => (O.SINGLE_PAGE = "Single", O.DUAL_PAGE = "Dual", O.DUAL_PAGE_WITH_COVER = "DualWithCover", O))(C || {}), P = /* @__PURE__ */ ((O) => (O.FONT_FAMILY = "--rp-font-family", O.PRIMARY_COLOR = "--rp-primary-color", O.BORDER_RADIUS = "--rp-border-radius", O.TEXT_COLOR = "--rp-text-color", O.OUTLINE_COLOR = "--rp-outline-color", O.FONT_SIZE = "--rp-font-size", O.DROP_MASK_BACKGROUND_COLOR = "--rp-drop-mask-background-color", O.LOADER_BACKDROP_COLOR = "--rp-loader-backdrop-color", O.ICON_DISABLED = "--rp-icon-disabled", O.ICON_FONT_SIZE = "--rp-icon-font-size", O.TOOLBAR_BACKGROUND = "--rp-toolbar-background", O.TOOLBAR_BORDER_COLOR = "--rp-toolbar-border-color", O.TOOLBAR_PADDING = "--rp-toolbar-padding", O.TOOLBAR_GAP = "--rp-toolbar-gap", O.TOOLBAR_SIZE = "--rp-toolbar-size", O.SIDEBAR_WIDTH = "--rp-sidebar-width", O.THUMBNAIL_BORDER_COLOR = "--rp-thumbnail-border-color", O.THUMBNAIL_BACKGROUND_COLOR = "--rp-thumbnail-background-color", O.THUMBNAIL_ACTIVE_COLOR = "--rp-thumbnail-active-color", O.THUMBNAIL_PADDING_Y = "--rp-thumbnail-padding-y", O.BUTTON_HOVER_BACKGROUND = "--rp-button-hover-background", O.BUTTON_PADDING = "--rp-button-padding", O.INPUT_PADDING = "--rp-input-padding", O.INPUT_BORDER_RADIUS = "--rp-input-border-radius", O.INPUT_BACKGROUND_COLOR = "--rp-input-background-color", O.INPUT_PLACEHOLDER_COLOR = "--rp-input-placeholder-color", O.PAGES_BACKGROUND_COLOR = "--rp-pages-background-color", O.ANNOTATION_LAYER_LINK_HOVER_BACKGROUND = "--rp-annotation-layer__link-hover-background", O.DROPDOWN_BACKGROUND_COLOR = "--rp-dropdown-background-color", O.DROPDOWN_PADDING = "--rp-dropdown-padding", O.DROPDOWN_HOVER_BACKGROUND_COLOR = "--rp-dropdown-hover-background-color", O.DROPDOWN_SEPARATOR_COLOR = "--rp-dropdown-separator-color", O.DROPDOWN_SEPARATOR_MARGIN = "--rp-dropdown-separator-margin", O.DROPDOWN_PADDING_MENU_ITEM = "--rp-dropdown-padding-menu-item", O.DROPDOWN_FONT_SIZE = "--rp-dropdown-font-size", O.DROPDOWN_BORDER_RADIUS = "--rp-dropdown-border-radius", O.SEARCH_TOOL_DROPDOWN_PADDING = "--rp-search-tool-dropdown-padding", O.POPOVER_FONT_SIZE = "--rp-popover-font-size", O.POPOVER_BACKGROUND_COLOR = "--rp-popover-background-color", O.POPOVER_COLOR = "--rp-popover-color", O.POPOVER_BORDER_COLOR = "--rp-popover-border-color", O.POPOVER_BORDER_RADIUS = "--rp-popover-border-radius", O.OVERLAY_BACKGROUND_COLOR = "--rp-overlay-background-color", O.DIALOG_BACKGROUND_COLOR = "--rp-dialog-background-color", O.PROPERTIES_DIVIDER_COLOR = "--rp-properties-divider-color", O.PROPERTIES_DIVIDER_MARGIN = "--rp-properties-divider-margin", O.PROPERTY_ITEM_GAP = "--rp-property-item-gap", O.DIALOG_TITLE_COLOR = "--rp-dialog-title-color", O.PROPERTY_ITEM_LABEL_COLOR = "--rp-property-item-label-color", O.PROPERTY_CLOSE_ICON_SIZE = "--rp-property-close-icon-size", O.PROPERTY_ITEM_FONT_SIZE = "--rp-property-item-font-size", O.PROPERTY_ITEM_FONT_WEIGHT = "--rp-property-item-font-weight", O.DIALOG_TITLE_FONT_SIZE = "--rp-dialog-title-font-size", O.DIALOG_TITLE_FONT_WEIGHT = "--rp-dialog-title-font-weight", O.MENU_ITEM_ICON_SIZE = "--rp-menu-item-icon-size", O.PRINT_PROGRESS_BACKGROUND = "--rp-print-progress-background", O.PRINT_PROGRESS_COLOR = "--rp-print-progress-color", O.DROP_ZONE_BORDER = "--rp-drop-zone-border", O.DROP_ZONE_FONT_COLOR = "--rp-drop-zone-font-color", O.DROP_ZONE_FONT_SIZE = "--rp-drop-zone-font-size", O.DROP_ZONE_BACKGROUND_COLOR = "--rp-drop-zone-background-color", O.CHECKBOX_BORDER_RADIUS = "--rp-checkbox-border-radius", O.CHECKBOX_BORDER_COLOR = "--rp-checkbox-border-color", O.CHECKBOX_INDICATOR_COLOR = "--rp-checkbox-indicator-color", O.HIGHLIGHT_BACKGROUND_COLOR = "--rp-highlight-background-color", O.TEXT_LAYER_HIGHLIGHT_BORDER_RADIUS = "--rp-text-layer-highlight-border-radius", O.CURRENT_HIGHLIGHT_BACKGROUND_COLOR = "--rp-current-highlight-background-color", O.TOOLTIP_BACKGROUND_COLOR = "--rp-tooltip-background-color", O.TOOLTIP_BORDER_RADIUS = "--rp-tooltip-border-radius", O.TOOLTIP_FONT_COLOR = "--rp-tooltip-font-color", O.TOOLTIP_FONT_SIZE = "--rp-tooltip-font-size", O.TOOLTIP_PADDING = "--rp-tooltip-padding", O.PASSWORD_MODAL_BACKGROUND_COLOR = "--rp-password-background-color", O.PASSWORD_MODAL_TITLE_FONT_COLOR = "--rp-password-title-font-color", O.PASSWORD_MODAL_CONTENT_FONT_COLOR = "--rp-password-content-font-color", O.PASSWORD_MODAL_INPUT_PLACEHOLDER_COLOR = "--rp-password-input-placeholder-color", O.PASSWORD_MODAL_INPUT_BORDER_COLOR = "--rp-password-input-border-color", O.PASSWORD_MODAL_INPUT_FONT_COLOR = "--rp-password-input-font-color", O.PASSWORD_MODAL_BUTTON_FONT_COLOR = "--rp-password-button-font-color", O.PASSWORD_MODAL_BUTTON_BACKGROUND_COLOR = "--rp-password-button-background-color", O.PASSWORD_MODAL_BUTTON_BORDER_COLOR = "--rp-password-button-border-color", O.PASSWORD_MODAL_BORDER_COLOR = "--rp-password-border-color", O.CONTAINER_FOCUS_OUTLINE_WIDTH = "--rp-container-focus-outline-width", O.CONTAINER_FOCUS_OUTLINE_COLOR = "--rp-container-focus-outline-color", O.CONTAINER_FOCUS_OUTLINE_OFFSET = "--rp-container-focus-outline-offset", O.BUTTON_BORDER_RADIUS = "--rp-button-border-radius", O.SKIP_LINK_FONT_SIZE = "--rp-skip-link-font-size", O.SKIP_LINK_COLOR = "--rp-skip-link-color", O.SKIP_LINK_BACKGROUND_COLOR = "--rp-skip-link-background-color", O.SKIP_LINK_BORDER_COLOR = "--rp-skip-link-border-color", O))(P || {}), c = /* @__PURE__ */ ((O) => (O.PAGE_SCROLLING = "PAGE", O.VERTICAL_SCROLLING = "VERTICAL", O.HORIZONTAL_SCROLLING = "HORIZONTAL", O))(c || {}), t = /* @__PURE__ */ ((O) => (O.TEXT = "TEXT", O.HAND = "HAND", O))(t || {});
3
3
  const U = {
4
4
  en_US: r,
5
5
  zh_CN: _,
@@ -11,12 +11,12 @@ const U = {
11
11
  export {
12
12
  I as AnnotationSubType,
13
13
  N as AnnotationType,
14
- E as ErrorType,
14
+ L as ErrorType,
15
15
  d as LicenseType,
16
16
  U as Locales,
17
17
  c as ScrollMode,
18
18
  t as SelectionMode,
19
19
  P as ThemeVariables,
20
20
  C as ViewMode,
21
- L as ZoomLevel
21
+ E as ZoomLevel
22
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pdf-kit/viewer",
3
- "version": "2.3.0-beta.4",
3
+ "version": "2.4.0-beta.0",
4
4
  "private": false,
5
5
  "description": "A react-pdf-viewer component for React and Next.js. Suitable for react-pdf document.",
6
6
  "keywords": [