mce 0.17.12 → 0.18.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.
@@ -1,8 +1,10 @@
1
- import type { Assets, Cursor, Vector2Like } from 'modern-canvas';
1
+ import type { Assets, Cursor } from 'modern-canvas';
2
+ import type { Vector2Like } from 'modern-path2d';
2
3
  import type { IndexCharacter as _IndexCharacter } from 'modern-text/web-components';
3
4
  import type { Ref } from 'vue';
4
- import { Aabb2D, Camera2D, DrawboardEffect, Element2D, Engine, Node, Timeline, Vector2 } from 'modern-canvas';
5
+ import { Aabb2D, Camera2D, DrawboardEffect, Element2D, Engine, Node, Timeline } from 'modern-canvas';
5
6
  import { Fonts } from 'modern-font';
7
+ import { Vector2 } from 'modern-path2d';
6
8
  import { Doc } from '../scene';
7
9
  declare global {
8
10
  namespace Mce {
@@ -7,7 +7,7 @@ declare global {
7
7
  waitUntilFontLoad: () => Promise<void>;
8
8
  }
9
9
  interface Events {
10
- loadFont: [font: FontLoadedResult];
10
+ fontLoaded: [font: FontLoadedResult];
11
11
  }
12
12
  }
13
13
  }
@@ -1,5 +1,6 @@
1
- import type { Element2D, Vector2Like } from 'modern-canvas';
1
+ import type { Element2D } from 'modern-canvas';
2
2
  import type { Element } from 'modern-idoc';
3
+ import type { Vector2Like } from 'modern-path2d';
3
4
  import { Node } from 'modern-canvas';
4
5
  declare global {
5
6
  namespace Mce {
@@ -1,4 +1,4 @@
1
- import type { Vector2Like } from 'modern-canvas';
1
+ import type { Vector2Like } from 'modern-path2d';
2
2
  import type { Reactive } from 'vue';
3
3
  declare global {
4
4
  namespace Mce {
@@ -1,4 +1,4 @@
1
- import type { Vector2Like } from 'modern-canvas';
1
+ import type { Vector2Like } from 'modern-path2d';
2
2
  import type { Reactive, Ref } from 'vue';
3
3
  declare global {
4
4
  namespace Mce {
@@ -1,4 +1,5 @@
1
- import type { Element2D, Vector2Like } from 'modern-canvas';
1
+ import type { Element2D } from 'modern-canvas';
2
+ import type { Vector2Like } from 'modern-path2d';
2
3
  declare global {
3
4
  namespace Mce {
4
5
  interface NestIntoFrameOptions {
@@ -1,4 +1,5 @@
1
1
  import type { Element } from 'modern-idoc';
2
+ import type * as Y from 'yjs';
2
3
  import { Doc } from '../scene';
3
4
  declare global {
4
5
  namespace Mce {
@@ -34,11 +35,12 @@ declare global {
34
35
  openDoc: [event: KeyboardEvent];
35
36
  }
36
37
  interface Events {
37
- setDoc: [doc: Doc, oldDoc: Doc];
38
- docLoading: [source: any];
38
+ docSet: [doc: Doc, oldDoc: Doc];
39
+ docLoadStart: [source: any];
39
40
  docLoaded: [source: any, root: Doc | Error];
40
- clearDoc: [];
41
- updateDoc: [update: Uint8Array, origin: any];
41
+ docCleared: [];
42
+ docUpdated: [update: Uint8Array, origin: any];
43
+ historyChanged: [arg0: Y.UndoManager];
42
44
  }
43
45
  }
44
46
  }
@@ -45,9 +45,9 @@ declare global {
45
45
  }) => void;
46
46
  }
47
47
  interface Events {
48
- selectionTransformStart: [context: TransformContext];
49
- selectionTransform: [context: TransformContext];
50
- selectionTransformEnd: [context: TransformContext];
48
+ selectionTransformStarted: [context: TransformContext];
49
+ selectionTransformed: [context: TransformContext];
50
+ selectionTransformEnded: [context: TransformContext];
51
51
  }
52
52
  }
53
53
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mce",
3
3
  "type": "module",
4
- "version": "0.17.12",
4
+ "version": "0.18.0",
5
5
  "description": "A headless infinite canvas editor framework built on WebGL rendering, supports exporting to image, video, and PPT. Only the ESM.",
6
6
  "author": "wxm",
7
7
  "license": "MIT",
@@ -56,14 +56,14 @@
56
56
  ],
57
57
  "dependencies": {
58
58
  "@floating-ui/vue": "^1.1.11",
59
- "@vueuse/components": "^14.2.1",
60
- "@vueuse/core": "^14.2.1",
61
- "diff": "^8.0.4",
59
+ "@vueuse/components": "^14.3.0",
60
+ "@vueuse/core": "^14.3.0",
61
+ "diff": "^9.0.0",
62
62
  "lodash-es": "^4.18.1",
63
- "modern-canvas": "^0.15.9",
63
+ "modern-canvas": "^0.17.1",
64
64
  "modern-font": "^0.5.0",
65
- "modern-idoc": "^0.10.21",
66
- "modern-text": "^1.10.17",
65
+ "modern-idoc": "^0.11.3",
66
+ "modern-text": "^1.11.0",
67
67
  "y-protocols": "^1.0.7",
68
68
  "yjs": "^13.6.30"
69
69
  },
@@ -86,10 +86,10 @@
86
86
  },
87
87
  "devDependencies": {
88
88
  "@types/lodash-es": "^4.17.12",
89
- "@vitejs/plugin-vue": "^6.0.5",
90
- "jiti": "^2.6.1",
89
+ "@vitejs/plugin-vue": "^6.0.6",
90
+ "jiti": "^2.7.0",
91
91
  "sass-embedded": "^1.99.0",
92
- "typedoc": "^0.28.18",
92
+ "typedoc": "^0.28.19",
93
93
  "typedoc-plugin-markdown": "^4.11.0"
94
94
  },
95
95
  "scripts": {