react-pdf-levelup 2.0.17 → 2.0.19
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -0
- package/dist/index.mjs +7 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -48,6 +48,7 @@ __export(index_exports, {
|
|
|
48
48
|
Col9: () => Col9,
|
|
49
49
|
Container: () => Container,
|
|
50
50
|
Em: () => Em,
|
|
51
|
+
Font: () => import_renderer11.Font,
|
|
51
52
|
Footer: () => Footer,
|
|
52
53
|
H1: () => H1,
|
|
53
54
|
H2: () => H2,
|
|
@@ -69,6 +70,7 @@ __export(index_exports, {
|
|
|
69
70
|
Small: () => Small,
|
|
70
71
|
Span: () => Span,
|
|
71
72
|
Strong: () => Strong,
|
|
73
|
+
StyleSheet: () => import_renderer11.StyleSheet,
|
|
72
74
|
Table: () => Table,
|
|
73
75
|
Tbody: () => Tbody,
|
|
74
76
|
Td: () => Td,
|
|
@@ -762,6 +764,10 @@ var decodeBase64Pdf = (base64, fileName) => {
|
|
|
762
764
|
const byteArray = new Uint8Array(byteNumbers);
|
|
763
765
|
const blob = new Blob([byteArray], { type: "application/pdf" });
|
|
764
766
|
const blobUrl = URL.createObjectURL(blob);
|
|
767
|
+
if (document === void 0) {
|
|
768
|
+
console.error("document is undefined, only works in browser context");
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
765
771
|
const link = document.createElement("a");
|
|
766
772
|
link.href = blobUrl;
|
|
767
773
|
link.download = fileName;
|
|
@@ -817,6 +823,7 @@ var generatePDF_default = generatePDF;
|
|
|
817
823
|
Col9,
|
|
818
824
|
Container,
|
|
819
825
|
Em,
|
|
826
|
+
Font,
|
|
820
827
|
Footer,
|
|
821
828
|
H1,
|
|
822
829
|
H2,
|
|
@@ -838,6 +845,7 @@ var generatePDF_default = generatePDF;
|
|
|
838
845
|
Small,
|
|
839
846
|
Span,
|
|
840
847
|
Strong,
|
|
848
|
+
StyleSheet,
|
|
841
849
|
Table,
|
|
842
850
|
Tbody,
|
|
843
851
|
Td,
|
package/dist/index.mjs
CHANGED
|
@@ -664,7 +664,7 @@ var LI = ({ children, style, bulletType = "disc", isOrdered = false, index = 1,
|
|
|
664
664
|
};
|
|
665
665
|
|
|
666
666
|
// src/components/core/index.tsx
|
|
667
|
-
import { View as View7, Text as Text6 } from "@react-pdf/renderer";
|
|
667
|
+
import { View as View7, Text as Text6, StyleSheet as StyleSheet10, Font } from "@react-pdf/renderer";
|
|
668
668
|
|
|
669
669
|
// src/functions/decodeBase64Pdf.ts
|
|
670
670
|
var decodeBase64Pdf = (base64, fileName) => {
|
|
@@ -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;
|
|
@@ -730,6 +734,7 @@ export {
|
|
|
730
734
|
Col9,
|
|
731
735
|
Container,
|
|
732
736
|
Em,
|
|
737
|
+
Font,
|
|
733
738
|
Footer,
|
|
734
739
|
H1,
|
|
735
740
|
H2,
|
|
@@ -751,6 +756,7 @@ export {
|
|
|
751
756
|
Small,
|
|
752
757
|
Span,
|
|
753
758
|
Strong,
|
|
759
|
+
StyleSheet10 as StyleSheet,
|
|
754
760
|
Table,
|
|
755
761
|
Tbody,
|
|
756
762
|
Td,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-pdf-levelup",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.19",
|
|
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.18",
|
|
31
31
|
"react-router-dom": "^7.4.1",
|
|
32
32
|
"rimraf": "^6.0.1",
|
|
33
33
|
"ts-node": "^10.9.2"
|