@tmagic/editor 1.0.6 → 1.1.0-beta.10
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 +5 -1
- package/dist/{tmagic-editor.es.js → tmagic-editor.mjs} +1522 -1177
- package/dist/tmagic-editor.mjs.map +1 -0
- package/dist/tmagic-editor.umd.js +1606 -1259
- package/dist/tmagic-editor.umd.js.map +1 -1
- package/package.json +22 -20
- package/src/Editor.vue +41 -15
- package/src/components/ContentMenu.vue +87 -99
- package/src/components/Icon.vue +2 -2
- package/src/components/ScrollViewer.vue +2 -2
- package/src/components/ToolButton.vue +151 -168
- package/src/fields/UISelect.vue +49 -70
- package/src/index.ts +2 -1
- package/src/layouts/AddPageBox.vue +3 -3
- package/src/layouts/Framework.vue +1 -1
- package/src/layouts/NavMenu.vue +2 -2
- package/src/layouts/PropsPanel.vue +1 -1
- package/src/layouts/Resizer.vue +1 -1
- package/src/layouts/sidebar/ComponentListPanel.vue +43 -2
- package/src/layouts/sidebar/LayerMenu.vue +3 -3
- package/src/layouts/sidebar/LayerPanel.vue +13 -4
- package/src/layouts/sidebar/Sidebar.vue +1 -1
- package/src/layouts/sidebar/TabPane.vue +3 -3
- package/src/layouts/workspace/PageBar.vue +63 -192
- package/src/layouts/workspace/PageBarScrollContainer.vue +111 -0
- package/src/layouts/workspace/Stage.vue +208 -188
- package/src/layouts/workspace/ViewerMenu.vue +141 -148
- package/src/layouts/workspace/Workspace.vue +11 -11
- package/src/services/BaseService.ts +5 -10
- package/src/services/componentList.ts +3 -3
- package/src/services/editor.ts +247 -140
- package/src/services/events.ts +1 -1
- package/src/services/history.ts +1 -1
- package/src/services/props.ts +63 -11
- package/src/services/storage.ts +133 -0
- package/src/services/ui.ts +10 -4
- package/src/theme/component-list-panel.scss +5 -0
- package/src/theme/framework.scss +1 -1
- package/src/theme/stage.scss +2 -2
- package/src/type.ts +28 -7
- package/src/utils/config.ts +1 -1
- package/src/utils/editor.ts +53 -35
- package/src/utils/operator.ts +109 -0
- package/src/utils/props.ts +2 -24
- package/src/utils/scroll-viewer.ts +1 -1
- package/tsconfig.build.json +13 -0
- package/{dist/types/src → types}/Editor.vue.d.ts +44 -9
- package/types/components/ContentMenu.vue.d.ts +116 -0
- package/types/components/Icon.vue.d.ts +13 -0
- package/types/components/ScrollViewer.vue.d.ts +22 -0
- package/types/components/ToolButton.vue.d.ts +109 -0
- package/types/fields/Code.vue.d.ts +23 -0
- package/{dist/types/src → types}/fields/CodeLink.vue.d.ts +4 -6
- package/types/fields/UISelect.vue.d.ts +83 -0
- package/{dist/types/src → types}/index.d.ts +4 -1
- package/types/layouts/AddPageBox.vue.d.ts +4 -0
- package/{dist/types/src → types}/layouts/CodeEditor.vue.d.ts +11 -13
- package/types/layouts/Framework.vue.d.ts +22 -0
- package/types/layouts/NavMenu.vue.d.ts +25 -0
- package/types/layouts/PropsPanel.vue.d.ts +245 -0
- package/types/layouts/Resizer.vue.d.ts +12 -0
- package/types/layouts/sidebar/ComponentListPanel.vue.d.ts +14 -0
- package/types/layouts/sidebar/LayerMenu.vue.d.ts +100 -0
- package/types/layouts/sidebar/LayerPanel.vue.d.ts +1099 -0
- package/{dist/types/src → types}/layouts/sidebar/Sidebar.vue.d.ts +3 -5
- package/types/layouts/sidebar/TabPane.vue.d.ts +14 -0
- package/types/layouts/workspace/PageBar.vue.d.ts +54 -0
- package/types/layouts/workspace/PageBarScrollContainer.vue.d.ts +48 -0
- package/types/layouts/workspace/Stage.vue.d.ts +46 -0
- package/types/layouts/workspace/ViewerMenu.vue.d.ts +88 -0
- package/types/layouts/workspace/Workspace.vue.d.ts +6 -0
- package/{dist/types/src → types}/services/BaseService.d.ts +0 -0
- package/types/services/componentList.d.ts +14 -0
- package/{dist/types/src → types}/services/editor.d.ts +27 -14
- package/{dist/types/src → types}/services/events.d.ts +0 -0
- package/{dist/types/src → types}/services/history.d.ts +0 -0
- package/{dist/types/src → types}/services/props.d.ts +26 -2
- package/types/services/storage.d.ts +56 -0
- package/{dist/types/src → types}/services/ui.d.ts +1 -1
- package/{dist/types/src → types}/type.d.ts +21 -1
- package/{dist/types/src → types}/utils/compose.d.ts +1 -1
- package/{dist/types/src → types}/utils/config.d.ts +0 -0
- package/{dist/types/src → types}/utils/editor.d.ts +11 -4
- package/{dist/types/src → types}/utils/index.d.ts +0 -0
- package/{dist/types/src → types}/utils/logger.d.ts +0 -0
- package/types/utils/operator.d.ts +21 -0
- package/{dist/types/src → types}/utils/polyfills.d.ts +0 -0
- package/{dist/types/src → types}/utils/props.d.ts +2 -22
- package/{dist/types/src → types}/utils/scroll-viewer.d.ts +0 -0
- package/{dist/types/src → types}/utils/undo-redo.d.ts +0 -0
- package/dist/tmagic-editor.es.js.map +0 -1
- package/dist/types/src/components/Icon.vue.d.ts +0 -14
- package/dist/types/src/components/ScrollViewer.vue.d.ts +0 -24
- package/dist/types/src/fields/Code.vue.d.ts +0 -25
- package/dist/types/src/layouts/AddPageBox.vue.d.ts +0 -5
- package/dist/types/src/layouts/Framework.vue.d.ts +0 -24
- package/dist/types/src/layouts/NavMenu.vue.d.ts +0 -27
- package/dist/types/src/layouts/PropsPanel.vue.d.ts +0 -13
- package/dist/types/src/layouts/Resizer.vue.d.ts +0 -14
- package/dist/types/src/layouts/sidebar/ComponentListPanel.vue.d.ts +0 -14
- package/dist/types/src/layouts/sidebar/TabPane.vue.d.ts +0 -16
- package/dist/types/src/layouts/workspace/Workspace.vue.d.ts +0 -8
- package/dist/types/src/shims-vue.d.ts +0 -6
- package/dist/types/src/vite-env.d.ts +0 -1
- package/src/vite-env.d.ts +0 -1
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { DefineComponent, ComputedOptions, MethodOptions, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
|
|
2
|
-
import { Component, PropType, toRaw } from 'vue';
|
|
3
|
-
declare const _default: DefineComponent<{
|
|
4
|
-
icon: {
|
|
5
|
-
type: PropType<string | Component<any, any, any, ComputedOptions, MethodOptions>>;
|
|
6
|
-
};
|
|
7
|
-
}, {
|
|
8
|
-
toRaw: typeof toRaw;
|
|
9
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
10
|
-
icon: {
|
|
11
|
-
type: PropType<string | Component<any, any, any, ComputedOptions, MethodOptions>>;
|
|
12
|
-
};
|
|
13
|
-
}>>, {}>;
|
|
14
|
-
export default _default;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Ref, ComputedRef } from '@vue/reactivity';
|
|
2
|
-
import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
|
|
3
|
-
declare const _default: DefineComponent<{
|
|
4
|
-
width: NumberConstructor;
|
|
5
|
-
height: NumberConstructor;
|
|
6
|
-
zoom: {
|
|
7
|
-
type: NumberConstructor;
|
|
8
|
-
default: number;
|
|
9
|
-
};
|
|
10
|
-
}, {
|
|
11
|
-
container: Ref<HTMLDivElement | undefined>;
|
|
12
|
-
el: Ref<HTMLDivElement | undefined>;
|
|
13
|
-
style: ComputedRef<string>;
|
|
14
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
15
|
-
width: NumberConstructor;
|
|
16
|
-
height: NumberConstructor;
|
|
17
|
-
zoom: {
|
|
18
|
-
type: NumberConstructor;
|
|
19
|
-
default: number;
|
|
20
|
-
};
|
|
21
|
-
}>>, {
|
|
22
|
-
zoom: number;
|
|
23
|
-
}>;
|
|
24
|
-
export default _default;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ComputedRef } from '@vue/reactivity';
|
|
2
|
-
import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
|
|
3
|
-
declare const _default: DefineComponent<Readonly<{
|
|
4
|
-
name?: any;
|
|
5
|
-
config?: any;
|
|
6
|
-
model?: any;
|
|
7
|
-
prop?: any;
|
|
8
|
-
}>, {
|
|
9
|
-
height: ComputedRef<string>;
|
|
10
|
-
language: ComputedRef<any>;
|
|
11
|
-
save(v: string): void;
|
|
12
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "change"[], "change", VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<Readonly<{
|
|
13
|
-
name?: any;
|
|
14
|
-
config?: any;
|
|
15
|
-
model?: any;
|
|
16
|
-
prop?: any;
|
|
17
|
-
}>>> & {
|
|
18
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
readonly name?: any;
|
|
21
|
-
readonly config?: any;
|
|
22
|
-
readonly model?: any;
|
|
23
|
-
readonly prop?: any;
|
|
24
|
-
}>;
|
|
25
|
-
export default _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { DefineComponent, ComponentOptionsMixin, EmitsOptions, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
|
|
2
|
-
declare const _default: DefineComponent<{}, {
|
|
3
|
-
clickHandler(): void;
|
|
4
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>;
|
|
5
|
-
export default _default;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ComputedRef } from '@vue/reactivity';
|
|
2
|
-
import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
|
|
3
|
-
import type { MApp } from '@tmagic/schema';
|
|
4
|
-
import { GetColumnWidth } from '../type';
|
|
5
|
-
declare const _default: DefineComponent<{
|
|
6
|
-
codeOptions: {
|
|
7
|
-
type: ObjectConstructor;
|
|
8
|
-
default: () => {};
|
|
9
|
-
};
|
|
10
|
-
}, {
|
|
11
|
-
root: ComputedRef<MApp | undefined>;
|
|
12
|
-
pageLength: ComputedRef<number>;
|
|
13
|
-
showSrc: ComputedRef<boolean | undefined>;
|
|
14
|
-
columnWidth: ComputedRef<GetColumnWidth | undefined>;
|
|
15
|
-
saveCode(value: string): void;
|
|
16
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
17
|
-
codeOptions: {
|
|
18
|
-
type: ObjectConstructor;
|
|
19
|
-
default: () => {};
|
|
20
|
-
};
|
|
21
|
-
}>>, {
|
|
22
|
-
codeOptions: Record<string, any>;
|
|
23
|
-
}>;
|
|
24
|
-
export default _default;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { ComputedRef } from '@vue/reactivity';
|
|
2
|
-
import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
|
|
3
|
-
import { PropType } from 'vue';
|
|
4
|
-
import { GetColumnWidth, MenuBarData } from '../type';
|
|
5
|
-
declare const _default: DefineComponent<{
|
|
6
|
-
data: {
|
|
7
|
-
type: PropType<MenuBarData>;
|
|
8
|
-
default: () => {};
|
|
9
|
-
};
|
|
10
|
-
height: {
|
|
11
|
-
type: NumberConstructor;
|
|
12
|
-
};
|
|
13
|
-
}, {
|
|
14
|
-
keys: ComputedRef<(keyof MenuBarData)[]>;
|
|
15
|
-
columnWidth: ComputedRef<GetColumnWidth | undefined>;
|
|
16
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
17
|
-
data: {
|
|
18
|
-
type: PropType<MenuBarData>;
|
|
19
|
-
default: () => {};
|
|
20
|
-
};
|
|
21
|
-
height: {
|
|
22
|
-
type: NumberConstructor;
|
|
23
|
-
};
|
|
24
|
-
}>>, {
|
|
25
|
-
data: MenuBarData;
|
|
26
|
-
}>;
|
|
27
|
-
export default _default;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Ref, ComputedRef } from '@vue/reactivity';
|
|
2
|
-
import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
|
|
3
|
-
import type { FormValue } from '@tmagic/form';
|
|
4
|
-
declare const _default: DefineComponent<{}, {
|
|
5
|
-
values: Ref<FormValue>;
|
|
6
|
-
configForm: Ref<any>;
|
|
7
|
-
curFormConfig: any;
|
|
8
|
-
propsPanelSize: ComputedRef<unknown>;
|
|
9
|
-
submit(): Promise<void>;
|
|
10
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "mounted"[], "mounted", VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>> & {
|
|
11
|
-
onMounted?: ((...args: any[]) => any) | undefined;
|
|
12
|
-
}, {}>;
|
|
13
|
-
export default _default;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Ref } from '@vue/reactivity';
|
|
2
|
-
import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
|
|
3
|
-
declare const _default: DefineComponent<{
|
|
4
|
-
type: {
|
|
5
|
-
type: StringConstructor;
|
|
6
|
-
};
|
|
7
|
-
}, {
|
|
8
|
-
target: Ref<HTMLSpanElement | undefined>;
|
|
9
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
10
|
-
type: {
|
|
11
|
-
type: StringConstructor;
|
|
12
|
-
};
|
|
13
|
-
}>>, {}>;
|
|
14
|
-
export default _default;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Ref, ComputedRef } from '@vue/reactivity';
|
|
2
|
-
import type { DefineComponent, ComponentOptionsMixin, EmitsOptions, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
|
|
3
|
-
import type { ComponentItem } from '../../type';
|
|
4
|
-
declare const _default: DefineComponent<{}, {
|
|
5
|
-
searchText: Ref<string>;
|
|
6
|
-
collapseValue: ComputedRef<number[]>;
|
|
7
|
-
list: ComputedRef<{
|
|
8
|
-
items: ComponentItem[];
|
|
9
|
-
title: string;
|
|
10
|
-
}[] | undefined>;
|
|
11
|
-
appendComponent({ text, type, data }: ComponentItem): void;
|
|
12
|
-
dragstartHandler({ text, type, data }: ComponentItem, e: DragEvent): void;
|
|
13
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>;
|
|
14
|
-
export default _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ComputedRef } from '@vue/reactivity';
|
|
2
|
-
import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
|
|
3
|
-
import { PropType } from 'vue';
|
|
4
|
-
import { SideComponent, SideItem } from '../../type';
|
|
5
|
-
declare const _default: DefineComponent<{
|
|
6
|
-
data: {
|
|
7
|
-
type: PropType<SideItem>;
|
|
8
|
-
};
|
|
9
|
-
}, {
|
|
10
|
-
config: ComputedRef<SideComponent | undefined>;
|
|
11
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
12
|
-
data: {
|
|
13
|
-
type: PropType<SideItem>;
|
|
14
|
-
};
|
|
15
|
-
}>>, {}>;
|
|
16
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Ref, ComputedRef } from '@vue/reactivity';
|
|
2
|
-
import type { DefineComponent, ComponentOptionsMixin, EmitsOptions, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
|
|
3
|
-
import type { MPage } from '@tmagic/schema';
|
|
4
|
-
declare const _default: DefineComponent<{}, {
|
|
5
|
-
workspace: Ref<HTMLDivElement | undefined>;
|
|
6
|
-
page: ComputedRef<MPage | undefined>;
|
|
7
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>;
|
|
8
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
package/src/vite-env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|