@mce/openxml 0.11.2 → 0.11.3
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 +6 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5,7 +5,6 @@ function plugin() {
|
|
|
5
5
|
const {
|
|
6
6
|
log,
|
|
7
7
|
upload,
|
|
8
|
-
config,
|
|
9
8
|
to,
|
|
10
9
|
fonts
|
|
11
10
|
} = editor;
|
|
@@ -31,7 +30,7 @@ function plugin() {
|
|
|
31
30
|
},
|
|
32
31
|
load: async (source) => {
|
|
33
32
|
const presetShapeDefinitions = await import("modern-openxml/presetShapeDefinitions").then((rep) => rep.default);
|
|
34
|
-
const
|
|
33
|
+
const doc = await pptxToDoc(await source.arrayBuffer(), {
|
|
35
34
|
presetShapeDefinitions,
|
|
36
35
|
upload: async (input, meta) => {
|
|
37
36
|
const filename = meta.image;
|
|
@@ -53,16 +52,16 @@ function plugin() {
|
|
|
53
52
|
log("load pptx progress", `${current}/${total}`, cached ? "cached" : "");
|
|
54
53
|
}
|
|
55
54
|
});
|
|
56
|
-
|
|
55
|
+
doc.children?.forEach((child, index) => {
|
|
57
56
|
child.name = `Slide ${index + 1}`;
|
|
58
57
|
child.style ??= {};
|
|
59
58
|
child.style.left = 0;
|
|
60
|
-
child.style.top = Number(child.style.top)
|
|
59
|
+
child.style.top = Number(child.style.top);
|
|
61
60
|
child.meta.inEditorIs = "Frame";
|
|
62
61
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return
|
|
62
|
+
doc.name = source.name;
|
|
63
|
+
doc.meta.inEditorIs = "Doc";
|
|
64
|
+
return doc;
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
67
|
],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mce/openxml",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.3",
|
|
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.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"mce": "0.11.
|
|
52
|
+
"mce": "0.11.3"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"mce": "^0"
|