@tmagic/editor 1.0.0-beta.13 → 1.0.0-beta.16
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/coverage/clover.xml +703 -601
- package/coverage/coverage-final.json +35 -33
- package/coverage/lcov-report/index.html +56 -56
- package/coverage/lcov-report/src/Editor.vue.html +1 -1
- package/coverage/lcov-report/{layouts/sidebar/LayerMenu.vue.html → src/components/ContentMenu.vue.html} +137 -95
- package/coverage/lcov-report/src/components/Icon.vue.html +5 -5
- package/coverage/lcov-report/src/components/ScrollViewer.vue.html +1 -1
- package/coverage/lcov-report/src/components/ToolButton.vue.html +180 -63
- package/coverage/lcov-report/src/components/index.html +34 -19
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/layouts/AddPageBox.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/Framework.vue.html +13 -13
- package/coverage/lcov-report/src/layouts/NavMenu.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/PropsPanel.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/Resizer.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/index.html +15 -15
- package/coverage/lcov-report/src/layouts/sidebar/ComponentListPanel.vue.html +78 -12
- package/coverage/lcov-report/src/layouts/sidebar/LayerMenu.vue.html +149 -92
- package/coverage/lcov-report/src/layouts/sidebar/LayerPanel.vue.html +43 -121
- package/coverage/lcov-report/src/layouts/sidebar/Sidebar.vue.html +23 -140
- package/coverage/lcov-report/{utils/undo-redo.ts.html → src/layouts/sidebar/TabPane.vue.html} +94 -118
- package/coverage/lcov-report/src/layouts/sidebar/index.html +64 -49
- package/coverage/lcov-report/src/layouts/workspace/PageBar.vue.html +99 -12
- package/coverage/lcov-report/src/layouts/workspace/Stage.vue.html +86 -95
- package/coverage/lcov-report/src/layouts/workspace/ViewerMenu.vue.html +208 -97
- package/coverage/lcov-report/src/layouts/workspace/Workspace.vue.html +3 -3
- package/coverage/lcov-report/src/layouts/workspace/index.html +35 -35
- package/coverage/lcov-report/src/services/BaseService.ts.html +11 -11
- package/coverage/lcov-report/src/services/componentList.ts.html +1 -1
- package/coverage/lcov-report/src/services/editor.ts.html +103 -10
- package/coverage/lcov-report/src/services/events.ts.html +1 -1
- package/coverage/lcov-report/src/services/history.ts.html +29 -8
- package/coverage/lcov-report/src/services/index.html +25 -25
- package/coverage/lcov-report/src/services/props.ts.html +4 -7
- package/coverage/lcov-report/src/services/ui.ts.html +1 -1
- package/coverage/lcov-report/src/type.ts.html +8 -14
- package/coverage/lcov-report/src/utils/compose.ts.html +4 -4
- package/coverage/lcov-report/src/utils/config.ts.html +1 -1
- package/coverage/lcov-report/src/utils/editor.ts.html +2 -2
- package/coverage/lcov-report/src/utils/index.html +1 -1
- package/coverage/lcov-report/src/utils/index.ts.html +1 -1
- package/coverage/lcov-report/src/utils/logger.ts.html +1 -1
- package/coverage/lcov-report/src/utils/props.ts.html +59 -2
- package/coverage/lcov-report/src/utils/scroll-viewer.ts.html +1 -1
- package/coverage/lcov-report/src/utils/undo-redo.ts.html +1 -1
- package/coverage/lcov.info +1679 -1402
- package/dist/style.css +47 -20
- package/dist/tmagic-editor.es.js +732 -485
- package/dist/tmagic-editor.es.js.map +1 -1
- package/dist/tmagic-editor.umd.js +733 -485
- package/dist/tmagic-editor.umd.js.map +1 -1
- package/dist/types/src/Editor.vue.d.ts +1 -1
- package/dist/types/src/components/ToolButton.vue.d.ts +12 -1
- package/dist/types/src/fields/UISelect.vue.d.ts +4 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/layouts/CodeEditor.vue.d.ts +13 -4
- package/dist/types/src/layouts/sidebar/ComponentListPanel.vue.d.ts +1 -0
- package/dist/types/src/layouts/sidebar/Sidebar.vue.d.ts +2 -3
- package/dist/types/src/layouts/sidebar/TabPane.vue.d.ts +14 -0
- package/dist/types/src/layouts/workspace/PageBar.vue.d.ts +2 -0
- package/dist/types/src/services/history.d.ts +1 -0
- package/dist/types/src/services/props.d.ts +2 -2
- package/dist/types/src/type.d.ts +6 -8
- package/dist/types/src/utils/polyfills.d.ts +0 -0
- package/package.json +15 -10
- package/src/components/ContentMenu.vue +107 -0
- package/src/components/ToolButton.vue +66 -27
- package/src/fields/UISelect.vue +14 -6
- package/src/index.ts +2 -0
- package/src/layouts/CodeEditor.vue +20 -10
- package/src/layouts/Framework.vue +6 -6
- package/src/layouts/sidebar/ComponentListPanel.vue +23 -1
- package/src/layouts/sidebar/LayerMenu.vue +91 -72
- package/src/layouts/sidebar/LayerPanel.vue +23 -49
- package/src/layouts/sidebar/Sidebar.vue +13 -52
- package/src/layouts/sidebar/TabPane.vue +68 -0
- package/src/layouts/workspace/PageBar.vue +35 -6
- package/src/layouts/workspace/Stage.vue +41 -44
- package/src/layouts/workspace/ViewerMenu.vue +104 -67
- package/src/layouts/workspace/Workspace.vue +2 -2
- package/src/services/editor.ts +33 -2
- package/src/services/history.ts +7 -0
- package/src/services/props.ts +2 -3
- package/src/theme/common/var.scss +1 -0
- package/src/theme/component-list-panel.scss +2 -0
- package/src/theme/content-menu.scss +33 -26
- package/src/theme/layer-panel.scss +1 -1
- package/src/theme/nav-menu.scss +6 -2
- package/src/theme/page-bar.scss +22 -1
- package/src/theme/props-panel.scss +4 -0
- package/src/type.ts +6 -8
- package/src/utils/editor.ts +1 -1
- package/src/utils/polyfills.ts +22 -0
- package/src/utils/props.ts +19 -0
- package/coverage/lcov-report/Icon.vue.html +0 -172
- package/coverage/lcov-report/ToolButton.vue.html +0 -655
- package/coverage/lcov-report/layouts/sidebar/index.html +0 -116
- package/coverage/lcov-report/utils/index.html +0 -116
- package/dist/types/src/layouts/sidebar/LayerPanel.vue.d.ts +0 -980
- package/dist/types/src/layouts/workspace/Stage.vue.d.ts +0 -188
- package/dist/types/src/layouts/workspace/ViewerMenu.vue.d.ts +0 -18
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import type { DefineComponent, Ref, ComponentInternalInstance, ExtractPropTypes, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComputedRef, ComponentOptionsMixin, EmitsOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, PropType } from 'vue';
|
|
2
|
-
import type { MoveableOptions } from '@tmagic/stage';
|
|
3
|
-
import StageCore from '@tmagic/stage';
|
|
4
|
-
import type { StageRect } from '../../type';
|
|
5
|
-
declare const _default: DefineComponent<{
|
|
6
|
-
render: {
|
|
7
|
-
type: PropType<() => HTMLDivElement>;
|
|
8
|
-
};
|
|
9
|
-
runtimeUrl: StringConstructor;
|
|
10
|
-
canSelect: {
|
|
11
|
-
type: PropType<(el: HTMLElement) => boolean | Promise<boolean>>;
|
|
12
|
-
default: (el: HTMLElement) => boolean;
|
|
13
|
-
};
|
|
14
|
-
moveableOptions: {
|
|
15
|
-
type: PropType<MoveableOptions | ((core?: StageCore | undefined) => MoveableOptions)>;
|
|
16
|
-
default: () => (core?: StageCore | undefined) => {
|
|
17
|
-
container: HTMLElement | null | undefined;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
}, {
|
|
21
|
-
menu: Ref<({
|
|
22
|
-
$: ComponentInternalInstance;
|
|
23
|
-
$data: {};
|
|
24
|
-
$props: Partial<{}> & Omit<Readonly<ExtractPropTypes<{}>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>;
|
|
25
|
-
$attrs: {
|
|
26
|
-
[x: string]: unknown;
|
|
27
|
-
};
|
|
28
|
-
$refs: {
|
|
29
|
-
[x: string]: unknown;
|
|
30
|
-
};
|
|
31
|
-
$slots: Readonly<{
|
|
32
|
-
[name: string]: Slot | undefined;
|
|
33
|
-
}>;
|
|
34
|
-
$root: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
35
|
-
$parent: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
36
|
-
$emit: ((event: string, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
37
|
-
$el: any;
|
|
38
|
-
$options: ComponentOptionsBase<Readonly<ExtractPropTypes<{}>>, {
|
|
39
|
-
menu: Ref<HTMLDivElement | undefined>;
|
|
40
|
-
canPaste: Ref<boolean>;
|
|
41
|
-
canDelete: ComputedRef<boolean>;
|
|
42
|
-
canMoveZPos: ComputedRef<boolean>;
|
|
43
|
-
canCenter: Ref<boolean>;
|
|
44
|
-
center(): void;
|
|
45
|
-
copy(): void;
|
|
46
|
-
paste(): void;
|
|
47
|
-
remove(): void;
|
|
48
|
-
top(): void;
|
|
49
|
-
bottom(): void;
|
|
50
|
-
topItem(): void;
|
|
51
|
-
bottomItem(): void;
|
|
52
|
-
clearGuides(): void;
|
|
53
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, {}> & {
|
|
54
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
55
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
56
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
57
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
58
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
59
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
60
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
61
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
62
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
63
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
64
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
65
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
66
|
-
renderTracked?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
|
|
67
|
-
renderTriggered?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
|
|
68
|
-
errorCaptured?: (((err: unknown, instance: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
69
|
-
};
|
|
70
|
-
$forceUpdate: () => void;
|
|
71
|
-
$nextTick: typeof nextTick;
|
|
72
|
-
$watch(source: string | Function, cb: Function, options?: WatchOptions<boolean> | undefined): WatchStopHandle;
|
|
73
|
-
} & Readonly<ExtractPropTypes<{}>> & ShallowUnwrapRef<{
|
|
74
|
-
menu: Ref<HTMLDivElement | undefined>;
|
|
75
|
-
canPaste: Ref<boolean>;
|
|
76
|
-
canDelete: ComputedRef<boolean>;
|
|
77
|
-
canMoveZPos: ComputedRef<boolean>;
|
|
78
|
-
canCenter: Ref<boolean>;
|
|
79
|
-
center(): void;
|
|
80
|
-
copy(): void;
|
|
81
|
-
paste(): void;
|
|
82
|
-
remove(): void;
|
|
83
|
-
top(): void;
|
|
84
|
-
bottom(): void;
|
|
85
|
-
topItem(): void;
|
|
86
|
-
bottomItem(): void;
|
|
87
|
-
clearGuides(): void;
|
|
88
|
-
}> & {} & {} & ComponentCustomProperties) | undefined>;
|
|
89
|
-
menuStyle: Ref<{
|
|
90
|
-
display: string;
|
|
91
|
-
left: string;
|
|
92
|
-
top: string;
|
|
93
|
-
}>;
|
|
94
|
-
contextmenuHandler(e: MouseEvent): void;
|
|
95
|
-
stageWrap: Ref<({
|
|
96
|
-
$: ComponentInternalInstance;
|
|
97
|
-
$data: {};
|
|
98
|
-
$props: Partial<{
|
|
99
|
-
zoom: number;
|
|
100
|
-
}> & Omit<Readonly<ExtractPropTypes<{
|
|
101
|
-
width: NumberConstructor;
|
|
102
|
-
height: NumberConstructor;
|
|
103
|
-
zoom: {
|
|
104
|
-
type: NumberConstructor;
|
|
105
|
-
default: number;
|
|
106
|
-
};
|
|
107
|
-
}>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, "zoom">;
|
|
108
|
-
$attrs: {
|
|
109
|
-
[x: string]: unknown;
|
|
110
|
-
};
|
|
111
|
-
$refs: {
|
|
112
|
-
[x: string]: unknown;
|
|
113
|
-
};
|
|
114
|
-
$slots: Readonly<{
|
|
115
|
-
[name: string]: Slot | undefined;
|
|
116
|
-
}>;
|
|
117
|
-
$root: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
118
|
-
$parent: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
119
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
120
|
-
$el: any;
|
|
121
|
-
$options: ComponentOptionsBase<Readonly<ExtractPropTypes<{
|
|
122
|
-
width: NumberConstructor;
|
|
123
|
-
height: NumberConstructor;
|
|
124
|
-
zoom: {
|
|
125
|
-
type: NumberConstructor;
|
|
126
|
-
default: number;
|
|
127
|
-
};
|
|
128
|
-
}>>, {
|
|
129
|
-
container: Ref<HTMLDivElement | undefined>;
|
|
130
|
-
el: Ref<HTMLDivElement | undefined>;
|
|
131
|
-
style: ComputedRef<string>;
|
|
132
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, {
|
|
133
|
-
zoom: number;
|
|
134
|
-
}> & {
|
|
135
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
136
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
137
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
138
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
139
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
140
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
141
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
142
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
143
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
144
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
145
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
146
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
147
|
-
renderTracked?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
|
|
148
|
-
renderTriggered?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
|
|
149
|
-
errorCaptured?: (((err: unknown, instance: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
150
|
-
};
|
|
151
|
-
$forceUpdate: () => void;
|
|
152
|
-
$nextTick: typeof nextTick;
|
|
153
|
-
$watch(source: string | Function, cb: Function, options?: WatchOptions<boolean> | undefined): WatchStopHandle;
|
|
154
|
-
} & Readonly<ExtractPropTypes<{
|
|
155
|
-
width: NumberConstructor;
|
|
156
|
-
height: NumberConstructor;
|
|
157
|
-
zoom: {
|
|
158
|
-
type: NumberConstructor;
|
|
159
|
-
default: number;
|
|
160
|
-
};
|
|
161
|
-
}>> & ShallowUnwrapRef<{
|
|
162
|
-
container: Ref<HTMLDivElement | undefined>;
|
|
163
|
-
el: Ref<HTMLDivElement | undefined>;
|
|
164
|
-
style: ComputedRef<string>;
|
|
165
|
-
}> & {} & {} & ComponentCustomProperties) | undefined>;
|
|
166
|
-
stageContainer: Ref<HTMLDivElement | undefined>;
|
|
167
|
-
stageRect: ComputedRef<StageRect | undefined>;
|
|
168
|
-
zoom: ComputedRef<number | undefined>;
|
|
169
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
170
|
-
render: {
|
|
171
|
-
type: PropType<() => HTMLDivElement>;
|
|
172
|
-
};
|
|
173
|
-
runtimeUrl: StringConstructor;
|
|
174
|
-
canSelect: {
|
|
175
|
-
type: PropType<(el: HTMLElement) => boolean | Promise<boolean>>;
|
|
176
|
-
default: (el: HTMLElement) => boolean;
|
|
177
|
-
};
|
|
178
|
-
moveableOptions: {
|
|
179
|
-
type: PropType<MoveableOptions | ((core?: StageCore | undefined) => MoveableOptions)>;
|
|
180
|
-
default: () => (core?: StageCore | undefined) => {
|
|
181
|
-
container: HTMLElement | null | undefined;
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
}>>, {
|
|
185
|
-
canSelect: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
186
|
-
moveableOptions: MoveableOptions | ((core?: StageCore | undefined) => MoveableOptions);
|
|
187
|
-
}>;
|
|
188
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { DefineComponent, Ref, ComputedRef, ComponentOptionsMixin, EmitsOptions, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from 'vue';
|
|
2
|
-
declare const _default: DefineComponent<{}, {
|
|
3
|
-
menu: Ref<HTMLDivElement | undefined>;
|
|
4
|
-
canPaste: Ref<boolean>;
|
|
5
|
-
canDelete: ComputedRef<boolean>;
|
|
6
|
-
canMoveZPos: ComputedRef<boolean>;
|
|
7
|
-
canCenter: Ref<boolean>;
|
|
8
|
-
center(): void;
|
|
9
|
-
copy(): void;
|
|
10
|
-
paste(): void;
|
|
11
|
-
remove(): void;
|
|
12
|
-
top(): void;
|
|
13
|
-
bottom(): void;
|
|
14
|
-
topItem(): void;
|
|
15
|
-
bottomItem(): void;
|
|
16
|
-
clearGuides(): void;
|
|
17
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>;
|
|
18
|
-
export default _default;
|