pdf-composer 1.0.0 → 1.0.1
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.esm.js +19 -19
- package/dist/index.js +19 -19
- package/dist/index.umd.js +19 -19
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2,25 +2,25 @@ import { parse } from 'marked';
|
|
|
2
2
|
import html2canvas from 'html2canvas';
|
|
3
3
|
import { jsPDF } from 'jspdf';
|
|
4
4
|
const DEFAULT_STYLES = `
|
|
5
|
-
h1 { font-size: 36px; margin-bottom: 20px; font-weight: bold; color: #2c3e50; }
|
|
6
|
-
h2 { font-size: 28px; margin: 25px 0 12px; font-weight: bold; color: #34495e; }
|
|
7
|
-
h3 { font-size: 22px; margin: 20px 0 10px; font-weight: bold; color: #34495e; }
|
|
8
|
-
h4 { font-size: 18px; margin: 18px 0 8px; font-weight: bold; color: #34495e; }
|
|
9
|
-
h5 { font-size: 16px; margin: 16px 0 6px; font-weight: bold; color: #34495e; }
|
|
10
|
-
h6 { font-size: 14px; margin: 14px 0 4px; font-weight: bold; color: #34495e; }
|
|
11
|
-
p { margin: 12px 0; color: #2c3e50; }
|
|
12
|
-
ul, ol { padding-left: 30px; margin: 12px 0; }
|
|
13
|
-
li { margin: 8px 0; }
|
|
14
|
-
code { background: #f4f4f4; padding: 3px 8px; border-radius: 4px; font-family: monospace; font-size: 14px; }
|
|
15
|
-
pre { background: #2d2d2d; color: #ccc; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; }
|
|
16
|
-
pre code { background: none; padding: 0; color: inherit; }
|
|
17
|
-
blockquote { border-left: 4px solid #667eea; padding-left: 16px; margin: 16px 0; color: #7f8c8d; font-style: italic; }
|
|
18
|
-
table { width: 100%; border-collapse: collapse; margin: 16px 0; }
|
|
19
|
-
th, td { border: 1px solid #ddd; padding: 10px 14px; text-align: left; }
|
|
20
|
-
th { background: #f8f9fa; font-weight: bold; }
|
|
21
|
-
a { color: #667eea; text-decoration: none; }
|
|
22
|
-
hr { border: none; border-top: 1px solid #eee; margin: 20px 0; }
|
|
23
|
-
img { max-width: 100%; height: auto; }
|
|
5
|
+
#pdf-export-container h1 { font-size: 36px; margin-bottom: 20px; font-weight: bold; color: #2c3e50; }
|
|
6
|
+
#pdf-export-container h2 { font-size: 28px; margin: 25px 0 12px; font-weight: bold; color: #34495e; }
|
|
7
|
+
#pdf-export-container h3 { font-size: 22px; margin: 20px 0 10px; font-weight: bold; color: #34495e; }
|
|
8
|
+
#pdf-export-container h4 { font-size: 18px; margin: 18px 0 8px; font-weight: bold; color: #34495e; }
|
|
9
|
+
#pdf-export-container h5 { font-size: 16px; margin: 16px 0 6px; font-weight: bold; color: #34495e; }
|
|
10
|
+
#pdf-export-container h6 { font-size: 14px; margin: 14px 0 4px; font-weight: bold; color: #34495e; }
|
|
11
|
+
#pdf-export-container p { margin: 12px 0; color: #2c3e50; }
|
|
12
|
+
#pdf-export-container ul, #pdf-export-container ol { padding-left: 30px; margin: 12px 0; }
|
|
13
|
+
#pdf-export-container li { margin: 8px 0; }
|
|
14
|
+
#pdf-export-container code { background: #f4f4f4; padding: 3px 8px; border-radius: 4px; font-family: monospace; font-size: 14px; }
|
|
15
|
+
#pdf-export-container pre { background: #2d2d2d; color: #ccc; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; }
|
|
16
|
+
#pdf-export-container pre code { background: none; padding: 0; color: inherit; }
|
|
17
|
+
#pdf-export-container blockquote { border-left: 4px solid #667eea; padding-left: 16px; margin: 16px 0; color: #7f8c8d; font-style: italic; }
|
|
18
|
+
#pdf-export-container table { width: 100%; border-collapse: collapse; margin: 16px 0; }
|
|
19
|
+
#pdf-export-container th, #pdf-export-container td { border: 1px solid #ddd; padding: 10px 14px; text-align: left; }
|
|
20
|
+
#pdf-export-container th { background: #f8f9fa; font-weight: bold; }
|
|
21
|
+
#pdf-export-container a { color: #667eea; text-decoration: none; }
|
|
22
|
+
#pdf-export-container hr { border: none; border-top: 1px solid #eee; margin: 20px 0; }
|
|
23
|
+
#pdf-export-container img { max-width: 100%; height: auto; }
|
|
24
24
|
`;
|
|
25
25
|
const PAGE_SIZES = {
|
|
26
26
|
a3: { width: 297, height: 420 },
|
package/dist/index.js
CHANGED
|
@@ -9,25 +9,25 @@ const marked_1 = require("marked");
|
|
|
9
9
|
const html2canvas_1 = __importDefault(require("html2canvas"));
|
|
10
10
|
const jspdf_1 = require("jspdf");
|
|
11
11
|
const DEFAULT_STYLES = `
|
|
12
|
-
h1 { font-size: 36px; margin-bottom: 20px; font-weight: bold; color: #2c3e50; }
|
|
13
|
-
h2 { font-size: 28px; margin: 25px 0 12px; font-weight: bold; color: #34495e; }
|
|
14
|
-
h3 { font-size: 22px; margin: 20px 0 10px; font-weight: bold; color: #34495e; }
|
|
15
|
-
h4 { font-size: 18px; margin: 18px 0 8px; font-weight: bold; color: #34495e; }
|
|
16
|
-
h5 { font-size: 16px; margin: 16px 0 6px; font-weight: bold; color: #34495e; }
|
|
17
|
-
h6 { font-size: 14px; margin: 14px 0 4px; font-weight: bold; color: #34495e; }
|
|
18
|
-
p { margin: 12px 0; color: #2c3e50; }
|
|
19
|
-
ul, ol { padding-left: 30px; margin: 12px 0; }
|
|
20
|
-
li { margin: 8px 0; }
|
|
21
|
-
code { background: #f4f4f4; padding: 3px 8px; border-radius: 4px; font-family: monospace; font-size: 14px; }
|
|
22
|
-
pre { background: #2d2d2d; color: #ccc; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; }
|
|
23
|
-
pre code { background: none; padding: 0; color: inherit; }
|
|
24
|
-
blockquote { border-left: 4px solid #667eea; padding-left: 16px; margin: 16px 0; color: #7f8c8d; font-style: italic; }
|
|
25
|
-
table { width: 100%; border-collapse: collapse; margin: 16px 0; }
|
|
26
|
-
th, td { border: 1px solid #ddd; padding: 10px 14px; text-align: left; }
|
|
27
|
-
th { background: #f8f9fa; font-weight: bold; }
|
|
28
|
-
a { color: #667eea; text-decoration: none; }
|
|
29
|
-
hr { border: none; border-top: 1px solid #eee; margin: 20px 0; }
|
|
30
|
-
img { max-width: 100%; height: auto; }
|
|
12
|
+
#pdf-export-container h1 { font-size: 36px; margin-bottom: 20px; font-weight: bold; color: #2c3e50; }
|
|
13
|
+
#pdf-export-container h2 { font-size: 28px; margin: 25px 0 12px; font-weight: bold; color: #34495e; }
|
|
14
|
+
#pdf-export-container h3 { font-size: 22px; margin: 20px 0 10px; font-weight: bold; color: #34495e; }
|
|
15
|
+
#pdf-export-container h4 { font-size: 18px; margin: 18px 0 8px; font-weight: bold; color: #34495e; }
|
|
16
|
+
#pdf-export-container h5 { font-size: 16px; margin: 16px 0 6px; font-weight: bold; color: #34495e; }
|
|
17
|
+
#pdf-export-container h6 { font-size: 14px; margin: 14px 0 4px; font-weight: bold; color: #34495e; }
|
|
18
|
+
#pdf-export-container p { margin: 12px 0; color: #2c3e50; }
|
|
19
|
+
#pdf-export-container ul, #pdf-export-container ol { padding-left: 30px; margin: 12px 0; }
|
|
20
|
+
#pdf-export-container li { margin: 8px 0; }
|
|
21
|
+
#pdf-export-container code { background: #f4f4f4; padding: 3px 8px; border-radius: 4px; font-family: monospace; font-size: 14px; }
|
|
22
|
+
#pdf-export-container pre { background: #2d2d2d; color: #ccc; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; }
|
|
23
|
+
#pdf-export-container pre code { background: none; padding: 0; color: inherit; }
|
|
24
|
+
#pdf-export-container blockquote { border-left: 4px solid #667eea; padding-left: 16px; margin: 16px 0; color: #7f8c8d; font-style: italic; }
|
|
25
|
+
#pdf-export-container table { width: 100%; border-collapse: collapse; margin: 16px 0; }
|
|
26
|
+
#pdf-export-container th, #pdf-export-container td { border: 1px solid #ddd; padding: 10px 14px; text-align: left; }
|
|
27
|
+
#pdf-export-container th { background: #f8f9fa; font-weight: bold; }
|
|
28
|
+
#pdf-export-container a { color: #667eea; text-decoration: none; }
|
|
29
|
+
#pdf-export-container hr { border: none; border-top: 1px solid #eee; margin: 20px 0; }
|
|
30
|
+
#pdf-export-container img { max-width: 100%; height: auto; }
|
|
31
31
|
`;
|
|
32
32
|
const PAGE_SIZES = {
|
|
33
33
|
a3: { width: 297, height: 420 },
|
package/dist/index.umd.js
CHANGED
|
@@ -3,25 +3,25 @@ var marked = window.marked;
|
|
|
3
3
|
var html2canvas = window.html2canvas;
|
|
4
4
|
var jsPDF = window.jspdf.jsPDF;
|
|
5
5
|
const DEFAULT_STYLES = `
|
|
6
|
-
h1 { font-size: 36px; margin-bottom: 20px; font-weight: bold; color: #2c3e50; }
|
|
7
|
-
h2 { font-size: 28px; margin: 25px 0 12px; font-weight: bold; color: #34495e; }
|
|
8
|
-
h3 { font-size: 22px; margin: 20px 0 10px; font-weight: bold; color: #34495e; }
|
|
9
|
-
h4 { font-size: 18px; margin: 18px 0 8px; font-weight: bold; color: #34495e; }
|
|
10
|
-
h5 { font-size: 16px; margin: 16px 0 6px; font-weight: bold; color: #34495e; }
|
|
11
|
-
h6 { font-size: 14px; margin: 14px 0 4px; font-weight: bold; color: #34495e; }
|
|
12
|
-
p { margin: 12px 0; color: #2c3e50; }
|
|
13
|
-
ul, ol { padding-left: 30px; margin: 12px 0; }
|
|
14
|
-
li { margin: 8px 0; }
|
|
15
|
-
code { background: #f4f4f4; padding: 3px 8px; border-radius: 4px; font-family: monospace; font-size: 14px; }
|
|
16
|
-
pre { background: #2d2d2d; color: #ccc; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; }
|
|
17
|
-
pre code { background: none; padding: 0; color: inherit; }
|
|
18
|
-
blockquote { border-left: 4px solid #667eea; padding-left: 16px; margin: 16px 0; color: #7f8c8d; font-style: italic; }
|
|
19
|
-
table { width: 100%; border-collapse: collapse; margin: 16px 0; }
|
|
20
|
-
th, td { border: 1px solid #ddd; padding: 10px 14px; text-align: left; }
|
|
21
|
-
th { background: #f8f9fa; font-weight: bold; }
|
|
22
|
-
a { color: #667eea; text-decoration: none; }
|
|
23
|
-
hr { border: none; border-top: 1px solid #eee; margin: 20px 0; }
|
|
24
|
-
img { max-width: 100%; height: auto; }
|
|
6
|
+
#pdf-export-container h1 { font-size: 36px; margin-bottom: 20px; font-weight: bold; color: #2c3e50; }
|
|
7
|
+
#pdf-export-container h2 { font-size: 28px; margin: 25px 0 12px; font-weight: bold; color: #34495e; }
|
|
8
|
+
#pdf-export-container h3 { font-size: 22px; margin: 20px 0 10px; font-weight: bold; color: #34495e; }
|
|
9
|
+
#pdf-export-container h4 { font-size: 18px; margin: 18px 0 8px; font-weight: bold; color: #34495e; }
|
|
10
|
+
#pdf-export-container h5 { font-size: 16px; margin: 16px 0 6px; font-weight: bold; color: #34495e; }
|
|
11
|
+
#pdf-export-container h6 { font-size: 14px; margin: 14px 0 4px; font-weight: bold; color: #34495e; }
|
|
12
|
+
#pdf-export-container p { margin: 12px 0; color: #2c3e50; }
|
|
13
|
+
#pdf-export-container ul, #pdf-export-container ol { padding-left: 30px; margin: 12px 0; }
|
|
14
|
+
#pdf-export-container li { margin: 8px 0; }
|
|
15
|
+
#pdf-export-container code { background: #f4f4f4; padding: 3px 8px; border-radius: 4px; font-family: monospace; font-size: 14px; }
|
|
16
|
+
#pdf-export-container pre { background: #2d2d2d; color: #ccc; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; }
|
|
17
|
+
#pdf-export-container pre code { background: none; padding: 0; color: inherit; }
|
|
18
|
+
#pdf-export-container blockquote { border-left: 4px solid #667eea; padding-left: 16px; margin: 16px 0; color: #7f8c8d; font-style: italic; }
|
|
19
|
+
#pdf-export-container table { width: 100%; border-collapse: collapse; margin: 16px 0; }
|
|
20
|
+
#pdf-export-container th, #pdf-export-container td { border: 1px solid #ddd; padding: 10px 14px; text-align: left; }
|
|
21
|
+
#pdf-export-container th { background: #f8f9fa; font-weight: bold; }
|
|
22
|
+
#pdf-export-container a { color: #667eea; text-decoration: none; }
|
|
23
|
+
#pdf-export-container hr { border: none; border-top: 1px solid #eee; margin: 20px 0; }
|
|
24
|
+
#pdf-export-container img { max-width: 100%; height: auto; }
|
|
25
25
|
`;
|
|
26
26
|
const PAGE_SIZES = {
|
|
27
27
|
a3: { width: 297, height: 420 },
|