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
package/dist/typed-plugins.d.ts
CHANGED
|
@@ -2,56 +2,56 @@
|
|
|
2
2
|
/* prettier-ignore */
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
// Generated by script. ‼️ DO NOT MODIFY THIS FILE ‼️
|
|
5
|
-
import './
|
|
6
|
-
import './
|
|
7
|
-
import './
|
|
8
|
-
import './
|
|
9
|
-
import './
|
|
10
|
-
import './
|
|
11
|
-
import './
|
|
12
|
-
import './
|
|
13
|
-
import './
|
|
14
|
-
import './
|
|
15
|
-
import './
|
|
16
|
-
import './
|
|
17
|
-
import './
|
|
18
|
-
import './
|
|
19
|
-
import './
|
|
20
|
-
import './
|
|
21
|
-
import './
|
|
22
|
-
import './
|
|
23
|
-
import './
|
|
24
|
-
import './
|
|
25
|
-
import './
|
|
26
|
-
import './
|
|
27
|
-
import './
|
|
28
|
-
import './plugins/3.view'
|
|
29
|
-
import './plugins/4.0.text'
|
|
30
|
-
import './plugins/4.1.lock'
|
|
31
|
-
import './plugins/4.2.element'
|
|
32
|
-
import './plugins/4.3.frame'
|
|
33
|
-
import './plugins/4.4.doc'
|
|
34
|
-
import './plugins/align'
|
|
35
|
-
import './plugins/arrange'
|
|
5
|
+
import './mixins/0.command'
|
|
6
|
+
import './mixins/0.config'
|
|
7
|
+
import './mixins/0.config/base'
|
|
8
|
+
import './mixins/0.context'
|
|
9
|
+
import './mixins/0.element'
|
|
10
|
+
import './mixins/0.font'
|
|
11
|
+
import './mixins/0.locale'
|
|
12
|
+
import './mixins/1.frame'
|
|
13
|
+
import './mixins/1.hotkey'
|
|
14
|
+
import './mixins/1.timeline'
|
|
15
|
+
import './mixins/1.upload'
|
|
16
|
+
import './mixins/2.box'
|
|
17
|
+
import './mixins/2.export'
|
|
18
|
+
import './mixins/2.export/json'
|
|
19
|
+
import './mixins/2.load'
|
|
20
|
+
import './mixins/2.loader/json'
|
|
21
|
+
import './mixins/3.view'
|
|
22
|
+
import './mixins/4.0.text'
|
|
23
|
+
import './mixins/4.1.lock'
|
|
24
|
+
import './mixins/4.2.element'
|
|
25
|
+
import './mixins/4.3.frame'
|
|
26
|
+
import './mixins/4.4.doc'
|
|
27
|
+
import './mixins/snapshot'
|
|
36
28
|
import './plugins/auxiliary'
|
|
37
29
|
import './plugins/clipboard'
|
|
30
|
+
import './plugins/delete'
|
|
38
31
|
import './plugins/flip'
|
|
39
32
|
import './plugins/frame'
|
|
33
|
+
import './plugins/gif'
|
|
40
34
|
import './plugins/group'
|
|
41
35
|
import './plugins/history'
|
|
36
|
+
import './plugins/image'
|
|
42
37
|
import './plugins/import'
|
|
43
|
-
import './plugins/
|
|
44
|
-
import './plugins/
|
|
38
|
+
import './plugins/layerOrder'
|
|
39
|
+
import './plugins/layerPosition'
|
|
40
|
+
import './plugins/lock'
|
|
45
41
|
import './plugins/menu'
|
|
46
42
|
import './plugins/move'
|
|
43
|
+
import './plugins/mp4'
|
|
47
44
|
import './plugins/new'
|
|
48
45
|
import './plugins/open'
|
|
46
|
+
import './plugins/pdf'
|
|
47
|
+
import './plugins/pptx'
|
|
49
48
|
import './plugins/preference'
|
|
50
49
|
import './plugins/saveAs'
|
|
51
50
|
import './plugins/select'
|
|
52
|
-
import './plugins/
|
|
53
|
-
import './plugins/theme'
|
|
51
|
+
import './plugins/text'
|
|
54
52
|
import './plugins/ui'
|
|
53
|
+
import './plugins/url'
|
|
54
|
+
import './plugins/view'
|
|
55
55
|
import './plugins/visibility'
|
|
56
56
|
import './plugins/zoom'
|
|
57
57
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"
|
|
6
|
-
"description": "Modern canvas editor, based modern-canvas and Vue.js. only the ESM.",
|
|
4
|
+
"version": "0.1.2",
|
|
5
|
+
"description": "The headless canvas editor framework. only the ESM.",
|
|
7
6
|
"author": "wxm",
|
|
8
7
|
"license": "MIT",
|
|
9
8
|
"homepage": "https://github.com/qq15725/mce",
|
|
@@ -55,19 +54,18 @@
|
|
|
55
54
|
"files": [
|
|
56
55
|
"dist"
|
|
57
56
|
],
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"prepare": "simple-git-hooks"
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@floating-ui/vue": "^1.1.9",
|
|
59
|
+
"@vueuse/components": "^14.0.0",
|
|
60
|
+
"@vueuse/core": "^14.0.0",
|
|
61
|
+
"diff": "^8.0.2",
|
|
62
|
+
"file-saver": "^2.0.5",
|
|
63
|
+
"lodash-es": "^4.17.21",
|
|
64
|
+
"modern-canvas": "^0.12.15",
|
|
65
|
+
"modern-font": "^0.4.4",
|
|
66
|
+
"modern-idoc": "^0.10.4",
|
|
67
|
+
"modern-text": "^1.9.1",
|
|
68
|
+
"yjs": "^13.6.27"
|
|
71
69
|
},
|
|
72
70
|
"peerDependencies": {
|
|
73
71
|
"lottie-web": "^5",
|
|
@@ -102,46 +100,25 @@
|
|
|
102
100
|
"optional": true
|
|
103
101
|
}
|
|
104
102
|
},
|
|
105
|
-
"dependencies": {
|
|
106
|
-
"@floating-ui/vue": "^1.1.9",
|
|
107
|
-
"@vueuse/components": "^13.9.0",
|
|
108
|
-
"@vueuse/core": "^13.9.0",
|
|
109
|
-
"diff": "^8.0.2",
|
|
110
|
-
"file-saver": "^2.0.5",
|
|
111
|
-
"lodash-es": "^4.17.21",
|
|
112
|
-
"modern-canvas": "^0.12.4",
|
|
113
|
-
"modern-font": "^0.4.4",
|
|
114
|
-
"modern-idoc": "^0.10.1",
|
|
115
|
-
"modern-text": "^1.9.1",
|
|
116
|
-
"yjs": "^13.6.27"
|
|
117
|
-
},
|
|
118
103
|
"devDependencies": {
|
|
119
|
-
"@antfu/eslint-config": "^6.0.0",
|
|
120
104
|
"@types/file-saver": "^2.0.7",
|
|
121
105
|
"@types/lodash-es": "^4.17.12",
|
|
122
|
-
"@types/node": "^24.8.1",
|
|
123
106
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
124
|
-
"bumpp": "^10.3.1",
|
|
125
|
-
"conventional-changelog-cli": "^5.0.0",
|
|
126
|
-
"eslint": "^9.38.0",
|
|
127
107
|
"jiti": "^2.6.1",
|
|
128
|
-
"lint-staged": "^16.2.4",
|
|
129
108
|
"modern-gif": "^2.0.4",
|
|
130
109
|
"modern-mp4": "^0.2.0",
|
|
131
110
|
"modern-openxml": "^1.9.0",
|
|
132
111
|
"modern-pdf": "^1.3.2",
|
|
133
|
-
"sass-embedded": "^1.93.2"
|
|
134
|
-
"simple-git-hooks": "^2.13.1",
|
|
135
|
-
"typescript": "^5.9.3",
|
|
136
|
-
"vite": "^7.1.11",
|
|
137
|
-
"vitest": "^3.2.4",
|
|
138
|
-
"vue": "^3.5.22",
|
|
139
|
-
"vue-tsc": "^3.1.1"
|
|
112
|
+
"sass-embedded": "^1.93.2"
|
|
140
113
|
},
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
"
|
|
114
|
+
"scripts": {
|
|
115
|
+
"build:code": "vite build",
|
|
116
|
+
"build:tsc": "NODE_ENV=production vue-tsc --emitDeclarationOnly --project tsconfig.json",
|
|
117
|
+
"build:preset": "jiti ./scripts/preset.ts",
|
|
118
|
+
"build:dts": "jiti ./scripts/dts.ts",
|
|
119
|
+
"build": "pnpm build:code && pnpm build:tsc && pnpm build:dts",
|
|
120
|
+
"lint": "eslint src",
|
|
121
|
+
"test": "vitest",
|
|
122
|
+
"typecheck": "vue-tsc --noEmit"
|
|
146
123
|
}
|
|
147
|
-
}
|
|
124
|
+
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
|
-
declare global {
|
|
3
|
-
namespace Mce {
|
|
4
|
-
interface Commands {
|
|
5
|
-
}
|
|
6
|
-
type CommandHandle = (...args: any[]) => any;
|
|
7
|
-
type CommandEvents = {
|
|
8
|
-
[K in keyof Commands as `command:${K}`]: [ReturnType<Commands[K]>];
|
|
9
|
-
};
|
|
10
|
-
interface Events extends CommandEvents {
|
|
11
|
-
}
|
|
12
|
-
interface Editor {
|
|
13
|
-
commands: Ref<Map<string, Commands[keyof Commands]>>;
|
|
14
|
-
registerCommand: {
|
|
15
|
-
<K extends keyof Commands>(key: K, command: Commands[K]): void;
|
|
16
|
-
<K extends keyof Commands>(commands: {
|
|
17
|
-
key: K;
|
|
18
|
-
handle: Commands[K];
|
|
19
|
-
}[]): void;
|
|
20
|
-
};
|
|
21
|
-
unregisterCommand: <K extends keyof Commands = keyof Commands>(key: K) => void;
|
|
22
|
-
exec: <K extends keyof Commands>(key: K, ...args: Parameters<Commands[K]>) => ReturnType<Commands[K]>;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
declare const _default: import("..").Plugin;
|
|
27
|
-
export default _default;
|
package/dist/plugins/0.i18n.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace Mce {
|
|
3
|
-
type Translation = (key: string, fallback?: string) => string;
|
|
4
|
-
interface Editor {
|
|
5
|
-
t: Translation;
|
|
6
|
-
}
|
|
7
|
-
interface Options {
|
|
8
|
-
t?: Translation;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
declare const _default: import("..").Plugin;
|
|
13
|
-
export default _default;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Element2D } from 'modern-canvas';
|
|
2
|
-
import type { Ref } from 'vue';
|
|
3
|
-
declare global {
|
|
4
|
-
namespace Mce {
|
|
5
|
-
type ExporterProgress = (current: number, total: number) => void;
|
|
6
|
-
interface ExporterOptions {
|
|
7
|
-
scale?: number;
|
|
8
|
-
selected?: boolean | Element2D[];
|
|
9
|
-
onProgress?: ExporterProgress;
|
|
10
|
-
}
|
|
11
|
-
type Exporter = (options: ExporterOptions) => any | Promise<any>;
|
|
12
|
-
interface Editor {
|
|
13
|
-
exporters: Ref<Map<string, Exporter>>;
|
|
14
|
-
registerExporter: {
|
|
15
|
-
(key: string, exporter: Exporter): void;
|
|
16
|
-
(exporters: {
|
|
17
|
-
key: string;
|
|
18
|
-
handle: Exporter;
|
|
19
|
-
}[]): void;
|
|
20
|
-
};
|
|
21
|
-
unregisterExporter: (key: keyof Exporters) => void;
|
|
22
|
-
to: <K extends keyof Exporters>(key: K, options?: ExporterOptions) => Exporters[K];
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
declare const _default: import("..").Plugin;
|
|
27
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Element2D } from 'modern-canvas';
|
|
2
|
-
declare global {
|
|
3
|
-
namespace Mce {
|
|
4
|
-
interface Hotkeys {
|
|
5
|
-
raiseToFront: [event: KeyboardEvent];
|
|
6
|
-
raise: [event: KeyboardEvent];
|
|
7
|
-
lower: [event: KeyboardEvent];
|
|
8
|
-
lowerToBack: [event: KeyboardEvent];
|
|
9
|
-
}
|
|
10
|
-
interface Commands {
|
|
11
|
-
raiseToFront: (target?: Element2D | Element2D[]) => void;
|
|
12
|
-
raise: (target?: Element2D) => void;
|
|
13
|
-
lower: (target?: Element2D) => void;
|
|
14
|
-
lowerToBack: (target?: Element2D | Element2D[]) => void;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
declare const _default: import("..").Plugin;
|
|
19
|
-
export default _default;
|
package/dist/preset-plugins.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const presetPlugins: import("./editor").Plugin[];
|
|
File without changes
|
|
File without changes
|