@blocklet/pdf 2.0.171 → 2.0.174
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/cjs/pdf.js +1 -2
- package/es/pdf.js +1 -2
- package/package.json +21 -22
package/cjs/pdf.js
CHANGED
|
@@ -22,7 +22,7 @@ var _ArrowOutwardOutlined = _interopRequireDefault(require("@mui/icons-material/
|
|
|
22
22
|
var _material = require("@mui/material");
|
|
23
23
|
require("react-pdf/dist/Page/AnnotationLayer.css");
|
|
24
24
|
require("react-pdf/dist/Page/TextLayer.css");
|
|
25
|
-
function _interopRequireDefault(
|
|
25
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
26
26
|
const workerSrc = `//unpkg.com/pdfjs-dist@${_reactPdf.pdfjs.version}/legacy/build/pdf.worker.min.mjs`;
|
|
27
27
|
_reactPdf.pdfjs.GlobalWorkerOptions.workerSrc = workerSrc;
|
|
28
28
|
const preventScrollChangeThumbnailTimerMap = {};
|
|
@@ -197,7 +197,6 @@ function PdfComponent({
|
|
|
197
197
|
width: width + 4
|
|
198
198
|
// add border width
|
|
199
199
|
},
|
|
200
|
-
|
|
201
200
|
children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_reactPdf.Thumbnail, {
|
|
202
201
|
pageIndex: currentPage,
|
|
203
202
|
pageNumber: currentPage,
|
package/es/pdf.js
CHANGED
|
@@ -54,8 +54,7 @@ export function PdfComponent({
|
|
|
54
54
|
top,
|
|
55
55
|
behavior: "smooth"
|
|
56
56
|
});
|
|
57
|
-
if (preventScrollChangeThumbnailTimerMap[pdfUrl])
|
|
58
|
-
clearTimeout(preventScrollChangeThumbnailTimerMap[pdfUrl]);
|
|
57
|
+
if (preventScrollChangeThumbnailTimerMap[pdfUrl]) clearTimeout(preventScrollChangeThumbnailTimerMap[pdfUrl]);
|
|
59
58
|
preventScrollChangeThumbnailTimerMap[pdfUrl] = setTimeout(() => {
|
|
60
59
|
preventScrollChangeThumbnailRef.current = false;
|
|
61
60
|
preventScrollChangeThumbnailTimerMap[pdfUrl] = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/pdf",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.174",
|
|
4
4
|
"description": "blocklet pdf component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -27,15 +27,6 @@
|
|
|
27
27
|
"cjs",
|
|
28
28
|
"*.d.ts"
|
|
29
29
|
],
|
|
30
|
-
"scripts": {
|
|
31
|
-
"coverage": "yarn test -- --coverage",
|
|
32
|
-
"test": "vitest tests",
|
|
33
|
-
"build": "unbuild",
|
|
34
|
-
"build:watch": "npx nodemon --ext 'ts,tsx,json,js,jsx' --exec 'yarn run build' --ignore 'lib/*' ",
|
|
35
|
-
"dev": "yarn run build:watch",
|
|
36
|
-
"prepublish": "yarn run build",
|
|
37
|
-
"prebuild:dep": "yarn run build"
|
|
38
|
-
},
|
|
39
30
|
"keywords": [
|
|
40
31
|
"blocklet",
|
|
41
32
|
"pdf"
|
|
@@ -43,27 +34,35 @@
|
|
|
43
34
|
"author": "arcblock <blocklet@arcblock.io> https://github.com/blocklet",
|
|
44
35
|
"license": "ISC",
|
|
45
36
|
"dependencies": {
|
|
46
|
-
"@mui/icons-material": "^5.
|
|
47
|
-
"@mui/material": "^5.
|
|
48
|
-
"@mui/system": "^5.
|
|
49
|
-
"ahooks": "^3.
|
|
50
|
-
"react": "^18.
|
|
37
|
+
"@mui/icons-material": "^5.16.7",
|
|
38
|
+
"@mui/material": "^5.16.7",
|
|
39
|
+
"@mui/system": "^5.16.7",
|
|
40
|
+
"ahooks": "^3.8.1",
|
|
41
|
+
"react": "^18.3.1",
|
|
51
42
|
"react-pdf": "^9.1.0"
|
|
52
43
|
},
|
|
53
44
|
"devDependencies": {
|
|
54
45
|
"@arcblock/eslint-config-ts": "^0.3.2",
|
|
55
46
|
"@types/express": "^4.17.21",
|
|
56
|
-
"@types/lodash": "^4.
|
|
47
|
+
"@types/lodash": "^4.17.7",
|
|
57
48
|
"@types/mime-types": "^2.1.4",
|
|
58
|
-
"@types/node": "^20.
|
|
59
|
-
"@types/react": "^18.
|
|
49
|
+
"@types/node": "^20.16.5",
|
|
50
|
+
"@types/react": "^18.3.5",
|
|
60
51
|
"@types/url-join": "^4.0.3",
|
|
61
52
|
"@vitest/coverage-c8": "^0.33.0",
|
|
62
53
|
"jsdom": "^22.1.0",
|
|
63
|
-
"typescript": "^5.
|
|
54
|
+
"typescript": "^5.6.2",
|
|
64
55
|
"unbuild": "^2.0.0",
|
|
65
|
-
"vitest": "^1.
|
|
56
|
+
"vitest": "^1.6.0",
|
|
66
57
|
"vitest-fetch-mock": "^0.2.2"
|
|
67
58
|
},
|
|
68
|
-
"
|
|
69
|
-
|
|
59
|
+
"scripts": {
|
|
60
|
+
"coverage": "pnpm test -- --coverage",
|
|
61
|
+
"test": "vitest tests",
|
|
62
|
+
"build": "unbuild",
|
|
63
|
+
"build:watch": "npx nodemon --ext 'ts,tsx,json,js,jsx' --exec 'pnpm run build' --ignore 'lib/*' ",
|
|
64
|
+
"dev": "pnpm run build:watch",
|
|
65
|
+
"prepublish": "pnpm run build",
|
|
66
|
+
"prebuild:dep": "pnpm run build"
|
|
67
|
+
}
|
|
68
|
+
}
|