@tmagic/editor 1.2.0-beta.1 → 1.2.0-beta.11
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/style.css +14 -8
- package/dist/tmagic-editor.mjs +1112 -981
- package/dist/tmagic-editor.mjs.map +1 -1
- package/dist/tmagic-editor.umd.js +1124 -991
- package/dist/tmagic-editor.umd.js.map +1 -1
- package/package.json +11 -10
- package/src/Editor.vue +11 -13
- package/src/components/ContentMenu.vue +4 -4
- package/src/components/Icon.vue +7 -5
- package/src/{layouts → components}/Layout.vue +14 -4
- package/src/components/ScrollBar.vue +1 -1
- package/src/components/ScrollViewer.vue +10 -1
- package/src/components/ToolButton.vue +30 -15
- package/src/fields/Code.vue +5 -2
- package/src/fields/CodeLink.vue +20 -12
- package/src/fields/CodeSelect.vue +19 -27
- package/src/fields/UISelect.vue +9 -8
- package/src/index.ts +3 -1
- package/src/layouts/AddPageBox.vue +13 -20
- package/src/layouts/CodeEditor.vue +106 -120
- package/src/layouts/Framework.vue +62 -40
- package/src/layouts/NavMenu.vue +1 -1
- package/src/layouts/PropsPanel.vue +4 -9
- package/src/layouts/Resizer.vue +1 -1
- package/src/layouts/sidebar/ComponentListPanel.vue +15 -13
- package/src/layouts/sidebar/LayerMenu.vue +89 -92
- package/src/layouts/sidebar/LayerPanel.vue +273 -178
- package/src/layouts/sidebar/Sidebar.vue +126 -46
- package/src/layouts/sidebar/code-block/CodeBlockEditor.vue +28 -24
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +22 -22
- package/src/layouts/workspace/Breadcrumb.vue +32 -0
- package/src/layouts/workspace/PageBar.vue +12 -11
- package/src/layouts/workspace/PageBarScrollContainer.vue +1 -1
- package/src/layouts/workspace/Stage.vue +15 -7
- package/src/layouts/workspace/ViewerMenu.vue +8 -7
- package/src/layouts/workspace/Workspace.vue +10 -3
- package/src/services/codeBlock.ts +16 -10
- package/src/services/editor.ts +12 -8
- package/src/theme/breadcrumb.scss +6 -0
- package/src/theme/component-list-panel.scss +3 -7
- package/src/theme/index.scss +1 -15
- package/src/theme/layer-panel.scss +7 -2
- package/src/theme/theme.scss +16 -0
- package/src/type.ts +2 -1
- package/src/utils/scroll-viewer.ts +18 -2
- package/src/utils/stage.ts +7 -0
- package/types/Editor.vue.d.ts +2 -2
- package/types/components/ContentMenu.vue.d.ts +1 -3
- package/types/components/Icon.vue.d.ts +1 -3
- package/types/{layouts → components}/Layout.vue.d.ts +0 -0
- package/types/components/ScrollBar.vue.d.ts +1 -3
- package/types/components/ScrollViewer.vue.d.ts +45 -1
- package/types/components/ToolButton.vue.d.ts +1 -3
- package/types/fields/Code.vue.d.ts +9 -3
- package/types/fields/CodeLink.vue.d.ts +5 -3
- package/types/fields/CodeSelect.vue.d.ts +1 -3
- package/types/fields/UISelect.vue.d.ts +1 -3
- package/types/index.d.ts +2 -0
- package/types/layouts/AddPageBox.vue.d.ts +43 -3
- package/types/layouts/CodeEditor.vue.d.ts +158 -45
- package/types/layouts/NavMenu.vue.d.ts +1 -3
- package/types/layouts/sidebar/LayerMenu.vue.d.ts +31 -63
- package/types/layouts/sidebar/LayerPanel.vue.d.ts +38 -1074
- package/types/layouts/sidebar/Sidebar.vue.d.ts +119 -17
- package/types/layouts/sidebar/code-block/CodeBlockList.vue.d.ts +1 -0
- package/types/layouts/workspace/Breadcrumb.vue.d.ts +44 -0
- package/types/layouts/workspace/Stage.vue.d.ts +23 -7
- package/types/layouts/workspace/ViewerMenu.vue.d.ts +6 -3
- package/types/layouts/workspace/Workspace.vue.d.ts +23 -5
- package/types/services/codeBlock.d.ts +1 -1
- package/types/services/editor.d.ts +2 -2
- package/types/services/ui.d.ts +1 -1
- package/types/type.d.ts +2 -1
- package/types/utils/scroll-viewer.d.ts +5 -0
- package/src/layouts/sidebar/TabPane.vue +0 -126
- package/types/layouts/sidebar/TabPane.vue.d.ts +0 -14
|
@@ -1,26 +1,128 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MenuButton, MenuComponent } from '../../type';
|
|
2
2
|
import { SideBarData } from '../../type';
|
|
3
|
-
declare const _default:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
declare const _default: {
|
|
4
|
+
new (...args: any[]): {
|
|
5
|
+
$: import("vue").ComponentInternalInstance;
|
|
6
|
+
$data: {};
|
|
7
|
+
$props: Partial<{
|
|
8
|
+
data: SideBarData;
|
|
9
|
+
}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
data?: SideBarData | undefined;
|
|
11
|
+
layerContentMenu: (MenuButton | MenuComponent)[];
|
|
12
|
+
}>, {
|
|
13
|
+
data: () => {
|
|
14
|
+
type: string;
|
|
15
|
+
status: string;
|
|
16
|
+
items: string[];
|
|
17
|
+
};
|
|
18
|
+
}>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "data">;
|
|
19
|
+
$attrs: {
|
|
20
|
+
[x: string]: unknown;
|
|
10
21
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
$refs: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
};
|
|
25
|
+
$slots: Readonly<{
|
|
26
|
+
[name: string]: import("vue").Slot | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
29
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
30
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
31
|
+
$el: any;
|
|
32
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
33
|
+
data?: SideBarData | undefined;
|
|
34
|
+
layerContentMenu: (MenuButton | MenuComponent)[];
|
|
35
|
+
}>, {
|
|
36
|
+
data: () => {
|
|
37
|
+
type: string;
|
|
38
|
+
status: string;
|
|
39
|
+
items: string[];
|
|
40
|
+
};
|
|
41
|
+
}>>>, {
|
|
42
|
+
activeTabName: import("vue").Ref<string>;
|
|
43
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
|
44
|
+
data: SideBarData;
|
|
45
|
+
}> & {
|
|
46
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
47
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
48
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
49
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
50
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
51
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
52
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
53
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
54
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
55
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
56
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
57
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
58
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
59
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
60
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
61
|
+
};
|
|
62
|
+
$forceUpdate: () => void;
|
|
63
|
+
$nextTick: typeof import("vue").nextTick;
|
|
64
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
65
|
+
} & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
66
|
+
data?: SideBarData | undefined;
|
|
67
|
+
layerContentMenu: (MenuButton | MenuComponent)[];
|
|
68
|
+
}>, {
|
|
69
|
+
data: () => {
|
|
18
70
|
type: string;
|
|
19
71
|
status: string;
|
|
20
72
|
items: string[];
|
|
21
73
|
};
|
|
74
|
+
}>>> & import("vue").ShallowUnwrapRef<{
|
|
75
|
+
activeTabName: import("vue").Ref<string>;
|
|
76
|
+
}> & {} & import("vue").ComponentCustomProperties;
|
|
77
|
+
__isFragment?: undefined;
|
|
78
|
+
__isTeleport?: undefined;
|
|
79
|
+
__isSuspense?: undefined;
|
|
80
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
81
|
+
data?: SideBarData | undefined;
|
|
82
|
+
layerContentMenu: (MenuButton | MenuComponent)[];
|
|
83
|
+
}>, {
|
|
84
|
+
data: () => {
|
|
85
|
+
type: string;
|
|
86
|
+
status: string;
|
|
87
|
+
items: string[];
|
|
22
88
|
};
|
|
23
|
-
}
|
|
89
|
+
}>>>, {
|
|
90
|
+
activeTabName: import("vue").Ref<string>;
|
|
91
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
|
24
92
|
data: SideBarData;
|
|
25
|
-
}
|
|
93
|
+
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
94
|
+
$slots: {
|
|
95
|
+
'component-list-panel-header': (_: {}) => any;
|
|
96
|
+
'component-list-item': (_: {
|
|
97
|
+
component: any;
|
|
98
|
+
}) => any;
|
|
99
|
+
'layer-panel-header': (_: {}) => any;
|
|
100
|
+
'code-block-panel-header': (_: {}) => any;
|
|
101
|
+
'code-block-panel-tool': (_: {
|
|
102
|
+
id: any;
|
|
103
|
+
data: any;
|
|
104
|
+
}) => any;
|
|
105
|
+
'code-block-edit-panel-header': (_: {
|
|
106
|
+
id: any;
|
|
107
|
+
}) => any;
|
|
108
|
+
'layer-node-content': (_: {
|
|
109
|
+
data: any;
|
|
110
|
+
node: any;
|
|
111
|
+
}) => any;
|
|
112
|
+
};
|
|
113
|
+
});
|
|
26
114
|
export default _default;
|
|
115
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
116
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
117
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
118
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
119
|
+
} : {
|
|
120
|
+
type: import('vue').PropType<T[K]>;
|
|
121
|
+
required: true;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
125
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
126
|
+
default: D[K];
|
|
127
|
+
} : P[K];
|
|
128
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
new (...args: any[]): {
|
|
3
|
+
$: import("vue").ComponentInternalInstance;
|
|
4
|
+
$data: {};
|
|
5
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
6
|
+
$attrs: {
|
|
7
|
+
[x: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
$refs: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
$slots: Readonly<{
|
|
13
|
+
[name: string]: import("vue").Slot | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
16
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
17
|
+
$emit: ((event: string, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
18
|
+
$el: any;
|
|
19
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, {}> & {
|
|
20
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
21
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
22
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
23
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
24
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
25
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
26
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
27
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
28
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
29
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
30
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
31
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
32
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
33
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
34
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
35
|
+
};
|
|
36
|
+
$forceUpdate: () => void;
|
|
37
|
+
$nextTick: typeof import("vue").nextTick;
|
|
38
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
39
|
+
} & Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
40
|
+
__isFragment?: undefined;
|
|
41
|
+
__isTeleport?: undefined;
|
|
42
|
+
__isSuspense?: undefined;
|
|
43
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
44
|
+
export default _default;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { MenuButton, MenuComponent } from '../../type';
|
|
1
2
|
declare const _default: {
|
|
2
3
|
new (...args: any[]): {
|
|
3
4
|
$: import("vue").ComponentInternalInstance;
|
|
4
5
|
$data: {};
|
|
5
|
-
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
8
|
+
}>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
6
9
|
$attrs: {
|
|
7
10
|
[x: string]: unknown;
|
|
8
11
|
};
|
|
@@ -14,9 +17,11 @@ declare const _default: {
|
|
|
14
17
|
}>;
|
|
15
18
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
16
19
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
17
|
-
$emit: (
|
|
20
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
18
21
|
$el: any;
|
|
19
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
23
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
24
|
+
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & {
|
|
20
25
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
21
26
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
22
27
|
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -36,11 +41,22 @@ declare const _default: {
|
|
|
36
41
|
$forceUpdate: () => void;
|
|
37
42
|
$nextTick: typeof import("vue").nextTick;
|
|
38
43
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
39
|
-
} & Readonly<import("vue").ExtractPropTypes<
|
|
44
|
+
} & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
45
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
46
|
+
}>>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
40
47
|
__isFragment?: undefined;
|
|
41
48
|
__isTeleport?: undefined;
|
|
42
49
|
__isSuspense?: undefined;
|
|
43
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
44
|
-
|
|
45
|
-
});
|
|
50
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
51
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
52
|
+
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
46
53
|
export default _default;
|
|
54
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
55
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
56
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
57
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
58
|
+
} : {
|
|
59
|
+
type: import('vue').PropType<T[K]>;
|
|
60
|
+
required: true;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MenuButton, MenuComponent } from '../../type';
|
|
1
2
|
declare const _default: {
|
|
2
3
|
new (...args: any[]): {
|
|
3
4
|
$: import("vue").ComponentInternalInstance;
|
|
@@ -6,6 +7,7 @@ declare const _default: {
|
|
|
6
7
|
isMultiSelect: boolean;
|
|
7
8
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
8
9
|
isMultiSelect?: boolean | undefined;
|
|
10
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
9
11
|
}>, {
|
|
10
12
|
isMultiSelect: boolean;
|
|
11
13
|
}>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "isMultiSelect">;
|
|
@@ -24,6 +26,7 @@ declare const _default: {
|
|
|
24
26
|
$el: any;
|
|
25
27
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
26
28
|
isMultiSelect?: boolean | undefined;
|
|
29
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
27
30
|
}>, {
|
|
28
31
|
isMultiSelect: boolean;
|
|
29
32
|
}>>>, {
|
|
@@ -52,6 +55,7 @@ declare const _default: {
|
|
|
52
55
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
53
56
|
} & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
54
57
|
isMultiSelect?: boolean | undefined;
|
|
58
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
55
59
|
}>, {
|
|
56
60
|
isMultiSelect: boolean;
|
|
57
61
|
}>>> & import("vue").ShallowUnwrapRef<{
|
|
@@ -62,15 +66,14 @@ declare const _default: {
|
|
|
62
66
|
__isSuspense?: undefined;
|
|
63
67
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
64
68
|
isMultiSelect?: boolean | undefined;
|
|
69
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
65
70
|
}>, {
|
|
66
71
|
isMultiSelect: boolean;
|
|
67
72
|
}>>>, {
|
|
68
73
|
show: (e: MouseEvent) => Promise<void>;
|
|
69
74
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
|
70
75
|
isMultiSelect: boolean;
|
|
71
|
-
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps
|
|
72
|
-
$slots: {};
|
|
73
|
-
});
|
|
76
|
+
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
74
77
|
export default _default;
|
|
75
78
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
76
79
|
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { MPage } from '@tmagic/schema';
|
|
2
|
+
import type { MenuButton, MenuComponent } from '../../type';
|
|
2
3
|
declare const _default: {
|
|
3
4
|
new (...args: any[]): {
|
|
4
5
|
$: import("vue").ComponentInternalInstance;
|
|
5
6
|
$data: {};
|
|
6
|
-
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
9
|
+
}>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
7
10
|
$attrs: {
|
|
8
11
|
[x: string]: unknown;
|
|
9
12
|
};
|
|
@@ -15,9 +18,11 @@ declare const _default: {
|
|
|
15
18
|
}>;
|
|
16
19
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
17
20
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
18
|
-
$emit: (
|
|
21
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
19
22
|
$el: any;
|
|
20
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
24
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
25
|
+
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & {
|
|
21
26
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
22
27
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
23
28
|
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -37,11 +42,15 @@ declare const _default: {
|
|
|
37
42
|
$forceUpdate: () => void;
|
|
38
43
|
$nextTick: typeof import("vue").nextTick;
|
|
39
44
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
40
|
-
} & Readonly<import("vue").ExtractPropTypes<
|
|
45
|
+
} & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
46
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
47
|
+
}>>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
41
48
|
__isFragment?: undefined;
|
|
42
49
|
__isTeleport?: undefined;
|
|
43
50
|
__isSuspense?: undefined;
|
|
44
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
51
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
52
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
53
|
+
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
45
54
|
$slots: {
|
|
46
55
|
stage: (_: {}) => any;
|
|
47
56
|
'workspace-content': (_: {}) => any;
|
|
@@ -54,3 +63,12 @@ declare const _default: {
|
|
|
54
63
|
};
|
|
55
64
|
});
|
|
56
65
|
export default _default;
|
|
66
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
67
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
68
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
69
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
70
|
+
} : {
|
|
71
|
+
type: import('vue').PropType<T[K]>;
|
|
72
|
+
required: true;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
@@ -12,7 +12,7 @@ declare class CodeBlock extends BaseService {
|
|
|
12
12
|
*/
|
|
13
13
|
setCodeDsl(codeDsl: CodeBlockDSL): Promise<void>;
|
|
14
14
|
/**
|
|
15
|
-
* 获取活动的代码块dsl数据源(默认从dsl中的
|
|
15
|
+
* 获取活动的代码块dsl数据源(默认从dsl中的codeBlocks字段读取)
|
|
16
16
|
* @param {boolean} forceRefresh 是否强制从活动dsl拉取刷新
|
|
17
17
|
* @returns {CodeBlockDSL | null}
|
|
18
18
|
*/
|
|
@@ -139,12 +139,12 @@ declare class Editor extends BaseService {
|
|
|
139
139
|
destroy(): void;
|
|
140
140
|
resetModifiedNodeId(): void;
|
|
141
141
|
/**
|
|
142
|
-
* 从dsl中的
|
|
142
|
+
* 从dsl中的codeBlocks字段读取活动的代码块
|
|
143
143
|
* @returns {CodeBlockDSL | null}
|
|
144
144
|
*/
|
|
145
145
|
getCodeDsl(): Promise<CodeBlockDSL | null>;
|
|
146
146
|
/**
|
|
147
|
-
* 设置代码块到dsl的
|
|
147
|
+
* 设置代码块到dsl的codeBlocks字段
|
|
148
148
|
* @param {CodeBlockDSL} codeDsl 代码DSL
|
|
149
149
|
* @returns {void}
|
|
150
150
|
*/
|
package/types/services/ui.d.ts
CHANGED
package/types/type.d.ts
CHANGED
|
@@ -163,6 +163,7 @@ export interface MenuComponent {
|
|
|
163
163
|
/** 是否显示,默认为true */
|
|
164
164
|
className?: string;
|
|
165
165
|
display?: boolean | ((data?: Services) => Promise<boolean> | boolean);
|
|
166
|
+
[key: string]: any;
|
|
166
167
|
}
|
|
167
168
|
/**
|
|
168
169
|
* '/': 分隔符
|
|
@@ -290,7 +291,7 @@ export interface CodeDslList {
|
|
|
290
291
|
/** 代码块名称 */
|
|
291
292
|
name: string;
|
|
292
293
|
/** 代码块函数内容 */
|
|
293
|
-
|
|
294
|
+
codeBlockContent?: CodeBlockContent;
|
|
294
295
|
/** 是否展示代码绑定关系 */
|
|
295
296
|
showRelation?: boolean;
|
|
296
297
|
}
|
|
@@ -4,6 +4,10 @@ interface ScrollViewerOptions {
|
|
|
4
4
|
container: HTMLDivElement;
|
|
5
5
|
target: HTMLDivElement;
|
|
6
6
|
zoom: number;
|
|
7
|
+
correctionScrollSize?: {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
7
11
|
}
|
|
8
12
|
export declare class ScrollViewer extends EventEmitter {
|
|
9
13
|
private container;
|
|
@@ -17,6 +21,7 @@ export declare class ScrollViewer extends EventEmitter {
|
|
|
17
21
|
private height;
|
|
18
22
|
private translateXCorrectionValue;
|
|
19
23
|
private translateYCorrectionValue;
|
|
24
|
+
private correctionScrollSize;
|
|
20
25
|
private resizeObserver;
|
|
21
26
|
constructor(options: ScrollViewerOptions);
|
|
22
27
|
destroy(): void;
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-tab-pane v-if="config" :name="config.text">
|
|
3
|
-
<template #label>
|
|
4
|
-
<div :key="config.text">
|
|
5
|
-
<m-icon v-if="config.icon" :icon="config.icon"></m-icon>
|
|
6
|
-
<div v-if="config.text" class="magic-editor-tab-panel-title">{{ config.text }}</div>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<component :is="config.component" v-bind="config.props || {}" v-on="config?.listeners || {}">
|
|
11
|
-
<template #component-list-panel-header v-if="data === 'component-list' || config.slots?.componentListPanelHeader">
|
|
12
|
-
<slot v-if="data === 'component-list'" name="component-list-panel-header"></slot>
|
|
13
|
-
<component v-else-if="config.slots?.componentListPanelHeader" :is="config.slots.componentListPanelHeader" />
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<template
|
|
17
|
-
#component-list-item="{ component }"
|
|
18
|
-
v-if="data === 'component-list' || config.slots?.componentListItem"
|
|
19
|
-
>
|
|
20
|
-
<slot v-if="data === 'component-list'" name="component-list-item" :component="component"></slot>
|
|
21
|
-
<component
|
|
22
|
-
v-else-if="config.slots?.componentListItem"
|
|
23
|
-
:is="config.slots.componentListItem"
|
|
24
|
-
:component="component"
|
|
25
|
-
/>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<template #layer-panel-header v-if="data === 'layer' || config.slots?.layerPanelHeader">
|
|
29
|
-
<slot v-if="data === 'layer'" name="layer-panel-header"></slot>
|
|
30
|
-
<component v-else-if="config.slots?.layerPanelHeader" :is="config.slots.layerPanelHeader" />
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<template #code-block-panel-header v-if="data === 'code-block' || config.slots?.codeBlockPanelHeader">
|
|
34
|
-
<slot v-if="data === 'code-block'" name="code-block-panel-header"></slot>
|
|
35
|
-
<component v-else-if="config.slots?.codeBlockPanelHeader" :is="config.slots.codeBlockPanelHeader" />
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<template #code-block-panel-tool="{ id }" v-if="data === 'code-block' || config.slots?.codeBlockPanelTool">
|
|
39
|
-
<slot v-if="data === 'code-block'" name="code-block-panel-tool" :id="id"></slot>
|
|
40
|
-
<component v-else-if="config.slots?.codeBlockPanelTool" :is="config.slots.codeBlockPanelTool" />
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<template
|
|
44
|
-
#code-block-edit-panel-header="{ id }"
|
|
45
|
-
v-if="data === 'code-block' || config.slots?.codeBlockEditPanelHeader"
|
|
46
|
-
>
|
|
47
|
-
<slot v-if="data === 'code-block'" name="code-block-edit-panel-header" :id="id"></slot>
|
|
48
|
-
<component v-else-if="config.slots?.codeBlockEditPanelHeader" :is="config.slots.codeBlockEditPanelHeader" />
|
|
49
|
-
</template>
|
|
50
|
-
|
|
51
|
-
<template
|
|
52
|
-
#layer-node-content="{ data: nodeData, node }"
|
|
53
|
-
v-if="data === 'layer' || config.slots?.layerNodeContent"
|
|
54
|
-
>
|
|
55
|
-
<slot v-if="data === 'layer'" name="layer-node-content" :data="nodeData" :node="node"></slot>
|
|
56
|
-
<component
|
|
57
|
-
v-else-if="config.slots?.layerNodeContent"
|
|
58
|
-
:is="config.slots.layerNodeContent"
|
|
59
|
-
:data="nodeData"
|
|
60
|
-
:node="node"
|
|
61
|
-
/>
|
|
62
|
-
</template>
|
|
63
|
-
</component>
|
|
64
|
-
</el-tab-pane>
|
|
65
|
-
</template>
|
|
66
|
-
|
|
67
|
-
<script lang="ts">
|
|
68
|
-
import { computed, defineComponent, PropType } from 'vue';
|
|
69
|
-
import { Coin, EditPen, Files } from '@element-plus/icons-vue';
|
|
70
|
-
|
|
71
|
-
import MIcon from '../../components/Icon.vue';
|
|
72
|
-
import { SideComponent, SideItem } from '../../type';
|
|
73
|
-
|
|
74
|
-
import CodeBlockList from './code-block/CodeBlockList.vue';
|
|
75
|
-
import ComponentListPanel from './ComponentListPanel.vue';
|
|
76
|
-
import LayerPanel from './LayerPanel.vue';
|
|
77
|
-
|
|
78
|
-
export default defineComponent({
|
|
79
|
-
components: { MIcon },
|
|
80
|
-
|
|
81
|
-
props: {
|
|
82
|
-
data: {
|
|
83
|
-
type: [Object, String] as PropType<SideItem>,
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
setup(props) {
|
|
88
|
-
return {
|
|
89
|
-
config: computed<SideComponent | undefined>(() => {
|
|
90
|
-
if (typeof props.data !== 'string') {
|
|
91
|
-
return props.data;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
switch (props.data) {
|
|
95
|
-
case 'component-list':
|
|
96
|
-
return {
|
|
97
|
-
type: 'component',
|
|
98
|
-
icon: Coin,
|
|
99
|
-
text: '组件',
|
|
100
|
-
component: ComponentListPanel,
|
|
101
|
-
slots: {},
|
|
102
|
-
};
|
|
103
|
-
case 'layer':
|
|
104
|
-
return {
|
|
105
|
-
type: 'component',
|
|
106
|
-
icon: Files,
|
|
107
|
-
text: '已选组件',
|
|
108
|
-
component: LayerPanel,
|
|
109
|
-
slots: {},
|
|
110
|
-
};
|
|
111
|
-
case 'code-block':
|
|
112
|
-
return {
|
|
113
|
-
type: 'component',
|
|
114
|
-
icon: EditPen,
|
|
115
|
-
text: '代码编辑',
|
|
116
|
-
component: CodeBlockList,
|
|
117
|
-
slots: {},
|
|
118
|
-
};
|
|
119
|
-
default:
|
|
120
|
-
return undefined;
|
|
121
|
-
}
|
|
122
|
-
}),
|
|
123
|
-
};
|
|
124
|
-
},
|
|
125
|
-
});
|
|
126
|
-
</script>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { SideComponent, SideItem } from '../../type';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
|
4
|
-
data: {
|
|
5
|
-
type: PropType<SideItem>;
|
|
6
|
-
};
|
|
7
|
-
}, {
|
|
8
|
-
config: import("vue").ComputedRef<SideComponent | undefined>;
|
|
9
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
-
data: {
|
|
11
|
-
type: PropType<SideItem>;
|
|
12
|
-
};
|
|
13
|
-
}>>, {}>;
|
|
14
|
-
export default _default;
|