@mce/svg 0.24.2 → 0.24.4

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,6 +1,4 @@
1
1
  import { definePlugin } from "mce";
2
- import { docToSvgString } from "modern-idoc-svg";
3
- import { svgToPath2DSet } from "modern-path2d";
4
2
  //#region src/plugin.ts
5
3
  function plugin() {
6
4
  return definePlugin((editor) => {
@@ -25,6 +23,7 @@ function plugin() {
25
23
  return false;
26
24
  },
27
25
  load: async (source) => {
26
+ const { svgToPath2DSet } = await import("modern-path2d");
28
27
  const set = svgToPath2DSet(await source.text());
29
28
  const box = set.getBoundingBox();
30
29
  return {
@@ -50,6 +49,7 @@ function plugin() {
50
49
  copyAs: (svgString) => [new Blob([svgString], { type: "text/plain" }), new Blob([svgString], { type: "image/svg+xml" })],
51
50
  saveAs: (svgString) => new Blob([svgString], { type: "image/svg+xml" }),
52
51
  handle: async (options) => {
52
+ const { docToSvgString } = await import("modern-idoc-svg");
53
53
  return await docToSvgString({
54
54
  ...await to("json", options),
55
55
  fonts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mce/svg",
3
3
  "type": "module",
4
- "version": "0.24.2",
4
+ "version": "0.24.4",
5
5
  "description": "SVG plugin for mce",
6
6
  "author": "wxm",
7
7
  "license": "MIT",
@@ -50,7 +50,7 @@
50
50
  "modern-path2d": "^1.8.5"
51
51
  },
52
52
  "devDependencies": {
53
- "mce": "0.24.2"
53
+ "mce": "0.24.4"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "mce": "^0"