@pdf-viewer/react 1.6.0-beta.2 → 1.6.0-beta.3

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 (54) hide show
  1. package/dist/{RPDefaultLayout-db184803.js → RPDefaultLayout-f579f051.js} +754 -745
  2. package/dist/assets/Container.css +1 -1
  3. package/dist/assets/RPDefaultLayout.css +1 -1
  4. package/dist/components/RPController.js +52 -51
  5. package/dist/components/RPPages.js +1 -1
  6. package/dist/components/RPProvider.js +1 -1
  7. package/dist/components/layout/Container.js +7 -6
  8. package/dist/components/layout/LayoutContainer.js +1 -1
  9. package/dist/components/layout/RPDefaultLayout.js +1 -1
  10. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  11. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  12. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  13. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  14. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  15. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  16. package/dist/components/layout/toolbar/OtherTool.js +3 -2
  17. package/dist/components/layout/toolbar/Paginate.js +1 -1
  18. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  19. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  20. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  21. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  22. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  23. package/dist/components/layout/toolbar/ZoomTool.js +7 -26
  24. package/dist/components/page/AnnotationLayer.js +1 -1
  25. package/dist/components/page/CanvasLayer.js +1 -1
  26. package/dist/components/page/DualPage.js +1 -1
  27. package/dist/components/page/RPPage.js +1 -1
  28. package/dist/components/page/SinglePage.js +1 -1
  29. package/dist/components/page/TextHighlightLayer.js +1 -1
  30. package/dist/components/page/TextLayer.js +1 -1
  31. package/dist/components/ui/LoadingIndicator.js +1 -1
  32. package/dist/contexts/PaginationContext.js +1 -1
  33. package/dist/contexts/PrintContext.js +1 -1
  34. package/dist/contexts/SearchContext.js +1 -1
  35. package/dist/contexts/ThumbnailsContext.js +1 -1
  36. package/dist/contexts/ZoomContext.js +17 -16
  37. package/dist/main.js +1 -1
  38. package/dist/types/utils/constants.d.ts +1 -0
  39. package/dist/types/utils/getZoomLevel.d.ts +2 -2
  40. package/dist/types/utils/types.d.ts +5 -2
  41. package/dist/utils/constants.js +3 -2
  42. package/dist/utils/getZoomLevel.js +13 -9
  43. package/dist/utils/hooks/useFileDownload.js +1 -1
  44. package/dist/utils/hooks/useLicense.js +1 -1
  45. package/dist/utils/hooks/usePaginate.js +1 -1
  46. package/dist/utils/hooks/usePinch.js +68 -17
  47. package/dist/utils/hooks/usePresentPage.js +1 -1
  48. package/dist/utils/hooks/usePrint.js +1 -1
  49. package/dist/utils/hooks/useScrollToPage.js +1 -1
  50. package/dist/utils/hooks/useSearch.js +1 -1
  51. package/dist/utils/hooks/useThumbnail.js +1 -1
  52. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  53. package/dist/utils/types.js +9 -9
  54. package/package.json +1 -1
@@ -1,46 +1,47 @@
1
- import { jsx as P } from "react/jsx-runtime";
2
- import { createContext as v, useContext as C, useState as L, useMemo as s, useEffect as y } from "react";
3
- import { ZoomLevel as S } from "../utils/types.js";
1
+ import { jsx as C } from "react/jsx-runtime";
2
+ import { createContext as P, useContext as L, useState as y, useMemo as s, useEffect as S } from "react";
3
+ import { ZoomLevel as V } from "../utils/types.js";
4
4
  import { appConsole as b } from "../utils/appConsole.js";
5
5
  import { useInitialStateContext as A } from "./InitialStateContext.js";
6
6
  import { useDocumentContext as D } from "./RPDocumentContext.js";
7
7
  import { PAGE_PADDING as f } from "../utils/constants.js";
8
8
  import { getZoomLevel as E } from "../utils/getZoomLevel.js";
9
9
  import { useLayoutContainer as G } from "./LayoutContainerContext.js";
10
- const g = v({
10
+ import { useViewModeContext as H } from "./ViewModeContext.js";
11
+ const g = P({
11
12
  zoomLevel: 100,
12
13
  currentZoom: 1,
13
14
  setZoomLevel: () => {
14
15
  }
15
- }), M = () => {
16
- const n = C(g);
16
+ }), T = () => {
17
+ const n = L(g);
17
18
  return typeof n.currentZoom != "number" && b.warn("Please use this hooks inside children component of RPProvider"), n;
18
- }, N = ({ children: n }) => {
19
+ }, q = ({ children: n }) => {
19
20
  const {
20
- initialScale: r = S.PAGE_FIT,
21
+ initialScale: r = V.PAGE_FIT,
21
22
  initialPage: u = 1,
22
23
  initialRotation: l = 0
23
- } = A(), [i, a] = L(typeof r == "number" ? r : 100), { pages: c } = D(), { contentRef: o } = G(), p = s(() => i / 100, [i]), t = s(() => {
24
+ } = A(), [i, a] = y(typeof r == "number" ? r : 100), { pages: c } = D(), { contentRef: o } = G(), { viewMode: h } = H(), p = s(() => i / 100, [i]), t = s(() => {
24
25
  let e = c.get(u);
25
26
  return e || (e = c.get(1)), e == null ? void 0 : e.page.getViewport({ scale: 1, rotation: l });
26
27
  }, [c, u, l]), m = s(() => {
27
28
  if (!t)
28
29
  return 0;
29
- const e = ((t == null ? void 0 : t.width) || 0) + 2 * f, x = ((t == null ? void 0 : t.height) || 0) + 2 * f, Z = (o == null ? void 0 : o.clientWidth) || 0, d = (o == null ? void 0 : o.clientHeight) || 0;
30
- return E(r, Z, d, e, x);
30
+ const e = ((t == null ? void 0 : t.width) || 0) + 2 * f, x = ((t == null ? void 0 : t.height) || 0) + 2 * f, Z = (o == null ? void 0 : o.clientWidth) || 0, v = (o == null ? void 0 : o.clientHeight) || 0;
31
+ return E(r, Z, v, e, x, h);
31
32
  }, [t, r, o]);
32
- y(() => {
33
+ S(() => {
33
34
  typeof m == "number" && m && a(m);
34
35
  }, [m]);
35
- const h = s(() => ({
36
+ const d = s(() => ({
36
37
  zoomLevel: i,
37
38
  currentZoom: p,
38
39
  setZoomLevel: a
39
40
  }), [p, i]);
40
- return /* @__PURE__ */ P(g.Provider, { value: h, children: n });
41
+ return /* @__PURE__ */ C(g.Provider, { value: d, children: n });
41
42
  };
42
43
  export {
43
44
  g as ZoomContext,
44
- N as ZoomProvider,
45
- M as useZoomContext
45
+ q as ZoomProvider,
46
+ T as useZoomContext
46
47
  };
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RPProvider as t } from "./components/RPProvider.js";
2
- import { b as x, R as n, c as s, u as m, d as p, e as f } from "./RPDefaultLayout-db184803.js";
2
+ import { b as x, R as n, c as s, u as m, d as p, e as f } from "./RPDefaultLayout-f579f051.js";
3
3
  import { RPConfig as a } from "./components/RPConfig.js";
4
4
  import { RPController as l } from "./components/RPController.js";
5
5
  import { RPTheme as P } from "./components/RPTheme.js";
@@ -1,2 +1,3 @@
1
1
  export declare const PAGE_PADDING = 4;
2
2
  export declare const THUMBNAIL_MIN_WIDTH = 200;
3
+ export declare const SCROLL_BAR_WIDTH = 20;
@@ -1,2 +1,2 @@
1
- import { ZoomLevel } from './types';
2
- export declare const getZoomLevel: (zoomLevel: number | ZoomLevel, clientWidth: number, clientHeight: number, pageWidth: number, pageHeight: number) => number;
1
+ import { ZoomLevel, ViewMode } from './types';
2
+ export declare const getZoomLevel: (zoomLevel: number | ZoomLevel, clientWidth: number, clientHeight: number, pageWidth: number, pageHeight: number, viewMode: ViewMode) => number;
@@ -446,7 +446,10 @@ export declare enum ThemeVariables {
446
446
  TEXT_LAYER_HIGHLIGHT_BORDER_RADIUS = "--rp-text-layer-highlight-border-radius",
447
447
  CURRENT_HIGHLIGHT_BACKGROUND_COLOR = "--rp-current-highlight-background-color",
448
448
  TOOLTIP_BACKGROUND_COLOR = "--rp-tooltip-background-color",
449
- TOOLTIP_BORDER_RADIUS = "--rp-tooltip-border-radius"
449
+ TOOLTIP_BORDER_RADIUS = "--rp-tooltip-border-radius",
450
+ CONTAINER_FOCUS_OUTLINE_WIDTH = "--rp-container-focus-outline-width",
451
+ CONTAINER_FOCUS_OUTLINE_COLOR = "--rp-container-focus-outline-color",
452
+ CONTAINER_FOCUS_OUTLINE_OFFSET = "--rp-container-focus-outline-offset"
450
453
  }
451
454
  export interface DarkModeProviderProps extends PropsWithChildren, Partial<Omit<DarkMode, 'setDarkMode'>> {
452
455
  }
@@ -467,7 +470,7 @@ export interface RPProviderProps extends PropsWithChildren, LoadPDFOptions, RPCo
467
470
  characterMap?: CharacterMap;
468
471
  }
469
472
  export type LocalizationMap = Record<string, Localization>;
470
- export interface RPControllerProps extends PropsWithChildren, DarkModeProviderProps, RotateProviderProps, LayerProviderProps, ZoomProviderProps, PageProviderProps, ScrollModeProps {
473
+ export interface RPControllerProps extends PropsWithChildren, DarkModeProviderProps, RotateProviderProps, LayerProviderProps, ZoomProviderProps, PageProviderProps, ViewModeProps, ScrollModeProps {
471
474
  initialSearch?: string;
472
475
  initialThumbnailsVisible?: boolean;
473
476
  locale?: string;
@@ -1,5 +1,6 @@
1
- const I = 4, o = 200;
1
+ const I = 4, _ = 200, o = 20;
2
2
  export {
3
3
  I as PAGE_PADDING,
4
- o as THUMBNAIL_MIN_WIDTH
4
+ o as SCROLL_BAR_WIDTH,
5
+ _ as THUMBNAIL_MIN_WIDTH
5
6
  };
@@ -1,20 +1,24 @@
1
- import { ZoomLevel as t } from "./types.js";
2
- const c = (o, r, m, e, s) => {
1
+ import { SCROLL_BAR_WIDTH as s } from "./constants.js";
2
+ import { ZoomLevel as e, ViewMode as c } from "./types.js";
3
+ const Z = (o, t, m, r, a, u) => {
3
4
  if (typeof o == "number")
4
5
  return o;
5
6
  switch (o) {
6
- case t.ACTUAL:
7
+ case e.ACTUAL:
7
8
  return 100;
8
- case t.PAGE_FIT:
9
+ case e.PAGE_FIT:
9
10
  let n = 0;
10
- const f = r > m;
11
- return s > e && f ? n = m / s : n = r / e, Math.floor(n * 100);
12
- case t.PAGE_WIDTH:
13
- return Math.floor(r / e * 100);
11
+ const l = u === c.DUAL_PAGE ? 2 * r : r;
12
+ return n = Math.min(
13
+ (t - s) / l,
14
+ m / a
15
+ ), Math.floor(n * 100);
16
+ case e.PAGE_WIDTH:
17
+ return Math.floor(t / r * 100);
14
18
  default:
15
19
  return 100;
16
20
  }
17
21
  };
18
22
  export {
19
- c as getZoomLevel
23
+ Z as getZoomLevel
20
24
  };
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../contexts/RPDocumentContext.js";
4
- import { c as C } from "../../RPDefaultLayout-db184803.js";
4
+ import { c as C } from "../../RPDefaultLayout-f579f051.js";
5
5
  import "../../contexts/DarkModeContext.js";
6
6
  import "../../contexts/RotationContext.js";
7
7
  import "../../contexts/LayerContext.js";
@@ -1,6 +1,6 @@
1
1
  import { useState as g, useCallback as h, useEffect as A } from "react";
2
2
  import { appConsole as c } from "../appConsole.js";
3
- const b = /* @__PURE__ */ new Date("2025-05-16T02:03:02.557Z"), l = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
3
+ const b = /* @__PURE__ */ new Date("2025-05-16T04:25:03.248Z"), l = "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. ${l}`,
5
5
  mismatchedDomain: `Your license key is not valid for the current domain / IP. ${l}`,
6
6
  expired: `Your license key has expired. ${l}`,
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { g as E } from "../../RPDefaultLayout-db184803.js";
2
+ import { g as E } from "../../RPDefaultLayout-f579f051.js";
3
3
  import "react/jsx-runtime";
4
4
  import "../../contexts/RPDocumentContext.js";
5
5
  import "../../contexts/DarkModeContext.js";
@@ -1,28 +1,79 @@
1
- import { useState as d, useCallback as m, useEffect as f } from "react";
2
- import { useDebounce as h } from "./useDebounce.js";
3
- import { useZoomContext as i } from "../../contexts/ZoomContext.js";
4
- const b = (o) => {
5
- const { currentZoom: l, setZoomLevel: a } = i(), [n, s] = d(l || 100), r = h(n, 100), u = m((e) => {
6
- s(e ? (t) => t + 3 : (t) => t - 3);
7
- }, []), c = m(
1
+ import { useState as w, useRef as T, useCallback as r, useEffect as u } from "react";
2
+ import { useDebounce as g } from "./useDebounce.js";
3
+ import { useZoomContext as A } from "../../contexts/ZoomContext.js";
4
+ const I = (n) => {
5
+ const { currentZoom: m, setZoomLevel: b } = A(), [E, d] = w(m || 100), L = g(E, 100), [o, y] = w(!1), c = T(null), i = r((e) => {
6
+ d(e ? (t) => t + 3 : (t) => t - 3);
7
+ }, []), a = r(
8
8
  (e) => {
9
9
  if (!e.ctrlKey)
10
10
  return;
11
11
  e.preventDefault();
12
12
  const t = e.deltaY < 0;
13
- u(t);
13
+ i(t);
14
14
  },
15
- [u]
15
+ [i]
16
16
  );
17
- f(() => {
18
- if (r) {
19
- const e = Math.round(l * 100 + n);
20
- s(0), a(e > 25 ? e : 25);
17
+ u(() => {
18
+ if (L) {
19
+ const e = Math.round(m * 100 + E);
20
+ d(0), b(e > 25 ? e : 25);
21
21
  }
22
- }, [r]), f(() => (o && o.addEventListener("wheel", c), () => {
23
- o && o.removeEventListener("wheel", c);
24
- }), [o, c]);
22
+ }, [L]);
23
+ const p = (e, t) => {
24
+ const s = e.clientX - t.clientX, l = e.clientY - t.clientY;
25
+ return Math.sqrt(s * s + l * l);
26
+ }, h = r(
27
+ (e) => {
28
+ if (!o || e.touches.length !== 2)
29
+ return;
30
+ const t = p(e.touches[0], e.touches[1]);
31
+ c.current = t, e.preventDefault();
32
+ },
33
+ [o]
34
+ ), v = r(() => {
35
+ c.current = null;
36
+ }, []), f = r(
37
+ (e) => {
38
+ if (!o || e.touches.length !== 2 || c.current === null)
39
+ return;
40
+ const t = p(e.touches[0], e.touches[1]), s = t - c.current, l = Math.abs(s) > 5, S = s > 0;
41
+ l && (i(S), c.current = t, e.preventDefault());
42
+ },
43
+ [i, o]
44
+ ), D = () => {
45
+ document.activeElement instanceof HTMLElement && document.activeElement.blur();
46
+ };
47
+ u(() => {
48
+ if (o) {
49
+ document.body.style.touchAction = "pan-x pan-y";
50
+ return;
51
+ }
52
+ document.body.style.touchAction = "";
53
+ }, [o]), u(() => {
54
+ const e = () => {
55
+ const t = document.activeElement, s = !!(t != null && t.closest('[data-rp="container"]'));
56
+ y(s);
57
+ };
58
+ return window.addEventListener("focusin", e), window.addEventListener("focusout", e), e(), () => {
59
+ window.removeEventListener("focusin", e), window.removeEventListener("focusout", e);
60
+ };
61
+ }, []), u(() => {
62
+ if (!n)
63
+ return;
64
+ const e = (t) => {
65
+ n.contains(t.target) || D();
66
+ };
67
+ return document.addEventListener("scroll", e), () => {
68
+ document.removeEventListener("scroll", e);
69
+ };
70
+ }, [n]), u(() => {
71
+ if (n)
72
+ return n.addEventListener("wheel", a, { passive: !1 }), n.addEventListener("touchstart", h, { passive: !1 }), n.addEventListener("touchmove", f, { passive: !1 }), n.addEventListener("touchend", v, { passive: !1 }), () => {
73
+ n.removeEventListener("wheel", a), n.removeEventListener("touchstart", h), n.removeEventListener("touchmove", f), n.removeEventListener("touchend", v);
74
+ };
75
+ }, [n, a, h, f, v]);
25
76
  };
26
77
  export {
27
- b as usePinch
78
+ I as usePinch
28
79
  };
@@ -4,7 +4,7 @@ import "../../contexts/DimensionPagesContext.js";
4
4
  import "../calculatePage.js";
5
5
  import "react/jsx-runtime";
6
6
  import "../../contexts/RPDocumentContext.js";
7
- import { v as F } from "../../RPDefaultLayout-db184803.js";
7
+ import { v as F } from "../../RPDefaultLayout-f579f051.js";
8
8
  import "../../contexts/DarkModeContext.js";
9
9
  import "../../contexts/RotationContext.js";
10
10
  import "../../contexts/LayerContext.js";
@@ -1,7 +1,7 @@
1
1
  import "react";
2
2
  import "react/jsx-runtime";
3
3
  import "../../contexts/RPDocumentContext.js";
4
- import { i as E } from "../../RPDefaultLayout-db184803.js";
4
+ import { i as E } from "../../RPDefaultLayout-f579f051.js";
5
5
  import "../../contexts/DarkModeContext.js";
6
6
  import "../../contexts/RotationContext.js";
7
7
  import "../../contexts/LayerContext.js";
@@ -2,7 +2,7 @@ import "react";
2
2
  import "../../contexts/ScrollModeContext.js";
3
3
  import "react/jsx-runtime";
4
4
  import "../../contexts/RPDocumentContext.js";
5
- import { f as D } from "../../RPDefaultLayout-db184803.js";
5
+ import { f as D } from "../../RPDefaultLayout-f579f051.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../types.js";
8
8
  import "../../contexts/RotationContext.js";
@@ -7,7 +7,7 @@ import "pdfjs-dist";
7
7
  import "../../contexts/RPDocumentContext.js";
8
8
  import "../../contexts/ZoomContext.js";
9
9
  import "react/jsx-runtime";
10
- import { n as G } from "../../RPDefaultLayout-db184803.js";
10
+ import { n as G } from "../../RPDefaultLayout-f579f051.js";
11
11
  import "../../contexts/DarkModeContext.js";
12
12
  import "../../contexts/RotationContext.js";
13
13
  import "../../contexts/LayerContext.js";
@@ -2,7 +2,7 @@ import "react";
2
2
  import "../renderPage.js";
3
3
  import "react/jsx-runtime";
4
4
  import "../../contexts/RPDocumentContext.js";
5
- import { k as F } from "../../RPDefaultLayout-db184803.js";
5
+ import { k as F } from "../../RPDefaultLayout-f579f051.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -3,7 +3,7 @@ import "../types.js";
3
3
  import "../../contexts/ScrollModeContext.js";
4
4
  import "react/jsx-runtime";
5
5
  import "../../contexts/RPDocumentContext.js";
6
- import { s as C } from "../../RPDefaultLayout-db184803.js";
6
+ import { s as C } from "../../RPDefaultLayout-f579f051.js";
7
7
  import "../../contexts/DarkModeContext.js";
8
8
  import "../../contexts/RotationContext.js";
9
9
  import "../../contexts/LayerContext.js";
@@ -1,20 +1,20 @@
1
- import { e as r, z as _, i as R, p as o, t as p } from "../th_TH-2c4015a5.js";
2
- var E = /* @__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))(E || {}), I = /* @__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))(I || {}), D = /* @__PURE__ */ ((O) => (O.ACTUAL = "Actual", O.PAGE_FIT = "Fit", O.PAGE_WIDTH = "Width", O))(D || {}), d = /* @__PURE__ */ ((O) => (O.Organization = "organization", O.Developer = "developer", O))(d || {}), N = /* @__PURE__ */ ((O) => (O.SINGLE_PAGE = "Single", O.DUAL_PAGE = "Dual", O))(N || {}), L = /* @__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))(L || {}), C = /* @__PURE__ */ ((O) => (O.PAGE_SCROLLING = "PAGE", O.VERTICAL_SCROLLING = "VERTICAL", O.HORIZONTAL_SCROLLING = "HORIZONTAL", O))(C || {}), P = /* @__PURE__ */ ((O) => (O.TEXT = "TEXT", O.HAND = "HAND", O))(P || {});
1
+ import { e as r, z as _, i as R, p as o, t as E } from "../th_TH-2c4015a5.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 || {}), p = /* @__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))(p || {}), N = /* @__PURE__ */ ((O) => (O.ACTUAL = "Actual", O.PAGE_FIT = "Fit", O.PAGE_WIDTH = "Width", O))(N || {}), D = /* @__PURE__ */ ((O) => (O.Organization = "organization", O.Developer = "developer", O))(D || {}), d = /* @__PURE__ */ ((O) => (O.SINGLE_PAGE = "Single", O.DUAL_PAGE = "Dual", O))(d || {}), L = /* @__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.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))(L || {}), C = /* @__PURE__ */ ((O) => (O.PAGE_SCROLLING = "PAGE", O.VERTICAL_SCROLLING = "VERTICAL", O.HORIZONTAL_SCROLLING = "HORIZONTAL", O))(C || {}), c = /* @__PURE__ */ ((O) => (O.TEXT = "TEXT", O.HAND = "HAND", O))(c || {});
3
3
  const g = {
4
4
  en_US: r,
5
5
  zh_CN: _,
6
6
  it_IT: R,
7
7
  pt_PT: o,
8
- th_TH: p
8
+ th_TH: E
9
9
  };
10
10
  export {
11
- E as AnnotationSubType,
12
- I as AnnotationType,
13
- d as LicenseType,
11
+ I as AnnotationSubType,
12
+ p as AnnotationType,
13
+ D as LicenseType,
14
14
  g as Locales,
15
15
  C as ScrollMode,
16
- P as SelectionMode,
16
+ c as SelectionMode,
17
17
  L as ThemeVariables,
18
- N as ViewMode,
19
- D as ZoomLevel
18
+ d as ViewMode,
19
+ N as ZoomLevel
20
20
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@pdf-viewer/react",
3
3
  "private": false,
4
4
  "description": "The PDF Viewer component for React and Next.js",
5
- "version": "1.6.0-beta.2",
5
+ "version": "1.6.0-beta.3",
6
6
  "keywords": [
7
7
  "component",
8
8
  "frontend",