@mce/pdf 0.15.22 → 0.15.24

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 CHANGED
@@ -13,11 +13,18 @@ function plugin() {
13
13
  name: "pdf",
14
14
  saveAs: true,
15
15
  handle: async (options) => {
16
- const doc = await to("json", options);
17
- return await new Pdf({
16
+ const { pdf: pdfOptions, ...jsonOptions } = options;
17
+ const doc = await to("json", jsonOptions);
18
+ doc.children?.reverse();
19
+ const pdf = new Pdf({
18
20
  ...doc,
19
- fonts
20
- }).toBlob();
21
+ fonts,
22
+ meta: {
23
+ ...doc.meta,
24
+ ...pdfOptions
25
+ }
26
+ });
27
+ return await pdf.toBlob();
21
28
  }
22
29
  }
23
30
  ]
package/dist/plugin.d.ts CHANGED
@@ -1,5 +1,9 @@
1
+ import type { PdfOptionMeta } from 'modern-pdf';
1
2
  declare global {
2
3
  namespace Mce {
4
+ interface ExportOptions {
5
+ pdf?: PdfOptionMeta;
6
+ }
3
7
  interface Exporters {
4
8
  pdf: Promise<Blob>;
5
9
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mce/pdf",
3
3
  "type": "module",
4
- "version": "0.15.22",
4
+ "version": "0.15.24",
5
5
  "description": "PDF plugin for mce",
6
6
  "author": "wxm",
7
7
  "license": "MIT",
@@ -49,7 +49,7 @@
49
49
  "modern-pdf": "^1.4.0"
50
50
  },
51
51
  "devDependencies": {
52
- "mce": "0.15.22"
52
+ "mce": "0.15.24"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "mce": "^0"