mce 0.13.0 → 0.13.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/README.md +3 -2
- package/dist/components/Floatbar.vue.d.ts +15 -0
- package/dist/components/Selector.vue.d.ts +12 -14
- package/dist/components/shared/Dialog.vue.d.ts +9 -0
- package/dist/components/shared/Menu.vue.d.ts +9 -0
- package/dist/components/shared/Overlay.vue.d.ts +9 -0
- package/dist/components/shared/Tooltip.vue.d.ts +9 -0
- package/dist/components/shared/Transformable.vue.d.ts +4 -5
- package/dist/composables/overlay.d.ts +11 -0
- package/dist/composables/strategy.d.ts +1 -1
- package/dist/index.js +322 -247
- package/dist/locale/en.d.ts +5 -1
- package/dist/locale/zh-Hans.d.ts +5 -1
- package/dist/mixins/0.config/base.d.ts +4 -1
- package/dist/mixins/0.context.d.ts +5 -1
- package/dist/mixins/4.0.text.d.ts +1 -1
- package/dist/mixins/4.2.element.d.ts +0 -1
- package/dist/plugins/menu.d.ts +2 -1
- package/dist/plugins/panels.d.ts +12 -0
- package/dist/typed-global.d.ts +16 -0
- package/dist/typed-plugins.d.ts +1 -1
- package/package.json +2 -2
- package/dist/mixins/0.element.d.ts +0 -15
package/dist/locale/en.d.ts
CHANGED
|
@@ -44,10 +44,14 @@ declare const _default: {
|
|
|
44
44
|
'view:pixelGrid': string;
|
|
45
45
|
'view:ruler': string;
|
|
46
46
|
'view:scrollbar': string;
|
|
47
|
-
'view:layers': string;
|
|
48
47
|
'view:timeline': string;
|
|
49
48
|
'view:statusbar': string;
|
|
50
49
|
'view:frameOutline': string;
|
|
50
|
+
'checkerboardStyle:grid': string;
|
|
51
|
+
'checkerboardStyle:dot': string;
|
|
52
|
+
panels: string;
|
|
53
|
+
'panels:layers': string;
|
|
54
|
+
pixelate: string;
|
|
51
55
|
layers: string;
|
|
52
56
|
zoomIn: string;
|
|
53
57
|
zoomOut: string;
|
package/dist/locale/zh-Hans.d.ts
CHANGED
|
@@ -45,10 +45,14 @@ declare const _default: {
|
|
|
45
45
|
'view:pixelGrid': string;
|
|
46
46
|
'view:ruler': string;
|
|
47
47
|
'view:scrollbar': string;
|
|
48
|
-
'view:layers': string;
|
|
49
48
|
'view:timeline': string;
|
|
50
49
|
'view:statusbar': string;
|
|
51
50
|
'view:frameOutline': string;
|
|
51
|
+
'checkerboardStyle:grid': string;
|
|
52
|
+
'checkerboardStyle:dot': string;
|
|
53
|
+
panels: string;
|
|
54
|
+
'panels:layers': string;
|
|
55
|
+
pixelate: string;
|
|
52
56
|
layers: string;
|
|
53
57
|
zoomIn: string;
|
|
54
58
|
zoomOut: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CheckerboardStyle } from 'modern-canvas';
|
|
1
2
|
declare global {
|
|
2
3
|
namespace Mce {
|
|
3
4
|
interface Options extends Partial<Config> {
|
|
@@ -15,15 +16,17 @@ declare global {
|
|
|
15
16
|
interface Config {
|
|
16
17
|
theme: Theme;
|
|
17
18
|
viewMode: ViewMode;
|
|
19
|
+
watermark?: string;
|
|
18
20
|
checkerboard: boolean;
|
|
21
|
+
checkerboardStyle: CheckerboardStyle;
|
|
19
22
|
pixelGrid: boolean;
|
|
23
|
+
pixelate: boolean;
|
|
20
24
|
camera: boolean;
|
|
21
25
|
ruler: boolean;
|
|
22
26
|
scrollbar: boolean;
|
|
23
27
|
layers: boolean;
|
|
24
28
|
timeline: boolean;
|
|
25
29
|
statusbar: boolean;
|
|
26
|
-
wheelZoom: boolean;
|
|
27
30
|
frameOutline: boolean;
|
|
28
31
|
frameGap: number;
|
|
29
32
|
typographyStrategy: TypographyStrategy;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Cursor, Node, Vector2Data } from 'modern-canvas';
|
|
2
2
|
import type { ComputedRef, Ref } from 'vue';
|
|
3
3
|
import type { AxisAlignedBoundingBox } from '../types';
|
|
4
|
-
import { Camera2D, DrawboardEffect, Engine, Timeline } from 'modern-canvas';
|
|
4
|
+
import { Camera2D, DrawboardEffect, Element2D, Engine, Timeline } from 'modern-canvas';
|
|
5
5
|
import { Fonts } from 'modern-font';
|
|
6
6
|
import { Doc } from '../models';
|
|
7
7
|
declare global {
|
|
@@ -20,6 +20,10 @@ declare global {
|
|
|
20
20
|
root: ComputedRef<Node>;
|
|
21
21
|
nodes: Ref<Node[]>;
|
|
22
22
|
nodeIndexMap: Map<string, number>;
|
|
23
|
+
selection: Ref<Node[]>;
|
|
24
|
+
elementSelection: Ref<Element2D[]>;
|
|
25
|
+
textSelection: Ref<any[] | undefined>;
|
|
26
|
+
hoverElement: Ref<Element2D | undefined>;
|
|
23
27
|
state: Ref<State | undefined>;
|
|
24
28
|
setState: (state: State, context?: StateContext) => void;
|
|
25
29
|
stateContext: Ref<StateContext | undefined>;
|
|
@@ -26,7 +26,6 @@ declare global {
|
|
|
26
26
|
updateElement: (id: string, properties: Record<string, any>) => void;
|
|
27
27
|
getElement: (id: string) => Element2D | undefined;
|
|
28
28
|
resizeElement: (element: Element2D, width: number, height: number, options?: ResizeElementOptions) => void;
|
|
29
|
-
pointerActivateElement: (element: Element2D | undefined, event?: MouseEvent | PointerEvent) => void;
|
|
30
29
|
selectArea: (areaInDrawboard: AxisAlignedBoundingBox) => Element2D[];
|
|
31
30
|
}
|
|
32
31
|
interface Events {
|
package/dist/plugins/menu.d.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Mce {
|
|
3
|
+
interface Panels {
|
|
4
|
+
layers: [];
|
|
5
|
+
}
|
|
6
|
+
interface Commands {
|
|
7
|
+
panel: <T extends keyof Panels>(panel: T, ...args: Panels[T]) => Promise<boolean>;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
declare const _default: import("..").Plugin;
|
|
12
|
+
export default _default;
|
package/dist/typed-global.d.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
import 'modern-canvas'
|
|
2
|
+
|
|
3
|
+
declare module 'modern-canvas' {
|
|
4
|
+
interface Meta {
|
|
5
|
+
inPptIs?: 'Pptx' | 'Picture' | 'Shape' | 'GroupShape' | 'Animation'
|
|
6
|
+
inEditorIs?: 'Doc' | 'Frame' | 'Element' | 'Node'
|
|
7
|
+
inCanvasIs?: 'Lottie2D' | 'Element2D' | 'Animation'
|
|
8
|
+
lock?: boolean
|
|
9
|
+
lockAspectRatio?: boolean
|
|
10
|
+
movable?: boolean
|
|
11
|
+
rotatable?: boolean
|
|
12
|
+
resizable?: boolean
|
|
13
|
+
transformable?: boolean
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
1
17
|
declare global {
|
|
2
18
|
namespace Mce {
|
|
3
19
|
interface Editor {}
|
package/dist/typed-plugins.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import './mixins/0.command'
|
|
|
6
6
|
import './mixins/0.config'
|
|
7
7
|
import './mixins/0.config/base'
|
|
8
8
|
import './mixins/0.context'
|
|
9
|
-
import './mixins/0.element'
|
|
10
9
|
import './mixins/0.font'
|
|
11
10
|
import './mixins/0.helper'
|
|
12
11
|
import './mixins/0.locale'
|
|
@@ -45,6 +44,7 @@ import './plugins/menu'
|
|
|
45
44
|
import './plugins/move'
|
|
46
45
|
import './plugins/new'
|
|
47
46
|
import './plugins/open'
|
|
47
|
+
import './plugins/panels'
|
|
48
48
|
import './plugins/saveAs'
|
|
49
49
|
import './plugins/scroll'
|
|
50
50
|
import './plugins/select'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.2",
|
|
5
5
|
"description": "The headless canvas editor framework. only the ESM.",
|
|
6
6
|
"author": "wxm",
|
|
7
7
|
"license": "MIT",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"diff": "^8.0.2",
|
|
62
62
|
"file-saver": "^2.0.5",
|
|
63
63
|
"lodash-es": "^4.17.21",
|
|
64
|
-
"modern-canvas": "^0.13.
|
|
64
|
+
"modern-canvas": "^0.13.1",
|
|
65
65
|
"modern-font": "^0.4.4",
|
|
66
66
|
"modern-idoc": "^0.10.5",
|
|
67
67
|
"modern-text": "^1.10.3",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Node } from 'modern-canvas';
|
|
2
|
-
import type { Ref } from 'vue';
|
|
3
|
-
import { Element2D } from 'modern-canvas';
|
|
4
|
-
declare global {
|
|
5
|
-
namespace Mce {
|
|
6
|
-
interface Editor {
|
|
7
|
-
selection: Ref<Node[]>;
|
|
8
|
-
elementSelection: Ref<Element2D[]>;
|
|
9
|
-
textSelection: Ref<any[] | undefined>;
|
|
10
|
-
hoverElement: Ref<Element2D | undefined>;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
declare const _default: import("..").Mixin;
|
|
15
|
-
export default _default;
|