@tmagic/editor 1.2.0-beta.25 → 1.2.0-beta.27
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 +32 -16
- package/dist/tmagic-editor.js +38 -14
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +38 -14
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +10 -10
- package/src/Editor.vue +13 -4
- package/src/layouts/NavMenu.vue +1 -1
- package/src/layouts/PropsPanel.vue +5 -1
- package/src/layouts/sidebar/LayerPanel.vue +10 -6
- package/src/services/BaseService.ts +6 -2
- package/src/services/editor.ts +12 -1
- package/src/theme/code-block.scss +11 -3
- package/src/theme/component-list-panel.scss +8 -5
- package/src/type.ts +1 -0
- package/src/utils/stage.ts +1 -0
- package/types/Editor.vue.d.ts +7 -0
- package/types/components/CodeDraftEditor.vue.d.ts +19 -111
- package/types/components/ContentMenu.vue.d.ts +11 -87
- package/types/components/FunctionEditor.vue.d.ts +13 -90
- package/types/components/Icon.vue.d.ts +4 -50
- package/types/components/ScrollBar.vue.d.ts +7 -65
- package/types/components/ToolButton.vue.d.ts +12 -78
- package/types/fields/Code.vue.d.ts +11 -77
- package/types/fields/CodeLink.vue.d.ts +12 -82
- package/types/fields/CodeSelect.vue.d.ts +10 -74
- package/types/fields/UISelect.vue.d.ts +7 -65
- package/types/layouts/AddPageBox.vue.d.ts +1 -43
- package/types/layouts/CodeEditor.vue.d.ts +21 -122
- package/types/layouts/NavMenu.vue.d.ts +9 -69
- package/types/layouts/sidebar/LayerMenu.vue.d.ts +5 -55
- package/types/layouts/workspace/Breadcrumb.vue.d.ts +1 -43
- package/types/layouts/workspace/Stage.vue.d.ts +4 -51
- package/types/layouts/workspace/ViewerMenu.vue.d.ts +9 -69
- package/types/type.d.ts +1 -0
|
@@ -1,56 +1,9 @@
|
|
|
1
|
-
import { nextTick } from 'vue';
|
|
2
1
|
import { MenuButton, MenuComponent } from '../../type';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
new (...args: any[]): {
|
|
5
|
-
$: import("vue").ComponentInternalInstance;
|
|
6
|
-
$data: {};
|
|
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>;
|
|
10
|
-
$attrs: {
|
|
11
|
-
[x: string]: unknown;
|
|
12
|
-
};
|
|
13
|
-
$refs: {
|
|
14
|
-
[x: string]: unknown;
|
|
15
|
-
};
|
|
16
|
-
$slots: Readonly<{
|
|
17
|
-
[name: string]: import("vue").Slot | undefined;
|
|
18
|
-
}>;
|
|
19
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
20
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
21
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
22
|
-
$el: any;
|
|
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, {}> & {
|
|
26
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
27
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
28
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
29
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
30
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
31
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
32
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
33
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
34
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
35
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
36
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
37
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
38
|
-
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
39
|
-
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
40
|
-
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;
|
|
41
|
-
};
|
|
42
|
-
$forceUpdate: () => void;
|
|
43
|
-
$nextTick: typeof nextTick;
|
|
44
|
-
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
45
|
-
} & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
46
|
-
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
47
|
-
}>>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
48
|
-
__isFragment?: undefined;
|
|
49
|
-
__isTeleport?: undefined;
|
|
50
|
-
__isSuspense?: undefined;
|
|
51
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
52
3
|
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
53
|
-
}
|
|
4
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
6
|
+
}>>>, {}>;
|
|
54
7
|
export default _default;
|
|
55
8
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
56
9
|
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,79 +1,19 @@
|
|
|
1
1
|
import { MenuButton, MenuComponent } from '../../type';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
new (...args: any[]): {
|
|
4
|
-
$: import("vue").ComponentInternalInstance;
|
|
5
|
-
$data: {};
|
|
6
|
-
$props: Partial<{
|
|
7
|
-
isMultiSelect: boolean;
|
|
8
|
-
}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
9
|
-
isMultiSelect?: boolean | undefined;
|
|
10
|
-
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
11
|
-
}>, {
|
|
12
|
-
isMultiSelect: boolean;
|
|
13
|
-
}>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "isMultiSelect">;
|
|
14
|
-
$attrs: {
|
|
15
|
-
[x: string]: unknown;
|
|
16
|
-
};
|
|
17
|
-
$refs: {
|
|
18
|
-
[x: string]: unknown;
|
|
19
|
-
};
|
|
20
|
-
$slots: Readonly<{
|
|
21
|
-
[name: string]: import("vue").Slot | undefined;
|
|
22
|
-
}>;
|
|
23
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
24
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
25
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
26
|
-
$el: any;
|
|
27
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
28
|
-
isMultiSelect?: boolean | undefined;
|
|
29
|
-
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
30
|
-
}>, {
|
|
31
|
-
isMultiSelect: boolean;
|
|
32
|
-
}>>>, {
|
|
33
|
-
show: (e: MouseEvent) => Promise<void>;
|
|
34
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
|
35
|
-
isMultiSelect: boolean;
|
|
36
|
-
}> & {
|
|
37
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
38
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
39
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
40
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
41
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
42
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
43
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
44
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
45
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
46
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
47
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
48
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
49
|
-
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
50
|
-
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
51
|
-
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;
|
|
52
|
-
};
|
|
53
|
-
$forceUpdate: () => void;
|
|
54
|
-
$nextTick: typeof import("vue").nextTick;
|
|
55
|
-
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
56
|
-
} & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
57
|
-
isMultiSelect?: boolean | undefined;
|
|
58
|
-
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
59
|
-
}>, {
|
|
60
|
-
isMultiSelect: boolean;
|
|
61
|
-
}>>> & import("vue").ShallowUnwrapRef<{
|
|
62
|
-
show: (e: MouseEvent) => Promise<void>;
|
|
63
|
-
}> & {} & import("vue").ComponentCustomProperties;
|
|
64
|
-
__isFragment?: undefined;
|
|
65
|
-
__isTeleport?: undefined;
|
|
66
|
-
__isSuspense?: undefined;
|
|
67
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
68
3
|
isMultiSelect?: boolean | undefined;
|
|
69
4
|
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
70
5
|
}>, {
|
|
71
6
|
isMultiSelect: boolean;
|
|
72
|
-
}
|
|
7
|
+
}>, {
|
|
73
8
|
show: (e: MouseEvent) => Promise<void>;
|
|
74
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
|
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<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
isMultiSelect?: boolean | undefined;
|
|
11
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
12
|
+
}>, {
|
|
13
|
+
isMultiSelect: boolean;
|
|
14
|
+
}>>>, {
|
|
75
15
|
isMultiSelect: boolean;
|
|
76
|
-
}
|
|
16
|
+
}>;
|
|
77
17
|
export default _default;
|
|
78
18
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
79
19
|
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
package/types/type.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export interface StageOptions {
|
|
|
33
33
|
containerHighlightClassName: string;
|
|
34
34
|
containerHighlightDuration: number;
|
|
35
35
|
containerHighlightType: ContainerHighlightType;
|
|
36
|
+
disabledDragStart?: boolean;
|
|
36
37
|
render: (stage: StageCore) => HTMLDivElement | Promise<HTMLDivElement>;
|
|
37
38
|
moveableOptions: MoveableOptions | ((config?: CustomizeMoveableOptionsCallbackConfig) => MoveableOptions);
|
|
38
39
|
canSelect: (el: HTMLElement) => boolean | Promise<boolean>;
|