mce 0.13.16 → 0.14.1
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/README.md +1 -0
- package/dist/components/Floatbar.vue.d.ts +7 -7
- package/dist/components/Selector.vue.d.ts +152 -0
- package/dist/components/shared/Cropper.vue.d.ts +2 -2
- package/dist/components/shared/Dialog.vue.d.ts +5 -5
- package/dist/components/shared/FloatPanel.vue.d.ts +2 -2
- package/dist/components/shared/Menu.vue.d.ts +1 -1
- package/dist/components/shared/Overlay.vue.d.ts +4 -4
- package/dist/components/shared/Tooltip.vue.d.ts +10 -5
- package/dist/components/shared/Transformable.vue.d.ts +4 -4
- package/dist/composables/overlay.d.ts +2 -2
- package/dist/index.css +115 -40
- package/dist/index.js +224 -95
- package/dist/locale/en.d.ts +1 -0
- package/dist/locale/zh-Hans.d.ts +1 -0
- package/dist/mixins/0.command.d.ts +2 -2
- package/dist/mixins/1.hotkey.d.ts +2 -2
- package/dist/mixins/2.export.d.ts +2 -2
- package/dist/mixins/2.load.d.ts +2 -2
- package/dist/mixins/drawingTool.d.ts +1 -1
- package/dist/plugins/pen.d.ts +1 -0
- package/package.json +5 -5
package/dist/locale/en.d.ts
CHANGED
package/dist/locale/zh-Hans.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Reactive } from 'vue';
|
|
2
2
|
declare global {
|
|
3
3
|
namespace Mce {
|
|
4
4
|
type CommandHandle = (...args: any[]) => any;
|
|
@@ -12,7 +12,7 @@ declare global {
|
|
|
12
12
|
interface Events extends CommandEvents {
|
|
13
13
|
}
|
|
14
14
|
interface Editor {
|
|
15
|
-
commands:
|
|
15
|
+
commands: Reactive<Map<string, Command>>;
|
|
16
16
|
registerCommand: (value: Command | Command[]) => void;
|
|
17
17
|
unregisterCommand: (command: string) => void;
|
|
18
18
|
exec: <K extends keyof Commands>(command: K & string, ...args: Parameters<Commands[K]>) => ReturnType<Commands[K]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Reactive, WritableComputedRef } from 'vue';
|
|
2
2
|
declare global {
|
|
3
3
|
namespace Mce {
|
|
4
4
|
interface Hotkeys {
|
|
@@ -26,7 +26,7 @@ declare global {
|
|
|
26
26
|
}
|
|
27
27
|
interface Editor {
|
|
28
28
|
hotkeysData: WritableComputedRef<HotkeyData[]>;
|
|
29
|
-
hotkeys:
|
|
29
|
+
hotkeys: Reactive<Map<string, Hotkey>>;
|
|
30
30
|
registerHotkey: (value: Hotkey | Hotkey[]) => void;
|
|
31
31
|
unregisterHotkey: (command: string) => void;
|
|
32
32
|
getKbd: (command: string) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Element2D } from 'modern-canvas';
|
|
2
|
-
import type { Ref } from 'vue';
|
|
2
|
+
import type { Reactive, Ref } from 'vue';
|
|
3
3
|
declare global {
|
|
4
4
|
namespace Mce {
|
|
5
5
|
type ExportOnProgress = (progress: number) => void;
|
|
@@ -16,7 +16,7 @@ declare global {
|
|
|
16
16
|
handle: ExporterHandle;
|
|
17
17
|
}
|
|
18
18
|
interface Editor {
|
|
19
|
-
exporters:
|
|
19
|
+
exporters: Reactive<Map<string, Exporter>>;
|
|
20
20
|
registerExporter: (value: Exporter | Exporter[]) => void;
|
|
21
21
|
unregisterExporter: (name: string) => void;
|
|
22
22
|
export: <K extends keyof Exporters>(name: K, options?: ExportOptions) => Exporters[K];
|
package/dist/mixins/2.load.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NormalizedElement } from 'modern-idoc';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Reactive } from 'vue';
|
|
3
3
|
declare global {
|
|
4
4
|
namespace Mce {
|
|
5
5
|
interface Loader {
|
|
@@ -9,7 +9,7 @@ declare global {
|
|
|
9
9
|
load: (source: any) => Promise<NormalizedElement | NormalizedElement[]>;
|
|
10
10
|
}
|
|
11
11
|
interface Editor {
|
|
12
|
-
loaders:
|
|
12
|
+
loaders: Reactive<Map<string, Loader>>;
|
|
13
13
|
registerLoader: (value: Loader | Loader[]) => void;
|
|
14
14
|
unregisterLoader: (name: string) => void;
|
|
15
15
|
canLoad: (source: any) => Promise<boolean>;
|
|
@@ -14,9 +14,9 @@ declare global {
|
|
|
14
14
|
}
|
|
15
15
|
interface Editor {
|
|
16
16
|
drawingTools: Reactive<Map<string, Mce.DrawingTool>>;
|
|
17
|
+
activeDrawingTool: Ref<Mce.DrawingTool>;
|
|
17
18
|
registerDrawingTool: (tool: Mce.DrawingTool | Mce.DrawingTool[]) => void;
|
|
18
19
|
unregisterDrawingTool: (tool: string) => void;
|
|
19
|
-
activeDrawingTool: Ref<Mce.DrawingTool>;
|
|
20
20
|
setActiveDrawingTool: (tool: string | keyof DrawingTools | undefined) => void;
|
|
21
21
|
}
|
|
22
22
|
}
|
package/dist/plugins/pen.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.1",
|
|
5
5
|
"description": "The headless canvas editor framework. 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.9",
|
|
59
|
-
"@vueuse/components": "^14.
|
|
60
|
-
"@vueuse/core": "^14.
|
|
59
|
+
"@vueuse/components": "^14.1.0",
|
|
60
|
+
"@vueuse/core": "^14.1.0",
|
|
61
61
|
"diff": "^8.0.2",
|
|
62
62
|
"file-saver": "^2.0.5",
|
|
63
63
|
"lodash-es": "^4.17.21",
|
|
64
|
-
"modern-canvas": "^0.
|
|
64
|
+
"modern-canvas": "^0.14.3",
|
|
65
65
|
"modern-font": "^0.4.4",
|
|
66
|
-
"modern-idoc": "^0.10.
|
|
66
|
+
"modern-idoc": "^0.10.6",
|
|
67
67
|
"modern-text": "^1.10.4",
|
|
68
68
|
"yjs": "^13.6.27"
|
|
69
69
|
},
|