@pdf-viewer/react 1.8.0-beta.2 → 1.8.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.
- package/dist/main.js +8 -8
- package/dist/types/main.d.ts +1 -1
- package/dist/types/utils/hooks/{useSinglePageRotate.d.ts → usePageRotateContext.d.ts} +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/{useSinglePageRotate.js → usePageRotateContext.js} +7 -7
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -4,17 +4,17 @@ import { RPConfig as u } from "./components/RPConfig.js";
|
|
|
4
4
|
import { RPController as l } from "./components/RPController.js";
|
|
5
5
|
import { RPTheme as P } from "./components/RPTheme.js";
|
|
6
6
|
import { RPDropFileZone as d } from "./components/RPDropFileZone.js";
|
|
7
|
-
import { useDarkModeContext as
|
|
7
|
+
import { useDarkModeContext as g } from "./contexts/DarkModeContext.js";
|
|
8
8
|
import { useDocumentContext as h } from "./contexts/RPDocumentContext.js";
|
|
9
9
|
import { useRotationContext as M } from "./contexts/RotationContext.js";
|
|
10
|
-
import { useViewModeContext as
|
|
11
|
-
import { useDropFileZoneContext as
|
|
10
|
+
import { useViewModeContext as w } from "./contexts/ViewModeContext.js";
|
|
11
|
+
import { useDropFileZoneContext as S } from "./contexts/DropFileZoneContext.js";
|
|
12
12
|
import { useOpenFileContext as b } from "./contexts/FileInputContext.js";
|
|
13
13
|
import { useZoomContext as T } from "./contexts/ZoomContext.js";
|
|
14
14
|
import { useHighlightContext as y } from "./contexts/HighlightContext.js";
|
|
15
15
|
import { usePdfProperties as O } from "./utils/hooks/usePdfProperties.js";
|
|
16
16
|
import { useFullScreenContext as q } from "./contexts/FullScreenContext.js";
|
|
17
|
-
import {
|
|
17
|
+
import { usePageRotateContext as A } from "./utils/hooks/usePageRotateContext.js";
|
|
18
18
|
import { Locales as E, ScrollMode as G, ThemeVariables as I, ViewMode as J, ZoomLevel as K } from "./utils/types.js";
|
|
19
19
|
export {
|
|
20
20
|
E as Locales,
|
|
@@ -29,19 +29,19 @@ export {
|
|
|
29
29
|
I as ThemeVariables,
|
|
30
30
|
J as ViewMode,
|
|
31
31
|
K as ZoomLevel,
|
|
32
|
-
|
|
32
|
+
g as useDarkModeContext,
|
|
33
33
|
h as useDocumentContext,
|
|
34
|
-
|
|
34
|
+
S as useDropFileZoneContext,
|
|
35
35
|
s as useFileDownload,
|
|
36
36
|
q as useFullScreenContext,
|
|
37
37
|
y as useHighlightContext,
|
|
38
38
|
b as useOpenFileContext,
|
|
39
|
+
A as usePageRotateContext,
|
|
39
40
|
m as usePaginationContext,
|
|
40
41
|
O as usePdfProperties,
|
|
41
42
|
p as usePrintContext,
|
|
42
43
|
M as useRotationContext,
|
|
43
44
|
a as useSearchContext,
|
|
44
|
-
|
|
45
|
-
Z as useViewModeContext,
|
|
45
|
+
w as useViewModeContext,
|
|
46
46
|
T as useZoomContext
|
|
47
47
|
};
|
package/dist/types/main.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export { useSearchContext } from './contexts/SearchContext';
|
|
|
19
19
|
export { useHighlightContext } from './contexts/HighlightContext';
|
|
20
20
|
export { usePdfProperties } from './utils/hooks/usePdfProperties';
|
|
21
21
|
export { useFullScreenContext } from './contexts/FullScreenContext';
|
|
22
|
-
export {
|
|
22
|
+
export { usePageRotateContext } from './utils/hooks/usePageRotateContext';
|
|
23
23
|
export { type PDFDocumentProxy } from 'pdfjs-dist';
|
|
24
24
|
export type { CharacterMap, DarkModeProps, DownloadToolProps, FullScreenToolProps, Localization, MatchValue, OpenFileToolProps, PageNavigationToolProps, PdfPage, PdfProperties, PreparePrintProgress, PrintToolProps, RPConfigProps, RPThemeProps, RPProviderProps, RPLayoutProps, RPIcons, RPSlots, SearchOptions, SetPageResult, ScrollModeProps, ThumbnailToolProps, ViewModeProps, ZoomProps } from './utils/types';
|
|
25
25
|
export { ViewMode, ScrollMode, ZoomLevel, Locales, ThemeVariables } from './utils/types';
|
|
@@ -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-07-
|
|
3
|
+
const b = /* @__PURE__ */ new Date("2025-07-15T04:22:13.222Z"), 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,14 +1,14 @@
|
|
|
1
1
|
import { useCallback as r } from "react";
|
|
2
2
|
import { useSinglePageRotateContext as s } from "../../contexts/SinglePageRotateContext.js";
|
|
3
|
-
const
|
|
3
|
+
const l = () => {
|
|
4
4
|
const { setSinglePageRotate: n } = s();
|
|
5
5
|
return { rotate: r(
|
|
6
6
|
(a, t) => {
|
|
7
|
-
n((
|
|
8
|
-
const
|
|
9
|
-
return
|
|
10
|
-
...
|
|
11
|
-
[a]:
|
|
7
|
+
n((o) => {
|
|
8
|
+
const e = typeof t == "function" ? t(o[a] || 0) : t;
|
|
9
|
+
return e % 90 !== 0 ? (console.warn("rotationDegree must be a multiple of 90 got", e), o) : {
|
|
10
|
+
...o,
|
|
11
|
+
[a]: e
|
|
12
12
|
};
|
|
13
13
|
});
|
|
14
14
|
},
|
|
@@ -16,5 +16,5 @@ const c = () => {
|
|
|
16
16
|
) };
|
|
17
17
|
};
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
l as usePageRotateContext
|
|
20
20
|
};
|