@blocklet/pdf 2.0.122 → 2.0.124
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/lib/index.cjs +3 -1
- package/lib/index.js +3 -1
- package/lib/index.mjs +3 -1
- package/package.json +3 -3
package/lib/index.cjs
CHANGED
|
@@ -31,9 +31,10 @@ const ZoomInIcon__default = /*#__PURE__*/_interopDefaultCompat(ZoomInIcon);
|
|
|
31
31
|
const DownloadIcon__default = /*#__PURE__*/_interopDefaultCompat(DownloadIcon);
|
|
32
32
|
const ArrowOutwardOutlinedIcon__default = /*#__PURE__*/_interopDefaultCompat(ArrowOutwardOutlinedIcon);
|
|
33
33
|
|
|
34
|
-
const workerSrc = `//unpkg.com/pdfjs-dist@${reactPdf.pdfjs.version}/legacy/build/pdf.worker.min.
|
|
34
|
+
const workerSrc = `//unpkg.com/pdfjs-dist@${reactPdf.pdfjs.version}/legacy/build/pdf.worker.min.mjs`;
|
|
35
35
|
reactPdf.pdfjs.GlobalWorkerOptions.workerSrc = workerSrc;
|
|
36
36
|
const preventScrollChangeThumbnailTimerMap = {};
|
|
37
|
+
const documentOptions = { isEvalSupported: false };
|
|
37
38
|
const getBorder = (color) => `2px solid ${color}`;
|
|
38
39
|
const defaultLoading = (props) => {
|
|
39
40
|
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton__default, { variant: "rectangular", width: "100%", ...props });
|
|
@@ -107,6 +108,7 @@ function PdfComponent({
|
|
|
107
108
|
}),
|
|
108
109
|
file: pdfUrl,
|
|
109
110
|
onLoadSuccess: onDocumentLoadSuccess,
|
|
111
|
+
options: documentOptions,
|
|
110
112
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
111
113
|
Box__default,
|
|
112
114
|
{
|
package/lib/index.js
CHANGED
|
@@ -31,9 +31,10 @@ const ZoomInIcon__default = /*#__PURE__*/_interopDefaultCompat(ZoomInIcon);
|
|
|
31
31
|
const DownloadIcon__default = /*#__PURE__*/_interopDefaultCompat(DownloadIcon);
|
|
32
32
|
const ArrowOutwardOutlinedIcon__default = /*#__PURE__*/_interopDefaultCompat(ArrowOutwardOutlinedIcon);
|
|
33
33
|
|
|
34
|
-
const workerSrc = `//unpkg.com/pdfjs-dist@${reactPdf.pdfjs.version}/legacy/build/pdf.worker.min.
|
|
34
|
+
const workerSrc = `//unpkg.com/pdfjs-dist@${reactPdf.pdfjs.version}/legacy/build/pdf.worker.min.mjs`;
|
|
35
35
|
reactPdf.pdfjs.GlobalWorkerOptions.workerSrc = workerSrc;
|
|
36
36
|
const preventScrollChangeThumbnailTimerMap = {};
|
|
37
|
+
const documentOptions = { isEvalSupported: false };
|
|
37
38
|
const getBorder = (color) => `2px solid ${color}`;
|
|
38
39
|
const defaultLoading = (props) => {
|
|
39
40
|
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton__default, { variant: "rectangular", width: "100%", ...props });
|
|
@@ -107,6 +108,7 @@ function PdfComponent({
|
|
|
107
108
|
}),
|
|
108
109
|
file: pdfUrl,
|
|
109
110
|
onLoadSuccess: onDocumentLoadSuccess,
|
|
111
|
+
options: documentOptions,
|
|
110
112
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
111
113
|
Box__default,
|
|
112
114
|
{
|
package/lib/index.mjs
CHANGED
|
@@ -16,9 +16,10 @@ import { styled } from '@mui/material';
|
|
|
16
16
|
import 'react-pdf/dist/Page/AnnotationLayer.css';
|
|
17
17
|
import 'react-pdf/dist/Page/TextLayer.css';
|
|
18
18
|
|
|
19
|
-
const workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.
|
|
19
|
+
const workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.mjs`;
|
|
20
20
|
pdfjs.GlobalWorkerOptions.workerSrc = workerSrc;
|
|
21
21
|
const preventScrollChangeThumbnailTimerMap = {};
|
|
22
|
+
const documentOptions = { isEvalSupported: false };
|
|
22
23
|
const getBorder = (color) => `2px solid ${color}`;
|
|
23
24
|
const defaultLoading = (props) => {
|
|
24
25
|
return /* @__PURE__ */ jsx(Skeleton, { variant: "rectangular", width: "100%", ...props });
|
|
@@ -92,6 +93,7 @@ function PdfComponent({
|
|
|
92
93
|
}),
|
|
93
94
|
file: pdfUrl,
|
|
94
95
|
onLoadSuccess: onDocumentLoadSuccess,
|
|
96
|
+
options: documentOptions,
|
|
95
97
|
children: /* @__PURE__ */ jsxs(
|
|
96
98
|
Box,
|
|
97
99
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/pdf",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.124",
|
|
4
4
|
"description": "blocklet pdf component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@mui/system": "^5.15.4",
|
|
43
43
|
"ahooks": "^3.7.8",
|
|
44
44
|
"react": "^18.2.0",
|
|
45
|
-
"react-pdf": "^
|
|
45
|
+
"react-pdf": "^9.1.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@arcblock/eslint-config-ts": "^0.3.2",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"vitest": "^1.4.0",
|
|
60
60
|
"vitest-fetch-mock": "^0.2.2"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "07fff1610f59081cf9f829724349af934511f230"
|
|
63
63
|
}
|