@vtj/designer 0.9.0-alpha.2 → 0.9.0-alpha.21
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/{Editor-D0h3sJZq.js → Editor-C1dy1R3N.js} +4 -4
- package/dist/css.worker-BkwH8iYE.js +25 -0
- package/dist/editor.worker-C8k3yDdT.js +25 -0
- package/dist/html.worker-DefZQYbA.js +25 -0
- package/dist/index.mjs +5111 -9799
- package/dist/json.worker-05I1Fjzo.js +25 -0
- package/dist/style.css +1 -1
- package/dist/{ts.worker-DPxAurls.js → ts.worker-Dn3IQaLA.js} +1 -1
- package/package.json +8 -8
- package/types/components/hooks/useOpenApi.d.ts +4 -2
- package/types/components/hooks/useTemplates.d.ts +1 -0
- package/types/components/shared/binder.d.ts +14 -2
- package/types/components/shared/box.d.ts +4 -4
- package/types/components/shared/item.d.ts +6 -0
- package/types/components/widgets/actions/coder.d.ts +6 -0
- package/types/components/widgets/actions/index.d.ts +2 -0
- package/types/components/widgets/actions/publisher.d.ts +1 -1
- package/types/components/widgets/index.d.ts +2 -0
- package/types/components/widgets/user-avatar/index.d.ts +3 -0
- package/types/framework/engine.d.ts +3 -1
- package/types/version.d.ts +2 -2
- package/dist/css.worker-Cb_0heaR.js +0 -25
- package/dist/editor.worker-BtL2_YLX.js +0 -25
- package/dist/html.worker-CwsDGkIP.js +0 -25
- package/dist/json.worker-DsbU5PJ7.js +0 -25
package/package.json
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vtj/designer",
|
3
3
|
"private": false,
|
4
|
-
"version": "0.9.0-alpha.
|
4
|
+
"version": "0.9.0-alpha.21",
|
5
5
|
"type": "module",
|
6
6
|
"dependencies": {
|
7
7
|
"html2canvas": "~1.4.1",
|
8
8
|
"mockjs": "~1.1.0",
|
9
|
-
"monaco-editor": "~0.
|
10
|
-
"@vtj/
|
11
|
-
"@vtj/
|
12
|
-
"@vtj/
|
13
|
-
"@vtj/
|
14
|
-
"@vtj/
|
9
|
+
"monaco-editor": "~0.51.0",
|
10
|
+
"@vtj/renderer": "~0.9.0-alpha.21",
|
11
|
+
"@vtj/core": "~0.9.0-alpha.21",
|
12
|
+
"@vtj/icons": "~0.9.0-alpha.21",
|
13
|
+
"@vtj/ui": "~0.9.0-alpha.21",
|
14
|
+
"@vtj/utils": "~0.9.0-alpha.21"
|
15
15
|
},
|
16
16
|
"devDependencies": {
|
17
17
|
"@types/mockjs": "~1.0.10",
|
18
18
|
"vue": "~3.5.5",
|
19
19
|
"vue-router": "~4.4.0",
|
20
|
-
"@vtj/cli": "~0.9.0-alpha.
|
20
|
+
"@vtj/cli": "~0.9.0-alpha.2"
|
21
21
|
},
|
22
22
|
"files": [
|
23
23
|
"dist",
|
@@ -4,7 +4,7 @@ import { Engine } from '../..';
|
|
4
4
|
import { Access } from '@vtj/renderer';
|
5
5
|
export interface PublishTemplateDto {
|
6
6
|
name: string;
|
7
|
-
|
7
|
+
label: string;
|
8
8
|
category: string;
|
9
9
|
cover: Blob;
|
10
10
|
share: boolean;
|
@@ -16,11 +16,12 @@ export interface PublishTemplateDto {
|
|
16
16
|
export interface TemplateDto {
|
17
17
|
id: string;
|
18
18
|
name: string;
|
19
|
-
|
19
|
+
label: string;
|
20
20
|
vip: boolean;
|
21
21
|
share: boolean;
|
22
22
|
cover: string;
|
23
23
|
author: string;
|
24
|
+
userId: string;
|
24
25
|
category: string;
|
25
26
|
latest: string;
|
26
27
|
}
|
@@ -37,4 +38,5 @@ export declare function useOpenApi(): {
|
|
37
38
|
getTemplateCategories: () => Promise<any>;
|
38
39
|
publishTemplate: (dto: PublishTemplateDto) => Promise<any>;
|
39
40
|
getTemplateById: (id: string) => Promise<TemplateDto>;
|
41
|
+
removeTemplate: (id: string) => Promise<boolean>;
|
40
42
|
};
|
@@ -13,6 +13,7 @@ export declare function useTemplates(): {
|
|
13
13
|
getTemplates: () => Promise<TemplateDto[]>;
|
14
14
|
getTemplateDsl: (id: string) => Promise< BlockSchema | null>;
|
15
15
|
installTemplate: (templateId: string) => Promise< MessageBoxData | undefined>;
|
16
|
+
removeTemplate: (id: string) => Promise<boolean>;
|
16
17
|
groups: ComputedRef<Dictionary<TemplateDto[]>>;
|
17
18
|
access: Access | undefined;
|
18
19
|
refreshTemplates: () => void;
|
@@ -29,11 +29,13 @@ declare function __VLS_template(): {
|
|
29
29
|
model: Record<string, any>;
|
30
30
|
submitText: string | null;
|
31
31
|
resetText: string | null;
|
32
|
+
enterSubmit: boolean;
|
32
33
|
}> & Omit<{
|
33
34
|
readonly footer: boolean;
|
34
35
|
readonly inline: boolean;
|
35
36
|
readonly submitText: string | null;
|
36
37
|
readonly resetText: string | null;
|
38
|
+
readonly enterSubmit: boolean;
|
37
39
|
readonly model?: Record<string, any> | undefined;
|
38
40
|
readonly submitMethod?: ((model: FormModel) => Promise<any>) | undefined;
|
39
41
|
readonly tooltipMessage?: boolean | Partial< ElTooltipProps> | undefined;
|
@@ -41,7 +43,7 @@ declare function __VLS_template(): {
|
|
41
43
|
readonly onReset?: (() => any) | undefined;
|
42
44
|
readonly onSubmit?: ((model: Record<string, any>) => any) | undefined;
|
43
45
|
readonly onChange?: ((model: Record<string, any>) => any) | undefined;
|
44
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "footer" | "model" | "tooltipMessage" | "inline" | "submitText" | "resetText">;
|
46
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "footer" | "model" | "tooltipMessage" | "inline" | "submitText" | "resetText" | "enterSubmit">;
|
45
47
|
$attrs: {
|
46
48
|
[x: string]: unknown;
|
47
49
|
};
|
@@ -86,6 +88,10 @@ declare function __VLS_template(): {
|
|
86
88
|
type: PropType<boolean | Partial< ElTooltipProps>>;
|
87
89
|
default: undefined;
|
88
90
|
};
|
91
|
+
enterSubmit: {
|
92
|
+
type: BooleanConstructor;
|
93
|
+
default: boolean;
|
94
|
+
};
|
89
95
|
}>> & Readonly<{
|
90
96
|
onReset?: (() => any) | undefined;
|
91
97
|
onSubmit?: ((model: Record<string, any>) => any) | undefined;
|
@@ -108,6 +114,7 @@ declare function __VLS_template(): {
|
|
108
114
|
model: Record<string, any>;
|
109
115
|
submitText: string | null;
|
110
116
|
resetText: string | null;
|
117
|
+
enterSubmit: boolean;
|
111
118
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
112
119
|
beforeCreate?: (() => void) | (() => void)[];
|
113
120
|
created?: (() => void) | (() => void)[];
|
@@ -135,6 +142,7 @@ declare function __VLS_template(): {
|
|
135
142
|
model: Record<string, any>;
|
136
143
|
submitText: string | null;
|
137
144
|
resetText: string | null;
|
145
|
+
enterSubmit: boolean;
|
138
146
|
}> & Omit<Readonly< ExtractPropTypes<{
|
139
147
|
model: {
|
140
148
|
type: PropType<Record<string, any>>;
|
@@ -165,11 +173,15 @@ declare function __VLS_template(): {
|
|
165
173
|
type: PropType<boolean | Partial< ElTooltipProps>>;
|
166
174
|
default: undefined;
|
167
175
|
};
|
176
|
+
enterSubmit: {
|
177
|
+
type: BooleanConstructor;
|
178
|
+
default: boolean;
|
179
|
+
};
|
168
180
|
}>> & Readonly<{
|
169
181
|
onReset?: (() => any) | undefined;
|
170
182
|
onSubmit?: ((model: Record<string, any>) => any) | undefined;
|
171
183
|
onChange?: ((model: Record<string, any>) => any) | undefined;
|
172
|
-
}>, "footer" | "reset" | "submit" | "model" | "formRef" | "tooltipMessage" | "inline" | "submitText" | "resetText" | "validate" | "clearValidate"> & ShallowUnwrapRef<{
|
184
|
+
}>, "footer" | "reset" | "submit" | "model" | "formRef" | "tooltipMessage" | "inline" | "submitText" | "resetText" | "enterSubmit" | "validate" | "clearValidate"> & ShallowUnwrapRef<{
|
173
185
|
formRef: Ref<any, any>;
|
174
186
|
model: FormModel;
|
175
187
|
submit: () => Promise<void>;
|
@@ -18,16 +18,16 @@ declare function __VLS_template(): {
|
|
18
18
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
19
19
|
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
20
20
|
copy: (...args: any[]) => void;
|
21
|
-
edit: (...args: any[]) => void;
|
22
|
-
remove: (...args: any[]) => void;
|
23
21
|
dragend: (...args: any[]) => void;
|
24
22
|
dragstart: (...args: any[]) => void;
|
23
|
+
edit: (...args: any[]) => void;
|
24
|
+
remove: (...args: any[]) => void;
|
25
25
|
}, string, PublicProps, Readonly<Props> & Readonly<{
|
26
26
|
onCopy?: ((...args: any[]) => any) | undefined;
|
27
|
-
onEdit?: ((...args: any[]) => any) | undefined;
|
28
|
-
onRemove?: ((...args: any[]) => any) | undefined;
|
29
27
|
onDragend?: ((...args: any[]) => any) | undefined;
|
30
28
|
onDragstart?: ((...args: any[]) => any) | undefined;
|
29
|
+
onEdit?: ((...args: any[]) => any) | undefined;
|
30
|
+
onRemove?: ((...args: any[]) => any) | undefined;
|
31
31
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
32
32
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
33
33
|
export default _default;
|
@@ -40,6 +40,11 @@ declare const builtInActions: {
|
|
40
40
|
label: string;
|
41
41
|
icon: Raw<DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>>;
|
42
42
|
};
|
43
|
+
saveToBlock: {
|
44
|
+
label: string;
|
45
|
+
divided: boolean;
|
46
|
+
icon: Raw<DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>>;
|
47
|
+
};
|
43
48
|
};
|
44
49
|
export interface Props {
|
45
50
|
icon?: Record<string, any> | string;
|
@@ -58,6 +63,7 @@ export interface Props {
|
|
58
63
|
hover?: boolean;
|
59
64
|
small?: boolean;
|
60
65
|
actionInMore?: boolean;
|
66
|
+
textTags?: string[];
|
61
67
|
}
|
62
68
|
declare function __VLS_template(): {
|
63
69
|
slots: {
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
2
|
+
export interface Props {
|
3
|
+
link?: string;
|
4
|
+
}
|
5
|
+
declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
6
|
+
export default _default;
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
2
2
|
export interface Props {
|
3
|
+
onlyPublishTemplate?: boolean;
|
3
4
|
coder?: boolean;
|
4
5
|
}
|
5
6
|
declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {
|
6
7
|
coder: boolean;
|
8
|
+
onlyPublishTemplate: boolean;
|
7
9
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
8
10
|
export default _default;
|
@@ -3,7 +3,7 @@ export interface Props {
|
|
3
3
|
id?: string;
|
4
4
|
canvas: any;
|
5
5
|
name: string;
|
6
|
-
|
6
|
+
label: string;
|
7
7
|
dsl: any;
|
8
8
|
}
|
9
9
|
declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
@@ -21,6 +21,7 @@ export declare const widgets: {
|
|
21
21
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
22
22
|
Actions: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< Props> & Readonly<{}>, {
|
23
23
|
coder: boolean;
|
24
|
+
onlyPublishTemplate: boolean;
|
24
25
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
25
26
|
Pages: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
26
27
|
Blocks: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
@@ -61,4 +62,5 @@ export declare const widgets: {
|
|
61
62
|
Templates: DefineComponent<{}, {
|
62
63
|
refreshTemplates: () => void;
|
63
64
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
65
|
+
UserAvatar: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
64
66
|
};
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
3
|
+
export default _default;
|
@@ -16,10 +16,11 @@ export interface EngineOptions {
|
|
16
16
|
adapter?: Partial<ProvideAdapter>;
|
17
17
|
install?: (app: App, engine?: Engine) => void;
|
18
18
|
remoteHost?: string;
|
19
|
+
pageBasePath?: string;
|
19
20
|
}
|
20
21
|
export declare const SAVE_BLOCK_FILE_FINISH = "SAVE_BLOCK_FILE_FINISH";
|
21
22
|
export declare class Engine extends Base {
|
22
|
-
|
23
|
+
options: EngineOptions;
|
23
24
|
app?: App;
|
24
25
|
skeleton?: SkeletonWrapperInstance | null;
|
25
26
|
container: MaybeRef<HTMLElement | undefined>;
|
@@ -55,6 +56,7 @@ export declare class Engine extends Base {
|
|
55
56
|
private saveHistory;
|
56
57
|
private loadHistory;
|
57
58
|
private publish;
|
59
|
+
private genSource;
|
58
60
|
private publishCurrent;
|
59
61
|
dispose(): void;
|
60
62
|
openFile(fileId?: string): Promise<void>;
|
package/types/version.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
3
3
|
* @name @vtj/designer
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
5
|
-
* @version 0.9.0-alpha.
|
5
|
+
* @version 0.9.0-alpha.20
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
7
7
|
*/
|
8
|
-
export declare const version = "0.9.0-alpha.
|
8
|
+
export declare const version = "0.9.0-alpha.20";
|