@vtj/designer 0.12.30 → 0.12.32
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 +0 -17
- package/dist/Editor-NXQE_X2U.js +4 -0
- package/dist/{index-i0Us9qAX.js → index-hkXjowjW.js} +5302 -5056
- package/dist/index.mjs +41 -39
- package/dist/style.css +1 -1
- package/package.json +7 -7
- package/types/components/hooks/useAI.d.ts +32 -1
- package/types/components/hooks/useOpenApi.d.ts +2 -0
- package/types/components/widgets/ai/chat-input.d.ts +1 -2
- package/types/components/widgets/ai/image-input.d.ts +6 -6
- package/types/components/widgets/ai/json-input.d.ts +561 -0
- package/types/components/widgets/ai/new-topic.d.ts +3 -1
- package/types/components/widgets/ai/pay-tip.d.ts +1 -1
- package/types/components/widgets/index.d.ts +0 -2
- package/types/components/widgets/toolbar/index.d.ts +0 -2
- package/types/constants.d.ts +1 -0
- package/types/framework/designer.d.ts +0 -2
- package/types/framework/engine.d.ts +2 -0
- package/types/framework/openapi.d.ts +19 -0
- package/types/framework/state.d.ts +31 -0
- package/types/utils.d.ts +1 -0
- package/types/version.d.ts +2 -2
- package/dist/Editor-BZyfo1aw.js +0 -4
@@ -36,6 +36,8 @@ export interface TopicDto {
|
|
36
36
|
prompt?: string;
|
37
37
|
file?: File;
|
38
38
|
}
|
39
|
+
export type TopicType = 'text' | 'image' | 'json';
|
40
|
+
export type TopicDataType = 'sketch' | 'figma' | 'unknown';
|
39
41
|
export interface AITopic {
|
40
42
|
id: string;
|
41
43
|
appId: string;
|
@@ -50,6 +52,9 @@ export interface AITopic {
|
|
50
52
|
dependencies: string;
|
51
53
|
dsl: any;
|
52
54
|
image?: string;
|
55
|
+
json?: string;
|
56
|
+
type?: TopicType;
|
57
|
+
dataType?: TopicDataType;
|
53
58
|
}
|
54
59
|
export interface AIChat {
|
55
60
|
id: string;
|
@@ -68,6 +73,9 @@ export interface AIChat {
|
|
68
73
|
vue: string;
|
69
74
|
collapsed?: boolean;
|
70
75
|
image?: string;
|
76
|
+
json?: string;
|
77
|
+
type?: TopicType;
|
78
|
+
dataType?: TopicDataType;
|
71
79
|
}
|
72
80
|
export interface ChatDto {
|
73
81
|
topicId: string;
|
@@ -138,6 +146,13 @@ export declare abstract class OpenApi {
|
|
138
146
|
topic: AITopic;
|
139
147
|
chat: AIChat;
|
140
148
|
}>>;
|
149
|
+
/**
|
150
|
+
* 发送元数据AI话题
|
151
|
+
*/
|
152
|
+
abstract postJsonTopic?: (dto: TopicDto) => Promise<ResponseWrapper<{
|
153
|
+
topic: AITopic;
|
154
|
+
chat: AIChat;
|
155
|
+
}>>;
|
141
156
|
/**
|
142
157
|
* 获取对话列表
|
143
158
|
*/
|
@@ -190,4 +205,8 @@ export declare abstract class OpenApi {
|
|
190
205
|
* 获取图片url
|
191
206
|
*/
|
192
207
|
abstract getImage?: (path?: string) => string | undefined;
|
208
|
+
/**
|
209
|
+
* 获取文件url
|
210
|
+
*/
|
211
|
+
abstract getOssFile?: (path?: string) => string | undefined;
|
193
212
|
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
export interface EngineState {
|
2
|
+
/**
|
3
|
+
* 设计视图是否显示辅助线
|
4
|
+
*/
|
5
|
+
outlineEnabled: boolean;
|
6
|
+
/**
|
7
|
+
* 设计视图是否响应事件
|
8
|
+
*/
|
9
|
+
activeEvent: boolean;
|
10
|
+
/**
|
11
|
+
* AI自动应用
|
12
|
+
*/
|
13
|
+
autoApply: boolean;
|
14
|
+
/**
|
15
|
+
* AI 大模型
|
16
|
+
*/
|
17
|
+
llm: string;
|
18
|
+
}
|
19
|
+
export declare class State {
|
20
|
+
private __state;
|
21
|
+
constructor();
|
22
|
+
private save;
|
23
|
+
get outlineEnabled(): any;
|
24
|
+
set outlineEnabled(value: any);
|
25
|
+
get activeEvent(): any;
|
26
|
+
set activeEvent(value: any);
|
27
|
+
get autoApply(): any;
|
28
|
+
set autoApply(value: any);
|
29
|
+
get llm(): any;
|
30
|
+
set llm(value: any);
|
31
|
+
}
|
package/types/utils.d.ts
CHANGED
@@ -8,3 +8,4 @@ export declare function proxyContext(context: any): any;
|
|
8
8
|
export declare function expressionValidate(str: JSExpression | JSFunction, self: any, thisRequired?: boolean): boolean;
|
9
9
|
export declare function getClassProperties(obj: any): string[];
|
10
10
|
export declare function normalizedStyle(style?: Record<string, any>): Record<string, any>;
|
11
|
+
export declare function readJsonFile(file: File): Promise<any>;
|
package/types/version.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
3
3
|
* @name @vtj/designer
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
5
|
-
* @version 0.12.
|
5
|
+
* @version 0.12.31
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
7
7
|
*/
|
8
|
-
export declare const version = "0.12.
|
8
|
+
export declare const version = "0.12.31";
|
package/dist/Editor-BZyfo1aw.js
DELETED