@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 s } from "react/jsx-runtime";
2
- import { createContext as a, useContext as u, useState as c, useMemo as m } from "react";
3
- import { appConsole as p } from "../utils/appConsole.js";
4
- import { useInitialStateContext as d } from "./InitialStateContext.js";
5
- const r = a({
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
- }), R = () => {
10
- const t = u(r);
11
- return typeof (t == null ? void 0 : t.rotate) > "u" && p.error("Please use this hooks inside children component of RPProvider"), t;
12
- }, P = ({ children: t }) => {
13
- const { initialRotation: n = 0 } = d(), [o, e] = c(n), i = m(() => ({
14
- rotate: o,
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
- }), [o, e]);
17
- return /* @__PURE__ */ s(r.Provider, { value: i, children: t });
21
+ }), [n, e]);
22
+ return /* @__PURE__ */ a(s.Provider, { value: i, children: t });
18
23
  };
19
24
  export {
20
- r as RotateContext,
21
- P as RotateProvider,
22
- R as useRotationContext
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-02T08:55:55.005Z"), l = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
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}`,
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.7.3-rc.0",
5
+ "version": "1.7.3-rc.1",
6
6
  "keywords": [
7
7
  "component",
8
8
  "frontend",