mce 0.15.28 → 0.15.30
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.css +12 -14
- package/dist/index.js +460 -399
- package/dist/mixins/4.2.frame.d.ts +1 -7
- package/dist/mixins/4.3.element.d.ts +1 -1
- package/dist/plugins/autoNest.d.ts +15 -0
- package/dist/plugins/edit.d.ts +10 -6
- package/dist/plugins/{cancel.d.ts → smartSelection.d.ts} +1 -2
- package/dist/typed-plugins.d.ts +2 -2
- package/package.json +2 -2
- package/dist/plugins/delete.d.ts +0 -12
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import type { Element2D
|
|
1
|
+
import type { Element2D } from 'modern-canvas';
|
|
2
2
|
declare global {
|
|
3
3
|
namespace Mce {
|
|
4
|
-
interface HandleDragOutReparentOptions {
|
|
5
|
-
pointer: Vector2Like;
|
|
6
|
-
parent: Element2D;
|
|
7
|
-
index: number;
|
|
8
|
-
}
|
|
9
4
|
interface Editor {
|
|
10
5
|
findFrame: (target: 'next' | 'previous') => Element2D | undefined;
|
|
11
|
-
handleDragOutReparent: (element: Element2D, context?: HandleDragOutReparentOptions) => void;
|
|
12
6
|
}
|
|
13
7
|
}
|
|
14
8
|
}
|
|
@@ -19,7 +19,7 @@ declare global {
|
|
|
19
19
|
interface Editor {
|
|
20
20
|
addElement: (element: Element, options?: AddElementOptions) => Element2D;
|
|
21
21
|
addElements: (element: Element[], options?: AddElementOptions) => Element2D[];
|
|
22
|
-
resizeElement: (element: Element2D,
|
|
22
|
+
resizeElement: (element: Element2D, newWidth: number, newHeight: number, options?: ResizeElementOptions) => void;
|
|
23
23
|
selectArea: (areaInDrawboard: Aabb2D) => Element2D[];
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Element2D, Vector2Like } from 'modern-canvas';
|
|
2
|
+
declare global {
|
|
3
|
+
namespace Mce {
|
|
4
|
+
interface NestIntoFrameOptions {
|
|
5
|
+
pointer: Vector2Like;
|
|
6
|
+
parent: Element2D;
|
|
7
|
+
index: number;
|
|
8
|
+
}
|
|
9
|
+
interface Commands {
|
|
10
|
+
nestIntoFrame: (element: Element2D, options?: NestIntoFrameOptions) => void;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
declare const _default: import("..").Plugin;
|
|
15
|
+
export default _default;
|
package/dist/plugins/edit.d.ts
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
2
|
declare global {
|
|
3
3
|
namespace Mce {
|
|
4
|
-
interface Hotkeys {
|
|
5
|
-
copy: [event: KeyboardEvent];
|
|
6
|
-
cut: [event: KeyboardEvent];
|
|
7
|
-
paste: [event: KeyboardEvent];
|
|
8
|
-
duplicate: [event: KeyboardEvent];
|
|
9
|
-
}
|
|
10
4
|
type CopySource = string | Blob | Blob[] | Record<string, any>[];
|
|
11
5
|
type PasteSource = DataTransfer | ClipboardItem[];
|
|
12
6
|
interface Commands {
|
|
7
|
+
cancel: () => void;
|
|
8
|
+
delete: () => void;
|
|
13
9
|
copy: (source?: CopySource) => Promise<void>;
|
|
14
10
|
cut: () => Promise<void>;
|
|
15
11
|
paste: (source?: PasteSource) => Promise<void>;
|
|
16
12
|
duplicate: () => void;
|
|
17
13
|
}
|
|
14
|
+
interface Hotkeys {
|
|
15
|
+
cancel: [event: KeyboardEvent];
|
|
16
|
+
delete: [event: KeyboardEvent];
|
|
17
|
+
copy: [event: KeyboardEvent];
|
|
18
|
+
cut: [event: KeyboardEvent];
|
|
19
|
+
paste: [event: KeyboardEvent];
|
|
20
|
+
duplicate: [event: KeyboardEvent];
|
|
21
|
+
}
|
|
18
22
|
interface Editor {
|
|
19
23
|
copiedData: Ref<any | undefined>;
|
|
20
24
|
}
|
package/dist/typed-plugins.d.ts
CHANGED
|
@@ -28,9 +28,8 @@ import './mixins/scroll'
|
|
|
28
28
|
import './mixins/snapshot'
|
|
29
29
|
import './mixins/zoom'
|
|
30
30
|
import './plugins/arrange'
|
|
31
|
-
import './plugins/
|
|
31
|
+
import './plugins/autoNest'
|
|
32
32
|
import './plugins/copyAs'
|
|
33
|
-
import './plugins/delete'
|
|
34
33
|
import './plugins/drawingTool'
|
|
35
34
|
import './plugins/edit'
|
|
36
35
|
import './plugins/frame'
|
|
@@ -60,6 +59,7 @@ import './plugins/selection'
|
|
|
60
59
|
import './plugins/shape'
|
|
61
60
|
import './plugins/slice'
|
|
62
61
|
import './plugins/smartGuides'
|
|
62
|
+
import './plugins/smartSelection'
|
|
63
63
|
import './plugins/state'
|
|
64
64
|
import './plugins/statusbar'
|
|
65
65
|
import './plugins/text'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.15.
|
|
4
|
+
"version": "0.15.30",
|
|
5
5
|
"description": "The headless canvas editor framework. only the ESM.",
|
|
6
6
|
"author": "wxm",
|
|
7
7
|
"license": "MIT",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"lodash-es": "^4.17.22",
|
|
64
64
|
"modern-canvas": "^0.14.39",
|
|
65
65
|
"modern-font": "^0.4.4",
|
|
66
|
-
"modern-idoc": "^0.10.
|
|
66
|
+
"modern-idoc": "^0.10.10",
|
|
67
67
|
"modern-text": "^1.10.15",
|
|
68
68
|
"yjs": "^13.6.29"
|
|
69
69
|
},
|
package/dist/plugins/delete.d.ts
DELETED