@tmagic/editor 1.0.0-beta.8 → 1.0.0-rc.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 +1 -0
- package/coverage/clover.xml +1556 -0
- package/coverage/coverage-final.json +36 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +206 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/Editor.vue.html +802 -0
- package/coverage/lcov-report/src/components/ContentMenu.vue.html +406 -0
- package/coverage/lcov-report/src/components/Icon.vue.html +172 -0
- package/coverage/lcov-report/src/components/ScrollViewer.vue.html +283 -0
- package/coverage/lcov-report/src/components/ToolButton.vue.html +772 -0
- package/coverage/lcov-report/src/components/index.html +161 -0
- package/coverage/lcov-report/src/index.html +131 -0
- package/coverage/lcov-report/src/layouts/AddPageBox.vue.html +214 -0
- package/coverage/lcov-report/src/layouts/Framework.vue.html +343 -0
- package/coverage/lcov-report/src/layouts/NavMenu.vue.html +208 -0
- package/coverage/lcov-report/src/layouts/PropsPanel.vue.html +319 -0
- package/coverage/lcov-report/src/layouts/Resizer.vue.html +268 -0
- package/coverage/lcov-report/src/layouts/index.html +176 -0
- package/coverage/lcov-report/src/layouts/sidebar/ComponentListPanel.vue.html +358 -0
- package/coverage/lcov-report/src/layouts/sidebar/LayerMenu.vue.html +421 -0
- package/coverage/lcov-report/src/layouts/sidebar/LayerPanel.vue.html +775 -0
- package/coverage/lcov-report/src/layouts/sidebar/Sidebar.vue.html +226 -0
- package/coverage/lcov-report/src/layouts/sidebar/TabPane.vue.html +289 -0
- package/coverage/lcov-report/src/layouts/sidebar/index.html +176 -0
- package/coverage/lcov-report/src/layouts/workspace/PageBar.vue.html +718 -0
- package/coverage/lcov-report/src/layouts/workspace/Stage.vue.html +760 -0
- package/coverage/lcov-report/src/layouts/workspace/ViewerMenu.vue.html +532 -0
- package/coverage/lcov-report/src/layouts/workspace/Workspace.vue.html +598 -0
- package/coverage/lcov-report/src/layouts/workspace/index.html +161 -0
- package/coverage/lcov-report/src/services/BaseService.ts.html +643 -0
- package/coverage/lcov-report/src/services/componentList.ts.html +229 -0
- package/coverage/lcov-report/src/services/editor.ts.html +2077 -0
- package/coverage/lcov-report/src/services/events.ts.html +331 -0
- package/coverage/lcov-report/src/services/history.ts.html +478 -0
- package/coverage/lcov-report/src/services/index.html +206 -0
- package/coverage/lcov-report/src/services/props.ts.html +415 -0
- package/coverage/lcov-report/src/services/ui.ts.html +580 -0
- package/coverage/lcov-report/src/type.ts.html +850 -0
- package/coverage/lcov-report/src/utils/compose.ts.html +184 -0
- package/coverage/lcov-report/src/utils/config.ts.html +172 -0
- package/coverage/lcov-report/src/utils/editor.ts.html +838 -0
- package/coverage/lcov-report/src/utils/index.html +221 -0
- package/coverage/lcov-report/src/utils/index.ts.html +151 -0
- package/coverage/lcov-report/src/utils/logger.ts.html +226 -0
- package/coverage/lcov-report/src/utils/props.ts.html +796 -0
- package/coverage/lcov-report/src/utils/scroll-viewer.ts.html +733 -0
- package/coverage/lcov-report/src/utils/undo-redo.ts.html +313 -0
- package/coverage/lcov.info +3747 -0
- package/dist/style.css +91 -45
- package/dist/tmagic-editor.es.js +1462 -2003
- package/dist/tmagic-editor.es.js.map +1 -1
- package/dist/tmagic-editor.umd.js +1461 -2003
- package/dist/tmagic-editor.umd.js.map +1 -1
- package/dist/types/src/Editor.vue.d.ts +10 -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/Framework.vue.d.ts +15 -3
- package/dist/types/src/layouts/PropsPanel.vue.d.ts +2 -1
- package/dist/types/src/layouts/sidebar/ComponentListPanel.vue.d.ts +2 -1
- 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 +10 -3
- package/dist/types/src/layouts/workspace/Workspace.vue.d.ts +4 -6
- package/dist/types/src/services/BaseService.d.ts +4 -1
- package/dist/types/src/services/editor.d.ts +16 -6
- package/dist/types/src/services/history.d.ts +1 -0
- package/dist/types/src/services/props.d.ts +2 -2
- package/dist/types/src/services/ui.d.ts +2 -0
- package/dist/types/src/type.d.ts +16 -9
- package/dist/types/src/utils/editor.d.ts +5 -4
- package/dist/types/src/utils/polyfills.d.ts +0 -0
- package/package.json +44 -12
- package/src/Editor.vue +6 -1
- package/src/components/ContentMenu.vue +107 -0
- package/src/components/ScrollViewer.vue +1 -1
- package/src/components/ToolButton.vue +72 -31
- package/src/fields/UISelect.vue +14 -6
- package/src/index.ts +2 -0
- package/src/layouts/AddPageBox.vue +3 -1
- package/src/layouts/CodeEditor.vue +20 -13
- package/src/layouts/Framework.vue +20 -7
- package/src/layouts/PropsPanel.vue +5 -4
- package/src/layouts/sidebar/ComponentListPanel.vue +25 -3
- package/src/layouts/sidebar/LayerMenu.vue +91 -96
- package/src/layouts/sidebar/LayerPanel.vue +80 -59
- package/src/layouts/sidebar/Sidebar.vue +13 -52
- package/src/layouts/sidebar/TabPane.vue +68 -0
- package/src/layouts/workspace/PageBar.vue +145 -17
- package/src/layouts/workspace/Stage.vue +56 -64
- package/src/layouts/workspace/ViewerMenu.vue +107 -68
- package/src/layouts/workspace/Workspace.vue +110 -18
- package/src/services/BaseService.ts +70 -22
- package/src/services/editor.ts +197 -64
- package/src/services/history.ts +7 -0
- package/src/services/props.ts +3 -3
- package/src/services/ui.ts +35 -5
- package/src/theme/common/var.scss +3 -2
- package/src/theme/component-list-panel.scss +2 -0
- package/src/theme/content-menu.scss +33 -26
- package/src/theme/layer-panel.scss +10 -0
- package/src/theme/nav-menu.scss +6 -2
- package/src/theme/page-bar.scss +42 -2
- package/src/theme/props-panel.scss +19 -17
- package/src/type.ts +17 -9
- package/src/utils/editor.ts +35 -9
- package/src/utils/polyfills.ts +8 -0
- package/src/utils/props.ts +20 -1
- package/dist/types/src/layouts/sidebar/LayerMenu.vue.d.ts +0 -31
- package/dist/types/src/layouts/sidebar/LayerPanel.vue.d.ts +0 -973
- package/dist/types/src/layouts/workspace/Stage.vue.d.ts +0 -192
- package/dist/types/src/layouts/workspace/ViewerMenu.vue.d.ts +0 -18
- package/tsconfig.json +0 -9
- package/vite.config.ts +0 -30
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import type { DefineComponent, Ref, ComponentInternalInstance, ExtractPropTypes, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComputedRef, ComponentOptionsMixin, EmitsOptions, DebuggerEvent, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, nextTick, 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, ("select" | "update" | "sort")[], "sort" | "select" | "update", 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
|
-
onSelect?: ((...args: any[]) => any) | undefined;
|
|
186
|
-
onUpdate?: ((...args: any[]) => any) | undefined;
|
|
187
|
-
onSort?: ((...args: any[]) => any) | undefined;
|
|
188
|
-
}, {
|
|
189
|
-
canSelect: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
190
|
-
moveableOptions: MoveableOptions | ((core?: StageCore | undefined) => MoveableOptions);
|
|
191
|
-
}>;
|
|
192
|
-
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;
|
package/tsconfig.json
DELETED
package/vite.config.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Tencent is pleased to support the open source community by making TMagicEditor available.
|
|
3
|
-
*
|
|
4
|
-
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
* See the License for the specific language governing permissions and
|
|
16
|
-
* limitations under the License.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
import path from 'path';
|
|
20
|
-
|
|
21
|
-
import { defineConfig } from 'vite';
|
|
22
|
-
|
|
23
|
-
import { getBaseConfig } from '../vite-config';
|
|
24
|
-
|
|
25
|
-
import pkg from './package.json';
|
|
26
|
-
|
|
27
|
-
const deps = Object.keys(pkg.dependencies);
|
|
28
|
-
const alias = [{ find: /@editor/, replacement: path.join(__dirname, './src') }];
|
|
29
|
-
|
|
30
|
-
export default defineConfig(getBaseConfig(deps, 'TMagicEditor', alias));
|