@mce/svg 0.29.9 → 0.31.0
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 +4 -6
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { definePlugin, matchSource
|
|
1
|
+
import { definePlugin, matchSource } from "mce";
|
|
2
2
|
//#region src/plugin.ts
|
|
3
3
|
function plugin() {
|
|
4
4
|
return definePlugin((editor) => {
|
|
5
|
-
const { to, fonts,
|
|
5
|
+
const { to, fonts, resolveImagePipelines } = editor;
|
|
6
6
|
return {
|
|
7
7
|
name: "mce:svg",
|
|
8
8
|
messages: {
|
|
@@ -44,12 +44,10 @@ function plugin() {
|
|
|
44
44
|
saveAs: (svgString) => new Blob([svgString], { type: "image/svg+xml" }),
|
|
45
45
|
handle: async (options) => {
|
|
46
46
|
const { docToSvgString } = await import("modern-idoc-svg");
|
|
47
|
-
const doc = await to("json", options);
|
|
48
|
-
await materializePipelines(doc, resolvePipelines);
|
|
49
47
|
return await docToSvgString({
|
|
50
|
-
...
|
|
48
|
+
...await to("json", options),
|
|
51
49
|
fonts
|
|
52
|
-
});
|
|
50
|
+
}, { imagePipelineResolver: resolveImagePipelines });
|
|
53
51
|
}
|
|
54
52
|
}]
|
|
55
53
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mce/svg",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.31.0",
|
|
5
5
|
"description": "SVG plugin for mce",
|
|
6
6
|
"author": "wxm",
|
|
7
7
|
"license": "MIT",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"dist"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"modern-idoc-svg": "^0.
|
|
49
|
+
"modern-idoc-svg": "^0.4.0",
|
|
50
50
|
"modern-path2d": "^1.8.5"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"mce": "0.
|
|
53
|
+
"mce": "0.31.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"mce": "^0"
|