@blocklet/pdf 2.0.121 → 2.0.123
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 +2 -0
- package/lib/index.js +2 -0
- package/lib/index.mjs +2 -0
- package/package.json +3 -3
package/lib/index.cjs
CHANGED
|
@@ -34,6 +34,7 @@ const ArrowOutwardOutlinedIcon__default = /*#__PURE__*/_interopDefaultCompat(Arr
|
|
|
34
34
|
const workerSrc = `//unpkg.com/pdfjs-dist@${reactPdf.pdfjs.version}/legacy/build/pdf.worker.min.js`;
|
|
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
|
@@ -34,6 +34,7 @@ const ArrowOutwardOutlinedIcon__default = /*#__PURE__*/_interopDefaultCompat(Arr
|
|
|
34
34
|
const workerSrc = `//unpkg.com/pdfjs-dist@${reactPdf.pdfjs.version}/legacy/build/pdf.worker.min.js`;
|
|
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
|
@@ -19,6 +19,7 @@ import 'react-pdf/dist/Page/TextLayer.css';
|
|
|
19
19
|
const workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.js`;
|
|
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.123",
|
|
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": "30aa258ec6d8ec1218219a070b6b7cfd657064a1"
|
|
63
63
|
}
|