react-pdf-levelup 2.0.17 → 2.0.18
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/dist/index.js +4 -0
- package/dist/index.mjs +4 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -762,6 +762,10 @@ var decodeBase64Pdf = (base64, fileName) => {
|
|
|
762
762
|
const byteArray = new Uint8Array(byteNumbers);
|
|
763
763
|
const blob = new Blob([byteArray], { type: "application/pdf" });
|
|
764
764
|
const blobUrl = URL.createObjectURL(blob);
|
|
765
|
+
if (document === void 0) {
|
|
766
|
+
console.error("document is undefined, only works in browser context");
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
765
769
|
const link = document.createElement("a");
|
|
766
770
|
link.href = blobUrl;
|
|
767
771
|
link.download = fileName;
|
package/dist/index.mjs
CHANGED
|
@@ -676,6 +676,10 @@ var decodeBase64Pdf = (base64, fileName) => {
|
|
|
676
676
|
const byteArray = new Uint8Array(byteNumbers);
|
|
677
677
|
const blob = new Blob([byteArray], { type: "application/pdf" });
|
|
678
678
|
const blobUrl = URL.createObjectURL(blob);
|
|
679
|
+
if (document === void 0) {
|
|
680
|
+
console.error("document is undefined, only works in browser context");
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
679
683
|
const link = document.createElement("a");
|
|
680
684
|
link.href = blobUrl;
|
|
681
685
|
link.download = fileName;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-pdf-levelup",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.18",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"clean-dist": "rimraf dist",
|
|
17
17
|
"build-lib": "npm run clean-dist && tsup",
|
|
18
18
|
"publicar": "npm run upVersion && npm run update-jsx && npm run build-lib && npm publish",
|
|
19
|
-
"demo": "ts-node ./src/
|
|
19
|
+
"demo": "ts-node ./src/useExample/index.ts"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/standalone": "^7.23.10",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"qrcode": "^1.5.4",
|
|
28
28
|
"react": "^18.2.0",
|
|
29
29
|
"react-dom": "^18.2.0",
|
|
30
|
-
"react-pdf-levelup": "^2.0.
|
|
30
|
+
"react-pdf-levelup": "^2.0.17",
|
|
31
31
|
"react-router-dom": "^7.4.1",
|
|
32
32
|
"rimraf": "^6.0.1",
|
|
33
33
|
"ts-node": "^10.9.2"
|