@blueking/ai-blueking 0.5.0 → 0.5.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.
Files changed (46) hide show
  1. package/README.md +153 -0
  2. package/dist/ai-blueking-new.vue.d.ts +44 -36
  3. package/dist/ai-blueking.vue.d.ts +87 -0
  4. package/dist/chat-helper.d.ts +23 -0
  5. package/dist/components/ai-avatar.vue.d.ts +28 -0
  6. package/dist/components/ai-cite.vue.d.ts +21 -0
  7. package/dist/components/render-back.vue.d.ts +2 -0
  8. package/dist/components/render-content.vue.d.ts +73 -0
  9. package/dist/components/render-message.vue.d.ts +32 -0
  10. package/dist/components/render-modal.vue.d.ts +99 -0
  11. package/dist/components/render-popup.vue.d.ts +21 -0
  12. package/dist/components/render-send.vue.d.ts +30 -0
  13. package/dist/components/render-shortcuts.vue.d.ts +19 -0
  14. package/dist/components/render-stop.vue.d.ts +19 -0
  15. package/dist/components/render-time.vue.d.ts +16 -0
  16. package/dist/components-new/ai-cite.vue.d.ts +7 -18
  17. package/dist/components-new/ai-header.vue.d.ts +7 -17
  18. package/dist/components-new/ai-selected-box.vue.d.ts +6 -17
  19. package/dist/components-new/bar-button.vue.d.ts +7 -19
  20. package/dist/components-new/chat-input-box.vue.d.ts +6 -18
  21. package/dist/components-new/delete-confirm.vue.d.ts +5 -18
  22. package/dist/components-new/prompt-list.vue.d.ts +9 -20
  23. package/dist/components-new/render-message.vue.d.ts +7 -30
  24. package/dist/components-new/render-popup.vue.d.ts +3 -12
  25. package/dist/components-new/shortcuts-bar.vue.d.ts +6 -16
  26. package/dist/components-new/text-editor.vue.d.ts +13 -44
  27. package/dist/composables/use-input-interaction.d.ts +1 -1
  28. package/dist/composables/use-nimbus.d.ts +6 -6
  29. package/dist/composables/use-reference-docs.d.ts +19 -0
  30. package/dist/composables/use-resizable-container.d.ts +6 -6
  31. package/dist/composables/use-scroll-show.d.ts +1 -1
  32. package/dist/composables/use-select-pop.d.ts +13 -5
  33. package/dist/composables/use-textarea-height.d.ts +2 -2
  34. package/dist/composables/use-think.d.ts +26 -0
  35. package/dist/types/index.d.ts +8 -2
  36. package/dist/util/index.d.ts +38 -0
  37. package/dist/views/nimbus.vue.d.ts +10 -17
  38. package/dist/vue2/index.es.min.js +5906 -6106
  39. package/dist/vue2/index.iife.min.js +79 -105
  40. package/dist/vue2/index.umd.min.js +38 -38
  41. package/dist/vue2/style.css +1 -1
  42. package/dist/vue3/index.es.min.js +3383 -3387
  43. package/dist/vue3/index.iife.min.js +78 -104
  44. package/dist/vue3/index.umd.min.js +16 -16
  45. package/dist/vue3/style.css +1 -1
  46. package/package.json +2 -2
package/README.md CHANGED
@@ -113,6 +113,9 @@ export default {
113
113
  | enablePopup | Boolean | true | 是否启用选中文本后的弹出操作窗口 |
114
114
  | shortcuts | Array | [...] | 快捷操作列表 |
115
115
  | prompts | Array | [] | 预设提示词列表 |
116
+ | requestOptions | Object | {} | 自定义请求选项,可设置headers和data属性,分别合并到请求头和请求体 |
117
+ | defaultMinimize | Boolean | false | 控制 Nimbus 组件初始是否处于最小化状态 |
118
+ | sessionContents | Array | [] | 暴露当前会话内容,可用于外部访问和操作 |
116
119
 
117
120
  ### shortcuts 格式示例
118
121
 
@@ -298,6 +301,128 @@ const customPrompts = [
298
301
  </script>
299
302
  ```
300
303
 
304
+ ### Vue 3 设置 Nimbus 初始最小化状态
305
+
306
+ ```vue
307
+ <template>
308
+ <AIBlueking
309
+ ref="aiBlueking"
310
+ :url="apiUrl"
311
+ :default-minimize="true"
312
+ />
313
+ </template>
314
+
315
+ <script lang="ts" setup>
316
+ import { ref } from 'vue';
317
+ import AIBlueking from '@blueking/ai-blueking';
318
+ import '@blueking/ai-blueking/dist/vue3/style.css';
319
+
320
+ const aiBlueking = ref(null);
321
+ const apiUrl = 'https://your-api-endpoint.com/assistant/';
322
+ </script>
323
+ ```
324
+
325
+ ### Vue 3 自定义请求选项
326
+
327
+ ```vue
328
+ <template>
329
+ <AIBlueking
330
+ ref="aiBlueking"
331
+ :url="apiUrl"
332
+ :request-options="{
333
+ headers: {
334
+ preset: 'QA',
335
+ },
336
+ data: {
337
+ preset: 'QA',
338
+ },
339
+ }"
340
+ />
341
+ </template>
342
+ ```
343
+
344
+ 这将使得发送请求时,会携带 `preset` 参数,headers 的数据会合并到请求头中,请求体数据会合并到请求体中:
345
+ ```diff
346
+ {
347
+ inputs: {},
348
+ chat_history: [],
349
+ input: 'xxx',
350
+ + preset: "QA"
351
+ }
352
+ ```
353
+
354
+ ### Vue 3 访问会话内容
355
+
356
+ ```vue
357
+ <template>
358
+ <AIBlueking ref="aiBlueking" :url="apiUrl" />
359
+ <button @click="showSessionContents">显示会话内容</button>
360
+ </template>
361
+
362
+ <script lang="ts" setup>
363
+ import { ref } from 'vue';
364
+ import AIBlueking from '@blueking/ai-blueking';
365
+ import '@blueking/ai-blueking/dist/vue3/style.css';
366
+
367
+ const aiBlueking = ref<InstanceType<typeof AIBlueking>>();
368
+ const apiUrl = 'https://your-api-endpoint.com/assistant/';
369
+
370
+ const showSessionContents = () => {
371
+ const sessionContents = aiBlueking.value?.sessionContents;
372
+ console.log('当前会话内容:', sessionContents);
373
+ }
374
+ </script>
375
+
376
+ ### Vue 2 自定义请求选项
377
+
378
+ ```vue
379
+ <template>
380
+ <AIBlueking
381
+ ref="aiBlueking"
382
+ :url="apiUrl"
383
+ :request-options="{
384
+ headers: {
385
+ preset: 'QA',
386
+ },
387
+ data: {
388
+ preset: 'QA',
389
+ },
390
+ }"
391
+ />
392
+ </template>
393
+ ```
394
+
395
+ ### Vue 2 访问会话内容
396
+
397
+ ```vue
398
+ <template>
399
+ <AIBlueking ref="aiBlueking" :url="apiUrl" />
400
+ <button @click="showSessionContents">显示会话内容</button>
401
+ </template>
402
+
403
+ <script>
404
+ import AIBlueking from '@blueking/ai-blueking/vue2';
405
+ import '@blueking/ai-blueking/dist/vue2/style.css';
406
+
407
+ export default {
408
+ components: {
409
+ AIBlueking
410
+ },
411
+ data() {
412
+ return {
413
+ apiUrl: 'https://your-api-endpoint.com/assistant/'
414
+ };
415
+ },
416
+ methods: {
417
+ showSessionContents() {
418
+ const sessionContents = this.$refs.aiBlueking.sessionContents;
419
+ console.log('当前会话内容:', sessionContents);
420
+ }
421
+ }
422
+ };
423
+ </script>
424
+ ```
425
+
301
426
  ### Vue 2 自定义提示词
302
427
 
303
428
  ```vue
@@ -331,6 +456,34 @@ export default {
331
456
  </script>
332
457
  ```
333
458
 
459
+ ### Vue 2 设置 Nimbus 初始最小化状态
460
+
461
+ ```vue
462
+ <template>
463
+ <AIBlueking
464
+ ref="aiBlueking"
465
+ :url="apiUrl"
466
+ :default-minimize="true"
467
+ />
468
+ </template>
469
+
470
+ <script>
471
+ import AIBlueking from '@blueking/ai-blueking/vue2';
472
+ import '@blueking/ai-blueking/dist/vue2/style.css';
473
+
474
+ export default {
475
+ components: {
476
+ AIBlueking
477
+ },
478
+ data() {
479
+ return {
480
+ apiUrl: 'https://your-api-endpoint.com/assistant/'
481
+ };
482
+ }
483
+ };
484
+ </script>
485
+ ```
486
+
334
487
  ## 框架差异注意事项
335
488
 
336
489
  ### Vue 2 与 Vue 3 的区别
@@ -1,20 +1,49 @@
1
- import { type ShortCut } from '@blueking/ai-ui-sdk';
1
+ import type { IRequestOptions } from './types';
2
+ import { ShortCut } from '@blueking/ai-ui-sdk';
2
3
  import 'vue-draggable-resizable/style.css';
3
4
  interface Props {
4
5
  enablePopup?: boolean;
5
6
  shortcuts?: ShortCut[];
6
7
  url?: string;
7
8
  prompts?: string[];
9
+ requestOptions?: IRequestOptions;
10
+ defaultMinimize?: boolean;
8
11
  }
9
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
10
- enablePopup: boolean;
11
- shortcuts: () => ShortCut[];
12
- url: string;
13
- prompts: () => never[];
14
- }>, {
12
+ declare const _default: import("vue").DefineComponent<Props, {
13
+ sessionContents: import("vue").Ref<{
14
+ id?: number | undefined;
15
+ createdAt?: string | undefined;
16
+ createdBy?: string | undefined;
17
+ updatedAt?: string | undefined;
18
+ updatedBy?: string | undefined;
19
+ spaceId?: string | undefined;
20
+ liked?: boolean | undefined;
21
+ role: import("@blueking/ai-ui-sdk").SessionContentRole;
22
+ content: string;
23
+ rate?: number | undefined;
24
+ status?: import("@blueking/ai-ui-sdk").SessionContentStatus | undefined;
25
+ sessionCode: string;
26
+ cite?: string | undefined;
27
+ time?: string | undefined;
28
+ }[], import("@blueking/ai-ui-sdk").ISessionContent[] | {
29
+ id?: number | undefined;
30
+ createdAt?: string | undefined;
31
+ createdBy?: string | undefined;
32
+ updatedAt?: string | undefined;
33
+ updatedBy?: string | undefined;
34
+ spaceId?: string | undefined;
35
+ liked?: boolean | undefined;
36
+ role: import("@blueking/ai-ui-sdk").SessionContentRole;
37
+ content: string;
38
+ rate?: number | undefined;
39
+ status?: import("@blueking/ai-ui-sdk").SessionContentStatus | undefined;
40
+ sessionCode: string;
41
+ cite?: string | undefined;
42
+ time?: string | undefined;
43
+ }[]>;
15
44
  handleShow: () => void;
16
45
  handleStop: () => void;
17
- sendChat: (content: import("@blueking/ai-ui-sdk").BasicChatContent | import("@blueking/ai-ui-sdk").ShortcutChatContent, callback?: (() => void) | undefined) => void;
46
+ sendChat: (content: import("@blueking/ai-ui-sdk").BasicChatContent | import("@blueking/ai-ui-sdk").ShortcutChatContent, callback?: () => void) => void;
18
47
  handleSendMessage: (message: string) => void;
19
48
  handleShortcutClick: (shortcut: ShortCut) => void;
20
49
  handleDelete: (index: number) => void;
@@ -23,43 +52,22 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
23
52
  message: string;
24
53
  cite: string;
25
54
  }) => void;
26
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
55
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
56
  "shortcut-click": (shortcut: ShortCut) => void;
28
57
  close: () => void;
29
58
  show: () => void;
30
59
  stop: () => void;
31
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
32
- enablePopup: boolean;
33
- shortcuts: () => ShortCut[];
34
- url: string;
35
- prompts: () => never[];
36
- }>>> & {
37
- onShow?: (() => any) | undefined;
60
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
38
61
  onClose?: (() => any) | undefined;
62
+ onShow?: (() => any) | undefined;
39
63
  onStop?: (() => any) | undefined;
40
64
  "onShortcut-click"?: ((shortcut: ShortCut) => any) | undefined;
41
- }, {
65
+ }>, {
42
66
  enablePopup: boolean;
43
67
  prompts: string[];
44
68
  shortcuts: ShortCut[];
45
69
  url: string;
46
- }, {}>;
70
+ requestOptions: IRequestOptions;
71
+ defaultMinimize: boolean;
72
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
47
73
  export default _default;
48
-
49
- type __VLS_WithDefaults<P, D> = {
50
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
51
- default: D[K];
52
- }> : P[K];
53
- };
54
- type __VLS_Prettify<T> = {
55
- [K in keyof T]: T[K];
56
- } & {};
57
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
58
- type __VLS_TypePropsToOption<T> = {
59
- [K in keyof T]-?: {} extends Pick<T, K> ? {
60
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
61
- } : {
62
- type: import('vue').PropType<T[K]>;
63
- required: true;
64
- };
65
- };
@@ -0,0 +1,87 @@
1
+ import { Alert } from 'bkui-vue';
2
+ import type { IMessage, IPrompt, IPositionLimit, ISize, IStartPosition, IModel, ISendData, IShortCut } from './types';
3
+ interface IProps {
4
+ messages: IMessage[];
5
+ prompts?: IPrompt[];
6
+ loading?: boolean;
7
+ headBackground?: string;
8
+ background?: string;
9
+ positionLimit?: IPositionLimit;
10
+ sizeLimit?: ISize;
11
+ startPosition?: IStartPosition;
12
+ userPhoto?: string;
13
+ name?: string;
14
+ placeholder?: string;
15
+ logo?: string;
16
+ scrollLoading?: boolean;
17
+ scrollLoadingEnd?: boolean;
18
+ alert?: InstanceType<typeof Alert>['$props'] | string;
19
+ models?: IModel[];
20
+ model?: string;
21
+ isShow?: boolean;
22
+ shortcuts?: IShortCut[];
23
+ enablePopup?: boolean;
24
+ }
25
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<IProps>, {
26
+ enablePopup: boolean;
27
+ }>, {
28
+ setInputMessage: (val: string) => void;
29
+ quickActions: (type: "explanation" | "translate", content: string) => void;
30
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ send: (data: ISendData) => void;
32
+ close: () => void;
33
+ stop: () => void;
34
+ clear: () => void;
35
+ "scroll-load": () => void;
36
+ "change-prompt": (val: string) => void;
37
+ "ai-click": (val: string) => void;
38
+ "update:model": (val: string) => void;
39
+ "choose-prompt": (prompt: IPrompt) => void;
40
+ "update:isShow": (val: boolean) => void;
41
+ "shortcut-click": (data: {
42
+ type: string;
43
+ label: string;
44
+ cite: string;
45
+ prompt: string;
46
+ }) => void;
47
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<IProps>, {
48
+ enablePopup: boolean;
49
+ }>>> & {
50
+ onClose?: (() => any) | undefined;
51
+ "onChange-prompt"?: ((val: string) => any) | undefined;
52
+ "onChoose-prompt"?: ((prompt: IPrompt) => any) | undefined;
53
+ onClear?: (() => any) | undefined;
54
+ onStop?: (() => any) | undefined;
55
+ onSend?: ((data: ISendData) => any) | undefined;
56
+ "onAi-click"?: ((val: string) => any) | undefined;
57
+ "onScroll-load"?: (() => any) | undefined;
58
+ "onShortcut-click"?: ((data: {
59
+ type: string;
60
+ label: string;
61
+ cite: string;
62
+ prompt: string;
63
+ }) => any) | undefined;
64
+ "onUpdate:model"?: ((val: string) => any) | undefined;
65
+ "onUpdate:isShow"?: ((val: boolean) => any) | undefined;
66
+ }, {
67
+ enablePopup: boolean;
68
+ }, {}>;
69
+ export default _default;
70
+
71
+ type __VLS_WithDefaults<P, D> = {
72
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
73
+ default: D[K];
74
+ }> : P[K];
75
+ };
76
+ type __VLS_Prettify<T> = {
77
+ [K in keyof T]: T[K];
78
+ } & {};
79
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
80
+ type __VLS_TypePropsToOption<T> = {
81
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
82
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
83
+ } : {
84
+ type: import('vue').PropType<T[K]>;
85
+ required: true;
86
+ };
87
+ };
@@ -0,0 +1,23 @@
1
+ import { ReferenceDocStyleManager } from './composables/use-reference-docs';
2
+ import { ThinkStyleManager } from './composables/use-think';
3
+ import { IMessage } from './types';
4
+ type HandleStart = (id: number | string) => unknown;
5
+ type HandleReceiveMessage = (message: string, id: number | string, cover?: boolean) => void;
6
+ type HandleEnd = (id: number | string, message?: string) => void;
7
+ type HandleError = (message: string, code: number | string, id: number | string) => unknown;
8
+ export declare class ChatHelper {
9
+ controllerMap: Record<number | string, AbortController>;
10
+ handleEnd: HandleEnd;
11
+ handleError: HandleError;
12
+ handleReceiveMessage: HandleReceiveMessage;
13
+ handleStart: HandleStart;
14
+ messages: IMessage[];
15
+ styleManager: InstanceType<typeof ReferenceDocStyleManager>;
16
+ thinkStyleManager: InstanceType<typeof ThinkStyleManager>;
17
+ url: string;
18
+ constructor(url: string, handleStart: HandleStart, handleReceiveMessage: HandleReceiveMessage, handleEnd: HandleEnd, handleError: HandleError, messages: IMessage[]);
19
+ destroy(): void;
20
+ stop(id: number | string): void;
21
+ stream(param: unknown, id: number | string, headers?: Record<string, string>): Promise<void>;
22
+ }
23
+ export {};
@@ -0,0 +1,28 @@
1
+ interface Props {
2
+ size?: number;
3
+ }
4
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
5
+ size: number;
6
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
7
+ size: number;
8
+ }>>>, {
9
+ size: number;
10
+ }, {}>;
11
+ export default _default;
12
+ type __VLS_WithDefaults<P, D> = {
13
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
14
+ default: D[K];
15
+ }> : P[K];
16
+ };
17
+ type __VLS_Prettify<T> = {
18
+ [K in keyof T]: T[K];
19
+ } & {};
20
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
21
+ type __VLS_TypePropsToOption<T> = {
22
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
23
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
24
+ } : {
25
+ type: import('vue').PropType<T[K]>;
26
+ required: true;
27
+ };
28
+ };
@@ -0,0 +1,21 @@
1
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
+ text: string;
3
+ showCloseIcon?: boolean | undefined;
4
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ close: () => void;
6
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
7
+ text: string;
8
+ showCloseIcon?: boolean | undefined;
9
+ }>>> & {
10
+ onClose?: (() => any) | undefined;
11
+ }, {}, {}>;
12
+ export default _default;
13
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
+ type __VLS_TypePropsToOption<T> = {
15
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
16
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
+ } : {
18
+ type: import('vue').PropType<T[K]>;
19
+ required: true;
20
+ };
21
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
@@ -0,0 +1,73 @@
1
+ import { Alert } from 'bkui-vue';
2
+ import type { IMessage, IPrompt, IShortCut, ISendData } from '../types/index';
3
+ interface IProps {
4
+ messages: IMessage[];
5
+ prompts?: IPrompt[];
6
+ loading?: boolean;
7
+ background?: string;
8
+ userPhoto?: string;
9
+ placeholder?: string;
10
+ scrollLoading?: boolean;
11
+ scrollLoadingEnd?: boolean;
12
+ alert?: InstanceType<typeof Alert>['$props'] | string;
13
+ shortcuts?: IShortCut[];
14
+ }
15
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<IProps>, {
16
+ background: string;
17
+ scrollLoadingEnd: boolean;
18
+ shortcuts: () => IShortCut[];
19
+ }>, {
20
+ setInputMessage: (val: string) => void;
21
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ "change-prompt": (userInput: string) => void;
23
+ "ai-click": (userInput: string) => void;
24
+ send: (data: ISendData) => void;
25
+ "choose-prompt": (prompt: IPrompt) => void;
26
+ stop: () => void;
27
+ "scroll-load": () => void;
28
+ "shortcut-click": (data: {
29
+ type: string;
30
+ label: string;
31
+ cite: string;
32
+ prompt: string;
33
+ }) => void;
34
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<IProps>, {
35
+ background: string;
36
+ scrollLoadingEnd: boolean;
37
+ shortcuts: () => IShortCut[];
38
+ }>>> & {
39
+ "onChange-prompt"?: ((userInput: string) => any) | undefined;
40
+ "onChoose-prompt"?: ((prompt: IPrompt) => any) | undefined;
41
+ onStop?: (() => any) | undefined;
42
+ onSend?: ((data: ISendData) => any) | undefined;
43
+ "onAi-click"?: ((userInput: string) => any) | undefined;
44
+ "onScroll-load"?: (() => any) | undefined;
45
+ "onShortcut-click"?: ((data: {
46
+ type: string;
47
+ label: string;
48
+ cite: string;
49
+ prompt: string;
50
+ }) => any) | undefined;
51
+ }, {
52
+ shortcuts: IShortCut[];
53
+ background: string;
54
+ scrollLoadingEnd: boolean;
55
+ }, {}>;
56
+ export default _default;
57
+ type __VLS_WithDefaults<P, D> = {
58
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
59
+ default: D[K];
60
+ }> : P[K];
61
+ };
62
+ type __VLS_Prettify<T> = {
63
+ [K in keyof T]: T[K];
64
+ } & {};
65
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
66
+ type __VLS_TypePropsToOption<T> = {
67
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
68
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
69
+ } : {
70
+ type: import('vue').PropType<T[K]>;
71
+ required: true;
72
+ };
73
+ };
@@ -0,0 +1,32 @@
1
+ import type { IMessage } from '../types';
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
3
+ message: IMessage;
4
+ userPhoto?: string | undefined;
5
+ }>, {
6
+ userPhoto: string;
7
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
8
+ message: IMessage;
9
+ userPhoto?: string | undefined;
10
+ }>, {
11
+ userPhoto: string;
12
+ }>>>, {
13
+ userPhoto: string;
14
+ }, {}>;
15
+ export default _default;
16
+ type __VLS_WithDefaults<P, D> = {
17
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
18
+ default: D[K];
19
+ }> : P[K];
20
+ };
21
+ type __VLS_Prettify<T> = {
22
+ [K in keyof T]: T[K];
23
+ } & {};
24
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
25
+ type __VLS_TypePropsToOption<T> = {
26
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
27
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
28
+ } : {
29
+ type: import('vue').PropType<T[K]>;
30
+ required: true;
31
+ };
32
+ };
@@ -0,0 +1,99 @@
1
+ import type { IModel, IPositionLimit, ISize, IStartPosition } from '../types';
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
3
+ headBackground: string;
4
+ positionLimit?: IPositionLimit | undefined;
5
+ sizeLimit?: ISize | undefined;
6
+ logo?: string | undefined;
7
+ name?: string | undefined;
8
+ startPosition?: IStartPosition | undefined;
9
+ models?: IModel[] | undefined;
10
+ model?: string | undefined;
11
+ loading?: boolean | undefined;
12
+ }>, {
13
+ headBackground: string;
14
+ positionLimit: () => {
15
+ top: number;
16
+ bottom: number;
17
+ left: number;
18
+ right: number;
19
+ };
20
+ sizeLimit: () => {
21
+ height: number;
22
+ width: number;
23
+ };
24
+ startPosition: () => {
25
+ top: number;
26
+ bottom: number;
27
+ left: number;
28
+ right: number;
29
+ };
30
+ logo: string;
31
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
+ close: () => void;
33
+ clear: () => void;
34
+ "choose-model": (val: string) => void;
35
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
36
+ headBackground: string;
37
+ positionLimit?: IPositionLimit | undefined;
38
+ sizeLimit?: ISize | undefined;
39
+ logo?: string | undefined;
40
+ name?: string | undefined;
41
+ startPosition?: IStartPosition | undefined;
42
+ models?: IModel[] | undefined;
43
+ model?: string | undefined;
44
+ loading?: boolean | undefined;
45
+ }>, {
46
+ headBackground: string;
47
+ positionLimit: () => {
48
+ top: number;
49
+ bottom: number;
50
+ left: number;
51
+ right: number;
52
+ };
53
+ sizeLimit: () => {
54
+ height: number;
55
+ width: number;
56
+ };
57
+ startPosition: () => {
58
+ top: number;
59
+ bottom: number;
60
+ left: number;
61
+ right: number;
62
+ };
63
+ logo: string;
64
+ }>>> & {
65
+ onClose?: (() => any) | undefined;
66
+ onClear?: (() => any) | undefined;
67
+ "onChoose-model"?: ((val: string) => any) | undefined;
68
+ }, {
69
+ headBackground: string;
70
+ positionLimit: IPositionLimit;
71
+ sizeLimit: ISize;
72
+ logo: string;
73
+ startPosition: IStartPosition;
74
+ }, {}>, {
75
+ default?(_: {}): any;
76
+ }>;
77
+ export default _default;
78
+ type __VLS_WithDefaults<P, D> = {
79
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
80
+ default: D[K];
81
+ }> : P[K];
82
+ };
83
+ type __VLS_Prettify<T> = {
84
+ [K in keyof T]: T[K];
85
+ } & {};
86
+ type __VLS_WithTemplateSlots<T, S> = T & {
87
+ new (): {
88
+ $slots: S;
89
+ };
90
+ };
91
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
92
+ type __VLS_TypePropsToOption<T> = {
93
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
94
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
95
+ } : {
96
+ type: import('vue').PropType<T[K]>;
97
+ required: true;
98
+ };
99
+ };
@@ -0,0 +1,21 @@
1
+ import { IShortCut } from '../types';
2
+ interface IProps {
3
+ shortcuts: IShortCut[];
4
+ }
5
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<IProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ click: (...args: any[]) => void;
7
+ shortcutClick: (...args: any[]) => void;
8
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<IProps>>> & {
9
+ onClick?: ((...args: any[]) => any) | undefined;
10
+ onShortcutClick?: ((...args: any[]) => any) | undefined;
11
+ }, {}, {}>;
12
+ export default _default;
13
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
+ type __VLS_TypePropsToOption<T> = {
15
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
16
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
+ } : {
18
+ type: import('vue').PropType<T[K]>;
19
+ required: true;
20
+ };
21
+ };