@mce/openxml 0.15.23 → 0.15.25

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
@@ -72,14 +72,18 @@ function plugin() {
72
72
  name: "pptx",
73
73
  saveAs: true,
74
74
  handle: async (options) => {
75
- const doc = await to("json", options);
75
+ const { pptx: pptxOptions, ...jsonOptions } = options;
76
+ const doc = await to("json", jsonOptions);
76
77
  doc.children?.reverse();
77
- return new Blob([
78
- await docToPptx({
79
- ...doc,
80
- fonts
81
- })
82
- ], {
78
+ const pptx = await docToPptx({
79
+ ...doc,
80
+ fonts,
81
+ meta: {
82
+ ...doc.meta,
83
+ ...pptxOptions
84
+ }
85
+ });
86
+ return new Blob([pptx], {
83
87
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
84
88
  });
85
89
  }
package/dist/plugin.d.ts CHANGED
@@ -1,5 +1,9 @@
1
+ import type { PptxMeta } from 'modern-openxml';
1
2
  declare global {
2
3
  namespace Mce {
4
+ interface ExportOptions {
5
+ pptx?: Partial<PptxMeta>;
6
+ }
3
7
  interface Exporters {
4
8
  pptx: Promise<Blob>;
5
9
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mce/openxml",
3
3
  "type": "module",
4
- "version": "0.15.23",
4
+ "version": "0.15.25",
5
5
  "description": "Openxml plugin for mce",
6
6
  "author": "wxm",
7
7
  "license": "MIT",
@@ -49,7 +49,7 @@
49
49
  "modern-openxml": "^1.10.1"
50
50
  },
51
51
  "devDependencies": {
52
- "mce": "0.15.23"
52
+ "mce": "0.15.25"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "mce": "^0"