@react-pdf-kit/viewer 2.2.0-beta.0 → 2.2.0-beta.2
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,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as s, Fragment as t, jsx as
|
|
1
|
+
import { jsxs as s, Fragment as t, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback as F } from "react";
|
|
3
3
|
import { c as v } from "../clsx-0c6e471a.js";
|
|
4
4
|
import { useDropFileZoneContext as Z } from "../contexts/DropFileZoneContext.js";
|
|
@@ -27,34 +27,34 @@ import "../contexts/LayoutDropFileZoneContext.js";
|
|
|
27
27
|
const l = {
|
|
28
28
|
"rp-drop-zone": "_rp-drop-zone_1sc50_1",
|
|
29
29
|
"rp-drop-zone-transparent": "_rp-drop-zone-transparent_1sc50_15"
|
|
30
|
-
}, L = {},
|
|
31
|
-
const { dragging:
|
|
30
|
+
}, L = {}, oo = () => {
|
|
31
|
+
const { dragging: c, handleDragLeave: d, handleDrop: f } = Z(), { darkMode: p } = C(), { localeMessages: e } = _(), { DropFileZoneLayout: i, DropFileZoneTool: m, DropFileZoneToolbar: a } = k(), u = [i, m, a].includes(
|
|
32
32
|
!1
|
|
33
|
-
), D = F((
|
|
34
|
-
|
|
33
|
+
), D = F((r) => {
|
|
34
|
+
r.preventDefault();
|
|
35
35
|
}, []);
|
|
36
|
-
if (!
|
|
36
|
+
if (!c || u)
|
|
37
37
|
return null;
|
|
38
|
-
const n = (
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
38
|
+
const n = (r) => r ? typeof r == "function" ? /* @__PURE__ */ o(r, {}) : typeof r != "boolean" ? /* @__PURE__ */ o(t, { children: r }) : null : null, h = /* @__PURE__ */ s(t, { children: [
|
|
39
|
+
/* @__PURE__ */ o("div", { children: p ? /* @__PURE__ */ o(z, {}) : /* @__PURE__ */ o(x, {}) }),
|
|
40
|
+
/* @__PURE__ */ o("p", { children: e == null ? void 0 : e.dragDropFileMessage })
|
|
41
41
|
] }), g = () => (
|
|
42
42
|
// Priority: RPLayout > RPHorizontalBar\RPDefaultLayout (slots)
|
|
43
43
|
n(i) ?? n(m) ?? n(a) ?? h
|
|
44
44
|
);
|
|
45
45
|
return /* @__PURE__ */ s(t, { children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ o("div", { className: v(l["rp-drop-zone"], p ? L["rp-dark-mode"] : ""), children: /* @__PURE__ */ o(g, {}) }),
|
|
47
|
+
/* @__PURE__ */ o(
|
|
48
48
|
"div",
|
|
49
49
|
{
|
|
50
50
|
className: l["rp-drop-zone-transparent"],
|
|
51
51
|
onDragOver: D,
|
|
52
|
-
onDragLeave:
|
|
52
|
+
onDragLeave: d,
|
|
53
53
|
onDrop: f
|
|
54
54
|
}
|
|
55
55
|
)
|
|
56
56
|
] });
|
|
57
57
|
};
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
oo as RPDropFileZone
|
|
60
60
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState as E, useCallback as h, useEffect as A } from "react";
|
|
2
2
|
import { appConsole as l } from "../appConsole.js";
|
|
3
|
-
const b = /* @__PURE__ */ new Date("2026-03-
|
|
3
|
+
const b = /* @__PURE__ */ new Date("2026-03-19T03:15:27.620Z"), d = "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. ${d}`,
|
|
5
5
|
mismatchedDomain: `Your license key is not valid for the current domain / IP. ${d}`,
|
|
6
6
|
expired: `Your license key has expired. ${d}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-pdf-kit/viewer",
|
|
3
|
-
"version": "2.2.0-beta.
|
|
3
|
+
"version": "2.2.0-beta.2",
|
|
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": [
|
|
@@ -11,9 +11,7 @@
|
|
|
11
11
|
"react pdf viewer",
|
|
12
12
|
"pdfjs",
|
|
13
13
|
"pdf-react",
|
|
14
|
-
"react-pdf-kit"
|
|
15
|
-
"react-pdf-kit-viewer",
|
|
16
|
-
"pdf-viewer-kit"
|
|
14
|
+
"react-pdf-kit"
|
|
17
15
|
],
|
|
18
16
|
"homepage": "https://www.react-pdf-kit.dev",
|
|
19
17
|
"license": "See license section",
|