mce 0.1.0 → 0.1.2
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/components/ProgressIndicator.vue.d.ts +15 -0
- package/dist/components/Rulers.vue.d.ts +1 -6
- package/dist/components/Selector.vue.d.ts +6 -6
- package/dist/components/shared/Icon.vue.d.ts +24 -0
- package/dist/components/shared/Menu.vue.d.ts +1 -0
- package/dist/components/shared/Ruler.vue.d.ts +14 -4
- package/dist/components/shared/Transformable.vue.d.ts +2 -2
- package/dist/components/timeline/Playhead.vue.d.ts +3 -0
- package/dist/components/timeline/Segment.vue.d.ts +11 -0
- package/dist/components/timeline/Timeline.vue.d.ts +3 -0
- package/dist/components/timeline/Track.vue.d.ts +13 -0
- package/dist/components/timeline/Trackhead.vue.d.ts +7 -0
- package/dist/composables/icon.d.ts +105 -0
- package/dist/composables/icons.d.ts +22 -0
- package/dist/composables/index.d.ts +2 -0
- package/dist/editor.d.ts +21 -2
- package/dist/iconsets/mdi-svg.d.ts +25 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4109 -3509
- package/dist/locale/en.d.ts +75 -0
- package/dist/mixins/0.command.d.ts +23 -0
- package/dist/{plugins → mixins}/0.config/base.d.ts +3 -1
- package/dist/{plugins → mixins}/0.config.d.ts +1 -1
- package/dist/{plugins → mixins}/0.context.d.ts +3 -2
- package/dist/{plugins → mixins}/0.element.d.ts +1 -1
- package/dist/{plugins → mixins}/0.font.d.ts +1 -1
- package/dist/mixins/0.locale.d.ts +22 -0
- package/dist/{plugins → mixins}/1.frame.d.ts +4 -4
- package/dist/{plugins → mixins}/1.hotkey.d.ts +7 -10
- package/dist/mixins/1.timeline.d.ts +18 -0
- package/dist/{plugins → mixins}/1.upload.d.ts +1 -1
- package/dist/{plugins → mixins}/2.box.d.ts +1 -1
- package/dist/mixins/2.export/json.d.ts +25 -0
- package/dist/mixins/2.export.d.ts +28 -0
- package/dist/{plugins/2.loader.d.ts → mixins/2.load.d.ts} +2 -2
- package/dist/mixins/2.loader/json.d.ts +2 -0
- package/dist/{plugins → mixins}/3.view.d.ts +1 -1
- package/dist/{plugins → mixins}/4.0.text.d.ts +1 -1
- package/dist/mixins/4.1.lock.d.ts +12 -0
- package/dist/{plugins → mixins}/4.2.element.d.ts +1 -8
- package/dist/{plugins → mixins}/4.3.frame.d.ts +3 -3
- package/dist/{plugins → mixins}/4.4.doc.d.ts +3 -3
- package/dist/{plugins → mixins}/snapshot.d.ts +1 -1
- package/dist/mixins.d.ts +1 -0
- package/dist/plugins/delete.d.ts +12 -0
- package/dist/plugins/flip.d.ts +2 -2
- package/dist/plugins/{2.exporter/video.d.ts → gif.d.ts} +4 -2
- package/dist/plugins/{insert/image.d.ts → image.d.ts} +6 -1
- package/dist/plugins/layerOrder.d.ts +19 -0
- package/dist/plugins/{4.1.lock.d.ts → lock.d.ts} +0 -6
- package/dist/plugins/menu.d.ts +2 -3
- package/dist/plugins/{theme.d.ts → mp4.d.ts} +2 -1
- package/dist/plugins/{2.exporter/pdf.d.ts → pdf.d.ts} +1 -1
- package/dist/plugins/{2.exporter/pptx.d.ts → pptx.d.ts} +1 -1
- package/dist/plugins/saveAs.d.ts +1 -4
- package/dist/plugins/{insert/text.d.ts → text.d.ts} +1 -1
- package/dist/plugins/url.d.ts +2 -0
- package/dist/plugins/view.d.ts +18 -0
- package/dist/plugins.d.ts +1 -0
- package/dist/typed-global.d.ts +3 -1
- package/dist/typed-plugins.d.ts +35 -35
- package/package.json +25 -48
- package/dist/plugins/0.command.d.ts +0 -27
- package/dist/plugins/0.i18n.d.ts +0 -13
- package/dist/plugins/2.exporter/0.json.d.ts +0 -10
- package/dist/plugins/2.exporter/image.d.ts +0 -11
- package/dist/plugins/2.exporter.d.ts +0 -27
- package/dist/plugins/2.loader/0.url.d.ts +0 -2
- package/dist/plugins/2.loader/image.d.ts +0 -2
- package/dist/plugins/2.loader/json.d.ts +0 -2
- package/dist/plugins/2.loader/pptx.d.ts +0 -2
- package/dist/plugins/2.loader/txt.d.ts +0 -2
- package/dist/plugins/arrange.d.ts +0 -19
- package/dist/preset-plugins.d.ts +0 -1
- /package/dist/components/{Starter.vue.d.ts → Setup.vue.d.ts} +0 -0
- /package/dist/plugins/{align.d.ts → layerPosition.d.ts} +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
cancel: string;
|
|
3
|
+
constrainToAxis: string;
|
|
4
|
+
loading: string;
|
|
5
|
+
selecting: string;
|
|
6
|
+
selectObject: string;
|
|
7
|
+
commitChanges: string;
|
|
8
|
+
extend: string;
|
|
9
|
+
goBackSelectedArea: string;
|
|
10
|
+
selectArea: string;
|
|
11
|
+
dragSelected: string;
|
|
12
|
+
file: string;
|
|
13
|
+
new: string;
|
|
14
|
+
open: string;
|
|
15
|
+
preferences: string;
|
|
16
|
+
import: string;
|
|
17
|
+
export: string;
|
|
18
|
+
'saveAs:png': string;
|
|
19
|
+
'saveAs:jpeg': string;
|
|
20
|
+
'saveAs:webp': string;
|
|
21
|
+
'saveAs:svg': string;
|
|
22
|
+
'saveAs:gif': string;
|
|
23
|
+
'saveAs:mp4': string;
|
|
24
|
+
'saveAs:pdf': string;
|
|
25
|
+
'saveAs:pptx': string;
|
|
26
|
+
'saveAs:json': string;
|
|
27
|
+
edit: string;
|
|
28
|
+
undo: string;
|
|
29
|
+
redo: string;
|
|
30
|
+
cut: string;
|
|
31
|
+
copy: string;
|
|
32
|
+
paste: string;
|
|
33
|
+
duplicate: string;
|
|
34
|
+
delete: string;
|
|
35
|
+
selectAll: string;
|
|
36
|
+
deselectAll: string;
|
|
37
|
+
selectParent: string;
|
|
38
|
+
previousSelection: string;
|
|
39
|
+
nextSelection: string;
|
|
40
|
+
view: string;
|
|
41
|
+
'view:checkerboard': string;
|
|
42
|
+
'view:pixelGrid': string;
|
|
43
|
+
'view:ruler': string;
|
|
44
|
+
'view:scrollbar': string;
|
|
45
|
+
'view:timeline': string;
|
|
46
|
+
'view:statusbar': string;
|
|
47
|
+
'view:frameOutline': string;
|
|
48
|
+
zoom: string;
|
|
49
|
+
zoomIn: string;
|
|
50
|
+
zoomOut: string;
|
|
51
|
+
zoomTo100: string;
|
|
52
|
+
zoomToFit: string;
|
|
53
|
+
zoomToSelection: string;
|
|
54
|
+
object: string;
|
|
55
|
+
'frame/unframe': string;
|
|
56
|
+
'group/ungroup': string;
|
|
57
|
+
flip: string;
|
|
58
|
+
flipHorizontal: string;
|
|
59
|
+
flipVertical: string;
|
|
60
|
+
'hide/show': string;
|
|
61
|
+
'lock/unlock': string;
|
|
62
|
+
layerOrder: string;
|
|
63
|
+
bringToFront: string;
|
|
64
|
+
bringForward: string;
|
|
65
|
+
sendBackward: string;
|
|
66
|
+
sendToBack: string;
|
|
67
|
+
layerPosition: string;
|
|
68
|
+
alignLeft: string;
|
|
69
|
+
alignHorizontalCenter: string;
|
|
70
|
+
alignRight: string;
|
|
71
|
+
alignTop: string;
|
|
72
|
+
alignVerticalCenter: string;
|
|
73
|
+
alignBottom: string;
|
|
74
|
+
};
|
|
75
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
declare global {
|
|
3
|
+
namespace Mce {
|
|
4
|
+
type CommandHandle = (...args: any[]) => any;
|
|
5
|
+
interface Command {
|
|
6
|
+
command: string;
|
|
7
|
+
handle: CommandHandle;
|
|
8
|
+
}
|
|
9
|
+
type CommandEvents = {
|
|
10
|
+
[K in keyof Commands as `command:${K}`]: [ReturnType<Commands[K]>];
|
|
11
|
+
};
|
|
12
|
+
interface Events extends CommandEvents {
|
|
13
|
+
}
|
|
14
|
+
interface Editor {
|
|
15
|
+
commands: Ref<Map<string, Command>>;
|
|
16
|
+
registerCommand: (value: Command | Command[]) => void;
|
|
17
|
+
unregisterCommand: (command: string) => void;
|
|
18
|
+
exec: <K extends keyof Commands>(command: K & string, ...args: Parameters<Commands[K]>) => ReturnType<Commands[K]>;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
declare const _default: import("..").Mixin;
|
|
23
|
+
export default _default;
|
|
@@ -17,8 +17,10 @@ declare global {
|
|
|
17
17
|
ruler: boolean;
|
|
18
18
|
scrollbar: boolean;
|
|
19
19
|
bottombar: boolean;
|
|
20
|
+
timeline: boolean;
|
|
20
21
|
statusbar: boolean;
|
|
21
22
|
wheelZoom: boolean;
|
|
23
|
+
frameOutline: boolean;
|
|
22
24
|
frameGap: number;
|
|
23
25
|
typographyStrategy: TypographyStrategy;
|
|
24
26
|
handleShape: HandleShape;
|
|
@@ -26,5 +28,5 @@ declare global {
|
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
|
-
declare const _default: import("../..").
|
|
31
|
+
declare const _default: import("../..").Mixin;
|
|
30
32
|
export default _default;
|
|
@@ -2,13 +2,14 @@ import type { Cursor, Node, Vector2Data } from 'modern-canvas';
|
|
|
2
2
|
import type { ComputedRef, Ref } from 'vue';
|
|
3
3
|
import type { Doc, Workspace } from '../models';
|
|
4
4
|
import type { AxisAlignedBoundingBox } from '../types';
|
|
5
|
-
import { Camera2D, DrawboardEffect, Engine } from 'modern-canvas';
|
|
5
|
+
import { Camera2D, DrawboardEffect, Engine, Timeline } from 'modern-canvas';
|
|
6
6
|
import { Fonts } from 'modern-font';
|
|
7
7
|
declare global {
|
|
8
8
|
namespace Mce {
|
|
9
9
|
interface Editor {
|
|
10
10
|
fonts: Fonts;
|
|
11
11
|
renderEngine: Ref<Engine>;
|
|
12
|
+
timeline: Ref<Timeline>;
|
|
12
13
|
camera: Ref<Camera2D>;
|
|
13
14
|
drawboardEffect: Ref<DrawboardEffect>;
|
|
14
15
|
setCursor: (mode: Cursor | undefined) => void;
|
|
@@ -28,5 +29,5 @@ declare global {
|
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
|
-
declare const _default: import("..").
|
|
32
|
+
declare const _default: import("..").Mixin;
|
|
32
33
|
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Mce {
|
|
3
|
+
type Translation = (key: string, fallback?: string) => string;
|
|
4
|
+
interface Editor {
|
|
5
|
+
t: Translation;
|
|
6
|
+
}
|
|
7
|
+
interface LocaleMessages {
|
|
8
|
+
[key: string]: LocaleMessages | string;
|
|
9
|
+
}
|
|
10
|
+
interface Locale {
|
|
11
|
+
locale?: string;
|
|
12
|
+
fallback?: string;
|
|
13
|
+
messages?: LocaleMessages;
|
|
14
|
+
}
|
|
15
|
+
interface Options {
|
|
16
|
+
t?: Translation;
|
|
17
|
+
locale?: Locale;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
declare const _default: import("..").Mixin;
|
|
22
|
+
export default _default;
|
|
@@ -12,13 +12,13 @@ declare global {
|
|
|
12
12
|
interface Editor {
|
|
13
13
|
frameThumbs: Ref<FrameThumb[]>;
|
|
14
14
|
frames: ComputedRef<Element2D[]>;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
currentFrameIndex: Ref<number>;
|
|
16
|
+
currentFrame: ComputedRef<Element2D | undefined>;
|
|
17
|
+
currentFrameAabb: ComputedRef<AxisAlignedBoundingBox>;
|
|
18
18
|
isFrame: (node: Node) => node is Element2D;
|
|
19
19
|
getAncestorFrame: (element?: Element2D) => Element2D | undefined;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
declare const _default: import("..").
|
|
23
|
+
declare const _default: import("..").Mixin;
|
|
24
24
|
export default _default;
|
|
@@ -13,27 +13,24 @@ declare global {
|
|
|
13
13
|
hotkeys: HotkeyData[];
|
|
14
14
|
}
|
|
15
15
|
interface HotkeyData {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
command: string;
|
|
17
|
+
key: string | string[];
|
|
18
18
|
editable?: boolean;
|
|
19
19
|
enabled?: boolean;
|
|
20
20
|
system?: boolean;
|
|
21
21
|
}
|
|
22
22
|
interface Hotkey extends HotkeyData {
|
|
23
|
-
|
|
23
|
+
when?: (e: KeyboardEvent) => boolean;
|
|
24
24
|
handle?: (e: KeyboardEvent) => void;
|
|
25
25
|
}
|
|
26
26
|
interface Editor {
|
|
27
27
|
hotkeysData: WritableComputedRef<HotkeyData[]>;
|
|
28
28
|
hotkeys: Ref<Map<string, Hotkey>>;
|
|
29
|
-
registerHotkey:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
unregisterHotkey: (key: string) => void;
|
|
34
|
-
getKbd: (key: string | keyof Hotkeys) => string;
|
|
29
|
+
registerHotkey: (value: Hotkey | Hotkey[]) => void;
|
|
30
|
+
unregisterHotkey: (command: string) => void;
|
|
31
|
+
getKbd: (command: string) => string;
|
|
35
32
|
}
|
|
36
33
|
}
|
|
37
34
|
}
|
|
38
|
-
declare const _default: import("..").
|
|
35
|
+
declare const _default: import("..").Mixin;
|
|
39
36
|
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Node } from 'modern-canvas';
|
|
2
|
+
import type { ComputedRef, Ref, WritableComputedRef } from 'vue';
|
|
3
|
+
declare global {
|
|
4
|
+
namespace Mce {
|
|
5
|
+
interface Editor {
|
|
6
|
+
msPerPx: Ref<number>;
|
|
7
|
+
currentTime: WritableComputedRef<number>;
|
|
8
|
+
startTime: ComputedRef<number>;
|
|
9
|
+
endTime: ComputedRef<number>;
|
|
10
|
+
getTimeRange: (node: Node | Node[]) => {
|
|
11
|
+
startTime: number;
|
|
12
|
+
endTime: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
declare const _default: import("..").Mixin;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { NormalizedElement } from 'modern-idoc';
|
|
2
|
+
declare global {
|
|
3
|
+
namespace Mce {
|
|
4
|
+
interface JsonData {
|
|
5
|
+
style: {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
scaleX: number;
|
|
9
|
+
scaleY: number;
|
|
10
|
+
};
|
|
11
|
+
children: NormalizedElement[];
|
|
12
|
+
meta: {
|
|
13
|
+
inPptIs: 'Pptx';
|
|
14
|
+
inCanvasIs: 'Node2D';
|
|
15
|
+
startTime: number;
|
|
16
|
+
endTime: number;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
interface Exporters {
|
|
20
|
+
json: JsonData;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
declare const _default: import("../..").Mixin;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Element2D } from 'modern-canvas';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
|
+
declare global {
|
|
4
|
+
namespace Mce {
|
|
5
|
+
type ExportOnProgress = (progress: number) => void;
|
|
6
|
+
interface ExportOptions {
|
|
7
|
+
scale?: number;
|
|
8
|
+
selected?: boolean | Element2D[];
|
|
9
|
+
onProgress?: ExportOnProgress;
|
|
10
|
+
}
|
|
11
|
+
type ExporterHandle = (options: ExportOptions) => any | Promise<any>;
|
|
12
|
+
interface Exporter {
|
|
13
|
+
name: string;
|
|
14
|
+
handle: ExporterHandle;
|
|
15
|
+
}
|
|
16
|
+
interface Editor {
|
|
17
|
+
exporters: Ref<Map<string, Exporter>>;
|
|
18
|
+
registerExporter: (value: Exporter | Exporter[]) => void;
|
|
19
|
+
unregisterExporter: (name: string) => void;
|
|
20
|
+
export: <K extends keyof Exporters>(name: K, options?: ExportOptions) => Exporters[K];
|
|
21
|
+
to: <K extends keyof Exporters>(name: K, options?: ExportOptions) => Exporters[K];
|
|
22
|
+
exporting: Ref<boolean>;
|
|
23
|
+
exportProgress: Ref<number>;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
declare const _default: import("..").Mixin;
|
|
28
|
+
export default _default;
|
|
@@ -10,7 +10,7 @@ declare global {
|
|
|
10
10
|
}
|
|
11
11
|
interface Editor {
|
|
12
12
|
loaders: Ref<Map<string, Loader>>;
|
|
13
|
-
registerLoader: (
|
|
13
|
+
registerLoader: (value: Loader | Loader[]) => void;
|
|
14
14
|
unregisterLoader: (name: string) => void;
|
|
15
15
|
load: <T = NormalizedElement>(source: any) => Promise<T>;
|
|
16
16
|
openFileDialog: (options?: {
|
|
@@ -19,5 +19,5 @@ declare global {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
declare const _default: import("..").
|
|
22
|
+
declare const _default: import("..").Mixin;
|
|
23
23
|
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Element2D } from 'modern-canvas';
|
|
2
|
+
declare global {
|
|
3
|
+
namespace Mce {
|
|
4
|
+
interface Editor {
|
|
5
|
+
isLock: (element: Element2D) => boolean;
|
|
6
|
+
lock: (element: Element2D) => void;
|
|
7
|
+
unlock: (element: Element2D) => void;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
declare const _default: import("..").Mixin;
|
|
12
|
+
export default _default;
|
|
@@ -27,19 +27,12 @@ declare global {
|
|
|
27
27
|
getElement: (id: string) => Element2D | undefined;
|
|
28
28
|
resizeElement: (element: Element2D, width: number, height: number, options?: ResizeElementOptions) => void;
|
|
29
29
|
pointerActivateElement: (element: Element2D | undefined, event?: MouseEvent | PointerEvent) => void;
|
|
30
|
-
deleteCurrentElements: () => void;
|
|
31
30
|
selectArea: (areaInDrawboard: AxisAlignedBoundingBox) => Element2D[];
|
|
32
31
|
}
|
|
33
32
|
interface Events {
|
|
34
33
|
addElement: [element: Element2D[]];
|
|
35
34
|
}
|
|
36
|
-
interface Hotkeys {
|
|
37
|
-
delete: [event: KeyboardEvent];
|
|
38
|
-
}
|
|
39
|
-
interface Commands {
|
|
40
|
-
delete: () => void;
|
|
41
|
-
}
|
|
42
35
|
}
|
|
43
36
|
}
|
|
44
|
-
declare const _default: import("..").
|
|
37
|
+
declare const _default: import("..").Mixin;
|
|
45
38
|
export default _default;
|
|
@@ -6,16 +6,16 @@ declare global {
|
|
|
6
6
|
duplicateFrame: (index?: number) => void;
|
|
7
7
|
moveFrame: (fromIndex: number, toIndex: number) => void;
|
|
8
8
|
deleteFrame: (index?: number) => void;
|
|
9
|
-
|
|
9
|
+
setCurrentFrame: (index?: number) => void;
|
|
10
10
|
}
|
|
11
11
|
interface Events {
|
|
12
12
|
addFrame: [index: number];
|
|
13
13
|
duplicateFrame: [index: number];
|
|
14
14
|
moveFrame: [fromIndex: number, toIndex: number];
|
|
15
15
|
deleteFrame: [index: number];
|
|
16
|
-
|
|
16
|
+
setCurrentFrame: [index: number, oldIndex: number];
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
declare const _default: import("..").
|
|
20
|
+
declare const _default: import("..").Mixin;
|
|
21
21
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Document
|
|
1
|
+
import type { Document } from 'modern-idoc';
|
|
2
2
|
import { Doc } from '../models';
|
|
3
3
|
declare global {
|
|
4
4
|
namespace Mce {
|
|
5
5
|
interface Editor {
|
|
6
|
-
getDoc: () =>
|
|
6
|
+
getDoc: () => JsonData;
|
|
7
7
|
setDoc: (doc: Document | string) => Promise<Doc>;
|
|
8
8
|
loadDoc: (source: any) => Promise<Doc>;
|
|
9
9
|
clearDoc: () => void;
|
|
@@ -19,5 +19,5 @@ declare global {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
declare const _default: import("..").
|
|
22
|
+
declare const _default: import("..").Mixin;
|
|
23
23
|
export default _default;
|
package/dist/mixins.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mixins: import("./editor").Mixin[];
|
package/dist/plugins/flip.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
namespace Mce {
|
|
3
|
+
interface Options {
|
|
4
|
+
gifWorkerUrl?: string;
|
|
5
|
+
}
|
|
3
6
|
interface Exporters {
|
|
4
7
|
gif: Blob;
|
|
5
|
-
mp4: Blob;
|
|
6
8
|
}
|
|
7
9
|
}
|
|
8
10
|
}
|
|
9
|
-
declare const _default: import("
|
|
11
|
+
declare const _default: import("..").Plugin;
|
|
10
12
|
export default _default;
|
|
@@ -7,7 +7,12 @@ declare global {
|
|
|
7
7
|
insertImage: (url: string, options?: InsertImageOptions) => Promise<Element2D>;
|
|
8
8
|
drawImage: () => void;
|
|
9
9
|
}
|
|
10
|
+
interface Exporters {
|
|
11
|
+
png: Blob;
|
|
12
|
+
jpeg: Blob;
|
|
13
|
+
webp: Blob;
|
|
14
|
+
}
|
|
10
15
|
}
|
|
11
16
|
}
|
|
12
|
-
declare const _default: import("
|
|
17
|
+
declare const _default: import("..").Plugin;
|
|
13
18
|
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Element2D } from 'modern-canvas';
|
|
2
|
+
declare global {
|
|
3
|
+
namespace Mce {
|
|
4
|
+
interface Hotkeys {
|
|
5
|
+
bringToFront: [event: KeyboardEvent];
|
|
6
|
+
bringForward: [event: KeyboardEvent];
|
|
7
|
+
sendBackward: [event: KeyboardEvent];
|
|
8
|
+
sendToBack: [event: KeyboardEvent];
|
|
9
|
+
}
|
|
10
|
+
interface Commands {
|
|
11
|
+
bringToFront: (target?: Element2D | Element2D[]) => void;
|
|
12
|
+
bringForward: (target?: Element2D) => void;
|
|
13
|
+
sendBackward: (target?: Element2D) => void;
|
|
14
|
+
sendToBack: (target?: Element2D | Element2D[]) => void;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import("..").Plugin;
|
|
19
|
+
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Element2D } from 'modern-canvas';
|
|
2
1
|
declare global {
|
|
3
2
|
namespace Mce {
|
|
4
3
|
interface Commands {
|
|
@@ -9,11 +8,6 @@ declare global {
|
|
|
9
8
|
interface Hotkeys {
|
|
10
9
|
'lock/unlock': [event: KeyboardEvent];
|
|
11
10
|
}
|
|
12
|
-
interface Editor {
|
|
13
|
-
isLocked: (element: Element2D) => boolean;
|
|
14
|
-
lock: (element: Element2D) => void;
|
|
15
|
-
unlock: (element: Element2D) => void;
|
|
16
|
-
}
|
|
17
11
|
}
|
|
18
12
|
}
|
|
19
13
|
declare const _default: import("..").Plugin;
|
package/dist/plugins/menu.d.ts
CHANGED
|
@@ -2,10 +2,9 @@ import type { ComputedRef } from 'vue';
|
|
|
2
2
|
declare global {
|
|
3
3
|
namespace Mce {
|
|
4
4
|
interface Editor {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
mainMenu: ComputedRef<any[]>;
|
|
6
|
+
contextMenu: ComputedRef<any[]>;
|
|
7
7
|
}
|
|
8
|
-
type MenuKey = 'edit' | 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'duplicate' | 'delete' | 'layer' | 'frame/unframe' | 'group/ungroup' | 'hide/show' | 'lock/unlock' | 'arrange' | 'raiseToFront' | 'raise' | 'lower' | 'lowerToBack' | 'flip' | 'flipX' | 'flipY' | 'align' | 'alignLeft' | 'alignHorizontalCenter' | 'alignRight' | 'alignTop' | 'alignVerticalCenter' | 'alignBottom';
|
|
9
8
|
}
|
|
10
9
|
}
|
|
11
10
|
declare const _default: import("..").Plugin;
|
package/dist/plugins/saveAs.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
namespace Mce {
|
|
3
|
-
interface SaveAsOptions extends
|
|
3
|
+
interface SaveAsOptions extends ExportOptions {
|
|
4
4
|
filename?: string;
|
|
5
5
|
}
|
|
6
6
|
interface Commands {
|
|
7
7
|
saveAs: (type: keyof Exporters, options?: SaveAsOptions) => Promise<void>;
|
|
8
8
|
}
|
|
9
|
-
interface Editor {
|
|
10
|
-
saveAs: (type: keyof Exporters, options?: SaveAsOptions) => Promise<void>;
|
|
11
|
-
}
|
|
12
9
|
}
|
|
13
10
|
}
|
|
14
11
|
declare const _default: import("..").Plugin;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Mce {
|
|
3
|
+
interface Views {
|
|
4
|
+
checkerboard: [];
|
|
5
|
+
pixelGrid: [];
|
|
6
|
+
ruler: [];
|
|
7
|
+
scrollbar: [];
|
|
8
|
+
timeline: [];
|
|
9
|
+
statusbar: [];
|
|
10
|
+
frameOutline: [];
|
|
11
|
+
}
|
|
12
|
+
interface Commands {
|
|
13
|
+
view: <T extends keyof Views>(view: T, ...args: Views[T]) => Promise<boolean>;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
declare const _default: import("..").Plugin;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const plugins: import("./editor").Plugin[];
|