@opentiny/genui-sdk-vue 1.3.1-alpha.2 → 1.3.2-alpha.1
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 +2 -11
- package/dist/ConfigProvider-BzxW9L3f.js +95 -0
- package/dist/ConfigProvider-BzxW9L3f.js.map +1 -0
- package/dist/{GenuiChatWithMaterials.vue_vue_type_script_setup_true_lang-zsZgFWJw.js → GenuiChatWithMaterials.vue_vue_type_script_setup_true_lang-oky3QRk7.js} +3 -3
- package/dist/{GenuiChatWithMaterials.vue_vue_type_script_setup_true_lang-zsZgFWJw.js.map → GenuiChatWithMaterials.vue_vue_type_script_setup_true_lang-oky3QRk7.js.map} +1 -1
- package/dist/{injection-tokens-DDgspg4x.js → GenuiRenderer-B22XV3Mr.js} +3269 -3224
- package/dist/GenuiRenderer-B22XV3Mr.js.map +1 -0
- package/dist/{GenuiRendererWithMaterials.vue_vue_type_script_setup_true_lang-CMjFQe5i.js → GenuiRendererWithMaterials.vue_vue_type_script_setup_true_lang-sYP74-5X.js} +6 -6
- package/dist/GenuiRendererWithMaterials.vue_vue_type_script_setup_true_lang-sYP74-5X.js.map +1 -0
- package/dist/chat.d.ts +0 -6
- package/dist/chat.js +15 -17
- package/dist/chat.js.map +1 -1
- package/dist/chat.types-CIkLm6Gm.js +1794 -0
- package/dist/chat.types-CIkLm6Gm.js.map +1 -0
- package/dist/config-provider.d.ts +12 -24
- package/dist/config-provider.js +2 -2
- package/dist/index.d.ts +33 -170
- package/dist/index.js +31 -37
- package/dist/index.js.map +1 -1
- package/dist/injection-tokens-CuDQs1ne.js +114 -0
- package/dist/injection-tokens-CuDQs1ne.js.map +1 -0
- package/dist/legacy-chat.d.ts +1 -9
- package/dist/legacy-chat.js +3 -3
- package/dist/legacy-renderer.d.ts +3 -1
- package/dist/legacy-renderer.js +2 -2
- package/dist/renderer.d.ts +16 -3
- package/dist/renderer.js +1 -1
- package/dist/transform-jsx.d.ts +3 -2
- package/dist/transform-jsx.js +14019 -14044
- package/dist/transform-jsx.js.map +1 -1
- package/package.json +5 -12
- package/dist/ConfigProvider-B_1dX_dv.js +0 -131
- package/dist/ConfigProvider-B_1dX_dv.js.map +0 -1
- package/dist/GenuiRenderer-f2_6u1TA.js +0 -141
- package/dist/GenuiRenderer-f2_6u1TA.js.map +0 -1
- package/dist/GenuiRendererWithMaterials.vue_vue_type_script_setup_true_lang-CMjFQe5i.js.map +0 -1
- package/dist/chat.types-DEDNSs5o.js +0 -1817
- package/dist/chat.types-DEDNSs5o.js.map +0 -1
- package/dist/code-generator.d.ts +0 -139
- package/dist/code-generator.js +0 -6
- package/dist/code-generator.js.map +0 -1
- package/dist/injection-tokens-DDgspg4x.js.map +0 -1
- package/dist/vue-code-generator-CwPQ3GDh.js +0 -573
- package/dist/vue-code-generator-CwPQ3GDh.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -34,19 +34,17 @@ import { IMaterials } from '@opentiny/genui-sdk-core';
|
|
|
34
34
|
import { InjectionKey } from 'vue';
|
|
35
35
|
import { INotificationPayload } from '@opentiny/genui-sdk-core';
|
|
36
36
|
import { IStreamData } from '@opentiny/genui-sdk-core';
|
|
37
|
-
import { MergedMaterials } from '@opentiny/genui-sdk-core';
|
|
38
37
|
import { MessageState } from '@opentiny/tiny-robot-kit';
|
|
39
38
|
import { nextTick } from 'vue';
|
|
40
|
-
import { NodeSchema } from '@opentiny/genui-sdk-core';
|
|
41
39
|
import { OnCleanup } from '@vue/reactivity';
|
|
42
40
|
import { PublicProps } from 'vue';
|
|
43
41
|
import { Reactive } from 'vue';
|
|
44
42
|
import { Ref } from 'vue';
|
|
43
|
+
import { RENDERER_SETTINGS_KEY } from '../../src/types/tiny-schema-renderer.d.ts';
|
|
45
44
|
import { RendererElement } from 'vue';
|
|
46
45
|
import { RendererNode } from 'vue';
|
|
47
46
|
import { ShallowUnwrapRef } from 'vue';
|
|
48
47
|
import { Slot } from 'vue';
|
|
49
|
-
import { ThemeColorScheme } from '@opentiny/genui-sdk-core';
|
|
50
48
|
import { UnwrapNestedRefs } from 'vue';
|
|
51
49
|
import { UseConversationOptions } from '@opentiny/tiny-robot-kit';
|
|
52
50
|
import { UseMessageReturn as UseMessageReturn_2 } from '@opentiny/tiny-robot-kit';
|
|
@@ -143,16 +141,23 @@ type: "null";
|
|
|
143
141
|
messagesContainer: HTMLDivElement;
|
|
144
142
|
}, HTMLDivElement>;
|
|
145
143
|
|
|
146
|
-
declare const __VLS_component_2: DefineComponent<IRendererProps, {
|
|
144
|
+
declare const __VLS_component_2: DefineComponent<IRendererProps, {
|
|
145
|
+
setState: typeof setState;
|
|
146
|
+
getState: typeof getState;
|
|
147
|
+
getContext: typeof getContext;
|
|
148
|
+
setContext: typeof setContext;
|
|
149
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IRendererProps> & Readonly<{}>, {
|
|
147
150
|
isJsonComplete: boolean;
|
|
148
151
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
149
|
-
rendererInstance:
|
|
152
|
+
rendererInstance: any;
|
|
150
153
|
}, HTMLDivElement>;
|
|
151
154
|
|
|
152
155
|
declare const __VLS_component_3: DefineComponent<ConfigProviderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ConfigProviderProps> & Readonly<{}>, {
|
|
153
156
|
id: string;
|
|
154
157
|
locale: string;
|
|
155
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
158
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
159
|
+
providerRef: unknown;
|
|
160
|
+
}, any>;
|
|
156
161
|
|
|
157
162
|
declare const __VLS_component_4: DefineComponent<IChatProps, {
|
|
158
163
|
$: ComponentInternalInstance;
|
|
@@ -622,7 +627,9 @@ empty?(_: {}): any;
|
|
|
622
627
|
};
|
|
623
628
|
}, HTMLDivElement>;
|
|
624
629
|
|
|
625
|
-
declare const __VLS_component_5: DefineComponent<IRendererProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IRendererProps> & Readonly<{}>, {
|
|
630
|
+
declare const __VLS_component_5: DefineComponent<IRendererProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IRendererProps> & Readonly<{}>, {
|
|
631
|
+
isJsonComplete: boolean;
|
|
632
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
626
633
|
|
|
627
634
|
declare function __VLS_template(): {
|
|
628
635
|
attrs: Partial<{}>;
|
|
@@ -650,7 +657,7 @@ declare function __VLS_template_2(): {
|
|
|
650
657
|
}): any;
|
|
651
658
|
};
|
|
652
659
|
refs: {
|
|
653
|
-
rendererInstance:
|
|
660
|
+
rendererInstance: any;
|
|
654
661
|
};
|
|
655
662
|
rootEl: HTMLDivElement;
|
|
656
663
|
};
|
|
@@ -660,8 +667,10 @@ declare function __VLS_template_3(): {
|
|
|
660
667
|
slots: {
|
|
661
668
|
default?(_: {}): any;
|
|
662
669
|
};
|
|
663
|
-
refs: {
|
|
664
|
-
|
|
670
|
+
refs: {
|
|
671
|
+
providerRef: unknown;
|
|
672
|
+
};
|
|
673
|
+
rootEl: any;
|
|
665
674
|
};
|
|
666
675
|
|
|
667
676
|
declare function __VLS_template_4(): {
|
|
@@ -946,17 +955,12 @@ declare type __VLS_WithTemplateSlots_5<T, S> = T & {
|
|
|
946
955
|
};
|
|
947
956
|
};
|
|
948
957
|
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
export declare type CodegenFramework = 'vue' | 'react' | 'angular' | (string & {});
|
|
952
|
-
|
|
953
|
-
export declare interface ConfigProviderProps {
|
|
954
|
-
theme?: string;
|
|
958
|
+
declare interface ConfigProviderProps {
|
|
959
|
+
theme?: 'light' | 'dark' | 'lite' | 'auto';
|
|
955
960
|
id?: string;
|
|
956
961
|
locale?: string;
|
|
957
962
|
i18n?: I18nMessages;
|
|
958
|
-
materials?:
|
|
959
|
-
notify?: NotifyHandler;
|
|
963
|
+
materials?: IMaterials;
|
|
960
964
|
}
|
|
961
965
|
|
|
962
966
|
export declare function createI18n(options?: I18nOptions): I18nInstance;
|
|
@@ -989,8 +993,6 @@ export declare class CustomModelProvider extends BaseModelProvider {
|
|
|
989
993
|
}): Promise<void>;
|
|
990
994
|
protected setupStreamContext(context: Record<string, unknown>, _request: ChatCompletionRequest): void;
|
|
991
995
|
handlerChunk(rawData: string, context: any): void;
|
|
992
|
-
handlerBeforeRequest(context: any): void;
|
|
993
|
-
handlerRequestError(context: any, error?: unknown): void;
|
|
994
996
|
handlerStart(context: any, handlers: {
|
|
995
997
|
onData: (data: IChatMessage) => void;
|
|
996
998
|
onDone: () => void;
|
|
@@ -1039,9 +1041,7 @@ declare interface FileMeta {
|
|
|
1039
1041
|
base64: string;
|
|
1040
1042
|
}
|
|
1041
1043
|
|
|
1042
|
-
export declare const
|
|
1043
|
-
|
|
1044
|
-
export declare const GENUI_CONFIG: InjectionKey<ComputedRef<GenuiConfigState>>;
|
|
1044
|
+
export declare const GENUI_CONFIG: unique symbol;
|
|
1045
1045
|
|
|
1046
1046
|
export declare const GENUI_I18N: unique symbol;
|
|
1047
1047
|
|
|
@@ -1051,17 +1051,16 @@ export declare const GenuiChat: __VLS_WithTemplateSlots<typeof __VLS_component,
|
|
|
1051
1051
|
|
|
1052
1052
|
export declare const GenuiConfigProvider: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
1053
1053
|
|
|
1054
|
-
export declare interface GenuiConfigState {
|
|
1055
|
-
colorScheme: ThemeColorScheme;
|
|
1056
|
-
id: string;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
1054
|
export declare const GenuiLegacyChat: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
|
|
1060
1055
|
|
|
1061
1056
|
export declare const GenuiLegacyRenderer: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
|
|
1062
1057
|
|
|
1063
1058
|
export declare const GenuiRenderer: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
1064
1059
|
|
|
1060
|
+
declare function getContext(): any;
|
|
1061
|
+
|
|
1062
|
+
declare function getState(): any;
|
|
1063
|
+
|
|
1065
1064
|
export declare interface I18nInstance {
|
|
1066
1065
|
locale: Ref<string>;
|
|
1067
1066
|
messages: Readonly<Reactive<UnwrapNestedRefs<I18nMessages>>>;
|
|
@@ -1118,48 +1117,6 @@ export declare interface IChatProps {
|
|
|
1118
1117
|
customFetch?: CustomFetch;
|
|
1119
1118
|
}
|
|
1120
1119
|
|
|
1121
|
-
export declare interface ICodegenDescription {
|
|
1122
|
-
componentSet: Set<string>;
|
|
1123
|
-
iconComponents: {
|
|
1124
|
-
componentNames: string[];
|
|
1125
|
-
exportNames: string[];
|
|
1126
|
-
};
|
|
1127
|
-
internalTypes: Set<string>;
|
|
1128
|
-
stateAccessors: IStateAccessorDefinition[];
|
|
1129
|
-
needsJsx: boolean;
|
|
1130
|
-
needsComputed: boolean;
|
|
1131
|
-
needsCallAction: boolean;
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
export declare interface ICodeGeneratorParams {
|
|
1135
|
-
pageInfo: {
|
|
1136
|
-
schema: CardSchema | string;
|
|
1137
|
-
name?: string;
|
|
1138
|
-
};
|
|
1139
|
-
componentsMap?: IComponentMapItem[];
|
|
1140
|
-
formatWithPrettier?: boolean;
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
export declare type ICodeGeneratorResult = ICodePanel & {
|
|
1144
|
-
errors: {
|
|
1145
|
-
message: string;
|
|
1146
|
-
}[];
|
|
1147
|
-
};
|
|
1148
|
-
|
|
1149
|
-
export declare interface ICodePanel {
|
|
1150
|
-
panelName: string;
|
|
1151
|
-
panelValue: string;
|
|
1152
|
-
panelType: CodegenFramework;
|
|
1153
|
-
prettierOpts: Record<string, unknown>;
|
|
1154
|
-
type: 'page';
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
export declare interface IComponentMapItem {
|
|
1158
|
-
componentName: string;
|
|
1159
|
-
package: string;
|
|
1160
|
-
exportName?: string;
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
1120
|
export declare interface ICustomAction extends Partial<IGenPromptAction> {
|
|
1164
1121
|
execute: (params: any, context: Record<string, any>) => any;
|
|
1165
1122
|
}
|
|
@@ -1189,10 +1146,6 @@ export declare interface ICustomModelProviderOptions {
|
|
|
1189
1146
|
getChatOptions: () => ICustomModelChatOptions;
|
|
1190
1147
|
}
|
|
1191
1148
|
|
|
1192
|
-
export declare interface IFrameworkCodeGenerator<TParams, TResult> {
|
|
1193
|
-
generate(params: TParams): Promise<TResult>;
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
1149
|
export declare interface ImageFeatures {
|
|
1197
1150
|
enabled: boolean;
|
|
1198
1151
|
maxImageSize: number;
|
|
@@ -1262,8 +1215,6 @@ export declare interface IResponseHandler<T> {
|
|
|
1262
1215
|
match: (data: T, context: any) => boolean;
|
|
1263
1216
|
handler: (data: T, context: any) => boolean;
|
|
1264
1217
|
notMatchHandler?: (data: T, context: any) => boolean;
|
|
1265
|
-
beforeRequest?: (context: any) => void;
|
|
1266
|
-
onRequestError?: (context: any, error?: unknown) => void;
|
|
1267
1218
|
start?: (context: any, handlers: {
|
|
1268
1219
|
onData: (data: IChatMessage) => void;
|
|
1269
1220
|
onDone: () => void;
|
|
@@ -1277,37 +1228,14 @@ export declare interface IRolesConfig {
|
|
|
1277
1228
|
assistant: Partial<BubbleRoleConfig>;
|
|
1278
1229
|
}
|
|
1279
1230
|
|
|
1280
|
-
export declare interface IScriptSetupBuildContext {
|
|
1281
|
-
schema: CardSchema;
|
|
1282
|
-
componentsMap: IComponentMapItem[];
|
|
1283
|
-
description: ICodegenDescription;
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
export declare interface IScriptSetupSectionDefinition {
|
|
1287
|
-
id: string;
|
|
1288
|
-
group: string;
|
|
1289
|
-
build: (ctx: IScriptSetupBuildContext) => string;
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
1231
|
declare type ISlotProps = any;
|
|
1293
1232
|
|
|
1294
|
-
export declare interface IStateAccessorDefinition {
|
|
1295
|
-
name: string;
|
|
1296
|
-
getterExpr: string;
|
|
1297
|
-
setterExpr?: string;
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
1233
|
export declare interface IThinkComponentProps {
|
|
1301
1234
|
emitter: INotificationEventEmitter;
|
|
1302
1235
|
message: IMessage;
|
|
1303
1236
|
showThinkingResult: boolean;
|
|
1304
1237
|
}
|
|
1305
1238
|
|
|
1306
|
-
export declare interface IVueCodeGeneratorOptions {
|
|
1307
|
-
prettierOpts?: Record<string, unknown>;
|
|
1308
|
-
enableCompileValidation?: boolean;
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
1239
|
export declare class MessageManager {
|
|
1312
1240
|
messageManagerMap: Map<string, UseMessageReturn>;
|
|
1313
1241
|
conversationState: Reactive<ConversationState>;
|
|
@@ -1335,19 +1263,12 @@ export declare interface ModelInfo {
|
|
|
1335
1263
|
features?: ModelFeatures;
|
|
1336
1264
|
}
|
|
1337
1265
|
|
|
1338
|
-
export declare type NotifyHandler = (options: {
|
|
1339
|
-
type?: 'success' | 'warning' | 'error' | 'info';
|
|
1340
|
-
title?: string;
|
|
1341
|
-
message?: string;
|
|
1342
|
-
duration?: number;
|
|
1343
|
-
}) => void;
|
|
1344
|
-
|
|
1345
1266
|
declare interface Props {
|
|
1346
1267
|
templateData?: UserItem[];
|
|
1347
1268
|
attachments?: FileMeta[];
|
|
1348
1269
|
}
|
|
1349
1270
|
|
|
1350
|
-
export
|
|
1271
|
+
export { RENDERER_SETTINGS_KEY }
|
|
1351
1272
|
|
|
1352
1273
|
export declare const requiredCompleteFieldSelectors: string[];
|
|
1353
1274
|
|
|
@@ -1359,6 +1280,10 @@ export declare const scrollEnd: (container: Ref<HTMLElement | undefined>) => {
|
|
|
1359
1280
|
updateIsLastMessageInBottom: () => void;
|
|
1360
1281
|
};
|
|
1361
1282
|
|
|
1283
|
+
declare function setContext(context: Record<string, any>): void;
|
|
1284
|
+
|
|
1285
|
+
declare function setState(state: Record<string, any>): void;
|
|
1286
|
+
|
|
1362
1287
|
export declare class ThinkTagWrapPattern {
|
|
1363
1288
|
protected thinkStartFlag: string;
|
|
1364
1289
|
protected thinkEndFlag: string;
|
|
@@ -1422,7 +1347,7 @@ export declare interface UseConversationReturn {
|
|
|
1422
1347
|
export declare const useI18n: () => I18nInstance;
|
|
1423
1348
|
|
|
1424
1349
|
export declare const useMediaTheme: () => {
|
|
1425
|
-
theme: Readonly<Ref<"
|
|
1350
|
+
theme: Readonly<Ref<"dark" | "light", "dark" | "light">>;
|
|
1426
1351
|
};
|
|
1427
1352
|
|
|
1428
1353
|
export declare function useMessage(options: UseMessageOptions): UseMessageReturn;
|
|
@@ -1478,66 +1403,4 @@ export declare interface UseMessageReturn {
|
|
|
1478
1403
|
retryRequest: (msgIndex: number) => Promise<void>;
|
|
1479
1404
|
}
|
|
1480
1405
|
|
|
1481
|
-
export declare class VueCodeGenerator implements IFrameworkCodeGenerator<ICodeGeneratorParams, ICodeGeneratorResult> {
|
|
1482
|
-
private readonly generatorOptions;
|
|
1483
|
-
private readonly prettierOpts;
|
|
1484
|
-
private readonly enableCompileValidation;
|
|
1485
|
-
constructor(generatorOptions?: IVueCodeGeneratorOptions);
|
|
1486
|
-
protected replaceThis(value: string, inTemplate?: boolean): string;
|
|
1487
|
-
protected buildScriptSetupStateAccessors(ctx: IScriptSetupBuildContext): string;
|
|
1488
|
-
protected buildScriptSetupImports(ctx: IScriptSetupBuildContext): string;
|
|
1489
|
-
protected buildScriptSetupRefs(ctx: IScriptSetupBuildContext): string;
|
|
1490
|
-
protected buildScriptSetupDefineProps(ctx: IScriptSetupBuildContext): string;
|
|
1491
|
-
protected buildScriptSetupDefineEmits(ctx: IScriptSetupBuildContext): string;
|
|
1492
|
-
protected buildScriptSetupIconStatement(ctx: IScriptSetupBuildContext): string;
|
|
1493
|
-
protected buildScriptSetupReactiveState(ctx: IScriptSetupBuildContext): string;
|
|
1494
|
-
protected buildScriptSetupMethods(ctx: IScriptSetupBuildContext): string;
|
|
1495
|
-
protected buildScriptSetupCallAction(ctx: IScriptSetupBuildContext): string;
|
|
1496
|
-
protected buildScriptSetupBody(ctx: IScriptSetupBuildContext, sections: readonly IScriptSetupSectionDefinition[]): string;
|
|
1497
|
-
protected buildSfcTemplateSection(template: string): string;
|
|
1498
|
-
protected buildSfcScriptSetupSection(scriptSetup: string, needsJsx?: boolean): string;
|
|
1499
|
-
protected buildSfcStyleSection(style: string): string;
|
|
1500
|
-
protected getScriptSetupSections(): readonly IScriptSetupSectionDefinition[];
|
|
1501
|
-
protected createCodegenMeta(): ICodegenDescription;
|
|
1502
|
-
protected resolveRefAttr(value: string | undefined, asJsx: boolean): string | null;
|
|
1503
|
-
protected resolvePropValueType(value: unknown): string;
|
|
1504
|
-
protected buildJSFunctionExpression(value: string, inTemplate?: boolean): string;
|
|
1505
|
-
protected hoistPropToState(key: string, item: unknown, attrsArr: string[], state: Record<string, unknown>, asJsx?: boolean): void;
|
|
1506
|
-
protected isOnEventKey(key: string): boolean;
|
|
1507
|
-
protected handleSlotBinding(item: Record<string, unknown> | string): string;
|
|
1508
|
-
protected handleEventBinding(key: string, item: {
|
|
1509
|
-
type?: string;
|
|
1510
|
-
value?: string;
|
|
1511
|
-
params?: string[];
|
|
1512
|
-
}, asJsx?: boolean): string;
|
|
1513
|
-
protected avoidDuplicateString(existings: string[], baseName: string): string;
|
|
1514
|
-
protected handleLiteralBinding(key: string, item: unknown, attrsArr: string[], description: ICodegenDescription, state: Record<string, unknown>, asJsx?: boolean): void;
|
|
1515
|
-
protected handleBinding(props: Record<string, unknown>, attrsArr: string[], description: ICodegenDescription, state: Record<string, unknown>, asJsx?: boolean): void;
|
|
1516
|
-
protected recurseChildren(children: NodeSchema[] | NodeSchema | string | undefined, state: Record<string, unknown>, description: ICodegenDescription, result: string[]): void;
|
|
1517
|
-
protected isEmptySlotNode(componentName: string | undefined, children: unknown): boolean;
|
|
1518
|
-
protected generateTemplate(schema: CardSchema, state: Record<string, any>, description: ICodegenDescription, isRootNode?: boolean): string;
|
|
1519
|
-
protected generateSlotTemplate(item: Record<string, any>, description: ICodegenDescription, state?: Record<string, unknown>): string;
|
|
1520
|
-
protected getFunctionInfo(fnStr: string): {
|
|
1521
|
-
type: string;
|
|
1522
|
-
params: string[];
|
|
1523
|
-
body: string;
|
|
1524
|
-
} | null;
|
|
1525
|
-
protected transformStateType(current: Record<string, any>, prop: string, description: ICodegenDescription, rootState: Record<string, any>): void;
|
|
1526
|
-
protected traverseState(state: Record<string, any>, description: ICodegenDescription, rootState?: Record<string, any>): void;
|
|
1527
|
-
protected buildVueSfcSource({ schema, componentsMap, }: {
|
|
1528
|
-
schema: CardSchema;
|
|
1529
|
-
name?: string;
|
|
1530
|
-
componentsMap: IComponentMapItem[];
|
|
1531
|
-
}): string;
|
|
1532
|
-
protected normalizeIncomingSchema(origin: CardSchema | string | null | undefined): CardSchema;
|
|
1533
|
-
protected generatePageCode({ pageInfo, componentsMap, formatWithPrettier, }: {
|
|
1534
|
-
pageInfo: ICodeGeneratorParams['pageInfo'];
|
|
1535
|
-
componentsMap: IComponentMapItem[];
|
|
1536
|
-
formatWithPrettier?: boolean;
|
|
1537
|
-
}): Promise<ICodeGeneratorResult>;
|
|
1538
|
-
protected normalizeComponentsMap(componentsMap: IComponentMapItem[] | undefined): IComponentMapItem[];
|
|
1539
|
-
protected formatWithPrettier(source: string, prettierOpts: Record<string, unknown>): Promise<string>;
|
|
1540
|
-
generate({ pageInfo, componentsMap, formatWithPrettier, }: ICodeGeneratorParams): Promise<ICodeGeneratorResult>;
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
1406
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -1,41 +1,35 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { G as
|
|
3
|
-
import { $ as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { _ as P } from "./GenuiChatWithMaterials.vue_vue_type_script_setup_true_lang-zsZgFWJw.js";
|
|
8
|
-
import { _ as $ } from "./GenuiRendererWithMaterials.vue_vue_type_script_setup_true_lang-CMjFQe5i.js";
|
|
9
|
-
const s = e;
|
|
1
|
+
import { C as s, D as r, E as t, G as o, I as n, M as E, T as i, d as u, e as d, s as G, b as I, t as m, u as l, a as p } from "./chat.types-CIkLm6Gm.js";
|
|
2
|
+
import { a as T, G as _, b as f, c as g, u as M } from "./injection-tokens-CuDQs1ne.js";
|
|
3
|
+
import { G as c, $ as x, r as N } from "./GenuiRenderer-B22XV3Mr.js";
|
|
4
|
+
import { C as h, u as A } from "./ConfigProvider-BzxW9L3f.js";
|
|
5
|
+
import { _ as U } from "./GenuiChatWithMaterials.vue_vue_type_script_setup_true_lang-oky3QRk7.js";
|
|
6
|
+
import { _ as D } from "./GenuiRendererWithMaterials.vue_vue_type_script_setup_true_lang-sYP74-5X.js";
|
|
10
7
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
s as CustomModelProvider,
|
|
9
|
+
r as DEFAULT_IMAGE_FEATURES,
|
|
10
|
+
t as EventEmitter,
|
|
11
|
+
T as GENUI_CONFIG,
|
|
12
|
+
_ as GENUI_I18N,
|
|
13
|
+
f as GENUI_MATERIALS,
|
|
14
|
+
o as GenuiChat,
|
|
15
|
+
h as GenuiConfigProvider,
|
|
16
|
+
U as GenuiLegacyChat,
|
|
17
|
+
D as GenuiLegacyRenderer,
|
|
18
|
+
c as GenuiRenderer,
|
|
19
|
+
n as IndexedDBStrategy,
|
|
23
20
|
E as MessageManager,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
A as useI18n,
|
|
38
|
-
v as useMediaTheme,
|
|
39
|
-
f as useMessage
|
|
21
|
+
x as RENDERER_SETTINGS_KEY,
|
|
22
|
+
i as ThinkTagWrapPattern,
|
|
23
|
+
g as createI18n,
|
|
24
|
+
u as defaultResponseHandlers,
|
|
25
|
+
d as emitter,
|
|
26
|
+
N as requiredCompleteFieldSelectors,
|
|
27
|
+
G as scrollEnd,
|
|
28
|
+
I as throttle,
|
|
29
|
+
m as toSlotFunction,
|
|
30
|
+
l as useConversation,
|
|
31
|
+
M as useI18n,
|
|
32
|
+
A as useMediaTheme,
|
|
33
|
+
p as useMessage
|
|
40
34
|
};
|
|
41
35
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ref as h, reactive as x, readonly as S } from "vue";
|
|
2
|
+
const E = { response: "响应中...", generatingCard: "正在生成卡片...", thinking: "正在思考中..." }, F = { thinking: "正在思考", thinkingEnd: "已思考" }, v = { running: "正在调用", success: "已调用", failed: "调用失败", cancelled: "已取消" }, M = { title: "出错了" }, z = { thinking: "正在思考中...", input: "请输入您的问题~" }, I = { aiGenerated: "内容由AI生成,仅供参考" }, N = { newConversation: "新会话" }, _ = { description: "继续对话,用于表单的提交按钮等", messageParam: "相关参数为:", paramDescription: "对话消息,可以是按钮文本等,也可以是其他内容" }, b = { description: "保存状态,用于保存组件状态" }, k = { context: "工具名称:{toolName},工具参数:{toolParams},工具结果:{toolResult}" }, U = { error: { processFailed: "文件处理失败", validationFailed: "文件验证失败", unknownError: "未知错误", fileSizeExceeded: "文件大小不能超过 {maxSizeMB}MB,当前文件大小:{currentSizeMB}MB", unsupportedModel: "不支持的模型", unsupportedFormat: "模型不支持 .{extension} 文件格式", sizeLimitExceeded: "文件大小超过限制(最大 {maxSize}MB)", maxFilesExceeded: "单次最多支持 {maxFiles} 个文件", unsupportedFileType: "模型不支持处理此类型的文件: {fileCategory}" } }, $ = { error: { displayError: "[显示异常]" } }, G = { requestFailed: "请求失败,请稍后重试" }, T = {
|
|
3
|
+
loading: E,
|
|
4
|
+
reasoning: F,
|
|
5
|
+
toolStatus: v,
|
|
6
|
+
error: M,
|
|
7
|
+
placeholder: z,
|
|
8
|
+
footer: I,
|
|
9
|
+
conversation: N,
|
|
10
|
+
continueChat: _,
|
|
11
|
+
saveState: b,
|
|
12
|
+
toolCall: k,
|
|
13
|
+
fileUpload: U,
|
|
14
|
+
renderer: $,
|
|
15
|
+
message: G
|
|
16
|
+
}, w = { response: "Responding...", generatingCard: "Generating cards...", thinking: "Thinking..." }, B = { thinking: "Thinking", thinkingEnd: "Thinking End" }, L = { running: "Running", success: "Succeeded", failed: "Failed", cancelled: "Cancelled" }, O = { title: "Error" }, P = { thinking: "Thinking...", input: "Please enter your question~" }, A = { aiGenerated: "Content generated by AI, for reference only" }, R = { newConversation: "New Conversation" }, j = { description: "Continue conversation, used for form submit buttons, etc.", messageParam: "Related parameters: ", paramDescription: "Conversation message, can be button text or other content" }, q = { description: "Save state, used for saving component state" }, D = { context: "Tool name: {toolName}, Tool parameters: {toolParams}, Tool result: {toolResult}" }, V = { error: { processFailed: "File processing failed", validationFailed: "File validation failed", unknownError: "Unknown error", fileSizeExceeded: "File size cannot exceed {maxSizeMB}MB, current file size: {currentSizeMB}MB", unsupportedModel: "Unsupported model", unsupportedFormat: "Model does not support .{extension} file format", sizeLimitExceeded: "File size exceeds limit (max {maxSize}MB)", maxFilesExceeded: "Maximum {maxFiles} files per request", unsupportedFileType: "Model does not support processing this type of file: {fileCategory}" } }, H = { error: { displayError: "[Display Error]" } }, J = { requestFailed: "Request failed, please try again later" }, K = {
|
|
17
|
+
loading: w,
|
|
18
|
+
reasoning: B,
|
|
19
|
+
toolStatus: L,
|
|
20
|
+
error: O,
|
|
21
|
+
placeholder: P,
|
|
22
|
+
footer: A,
|
|
23
|
+
conversation: R,
|
|
24
|
+
continueChat: j,
|
|
25
|
+
saveState: q,
|
|
26
|
+
toolCall: D,
|
|
27
|
+
fileUpload: V,
|
|
28
|
+
renderer: H,
|
|
29
|
+
message: J
|
|
30
|
+
};
|
|
31
|
+
function Q(a = {}) {
|
|
32
|
+
const d = {
|
|
33
|
+
locale: "zh_CN",
|
|
34
|
+
messages: {}
|
|
35
|
+
}, l = {
|
|
36
|
+
...d,
|
|
37
|
+
...a,
|
|
38
|
+
messages: { ...d.messages, ...a.messages }
|
|
39
|
+
}, s = h(l.locale), i = x(
|
|
40
|
+
structuredClone(l.messages)
|
|
41
|
+
);
|
|
42
|
+
function u(e) {
|
|
43
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
44
|
+
}
|
|
45
|
+
function g(e, t) {
|
|
46
|
+
if (!u(e))
|
|
47
|
+
return structuredClone(t);
|
|
48
|
+
if (!u(t))
|
|
49
|
+
return structuredClone(e);
|
|
50
|
+
for (const n in t)
|
|
51
|
+
if (Object.prototype.hasOwnProperty.call(t, n)) {
|
|
52
|
+
const r = e[n], o = t[n];
|
|
53
|
+
u(r) && u(o) ? e[n] = g(
|
|
54
|
+
r,
|
|
55
|
+
o
|
|
56
|
+
) : e[n] = structuredClone(o);
|
|
57
|
+
}
|
|
58
|
+
return e;
|
|
59
|
+
}
|
|
60
|
+
function f(e) {
|
|
61
|
+
if (typeof e != "string" || e.trim() === "") {
|
|
62
|
+
console.warn("语言标识必须是非空字符串!");
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const t = e.trim();
|
|
66
|
+
s.value !== t && (s.value = t);
|
|
67
|
+
}
|
|
68
|
+
function y(e, t = !1) {
|
|
69
|
+
if (typeof e != "object" || e === null) {
|
|
70
|
+
console.warn("要合并的词条必须是合法对象!");
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
for (const n in e)
|
|
74
|
+
if (Object.prototype.hasOwnProperty.call(e, n)) {
|
|
75
|
+
const r = e[n], o = i[n];
|
|
76
|
+
!o || t ? i[n] = structuredClone(r) : g(o, r);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function C(e, t = {}) {
|
|
80
|
+
if (typeof e != "string" || e.trim() === "")
|
|
81
|
+
return "";
|
|
82
|
+
const n = e.trim(), r = s.value, o = i[r] || {}, m = n.split(".").reduce((c, p) => (c == null ? void 0 : c[p]) || n, o);
|
|
83
|
+
return typeof m != "string" ? n : m.replace(/\{(\w+)\}/g, (c, p) => t.hasOwnProperty(p) ? String(t[p]) : c);
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
locale: s,
|
|
87
|
+
messages: S(i),
|
|
88
|
+
setLocale: f,
|
|
89
|
+
mergeMessages: y,
|
|
90
|
+
t: C
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const W = Q({
|
|
94
|
+
locale: "zh_CN",
|
|
95
|
+
// 默认语言
|
|
96
|
+
messages: {
|
|
97
|
+
zh_CN: T,
|
|
98
|
+
en_US: K
|
|
99
|
+
}
|
|
100
|
+
}), Y = () => W, Z = (a, d) => {
|
|
101
|
+
const l = a.__vccOpts || a;
|
|
102
|
+
for (const [s, i] of d)
|
|
103
|
+
l[s] = i;
|
|
104
|
+
return l;
|
|
105
|
+
}, ee = Symbol("GENUI_I18N"), ne = Symbol("GENUI_CONFIG"), te = Symbol("GENUI_MATERIALS");
|
|
106
|
+
export {
|
|
107
|
+
ee as G,
|
|
108
|
+
Z as _,
|
|
109
|
+
ne as a,
|
|
110
|
+
te as b,
|
|
111
|
+
Q as c,
|
|
112
|
+
Y as u
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=injection-tokens-CuDQs1ne.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injection-tokens-CuDQs1ne.js","sources":["../src/chat/i18n/i18n.ts","../src/chat/i18n/index.ts","../src/config-provider/injection-tokens.ts"],"sourcesContent":["import { ref, reactive, readonly, UnwrapNestedRefs } from 'vue';\nimport { I18nInstance, I18nMessages, I18nOptions, I18nMessageObject, I18nTranslateParams } from './types';\nexport function createI18n(options: I18nOptions = {}): I18nInstance {\n const defaultOptions: Required<I18nOptions> = {\n locale: 'zh_CN',\n messages: {}\n };\n\n const config: Required<I18nOptions> = {\n ...defaultOptions,\n ...options,\n messages: { ...defaultOptions.messages, ...options.messages }\n };\n\n const locale = ref<string>(config.locale);\n\n const _messages = reactive<UnwrapNestedRefs<I18nMessages>>(\n structuredClone(config.messages) as UnwrapNestedRefs<I18nMessages>\n );\n \n function isPlainObject(value: unknown): value is Record<string, any> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n }\n\n\n /**\n * @param target 目标对象(被合并的原有词条)\n * @param source 源对象(要新增的词条)\n * @returns 合并后的目标对象\n */\n function _deepMerge(target: I18nMessageObject, source: I18nMessageObject): I18nMessageObject {\n if (!isPlainObject(target)) {\n return structuredClone(source);\n }\n\n if (!isPlainObject(source)) {\n return structuredClone(target);\n }\n\n for (const key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n const targetValue = target[key];\n const sourceValue = source[key];\n\n if (isPlainObject(targetValue) && isPlainObject(sourceValue)) {\n target[key] = _deepMerge(\n targetValue as I18nMessageObject,\n sourceValue as I18nMessageObject\n );\n } else {\n target[key] = structuredClone(sourceValue);\n }\n }\n }\n\n return target;\n }\n\n function setLocale(lang: string): void {\n if (typeof lang !== 'string' || lang.trim() === '') {\n console.warn('语言标识必须是非空字符串!');\n return;\n }\n\n const trimmedLang = lang.trim();\n if (locale.value !== trimmedLang) {\n locale.value = trimmedLang;\n }\n }\n\n /**\n * @param newMessages 新的多语言词条\n * @param isCoverSameKey 合并模式:false(默认)为深度合并,保留原有词条并更新相同 key;true 为完全替换,整个语言对象被新对象替换,原有词条会丢失\n */\n function mergeMessages(newMessages: I18nMessages, isCoverSameKey = false): void {\n if (typeof newMessages !== 'object' || newMessages === null) {\n console.warn('要合并的词条必须是合法对象!');\n return;\n }\n\n for (const lang in newMessages) {\n if (Object.prototype.hasOwnProperty.call(newMessages, lang)) {\n const newLangMessages = newMessages[lang];\n const existingLangMessages = _messages[lang];\n\n if (!existingLangMessages || isCoverSameKey) {\n _messages[lang] = structuredClone(newLangMessages) as I18nMessageObject;\n } else {\n _deepMerge(existingLangMessages, newLangMessages);\n }\n }\n }\n }\n\n /**\n * @param key 词条键(如 'user.login.success')\n * @param params 可选:插值参数对象\n * @returns 翻译后的文本(无匹配时返回原 key)\n */\n function t(key: string, params: I18nTranslateParams = {}): string {\n if (typeof key !== 'string' || key.trim() === '') {\n return '';\n }\n\n const trimmedKey = key.trim();\n const currentLang = locale.value;\n const currentLangMessages = _messages[currentLang] || {};\n\n // 步骤1:解析多级词条键,获取原始文本\n const rawText = trimmedKey.split('.').reduce((current: any, nextKey) => {\n return current?.[nextKey] || trimmedKey;\n }, currentLangMessages);\n\n // 步骤2:校验原始文本类型\n if (typeof rawText !== 'string') {\n return trimmedKey;\n }\n\n // 步骤3:参数插值替换(匹配 {变量名} 格式)\n return rawText.replace(/\\{(\\w+)\\}/g, (match, paramKey) => {\n return params.hasOwnProperty(paramKey) ? String(params[paramKey]) : match;\n });\n }\n\n return {\n locale,\n messages: readonly(_messages),\n setLocale,\n mergeMessages,\n t\n };\n}\n","import zhCN from './zh.json';\nimport enUS from './en.json';\nimport { createI18n } from './i18n';\n\nconst globalI18n = createI18n({\n locale: 'zh_CN', // 默认语言\n messages: {\n 'zh_CN': zhCN,\n 'en_US': enUS,\n },\n});\n\nexport const useI18n = () => {\n return globalI18n;\n};\n\nexport * from './i18n.js';\nexport * from './types.js';\n","import type { InjectionKey } from 'vue';\nimport type { IMaterials } from '@opentiny/genui-sdk-core';\n\nexport const GENUI_I18N = Symbol('GENUI_I18N');\nexport const GENUI_CONFIG = Symbol('GENUI_CONFIG');\n\nexport const GENUI_MATERIALS: InjectionKey<IMaterials> = Symbol('GENUI_MATERIALS');\n"],"names":["createI18n","options","defaultOptions","config","locale","ref","_messages","reactive","isPlainObject","value","_deepMerge","target","source","key","targetValue","sourceValue","setLocale","lang","trimmedLang","mergeMessages","newMessages","isCoverSameKey","newLangMessages","existingLangMessages","t","params","trimmedKey","currentLang","currentLangMessages","rawText","current","nextKey","match","paramKey","readonly","globalI18n","zhCN","enUS","useI18n","GENUI_I18N","GENUI_CONFIG","GENUI_MATERIALS"],"mappings":"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"}
|
package/dist/legacy-chat.d.ts
CHANGED
|
@@ -41,7 +41,6 @@ import { RendererElement } from 'vue';
|
|
|
41
41
|
import { RendererNode } from 'vue';
|
|
42
42
|
import { ShallowUnwrapRef } from 'vue';
|
|
43
43
|
import { Slot } from 'vue';
|
|
44
|
-
import { ThemeColorScheme } from '@opentiny/genui-sdk-core';
|
|
45
44
|
import { UnwrapNestedRefs } from 'vue';
|
|
46
45
|
import { UseConversationOptions } from '@opentiny/tiny-robot-kit';
|
|
47
46
|
import { UseMessageReturn as UseMessageReturn_2 } from '@opentiny/tiny-robot-kit';
|
|
@@ -815,17 +814,12 @@ declare interface FileMeta {
|
|
|
815
814
|
base64: string;
|
|
816
815
|
}
|
|
817
816
|
|
|
818
|
-
export declare const GENUI_CONFIG:
|
|
817
|
+
export declare const GENUI_CONFIG: unique symbol;
|
|
819
818
|
|
|
820
819
|
export declare const GENUI_I18N: unique symbol;
|
|
821
820
|
|
|
822
821
|
export declare const GENUI_MATERIALS: InjectionKey<IMaterials>;
|
|
823
822
|
|
|
824
|
-
export declare interface GenuiConfigState {
|
|
825
|
-
colorScheme: ThemeColorScheme;
|
|
826
|
-
id: string;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
823
|
export declare const GenuiLegacyChat: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
830
824
|
|
|
831
825
|
export declare interface I18nInstance {
|
|
@@ -976,8 +970,6 @@ declare interface IResponseHandler<T> {
|
|
|
976
970
|
match: (data: T, context: any) => boolean;
|
|
977
971
|
handler: (data: T, context: any) => boolean;
|
|
978
972
|
notMatchHandler?: (data: T, context: any) => boolean;
|
|
979
|
-
beforeRequest?: (context: any) => void;
|
|
980
|
-
onRequestError?: (context: any, error?: unknown) => void;
|
|
981
973
|
start?: (context: any, handlers: {
|
|
982
974
|
onData: (data: IChatMessage) => void;
|
|
983
975
|
onDone: () => void;
|
package/dist/legacy-chat.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as e } from "./GenuiChatWithMaterials.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { D as r, E as n, I as o, M as E, T as I, e as u, s as G, b as g, t as i, u as M, a as T } from "./chat.types-
|
|
3
|
-
import { a as c, G as m, b as A, c as N, u as U } from "./injection-tokens-
|
|
1
|
+
import { _ as e } from "./GenuiChatWithMaterials.vue_vue_type_script_setup_true_lang-oky3QRk7.js";
|
|
2
|
+
import { D as r, E as n, I as o, M as E, T as I, e as u, s as G, b as g, t as i, u as M, a as T } from "./chat.types-CIkLm6Gm.js";
|
|
3
|
+
import { a as c, G as m, b as A, c as N, u as U } from "./injection-tokens-CuDQs1ne.js";
|
|
4
4
|
export {
|
|
5
5
|
r as DEFAULT_IMAGE_FEATURES,
|
|
6
6
|
n as EventEmitter,
|
|
@@ -7,7 +7,9 @@ import { IGenPromptAction } from '@opentiny/genui-sdk-core';
|
|
|
7
7
|
import { PublicProps } from 'vue';
|
|
8
8
|
import { VNode } from 'vue';
|
|
9
9
|
|
|
10
|
-
declare const __VLS_component: DefineComponent<IRendererProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IRendererProps> & Readonly<{}>, {
|
|
10
|
+
declare const __VLS_component: DefineComponent<IRendererProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IRendererProps> & Readonly<{}>, {
|
|
11
|
+
isJsonComplete: boolean;
|
|
12
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
13
|
|
|
12
14
|
declare function __VLS_template(): {
|
|
13
15
|
attrs: Partial<{}>;
|
package/dist/legacy-renderer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as o } from "./GenuiRendererWithMaterials.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { r as a } from "./GenuiRenderer-
|
|
1
|
+
import { _ as o } from "./GenuiRendererWithMaterials.vue_vue_type_script_setup_true_lang-sYP74-5X.js";
|
|
2
|
+
import { r as a } from "./GenuiRenderer-B22XV3Mr.js";
|
|
3
3
|
export {
|
|
4
4
|
o as GenuiLegacyRenderer,
|
|
5
5
|
a as requiredCompleteFieldSelectors
|