@pdf-viewer/react 1.7.3-rc.0 → 1.7.3-rc.1
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,23 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { appConsole as
|
|
4
|
-
import { useInitialStateContext as
|
|
5
|
-
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as u, useContext as c, useState as f, useEffect as m, useMemo as p } from "react";
|
|
3
|
+
import { appConsole as d } from "../utils/appConsole.js";
|
|
4
|
+
import { useInitialStateContext as x } from "./InitialStateContext.js";
|
|
5
|
+
import { useDocumentContext as C } from "./RPDocumentContext.js";
|
|
6
|
+
const s = u({
|
|
6
7
|
rotate: 0,
|
|
7
8
|
setRotate: () => {
|
|
8
9
|
}
|
|
9
|
-
}),
|
|
10
|
-
const t =
|
|
11
|
-
return typeof (t == null ? void 0 : t.rotate) > "u" &&
|
|
12
|
-
},
|
|
13
|
-
const { initialRotation:
|
|
14
|
-
|
|
10
|
+
}), S = () => {
|
|
11
|
+
const t = c(s);
|
|
12
|
+
return typeof (t == null ? void 0 : t.rotate) > "u" && d.error("Please use this hooks inside children component of RPProvider"), t;
|
|
13
|
+
}, j = ({ children: t }) => {
|
|
14
|
+
const { initialRotation: o = 0 } = x(), { pdf: r } = C(), [n, e] = f(o);
|
|
15
|
+
m(() => {
|
|
16
|
+
r && e(o);
|
|
17
|
+
}, [r, o]);
|
|
18
|
+
const i = p(() => ({
|
|
19
|
+
rotate: n,
|
|
15
20
|
setRotate: e
|
|
16
|
-
}), [
|
|
17
|
-
return /* @__PURE__ */ s
|
|
21
|
+
}), [n, e]);
|
|
22
|
+
return /* @__PURE__ */ a(s.Provider, { value: i, children: t });
|
|
18
23
|
};
|
|
19
24
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
s as RotateContext,
|
|
26
|
+
j as RotateProvider,
|
|
27
|
+
S as useRotationContext
|
|
23
28
|
};
|
|
@@ -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-03T02:37:49.834Z"), 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}`,
|